All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacky Huang <ychuang3@nuvoton.com>
To: Rob Herring <robh@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"sboyd@kernel.org" <sboyd@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"olof@lixom.net" <olof@lixom.net>,
	"soc@kernel.org" <soc@kernel.org>, MS10 CFLi0 <CFLi0@nuvoton.com>
Subject: Re: [PATCH 2/3] dt-bindings: clock: Document MA35D1 clock controller bindings
Date: Wed, 6 Apr 2022 12:15:52 +0800	[thread overview]
Message-ID: <6cf25693-38dd-3b3d-8f38-649fc208ac90@nuvoton.com> (raw)
In-Reply-To: <YkYRGNr1o087/6MM@robh.at.kernel.org>



On 2022/4/1 上午 04:37, Rob Herring wrote:
> On Thu, Mar 31, 2022 at 10:42:55AM +0800, Jacky Huang wrote:
>> Add documentation to describe Nuvoton MA35D1 clock driver bindings.
>>
>> Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
>> ---
>>   .../bindings/clock/nuvoton,ma35d1-clk.yaml    | 59 +++++++++++++++++++
>>   1 file changed, 59 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml b/Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml
>> new file mode 100644
>> index 000000000000..bf5474b10420
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml
>> @@ -0,0 +1,59 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fclock%2Fnuvoton%2Cma35d1-clk.yaml%23&amp;data=04%7C01%7Cychuang3%40nuvoton.com%7C2af0b5b253d14b24de4e08da1356520e%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637843795866047143%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=imev20A0MjoKYaL8o%2FXx3b%2FeCbSnXxVEjs9XqCLQZo0%3D&amp;reserved=0
>> +$schema: https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=04%7C01%7Cychuang3%40nuvoton.com%7C2af0b5b253d14b24de4e08da1356520e%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637843795866047143%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=zYcNQdhT2KPxQeVzPJ8Tm5gzRxk6Z0j7O6Cy01LWDRU%3D&amp;reserved=0
>> +
>> +title: Nuvoton MA35D1 Clock Control Module Binding
>> +
>> +maintainers:
>> +  - Chi-Fang Li <cfli0@nuvoton.com>
>> +  - Jacky Huang <ychuang3@nuvoton.com>
>> +
>> +description: |
>> +  The MA35D1 clock controller generates clocks for the whole chip,
>> +  including system clocks and all peripheral clocks.
>> +
>> +  See also:
>> +    dt-bindings/clock/ma35d1-clk.h
>> +
>> +properties:
>> +  compatible:
>> +    const: nuvoton,ma35d1-clk
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  "#clock-cells":
>> +    const: 1
>> +
>> +  clocks:
>> +    maxItems: 1
>> +
>> +  assigned-clocks:
>> +    maxItems: 4
> These aren't usually in the clock controller...

"clocks" is actually not used. I will remove it.

Does the "aren't usually" include "assigned-clocks"?
I saw it in other vendors.
For example rk3399.dtsi
It presents in cru: clock-controller@ff760000 node.

We use "assigned-clocks" to declare the four output PLLs of the clock 
controller.

>
>> +
>> +  assigned-clock-rates:
>> +    maxItems: 4
>> +
>> +  clock-pll-mode:
>> +    maxItems: 4
> What's this? Not a standard property. Needs a type, description, and
> vendor prefix.

clock-pll-mode is a vendor specific property.
I would modify it as the following:

   nuvoton,clk-pll-mode:
     A list of PLL operation mode corresponding to DDRPLL, APLL, EPLL, 
and VPLL
     in sequential.
     $ref: /schemas/types.yaml#/definitions/uint32-array
     minItems: 4
     maxItems: 4
     items:
       enum: [ 0, 1, 2 ]

Is it OK?


