Skip to contentSkip to conversation

ARM: dts: at91: sama5d2: Add nodes for I2S

PATCH In review Codrin Ciubotariu 2 participants 5 messages Aug 6, 2018 – Aug 27, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v7 cover ARM: dts: at91: sama5d2: Add nodes for I2S

These are the remaining dts patches from the series:
[PATCH v5 0/5] ASoC: add driver for Atmel I2S controller

v6 -> v7
- addressed some comments regarding pin conflicts;

v5 -> v6
- removed unnecessary phandles to audio PLL clock from the I2S nodes;
- using assigned clocks to set gclk as parent of i2smuxclk;

Codrin Ciubotariu (1):
ARM: dts: at91: sama5d2: add I2S clock muxing nodes

Cyrille Pitchen (2):
ARM: dts: at91: sama5d2: add nodes for I2S controllers
ARM: dts: at91: sama5d2 Xplained: add pin muxing for I2S

 arch/arm/boot/dts/at91-sama5d2_xplained.dts | 30 +++++++++++
 arch/arm/boot/dts/sama5d2.dtsi              | 56 +++++++++++++++++++++
 2 files changed, 86 insertions(+)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v7 1/3 ARM: dts: at91: sama5d2: add I2S clock muxing nodes

This patch adds two clock muxes for the two I2S
buses present on sama5d2 platforms.

---

Changes in v7:
- none

Changes in v6:
- none

 arch/arm/boot/dts/sama5d2.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/sama5d2.dtsi +18 -0
index 61f68e5c48e9..eeb6afa1cda7 100644
@@ -992,6 +992,24 @@
 						atmel,clk-output-range = <0 100000000>;
 					};
 				};
+
+				i2s_clkmux {
+					compatible = "atmel,sama5d2-clk-i2s-mux";
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					i2s0muxck: i2s0_muxclk {
+						clocks = <&i2s0_clk>, <&i2s0_gclk>;
+						#clock-cells = <0>;
+						reg = <0>;
+					};
+
+					i2s1muxck: i2s1_muxclk {
+						clocks = <&i2s1_clk>, <&i2s1_gclk>;
+						#clock-cells = <0>;
+						reg = <1>;
+					};
+				};
 			};
 
 			qspi0: spi at f0020000 {
Signature · 1 line
2.17.1
#2 lore raw

PATCH v7 2/3 ARM: dts: at91: sama5d2: add nodes for I2S controllers

In reply to Codrin Ciubotariu

From: Cyrille Pitchen <[email protected]>

This patch adds DT nodes for I2S0 and I2S1. It also adds an alias for each I2S node.

[codrin.ciubotariu at microchip.com: removed unnecessary clock phandles]

---

Changes in v7:
- none

Changes in v6:
- removed unnecessary phandles to audio PLL clock from the I2S nodes;
- using assigned clocks to set gclk as parent of i2smuxclk;

 arch/arm/boot/dts/sama5d2.dtsi | 38 ++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
arch/arm/boot/dts/sama5d2.dtsi +38 -0
index eeb6afa1cda7..bf71dc00223a 100644
@@ -58,6 +58,8 @@
 		serial1 = &uart3;
 		tcb0 = &tcb0;
 		tcb1 = &tcb1;
+		i2s0 = &i2s0;
+		i2s1 = &i2s1;
 	};
 
 	cpus {
@@ -1313,6 +1315,24 @@
 				clocks = <&clk32k>;
 			};
 
+			i2s0: i2s at f8050000 {
+				compatible = "atmel,sama5d2-i2s";
+				reg = <0xf8050000 0x100>;
+				interrupts = <54 IRQ_TYPE_LEVEL_HIGH 7>;
+				dmas = <&dma0
+					(AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
+					 AT91_XDMAC_DT_PERID(31))>,
+				       <&dma0
+					(AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
+					 AT91_XDMAC_DT_PERID(32))>;
+				dma-names = "tx", "rx";
+				clocks = <&i2s0_clk>, <&i2s0_gclk>;
+				clock-names = "pclk", "gclk";
+				assigned-clocks = <&i2s0muxck>;
+				assigned-clock-parents = <&i2s0_gclk>;
+				status = "disabled";
+			};
+
 			can0: can at f8054000 {
 				compatible = "bosch,m_can";
 				reg = <0xf8054000 0x4000>, <0x210000 0x4000>;
@@ -1506,6 +1526,24 @@
 				status = "disabled";
 			};
 
