2024-06-11 16:05:22

by Frank Li

[permalink] [raw]
Subject: [PATCH v4 0/8] 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.

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

Now only "bit-endian" proptery warning left.

Signed-off-by: Frank Li <[email protected]>
---
Frank Li (8):
dt-bindings: mmc: Convert fsl-esdhc.txt to yaml
dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix
arm64: dts: ls1012a: Chang node name from 'esdhc' to 'mmc'
arm64: dts: ls1043a: Chang node name from 'esdhc' to 'mmc'
arm64: dts: ls1046a: Chang node name from 'esdhc' to 'mmc'
arm64: dts: ls1088a: Chang node name from 'esdhc' to 'mmc'
arm64: dts: ls208ax: Chang node name from 'esdhc' to 'mmc'
arm64: dts: lx2160a: Chang 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 | 17 ++--
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, 125 insertions(+), 69 deletions(-)
---
base-commit: d35b2284e966c0bef3e2182a5c5ea02177dd32e4
change-id: 20240610-ls_waring_esdhc-93136a5dd794

Best regards,
---
Frank Li <[email protected]>



2024-06-11 16:05:40

by Frank Li

[permalink] [raw]
Subject: [PATCH v4 8/8] arm64: dts: lx2160a: Chang node name from 'esdhc' to 'mmc'

Use common node name 'mmc' and to add compatible string 'fsl,ls2080a-esdhc'
to fix DTB_CHECK waring.
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(@.*)?$'

Signed-off-by: Frank Li <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
index 96055593204ab..742de15bbfd87 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
@@ -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

--
2.34.1


2024-06-11 16:05:59

by Frank Li

[permalink] [raw]
Subject: [PATCH v4 2/8] dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix

According to common mmc core, voltages-ranges should be matrix.

Signed-off-by: Frank Li <[email protected]>

---
Not sure why it impact other mmc yaml's voltage-ranges.
---
Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
index 36acc40c7d181..05815b837219d 100644
--- a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
+++ b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
@@ -27,17 +27,20 @@ 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
+ minItems: 1
+ maxItems: 8

gpios:
description: |

--
2.34.1


2024-06-11 16:09:07

by Frank Li

[permalink] [raw]
Subject: [PATCH v4 7/8] arm64: dts: ls208ax: Chang node name from 'esdhc' to 'mmc'

Use common node name 'mmc' to fix DTB_CHECK warning.

arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dtb: esdhc@2140000: $nodename:0: 'esdhc@2140000' does not match '^mmc(@.*)?$'

Signed-off-by: Frank Li <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
index ccba0a135b247..80fd1420d2299 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -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>;

--
2.34.1


2024-06-11 18:48:33

by Dragan Simic

[permalink] [raw]
Subject: Re: [PATCH v4 0/8] arm64: dts: convert fsl,esdhc.txt to yaml and fix layerscape dts warning

Hello Frank,

Please see my comment below.

On 2024-06-11 18:01, Frank Li wrote:
> Start from v4 because fsl.esdhc.txt to yaml already sent out as v3.
>
> 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
>
> Now only "bit-endian" proptery warning left.
>
> Signed-off-by: Frank Li <[email protected]>
> ---
> Frank Li (8):
> dt-bindings: mmc: Convert fsl-esdhc.txt to yaml
> dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to
> uint32-matrix
> arm64: dts: ls1012a: Chang node name from 'esdhc' to 'mmc'
> arm64: dts: ls1043a: Chang node name from 'esdhc' to 'mmc'
> arm64: dts: ls1046a: Chang node name from 'esdhc' to 'mmc'
> arm64: dts: ls1088a: Chang node name from 'esdhc' to 'mmc'
> arm64: dts: ls208ax: Chang node name from 'esdhc' to 'mmc'
> arm64: dts: lx2160a: Chang node name from 'esdhc' to 'mmc'

s/Chang /Change / -- in all patch subjects

> .../devicetree/bindings/mmc/fsl,esdhc.yaml | 105
> +++++++++++++++++++++
> .../devicetree/bindings/mmc/fsl-esdhc.txt | 52 ----------
> .../devicetree/bindings/mmc/mmc-spi-slot.yaml | 17 ++--
> 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, 125 insertions(+), 69 deletions(-)
> ---
> base-commit: d35b2284e966c0bef3e2182a5c5ea02177dd32e4
> change-id: 20240610-ls_waring_esdhc-93136a5dd794
>
> Best regards,
> ---
> Frank Li <[email protected]>

2024-06-11 20:16:42

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v4 0/8] arm64: dts: convert fsl,esdhc.txt to yaml and fix layerscape dts warning

On Tue, Jun 11, 2024 at 12:01:45PM -0400, Frank Li wrote:
> Start from v4 because fsl.esdhc.txt to yaml already sent out as v3.
>
> 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
>
> Now only "bit-endian" proptery warning left.
>
> Signed-off-by: Frank Li <[email protected]>
> ---
> Frank Li (8):
> dt-bindings: mmc: Convert fsl-esdhc.txt to yaml
> dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix

