From: Hans de Goede Date: Sun, 12 Jun 2016 11:07:01 +0000 (+0200) Subject: ARM: dts: sun6i: Add pmic / regulator nodes to Mele M9 dts X-Git-Tag: v4.8-rc1~66^2~10^2~16 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=11994511865823689c19560f035e462dda2cda96;p=linux.git ARM: dts: sun6i: Add pmic / regulator nodes to Mele M9 dts Add pmic / regulator nodes to Mele M9 dts. Note both reg_usb1_vbus and reg_dldo4 need to be on for the hub attached to usb1 to work, and we can list only one usb1_vbus-supply, so dldo4 is marked as regulator-always-on. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard --- diff --git a/arch/arm/boot/dts/sun6i-a31-m9.dts b/arch/arm/boot/dts/sun6i-a31-m9.dts index 66d29b866abe..29016a13a2c1 100644 --- a/arch/arm/boot/dts/sun6i-a31-m9.dts +++ b/arch/arm/boot/dts/sun6i-a31-m9.dts @@ -72,6 +72,10 @@ blue { }; }; +&cpu0 { + cpu-supply = <®_dcdc3>; +}; + &ehci0 { status = "okay"; }; @@ -85,6 +89,7 @@ &gmac { pinctrl-0 = <&gmac_pins_mii_a>; phy = <&phy1>; phy-mode = "mii"; + phy-supply = <®_dldo1>; status = "okay"; phy1: ethernet-phy@1 { @@ -101,13 +106,26 @@ &ir { &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_m9>; - vmmc-supply = <®_vcc3v3>; + vmmc-supply = <®_dcdc1>; bus-width = <4>; cd-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */ cd-inverted; status = "okay"; }; +&p2wi { + status = "okay"; + + axp22x: pmic@68 { + compatible = "x-powers,axp221"; + reg = <0x68>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +#include "axp22x.dtsi" + &pio { led_pins_m9: led_pins@0 { allwinner,pins = "PH13"; @@ -131,6 +149,78 @@ usb1_vbus_pin_m9: usb1_vbus_pin@0 { }; }; +®_aldo1 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-wifi"; +}; + +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "avcc"; +}; + +®_dc5ldo { + regulator-always-on; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-cpus"; /* This is an educated guess */ +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3"; +}; + +®_dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-gpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc4 { + regulator-always-on; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1320000>; + regulator-name = "vdd-sys-dll"; +}; + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; + +®_dldo1 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-ethernet-phy"; +}; + +/* + * Both reg_usb1_vbus and reg_dldo4 need to be on for the hub attached + * to usb1 to work, and we can list only one usb1_vbus-supply, so dldo4 is + * marked as regulator-always-on. + */ +®_dldo4 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-usb-hub"; +}; + ®_usb1_vbus { pinctrl-names = "default"; pinctrl-0 = <&usb1_vbus_pin_m9>; @@ -146,5 +236,6 @@ &uart0 { &usbphy { usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_aldo1>; status = "okay"; };