Message ID | 20220414230603.567049-5-chris.packham@alliedtelesis.co.nz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | dt-bindings: mmc: Convert orion/dove bindings to JSON schema | expand |
Hi Chris > +required: > + - compatible > + - reg > + - interrupts https://elixir.bootlin.com/linux/latest/source/drivers/mmc/host/sdhci-dove.c#L78 https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/dove.dtsi#L344 Dove does actually have a clock. It looks like it is optional in the driver, but the .dtsi file has it. It is not documented in the current .txt file, so i can understand you missing it. I'm surprised the DT tools didn't complain about an unexpected property. Andrew
On Fri, 15 Apr 2022 11:06:03 +1200, Chris Packham wrote: > Convert the sdhci-dove binding to JSON schema. > > Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> > --- > .../bindings/mmc/marvell,dove-sdhci.yaml | 38 +++++++++++++++++++ > .../devicetree/bindings/mmc/sdhci-dove.txt | 14 ------- > 2 files changed, 38 insertions(+), 14 deletions(-) > create mode 100644 Documentation/devicetree/bindings/mmc/marvell,dove-sdhci.yaml > delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-dove.txt > Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if they are expected or the schema is incorrect. These may not be new warnings. Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future. Full log is available here: https://patchwork.ozlabs.org/patch/ sdio-host@90000: $nodename:0: 'sdio-host@90000' does not match '^mmc(@.*)?$' arch/arm/boot/dts/dove-cubox.dtb arch/arm/boot/dts/dove-cubox-es.dtb arch/arm/boot/dts/dove-d2plug.dtb arch/arm/boot/dts/dove-d3plug.dtb arch/arm/boot/dts/dove-dove-db.dtb arch/arm/boot/dts/dove-sbc-a510.dtb sdio-host@90000: interrupts: [[36], [38]] is too long arch/arm/boot/dts/dove-cubox.dtb arch/arm/boot/dts/dove-cubox-es.dtb arch/arm/boot/dts/dove-d2plug.dtb arch/arm/boot/dts/dove-d3plug.dtb arch/arm/boot/dts/dove-dove-db.dtb arch/arm/boot/dts/dove-sbc-a510.dtb sdio-host@90000: Unevaluated properties are not allowed ('interrupts', 'clocks', 'non-removable', 'bus-width' were unexpected) arch/arm/boot/dts/dove-d2plug.dtb sdio-host@90000: Unevaluated properties are not allowed ('interrupts', 'clocks', 'non-removable', 'vmmc-supply', 'reset-gpio' were unexpected) arch/arm/boot/dts/dove-sbc-a510.dtb sdio-host@90000: Unevaluated properties are not allowed ('interrupts', 'clocks', 'non-removable' were unexpected) arch/arm/boot/dts/dove-d3plug.dtb sdio-host@90000: Unevaluated properties are not allowed ('interrupts', 'clocks' were unexpected) arch/arm/boot/dts/dove-cubox.dtb arch/arm/boot/dts/dove-cubox-es.dtb arch/arm/boot/dts/dove-dove-db.dtb sdio-host@92000: $nodename:0: 'sdio-host@92000' does not match '^mmc(@.*)?$' arch/arm/boot/dts/dove-cubox.dtb arch/arm/boot/dts/dove-cubox-es.dtb arch/arm/boot/dts/dove-d2plug.dtb arch/arm/boot/dts/dove-d3plug.dtb arch/arm/boot/dts/dove-dove-db.dtb arch/arm/boot/dts/dove-sbc-a510.dtb sdio-host@92000: interrupts: [[35], [37]] is too long arch/arm/boot/dts/dove-cubox.dtb arch/arm/boot/dts/dove-cubox-es.dtb arch/arm/boot/dts/dove-d2plug.dtb arch/arm/boot/dts/dove-d3plug.dtb arch/arm/boot/dts/dove-dove-db.dtb arch/arm/boot/dts/dove-sbc-a510.dtb sdio-host@92000: Unevaluated properties are not allowed ('interrupts', 'clocks', 'cd-gpios' were unexpected) arch/arm/boot/dts/dove-cubox-es.dtb sdio-host@92000: Unevaluated properties are not allowed ('interrupts', 'clocks', 'non-removable', 'bus-width' were unexpected) arch/arm/boot/dts/dove-d2plug.dtb arch/arm/boot/dts/dove-d3plug.dtb sdio-host@92000: Unevaluated properties are not allowed ('interrupts', 'clocks', 'vmmc-supply', 'wp-gpios' were unexpected) arch/arm/boot/dts/dove-sbc-a510.dtb sdio-host@92000: Unevaluated properties are not allowed ('interrupts', 'clocks' were unexpected) arch/arm/boot/dts/dove-cubox.dtb arch/arm/boot/dts/dove-dove-db.dtb
On 15/04/2022 01:33, Andrew Lunn wrote: > Hi Chris > >> +required: >> + - compatible >> + - reg >> + - interrupts > > https://elixir.bootlin.com/linux/latest/source/drivers/mmc/host/sdhci-dove.c#L78 > > https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/dove.dtsi#L344 > > Dove does actually have a clock. It looks like it is optional in the > driver, but the .dtsi file has it. It is not documented in the current > .txt file, so i can understand you missing it. > > I'm surprised the DT tools didn't complain about an unexpected > property. They did. :) It seems binding is a bit out of date, so Chris should extend/update it. Same comments about maintainer as for patch #3. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/mmc/marvell,dove-sdhci.yaml b/Documentation/devicetree/bindings/mmc/marvell,dove-sdhci.yaml new file mode 100644 index 000000000000..b3a762b528fd --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/marvell,dove-sdhci.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/marvell,dove-sdhci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell sdhci-dove controller + +maintainers: + - Ulf Hansson <ulf.hansson@linaro.org> + +allOf: + - $ref: mmc-controller.yaml# + +properties: + compatible: + const: marvell,dove-sdhci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +unevaluatedProperties: false + +examples: + - | + sdio0: mmc@92000 { + compatible = "marvell,dove-sdhci"; + reg = <0x92000 0x100>; + interrupts = <35>; + }; diff --git a/Documentation/devicetree/bindings/mmc/sdhci-dove.txt b/Documentation/devicetree/bindings/mmc/sdhci-dove.txt deleted file mode 100644 index ae9aab9abcd7..000000000000 --- a/Documentation/devicetree/bindings/mmc/sdhci-dove.txt +++ /dev/null @@ -1,14 +0,0 @@ -* Marvell sdhci-dove controller - -This file documents differences between the core properties in mmc.txt -and the properties used by the sdhci-pxav2 and sdhci-pxav3 drivers. - -- compatible: Should be "marvell,dove-sdhci". - -Example: - -sdio0: sdio@92000 { - compatible = "marvell,dove-sdhci"; - reg = <0x92000 0x100>; - interrupts = <35>; -};
Convert the sdhci-dove binding to JSON schema. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> --- .../bindings/mmc/marvell,dove-sdhci.yaml | 38 +++++++++++++++++++ .../devicetree/bindings/mmc/sdhci-dove.txt | 14 ------- 2 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/marvell,dove-sdhci.yaml delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-dove.txt