Skip to contentSkip to conversation

ARM: dts: Peach-pi audio support and cleanup

PATCH In review Tushar Behera 3 participants 6 messages Jun 20, 2014 – Jun 21, 2014

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

v2 cover ARM: dts: Peach-pi audio support and cleanup

The patchset is dependent on following patch.
[1] ARM: dts: Update the parent for Audss clocks in Exynos5420
https://lkml.org/lkml/2014/6/11/36

During the review of v1, it was pointed out that it would be better to sort DTS files for Peach-pit and Peach-pi boards. Patch 2 is a step towards that activity.

Tushar Behera (2):
ARM: dts: Enable audio support for Peach-pi board
ARM: dts: Sort nodes within Peach-pit/Peach-pi dts files

 arch/arm/boot/dts/exynos5420-peach-pit.dts |  236 ++++++++++++++--------------
 arch/arm/boot/dts/exynos5800-peach-pi.dts  |  218 ++++++++++++++-----------
 2 files changed, 245 insertions(+), 209 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/2 ARM: dts: Enable audio support for Peach-pi board

Peach-pi board has MAX98091 audio codec connected on HSI2C-7 bus.

---
Changes for v2:
* Replaced max98090 with max98091.

 arch/arm/boot/dts/exynos5800-peach-pi.dts |   31 +++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
arch/arm/boot/dts/exynos5800-peach-pi.dts +31 -0
index f3af207..ef94ab8 100644
@@ -57,6 +57,13 @@
 		pinctrl-names = "default";
 	};
 
