Message ID | 20220923205251.1387-2-alexander.helms.jy@renesas.com |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | Add support for Renesas ProXO XP oscillator | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success | |
robh/patch-applied | success | |
robh/dtbs-check | warning | build log |
robh/dt-meta-schema | success |
On Fri, Sep 23, 2022 at 01:52:50PM -0700, Alex Helms wrote: > Add dt bindings for the Renesas ProXO oscillator. > > Signed-off-by: Alex Helms <alexander.helms.jy@renesas.com> > --- > .../bindings/clock/renesas,proxo.yaml | 49 +++++++++++++++++++ > MAINTAINERS | 5 ++ > 2 files changed, 54 insertions(+) > create mode 100644 Documentation/devicetree/bindings/clock/renesas,proxo.yaml > > diff --git a/Documentation/devicetree/bindings/clock/renesas,proxo.yaml b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml > new file mode 100644 > index 000000000..79d62f399 > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml > @@ -0,0 +1,49 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/clock/renesas,proxo.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Renesas ProXO Oscillator Device Tree Bindings > + > +maintainers: > + - Alex Helms <alexander.helms.jy@renesas.com> > + > +description: > + Renesas ProXO is a family of programmable ultra-low phase noise > + quartz-based oscillators. > + > +properties: > + '#clock-cells': > + const: 0 > + > + compatible: > + enum: > + - renesas,proxo-xp > + > + reg: > + maxItems: 1 > + > + renesas,crystal-frequency: > + description: Internal crystal frequency, default is 50000000 (50MHz) > + $ref: /schemas/types.yaml#/definitions/uint32 'clock-frequency' doesn't work here? Anything else needs '-hz' suffix. > + > +required: > + - '#clock-cells' > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + proxo: clock-controller@55 { > + compatible = "renesas,proxo-xp"; > + reg = <0x55>; > + #clock-cells = <0>; > + }; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index 350102355..d52a8a5d2 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -16080,6 +16080,11 @@ S: Supported > F: Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml > F: drivers/iio/adc/rzg2l_adc.c > > +RENESAS PROXO CLOCK DRIVER > +M: Alex Helms <alexander.helms.jy@renesas.com> > +S: Maintained > +F: Documentation/devicetree/bindings/clock/renesas,proxo.yaml > + > RESET CONTROLLER FRAMEWORK > M: Philipp Zabel <p.zabel@pengutronix.de> > S: Maintained > -- > 2.30.2 > >
Hi Alex, On 9/27/22 01:04, Rob Herring wrote: > On Fri, Sep 23, 2022 at 01:52:50PM -0700, Alex Helms wrote: >> Add dt bindings for the Renesas ProXO oscillator. >> >> Signed-off-by: Alex Helms <alexander.helms.jy@renesas.com> >> --- >> .../bindings/clock/renesas,proxo.yaml | 49 +++++++++++++++++++ >> MAINTAINERS | 5 ++ >> 2 files changed, 54 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/clock/renesas,proxo.yaml >> >> diff --git a/Documentation/devicetree/bindings/clock/renesas,proxo.yaml b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml >> new file mode 100644 >> index 000000000..79d62f399 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml >> @@ -0,0 +1,49 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/clock/renesas,proxo.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Renesas ProXO Oscillator Device Tree Bindings >> + >> +maintainers: >> + - Alex Helms <alexander.helms.jy@renesas.com> >> + >> +description: >> + Renesas ProXO is a family of programmable ultra-low phase noise >> + quartz-based oscillators. >> + >> +properties: >> + '#clock-cells': >> + const: 0 >> + >> + compatible: >> + enum: >> + - renesas,proxo-xp >> + >> + reg: >> + maxItems: 1 >> + >> + renesas,crystal-frequency: >> + description: Internal crystal frequency, default is 50000000 (50MHz) >> + $ref: /schemas/types.yaml#/definitions/uint32 > > 'clock-frequency' doesn't work here? > > Anything else needs '-hz' suffix. > Driver is also using clock-output-names which is not listed here. Thanks, Michal
Hi Michal, On Tue, Sep 27, 2022 at 4:10 PM Michal Simek <michal.simek@amd.com> wrote: > On 9/27/22 01:04, Rob Herring wrote: > > On Fri, Sep 23, 2022 at 01:52:50PM -0700, Alex Helms wrote: > >> Add dt bindings for the Renesas ProXO oscillator. > >> > >> Signed-off-by: Alex Helms <alexander.helms.jy@renesas.com> > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml > Driver is also using clock-output-names which is not listed here. ... which is deprecated, and thus should not be used by the driver at all. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
On 9/26/2022 4:04 PM, Rob Herring wrote: > On Fri, Sep 23, 2022 at 01:52:50PM -0700, Alex Helms wrote: >> Add dt bindings for the Renesas ProXO oscillator. >> >> Signed-off-by: Alex Helms <alexander.helms.jy@renesas.com> >> --- >> .../bindings/clock/renesas,proxo.yaml | 49 +++++++++++++++++++ >> MAINTAINERS | 5 ++ >> 2 files changed, 54 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/clock/renesas,proxo.yaml >> >> diff --git a/Documentation/devicetree/bindings/clock/renesas,proxo.yaml b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml >> new file mode 100644 >> index 000000000..79d62f399 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml >> @@ -0,0 +1,49 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: https://jpn01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fclock%2Frenesas%2Cproxo.yaml%23&data=05%7C01%7Calexander.helms.jy%40renesas.com%7C6b2973fc747e49d4353308daa0137e97%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C637998302827553694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Xk7KWuuUfUfA0xv4oUSEOzvhEMpE5YWKad9YVXsJbXg%3D&reserved=0 >> +$schema: https://jpn01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23&data=05%7C01%7Calexander.helms.jy%40renesas.com%7C6b2973fc747e49d4353308daa0137e97%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C637998302827553694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2F1uyeDB3%2F9iLv1soU8V2NtEaaeoFkpwI%2FG7cSaZCKbo%3D&reserved=0 >> + >> +title: Renesas ProXO Oscillator Device Tree Bindings >> + >> +maintainers: >> + - Alex Helms <alexander.helms.jy@renesas.com> >> + >> +description: >> + Renesas ProXO is a family of programmable ultra-low phase noise >> + quartz-based oscillators. >> + >> +properties: >> + '#clock-cells': >> + const: 0 >> + >> + compatible: >> + enum: >> + - renesas,proxo-xp >> + >> + reg: >> + maxItems: 1 >> + >> + renesas,crystal-frequency: >> + description: Internal crystal frequency, default is 50000000 (50MHz) >> + $ref: /schemas/types.yaml#/definitions/uint32 > > 'clock-frequency' doesn't work here? If 'clock-frequency' is commonly used to describe and internal crystal frequency then I can change it but in my opinion 'crystal-frequency-hz' is a better name for this parameter as it isn't really a clock, just the internal crystal that is inside the package. > > Anything else needs '-hz' suffix. I will add the suffix in the next patch. > >> + >> +required: >> + - '#clock-cells' >> + - compatible >> + - reg >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + i2c { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + proxo: clock-controller@55 { >> + compatible = "renesas,proxo-xp"; >> + reg = <0x55>; >> + #clock-cells = <0>; >> + }; >> + }; >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 350102355..d52a8a5d2 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -16080,6 +16080,11 @@ S: Supported >> F: Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml >> F: drivers/iio/adc/rzg2l_adc.c >> >> +RENESAS PROXO CLOCK DRIVER >> +M: Alex Helms <alexander.helms.jy@renesas.com> >> +S: Maintained >> +F: Documentation/devicetree/bindings/clock/renesas,proxo.yaml >> + >> RESET CONTROLLER FRAMEWORK >> M: Philipp Zabel <p.zabel@pengutronix.de> >> S: Maintained >> -- >> 2.30.2 >> >>
On 9/27/2022 7:51 AM, Geert Uytterhoeven wrote: > Hi Michal, > > On Tue, Sep 27, 2022 at 4:10 PM Michal Simek <michal.simek@amd.com> wrote: >> On 9/27/22 01:04, Rob Herring wrote: >>> On Fri, Sep 23, 2022 at 01:52:50PM -0700, Alex Helms wrote: >>>> Add dt bindings for the Renesas ProXO oscillator. >>>> >>>> Signed-off-by: Alex Helms <alexander.helms.jy@renesas.com> > >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml > >> Driver is also using clock-output-names which is not listed here. > > ... which is deprecated, and thus should not be used by the driver > at all. Can you point me to somewhere showing it is deprecated? It is in the current dt clock documentation. Either way I will just remove it as it isn't important. -Alex > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
Quoting Alex Helms (2022-09-28 16:16:04) > On 9/27/2022 7:51 AM, Geert Uytterhoeven wrote: > > Hi Michal, > > > > On Tue, Sep 27, 2022 at 4:10 PM Michal Simek <michal.simek@amd.com> wrote: > >> On 9/27/22 01:04, Rob Herring wrote: > >>> On Fri, Sep 23, 2022 at 01:52:50PM -0700, Alex Helms wrote: > >>>> Add dt bindings for the Renesas ProXO oscillator. > >>>> > >>>> Signed-off-by: Alex Helms <alexander.helms.jy@renesas.com> > > > >>>> --- /dev/null > >>>> +++ b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml > > > >> Driver is also using clock-output-names which is not listed here. > > > > ... which is deprecated, and thus should not be used by the driver > > at all. > > Can you point me to somewhere showing it is deprecated? It is in the > current dt clock documentation. > I wouldn't say it is deprecated. Instead, it isn't useful if you're able to use struct clk_parent_data and auto-generated clk names.
On 9/29/22 01:41, Stephen Boyd wrote: > Quoting Alex Helms (2022-09-28 16:16:04) >> On 9/27/2022 7:51 AM, Geert Uytterhoeven wrote: >>> Hi Michal, >>> >>> On Tue, Sep 27, 2022 at 4:10 PM Michal Simek <michal.simek@amd.com> wrote: >>>> On 9/27/22 01:04, Rob Herring wrote: >>>>> On Fri, Sep 23, 2022 at 01:52:50PM -0700, Alex Helms wrote: >>>>>> Add dt bindings for the Renesas ProXO oscillator. >>>>>> >>>>>> Signed-off-by: Alex Helms <alexander.helms.jy@renesas.com> >>> >>>>>> --- /dev/null >>>>>> +++ b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml >>> >>>> Driver is also using clock-output-names which is not listed here. >>> >>> ... which is deprecated, and thus should not be used by the driver >>> at all. >> >> Can you point me to somewhere showing it is deprecated? It is in the >> current dt clock documentation. >> > > I wouldn't say it is deprecated. Instead, it isn't useful if you're able > to use struct clk_parent_data and auto-generated clk names. I am not closely doing clk subsystem but these chips are clock provider without any parent. If you mean calling function like this of_clk_get_parent_name(client->dev.of_node, 0) then it should return null. But maybe there is something else what you are referring to. I see that fixed clock driver is using node->name which is also problematic because node name for these devices on i2c will look like clock-controller@XX where XX could be the same when i2c muxes are used. And in connection to deprecation. I see only one file which is saying that it is deprecated. Documentation/devicetree/bindings/sound/samsung-i2s.yaml and it was deprecated before yaml conversion already. Thanks, Michal
Hi Michal, On Thu, Sep 29, 2022 at 2:01 PM Michal Simek <michal.simek@amd.com> wrote: > On 9/29/22 01:41, Stephen Boyd wrote: > > Quoting Alex Helms (2022-09-28 16:16:04) > >> On 9/27/2022 7:51 AM, Geert Uytterhoeven wrote: > >>> On Tue, Sep 27, 2022 at 4:10 PM Michal Simek <michal.simek@amd.com> wrote: > >>>> On 9/27/22 01:04, Rob Herring wrote: > >>>>> On Fri, Sep 23, 2022 at 01:52:50PM -0700, Alex Helms wrote: > >>>>>> Add dt bindings for the Renesas ProXO oscillator. > >>>>>> > >>>>>> Signed-off-by: Alex Helms <alexander.helms.jy@renesas.com> > >>> > >>>>>> --- /dev/null > >>>>>> +++ b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml > >>> > >>>> Driver is also using clock-output-names which is not listed here. > >>> > >>> ... which is deprecated, and thus should not be used by the driver > >>> at all. > >> > >> Can you point me to somewhere showing it is deprecated? It is in the > >> current dt clock documentation. > > > > I wouldn't say it is deprecated. Instead, it isn't useful if you're able > > to use struct clk_parent_data and auto-generated clk names. > > I am not closely doing clk subsystem but these chips are clock provider without > any parent. If you mean calling function like this > of_clk_get_parent_name(client->dev.of_node, 0) then it should return null. > But maybe there is something else what you are referring to. > > I see that fixed clock driver is using node->name which is also problematic > because node name for these devices on i2c will look like clock-controller@XX > where XX could be the same when i2c muxes are used. Indeed, drivers typically use the node name or the driver name instead, but that may cause conflicts in case of multiple instances. So you best append ".%u" obtained from e.g. <linux/idr.h>. > And in connection to deprecation. I see only one file which is saying that it is > deprecated. > Documentation/devicetree/bindings/sound/samsung-i2s.yaml > and it was deprecated before yaml conversion already. It was deprecated long before the introduction of json-schema (2015?). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, On 9/29/22 14:20, Geert Uytterhoeven wrote: > Hi Michal, > > On Thu, Sep 29, 2022 at 2:01 PM Michal Simek <michal.simek@amd.com> wrote: >> On 9/29/22 01:41, Stephen Boyd wrote: >>> Quoting Alex Helms (2022-09-28 16:16:04) >>>> On 9/27/2022 7:51 AM, Geert Uytterhoeven wrote: >>>>> On Tue, Sep 27, 2022 at 4:10 PM Michal Simek <michal.simek@amd.com> wrote: >>>>>> On 9/27/22 01:04, Rob Herring wrote: >>>>>>> On Fri, Sep 23, 2022 at 01:52:50PM -0700, Alex Helms wrote: >>>>>>>> Add dt bindings for the Renesas ProXO oscillator. >>>>>>>> >>>>>>>> Signed-off-by: Alex Helms <alexander.helms.jy@renesas.com> >>>>> >>>>>>>> --- /dev/null >>>>>>>> +++ b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml >>>>> >>>>>> Driver is also using clock-output-names which is not listed here. >>>>> >>>>> ... which is deprecated, and thus should not be used by the driver >>>>> at all. >>>> >>>> Can you point me to somewhere showing it is deprecated? It is in the >>>> current dt clock documentation. >>> >>> I wouldn't say it is deprecated. Instead, it isn't useful if you're able >>> to use struct clk_parent_data and auto-generated clk names. >> >> I am not closely doing clk subsystem but these chips are clock provider without >> any parent. If you mean calling function like this >> of_clk_get_parent_name(client->dev.of_node, 0) then it should return null. >> But maybe there is something else what you are referring to. >> >> I see that fixed clock driver is using node->name which is also problematic >> because node name for these devices on i2c will look like clock-controller@XX >> where XX could be the same when i2c muxes are used. > > Indeed, drivers typically use the node name or the driver name instead, > but that may cause conflicts in case of multiple instances. > So you best append ".%u" obtained from e.g. <linux/idr.h>. No doubt about it but with 20 clock providers on the board this will be quite messy. And I expect idr assignment will be done based on probe order and can change across boots. So far I am filling clock-output-name with human readable name to clearly identify what certain clock is doing. Instead of remembering that clk.5 is ddr4 clock source, etc. > >> And in connection to deprecation. I see only one file which is saying that it is >> deprecated. >> Documentation/devicetree/bindings/sound/samsung-i2s.yaml >> and it was deprecated before yaml conversion already. > > It was deprecated long before the introduction of json-schema (2015?). Then I think it would be good to mark it like that in schema to have clear message to everything that this property shouldn't be used.. Would be good to have any link to that discussion but not asking you to waste time on it. But I would be very surprised that no driver was merged from 2015 to the tree when I see also 2k lines in DT in the kernel with this property. It looks like that it is quite popular. Thanks, Michal
diff --git a/Documentation/devicetree/bindings/clock/renesas,proxo.yaml b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml new file mode 100644 index 000000000..79d62f399 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/renesas,proxo.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/renesas,proxo.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas ProXO Oscillator Device Tree Bindings + +maintainers: + - Alex Helms <alexander.helms.jy@renesas.com> + +description: + Renesas ProXO is a family of programmable ultra-low phase noise + quartz-based oscillators. + +properties: + '#clock-cells': + const: 0 + + compatible: + enum: + - renesas,proxo-xp + + reg: + maxItems: 1 + + renesas,crystal-frequency: + description: Internal crystal frequency, default is 50000000 (50MHz) + $ref: /schemas/types.yaml#/definitions/uint32 + +required: + - '#clock-cells' + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + proxo: clock-controller@55 { + compatible = "renesas,proxo-xp"; + reg = <0x55>; + #clock-cells = <0>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 350102355..d52a8a5d2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16080,6 +16080,11 @@ S: Supported F: Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml F: drivers/iio/adc/rzg2l_adc.c +RENESAS PROXO CLOCK DRIVER +M: Alex Helms <alexander.helms.jy@renesas.com> +S: Maintained +F: Documentation/devicetree/bindings/clock/renesas,proxo.yaml + RESET CONTROLLER FRAMEWORK M: Philipp Zabel <p.zabel@pengutronix.de> S: Maintained
Add dt bindings for the Renesas ProXO oscillator. Signed-off-by: Alex Helms <alexander.helms.jy@renesas.com> --- .../bindings/clock/renesas,proxo.yaml | 49 +++++++++++++++++++ MAINTAINERS | 5 ++ 2 files changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,proxo.yaml