linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] arm64: dts: imx8qxp add asrc and sai
@ 2024-02-27 20:54 Frank Li
  2024-02-27 20:54 ` [PATCH v2 1/4] ASoC: dt-bindings: fsl,imx-asrc/spdif: Add power-domains requirement Frank Li
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Frank Li @ 2024-02-27 20:54 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang
  Cc: linux-sound, devicetree, imx, linux-arm-kernel, linux-kernel, Frank Li

Update binding doc to avoid warning.
Change from v1 to v2
- Fixed dts DTB_CHECK warning

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Frank Li (4):
      ASoC: dt-bindings: fsl,imx-asrc/spdif: Add power-domains requirement
      ASoC: dt-bindings: fsl,imx-asrc: update max interrupt numbers
      ASoC: dt-bindings: fsl-sai: allow only one dma-names
      arm64: dts: imx8qxp: add asrc[0,1], esai0, spdif[0,1] and sai[4,5]

 .../devicetree/bindings/sound/fsl,imx-asrc.yaml    |   3 +
 .../devicetree/bindings/sound/fsl,sai.yaml         |  12 +-
 .../devicetree/bindings/sound/fsl,spdif.yaml       |  22 +-
 arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi   | 304 +++++++++++++++++++++
 4 files changed, 336 insertions(+), 5 deletions(-)
---
base-commit: ca301cf599a4eeafed8e3dd87bf8d2fe810e075e
change-id: 20240227-asrc_8qxp-25aa6783840f

Best regards,
-- 
Frank Li <Frank.Li@nxp.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 1/4] ASoC: dt-bindings: fsl,imx-asrc/spdif: Add power-domains requirement
  2024-02-27 20:54 [PATCH v2 0/4] arm64: dts: imx8qxp add asrc and sai Frank Li
@ 2024-02-27 20:54 ` Frank Li
  2024-02-29 18:52   ` Conor Dooley
  2024-02-27 20:54 ` [PATCH v2 2/4] ASoC: dt-bindings: fsl,imx-asrc: update max interrupt numbers Frank Li
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 18+ messages in thread
From: Frank Li @ 2024-02-27 20:54 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang
  Cc: linux-sound, devicetree, imx, linux-arm-kernel, linux-kernel, Frank Li

Add power-domains property for asrc and spdif.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml | 3 +++
 Documentation/devicetree/bindings/sound/fsl,spdif.yaml    | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
index bfef2fcb75b14..98616507e3c10 100644
--- a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
@@ -74,6 +74,9 @@ properties:
       - const: asrck_f
       - const: spba
 
+  power-domains:
+    maxItems: 1
+
   fsl,asrc-rate:
     $ref: /schemas/types.yaml#/definitions/uint32
     description: The mutual sample rate used by DPCM Back Ends
diff --git a/Documentation/devicetree/bindings/sound/fsl,spdif.yaml b/Documentation/devicetree/bindings/sound/fsl,spdif.yaml
index 1d64e8337aa4b..82430f1d5e5a2 100644
--- a/Documentation/devicetree/bindings/sound/fsl,spdif.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,spdif.yaml
@@ -86,6 +86,9 @@ properties:
       registers. Set this flag for HCDs with big endian descriptors and big
       endian registers.
 
