Skip to contentSkip to conversation

ARM: sunxi: Add fixed 3V regulator

PATCH New Maxime Ripard 2 participants 3 messages May 20, 2014

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

PATCH 1/2 ARM: sunxi: Add fixed 3V regulator

A few boards we've seen have a fixed 3V regulator. Add this one on the common DTSI.

---
 arch/arm/boot/dts/sunxi-common-regulators.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/sunxi-common-regulators.dtsi +7 -0
index 026bd83f078f..3d021efd1a38 100644
@@ -73,6 +73,13 @@
 		status = "disabled";
 	};
 
+	reg_vcc3v0: vcc3v0 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc3v0";
+		regulator-min-microvolt = <3000000>;
+		regulator-max-microvolt = <3000000>;
+	};
+
 	reg_vcc3v3: vcc3v3 {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc3v3";
Signature · 1 line
1.9.3
#1 lore raw

PATCH 2/2 ARM: sun6i: Add MMC0 controller to the Colombus board

The Colombus has a full size SD slot wired to the MMC0 controller. In order to work, the MMC lines have to have the pull-ups enabled though.

---
 arch/arm/boot/dts/sun6i-a31-colombus.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm/boot/dts/sun6i-a31-colombus.dts +27 -0
index 3898a7bce831..e2cf2f3646bf 100644
@@ -13,6 +13,7 @@
 
 /dts-v1/;
 /include/ "sun6i-a31.dtsi"
+/include/ "sunxi-common-regulators.dtsi"
 
 / {
 	model = "WITS A31 Colombus Evaluation Board";
@@ -23,6 +24,32 @@
 	};
 
 	soc at 01c00000 {
+		mmc0: mmc at 01c0f000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins_colombus>, <&mmc0_cd_pin_colombus>;
+			vmmc-supply = <&reg_vcc3v0>;
+			bus-width = <4>;
+			cd-gpios = <&pio 0 8 0>; /* PA8 */
+			cd-inverted;
+			status = "okay";
+		};
+
+		pio: pinctrl at 01c20800 {
+			mmc0_pins_colombus: mmc0 at 0 {
+				allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
+				allwinner,function = "mmc0";
+				allwinner,drive = <2>;
+				allwinner,pull = <1>;
+			};
+
+			mmc0_cd_pin_colombus: mmc0_cd_pin at 0 {
+				allwinner,pins = "PA8";
+				allwinner,function = "gpio_in";
+				allwinner,drive = <0>;
+				allwinner,pull = <1>;
+			};
+		};
+
 		uart0: serial at 01c28000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&uart0_pins_a>;
Signature · 1 line
1.9.3
#2 lore raw

PATCH 2/2 ARM: sun6i: Add MMC0 controller to the Colombus board

Hi,

Quoted 31 lines · Maxime Ripard

The Colombus has a full size SD slot wired to the MMC0 controller. In order to work, the MMC lines have to have the pull-ups enabled though.

---
  arch/arm/boot/dts/sun6i-a31-colombus.dts | 27 +++++++++++++++++++++++++++
  1 file changed, 27 insertions(+)
arch/arm/boot/dts/sun6i-a31-colombus.dts +8 -0
index 3898a7bce831..e2cf2f3646bf 100644
@@ -13,6 +13,7 @@
 
  /dts-v1/;
  /include/ "sun6i-a31.dtsi"
+/include/ "sunxi-common-regulators.dtsi"
 
  / {
  	model = "WITS A31 Colombus Evaluation Board";
@@ -23,6 +24,32 @@
  	};
 
  	soc at 01c00000 {
+		mmc0: mmc at 01c0f000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins_colombus>, <&mmc0_cd_pin_colombus>;
+			vmmc-supply = <&reg_vcc3v0>;
+			bus-width = <4>;
+			cd-gpios = <&pio 0 8 0>; /* PA8 */
+			cd-inverted;

arch/arm/boot/dts/sun6i-a31-colombus.dts line 43

Quoted 10 lines
arch/arm/boot/dts/sun6i-a31-colombus.dts +10 -0
+			status = "okay";
+		};
+
+		pio: pinctrl at 01c20800 {
+			mmc0_pins_colombus: mmc0 at 0 {
+				allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
+				allwinner,function = "mmc0";
+				allwinner,drive = <2>;
+				allwinner,pull = <1>;
+			};

You could just use mmc0_pins_a here and only set allwinner,pull.

Other then that both patches are:

Regards,

Hans