Merge tag 'u-boot-rockchip-20200501' of https://gitlab.denx.de/u-boot/custodians...
[platform/kernel/u-boot.git] / arch / arm / dts / sun5i-r8-chip.dts
index 6ad19e2..879a4b0 100644 (file)
 
 / {
        model = "NextThing C.H.I.P.";
-       compatible = "nextthing,chip", "allwinner,sun5i-r8";
+       compatible = "nextthing,chip", "allwinner,sun5i-r8", "allwinner,sun5i-a13";
 
        aliases {
                i2c0 = &i2c0;
+               i2c1 = &i2c1;
                i2c2 = &i2c2;
                serial0 = &uart1;
                serial1 = &uart3;
+               spi0 = &spi2;
        };
 
        chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       wifi_reg_on: wifi_reg_on {
-               compatible = "regulator-fixed";
+       leds {
+               compatible = "gpio-leds";
+
+               status {
+                       label = "chip:white:status";
+                       gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       mmc0_pwrseq: mmc0_pwrseq {
+               compatible = "mmc-pwrseq-simple";
                pinctrl-names = "default";
                pinctrl-0 = <&chip_wifi_reg_on_pin>;
+               reset-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */
+       };
 
-               regulator-name = "wifi-reg-on";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */
-               enable-active-high;
+       onewire {
+               compatible = "w1-gpio";
+               gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
+               pinctrl-names = "default";
+               pinctrl-0 = <&chip_w1_pin>;
        };
 };
 
+&be0 {
+       status = "okay";
+};
+
 &codec {
        status = "okay";
 };
 
 #include "axp209.dtsi"
 
+&ac_power_supply {
+       status = "okay";
+};
+
+&battery_power_supply {
+       status = "okay";
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "disabled";
+};
+
 &i2c2 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
 };
 
 &mmc0_pins_a {
-       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       bias-pull-up;
 };
 
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>;
-       vmmc-supply = <&wifi_reg_on>;
+       vmmc-supply = <&reg_vcc3v3>;
+       mmc-pwrseq = <&mmc0_pwrseq>;
        bus-width = <4>;
        non-removable;
        status = "okay";
 
 &pio {
        chip_vbus_pin: chip_vbus_pin@0 {
-               allwinner,pins = "PB10";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+               pins = "PB10";
+               function = "gpio_out";
        };
 
        chip_wifi_reg_on_pin: chip_wifi_reg_on_pin@0 {
-               allwinner,pins = "PC19";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+               pins = "PC19";
+               function = "gpio_out";
        };
 
        chip_id_det_pin: chip_id_det_pin@0 {
-               allwinner,pins = "PG2";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+               pins = "PG2";
+               function = "gpio_in";
+       };
+
+       chip_w1_pin: chip_w1_pin@0 {
+               pins = "PD2";
+               function = "gpio_in";
+               bias-pull-up;
        };
 };
 
        regulator-always-on;
 };
 
+/*
+ * Both LDO3 and LDO4 are used in parallel to power up the WiFi/BT
+ * Chip.
+ *
+ * If those are not enabled, the SDIO part will not enumerate, and
+ * since there's no way currently to pass DT infos to an SDIO device,
+ * we cannot really do better than this ugly hack for now.
+ */
 &reg_ldo3 {
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
-       regulator-name = "vdd-wifi1";
+       regulator-name = "vcc-wifi-1";
        regulator-always-on;
 };
 
 &reg_ldo4 {
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
-       regulator-name = "vdd-wifi2";
+       regulator-name = "vcc-wifi-2";
        regulator-always-on;
 };
 
        status = "okay";
 };
 
+&spi2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi2_pins_a>;
+       status = "disabled";
+};
+
+&tcon0 {
+       status = "okay";
+};
+
+&tve0 {
+       status = "okay";
+};
+
 &uart1 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart1_pins_b>;
 &uart3 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart3_pins_a>,
-                   <&uart3_pins_cts_rts_a>;
+                   <&uart3_cts_rts_pins_a>;
        status = "okay";
 };