Merge https://gitlab.denx.de/u-boot/custodians/u-boot-clk
[oweals/u-boot.git] / arch / arm / dts / sun5i-a13-utoo-p66.dts
index 8c1bca70390d76300727e78fa40e42701f6163e2..bfdd38d6bfccc6af92e7225d3713ca103243e53f 100644 (file)
 
 /dts-v1/;
 #include "sun5i-a13.dtsi"
-#include "sunxi-common-regulators.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "sun5i-reference-design-tablet.dtsi"
 #include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
        model = "Utoo P66";
        compatible = "utoo,p66", "allwinner,sun5i-a13";
 
+       /* The P66 uses the uart pins as gpios */
        aliases {
-               serial0 = &uart1;
+               /delete-property/serial0;
        };
 
        chosen {
-               stdout-path = "serial0:115200n8";
+               /delete-property/stdout-path;
        };
 
        i2c_lcd: i2c@0 {
        };
 };
 
-&cpu0 {
-       cpu-supply = <&reg_dcdc2>;
+&backlight {
+       /* Note levels of 10 / 20% result in backlight off */
+       brightness-levels = <0 30 40 50 60 70 80 90 100>;
+       default-brightness-level = <6>;
 };
 
-&ehci0 {
-       status = "okay";
-};
-
-&i2c0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c0_pins_a>;
-       status = "okay";
-
-       axp209: pmic@34 {
-               reg = <0x34>;
-               interrupts = <0>;
-       };
-};
-
-#include "axp209.dtsi"
-
-&i2c1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c1_pins_a>;
-       status = "okay";
-
-       icn8318: touchscreen@40 {
-               compatible = "chipone,icn8318";
-               reg = <0x40>;
-               interrupt-parent = <&pio>;
-               interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
-               pinctrl-names = "default";
-               pinctrl-0 = <&ts_wake_pin_p66>;
-               wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
-               touchscreen-size-x = <800>;
-               touchscreen-size-y = <480>;
-               touchscreen-inverted-x;
-               touchscreen-swapped-x-y;
-       };
-
-       pcf8563: rtc@51 {
-               compatible = "nxp,pcf8563";
-               reg = <0x51>;
-       };
-};
-
-&lradc {
-       vref-supply = <&reg_ldo2>;
-       status = "okay";
-
-       button@200 {
-               label = "Volume Up";
-               linux,code = <KEY_VOLUMEUP>;
-               channel = <0>;
-               voltage = <200000>;
-       };
-
-       button@400 {
-               label = "Volume Down";
-               linux,code = <KEY_VOLUMEDOWN>;
-               channel = <0>;
-               voltage = <400000>;
-       };
+&codec {
+       allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
 };
 
-&mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_p66>;
-       vmmc-supply = <&reg_vcc3v3>;
-       bus-width = <4>;
-       cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
-       cd-inverted;
-       status = "okay";
+&codec_pa_pin {
+       pins = "PG3";
 };
 
 &mmc2 {
 };
 
 &pio {
-       mmc0_cd_pin_p66: mmc0_cd_pin@0 {
-               allwinner,pins = "PG0";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-       };
-
        i2c_lcd_pins: i2c_lcd_pin@0 {
-               allwinner,pins = "PG10", "PG12";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-       };
-
-       ts_wake_pin_p66: ts_wake_pin@0 {
-               allwinner,pins = "PB3";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-       };
-
-       usb0_vbus_pin_a: usb0_vbus_pin@0 {
-               allwinner,pins = "PB4";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+               pins = "PG10", "PG12";
+               function = "gpio_out";
+               bias-pull-up;
        };
 };
 
-&reg_dcdc2 {
-       regulator-always-on;
-       regulator-min-microvolt = <1000000>;
-       regulator-max-microvolt = <1500000>;
-       regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc3 {
-       regulator-always-on;
-       regulator-min-microvolt = <1000000>;
-       regulator-max-microvolt = <1400000>;
-       regulator-name = "vdd-int-pll";
-};
-
-&reg_ldo1 {
-       regulator-name = "vdd-rtc";
-};
-
-&reg_ldo2 {
-       regulator-always-on;
-       regulator-min-microvolt = <3000000>;
-       regulator-max-microvolt = <3000000>;
-       regulator-name = "avcc";
-};
-
-&reg_ldo3 {
-       regulator-min-microvolt = <3300000>;
-       regulator-max-microvolt = <3300000>;
-       regulator-name = "vcc-wifi";
-};
-
 &reg_usb0_vbus {
        gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+};
+
+&touchscreen {
+       compatible = "chipone,icn8318";
+       reg = <0x40>;
+       /* The P66 uses a different EINT then the reference design */
+       interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
+       /* The icn8318 binding expects wake-gpios instead of power-gpios */
+       wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+       touchscreen-size-x = <800>;
+       touchscreen-size-y = <480>;
+       touchscreen-inverted-x;
+       touchscreen-swapped-x-y;
        status = "okay";
 };
 
 &uart1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart1_pins_b>;
-       status = "okay";
+       /* The P66 uses the uart pins as gpios */
+       status = "disabled";
 };
 
-&usbphy {
-       usb0_vbus-supply = <&reg_usb0_vbus>;
-       usb1_vbus-supply = <&reg_ldo3>;
-       status = "okay";
+&usb0_vbus_pin_a {
+       pins = "PB4";
 };