Message ID | 20230508104801.445261-3-claudiu.beznea@microchip.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | dt-bindings: clocks: at91: convert to yaml | expand |
On Mon, 08 May 2023 13:47:58 +0300, Claudiu Beznea wrote: > Convert Atmel PMC documentation to yaml. > > Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> > --- > .../devicetree/bindings/clock/at91-clock.txt | 28 ---- > .../bindings/clock/atmel,at91rm9200-pmc.yaml | 154 ++++++++++++++++++ > 2 files changed, 154 insertions(+), 28 deletions(-) > create mode 100644 Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.example.dtb: camera-sensor@3c: port:endpoint:data-lanes: [[1]] is too short From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected) From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml doc reference errors (make refcheckdocs): Documentation/usb/gadget_uvc.rst: Documentation/userspace-api/media/v4l/pixfmt-packed.yuv.rst MAINTAINERS: Documentation/devicetree/bindings/pwm/pwm-apple.yaml See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230508104801.445261-3-claudiu.beznea@microchip.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 08/05/2023 13:27, Rob Herring wrote: > > On Mon, 08 May 2023 13:47:58 +0300, Claudiu Beznea wrote: >> Convert Atmel PMC documentation to yaml. >> >> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> >> --- >> .../devicetree/bindings/clock/at91-clock.txt | 28 ---- >> .../bindings/clock/atmel,at91rm9200-pmc.yaml | 154 ++++++++++++++++++ >> 2 files changed, 154 insertions(+), 28 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml >> > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.example.dtb: camera-sensor@3c: port:endpoint:data-lanes: [[1]] is too short > From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short > From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected) > From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml These can be ignored. Best regards, Krzysztof
On 08/05/2023 12:47, Claudiu Beznea wrote: > Convert Atmel PMC documentation to yaml. Please mention the changes against original binding. At least clock-names look different, maybe more. > > Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> > --- > .../devicetree/bindings/clock/at91-clock.txt | 28 ---- > .../bindings/clock/atmel,at91rm9200-pmc.yaml | 154 ++++++++++++++++++ > 2 files changed, 154 insertions(+), 28 deletions(-) > create mode 100644 Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml > > diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt > index 13f45db3b66d..57394785d3b0 100644 > --- a/Documentation/devicetree/bindings/clock/at91-clock.txt > +++ b/Documentation/devicetree/bindings/clock/at91-clock.txt > @@ -28,31 +28,3 @@ For example: > #clock-cells = <0>; > }; > > -Power Management Controller (PMC): > - > -Required properties: > -- compatible : shall be "atmel,<chip>-pmc", "syscon" or > - "microchip,sam9x60-pmc" > - <chip> can be: at91rm9200, at91sam9260, at91sam9261, > - at91sam9263, at91sam9g45, at91sam9n12, at91sam9rl, at91sam9g15, > - at91sam9g25, at91sam9g35, at91sam9x25, at91sam9x35, at91sam9x5, > - sama5d2, sama5d3 or sama5d4. > -- #clock-cells : from common clock binding; shall be set to 2. The first entry > - is the type of the clock (core, system, peripheral or generated) and the > - second entry its index as provided by the datasheet > -- clocks : Must contain an entry for each entry in clock-names. > -- clock-names: Must include the following entries: "slow_clk", "main_xtal" > - > -Optional properties: > -- atmel,osc-bypass : boolean property. Set this when a clock signal is directly > - provided on XIN. > - > -For example: > - pmc: pmc@f0018000 { > - compatible = "atmel,sama5d4-pmc", "syscon"; > - reg = <0xf0018000 0x120>; > - interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; > - #clock-cells = <2>; > - clocks = <&clk32k>, <&main_xtal>; > - clock-names = "slow_clk", "main_xtal"; > - }; > diff --git a/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml b/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml > new file mode 100644 > index 000000000000..58b702520600 > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml > @@ -0,0 +1,154 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/clock/atmel,at91rm9200-pmc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Atmel Power Management Controller (PMC) > + > +maintainers: > + - Claudiu Beznea <claudiu.beznea@microchip.com> > + > +description: > + The power management controller optimizes power consumption by controlling all > + system and user peripheral clocks. The PMC enables/disables the clock inputs > + to many of the peripherals and to the processor. > + > +properties: > + compatible: > + oneOf: > + - items: > + - const: atmel,at91sam9260-pmc > + - const: syscon No improvements here. Why this is part of this group not the one at the end? I already talked about this. > + - items: > + - enum: > + - atmel,at91sam9g15-pmc > + - atmel,at91sam9g20-pmc > + - atmel,at91sam9g25-pmc > + - atmel,at91sam9g35-pmc > + - atmel,at91sam9x25-pmc > + - atmel,at91sam9x35-pmc > + - enum: > + - atmel,at91sam9260-pmc > + - atmel,at91sam9x5-pmc > + - const: syscon > + - items: > + - enum: > + - atmel,at91rm9200-pmc > + - atmel,at91sam9g45-pmc > + - atmel,at91sam9n12-pmc > + - atmel,at91sam9rl-pmc > + - atmel,sama5d2-pmc > + - atmel,sama5d3-pmc > + - atmel,sama5d4-pmc > + - microchip,sam9x60-pmc > + - microchip,sama7g5-pmc > + - const: syscon > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + "#clock-cells": > + description: | > + - 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM, > + PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined > + in <dt-bindings/clock/at91.h>) > + - 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h > + (for core clocks) or as defined in datasheet (for system, peripheral, > + gck and programmable clocks). > + const: 2 > + > + clocks: > + minItems: 2 > + maxItems: 3 > + > + clock-names: > + minItems: 2 > + maxItems: 3 > + > + atmel,osc-bypass: > + description: set when a clock signal is directly provided on XIN > + type: boolean > + > +required: > + - compatible > + - reg > + - interrupts > + - "#clock-cells" > + - clocks > + - clock-names > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - microchip,sam9x60-pmc > + - microchip,sama7g5-pmc > + then: > + properties: > + clocks: > + minItems: 3 > + maxItems: 3 > + clock-names: > + items: > + - const: td_slck > + - const: md_slck > + - const: main_xtal > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - atmel,at91rm9200-pmc > + - atmel,at91sam9260-pmc > + - atmel,at91sam9g20-pmc > + then: > + properties: > + clocks: > + minItems: 2 > + maxItems: 2 > + clock-names: > + items: > + - const: slow_xtal > + - const: main_xtal > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - atmel,sama5d4-pmc > + - atmel,sama5d3-pmc > + - atmel,sama5d2-pmc Keep similar order as in compatibles list, e.g. alphanumeric. Best regards, Krzysztof
On 08.05.2023 19:26, Krzysztof Kozlowski wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On 08/05/2023 12:47, Claudiu Beznea wrote: >> Convert Atmel PMC documentation to yaml. > > Please mention the changes against original binding. At least > clock-names look different, maybe more. > >> >> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> >> --- >> .../devicetree/bindings/clock/at91-clock.txt | 28 ---- >> .../bindings/clock/atmel,at91rm9200-pmc.yaml | 154 ++++++++++++++++++ >> 2 files changed, 154 insertions(+), 28 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml >> >> diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt >> index 13f45db3b66d..57394785d3b0 100644 >> --- a/Documentation/devicetree/bindings/clock/at91-clock.txt >> +++ b/Documentation/devicetree/bindings/clock/at91-clock.txt >> @@ -28,31 +28,3 @@ For example: >> #clock-cells = <0>; >> }; >> >> -Power Management Controller (PMC): >> - >> -Required properties: >> -- compatible : shall be "atmel,<chip>-pmc", "syscon" or >> - "microchip,sam9x60-pmc" >> - <chip> can be: at91rm9200, at91sam9260, at91sam9261, >> - at91sam9263, at91sam9g45, at91sam9n12, at91sam9rl, at91sam9g15, >> - at91sam9g25, at91sam9g35, at91sam9x25, at91sam9x35, at91sam9x5, >> - sama5d2, sama5d3 or sama5d4. >> -- #clock-cells : from common clock binding; shall be set to 2. The first entry >> - is the type of the clock (core, system, peripheral or generated) and the >> - second entry its index as provided by the datasheet >> -- clocks : Must contain an entry for each entry in clock-names. >> -- clock-names: Must include the following entries: "slow_clk", "main_xtal" >> - >> -Optional properties: >> -- atmel,osc-bypass : boolean property. Set this when a clock signal is directly >> - provided on XIN. >> - >> -For example: >> - pmc: pmc@f0018000 { >> - compatible = "atmel,sama5d4-pmc", "syscon"; >> - reg = <0xf0018000 0x120>; >> - interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; >> - #clock-cells = <2>; >> - clocks = <&clk32k>, <&main_xtal>; >> - clock-names = "slow_clk", "main_xtal"; >> - }; >> diff --git a/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml b/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml >> new file mode 100644 >> index 000000000000..58b702520600 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml >> @@ -0,0 +1,154 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/clock/atmel,at91rm9200-pmc.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Atmel Power Management Controller (PMC) >> + >> +maintainers: >> + - Claudiu Beznea <claudiu.beznea@microchip.com> >> + >> +description: >> + The power management controller optimizes power consumption by controlling all >> + system and user peripheral clocks. The PMC enables/disables the clock inputs >> + to many of the peripherals and to the processor. >> + >> +properties: >> + compatible: >> + oneOf: >> + - items: >> + - const: atmel,at91sam9260-pmc >> + - const: syscon > > No improvements here. Why this is part of this group not the one at the > end? I already talked about this. I missed it. It will be handled it in the next version. > >> + - items: >> + - enum: >> + - atmel,at91sam9g15-pmc >> + - atmel,at91sam9g20-pmc >> + - atmel,at91sam9g25-pmc >> + - atmel,at91sam9g35-pmc >> + - atmel,at91sam9x25-pmc >> + - atmel,at91sam9x35-pmc >> + - enum: >> + - atmel,at91sam9260-pmc >> + - atmel,at91sam9x5-pmc >> + - const: syscon >> + - items: >> + - enum: >> + - atmel,at91rm9200-pmc >> + - atmel,at91sam9g45-pmc >> + - atmel,at91sam9n12-pmc >> + - atmel,at91sam9rl-pmc >> + - atmel,sama5d2-pmc >> + - atmel,sama5d3-pmc >> + - atmel,sama5d4-pmc >> + - microchip,sam9x60-pmc >> + - microchip,sama7g5-pmc >> + - const: syscon >> + >> + reg: >> + maxItems: 1 >> + >> + interrupts: >> + maxItems: 1 >> + >> + "#clock-cells": >> + description: | >> + - 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM, >> + PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined >> + in <dt-bindings/clock/at91.h>) >> + - 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h >> + (for core clocks) or as defined in datasheet (for system, peripheral, >> + gck and programmable clocks). >> + const: 2 >> + >> + clocks: >> + minItems: 2 >> + maxItems: 3 >> + >> + clock-names: >> + minItems: 2 >> + maxItems: 3 >> + >> + atmel,osc-bypass: >> + description: set when a clock signal is directly provided on XIN >> + type: boolean >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - "#clock-cells" >> + - clocks >> + - clock-names >> + >> +allOf: >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - microchip,sam9x60-pmc >> + - microchip,sama7g5-pmc >> + then: >> + properties: >> + clocks: >> + minItems: 3 >> + maxItems: 3 >> + clock-names: >> + items: >> + - const: td_slck >> + - const: md_slck >> + - const: main_xtal >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - atmel,at91rm9200-pmc >> + - atmel,at91sam9260-pmc >> + - atmel,at91sam9g20-pmc >> + then: >> + properties: >> + clocks: >> + minItems: 2 >> + maxItems: 2 >> + clock-names: >> + items: >> + - const: slow_xtal >> + - const: main_xtal >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - atmel,sama5d4-pmc >> + - atmel,sama5d3-pmc >> + - atmel,sama5d2-pmc > > Keep similar order as in compatibles list, e.g. alphanumeric. > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt index 13f45db3b66d..57394785d3b0 100644 --- a/Documentation/devicetree/bindings/clock/at91-clock.txt +++ b/Documentation/devicetree/bindings/clock/at91-clock.txt @@ -28,31 +28,3 @@ For example: #clock-cells = <0>; }; -Power Management Controller (PMC): - -Required properties: -- compatible : shall be "atmel,<chip>-pmc", "syscon" or - "microchip,sam9x60-pmc" - <chip> can be: at91rm9200, at91sam9260, at91sam9261, - at91sam9263, at91sam9g45, at91sam9n12, at91sam9rl, at91sam9g15, - at91sam9g25, at91sam9g35, at91sam9x25, at91sam9x35, at91sam9x5, - sama5d2, sama5d3 or sama5d4. -- #clock-cells : from common clock binding; shall be set to 2. The first entry - is the type of the clock (core, system, peripheral or generated) and the - second entry its index as provided by the datasheet -- clocks : Must contain an entry for each entry in clock-names. -- clock-names: Must include the following entries: "slow_clk", "main_xtal" - -Optional properties: -- atmel,osc-bypass : boolean property. Set this when a clock signal is directly - provided on XIN. - -For example: - pmc: pmc@f0018000 { - compatible = "atmel,sama5d4-pmc", "syscon"; - reg = <0xf0018000 0x120>; - interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; - #clock-cells = <2>; - clocks = <&clk32k>, <&main_xtal>; - clock-names = "slow_clk", "main_xtal"; - }; diff --git a/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml b/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml new file mode 100644 index 000000000000..58b702520600 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml @@ -0,0 +1,154 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/atmel,at91rm9200-pmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel Power Management Controller (PMC) + +maintainers: + - Claudiu Beznea <claudiu.beznea@microchip.com> + +description: + The power management controller optimizes power consumption by controlling all + system and user peripheral clocks. The PMC enables/disables the clock inputs + to many of the peripherals and to the processor. + +properties: + compatible: + oneOf: + - items: + - const: atmel,at91sam9260-pmc + - const: syscon + - items: + - enum: + - atmel,at91sam9g15-pmc + - atmel,at91sam9g20-pmc + - atmel,at91sam9g25-pmc + - atmel,at91sam9g35-pmc + - atmel,at91sam9x25-pmc + - atmel,at91sam9x35-pmc + - enum: + - atmel,at91sam9260-pmc + - atmel,at91sam9x5-pmc + - const: syscon + - items: + - enum: + - atmel,at91rm9200-pmc + - atmel,at91sam9g45-pmc + - atmel,at91sam9n12-pmc + - atmel,at91sam9rl-pmc + - atmel,sama5d2-pmc + - atmel,sama5d3-pmc + - atmel,sama5d4-pmc + - microchip,sam9x60-pmc + - microchip,sama7g5-pmc + - const: syscon + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#clock-cells": + description: | + - 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM, + PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined + in <dt-bindings/clock/at91.h>) + - 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h + (for core clocks) or as defined in datasheet (for system, peripheral, + gck and programmable clocks). + const: 2 + + clocks: + minItems: 2 + maxItems: 3 + + clock-names: + minItems: 2 + maxItems: 3 + + atmel,osc-bypass: + description: set when a clock signal is directly provided on XIN + type: boolean + +required: + - compatible + - reg + - interrupts + - "#clock-cells" + - clocks + - clock-names + +allOf: + - if: + properties: + compatible: + contains: + enum: + - microchip,sam9x60-pmc + - microchip,sama7g5-pmc + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: td_slck + - const: md_slck + - const: main_xtal + + - if: + properties: + compatible: + contains: + enum: + - atmel,at91rm9200-pmc + - atmel,at91sam9260-pmc + - atmel,at91sam9g20-pmc + then: + properties: + clocks: + minItems: 2 + maxItems: 2 + clock-names: + items: + - const: slow_xtal + - const: main_xtal + + - if: + properties: + compatible: + contains: + enum: + - atmel,sama5d4-pmc + - atmel,sama5d3-pmc + - atmel,sama5d2-pmc + then: + properties: + clocks: + minItems: 2 + maxItems: 2 + clock-names: + items: + - const: slow_clk + - const: main_xtal + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + pmc: clock-controller@f0018000 { + compatible = "atmel,sama5d4-pmc", "syscon"; + reg = <0xf0018000 0x120>; + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; + #clock-cells = <2>; + clocks = <&clk32k>, <&main_xtal>; + clock-names = "slow_clk", "main_xtal"; + }; + +...
Convert Atmel PMC documentation to yaml. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> --- .../devicetree/bindings/clock/at91-clock.txt | 28 ---- .../bindings/clock/atmel,at91rm9200-pmc.yaml | 154 ++++++++++++++++++ 2 files changed, 154 insertions(+), 28 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml