arm64: dts: convert fsl,esdhc.txt to yaml and fix layerscape dts warning
Subsystems (3)
Frank Li
maintainerv5 cover arm64: dts: convert fsl,esdhc.txt to yaml and fix layerscape dts warning
Start from v4 because fsl.esdhc.txt to yaml already sent out as v3.
Now only "bit-endian" proptery warning left.
---
Changes in v5:
- squash dts patches to one patch and fix typo.
- move spi-slot-mmc to first patch.
- add Krzysztof Kozlowski review tag for fsl,eshc patch
- Link to v4: https://lore.kernel.org/r/[email protected]
Change from v3 to v4
- Add dts warning fixes
- Add mmc-spi-slot's voltage range fix, (not sure why it apply to layserscape's dts file.
- clock-frequency is not required property
- add dma-conherence: true in binding doc
---
Frank Li (3):
dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix
dt-bindings: mmc: Convert fsl-esdhc.txt to yaml
arm64: dts: layerscape: Change node name from 'esdhc' to 'mmc'
.../devicetree/bindings/mmc/fsl,esdhc.yaml | 105 +++++++++++++++++++++ .../devicetree/bindings/mmc/fsl-esdhc.txt | 52 ---------- .../devicetree/bindings/mmc/mmc-spi-slot.yaml | 16 ++-- arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 4 +- arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 8 +- 9 files changed, 124 insertions(+), 69 deletions(-)
---
base-commit: d35b2284e966c0bef3e2182a5c5ea02177dd32e4
change-id: 20240610-ls_waring_esdhc-93136a5dd794
Best regards,
---
Frank Li <[email protected]>
Frank Li
maintainerPATCH v5 1/3 dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix
According to common mmc core, voltages-ranges should be matrix.
---
Change from v4 to v5
- Change maxItems to 1
Not sure why it impact other mmc yaml's voltage-ranges. Rob's answer:
It's a quirk of the tools. When decoding properties, the tools only know all possible types. Types are global, not per binding. Sometimes it can be figured out, but cases like this cannot be.
--- Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml +9 -7
@@ -27,17 +27,19 @@ properties: maxItems: 1 voltage-ranges: - $ref: /schemas/types.yaml#/definitions/uint32-array + $ref: /schemas/types.yaml#/definitions/uint32-matrix description: | Two cells are required, first cell specifies minimum slot voltage (mV), second cell specifies maximum slot voltage (mV). items: - - description: | - value for minimum slot voltage in mV - default: 3200 - - description: | - value for maximum slot voltage in mV - default: 3400 + items: + - description: | + value for minimum slot voltage in mV + default: 3200 + - description: | + value for maximum slot voltage in mV + default: 3400 + maxItems: 1 gpios: description: |
Signature · 1 line
2.34.1
Re: [PATCH v5 1/3] dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix
Quoted 11 lines · Frank Li
According to common mmc core, voltages-ranges should be matrix.
Signed-off-by Frank Li <[email protected]>---
Change from v4 to v5
- Change maxItems to 1Not sure why it impact other mmc yaml's voltage-ranges. Rob's answer:
Quoted 7 lines
It's a quirk of the tools. When decoding properties, the tools only know all possible types. Types are global, not per binding. Sometimes it can be figured out, but cases like this cannot be.
--- Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
Frank Li
maintainerPATCH v5 2/3 dt-bindings: mmc: Convert fsl-esdhc.txt to yaml
In reply to Frank LiConvert layerscape fsl-esdhc binding doc from txt to yaml format.
Addtional change during convert:
- Deprecate "sdhci,wp-inverted", "sdhci,1-bit-only".
- Add "reg" and "interrupts" property.
- Change example "sdhci@2e000" to "mmc@2e000".
- Compatible string require fsl,<chip>-esdhc followed by fsl,esdhc to match most existed dts file.
- Set clock-frequency to 100mhz in example.
- clock-frequency is not required now.
- Allow dma-coherence
- Add clocks
---
Change from v4 to v5
- Add Krzysztof Kozlowski's review tag
Change from v3 to v4
- Remove clock-frequency from required
- Add dma-coherence
- Add clocks
- Not add Krzysztof Kozlowski review tag because some additional change.
Change from v2 to v3
- add minItems and maxItems for voltage-ranges
Change from v1 to v2
- use filename fsl,esdhc.yaml
- Add clock-frequency to required
- change clock-frequency to 100mhz in example
pass dt_binding_check
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 dt_binding_check DT_SCHEMA_FILES=fsl,esdhc.yaml
SCHEMA Documentation/devicetree/bindings/processed-schema.json
CHKDT Documentation/devicetree/bindings
LINT Documentation/devicetree/bindings
DTEX Documentation/devicetree/bindings/mmc/fsl-ls-esdhc.example.dts
DTC_CHK Documentation/devicetree/bindings/mmc/fsl-ls-esdhc.example.dtb
--- .../devicetree/bindings/mmc/fsl,esdhc.yaml | 105 +++++++++++++++++++++ .../devicetree/bindings/mmc/fsl-esdhc.txt | 52 ---------- 2 files changed, 105 insertions(+), 52 deletions(-)
Documentation/devicetree/bindings/mmc/fsl,esdhc.yaml new file +105 -0
@@ -0,0 +1,105 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/fsl,esdhc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Enhanced Secure Digital Host Controller (eSDHC) + +description: + The Enhanced Secure Digital Host Controller provides an interface + for MMC, SD, and SDIO types of memory cards. + +maintainers: + - Frank Li <[email protected]> + +properties: + compatible: + items: + - enum: + - fsl,mpc8536-esdhc + - fsl,mpc8378-esdhc + - fsl,p2020-esdhc + - fsl,p4080-esdhc + - fsl,t1040-esdhc + - fsl,t4240-esdhc + - fsl,ls1012a-esdhc + - fsl,ls1028a-esdhc + - fsl,ls1088a-esdhc + - fsl,ls1043a-esdhc + - fsl,ls1046a-esdhc + - fsl,ls2080a-esdhc + - const: fsl,esdhc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-frequency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: specifies eSDHC base clock frequency. + + sdhci,wp-inverted: + $ref: /schemas/types.yaml#/definitions/flag + deprecated: true + description: + specifies that eSDHC controller reports + inverted write-protect state; New devices should use the generic + "wp-inverted" property. + + sdhci,1-bit-only: + $ref: /schemas/types.yaml#/definitions/flag + deprecated: true + description: + specifies that a controller can only handle + 1-bit data transfers. New devices should use the generic + "bus-width = <1>" property. + + sdhci,auto-cmd12: + $ref: /schemas/types.yaml#/definitions/flag + description: + specifies that a controller can only handle auto CMD12. + + voltage-ranges: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + items: + items: + - description: specifies minimum slot voltage (mV). + - description: specifies maximum slot voltage (mV). + minItems: 1 + maxItems: 8 + + dma-coherent: true + + little-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: + If the host controller is little-endian mode, specify + this property. The default endian mode is big-endian. + +required: + - compatible + - reg + - interrupts + +allOf: + - $ref: sdhci-common.yaml# + +unevaluatedProperties: false + +examples: + - | + mmc@2e000 { + compatible = "fsl,mpc8378-esdhc", "fsl,esdhc"; + reg = <0x2e000 0x1000>; + interrupts = <42 0x8>; + interrupt-parent = <&ipic>; + /* Filled in by U-Boot */ + clock-frequency = <100000000>; + voltage-ranges = <3300 3300>; + };
Documentation/devicetree/bindings/mmc/fsl-esdhc.txt deleted +0 -52
52 lines not on this page · raw message
Signature · 1 line
2.34.1
Frank Li
maintainerPATCH v5 3/3 arm64: dts: layerscape: Change node name from 'esdhc' to 'mmc'
In reply to Frank LiUse common node name 'mmc' to fix DTB_CHECK warning. Add compatible string 'fsl,ls2080a-esdhc' for fsl-lx2160a.
arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb: esdhc@1560000: $nodename:0: 'esdhc@1560000' does not match '^mmc(@.*)?$'arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dtb: esdhc@1560000: $nodename:0: 'esdhc@1560000' does not match '^mmc(@.*)?$'arch/arm64/boot/dts/freescale/fsl-ls1046a-frwy.dtb: esdhc@1560000: $nodename:0: 'esdhc@1560000' does not match '^mmc(@.*)?$'arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dtb: esdhc@2140000: $nodename:0: 'esdhc@2140000' does not match '^mmc(@.*)?$'arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dtb: esdhc@2140000: $nodename:0: 'esdhc@2140000' does not match '^mmc(@.*)?$'arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dtb: esdhc@2140000: compatible:0: 'fsl,esdhc' is not one of ['fsl,mpc8536-esdhc', 'fsl,mpc8378-esdhc', 'fsl,p2020-esdhc', 'fsl,p4080-esdhc', 'fsl,t1040-esdhc', 'fsl,t4240-esdhc', 'fsl,ls1012a-esdhc', 'fsl,ls1028a-esdhc', 'fsl,ls1088a-esdhc', 'fsl,ls1043a-esdhc', 'fsl,ls1046a-esdhc', 'fsl,ls2080a-esdhc']
from schema $id: http://devicetree.org/schemas/mmc/fsl,esdhc.yaml#arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dtb: esdhc@2140000: $nodename:0: 'esdhc@2140000' does not match '^mmc(@.*)?$'
--- arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 4 ++-- arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi +2 -2
@@ -156,7 +156,7 @@ QORIQ_CLK_PLL_DIV(1)>, status = "disabled"; }; - esdhc0: esdhc@1560000 { + esdhc0: mmc@1560000 { compatible = "fsl,ls1012a-esdhc", "fsl,esdhc"; reg = <0x0 0x1560000 0x0 0x10000>; interrupts = <0 62 0x4>;
@@ -175,7 +175,7 @@ scfg: scfg@1570000 { big-endian; }; - esdhc1: esdhc@1580000 { + esdhc1: mmc@1580000 { compatible = "fsl,ls1012a-esdhc", "fsl,esdhc"; reg = <0x0 0x1580000 0x0 0x10000>; interrupts = <0 65 0x4>;
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +1 -1
@@ -424,7 +424,7 @@ QORIQ_CLK_PLL_DIV(1)>, status = "disabled"; }; - esdhc: esdhc@1560000 { + esdhc: mmc@1560000 { compatible = "fsl,ls1043a-esdhc", "fsl,esdhc"; reg = <0x0 0x1560000 0x0 0x10000>; interrupts = <0 62 0x4>;
arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +1 -1
@@ -308,7 +308,7 @@ QORIQ_CLK_PLL_DIV(2)>, status = "disabled"; }; - esdhc: esdhc@1560000 { + esdhc: mmc@1560000 { compatible = "fsl,ls1046a-esdhc", "fsl,esdhc"; reg = <0x0 0x1560000 0x0 0x10000>; interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi +1 -1
@@ -474,7 +474,7 @@ QORIQ_CLK_PLL_DIV(4)>, status = "disabled"; }; - esdhc: esdhc@2140000 { + esdhc: mmc@2140000 { compatible = "fsl,ls1088a-esdhc", "fsl,esdhc"; reg = <0x0 0x2140000 0x0 0x10000>; interrupts = <0 28 0x4>; /* Level high type */
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi +1 -1
@@ -940,7 +940,7 @@ dspi: spi@2100000 { spi-num-chipselects = <5>; }; - esdhc: esdhc@2140000 { + esdhc: mmc@2140000 { status = "disabled"; compatible = "fsl,ls2080a-esdhc", "fsl,esdhc"; reg = <0x0 0x2140000 0x0 0x10000>;
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +4 -4
@@ -925,8 +925,8 @@ dspi2: spi@2120000 { status = "disabled"; }; - esdhc0: esdhc@2140000 { - compatible = "fsl,esdhc"; + esdhc0: mmc@2140000 { + compatible = "fsl,ls2080a-esdhc", "fsl,esdhc"; reg = <0x0 0x2140000 0x0 0x10000>; interrupts = <0 28 0x4>; /* Level high type */ clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
@@ -939,8 +939,8 @@ esdhc0: esdhc@2140000 { status = "disabled"; }; - esdhc1: esdhc@2150000 { - compatible = "fsl,esdhc"; + esdhc1: mmc@2150000 { + compatible = "fsl,ls2080a-esdhc", "fsl,esdhc"; reg = <0x0 0x2150000 0x0 0x10000>; interrupts = <0 63 0x4>; /* Level high type */ clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
Signature · 1 line
2.34.1
Shawn Guo
AppliedRe: [PATCH v5 3/3] arm64: dts: layerscape: Change node name from 'esdhc' to 'mmc'
Quoted 12 lines · Frank Li
Use common node name 'mmc' to fix
DTB_CHECKwarning. Add compatible string 'fsl,ls2080a-esdhc' for fsl-lx2160a.
arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb: esdhc@1560000: $nodename:0: 'esdhc@1560000' does not match '^mmc(@.*)?$'arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dtb: esdhc@1560000: $nodename:0: 'esdhc@1560000' does not match '^mmc(@.*)?$'arch/arm64/boot/dts/freescale/fsl-ls1046a-frwy.dtb: esdhc@1560000: $nodename:0: 'esdhc@1560000' does not match '^mmc(@.*)?$'arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dtb: esdhc@2140000: $nodename:0: 'esdhc@2140000' does not match '^mmc(@.*)?$'arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dtb: esdhc@2140000: $nodename:0: 'esdhc@2140000' does not match '^mmc(@.*)?$'arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dtb: esdhc@2140000: compatible:0: 'fsl,esdhc' is not one of ['fsl,mpc8536-esdhc', 'fsl,mpc8378-esdhc', 'fsl,p2020-esdhc', 'fsl,p4080-esdhc', 'fsl,t1040-esdhc', 'fsl,t4240-esdhc', 'fsl,ls1012a-esdhc', 'fsl,ls1028a-esdhc', 'fsl,ls1088a-esdhc', 'fsl,ls1043a-esdhc', 'fsl,ls1046a-esdhc', 'fsl,ls2080a-esdhc']
from schema $id: http://devicetree.org/schemas/mmc/fsl,esdhc.yaml#arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dtb: esdhc@2140000: $nodename:0: 'esdhc@2140000' does not match '^mmc(@.*)?$'
Quoted 1 line
Signed-off-by Frank Li <[email protected]>
Applied, thanks!
Quoted 36 lines · Frank Li
Start from v4 because fsl.esdhc.txt to yaml already sent out as v3.
Now only "bit-endian" proptery warning left.
Signed-off-by Frank Li <[email protected]>---
Changes in v5:
- squash dts patches to one patch and fix typo.
- move spi-slot-mmc to first patch.
- add Krzysztof Kozlowski review tag for fsl,eshc patch
- Link to v4: https://lore.kernel.org/r/[email protected]Change from v3 to v4
- Add dts warning fixes
- Add mmc-spi-slot's voltage range fix, (not sure why it apply to layserscape's dts file.
- clock-frequency is not required property
- add dma-conherence: true in binding doc---
Frank Li (3):
dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix
dt-bindings: mmc: Convert fsl-esdhc.txt to yaml
arm64: dts: layerscape: Change node name from 'esdhc' to 'mmc'.../devicetree/bindings/mmc/fsl,esdhc.yaml | 105 +++++++++++++++++++++ .../devicetree/bindings/mmc/fsl-esdhc.txt | 52 ---------- .../devicetree/bindings/mmc/mmc-spi-slot.yaml | 16 ++-- arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 4 +- arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 8 +- 9 files changed, 124 insertions(+), 69 deletions(-)
Quoted 7 lines
---
base-commit:d35b2284e966c0bef3e2182a5c5ea02177dd32e4
change-id: 20240610-ls_waring_esdhc-93136a5dd794Best regards,
---
Frank Li <[email protected]>
Patch 1 and patch 2, applied for next, thanks!
Kind regards
Uffe