>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - "#clock-cells"
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  # clock control module node:
>> +  - |
>> +    #include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
>> +
>> +    clk: clock-controller@40460200 {
>> +        compatible = "nuvoton,ma35d1-clk";
>> +        reg = <0x40460200 0x100>;
>> +        #clock-cells = <1>;
>> +    };
>> +...
>> -- 
>> 2.30.2
>>
>>


WARNING: multiple messages have this Message-ID (diff)
From: Jacky Huang <ychuang3@nuvoton.com>
To: Rob Herring <robh@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"sboyd@kernel.org" <sboyd@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"olof@lixom.net" <olof@lixom.net>,
	"soc@kernel.org" <soc@kernel.org>, MS10 CFLi0 <CFLi0@nuvoton.com>
Subject: Re: [PATCH 2/3] dt-bindings: clock: Document MA35D1 clock controller bindings
Date: Wed, 6 Apr 2022 12:15:52 +0800	[thread overview]
Message-ID: <6cf25693-38dd-3b3d-8f38-649fc208ac90@nuvoton.com> (raw)
In-Reply-To: <YkYRGNr1o087/6MM@robh.at.kernel.org>



On 2022/4/1 上午 04:37, Rob Herring wrote:
> On Thu, Mar 31, 2022 at 10:42:55AM +0800, Jacky Huang wrote:
>> Add documentation to describe Nuvoton MA35D1 clock driver bindings.
>>
>> Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
>> ---
>>   .../bindings/clock/nuvoton,ma35d1-clk.yaml    | 59 +++++++++++++++++++
>>   1 file changed, 59 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml b/Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml
>> new file mode 100644
>> index 000000000000..bf5474b10420
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml
>> @@ -0,0 +1,59 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fclock%2Fnuvoton%2Cma35d1-clk.yaml%23&amp;data=04%7C01%7Cychuang3%40nuvoton.com%7C2af0b5b253d14b24de4e08da1356520e%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637843795866047143%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=imev20A0MjoKYaL8o%2FXx3b%2FeCbSnXxVEjs9XqCLQZo0%3D&amp;reserved=0
>> +$schema: https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=04%7C01%7Cychuang3%40nuvoton.com%7C2af0b5b253d14b24de4e08da1356520e%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637843795866047143%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=zYcNQdhT2KPxQeVzPJ8Tm5gzRxk6Z0j7O6Cy01LWDRU%3D&amp;reserved=0
>> +
>> +title: Nuvoton MA35D1 Clock Control Module Binding
>> +
>> +maintainers:
>> +  - Chi-Fang Li <cfli0@nuvoton.com>
>> +  - Jacky Huang <ychuang3@nuvoton.com>
>> +
>> +description: |
>> +  The MA35D1 clock controller generates clocks for the whole chip,
>> +  including system clocks and all peripheral clocks.
>> +
>> +  See also:
>> +    dt-bindings/clock/ma35d1-clk.h
>> +
>> +properties:
>> +  compatible:
>> +    const: nuvoton,ma35d1-clk
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  "#clock-cells":
>> +    const: 1
>> +
>> +  clocks:
>> +    maxItems: 1
>> +
>> +  assigned-clocks:
>> +    maxItems: 4
> These aren't usually in the clock controller...

"clocks" is actually not used. I will remove it.

Does the "aren't usually" include "assigned-clocks"?
I saw it in other vendors.
For example rk3399.dtsi
It presents in cru: clock-controller@ff760000 node.

We use "assigned-clocks" to declare the four output PLLs of the clock 
controller.

>
>> +
>> +  assigned-clock-rates:
>> +    maxItems: 4
>> +
>> +  clock-pll-mode:
>> +    maxItems: 4
> What's this? Not a standard property. Needs a type, description, and
> vendor prefix.

clock-pll-mode is a vendor specific property.
I would modify it as the following:

   nuvoton,clk-pll-mode:
     A list of PLL operation mode corresponding to DDRPLL, APLL, EPLL, 
and VPLL
     in sequential.
     $ref: /schemas/types.yaml#/definitions/uint32-array
     minItems: 4
     maxItems: 4
     items:
       enum: [ 0, 1, 2 ]

Is it OK?


>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - "#clock-cells"
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  # clock control module node:
>> +  - |
>> +    #include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
>> +
>> +    clk: clock-controller@40460200 {
>> +        compatible = "nuvoton,ma35d1-clk";
>> +        reg = <0x40460200 0x100>;
>> +        #clock-cells = <1>;
>> +    };
>> +...
>> -- 
>> 2.30.2
>>
>>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-06 10:19 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31  2:42 [PATCH 0/3] Add initial support for MA35D1 SoC Jacky Huang
2022-03-31  2:42 ` Jacky Huang
2022-03-31  2:42 ` [PATCH 1/3] dt-bindings: clock: add binding for MA35D1 clock controller Jacky Huang
2022-03-31  2:42   ` Jacky Huang
2022-03-31  6:29   ` Krzysztof Kozlowski
2022-03-31  6:29     ` Krzysztof Kozlowski
2022-03-31  6:34     ` Krzysztof Kozlowski
2022-03-31  6:34       ` Krzysztof Kozlowski
2022-04-06  4:00       ` Jacky Huang
2022-04-06  4:00         ` Jacky Huang
2022-04-06  7:46         ` Krzysztof Kozlowski
2022-04-06  7:46           ` Krzysztof Kozlowski
2022-04-06  3:41     ` Jacky Huang
2022-04-06  3:41       ` Jacky Huang
2022-03-31  2:42 ` [PATCH 2/3] dt-bindings: clock: Document MA35D1 clock controller bindings Jacky Huang
2022-03-31  2:42   ` Jacky Huang
2022-03-31  6:27   ` Krzysztof Kozlowski
2022-03-31  6:27     ` Krzysztof Kozlowski
2022-04-06  3:12     ` Jacky Huang
2022-04-06  3:12       ` Jacky Huang
2022-03-31 20:37   ` Rob Herring
2022-03-31 20:37     ` Rob Herring
2022-04-06  4:15     ` Jacky Huang [this message]
2022-04-06  4:15       ` Jacky Huang
2022-03-31  2:42 ` [PATCH 3/3] arm64: dts: nuvoton: Add initial support for MA35D1 Jacky Huang
2022-03-31  2:42   ` Jacky Huang
2022-03-31  6:32   ` Krzysztof Kozlowski
2022-03-31  6:32     ` Krzysztof Kozlowski
2022-04-01 23:34     ` Stephen Boyd
2022-04-01 23:34       ` Stephen Boyd
2022-04-02  9:55       ` Krzysztof Kozlowski
2022-04-02  9:55         ` Krzysztof Kozlowski
2022-04-04 20:14         ` Stephen Boyd
2022-04-04 20:14           ` Stephen Boyd
2022-04-06  2:11     ` Jacky Huang
2022-04-06  2:11       ` Jacky Huang
  -- strict thread matches above, loose matches on Subject: below --
2022-03-07  9:19 [PATCH 0/3] Add initial support for MA35D1 SoC Jacky Huang
2022-03-07  9:19 ` [PATCH 2/3] dt-bindings: clock: Document MA35D1 clock controller bindings Jacky Huang
2022-03-07  9:19   ` Jacky Huang
2022-03-07 10:21   ` Krzysztof Kozlowski
2022-03-07 10:21     ` Krzysztof Kozlowski
2022-03-08  1:07   ` Rob Herring
2022-03-08  1:07     ` Rob Herring
2022-03-09  3:31     ` MS10 YCHuang3
2022-03-09  3:31       ` MS10 YCHuang3

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6cf25693-38dd-3b3d-8f38-649fc208ac90@nuvoton.com \
    --to=ychuang3@nuvoton.com \
    --cc=CFLi0@nuvoton.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=soc@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.