> arm64: dts: ls1012a: Chang node name from 'esdhc' to 'mmc'
> arm64: dts: ls1043a: Chang node name from 'esdhc' to 'mmc'
> arm64: dts: ls1046a: Chang node name from 'esdhc' to 'mmc'
> arm64: dts: ls1088a: Chang node name from 'esdhc' to 'mmc'
> arm64: dts: ls208ax: Chang node name from 'esdhc' to 'mmc'
> arm64: dts: lx2160a: Chang node name from 'esdhc' to 'mmc'

It is all the same change to the same maintainer, so these can be just
one patch. Then you just have 1 typo to fix.

Rob

2024-06-11 20:23:23

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v4 2/8] dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix

On Tue, Jun 11, 2024 at 12:01:47PM -0400, Frank Li wrote:
> According to common mmc core, voltages-ranges should be matrix.
>
> Signed-off-by: Frank Li <[email protected]>
>
> ---
> Not sure why it impact other mmc yaml's voltage-ranges.

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 | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
> index 36acc40c7d181..05815b837219d 100644
> --- a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
> @@ -27,17 +27,20 @@ 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
> + minItems: 1
> + maxItems: 8

From what I remember, SPI mode doesn't support voltage changes.
Switching to 1.8V came much later in the spec. So it should be
'maxItems: 1'. Or better yet, make the outer 'items' a list (of 1
entry).

Rob

2024-06-12 06:32:01

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 0/8] arm64: dts: convert fsl,esdhc.txt to yaml and fix layerscape dts warning

On 11/06/2024 22:16, Rob Herring wrote:
> On Tue, Jun 11, 2024 at 12:01:45PM -0400, Frank Li wrote:
>> Start from v4 because fsl.esdhc.txt to yaml already sent out as v3.
>>
>> 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
>>
>> Now only "bit-endian" proptery warning left.
>>
>> Signed-off-by: Frank Li <[email protected]>
>> ---
>> Frank Li (8):
>> dt-bindings: mmc: Convert fsl-esdhc.txt to yaml
>> dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix
>
>> arm64: dts: ls1012a: Chang node name from 'esdhc' to 'mmc'
>> arm64: dts: ls1043a: Chang node name from 'esdhc' to 'mmc'
>> arm64: dts: ls1046a: Chang node name from 'esdhc' to 'mmc'
>> arm64: dts: ls1088a: Chang node name from 'esdhc' to 'mmc'
>> arm64: dts: ls208ax: Chang node name from 'esdhc' to 'mmc'
>> arm64: dts: lx2160a: Chang node name from 'esdhc' to 'mmc'
>
> It is all the same change to the same maintainer, so these can be just
> one patch. Then you just have 1 typo to fix.

Yeah, considering that this is trivial node name alignment, so rather
style issue.

Best regards,
Krzysztof


2024-06-12 14:37:46

by Frank Li

[permalink] [raw]
Subject: Re: [PATCH v4 2/8] dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix

On Tue, Jun 11, 2024 at 02:23:11PM -0600, Rob Herring wrote:
> On Tue, Jun 11, 2024 at 12:01:47PM -0400, Frank Li wrote:
> > According to common mmc core, voltages-ranges should be matrix.
> >
> > Signed-off-by: Frank Li <[email protected]>
> >
> > ---
> > Not sure why it impact other mmc yaml's voltage-ranges.
>
> 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 | 17 ++++++++++-------
> > 1 file changed, 10 insertions(+), 7 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
> > index 36acc40c7d181..05815b837219d 100644
> > --- a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
> > @@ -27,17 +27,20 @@ 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
> > + minItems: 1
> > + maxItems: 8
>
> From what I remember, SPI mode doesn't support voltage changes.
> Switching to 1.8V came much later in the spec. So it should be
> 'maxItems: 1'. Or better yet, make the outer 'items' a list (of 1
> entry).

I don't understand "make the outer 'items' a list (of 1 entry)." Can guide
me how to write it?

Frank

>
> Rob

2024-06-13 06:35:37

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 2/8] dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix

On 12/06/2024 16:36, Frank Li wrote:
> On Tue, Jun 11, 2024 at 02:23:11PM -0600, Rob Herring wrote:
>> On Tue, Jun 11, 2024 at 12:01:47PM -0400, Frank Li wrote:
>>> According to common mmc core, voltages-ranges should be matrix.
>>>
>>> Signed-off-by: Frank Li <[email protected]>
>>>
>>> ---
>>> Not sure why it impact other mmc yaml's voltage-ranges.
>>
>> 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 | 17 ++++++++++-------
>>> 1 file changed, 10 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
>>> index 36acc40c7d181..05815b837219d 100644
>>> --- a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
>>> +++ b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
>>> @@ -27,17 +27,20 @@ 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
>>> + minItems: 1
>>> + maxItems: 8
>>
>> From what I remember, SPI mode doesn't support voltage changes.
>> Switching to 1.8V came much later in the spec. So it should be
>> 'maxItems: 1'. Or better yet, make the outer 'items' a list (of 1
>> entry).
>
> I don't understand "make the outer 'items' a list (of 1 entry)." Can guide
> me how to write it?

voltage-ranges:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
items:
- items:
- descr:
- descr:

Best regards,
Krzysztof