ARM: dts: rmobile: Add soc label to Gen3
[oweals/u-boot.git] / arch / arm / dts / sun6i-a31-m9.dts
index 6e0e5687a09c73a03a6512bf2bf7f8015c6b4b12..9698f6d38d030739d240b94198ddfc8c514748f0 100644 (file)
@@ -45,7 +45,6 @@
 #include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
        model = "Mele M9 top set box";
                pinctrl-0 = <&led_pins_m9>;
 
                blue {
-                       label = "m9:blue:usr";
+                       label = "m9:blue:pwr";
                        gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
                };
        };
 };
 
+&cpu0 {
+       cpu-supply = <&reg_dcdc3>;
+};
+
 &ehci0 {
        status = "okay";
 };
@@ -84,6 +88,7 @@
        pinctrl-0 = <&gmac_pins_mii_a>;
        phy = <&phy1>;
        phy-mode = "mii";
+       phy-supply = <&reg_dldo1>;
        status = "okay";
 
        phy1: ethernet-phy@1 {
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_m9>;
-       vmmc-supply = <&reg_vcc3v3>;
+       vmmc-supply = <&reg_dcdc1>;
        bus-width = <4>;
-       cd-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
-       cd-inverted;
+       cd-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
+       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";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+               pins = "PH13";
+               function = "gpio_out";
        };
 
        mmc0_cd_pin_m9: mmc0_cd_pin@0 {
-               allwinner,pins = "PH22";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+               pins = "PH22";
+               function = "gpio_in";
+               bias-pull-up;
        };
 
        usb1_vbus_pin_m9: usb1_vbus_pin@0 {
-               allwinner,pins = "PC27";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+               pins = "PC27";
+               function = "gpio_out";
        };
 };
 
+&reg_aldo1 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "avcc";
+};
+
+&reg_dc5ldo {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpus"; /* This is an educated guess */
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-3v3";
+};
+
+&reg_dcdc2 {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-gpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc4 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-sys-dll";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_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.
+ */
+&reg_dldo4 {
+       regulator-always-on;
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-usb-hub";
+};
+
 &reg_usb1_vbus {
        pinctrl-names = "default";
        pinctrl-0 = <&usb1_vbus_pin_m9>;
 
 &usbphy {
        usb1_vbus-supply = <&reg_usb1_vbus>;
+       usb2_vbus-supply = <&reg_aldo1>;
        status = "okay";
 };