LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema
@ 2024-03-12 18:50 Krzysztof Kozlowski
  2024-03-13 22:09 ` Stephen Boyd
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-12 18:50 UTC (permalink / raw
  To: Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Alim Akhtar, Michael Turquette, Stephen Boyd, Rob Herring,
	Conor Dooley, linux-samsung-soc, linux-clk, devicetree,
	linux-kernel, linux-arm-kernel

Convert Samsung S3C6400/S3C6410 SoC clock controller bindings to DT
schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/clock/samsung,s3c6400-clock.yaml | 57 ++++++++++++++
 .../bindings/clock/samsung,s3c64xx-clock.txt  | 76 -------------------
 2 files changed, 57 insertions(+), 76 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/samsung,s3c6400-clock.yaml
 delete mode 100644 Documentation/devicetree/bindings/clock/samsung,s3c64xx-clock.txt

diff --git a/Documentation/devicetree/bindings/clock/samsung,s3c6400-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,s3c6400-clock.yaml
new file mode 100644
index 000000000000..d0660313c262
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/samsung,s3c6400-clock.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/samsung,s3c6400-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung S3C6400 SoC clock controller
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+description: |
+  There are several clocks that are generated outside the SoC. It is expected
+  that they are defined using standard clock bindings with following
+  clock-output-names:
+   - "fin_pll" - PLL input clock (xtal/extclk) - required,
+   - "xusbxti" - USB xtal - required,
+   - "iiscdclk0" - I2S0 codec clock - optional,
+   - "iiscdclk1" - I2S1 codec clock - optional,
+   - "iiscdclk2" - I2S2 codec clock - optional,
+   - "pcmcdclk0" - PCM0 codec clock - optional,
+   - "pcmcdclk1" - PCM1 codec clock - optional, only S3C6410.
+
+  All available clocks are defined as preprocessor macros in
+  include/dt-bindings/clock/samsung,s3c64xx-clock.h header.
+
+properties:
+  compatible:
+    enum:
+      - samsung,s3c6400-clock
+      - samsung,s3c6410-clock
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  "#clock-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - "#clock-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    clock-controller@7e00f000 {
+        compatible = "samsung,s3c6410-clock";
+        reg = <0x7e00f000 0x1000>;
+        #clock-cells = <1>;
+        clocks = <&fin_pll>;
+    };
diff --git a/Documentation/devicetree/bindings/clock/samsung,s3c64xx-clock.txt b/Documentation/devicetree/bindings/clock/samsung,s3c64xx-clock.txt
deleted file mode 100644
index 872ee8e0f041..000000000000
--- a/Documentation/devicetree/bindings/clock/samsung,s3c64xx-clock.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-* Samsung S3C64xx Clock Controller
-
-The S3C64xx clock controller generates and supplies clock to various controllers
-within the SoC. The clock binding described here is applicable to all SoCs in
-the S3C64xx family.
-
-Required Properties:
-
-- compatible: should be one of the following.
-  - "samsung,s3c6400-clock" - controller compatible with S3C6400 SoC.
-  - "samsung,s3c6410-clock" - controller compatible with S3C6410 SoC.
-
-- reg: physical base address of the controller and length of memory mapped
-  region.
-
-- #clock-cells: should be 1.
-
-Each clock is assigned an identifier and client nodes can use this identifier
-to specify the clock which they consume. Some of the clocks are available only
-on a particular S3C64xx SoC and this is specified where applicable.
-
-All available clocks are defined as preprocessor macros in
-dt-bindings/clock/samsung,s3c64xx-clock.h header and can be used in device
-tree sources.
-
-External clocks:
-
-There are several clocks that are generated outside the SoC. It is expected
-that they are defined using standard clock bindings with following
-clock-output-names:
- - "fin_pll" - PLL input clock (xtal/extclk) - required,
- - "xusbxti" - USB xtal - required,
- - "iiscdclk0" - I2S0 codec clock - optional,
- - "iiscdclk1" - I2S1 codec clock - optional,
- - "iiscdclk2" - I2S2 codec clock - optional,
- - "pcmcdclk0" - PCM0 codec clock - optional,
- - "pcmcdclk1" - PCM1 codec clock - optional, only S3C6410.
-
-Example: Clock controller node:
-
-	clock: clock-controller@7e00f000 {
-		compatible = "samsung,s3c6410-clock";
-		reg = <0x7e00f000 0x1000>;
-		#clock-cells = <1>;
-	};
-
-Example: Required external clocks:
-
-	fin_pll: clock-fin-pll {
-		compatible = "fixed-clock";
-		clock-output-names = "fin_pll";
-		clock-frequency = <12000000>;
-		#clock-cells = <0>;
-	};
-
-	xusbxti: clock-xusbxti {
-		compatible = "fixed-clock";
-		clock-output-names = "xusbxti";
-		clock-frequency = <48000000>;
-		#clock-cells = <0>;
-	};
-
-Example: UART controller node that consumes the clock generated by the clock
-  controller (refer to the standard clock bindings for information about
-  "clocks" and "clock-names" properties):
-
-		uart0: serial@7f005000 {
-			compatible = "samsung,s3c6400-uart";
-			reg = <0x7f005000 0x100>;
-			interrupt-parent = <&vic1>;
-			interrupts = <5>;
-			clock-names = "uart", "clk_uart_baud2",
-					"clk_uart_baud3";
-			clocks = <&clock PCLK_UART0>, <&clocks PCLK_UART0>,
-					<&clock SCLK_UART>;
-		};
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema
  2024-03-12 18:50 [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema Krzysztof Kozlowski
@ 2024-03-13 22:09 ` Stephen Boyd
  2024-03-17 15:23 ` Conor Dooley
  2024-03-26  9:04 ` Krzysztof Kozlowski
  2 siblings, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2024-03-13 22:09 UTC (permalink / raw
  To: Alim Akhtar, Chanwoo Choi, Conor Dooley, Krzysztof Kozlowski,
	Michael Turquette, Rob Herring, Sylwester Nawrocki, devicetree,
	linux-arm-kernel, linux-clk, linux-kernel, linux-samsung-soc

Quoting Krzysztof Kozlowski (2024-03-12 11:50:35)
> Convert Samsung S3C6400/S3C6410 SoC clock controller bindings to DT
> schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema
  2024-03-12 18:50 [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema Krzysztof Kozlowski
  2024-03-13 22:09 ` Stephen Boyd
@ 2024-03-17 15:23 ` Conor Dooley
  2024-03-17 15:26   ` Krzysztof Kozlowski
  2024-03-26  9:04 ` Krzysztof Kozlowski
  2 siblings, 1 reply; 8+ messages in thread
From: Conor Dooley @ 2024-03-17 15:23 UTC (permalink / raw
  To: Krzysztof Kozlowski
  Cc: Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
	Stephen Boyd, Rob Herring, Conor Dooley, linux-samsung-soc,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]

On Tue, Mar 12, 2024 at 07:50:35PM +0100, Krzysztof Kozlowski wrote:
> Convert Samsung S3C6400/S3C6410 SoC clock controller bindings to DT
> schema.

> +description: |
> +  There are several clocks that are generated outside the SoC. It is expected
> +  that they are defined using standard clock bindings with following
> +  clock-output-names:
> +   - "fin_pll" - PLL input clock (xtal/extclk) - required,
> +   - "xusbxti" - USB xtal - required,
> +   - "iiscdclk0" - I2S0 codec clock - optional,
> +   - "iiscdclk1" - I2S1 codec clock - optional,
> +   - "iiscdclk2" - I2S2 codec clock - optional,
> +   - "pcmcdclk0" - PCM0 codec clock - optional,
> +   - "pcmcdclk1" - PCM1 codec clock - optional, only S3C6410.

I know you've only transfered this from the text binding, but what is
the relevance of this to the binding for this clock controller? This
seems to be describing some ?fixed? clocks that must be provided in
addition to this controller. I guess there's probably no other suitable
place to mention these?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema
  2024-03-17 15:23 ` Conor Dooley
@ 2024-03-17 15:26   ` Krzysztof Kozlowski
  2024-03-17 15:49     ` Conor Dooley
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-17 15:26 UTC (permalink / raw
  To: Conor Dooley
  Cc: Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
	Stephen Boyd, Rob Herring, Conor Dooley, linux-samsung-soc,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel

On 17/03/2024 16:23, Conor Dooley wrote:
> On Tue, Mar 12, 2024 at 07:50:35PM +0100, Krzysztof Kozlowski wrote:
>> Convert Samsung S3C6400/S3C6410 SoC clock controller bindings to DT
>> schema.
> 
>> +description: |
>> +  There are several clocks that are generated outside the SoC. It is expected
>> +  that they are defined using standard clock bindings with following
>> +  clock-output-names:
>> +   - "fin_pll" - PLL input clock (xtal/extclk) - required,
>> +   - "xusbxti" - USB xtal - required,
>> +   - "iiscdclk0" - I2S0 codec clock - optional,
>> +   - "iiscdclk1" - I2S1 codec clock - optional,
>> +   - "iiscdclk2" - I2S2 codec clock - optional,
>> +   - "pcmcdclk0" - PCM0 codec clock - optional,
>> +   - "pcmcdclk1" - PCM1 codec clock - optional, only S3C6410.
> 
> I know you've only transfered this from the text binding, but what is
> the relevance of this to the binding for this clock controller? This
> seems to be describing some ?fixed? clocks that must be provided in
> addition to this controller. I guess there's probably no other suitable
> place to mention these?

To make it correct, these should be made clock inputs to the clock
controller, even if the driver does not take them, however that's
obsolete platform which might be removed from kernel this or next year,
so I don't want to spend time on it.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema
  2024-03-17 15:26   ` Krzysztof Kozlowski
@ 2024-03-17 15:49     ` Conor Dooley
  2024-03-18 16:20       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Conor Dooley @ 2024-03-17 15:49 UTC (permalink / raw
  To: Krzysztof Kozlowski
  Cc: Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
	Stephen Boyd, Rob Herring, Conor Dooley, linux-samsung-soc,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]

On Sun, Mar 17, 2024 at 04:26:55PM +0100, Krzysztof Kozlowski wrote:
> On 17/03/2024 16:23, Conor Dooley wrote:
> > On Tue, Mar 12, 2024 at 07:50:35PM +0100, Krzysztof Kozlowski wrote:
> >> Convert Samsung S3C6400/S3C6410 SoC clock controller bindings to DT
> >> schema.
> > 
> >> +description: |
> >> +  There are several clocks that are generated outside the SoC. It is expected
> >> +  that they are defined using standard clock bindings with following
> >> +  clock-output-names:
> >> +   - "fin_pll" - PLL input clock (xtal/extclk) - required,
> >> +   - "xusbxti" - USB xtal - required,
> >> +   - "iiscdclk0" - I2S0 codec clock - optional,
> >> +   - "iiscdclk1" - I2S1 codec clock - optional,
> >> +   - "iiscdclk2" - I2S2 codec clock - optional,
> >> +   - "pcmcdclk0" - PCM0 codec clock - optional,
> >> +   - "pcmcdclk1" - PCM1 codec clock - optional, only S3C6410.
> > 
> > I know you've only transfered this from the text binding, but what is
> > the relevance of this to the binding for this clock controller? This
> > seems to be describing some ?fixed? clocks that must be provided in
> > addition to this controller. I guess there's probably no other suitable
> > place to mention these?
> 
> To make it correct, these should be made clock inputs to the clock
> controller, even if the driver does not take them, however that's
> obsolete platform which might be removed from kernel this or next year,
> so I don't want to spend time on it.

I think the comment should probably mention that these are the expected
inputs, part of me thought that that was what you were getting at but I
wasn't sure if instead they were inputs to some other IP on the SoC.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema
  2024-03-17 15:49     ` Conor Dooley
@ 2024-03-18 16:20       ` Krzysztof Kozlowski
  2024-03-18 23:59         ` Conor Dooley
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-18 16:20 UTC (permalink / raw
  To: Conor Dooley
  Cc: Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
	Stephen Boyd, Rob Herring, Conor Dooley, linux-samsung-soc,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel

On 17/03/2024 16:49, Conor Dooley wrote:
> On Sun, Mar 17, 2024 at 04:26:55PM +0100, Krzysztof Kozlowski wrote:
>> On 17/03/2024 16:23, Conor Dooley wrote:
>>> On Tue, Mar 12, 2024 at 07:50:35PM +0100, Krzysztof Kozlowski wrote:
>>>> Convert Samsung S3C6400/S3C6410 SoC clock controller bindings to DT
>>>> schema.
>>>
>>>> +description: |
>>>> +  There are several clocks that are generated outside the SoC. It is expected
>>>> +  that they are defined using standard clock bindings with following
>>>> +  clock-output-names:
>>>> +   - "fin_pll" - PLL input clock (xtal/extclk) - required,
>>>> +   - "xusbxti" - USB xtal - required,
>>>> +   - "iiscdclk0" - I2S0 codec clock - optional,
>>>> +   - "iiscdclk1" - I2S1 codec clock - optional,
>>>> +   - "iiscdclk2" - I2S2 codec clock - optional,
>>>> +   - "pcmcdclk0" - PCM0 codec clock - optional,
>>>> +   - "pcmcdclk1" - PCM1 codec clock - optional, only S3C6410.
>>>
>>> I know you've only transfered this from the text binding, but what is
>>> the relevance of this to the binding for this clock controller? This
>>> seems to be describing some ?fixed? clocks that must be provided in
>>> addition to this controller. I guess there's probably no other suitable
>>> place to mention these?
>>
>> To make it correct, these should be made clock inputs to the clock
>> controller, even if the driver does not take them, however that's
>> obsolete platform which might be removed from kernel this or next year,
>> so I don't want to spend time on it.
> 
> I think the comment should probably mention that these are the expected
> inputs, part of me thought that that was what you were getting at but I
> wasn't sure if instead they were inputs to some other IP on the SoC.

I can change it, but just to emphasize: in half a year or next year we
will probably remove entire platform, thus also this binding.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema
  2024-03-18 16:20       ` Krzysztof Kozlowski
@ 2024-03-18 23:59         ` Conor Dooley
  0 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2024-03-18 23:59 UTC (permalink / raw
  To: Krzysztof Kozlowski
  Cc: Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
	Stephen Boyd, Rob Herring, Conor Dooley, linux-samsung-soc,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 2584 bytes --]

On Mon, Mar 18, 2024 at 05:20:50PM +0100, Krzysztof Kozlowski wrote:
> On 17/03/2024 16:49, Conor Dooley wrote:
> > On Sun, Mar 17, 2024 at 04:26:55PM +0100, Krzysztof Kozlowski wrote:
> >> On 17/03/2024 16:23, Conor Dooley wrote:
> >>> On Tue, Mar 12, 2024 at 07:50:35PM +0100, Krzysztof Kozlowski wrote:
> >>>> Convert Samsung S3C6400/S3C6410 SoC clock controller bindings to DT
> >>>> schema.
> >>>
> >>>> +description: |
> >>>> +  There are several clocks that are generated outside the SoC. It is expected
> >>>> +  that they are defined using standard clock bindings with following
> >>>> +  clock-output-names:
> >>>> +   - "fin_pll" - PLL input clock (xtal/extclk) - required,
> >>>> +   - "xusbxti" - USB xtal - required,
> >>>> +   - "iiscdclk0" - I2S0 codec clock - optional,
> >>>> +   - "iiscdclk1" - I2S1 codec clock - optional,
> >>>> +   - "iiscdclk2" - I2S2 codec clock - optional,
> >>>> +   - "pcmcdclk0" - PCM0 codec clock - optional,
> >>>> +   - "pcmcdclk1" - PCM1 codec clock - optional, only S3C6410.
> >>>
> >>> I know you've only transfered this from the text binding, but what is
> >>> the relevance of this to the binding for this clock controller? This
> >>> seems to be describing some ?fixed? clocks that must be provided in
> >>> addition to this controller. I guess there's probably no other suitable
> >>> place to mention these?
> >>
> >> To make it correct, these should be made clock inputs to the clock
> >> controller, even if the driver does not take them, however that's
> >> obsolete platform which might be removed from kernel this or next year,
> >> so I don't want to spend time on it.
> > 
> > I think the comment should probably mention that these are the expected
> > inputs, part of me thought that that was what you were getting at but I
> > wasn't sure if instead they were inputs to some other IP on the SoC.
> 
> I can change it, but just to emphasize: in half a year or next year we
> will probably remove entire platform, thus also this binding.

I know, I saw that. I don't really care what you do given the platform
is being deleted and it is unlikely that anyone is actually going to be
assembling a from-scratch dtsi for this SoC. On the other hand, if
you're doing a conversion, even in this scenario, I think it should be
clear. 
I didn't ack the patch cos I figured you were taking the patch via the
samsung tree (and on to Stephen) yourself, but here:
Acked-by: Conor Dooley <conor.dooley@microchip.com>

I'd rather argue about the definition of erratum instead of this :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema
  2024-03-12 18:50 [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema Krzysztof Kozlowski
  2024-03-13 22:09 ` Stephen Boyd
  2024-03-17 15:23 ` Conor Dooley
@ 2024-03-26  9:04 ` Krzysztof Kozlowski
  2 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-26  9:04 UTC (permalink / raw
  To: Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
	Stephen Boyd, Rob Herring, Conor Dooley, linux-samsung-soc,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	Krzysztof Kozlowski


On Tue, 12 Mar 2024 19:50:35 +0100, Krzysztof Kozlowski wrote:
> Convert Samsung S3C6400/S3C6410 SoC clock controller bindings to DT
> schema.
> 
> 

Applied with description changes as Conor suggested.

Applied, thanks!

[1/1] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema
      https://git.kernel.org/krzk/linux/c/2125459ced054218fa8cf0170a116e2eeaa0f276

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-26  9:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 18:50 [PATCH] dt-bindings: clock: samsung,s3c6400-clock: convert to DT Schema Krzysztof Kozlowski
2024-03-13 22:09 ` Stephen Boyd
2024-03-17 15:23 ` Conor Dooley
2024-03-17 15:26   ` Krzysztof Kozlowski
2024-03-17 15:49     ` Conor Dooley
2024-03-18 16:20       ` Krzysztof Kozlowski
2024-03-18 23:59         ` Conor Dooley
2024-03-26  9:04 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).