Skip to contentSkip to conversation

ARM: dts: Put Arndale fixed voltage regulators on a simple-bus

PATCH New Mark Brown 5 participants 10 messages Jul 1, 2013 – Jul 24, 2013

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/3 ARM: dts: Put Arndale fixed voltage regulators on a simple-bus

From: Mark Brown <[email protected]>

Fixed voltage regulators (and other similar free standing things) are supposed to go on a simple-bus for DT correctness reasons.

---
 arch/arm/boot/dts/exynos5250-arndale.dts | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)
arch/arm/boot/dts/exynos5250-arndale.dts +17 -11
index abc7272..68a13a6 100644
@@ -429,18 +429,24 @@
 		vdd-supply = <&ldo8_reg>;
 	};
 
-	mmc_reg: voltage-regulator {
-		compatible = "regulator-fixed";
-		regulator-name = "VDD_33ON_2.8V";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-		gpio = <&gpx1 1 1>;
-		enable-active-high;
-	};
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		mmc_reg: voltage-regulator {
+			compatible = "regulator-fixed";
+			regulator-name = "VDD_33ON_2.8V";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpx1 1 1>;
+			enable-active-high;
+		};
 
-	reg_hdmi_en: fixedregulator at 0 {
-		compatible = "regulator-fixed";
-		regulator-name = "hdmi-en";
+		reg_hdmi_en: fixedregulator at 0 {
+			compatible = "regulator-fixed";
+			regulator-name = "hdmi-en";
+		};
 	};
 
 	fixed-rate-clocks {
Signature · 1 line
1.8.3.1
author
#1 lore raw

PATCH 2/3 ARM: dts: Hook up supplies for Arndale S5M8767

From: Mark Brown <[email protected]>

As part of this add nodes for the main wall supply as well as bucks 7 and 8 which are used to drop that down for several of the LDOs.

---
 arch/arm/boot/dts/exynos5250-arndale.dts | 35 ++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
arch/arm/boot/dts/exynos5250-arndale.dts +35 -0
index 68a13a6..482f275 100644
@@ -38,6 +38,26 @@
 			compatible = "samsung,s5m8767-pmic";
 			reg = <0x66>;
 
+			vinb1-supply = <&main_dc_reg>;
+			vinb2-supply = <&main_dc_reg>;
+			vinb3-supply = <&main_dc_reg>;
+			vinb4-supply = <&main_dc_reg>;
+			vinb5-supply = <&main_dc_reg>;
+			vinb6-supply = <&main_dc_reg>;
+			vinb7-supply = <&main_dc_reg>;
+			vinb8-supply = <&main_dc_reg>;
+			vinb9-supply = <&main_dc_reg>;
+
+			vinl1-supply = <&buck7_reg>;
+			vinl2-supply = <&buck7_reg>;
+			vinl3-supply = <&buck7_reg>;
+			vinl4-supply = <&main_dc_reg>;
+			vinl5-supply = <&main_dc_reg>;
+			vinl6-supply = <&main_dc_reg>;
+			vinl7-supply = <&main_dc_reg>;
+			vinl8-supply = <&buck8_reg>;
+			vinl9-supply = <&buck8_reg>;
+
 			s5m8767,pmic-buck2-dvs-voltage = <1300000>;
 			s5m8767,pmic-buck3-dvs-voltage = <1100000>;
 			s5m8767,pmic-buck4-dvs-voltage = <1200000>;
@@ -276,6 +296,16 @@
 					op_mode = <1>;
 				};
 