+	sound {
+		compatible = "google,snow-audio-max98091";
+
+		samsung,i2s-controller = <&i2s0>;
+		samsung,audio-codec = <&max98091>;
+	};
+
 	usb300_vbus_reg: regulator-usb300 {
 		compatible = "regulator-fixed";
 		regulator-name = "P5.0V_USB3CON0";
@@ -81,6 +88,13 @@
 };
 
 &pinctrl_0 {
+	max98091_irq: max98091-irq {
+		samsung,pins = "gpx0-2";
+		samsung,pin-function = <0>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
 	tpm_irq: tpm-irq {
 		samsung,pins = "gpx1-0";
 		samsung,pin-function = <0>;
@@ -207,6 +221,19 @@
 	samsung,invert-vclk;
 };
 
+&hsi2c_7 {
+	status = "okay";
+
+	max98091: codec@10 {
+		compatible = "maxim,max98091";
+		reg = <0x10>;
+		interrupts = <2 0>;
+		interrupt-parent = <&gpx0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&max98091_irq>;
+	};
+};
+
 &hsi2c_9 {
 	status = "okay";
 	clock-frequency = <400000>;
@@ -251,3 +278,7 @@
 &watchdog {
 	timeout-sec = <32>;
 };
+
+&i2s0 {
+	status = "okay";
+};
Signature · 1 line
1.7.9.5
Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] ARM: dts: Enable audio support for Peach-pi board

Tushar,

Quoted 9 lines · Tushar Behera

Peach-pi board has MAX98091 audio codec connected on HSI2C-7 bus.

---
Changes for v2:
* Replaced max98090 with max98091.

 arch/arm/boot/dts/exynos5800-peach-pi.dts |   31 +++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
#3 lore raw

PATCH v2 2/2 ARM: dts: Sort nodes within Peach-pit/Peach-pi dts files

In reply to Tushar Behera

Peach-pit and Peach-pi boards are almost similar, hence the DTS file is also very similar. Sorting nodes in both these files will allow us to figure out the difference easily.

All the node aliases are sorted in alphabetically increasing order. There is no functional change with this patch.

---
 arch/arm/boot/dts/exynos5420-peach-pit.dts |  236 ++++++++++++++--------------
 arch/arm/boot/dts/exynos5800-peach-pi.dts  |  225 +++++++++++++-------------
 2 files changed, 233 insertions(+), 228 deletions(-)
arch/arm/boot/dts/exynos5420-peach-pit.dts +119 -117
index 1c5b8f9..7649982 100644
@@ -25,8 +25,13 @@
 		"google,pit", "google,peach","samsung,exynos5420",
 		"samsung,exynos5";
 
-	memory {
-		reg = <0x20000000 0x80000000>;
+	backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm 0 1000000 0>;
+		brightness-levels = <0 100 500 1000 1500 2000 2500 2800>;
+		default-brightness-level = <7>;
+		pinctrl-0 = <&pwm0_out>;
+		pinctrl-names = "default";
 	};
 
 	fixed-rate-clocks {
@@ -50,13 +55,8 @@
 		};
 	};
 
-	backlight {
-		compatible = "pwm-backlight";
-		pwms = <&pwm 0 1000000 0>;
-		brightness-levels = <0 100 500 1000 1500 2000 2500 2800>;
-		default-brightness-level = <7>;
-		pinctrl-0 = <&pwm0_out>;
-		pinctrl-names = "default";
+	memory {
+		reg = <0x20000000 0x80000000>;
 	};
 
 	sound {
@@ -89,64 +89,83 @@
 	};
 };
 
-&pinctrl_0 {
-	max98090_irq: max98090-irq {
-		samsung,pins = "gpx0-2";
-		samsung,pin-function = <0>;
-		samsung,pin-pud = <0>;
-		samsung,pin-drv = <0>;
-	};
+&dp {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&dp_hpd_gpio>;
+	samsung,color-space = <0>;
+	samsung,dynamic-range = <0>;
+	samsung,ycbcr-coeff = <0>;
+	samsung,color-depth = <1>;
+	samsung,link-rate = <0x06>;
+	samsung,lane-count = <2>;
+	samsung,hpd-gpio = <&gpx2 6 0>;
 
-	tpm_irq: tpm-irq {
-		samsung,pins = "gpx1-0";
-		samsung,pin-function = <0>;
-		samsung,pin-pud = <0>;
-		samsung,pin-drv = <0>;
-	};
+	display-timings {
+		native-mode = <&timing1>;
 
-	power_key_irq: power-key-irq {
-		samsung,pins = "gpx1-2";
-		samsung,pin-function = <0>;
-		samsung,pin-pud = <0>;
-		samsung,pin-drv = <0>;
+		timing1: timing@1 {
+			clock-frequency = <70589280>;
+			hactive = <1366>;
+			vactive = <768>;
+			hfront-porch = <40>;
+			hback-porch = <40>;
+			hsync-len = <32>;
+			vback-porch = <10>;
+			vfront-porch = <12>;
+			vsync-len = <6>;
+		};
 	};
+};
 
-	hdmi_hpd_irq: hdmi-hpd-irq {
-		samsung,pins = "gpx3-7";
-		samsung,pin-function = <0>;
-		samsung,pin-pud = <1>;
-		samsung,pin-drv = <0>;
-	};
+&fimd {
+	status = "okay";
+	samsung,invert-vclk;
+};
 
-	dp_hpd_gpio: dp_hpd_gpio {
-		samsung,pins = "gpx2-6";
-		samsung,pin-function = <0>;
-		samsung,pin-pud = <3>;
-		samsung,pin-drv = <0>;
-	};
+&hdmi {
+	status = "okay";
+	hpd-gpio = <&gpx3 7 GPIO_ACTIVE_HIGH>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&hdmi_hpd_irq>;
+	ddc = <&i2c_2>;
 };
 
-&pinctrl_3 {
-	usb300_vbus_en: usb300-vbus-en {
-		samsung,pins = "gph0-0";
-		samsung,pin-function = <1>;
-		samsung,pin-pud = <0>;
-		samsung,pin-drv = <0>;
+&hsi2c_7 {
+	status = "okay";
+
+	max98090: codec@10 {
+		compatible = "maxim,max98090";
+		reg = <0x10>;
+		interrupts = <2 0>;
+		interrupt-parent = <&gpx0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&max98090_irq>;
 	};
+};
 
-	usb301_vbus_en: usb301-vbus-en {
-		samsung,pins = "gph0-1";
-		samsung,pin-function = <1>;
-		samsung,pin-pud = <0>;
-		samsung,pin-drv = <0>;
+&hsi2c_9 {
+	status = "okay";
+	clock-frequency = <400000>;
+
+	tpm@20 {
+		compatible = "infineon,slb9645tt";
+		reg = <0x20>;
+
+		/* Unused irq; but still need to configure the pins */
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpm_irq>;
 	};
 };
 
-&rtc {
+&i2c_2 {
 	status = "okay";
+	samsung,i2c-sda-delay = <100>;
+	samsung,i2c-max-bus-freq = <66000>;
+	samsung,i2c-slave-addr = <0x50>;
 };
 
-&uart_3 {
+&i2s0 {
 	status = "okay";
 };
 
@@ -189,46 +208,66 @@
 	};
 };
 
-&hsi2c_7 {
-	status = "okay";
 
-	max98090: codec@10 {
-		compatible = "maxim,max98090";
-		reg = <0x10>;
-		interrupts = <2 0>;
-		interrupt-parent = <&gpx0>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&max98090_irq>;
+&pinctrl_0 {
+	max98090_irq: max98090-irq {
+		samsung,pins = "gpx0-2";
+		samsung,pin-function = <0>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
 	};
-};
 
-&hsi2c_9 {
-	status = "okay";
-	clock-frequency = <400000>;
+	tpm_irq: tpm-irq {
+		samsung,pins = "gpx1-0";
+		samsung,pin-function = <0>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
 
-	tpm@20 {
-		compatible = "infineon,slb9645tt";
-		reg = <0x20>;
+	power_key_irq: power-key-irq {
+		samsung,pins = "gpx1-2";
+		samsung,pin-function = <0>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
 
-		/* Unused irq; but still need to configure the pins */
-		pinctrl-names = "default";
-		pinctrl-0 = <&tpm_irq>;
+	dp_hpd_gpio: dp_hpd_gpio {
+		samsung,pins = "gpx2-6";
+		samsung,pin-function = <0>;
+		samsung,pin-pud = <3>;
+		samsung,pin-drv = <0>;
+	};
+
+	hdmi_hpd_irq: hdmi-hpd-irq {
+		samsung,pins = "gpx3-7";
+		samsung,pin-function = <0>;
+		samsung,pin-pud = <1>;
+		samsung,pin-drv = <0>;
 	};
 };
 
-&i2c_2	{
+&pinctrl_3 {
+	usb300_vbus_en: usb300-vbus-en {
+		samsung,pins = "gph0-0";
+		samsung,pin-function = <1>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	usb301_vbus_en: usb301-vbus-en {
+		samsung,pins = "gph0-1";
+		samsung,pin-function = <1>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+};
+
+&rtc {
 	status = "okay";
-	samsung,i2c-sda-delay = <100>;
-	samsung,i2c-max-bus-freq = <66000>;
-	samsung,i2c-slave-addr = <0x50>;
 };
 
-&hdmi {
+&uart_3 {
 	status = "okay";
-	hpd-gpio = <&gpx3 7 GPIO_ACTIVE_HIGH>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&hdmi_hpd_irq>;
-	ddc = <&i2c_2>;
 };
 
 &usbdrd_phy0 {
@@ -248,40 +287,3 @@
 	timeout-sec = <32>;
 };
 
-&i2s0 {
-	status = "okay";
-};
-
-&fimd {
-	status = "okay";
-	samsung,invert-vclk;
-};
-
-&dp {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&dp_hpd_gpio>;
-	samsung,color-space = <0>;
-	samsung,dynamic-range = <0>;
-	samsung,ycbcr-coeff = <0>;
-	samsung,color-depth = <1>;
-	samsung,link-rate = <0x06>;
-	samsung,lane-count = <2>;
-	samsung,hpd-gpio = <&gpx2 6 0>;
-
-	display-timings {
-		native-mode = <&timing1>;
-
-		timing1: timing@1 {
-			clock-frequency = <70589280>;
-			hactive = <1366>;
-			vactive = <768>;
-			hfront-porch = <40>;
-			hback-porch = <40>;
-			hsync-len = <32>;
-			vback-porch = <10>;
-			vfront-porch = <12>;
-			vsync-len = <6>;
-		};
-	};
-};
arch/arm/boot/dts/exynos5800-peach-pi.dts +114 -111

284 lines not on this page · raw message

Signature · 1 line
1.7.9.5
Reviewed-by on v2 2/2
#4 lore raw

Re: [PATCH 2/2] ARM: dts: Sort nodes within Peach-pit/Peach-pi dts files

Tushar / Kukjin,

Quoted 4 lines · Tushar Behera

Peach-pit and Peach-pi boards are almost similar, hence the DTS file is also very similar. Sorting nodes in both these files will allow us to figure out the difference easily.

Quoted 8 lines

All the node aliases are sorted in alphabetically increasing order. There is no functional change with this patch.

---
 arch/arm/boot/dts/exynos5420-peach-pit.dts |  236 ++++++++++++++--------------
 arch/arm/boot/dts/exynos5800-peach-pi.dts  |  225 +++++++++++++-------------
 2 files changed, 233 insertions(+), 228 deletions(-)

Thanks, this looks much better. I tried against next-20140620 and it applied cleanly, gave a good diff between pit and pi, and looked sane.

This is gonna be a pain in the butt if Kukjin doesn't apply it ASAP. It will conflict with every single other dts patch to pi.

-Doug

#5 lore raw

Re: [PATCH 2/2] ARM: dts: Sort nodes within Peach-pit/Peach-pi dts files

Quoted 16 lines · Doug Anderson

Tushar / Kukjin,

Quoted 4 lines · Tushar Behera

Peach-pit and Peach-pi boards are almost similar, hence the DTS file is also very similar. Sorting nodes in both these files will allow us to figure out the difference easily.

Quoted 8 lines

All the node aliases are sorted in alphabetically increasing order. There is no functional change with this patch.

---
  arch/arm/boot/dts/exynos5420-peach-pit.dts |  236 ++++++++++++++--------------
  arch/arm/boot/dts/exynos5800-peach-pi.dts  |  225 +++++++++++++-------------
  2 files changed, 233 insertions(+), 228 deletions(-)
Quoted 6 lines

Thanks, this looks much better. I tried against next-20140620 and it applied cleanly, gave a good diff between pit and pi, and looked sane.

This is gonna be a pain in the butt if Kukjin doesn't apply it ASAP. It will conflict with every single other dts patch to pi.

So I've applied both in my tree just now ;-)

Quoted 1 line

Thanks for your review.

- Kukjin