Skip to contentSkip to conversation

ARM: Dove: Add the audio device to the Cubox DT

PATCH Superseded Jean-Francois Moine 3 participants 5 messages Oct 8, 2013 – Oct 9, 2013 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH v2 2/2 ARM: Dove: Add the audio device to the Cubox DT

This patch activates the audio device of the Cubox.

The audio flow (pin mpp_audio1) is output on both I2S and S/PDIF.

The third si5351 clock (#2, pin mpp13) is used as the external clock.

---
 arch/arm/boot/dts/dove-cubox.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/boot/dts/dove-cubox.dts +20 -0
index 022646e..bb38a24 100644
@@ -132,3 +132,23 @@
 		reg = <0>;
 	};
 };
+
+&pinctrl {
+	pmx_gpio_13_audio1: pmx-gpio-13-audio1 {
+		marvell,pins = "mpp13";
+		marvell,function = "audio1";
+	};
+
+	pmx_audio1_i2s1_spdifo: pmx-audio1-i2s1-spdifo {
+		marvell,pins = "mpp_audio1";
+		marvell,function = "i2s1/spdifo";
+	};
+};
+
+&audio1 {
+	status = "okay";
+	clocks = <&gate_clk 13>, <&si5351 2>;
+	clock-names = "internal", "extclk";
+	pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_gpio_13_audio1>;
+	pinctrl-names = "default";
+};
Signature · 2 lines
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
#1 lore raw

PATCH v2 2/2 ARM: Dove: Add the audio device to the Cubox DT

Quoted 16 lines · Jean-Francois Moine

This patch activates the audio device of the Cubox.

The audio flow (pin mpp_audio1) is output on both I2S and S/PDIF.

The third si5351 clock (#2, pin mpp13) is used as the external clock.

---
  arch/arm/boot/dts/dove-cubox.dts | 20 ++++++++++++++++++++
  1 file changed, 20 insertions(+)
arch/arm/boot/dts/dove-cubox.dts +0 -0
index 022646e..bb38a24 100644

arch/arm/boot/dts/dove-cubox.dts line 137

Quoted 6 lines
arch/arm/boot/dts/dove-cubox.dts +3 -0
@@ -132,3 +132,23 @@
  		reg = <0>;
  	};
  };
+
+&pinctrl {
+	pmx_gpio_13_audio1: pmx-gpio-13-audio1 {

Jean-Francois,

please name the node "pmx_audio1_extclk: pmx-audio1-extclk" and move both to the corresponding section in dove.dtsi. We can reuse them on other Dove boards for sure.

Quoted 5 lines
arch/arm/boot/dts/dove-cubox.dts +5 -0
+		marvell,pins = "mpp13";
+		marvell,function = "audio1";
+	};
+
+	pmx_audio1_i2s1_spdifo: pmx-audio1-i2s1-spdifo {

arch/arm/boot/dts/dove-cubox.dts line 152

Quoted 10 lines
arch/arm/boot/dts/dove-cubox.dts +10 -0
+		marvell,pins = "mpp_audio1";
+		marvell,function = "i2s1/spdifo";
+	};
+};
+
+&audio1 {
+	status = "okay";
+	clocks = <&gate_clk 13>, <&si5351 2>;
+	clock-names = "internal", "extclk";
+	pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_gpio_13_audio1>;

The above needs updated phandles then.

Otherwise,

Quoted 3 lines
arch/arm/boot/dts/dove-cubox.dts +2 -0
+	pinctrl-names = "default";
+};
#2 lore raw

PATCH v2 2/2 ARM: Dove: Add the audio device to the Cubox DT

Quoted 48 lines · Sebastian Hesselbarth
Quoted 16 lines · Jean-Francois Moine

This patch activates the audio device of the Cubox.

The audio flow (pin mpp_audio1) is output on both I2S and S/PDIF.

The third si5351 clock (#2, pin mpp13) is used as the external clock.

---
 arch/arm/boot/dts/dove-cubox.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/boot/dts/dove-cubox.dts +0 -0
index 022646e..bb38a24 100644

arch/arm/boot/dts/dove-cubox.dts line 137

Quoted 6 lines
arch/arm/boot/dts/dove-cubox.dts +3 -0
@@ -132,3 +132,23 @@
 		reg = <0>;
 	};
 };
