Convert Samsung S3C6400/S3C6410 SoC clock controller bindings to DT
schema.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../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 <[email protected]>
+
+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
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 <[email protected]>
> ---
Reviewed-by: Stephen Boyd <[email protected]>
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?
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
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.
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
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 <[email protected]>
I'd rather argue about the definition of erratum instead of this :)
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 <[email protected]>