Skip to contentSkip to conversation

arm64: dts: imx8mn: specify #sound-dai-cells for SAI nodes

PATCH Superseded Marek Vasut 5 participants 11 messages Feb 27, 2023 – Mar 1, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: imx8mn: specify #sound-dai-cells for SAI nodes

Add #sound-dai-cells properties to SAI nodes.

---
Cc: Abel Vesa <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Jacky Bai <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Luca Ceresoli <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marco Felsch <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 arch/arm64/boot/dts/freescale/imx8mn.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/freescale/imx8mn.dtsi +5 -0
index ed9ac6c5047c0..bbec860ef8548 100644
@@ -294,6 +294,7 @@ spba2: spba-bus@30000000 {
 				ranges;
 
 				sai2: sai@30020000 {
+					#sound-dai-cells = <0>;
 					compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
 					reg = <0x30020000 0x10000>;
 					interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
@@ -308,6 +309,7 @@ sai2: sai@30020000 {
 				};
 
 				sai3: sai@30030000 {
+					#sound-dai-cells = <0>;
 					compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
 					reg = <0x30030000 0x10000>;
 					interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
@@ -322,6 +324,7 @@ sai3: sai@30030000 {
 				};
 
 				sai5: sai@30050000 {
+					#sound-dai-cells = <0>;
 					compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
 					reg = <0x30050000 0x10000>;
 					interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
@@ -338,6 +341,7 @@ sai5: sai@30050000 {
 				};
 
 				sai6: sai@30060000 {
+					#sound-dai-cells = <0>;
 					compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
 					reg = <0x30060000  0x10000>;
 					interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
@@ -395,6 +399,7 @@ spdif1: spdif@30090000 {
 				};
 
 				sai7: sai@300b0000 {
+					#sound-dai-cells = <0>;
 					compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
 					reg = <0x300b0000 0x10000>;
 					interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#2 lore raw
In reply to Marek Vasut
Quoted 3 lines · Marek Vasut

Add #sound-dai-cells properties to SAI nodes.

Should this have a fixes tag?

Fixes 9e9860069725 ("arm64: dts: imx8mn: Add SAI nodes")

I don't know when these became required, and/or if this should be back-ported or not.

adam

Quoted 74 lines

---
Cc: Abel Vesa <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Jacky Bai <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Luca Ceresoli <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marco Felsch <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 arch/arm64/boot/dts/freescale/imx8mn.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/freescale/imx8mn.dtsi +5 -1
index ed9ac6c5047c0..bbec860ef8548 100644
@@ -294,6 +294,7 @@ spba2: spba-bus@30000000 {
                                ranges;
 
                                sai2: sai@30020000 {
+                                       #sound-dai-cells = <0>;
                                        compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
                                        reg = <0x30020000 0x10000>;
                                        interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
@@ -308,6 +309,7 @@ sai2: sai@30020000 {
                                };
 
                                sai3: sai@30030000 {
+                                       #sound-dai-cells = <0>;
                                        compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
                                        reg = <0x30030000 0x10000>;
                                        interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
@@ -322,6 +324,7 @@ sai3: sai@30030000 {
                                };
 
                                sai5: sai@30050000 {
+                                       #sound-dai-cells = <0>;
                                        compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
                                        reg = <0x30050000 0x10000>;
                                        interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
@@ -338,6 +341,7 @@ sai5: sai@30050000 {
                                };
 
                                sai6: sai@30060000 {
+                                       #sound-dai-cells = <0>;
                                        compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
                                        reg = <0x30060000  0x10000>;
                                        interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
@@ -395,6 +399,7 @@ spdif1: spdif@30090000 {
                                };
 
                                sai7: sai@300b0000 {
+                                       #sound-dai-cells = <0>;
                                        compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
                                        reg = <0x300b0000 0x10000>;
                                        interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
--

2.39.2

#3 lore raw
Quoted 11 lines · Adam Ford
Quoted 3 lines · Marek Vasut

Add #sound-dai-cells properties to SAI nodes.

Should this have a fixes tag?

Fixes 9e9860069725 ("arm64: dts: imx8mn: Add SAI nodes")

I don't know when these became required, and/or if this should be back-ported or not.

I am unsure myself, but this commit from 2020 does not have it:
ebfa8951e6cd2 ("arm64: dts: imx8mm: specify #sound-dai-cells for SAI nodes")

#4 lore raw
In reply to Marek Vasut

Hi Marek,

Quoted 34 lines · Marek Vasut

Add #sound-dai-cells properties to SAI nodes.

---
Cc: Abel Vesa <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Jacky Bai <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Luca Ceresoli <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marco Felsch <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 arch/arm64/boot/dts/freescale/imx8mn.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/freescale/imx8mn.dtsi +0 -0
index ed9ac6c5047c0..bbec860ef8548 100644

arch/arm64/boot/dts/freescale/imx8mn.dtsi spba2: spba-bus@30000000 { · line 297

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mn.dtsi +1 -0
@@ -294,6 +294,7 @@ spba2: spba-bus@30000000 {
 				ranges;
 
 				sai2: sai@30020000 {
+					#sound-dai-cells = <0>;

Please don't add it in front of the compatible and the reg property.

Regards,
Marco

Quoted 39 lines
arch/arm64/boot/dts/freescale/imx8mn.dtsi +4 -0
 					compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
 					reg = <0x30020000 0x10000>;
 					interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
@@ -308,6 +309,7 @@ sai2: sai@30020000 {
 				};
 
 				sai3: sai@30030000 {
+					#sound-dai-cells = <0>;
 					compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
 					reg = <0x30030000 0x10000>;
 					interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
@@ -322,6 +324,7 @@ sai3: sai@30030000 {
 				};
 
 				sai5: sai@30050000 {
+					#sound-dai-cells = <0>;
 					compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
 					reg = <0x30050000 0x10000>;
 					interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
@@ -338,6 +341,7 @@ sai5: sai@30050000 {
 				};
 
 				sai6: sai@30060000 {
+					#sound-dai-cells = <0>;
 					compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
 					reg = <0x30060000  0x10000>;
 					interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
@@ -395,6 +399,7 @@ spdif1: spdif@30090000 {
 				};
 
 				sai7: sai@300b0000 {
+					#sound-dai-cells = <0>;
 					compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
 					reg = <0x300b0000 0x10000>;
 					interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.39.2
#5 lore raw
Quoted 39 lines · Marco Felsch

Hi Marek,

Quoted 36 lines · Marek Vasut

Add #sound-dai-cells properties to SAI nodes.

---
Cc: Abel Vesa <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Jacky Bai <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Luca Ceresoli <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marco Felsch <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
  arch/arm64/boot/dts/freescale/imx8mn.dtsi | 5 +++++
  1 file changed, 5 insertions(+)
arch/arm64/boot/dts/freescale/imx8mn.dtsi +0 -0
index ed9ac6c5047c0..bbec860ef8548 100644
@@ -294,6 +294,7 @@ spba2: spba-bus@30000000 {
  				ranges;
 
Quoted 4 lines

arch/arm64/boot/dts/freescale/imx8mn.dtsi spba2: spba-bus@30000000 { · line 297

Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mn.dtsi +1 -0
  				sai2: sai@30020000 {
+					#sound-dai-cells = <0>;

Please don't add it in front of the compatible and the reg property.

The #address-cells and #size-cells are also always on top, why should the #sound-dai-cells be any different ? Where should they be ?

#6 lore raw
Quoted 44 lines · Marek Vasut
Quoted 32 lines · Marco Felsch

Hi Marek,

Quoted 29 lines · Marek Vasut

Add #sound-dai-cells properties to SAI nodes.

---
Cc: Abel Vesa <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Jacky Bai <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Luca Ceresoli <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marco Felsch <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
  arch/arm64/boot/dts/freescale/imx8mn.dtsi | 5 +++++
  1 file changed, 5 insertions(+)
Quoted 10 lines

arch/arm64/boot/dts/freescale/imx8mn.dtsi spba2: spba-bus@30000000 { · line 296

Quoted 8 lines
arch/arm64/boot/dts/freescale/imx8mn.dtsi +1 -0
index ed9ac6c5047c0..bbec860ef8548 100644
@@ -294,6 +294,7 @@ spba2: spba-bus@30000000 {
  				ranges;
  				sai2: sai@30020000 {
+					#sound-dai-cells = <0>;

Please don't add it in front of the compatible and the reg property.

Quoted 2 lines

The #address-cells and #size-cells are also always on top, why should the #sound-dai-cells be any different ? Where should they be ?

As of now my understanding of specifying a devicetree node was:

node-name@reg-nr {
	compatible = "";
	reg = <>;
	// all pending properties below
	...
};

@Rob, @Krzysztof:
Is this a (unwritten) rule/policy?

Marekt please ignore my comment if this is not the case.

Regards,
Marco

#7 lore raw
Quoted 57 lines · Marco Felsch
Quoted 44 lines · Marek Vasut
Quoted 32 lines · Marco Felsch

Hi Marek,

Quoted 29 lines · Marek Vasut

Add #sound-dai-cells properties to SAI nodes.

---
Cc: Abel Vesa <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Jacky Bai <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Luca Ceresoli <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marco Felsch <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
   arch/arm64/boot/dts/freescale/imx8mn.dtsi | 5 +++++
   1 file changed, 5 insertions(+)
Quoted 10 lines

arch/arm64/boot/dts/freescale/imx8mn.dtsi spba2: spba-bus@30000000 { · line 296

Quoted 8 lines
arch/arm64/boot/dts/freescale/imx8mn.dtsi +1 -0
index ed9ac6c5047c0..bbec860ef8548 100644
@@ -294,6 +294,7 @@ spba2: spba-bus@30000000 {
   				ranges;
   				sai2: sai@30020000 {
+					#sound-dai-cells = <0>;

Please don't add it in front of the compatible and the reg property.

Quoted 2 lines

The #address-cells and #size-cells are also always on top, why should the #sound-dai-cells be any different ? Where should they be ?

As of now my understanding of specifying a devicetree node was:

node-name@reg-nr {
	compatible = "";
	reg = <>;
	// all pending properties below
	...
};
Quoted 4 lines

@Rob, @Krzysztof:
Is this a (unwritten) rule/policy?

Marekt please ignore my comment if this is not the case.

Getting input from Rob/Krysztof is a good idea, thanks.

#8 lore raw
In reply to Marco Felsch
Quoted 16 lines · Marco Felsch
Quoted 6 lines
Quoted 3 lines

Review

Quoted 1 line
(quoted diff) +1 -0
+					#sound-dai-cells = <0>;

Please don't add it in front of the compatible and the reg property.

The #address-cells and #size-cells are also always on top, why should the #sound-dai-cells be any different ? Where should they be ?

As of now my understanding of specifying a devicetree node was:

node-name@reg-nr {
	compatible = "";
	reg = <>;
	// all pending properties below
	...
};
Quoted 3 lines

@Rob, @Krzysztof:
Is this a (unwritten) rule/policy?

Each platform has its own coding style around this but I am not aware of a coding style which puts address and size cells at the top. To me it is really odd placement. First property is always "compatible", as the most important. Then for most platforms second is "reg", as the one easiest to compare with unit address. Some platforms put status as last property.

Best regards,
Krzysztof

#9 lore raw
Quoted 17 lines · Krzysztof Kozlowski
Quoted 16 lines · Marco Felsch
Quoted 6 lines
Quoted 3 lines

Review

Quoted 1 line
(quoted diff) +1 -0
+					#sound-dai-cells = <0>;

Please don't add it in front of the compatible and the reg property.

The #address-cells and #size-cells are also always on top, why should the #sound-dai-cells be any different ? Where should they be ?

As of now my understanding of specifying a devicetree node was:

node-name@reg-nr {
	compatible = "";
	reg = <>;
	// all pending properties below
	...
};
Quoted 6 lines
Quoted 3 lines

@Rob, @Krzysztof:
Is this a (unwritten) rule/policy?

Each platform has its own coding style around this but I am not aware of a coding style which puts address and size cells at the top.

DTspec 0.3 and 0.4-rc agrees with the below.

Linux seems to be full of counter-examples though:

$ git grep -A 1 ' {$' arch/*/boot/dts/ | grep -B 1 cells
Quoted 4 lines

To me it is
really odd placement. First property is always "compatible", as the most important. Then for most platforms second is "reg", as the one easiest to compare with unit address. Some platforms put status as last property.

All right, so:

- compatible
- reg
- #whatever-cells
- properties
- status

Does that order look right ?

[...]

#10 lore raw
Quoted 37 lines · Marek Vasut
Quoted 17 lines · Krzysztof Kozlowski
Quoted 16 lines · Marco Felsch
Quoted 6 lines
Quoted 3 lines

Review

Quoted 1 line
(quoted diff) +1 -0
+					#sound-dai-cells = <0>;

Please don't add it in front of the compatible and the reg property.

The #address-cells and #size-cells are also always on top, why should the #sound-dai-cells be any different ? Where should they be ?

As of now my understanding of specifying a devicetree node was:

node-name@reg-nr {
	compatible = "";
	reg = <>;
	// all pending properties below
	...
};
Quoted 6 lines
Quoted 3 lines

@Rob, @Krzysztof:
Is this a (unwritten) rule/policy?

Each platform has its own coding style around this but I am not aware of a coding style which puts address and size cells at the top.

DTspec 0.3 and 0.4-rc agrees with the below.

Linux seems to be full of counter-examples though:

$ git grep -A 1 ' {$' arch/*/boot/dts/ | grep -B 1 cells
Quoted 4 lines

To me it is
really odd placement. First property is always "compatible", as the most important. Then for most platforms second is "reg", as the one easiest to compare with unit address. Some platforms put status as last property.

All right, so:

Quoted 7 lines

- compatible
- reg
- #whatever-cells
- properties
- status

Does that order look right ?

I would swap the #whatever-cells with the properties, but that's just my opinion. The rest looks good to me. Thanks for the research.

Regards,
Marco

Quoted 3 lines

[...]