+				buck7_reg: BUCK7 {
+					regulator-name = "PVDD_BUCK7";
+					regulator-always-on;
+				};
+
+				buck8_reg: BUCK8 {
+					regulator-name = "PVDD_BUCK8";
+					regulator-always-on;
+				};
+
 				buck9_reg: BUCK9 {
 					regulator-name = "VDD_33_OFF_EXT1";
 					regulator-min-microvolt = <750000>;
@@ -434,6 +464,11 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		main_dc_reg: fixedregulator at 1 {
+			compatible = "regulator-fixed";
+			regulator-name = "MAIN_DC";
+		};
+
 		mmc_reg: voltage-regulator {
 			compatible = "regulator-fixed";
 			regulator-name = "VDD_33ON_2.8V";
Signature · 1 line
1.8.3.1
author
#2 lore raw

PATCH 3/3 ARM: dts: Add WM1811A audio CODEC to Arndale bindings

In reply to Mark Brown

From: Mark Brown <[email protected]>

The default audio module for the Arndale has a WM811A on it. Add this to the device tree bindings.

---
 arch/arm/boot/dts/exynos5250-arndale.dts | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
arch/arm/boot/dts/exynos5250-arndale.dts +16 -1
index 482f275..75c3065 100644
@@ -325,7 +325,22 @@
 	};
 
 	i2c at 12C90000 {
-		status = "disabled";
+		wm1811a at 11 {
+			compatible = "wlf,wm1811";
+			reg = <0x1a>;
+
+			AVDD2-supply = <&main_dc_reg>;
+			CPVDD-supply = <&main_dc_reg>;
+			DBVDD1-supply = <&main_dc_reg>;
+			DBVDD2-supply = <&main_dc_reg>;
+			DBVDD3-supply = <&main_dc_reg>;
+			LDO1VDD-supply = <&main_dc_reg>;
+			SPKVDD1-supply = <&main_dc_reg>;
+			SPKVDD2-supply = <&main_dc_reg>;
+
+			wlf,ldo1ena = <&gpb0 0 0>;
+			wlf,ldo2ena = <&gpb0 1 0>;
+		};
 	};
 
 	i2c at 12CA0000 {
Signature · 1 line
1.8.3.1
#3 lore raw

PATCH 3/3 ARM: dts: Add WM1811A audio CODEC to Arndale bindings

arch/arm/boot/dts/exynos5250-arndale.dts line 330

Quoted 5 lines · Mark Brown
        i2c at 12C90000 {
arch/arm/boot/dts/exynos5250-arndale.dts +3 -1
-               status = "disabled";
+               wm1811a at 11 {
+                       compatible = "wlf,wm1811";
+                       reg = <0x1a>;

Shouldn't it be reg = <0x11> ? Or wm1811a at 1a ?

author
#4 lore raw

PATCH 3/3 ARM: dts: Add WM1811A audio CODEC to Arndale bindings

Quoted 9 lines · Fabio Estevam

arch/arm/boot/dts/exynos5250-arndale.dts line 330

Quoted 5 lines · Mark Brown
        i2c at 12C90000 {
arch/arm/boot/dts/exynos5250-arndale.dts +3 -1
-               status = "disabled";
+               wm1811a at 11 {
+                       compatible = "wlf,wm1811";
+                       reg = <0x1a>;

Shouldn't it be reg = <0x11> ? Or wm1811a at 1a ?

The @ should change. Though since it's one of the bits of ornamental
noise DT has rules for :/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130701/08101330/attachment.sig>

#5 lore raw

PATCH 3/3 ARM: dts: Add WM1811A audio CODEC to Arndale bindings

In reply to Mark Brown
Quoted 3 lines · Mark Brown

From: Mark Brown <[email protected]>

The default audio module for the Arndale has a WM811A on it. Add this to

typo: WM1811A

Arndale board also comes with two other audio codec boards - ALC5631Q and AK4678. Different audio codec boards came with different shipments.

Quoted 36 lines

the device tree bindings.

---
 arch/arm/boot/dts/exynos5250-arndale.dts | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
arch/arm/boot/dts/exynos5250-arndale.dts +16 -1
index 482f275..75c3065 100644
@@ -325,7 +325,22 @@
 	};
 
 	i2c at 12C90000 {
-		status = "disabled";
+		wm1811a at 11 {
+			compatible = "wlf,wm1811";
+			reg = <0x1a>;
+
+			AVDD2-supply = <&main_dc_reg>;
+			CPVDD-supply = <&main_dc_reg>;
+			DBVDD1-supply = <&main_dc_reg>;
+			DBVDD2-supply = <&main_dc_reg>;
+			DBVDD3-supply = <&main_dc_reg>;
+			LDO1VDD-supply = <&main_dc_reg>;
+			SPKVDD1-supply = <&main_dc_reg>;
+			SPKVDD2-supply = <&main_dc_reg>;
+
+			wlf,ldo1ena = <&gpb0 0 0>;
+			wlf,ldo2ena = <&gpb0 1 0>;
+		};
 	};
 
 	i2c at 12CA0000 {
Signature · 1 line
Tushar Behera
author
#6 lore raw

PATCH 3/3 ARM: dts: Add WM1811A audio CODEC to Arndale bindings

Quoted 2 lines · Tushar Behera

Arndale board also comes with two other audio codec boards - ALC5631Q and AK4678. Different audio codec boards came with different shipments.

This is the default though and since they didn't bother providing any
way of identifying the modules we just have to put them all in the
device tree and hope that the individual CODEC drivers can do runtime
identification (the WM1811A can but I don't know about the other two,
nobody supported them upstream).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130702/4a28b8a7/attachment-0001.sig>

#7 lore raw

PATCH 3/3 ARM: dts: Add WM1811A audio CODEC to Arndale bindings

Quoted 11 lines · Mark Brown
Quoted 2 lines · Tushar Behera

Arndale board also comes with two other audio codec boards - ALC5631Q and AK4678. Different audio codec boards came with different shipments.

This is the default though and since they didn't bother providing any way of identifying the modules we just have to put them all in the device tree and hope that the individual CODEC drivers can do runtime identification (the WM1811A can but I don't know about the other two, nobody supported them upstream).

Basically, I agree with Mark Brown's opinion, at this moment would be better if upstreamed WM1811A could be supported on Arndale and if further supporting of two codecs is required, we could discuss again next time. And they should be identified in the kernel at runtime.

- Kukjin

#8 lore raw

PATCH 1/3 ARM: dts: Put Arndale fixed voltage regulators on a simple-bus

In reply to Mark Brown

Hi Mark,

Quoted 22 lines · On Monday 01 of July 2013 22:36:37 Mark Brown wrote:

From: Mark Brown <[email protected]>

Fixed voltage regulators (and other similar free standing things) are supposed to go on a simple-bus for DT correctness reasons.

---
 arch/arm/boot/dts/exynos5250-arndale.dts | 28

+++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)

(quoted diff) +0 -0

b/arch/arm/boot/dts/exynos5250-arndale.dts index abc7272..68a13a6 100644

arch/arm/boot/dts/exynos5250-arndale.dts +0 -2
@@ -429,18 +429,24 @@
 		vdd-supply = <&ldo8_reg>;
 	};
 
-	mmc_reg: voltage-regulator {
-		compatible = "regulator-fixed";

arch/arm/boot/dts/exynos5250-arndale.dts line 435

Quoted 10 lines
arch/arm/boot/dts/exynos5250-arndale.dts +4 -6
-		regulator-name = "VDD_33ON_2.8V";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-		gpio = <&gpx1 1 1>;
-		enable-active-high;
-	};
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;

Are the two #properties above really necessary? The regulators that will be placed here probably don't need any kind of addressing, so it should be possible to omit them.

arch/arm/boot/dts/exynos5250-arndale.dts line 437

Quoted 2 lines
arch/arm/boot/dts/exynos5250-arndale.dts +2 -0
+
+		mmc_reg: voltage-regulator {

I'd suggest suffixing name of this node with an index, like voltage- regulator-0 to be more future proof, in case of further fixed regulators being added.

arch/arm/boot/dts/exynos5250-arndale.dts line 446

Quoted 12 lines
arch/arm/boot/dts/exynos5250-arndale.dts +8 -3
+			compatible = "regulator-fixed";
+			regulator-name = "VDD_33ON_2.8V";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpx1 1 1>;
+			enable-active-high;
+		};
 
-	reg_hdmi_en: fixedregulator at 0 {
-		compatible = "regulator-fixed";
-		regulator-name = "hdmi-en";
+		reg_hdmi_en: fixedregulator at 0 {

And here I'd use the same convention of suffixes, renaming the node to voltage-regulator-1 for the sake of consistency.

Best regards,
Tomasz

Quoted 6 lines
arch/arm/boot/dts/exynos5250-arndale.dts +3 -0
+			compatible = "regulator-fixed";
+			regulator-name = "hdmi-en";
+		};
 	};
 
 	fixed-rate-clocks {
author
#9 lore raw

PATCH 1/3 ARM: dts: Put Arndale fixed voltage regulators on a simple-bus

Quoted 10 lines · Tomasz Figa

arch/arm/boot/dts/exynos5250-arndale.dts line 435

Quoted 4 lines · On Monday 01 of July 2013 22:36:37 Mark Brown wrote:
arch/arm/boot/dts/exynos5250-arndale.dts +4 -0
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;

Are the two #properties above really necessary? The regulators that will be placed here probably don't need any kind of addressing, so it should be possible to omit them.

I believe they're required boilerplate for a correct DT bus.

Quoted 6 lines

arch/arm/boot/dts/exynos5250-arndale.dts line 437

Quoted 2 lines
arch/arm/boot/dts/exynos5250-arndale.dts +2 -0
+
+		mmc_reg: voltage-regulator {

I'd suggest suffixing name of this node with an index, like voltage- regulator-0 to be more future proof, in case of further fixed regulators being added.

If you want to rename things that's a separate thing so should be a
separate patch - this patch is just about moving the existing devices
onto a bus.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130706/4f173dbe/attachment.sig>