+			i2s1: i2s at fc04c000 {
+				compatible = "atmel,sama5d2-i2s";
+				reg = <0xfc04c000 0x100>;
+				interrupts = <55 IRQ_TYPE_LEVEL_HIGH 7>;
+				dmas = <&dma0
+					(AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
+					 AT91_XDMAC_DT_PERID(33))>,
+				       <&dma0
+					(AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
+					 AT91_XDMAC_DT_PERID(34))>;
+				dma-names = "tx", "rx";
+				clocks = <&i2s1_clk>, <&i2s1_gclk>;
+				clock-names = "pclk", "gclk";
+				assigned-clocks = <&i2s1muxck>;
+				assigned-parrents = <&i2s1_gclk>;
+				status = "disabled";
+			};
+
 			can1: can at fc050000 {
 				compatible = "bosch,m_can";
 				reg = <0xfc050000 0x4000>, <0x210000 0x4000>;
Signature · 1 line
2.17.1
#3 lore raw

PATCH v7 3/3 ARM: dts: at91: sama5d2 Xplained: add pin muxing for I2S

In reply to Codrin Ciubotariu

From: Cyrille Pitchen <[email protected]>

This patch sets the pin muxing for the I2S controllers

[codrin.ciubotariu at microchip.com: added pin muxing for the second controller]

---

Changes in v7:
- added comments with pin conflicts created by the I2S controllers;
- explicitly disable the I2S nodes;

Changes in v6:
- none

 arch/arm/boot/dts/at91-sama5d2_xplained.dts | 30 +++++++++++++++++++++
 1 file changed, 30 insertions(+)
arch/arm/boot/dts/at91-sama5d2_xplained.dts +30 -0
index fcc85d70f36e..518e2b095ccf 100644
@@ -281,6 +281,12 @@
 				status = "okay";
 			};
 
+			i2s0: i2s at f8050000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2s0_default>;
+				status = "disabled"; /* conflict with can0 */
+			};
+
 			can0: can at f8054000 {
 				pinctrl-names = "default";
 				pinctrl-0 = <&pinctrl_can0_default>;
@@ -424,6 +430,24 @@
 					bias-disable;
 				};
 
+				pinctrl_i2s0_default: i2s0_default {
+					pinmux = <PIN_PC1__I2SC0_CK>,
+						 <PIN_PC2__I2SC0_MCK>,
+						 <PIN_PC3__I2SC0_WS>,
+						 <PIN_PC4__I2SC0_DI0>,
+						 <PIN_PC5__I2SC0_DO0>;
+					bias-disable;
+				};
+
+				pinctrl_i2s1_default: i2s1_default {
+					pinmux = <PIN_PA15__I2SC1_CK>,
+						 <PIN_PA14__I2SC1_MCK>,
+						 <PIN_PA16__I2SC1_WS>,
+						 <PIN_PA17__I2SC1_DI0>,
+						 <PIN_PA18__I2SC1_DO0>;
+					bias-disable;
+				};
+
 				pinctrl_key_gpio_default: key_gpio_default {
 					pinmux = <PIN_PB9__GPIO>;
 					bias-pull-up;
@@ -546,6 +570,12 @@
 				status = "okay";
 			};
 
+			i2s1: i2s at fc04c000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2s1_default>;
+				status = "disabled"; /* conflict with spi0, sdmmc1 */
+			};
+
 			can1: can at fc050000 {
 				pinctrl-names = "default";
 				pinctrl-0 = <&pinctrl_can1_default>;
Signature · 1 line
2.17.1
#4 lore raw
In reply to Codrin Ciubotariu
Quoted 13 lines · Codrin Ciubotariu

These are the remaining dts patches from the series:
[PATCH v5 0/5] ASoC: add driver for Atmel I2S controller

v6 -> v7
- addressed some comments regarding pin conflicts;

v5 -> v6
- removed unnecessary phandles to audio PLL clock from the I2S nodes;
- using assigned clocks to set gclk as parent of i2smuxclk;

Codrin Ciubotariu (1):
ARM: dts: at91: sama5d2: add I2S clock muxing nodes

Quoted 8 lines

Cyrille Pitchen (2):
ARM: dts: at91: sama5d2: add nodes for I2S controllers
ARM: dts: at91: sama5d2 Xplained: add pin muxing for I2S

 arch/arm/boot/dts/at91-sama5d2_xplained.dts | 30 +++++++++++
 arch/arm/boot/dts/sama5d2.dtsi              | 56 +++++++++++++++++++++
 2 files changed, 86 insertions(+)

All applied, thanks!

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com