+  power-domains:
+    maxItems: 1
+
 required:
   - compatible
   - reg

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 2/4] ASoC: dt-bindings: fsl,imx-asrc: update max interrupt numbers
  2024-02-27 20:54 [PATCH v2 0/4] arm64: dts: imx8qxp add asrc and sai Frank Li
  2024-02-27 20:54 ` [PATCH v2 1/4] ASoC: dt-bindings: fsl,imx-asrc/spdif: Add power-domains requirement Frank Li
@ 2024-02-27 20:54 ` Frank Li
  2024-02-27 22:39   ` Rob Herring
  2024-02-27 20:54 ` [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names Frank Li
  2024-02-27 20:54 ` [PATCH v2 4/4] arm64: dts: imx8qxp: add asrc[0,1], esai0, spdif[0,1] and sai[4,5] Frank Li
  3 siblings, 1 reply; 18+ messages in thread
From: Frank Li @ 2024-02-27 20:54 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang
  Cc: linux-sound, devicetree, imx, linux-arm-kernel, linux-kernel, Frank Li

fsl,imx8qxp-spdif and fsl,imx8qm-spdif have 2 interrupts. Other platforms
have 1 interrupt.

Increase max interrupt number to 2 and add restriction for platforms except
i.MX8QXP and i.MX8QM.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 .../devicetree/bindings/sound/fsl,spdif.yaml          | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/fsl,spdif.yaml b/Documentation/devicetree/bindings/sound/fsl,spdif.yaml
index 82430f1d5e5a2..debf0da759924 100644
--- a/Documentation/devicetree/bindings/sound/fsl,spdif.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,spdif.yaml
@@ -31,7 +31,7 @@ properties:
     maxItems: 1
 
   interrupts:
-    maxItems: 1
+    maxItems: 2
 
   dmas:
     items:
@@ -100,6 +100,23 @@ required:
 
 additionalProperties: false
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - fsl,imx35-spdif
+            - fsl,vf610-spdif
+            - fsl,imx6sx-spdif
+            - fsl,imx8mq-spdif
+            - fsl,imx8mm-spdif
+            - fsl,imx8mn-spdif
+            - fsl,imx8ulp-spdif
+    then:
+      properties:
+        interrupts:
+          maxItems: 1
+
 examples:
   - |
     spdif@2004000 {

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-02-27 20:54 [PATCH v2 0/4] arm64: dts: imx8qxp add asrc and sai Frank Li
  2024-02-27 20:54 ` [PATCH v2 1/4] ASoC: dt-bindings: fsl,imx-asrc/spdif: Add power-domains requirement Frank Li
  2024-02-27 20:54 ` [PATCH v2 2/4] ASoC: dt-bindings: fsl,imx-asrc: update max interrupt numbers Frank Li
@ 2024-02-27 20:54 ` Frank Li
  2024-02-29 18:55   ` Conor Dooley
  2024-02-27 20:54 ` [PATCH v2 4/4] arm64: dts: imx8qxp: add asrc[0,1], esai0, spdif[0,1] and sai[4,5] Frank Li
  3 siblings, 1 reply; 18+ messages in thread
From: Frank Li @ 2024-02-27 20:54 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang
  Cc: linux-sound, devicetree, imx, linux-arm-kernel, linux-kernel, Frank Li

Some sai only connect one direction. So allow only "rx" or "tx" for
dma-names.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
index 2456d958adeef..0302752d58a2b 100644
--- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
@@ -86,10 +86,14 @@ properties:
       - description: DMA controller phandle and request line for TX
 
   dma-names:
-    minItems: 1
-    items:
-      - const: rx
-      - const: tx
+    oneOf:
+      - items:
+          - const: rx
+          - const: tx
+      - items:
+          - enum:
+              - rx
+              - tx
 
   interrupts:
     items:

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 4/4] arm64: dts: imx8qxp: add asrc[0,1], esai0, spdif[0,1] and sai[4,5]
  2024-02-27 20:54 [PATCH v2 0/4] arm64: dts: imx8qxp add asrc and sai Frank Li
                   ` (2 preceding siblings ...)
  2024-02-27 20:54 ` [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names Frank Li
@ 2024-02-27 20:54 ` Frank Li
  3 siblings, 0 replies; 18+ messages in thread
From: Frank Li @ 2024-02-27 20:54 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang
  Cc: linux-sound, devicetree, imx, linux-arm-kernel, linux-kernel, Frank Li

Add asrc[0,1], esai0, spdif[0,1], sai[4,5] and related lpcg node for
imx8 audio subsystem.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi | 304 +++++++++++++++++++++++
 1 file changed, 304 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi
index 07afeb78ed564..78305559f15c9 100644
--- a/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi
@@ -6,6 +6,7 @@
 
 #include <dt-bindings/clock/imx8-clock.h>
 #include <dt-bindings/clock/imx8-lpcg.h>
+#include <dt-bindings/dma/fsl-edma.h>
 #include <dt-bindings/firmware/imx/rsrc.h>
 
 audio_ipg_clk: clock-audio-ipg {
@@ -481,4 +482,307 @@ acm: acm@59e00000 {
 			      "sai3_rx_bclk",
 			      "sai4_rx_bclk";
 	};
+
+	asrc0: asrc@59000000 {
+		compatible = "fsl,imx8qm-asrc";
+		reg = <0x59000000 0x10000>;
+		interrupts = <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&asrc0_lpcg 0>,
+			 <&asrc0_lpcg 0>,
+			 <&aud_pll_div0_lpcg 0>,
+			 <&aud_pll_div1_lpcg 0>,
+			 <&acm IMX_ADMA_ACM_AUD_CLK0_SEL>,
+			 <&acm IMX_ADMA_ACM_AUD_CLK1_SEL>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>;
+		clock-names = "mem", "ipg",
+			      "asrck_0", "asrck_1", "asrck_2", "asrck_3",
+			      "asrck_4", "asrck_5", "asrck_6", "asrck_7",
+			      "asrck_8", "asrck_9", "asrck_a", "asrck_b",
+			      "asrck_c", "asrck_d", "asrck_e", "asrck_f",
+			      "spba";
+		dmas = <&edma0 0 0 0>,
+		       <&edma0 1 0 0>,
+		       <&edma0 2 0 0>,
+		       <&edma0 3 0 FSL_EDMA_RX>,
+		       <&edma0 4 0 FSL_EDMA_RX>,
+		       <&edma0 5 0 FSL_EDMA_RX>;
+		/* tx* is output channel of asrc, it is rx channel for eDMA */
+		dma-names = "rxa", "rxb", "rxc", "txa", "txb", "txc";
+		fsl,asrc-rate  = <8000>;
+		fsl,asrc-width = <16>;
+		fsl,asrc-clk-map = <0>;
+		power-domains = <&pd IMX_SC_R_ASRC_0>;
+		status = "disabled";
+	};
+
+	esai0: esai@59010000 {
+		compatible = "fsl,imx8qm-esai", "fsl,imx6ull-esai";
+		reg = <0x59010000 0x10000>;
+		interrupts = <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&esai0_lpcg 1>, <&esai0_lpcg 0>, <&esai0_lpcg 1>, <&clk_dummy>;
+		clock-names = "core", "extal", "fsys", "spba";
+		dmas = <&edma0 6 0 FSL_EDMA_RX>, <&edma0 7 0 0>;
+		dma-names = "rx", "tx";
+		power-domains = <&pd IMX_SC_R_ESAI_0>;
+		status = "disabled";
+	};
+
+	spdif0: spdif@59020000 {
+		compatible = "fsl,imx8qm-spdif";
+		reg = <0x59020000 0x10000>;
+		interrupts =  <GIC_SPI 456 IRQ_TYPE_LEVEL_HIGH>, /* rx */
+			      <GIC_SPI 458 IRQ_TYPE_LEVEL_HIGH>; /* tx */
+		clocks = <&spdif0_lpcg 1>,	/* core */
+			 <&clk_dummy>,		/* rxtx0 */
+			 <&spdif0_lpcg 0>,	/* rxtx1 */
+			 <&clk_dummy>,		/* rxtx2 */
+			 <&clk_dummy>,		/* rxtx3 */
+			 <&clk_dummy>,		/* rxtx4 */
+			 <&audio_ipg_clk>,	/* rxtx5 */
+			 <&clk_dummy>,		/* rxtx6 */
+			 <&clk_dummy>,		/* rxtx7 */
+			 <&clk_dummy>;		/* spba */
+		clock-names = "core", "rxtx0", "rxtx1", "rxtx2", "rxtx3", "rxtx4",
+			      "rxtx5", "rxtx6", "rxtx7", "spba";
+		dmas = <&edma0 8 0 (FSL_EDMA_MULTI_FIFO | FSL_EDMA_RX)>,
+		       <&edma0 9 0 FSL_EDMA_MULTI_FIFO>;
+		dma-names = "rx", "tx";
+		power-domains = <&pd IMX_SC_R_SPDIF_0>;
+		status = "disabled";
+	};
+
+	spdif1: spdif@59030000 {
+		compatible = "fsl,imx8qm-spdif";
+		reg = <0x59030000 0x10000>;
+		interrupts =  <GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH>, /* rx */
+			      <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>; /* tx */
+		clocks = <&spdif1_lpcg 1>,	/* core */
+			 <&clk_dummy>,		/* rxtx0 */
+			 <&spdif1_lpcg 0>,	/* rxtx1 */
+			 <&clk_dummy>,		/* rxtx2 */
+			 <&clk_dummy>,		/* rxtx3 */
+			 <&clk_dummy>,		/* rxtx4 */
+			 <&audio_ipg_clk>,	/* rxtx5 */
+			 <&clk_dummy>,		/* rxtx6 */
+			 <&clk_dummy>,		/* rxtx7 */
+			 <&clk_dummy>;		/* spba */
+		clock-names = "core", "rxtx0", "rxtx1", "rxtx2", "rxtx3", "rxtx4",
+			      "rxtx5", "rxtx6", "rxtx7", "spba";
+		dmas = <&edma0 10 0 (FSL_EDMA_MULTI_FIFO | FSL_EDMA_RX)>,
+		       <&edma0 11 0 FSL_EDMA_MULTI_FIFO>;
+		dma-names = "rx", "tx";
+		power-domains = <&pd IMX_SC_R_SPDIF_1>;
+		status = "disabled";
+	};
+
+	asrc1: asrc@59800000 {
+		compatible = "fsl,imx8qm-asrc";
+		reg = <0x59800000 0x10000>;
+		interrupts = <GIC_SPI 380 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&asrc1_lpcg 0>,
+			 <&asrc1_lpcg 0>,
+			 <&aud_pll_div0_lpcg 0>,
+			 <&aud_pll_div1_lpcg 0>,
+			 <&acm IMX_ADMA_ACM_AUD_CLK0_SEL>,
+			 <&acm IMX_ADMA_ACM_AUD_CLK1_SEL>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>,
+			 <&clk_dummy>;
+		clock-names = "mem", "ipg",
+			      "asrck_0", "asrck_1", "asrck_2", "asrck_3",
+			      "asrck_4", "asrck_5", "asrck_6", "asrck_7",
+			      "asrck_8", "asrck_9", "asrck_a", "asrck_b",
+			      "asrck_c", "asrck_d", "asrck_e", "asrck_f",
+			      "spba";
+		dmas = <&edma1 0 0 0>,
+		       <&edma1 1 0 0>,
+		       <&edma1 2 0 0>,
+		       <&edma1 3 0 FSL_EDMA_RX>,
+		       <&edma1 4 0 FSL_EDMA_RX>,
+		       <&edma1 5 0 FSL_EDMA_RX>;
+		/* tx* is output channel of asrc, it is rx channel for eDMA */
+		dma-names = "rxa", "rxb", "rxc", "txa", "txb", "txc";
+		fsl,asrc-rate  = <8000>;
+		fsl,asrc-width = <16>;
+		fsl,asrc-clk-map = <1>;
+		power-domains = <&pd IMX_SC_R_ASRC_1>;
+		status = "disabled";
+	};
+
+	sai4: sai@59820000 {
+		compatible = "fsl,imx8qm-sai";
+		reg = <0x59820000 0x10000>;
+		interrupts = <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&sai4_lpcg 1>,
+			 <&clk_dummy>,
+			 <&sai4_lpcg 0>,
+			 <&clk_dummy>,
+			 <&clk_dummy>;
+		clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
+		dmas = <&edma1 8 0 FSL_EDMA_RX>, <&edma1 9 0 0>;
+		dma-names = "rx", "tx";
+		power-domains = <&pd IMX_SC_R_SAI_4>;
+		status = "disabled";
+	};
+
+	sai5: sai@59830000 {
+		compatible = "fsl,imx8qm-sai";
+		reg = <0x59830000 0x10000>;
+		interrupts = <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&sai5_lpcg 1>,
+			 <&clk_dummy>,
+			 <&sai5_lpcg 0>,
+			 <&clk_dummy>,
+			 <&clk_dummy>;
+		clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
+		dmas = <&edma1 10 0 0>;
+		dma-names = "tx";
+		power-domains = <&pd IMX_SC_R_SAI_5>;
+		status = "disabled";
+	};
+
+	amix: amix@59840000 {
+		compatible = "fsl,imx8qm-audmix";
+		reg = <0x59840000 0x10000>;
+		clocks = <&amix_lpcg 0>;
+		clock-names = "ipg";
+		power-domains = <&pd IMX_SC_R_AMIX>;
+		dais = <&sai4>, <&sai5>;
+		status = "disabled";
+	};
+
+	mqs: mqs@59850000 {
+		compatible = "fsl,imx8qm-mqs";
+		reg = <0x59850000 0x10000>;
+		clocks = <&mqs0_lpcg 0>,
+			<&mqs0_lpcg 1>;
+		clock-names = "mclk", "core";
+		power-domains = <&pd IMX_SC_R_MQS_0>;
+		status = "disabled";
+	};
+
+	asrc0_lpcg: clock-controller@59400000 {
+		compatible = "fsl,imx8qxp-lpcg";
+		reg = <0x59400000 0x10000>;
+		#clock-cells = <1>;
+		clocks = <&audio_ipg_clk>;
+		clock-indices = <IMX_LPCG_CLK_4>;
+		clock-output-names = "asrc0_lpcg_ipg_clk";
+		power-domains = <&pd IMX_SC_R_ASRC_0>;
+	};
+
+	esai0_lpcg: clock-controller@59410000 {
+		compatible = "fsl,imx8qxp-lpcg";
+		reg = <0x59410000 0x10000>;
+		#clock-cells = <1>;
+		clocks = <&acm IMX_ADMA_ACM_ESAI0_MCLK_SEL>,
+			 <&audio_ipg_clk>;
+		clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>;
+		clock-output-names = "esai0_lpcg_extal_clk",
+				     "esai0_lpcg_ipg_clk";
+		power-domains = <&pd IMX_SC_R_ESAI_0>;
+	};
+
+	spdif0_lpcg: clock-controller@59420000 {
+		compatible = "fsl,imx8qxp-lpcg";
+		reg = <0x59420000 0x10000>;
+		#clock-cells = <1>;
+		clocks = <&acm IMX_ADMA_ACM_SPDIF0_TX_CLK_SEL>,
+			 <&audio_ipg_clk>;
+		clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>;
+		clock-output-names = "spdif0_lpcg_tx_clk",
+				     "spdif0_lpcg_gclkw";
+		power-domains = <&pd IMX_SC_R_SPDIF_0>;
+	};
+
+	spdif1_lpcg: clock-controller@59430000 {
+		compatible = "fsl,imx8qxp-lpcg";
+		reg = <0x59430000 0x10000>;
+		#clock-cells = <1>;
+		clocks = <&acm IMX_ADMA_ACM_SPDIF1_TX_CLK_SEL>,
+			 <&audio_ipg_clk>;
+		clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>;
+		clock-output-names = "spdif1_lpcg_tx_clk",
+				     "spdif1_lpcg_gclkw";
+		power-domains = <&pd IMX_SC_R_SPDIF_1>;
+		status = "disabled";
+	};
+
+	asrc1_lpcg: clock-controller@59c00000 {
+		compatible = "fsl,imx8qxp-lpcg";
+		reg = <0x59c00000 0x10000>;
+		#clock-cells = <1>;
+		clocks = <&audio_ipg_clk>;
+		clock-indices = <IMX_LPCG_CLK_4>;
+		clock-output-names = "asrc1_lpcg_ipg_clk";
+		power-domains = <&pd IMX_SC_R_ASRC_1>;
+	};
+
+	sai4_lpcg: clock-controller@59c20000 {
+		compatible = "fsl,imx8qxp-lpcg";
+		reg = <0x59c20000 0x10000>;
+		#clock-cells = <1>;
+		clocks = <&acm IMX_ADMA_ACM_SAI4_MCLK_SEL>,
+			 <&audio_ipg_clk>;
+		clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>;
+		clock-output-names = "sai4_lpcg_mclk",
+				     "sai4_lpcg_ipg_clk";
+		power-domains = <&pd IMX_SC_R_SAI_4>;
+	};
+
+	sai5_lpcg: clock-controller@59c30000 {
+		compatible = "fsl,imx8qxp-lpcg";
+		reg = <0x59c30000 0x10000>;
+		#clock-cells = <1>;
+		clocks = <&acm IMX_ADMA_ACM_SAI5_MCLK_SEL>,
+			 <&audio_ipg_clk>;
+		clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>;
+		clock-output-names = "sai5_lpcg_mclk",
+				     "sai5_lpcg_ipg_clk";
+		power-domains = <&pd IMX_SC_R_SAI_5>;
+	};
+
+	amix_lpcg: clock-controller@59c40000 {
+		compatible = "fsl,imx8qxp-lpcg";
+		reg = <0x59c40000 0x10000>;
+		#clock-cells = <1>;
+		clocks = <&audio_ipg_clk>;
+		clock-indices = <IMX_LPCG_CLK_0>;
+		clock-output-names = "amix_lpcg_ipg_clk";
+		power-domains = <&pd IMX_SC_R_AMIX>;
+	};
+
+	mqs0_lpcg: clock-controller@59c50000 {
+		compatible = "fsl,imx8qxp-lpcg";
+		reg = <0x59c50000 0x10000>;
+		#clock-cells = <1>;
+		clocks = <&acm IMX_ADMA_ACM_MQS_TX_CLK_SEL>,
+			 <&audio_ipg_clk>;
+		clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>;
+		clock-output-names = "mqs0_lpcg_mclk",
+				     "mqs0_lpcg_ipg_clk";
+		power-domains = <&pd IMX_SC_R_MQS_0>;
+	};
 };

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 2/4] ASoC: dt-bindings: fsl,imx-asrc: update max interrupt numbers
  2024-02-27 20:54 ` [PATCH v2 2/4] ASoC: dt-bindings: fsl,imx-asrc: update max interrupt numbers Frank Li
@ 2024-02-27 22:39   ` Rob Herring
  0 siblings, 0 replies; 18+ messages in thread
From: Rob Herring @ 2024-02-27 22:39 UTC (permalink / raw)
  To: Frank Li
  Cc: Mark Brown, linux-sound, Fabio Estevam, Krzysztof Kozlowski,
	linux-kernel, Shawn Guo, Conor Dooley, linux-arm-kernel,
	Sascha Hauer, Pengutronix Kernel Team, devicetree, imx,
	Shengjiu Wang, Liam Girdwood


On Tue, 27 Feb 2024 15:54:10 -0500, Frank Li wrote:
> fsl,imx8qxp-spdif and fsl,imx8qm-spdif have 2 interrupts. Other platforms
> have 1 interrupt.
> 
> Increase max interrupt number to 2 and add restriction for platforms except
> i.MX8QXP and i.MX8QM.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  .../devicetree/bindings/sound/fsl,spdif.yaml          | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 

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/sound/fsl,spdif.example.dtb: spdif@2004000: interrupts: [[0, 52, 4]] is too short
	from schema $id: http://devicetree.org/schemas/sound/fsl,spdif.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240227-asrc_8qxp-v2-2-521bcc7eb1c0@nxp.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.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 1/4] ASoC: dt-bindings: fsl,imx-asrc/spdif: Add power-domains requirement
  2024-02-27 20:54 ` [PATCH v2 1/4] ASoC: dt-bindings: fsl,imx-asrc/spdif: Add power-domains requirement Frank Li
@ 2024-02-29 18:52   ` Conor Dooley
  0 siblings, 0 replies; 18+ messages in thread
From: Conor Dooley @ 2024-02-29 18:52 UTC (permalink / raw)
  To: Frank Li
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1678 bytes --]

On Tue, Feb 27, 2024 at 03:54:09PM -0500, Frank Li wrote:
> Add power-domains property for asrc and spdif.

Is this valid for all compatibles documented in these bindings?
Also, your $subject says "requirement", but you do not mark these as
required. Why not?

Cheers,
Conor.

> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml | 3 +++
>  Documentation/devicetree/bindings/sound/fsl,spdif.yaml    | 3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
> index bfef2fcb75b14..98616507e3c10 100644
> --- a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
> +++ b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
> @@ -74,6 +74,9 @@ properties:
>        - const: asrck_f
>        - const: spba
>  
> +  power-domains:
> +    maxItems: 1
> +
>    fsl,asrc-rate:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      description: The mutual sample rate used by DPCM Back Ends
> diff --git a/Documentation/devicetree/bindings/sound/fsl,spdif.yaml b/Documentation/devicetree/bindings/sound/fsl,spdif.yaml
> index 1d64e8337aa4b..82430f1d5e5a2 100644
> --- a/Documentation/devicetree/bindings/sound/fsl,spdif.yaml
> +++ b/Documentation/devicetree/bindings/sound/fsl,spdif.yaml
> @@ -86,6 +86,9 @@ properties:
>        registers. Set this flag for HCDs with big endian descriptors and big
>        endian registers.
>  
> +  power-domains:
> +    maxItems: 1
> +
>  required:
>    - compatible
>    - reg
> 
> -- 
> 2.34.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-02-27 20:54 ` [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names Frank Li
@ 2024-02-29 18:55   ` Conor Dooley
  2024-02-29 18:57     ` Conor Dooley
  2024-02-29 19:31     ` Frank Li
  0 siblings, 2 replies; 18+ messages in thread
From: Conor Dooley @ 2024-02-29 18:55 UTC (permalink / raw)
  To: Frank Li
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]

On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> Some sai only connect one direction. So allow only "rx" or "tx" for
> dma-names.

Which sai? Can you restrict this per compatible please, so that someone
cannot add 2 dmas for ones where only the tx is supported.

|  dmas:
|    minItems: 1
|    items:
|      - description: DMA controller phandle and request line for RX
|      - description: DMA controller phandle and request line for TX

The binding already allows only one, but it documents that the first dma
is always the RX dma, and that doesn't change with this patch..

Cheers,
Conor.

> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> index 2456d958adeef..0302752d58a2b 100644
> --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> @@ -86,10 +86,14 @@ properties:
>        - description: DMA controller phandle and request line for TX
>  
>    dma-names:
> -    minItems: 1
> -    items:
> -      - const: rx
> -      - const: tx
> +    oneOf:
> +      - items:
> +          - const: rx
> +          - const: tx
> +      - items:
> +          - enum:
> +              - rx
> +              - tx
>  
>    interrupts:
>      items:
> 
> -- 
> 2.34.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-02-29 18:55   ` Conor Dooley
@ 2024-02-29 18:57     ` Conor Dooley
  2024-02-29 19:38       ` Frank Li
  2024-02-29 19:31     ` Frank Li
  1 sibling, 1 reply; 18+ messages in thread
From: Conor Dooley @ 2024-02-29 18:57 UTC (permalink / raw)
  To: Frank Li
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1980 bytes --]

On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > Some sai only connect one direction. So allow only "rx" or "tx" for
> > dma-names.
> 
> Which sai? Can you restrict this per compatible please, so that someone
> cannot add 2 dmas for ones where only the tx is supported.
> 
> |  dmas:
> |    minItems: 1
> |    items:
> |      - description: DMA controller phandle and request line for RX
> |      - description: DMA controller phandle and request line for TX
> 
> The binding already allows only one, but it documents that the first dma
> is always the RX dma, and that doesn't change with this patch..

I said "doesn't change" - but I don't think you can change this
trivially, as something could rely on the first dma being the rx one.
You'd have to check that there is nothing using these using indices
rather than names before making any changes here.

> 
> Cheers,
> Conor.
> 
> > 
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > ---
> >  Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++----
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > index 2456d958adeef..0302752d58a2b 100644
> > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > @@ -86,10 +86,14 @@ properties:
> >        - description: DMA controller phandle and request line for TX
> >  
> >    dma-names:
> > -    minItems: 1
> > -    items:
> > -      - const: rx
> > -      - const: tx
> > +    oneOf:
> > +      - items:
> > +          - const: rx
> > +          - const: tx
> > +      - items:
> > +          - enum:
> > +              - rx
> > +              - tx
> >  
> >    interrupts:
> >      items:
> > 
> > -- 
> > 2.34.1
> > 



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-02-29 18:55   ` Conor Dooley
  2024-02-29 18:57     ` Conor Dooley
@ 2024-02-29 19:31     ` Frank Li
  2024-03-01 16:06       ` Conor Dooley
  1 sibling, 1 reply; 18+ messages in thread
From: Frank Li @ 2024-02-29 19:31 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > Some sai only connect one direction. So allow only "rx" or "tx" for
> > dma-names.
> 
> Which sai? Can you restrict this per compatible please, so that someone
> cannot add 2 dmas for ones where only the tx is supported.

SAI is exact the same. Only external connect one dma channel.

> 
> |  dmas:
> |    minItems: 1
> |    items:
> |      - description: DMA controller phandle and request line for RX
> |      - description: DMA controller phandle and request line for TX
> 
> The binding already allows only one, but it documents that the first dma
> is always the RX dma, and that doesn't change with this patch..

Does below logic work? 

anyOf
  - enum
      - description: ---rx
      - description: ---tx

> 
> Cheers,
> Conor.
> 
> > 
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > ---
> >  Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++----
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > index 2456d958adeef..0302752d58a2b 100644
> > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > @@ -86,10 +86,14 @@ properties:
> >        - description: DMA controller phandle and request line for TX
> >  
> >    dma-names:
> > -    minItems: 1
> > -    items:
> > -      - const: rx
> > -      - const: tx
> > +    oneOf:
> > +      - items:
> > +          - const: rx
> > +          - const: tx
> > +      - items:
> > +          - enum:
> > +              - rx
> > +              - tx
> >  
> >    interrupts:
> >      items:
> > 
> > -- 
> > 2.34.1
> > 



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-02-29 18:57     ` Conor Dooley
@ 2024-02-29 19:38       ` Frank Li
  2024-03-01 16:05         ` Conor Dooley
  0 siblings, 1 reply; 18+ messages in thread
From: Frank Li @ 2024-02-29 19:38 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote:
> On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > > Some sai only connect one direction. So allow only "rx" or "tx" for
> > > dma-names.
> > 
> > Which sai? Can you restrict this per compatible please, so that someone
> > cannot add 2 dmas for ones where only the tx is supported.
> > 
> > |  dmas:
> > |    minItems: 1
> > |    items:
> > |      - description: DMA controller phandle and request line for RX
> > |      - description: DMA controller phandle and request line for TX
> > 
> > The binding already allows only one, but it documents that the first dma
> > is always the RX dma, and that doesn't change with this patch..
> 
> I said "doesn't change" - but I don't think you can change this
> trivially, as something could rely on the first dma being the rx one.
> You'd have to check that there is nothing using these using indices
> rather than names before making any changes here.

Linux driver and dts with tx only work well. Only issue is dtb_check will
report error. I want to eliminate these DTB_CHECK warning.

And it also reasonable, only rx or tx for a special SAI.

Can we remove 'description'? dmas should already descripted at common place
and 'RX' and 'TX' are listed at 'dma-names'

Frank

> 
> > 
> > Cheers,
> > Conor.
> > 
> > > 
> > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > ---
> > >  Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++----
> > >  1 file changed, 8 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > > index 2456d958adeef..0302752d58a2b 100644
> > > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > > @@ -86,10 +86,14 @@ properties:
> > >        - description: DMA controller phandle and request line for TX
> > >  
> > >    dma-names:
> > > -    minItems: 1
> > > -    items:
> > > -      - const: rx
> > > -      - const: tx
> > > +    oneOf:
> > > +      - items:
> > > +          - const: rx
> > > +          - const: tx
> > > +      - items:
> > > +          - enum:
> > > +              - rx
> > > +              - tx
> > >  
> > >    interrupts:
> > >      items:
> > > 
> > > -- 
> > > 2.34.1
> > > 
> 
> 



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-02-29 19:38       ` Frank Li
@ 2024-03-01 16:05         ` Conor Dooley
  2024-03-01 16:46           ` Frank Li
  0 siblings, 1 reply; 18+ messages in thread
From: Conor Dooley @ 2024-03-01 16:05 UTC (permalink / raw)
  To: Frank Li
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]

On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote:
> On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote:
> > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > > > Some sai only connect one direction. So allow only "rx" or "tx" for
> > > > dma-names.
> > > 
> > > Which sai? Can you restrict this per compatible please, so that someone
> > > cannot add 2 dmas for ones where only the tx is supported.
> > > 
> > > |  dmas:
> > > |    minItems: 1
> > > |    items:
> > > |      - description: DMA controller phandle and request line for RX
> > > |      - description: DMA controller phandle and request line for TX
> > > 
> > > The binding already allows only one, but it documents that the first dma
> > > is always the RX dma, and that doesn't change with this patch..
> > 
> > I said "doesn't change" - but I don't think you can change this
> > trivially, as something could rely on the first dma being the rx one.
> > You'd have to check that there is nothing using these using indices
> > rather than names before making any changes here.
> 
> Linux driver and dts with tx only work well. Only issue is dtb_check will
> report error. I want to eliminate these DTB_CHECK warning.

Linux is not the only user of these bindings, citing linux as your
evidence here is only sufficient if no other users exist. Do they?

> And it also reasonable, only rx or tx for a special SAI.
> 
> Can we remove 'description'? dmas should already descripted at common place
> and 'RX' and 'TX' are listed at 'dma-names'

Removing the description has the same problem. The existing binding has
set a fixed order that you now want to make flexible.

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-02-29 19:31     ` Frank Li
@ 2024-03-01 16:06       ` Conor Dooley
  2024-03-01 16:50         ` Frank Li
  0 siblings, 1 reply; 18+ messages in thread
From: Conor Dooley @ 2024-03-01 16:06 UTC (permalink / raw)
  To: Frank Li
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Thu, Feb 29, 2024 at 02:31:20PM -0500, Frank Li wrote:
> On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > > Some sai only connect one direction. So allow only "rx" or "tx" for
> > > dma-names.
> > 
> > Which sai? Can you restrict this per compatible please, so that someone
> > cannot add 2 dmas for ones where only the tx is supported.
> 
> SAI is exact the same. Only external connect one dma channel.

Right. The wording made it sound like some SAIs were capable of this and
some were not, but what you actually mean is that all SAIs can sometimes
be connected in only one direction.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-03-01 16:05         ` Conor Dooley
@ 2024-03-01 16:46           ` Frank Li
  2024-03-01 17:07             ` Conor Dooley
  0 siblings, 1 reply; 18+ messages in thread
From: Frank Li @ 2024-03-01 16:46 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote:
> On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote:
> > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote:
> > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > > > > Some sai only connect one direction. So allow only "rx" or "tx" for
> > > > > dma-names.
> > > > 
> > > > Which sai? Can you restrict this per compatible please, so that someone
> > > > cannot add 2 dmas for ones where only the tx is supported.
> > > > 
> > > > |  dmas:
> > > > |    minItems: 1
> > > > |    items:
> > > > |      - description: DMA controller phandle and request line for RX
> > > > |      - description: DMA controller phandle and request line for TX
> > > > 
> > > > The binding already allows only one, but it documents that the first dma
> > > > is always the RX dma, and that doesn't change with this patch..
> > > 
> > > I said "doesn't change" - but I don't think you can change this
> > > trivially, as something could rely on the first dma being the rx one.
> > > You'd have to check that there is nothing using these using indices
> > > rather than names before making any changes here.
> > 
> > Linux driver and dts with tx only work well. Only issue is dtb_check will
> > report error. I want to eliminate these DTB_CHECK warning.
> 
> Linux is not the only user of these bindings, citing linux as your
> evidence here is only sufficient if no other users exist. Do they?

But, 'dmas' should be common property for all these bindings? I don't think
they use 'descriptions:' property, which should guide dts writer to write
dts file. actually words 'DMA controller phandle and request line' just
nonsense words. let 'regs', it'd better descript at 'reg-names' instead
of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which
already show at "dma-names".

> 
> > And it also reasonable, only rx or tx for a special SAI.
> > 
> > Can we remove 'description'? dmas should already descripted at common place
> > and 'RX' and 'TX' are listed at 'dma-names'
> 
> Removing the description has the same problem. The existing binding has
> set a fixed order that you now want to make flexible.

Actually original set minItems: is 1, which means allow 1 channel. but
set items to force two channel. 

Does it work

oneOf:
  items: 
  	- description: TX
	- description: RX
  items:
	- description: TX
  items:
	- description: RX

> 
> Thanks,
> Conor.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-03-01 16:06       ` Conor Dooley
@ 2024-03-01 16:50         ` Frank Li
  0 siblings, 0 replies; 18+ messages in thread
From: Frank Li @ 2024-03-01 16:50 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

On Fri, Mar 01, 2024 at 04:06:35PM +0000, Conor Dooley wrote:
> On Thu, Feb 29, 2024 at 02:31:20PM -0500, Frank Li wrote:
> > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > > > Some sai only connect one direction. So allow only "rx" or "tx" for
> > > > dma-names.
> > > 
> > > Which sai? Can you restrict this per compatible please, so that someone
> > > cannot add 2 dmas for ones where only the tx is supported.
> > 
> > SAI is exact the same. Only external connect one dma channel.
> 
> Right. The wording made it sound like some SAIs were capable of this and
> some were not, but what you actually mean is that all SAIs can sometimes
> be connected in only one direction.

IP is the same, just some instance only connect one direction dma. for
example there are 6 sai instance in SOC. sai0, ... sai4 have both rx and
tx. sai5 only connect tx. 





^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-03-01 16:46           ` Frank Li
@ 2024-03-01 17:07             ` Conor Dooley
  2024-03-01 17:25               ` Frank Li
  0 siblings, 1 reply; 18+ messages in thread
From: Conor Dooley @ 2024-03-01 17:07 UTC (permalink / raw)
  To: Frank Li
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3025 bytes --]

On Fri, Mar 01, 2024 at 11:46:20AM -0500, Frank Li wrote:
> On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote:
> > On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote:
> > > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote:
> > > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> > > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > > > > > Some sai only connect one direction. So allow only "rx" or "tx" for
> > > > > > dma-names.
> > > > > 
> > > > > Which sai? Can you restrict this per compatible please, so that someone
> > > > > cannot add 2 dmas for ones where only the tx is supported.
> > > > > 
> > > > > |  dmas:
> > > > > |    minItems: 1
> > > > > |    items:
> > > > > |      - description: DMA controller phandle and request line for RX
> > > > > |      - description: DMA controller phandle and request line for TX
> > > > > 
> > > > > The binding already allows only one, but it documents that the first dma
> > > > > is always the RX dma, and that doesn't change with this patch..
> > > > 
> > > > I said "doesn't change" - but I don't think you can change this
> > > > trivially, as something could rely on the first dma being the rx one.
> > > > You'd have to check that there is nothing using these using indices
> > > > rather than names before making any changes here.
> > > 
> > > Linux driver and dts with tx only work well. Only issue is dtb_check will
> > > report error. I want to eliminate these DTB_CHECK warning.
> > 
> > Linux is not the only user of these bindings, citing linux as your
> > evidence here is only sufficient if no other users exist. Do they?
> 
> But, 'dmas' should be common property for all these bindings? I don't think
> they use 'descriptions:' property, which should guide dts writer to write
> dts file. actually words 'DMA controller phandle and request line' just
> nonsense words. let 'regs', it'd better descript at 'reg-names' instead
> of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which
> already show at "dma-names".

None of this matters. If there's a documented order for these, which
there is, software is not obligated to use the names and can rely on the
order alone. You need to check that there are no other users which will
be broken by your proposed change.

> > > And it also reasonable, only rx or tx for a special SAI.
> > > 
> > > Can we remove 'description'? dmas should already descripted at common place
> > > and 'RX' and 'TX' are listed at 'dma-names'
> > 
> > Removing the description has the same problem. The existing binding has
> > set a fixed order that you now want to make flexible.
> 
> Actually original set minItems: is 1, which means allow 1 channel. but
> set items to force two channel. 
> 
> Does it work
> 
> oneOf:
>   items: 
>   	- description: TX
> 	- description: RX
>   items:
> 	- description: TX
>   items:
> 	- description: RX
> 
> > 
> > Thanks,
> > Conor.
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-03-01 17:07             ` Conor Dooley
@ 2024-03-01 17:25               ` Frank Li
  2024-03-04 20:13                 ` Conor Dooley
  0 siblings, 1 reply; 18+ messages in thread
From: Frank Li @ 2024-03-01 17:25 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

On Fri, Mar 01, 2024 at 05:07:07PM +0000, Conor Dooley wrote:
> On Fri, Mar 01, 2024 at 11:46:20AM -0500, Frank Li wrote:
> > On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote:
> > > On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote:
> > > > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote:
> > > > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> > > > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > > > > > > Some sai only connect one direction. So allow only "rx" or "tx" for
> > > > > > > dma-names.
> > > > > > 
> > > > > > Which sai? Can you restrict this per compatible please, so that someone
> > > > > > cannot add 2 dmas for ones where only the tx is supported.
> > > > > > 
> > > > > > |  dmas:
> > > > > > |    minItems: 1
> > > > > > |    items:
> > > > > > |      - description: DMA controller phandle and request line for RX
> > > > > > |      - description: DMA controller phandle and request line for TX
> > > > > > 
> > > > > > The binding already allows only one, but it documents that the first dma
> > > > > > is always the RX dma, and that doesn't change with this patch..
> > > > > 
> > > > > I said "doesn't change" - but I don't think you can change this
> > > > > trivially, as something could rely on the first dma being the rx one.
> > > > > You'd have to check that there is nothing using these using indices
> > > > > rather than names before making any changes here.
> > > > 
> > > > Linux driver and dts with tx only work well. Only issue is dtb_check will
> > > > report error. I want to eliminate these DTB_CHECK warning.
> > > 
> > > Linux is not the only user of these bindings, citing linux as your
> > > evidence here is only sufficient if no other users exist. Do they?
> > 
> > But, 'dmas' should be common property for all these bindings? I don't think
> > they use 'descriptions:' property, which should guide dts writer to write
> > dts file. actually words 'DMA controller phandle and request line' just
> > nonsense words. let 'regs', it'd better descript at 'reg-names' instead
> > of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which
> > already show at "dma-names".
> 
> None of this matters. If there's a documented order for these, which
> there is, software is not obligated to use the names and can rely on the
> order alone. You need to check that there are no other users which will
> be broken by your proposed change.

As my best knowledge, only linux use this binding.

Frank

> 
> > > > And it also reasonable, only rx or tx for a special SAI.
> > > > 
> > > > Can we remove 'description'? dmas should already descripted at common place
> > > > and 'RX' and 'TX' are listed at 'dma-names'
> > > 
> > > Removing the description has the same problem. The existing binding has
> > > set a fixed order that you now want to make flexible.
> > 
> > Actually original set minItems: is 1, which means allow 1 channel. but
> > set items to force two channel. 
> > 
> > Does it work
> > 
> > oneOf:
> >   items: 
> >   	- description: TX
> > 	- description: RX
> >   items:
> > 	- description: TX
> >   items:
> > 	- description: RX
> > 
> > > 
> > > Thanks,
> > > Conor.
> > 
> > 



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names
  2024-03-01 17:25               ` Frank Li
@ 2024-03-04 20:13                 ` Conor Dooley
  0 siblings, 0 replies; 18+ messages in thread
From: Conor Dooley @ 2024-03-04 20:13 UTC (permalink / raw)
  To: Frank Li
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shengjiu Wang, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2891 bytes --]

On Fri, Mar 01, 2024 at 12:25:44PM -0500, Frank Li wrote:
> On Fri, Mar 01, 2024 at 05:07:07PM +0000, Conor Dooley wrote:
> > On Fri, Mar 01, 2024 at 11:46:20AM -0500, Frank Li wrote:
> > > On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote:
> > > > On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote:
> > > > > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote:
> > > > > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> > > > > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > > > > > > > Some sai only connect one direction. So allow only "rx" or "tx" for
> > > > > > > > dma-names.
> > > > > > > 
> > > > > > > Which sai? Can you restrict this per compatible please, so that someone
> > > > > > > cannot add 2 dmas for ones where only the tx is supported.
> > > > > > > 
> > > > > > > |  dmas:
> > > > > > > |    minItems: 1
> > > > > > > |    items:
> > > > > > > |      - description: DMA controller phandle and request line for RX
> > > > > > > |      - description: DMA controller phandle and request line for TX
> > > > > > > 
> > > > > > > The binding already allows only one, but it documents that the first dma
> > > > > > > is always the RX dma, and that doesn't change with this patch..
> > > > > > 
> > > > > > I said "doesn't change" - but I don't think you can change this
> > > > > > trivially, as something could rely on the first dma being the rx one.
> > > > > > You'd have to check that there is nothing using these using indices
> > > > > > rather than names before making any changes here.
> > > > > 
> > > > > Linux driver and dts with tx only work well. Only issue is dtb_check will
> > > > > report error. I want to eliminate these DTB_CHECK warning.
> > > > 
> > > > Linux is not the only user of these bindings, citing linux as your
> > > > evidence here is only sufficient if no other users exist. Do they?
> > > 
> > > But, 'dmas' should be common property for all these bindings? I don't think
> > > they use 'descriptions:' property, which should guide dts writer to write
> > > dts file. actually words 'DMA controller phandle and request line' just
> > > nonsense words. let 'regs', it'd better descript at 'reg-names' instead
> > > of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which
> > > already show at "dma-names".
> > 
> > None of this matters. If there's a documented order for these, which
> > there is, software is not obligated to use the names and can rely on the
> > order alone. You need to check that there are no other users which will
> > be broken by your proposed change.
> 
> As my best knowledge, only linux use this binding.

If you've checked and there are no users, that's fine. Please mention
in the commit message that there are no users that will be affected as
justification for the ABI change.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-03-04 20:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 20:54 [PATCH v2 0/4] arm64: dts: imx8qxp add asrc and sai Frank Li
2024-02-27 20:54 ` [PATCH v2 1/4] ASoC: dt-bindings: fsl,imx-asrc/spdif: Add power-domains requirement Frank Li
2024-02-29 18:52   ` Conor Dooley
2024-02-27 20:54 ` [PATCH v2 2/4] ASoC: dt-bindings: fsl,imx-asrc: update max interrupt numbers Frank Li
2024-02-27 22:39   ` Rob Herring
2024-02-27 20:54 ` [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names Frank Li
2024-02-29 18:55   ` Conor Dooley
2024-02-29 18:57     ` Conor Dooley
2024-02-29 19:38       ` Frank Li
2024-03-01 16:05         ` Conor Dooley
2024-03-01 16:46           ` Frank Li
2024-03-01 17:07             ` Conor Dooley
2024-03-01 17:25               ` Frank Li
2024-03-04 20:13                 ` Conor Dooley
2024-02-29 19:31     ` Frank Li
2024-03-01 16:06       ` Conor Dooley
2024-03-01 16:50         ` Frank Li
2024-02-27 20:54 ` [PATCH v2 4/4] arm64: dts: imx8qxp: add asrc[0,1], esai0, spdif[0,1] and sai[4,5] Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).