+
+&pinctrl {
+	pmx_gpio_13_audio1: pmx-gpio-13-audio1 {

Jean-Francois,

please name the node "pmx_audio1_extclk: pmx-audio1-extclk" and move both to the corresponding section in dove.dtsi. We can reuse them on other Dove boards for sure.

Quoted 5 lines
arch/arm/boot/dts/dove-cubox.dts +5 -0
+		marvell,pins = "mpp13";
+		marvell,function = "audio1";
+	};
+
+	pmx_audio1_i2s1_spdifo: pmx-audio1-i2s1-spdifo {

arch/arm/boot/dts/dove-cubox.dts line 152

Quoted 10 lines
arch/arm/boot/dts/dove-cubox.dts +10 -0
+		marvell,pins = "mpp_audio1";
+		marvell,function = "i2s1/spdifo";
+	};
+};
+
+&audio1 {
+	status = "okay";
+	clocks = <&gate_clk 13>, <&si5351 2>;
+	clock-names = "internal", "extclk";
+	pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_gpio_13_audio1>;

The above needs updated phandles then.

Quoted 3 lines

Otherwise,

Once you make the above changes, just send a v3 in-reply-to this patch and I'll pick it up with the other two.

thx,

Jason.

Quoted 10 lines

arch/arm/boot/dts/dove-cubox.dts line 154

Quoted 4 lines
arch/arm/boot/dts/dove-cubox.dts +2 -0
+	pinctrl-names = "default";
+};

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

PATCH v3 2/2 ARM: Dove: Add the audio device to the Cubox DT

This patch activates the audio device of the Cubox.

The audio flow (pin mpp_audio1) is output on both I2S and S/PDIF.

The third si5351 clock (#2, pin mpp13) is used as the external clock.

---
Jason,

this patch replaces the previous patch v2 2/2

v3:
- move the pins declaration to dove.dtsi (Sebastian Hesselbarth)

---
 arch/arm/boot/dts/dove.dtsi      | 10 ++++++++++
 arch/arm/boot/dts/dove-cubox.dts |  8 ++++++++
 2 files changed, 18 insertions(+)
arch/arm/boot/dts/dove.dtsi +10 -0
index e177e66..772b15e 100644
@@ -227,6 +227,11 @@
 				marvell,function = "gpio";
 			};
 
+			pmx_audio1_extclk: pmx-audio1-extclk {
+				marvell,pins = "mpp13";
+				marvell,function = "audio1";
+			};
+
 			pmx_gpio_14: pmx-gpio-14 {
 				marvell,pins = "mpp14";
 				marvell,function = "gpio";
@@ -302,6 +307,11 @@
 				marvell,function = "gpio";
 			};
 
+			pmx_audio1_i2s1_spdifo: pmx-audio1-i2s1-spdifo {
+				marvell,pins = "mpp_audio1";
+				marvell,function = "i2s1/spdifo";
+			};
+
 			pmx_spi0: pmx-spi0 {
 				marvell,pins = "mpp_spi0";
 				marvell,function = "spi0";
arch/arm/boot/dts/dove-cubox.dts +8 -0
index 022646e..78b0057 100644
@@ -132,3 +132,11 @@
 		reg = <0>;
 	};
 };
+
+&audio1 {
+	status = "okay";
+	clocks = <&gate_clk 13>, <&si5351 2>;
+	clock-names = "internal", "extclk";
+	pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_audio1_extclk>;
+	pinctrl-names = "default";
+};
Signature · 2 lines
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
Applied
#4 lore raw

PATCH v3 2/2 ARM: Dove: Add the audio device to the Cubox DT

Quoted 10 lines · Jean-Francois Moine

This patch activates the audio device of the Cubox.

The audio flow (pin mpp_audio1) is output on both I2S and S/PDIF.

The third si5351 clock (#2, pin mpp13) is used as the external clock.

---
Jason,

Quoted 8 lines

this patch replaces the previous patch v2 2/2

v3:
- move the pins declaration to dove.dtsi (Sebastian Hesselbarth)

---
 arch/arm/boot/dts/dove.dtsi      | 10 ++++++++++
 arch/arm/boot/dts/dove-cubox.dts |  8 ++++++++
 2 files changed, 18 insertions(+)

Applied to mvebu/dt with Sebastian's Ack

thx,

Jason.