]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: dts: update devicetree files from Linux-v6.8-rc1
authorAndre Przywara <andre.przywara@arm.com>
Sun, 21 Jan 2024 00:06:00 +0000 (00:06 +0000)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 29 Jan 2024 14:30:59 +0000 (14:30 +0000)
Sync the devicetree files from the official Linux kernel tree, v6.8-rc1.
This time only small changes in the existing files, but five new boards
got added, which opens the door for their respective defconfig files.

As before, this omits the non-backwards compatible changes to the R_INTC
controller, to remain compatible with older kernels.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/dts/sun50i-h616-bigtreetech-cb1-manta.dts [new file with mode: 0644]
arch/arm/dts/sun50i-h616-bigtreetech-cb1.dtsi [new file with mode: 0644]
arch/arm/dts/sun50i-h616-bigtreetech-pi.dts [new file with mode: 0644]
arch/arm/dts/sun50i-h616.dtsi
arch/arm/dts/sun50i-h618-orangepi-zero2w.dts [new file with mode: 0644]
arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts [new file with mode: 0644]
arch/arm/dts/sun8i-r40.dtsi
arch/arm/dts/sun8i-v3s-anbernic-rg-nano.dts [new file with mode: 0644]
arch/arm/dts/sun8i-v3s.dtsi

diff --git a/arch/arm/dts/sun50i-h616-bigtreetech-cb1-manta.dts b/arch/arm/dts/sun50i-h616-bigtreetech-cb1-manta.dts
new file mode 100644 (file)
index 0000000..dbce61b
--- /dev/null
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (C) 2023 Martin Botka <martin.botka@somainline.org>.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616-bigtreetech-cb1.dtsi"
+
+/ {
+       model = "BigTreeTech CB1";
+       compatible = "bigtreetech,cb1-manta", "bigtreetech,cb1", "allwinner,sun50i-h616";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_ph_pins>;
+       status = "okay";
+};
diff --git a/arch/arm/dts/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm/dts/sun50i-h616-bigtreetech-cb1.dtsi
new file mode 100644 (file)
index 0000000..1fed2b4
--- /dev/null
@@ -0,0 +1,138 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (C) 2023 Martin Botka <martin.botka@somainline.org>.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+       aliases {
+               ethernet0 = &rtl8189ftv;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led-0 {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+               };
+       };
+
+       reg_vcc5v: regulator-vcc5v {
+               /* board wide 5V supply from carrier boards */
+               compatible = "regulator-fixed";
+               regulator-name = "vcc-5v";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+       };
+
+       reg_vcc33_wifi: vcc33-wifi {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc33-wifi";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+               vin-supply = <&reg_vcc5v>;
+       };
+
+       reg_vcc_wifi_io: vcc-wifi-io {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc-wifi-io";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+               vin-supply = <&reg_vcc33_wifi>;
+       };
+
+       wifi_pwrseq: wifi-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&rtc 1>;
+               clock-names = "ext_clock";
+               reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
+               post-power-on-delay-ms = <200>;
+       };
+};
+
+&mmc0 {
+       vmmc-supply = <&reg_dldo1>;
+       /* Card detection pin is not connected */
+       broken-cd;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&mmc1 {
+       vmmc-supply = <&reg_vcc33_wifi>;
+       vqmmc-supply = <&reg_vcc_wifi_io>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       mmc-ddr-1_8v;
+       status = "okay";
+
+       rtl8189ftv: wifi@1 {
+               reg = <1>;
+       };
+};
+
+&r_i2c {
+       status = "okay";
+
+       axp313a: pmic@36 {
+               compatible = "x-powers,axp313a";
+               reg = <0x36>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+
+               regulators{
+                       reg_dcdc1: dcdc1 {
+                               regulator-name = "vdd-gpu-sys";
+                               regulator-min-microvolt = <810000>;
+                               regulator-max-microvolt = <990000>;
+                               regulator-always-on;
+                       };
+
+                       reg_dcdc2: dcdc2 {
+                               regulator-name = "vdd-cpu";
+                               regulator-min-microvolt = <810000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-ramp-delay = <200>;
+                               regulator-always-on;
+                       };
+
+                       reg_dcdc3: dcdc3 {
+                               regulator-name = "vcc-dram";
+                               regulator-min-microvolt = <1350000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-always-on;
+                       };
+
+                       reg_aldo1: aldo1 {
+                               regulator-name = "vcc-1v8-pll";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                       };
+
+                       reg_dldo1: dldo1 {
+                               regulator-name = "vcc-3v3-io";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+               };
+       };
+};
+
+&usbphy {
+       status = "okay";
+};
diff --git a/arch/arm/dts/sun50i-h616-bigtreetech-pi.dts b/arch/arm/dts/sun50i-h616-bigtreetech-pi.dts
new file mode 100644 (file)
index 0000000..832f08b
--- /dev/null
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (C) 2023 Martin Botka <martin@biqu3d.com>.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616-bigtreetech-cb1.dtsi"
+
+/ {
+       model = "BigTreeTech Pi";
+       compatible = "bigtreetech,pi", "allwinner,sun50i-h616";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ehci2 {
+       status = "okay";
+};
+
+&ehci3 {
+       status = "okay";
+};
+
+&ir {
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&ohci2 {
+       status = "okay";
+};
+
+&ohci3 {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_ph_pins>;
+       status = "okay";
+};
index 74aed0d232a9cfa88af43f5a2688d90d1ff1cfa5..d549d277d9729f2fdb78173addb4c1335e4ece91 100644 (file)
                        #reset-cells = <1>;
                };
 
+               sid: efuse@3006000 {
+                       compatible = "allwinner,sun50i-h616-sid", "allwinner,sun50i-a64-sid";
+                       reg = <0x03006000 0x1000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+               };
+
                watchdog: watchdog@30090a0 {
                        compatible = "allwinner,sun50i-h616-wdt",
                                     "allwinner,sun6i-a31-wdt";
diff --git a/arch/arm/dts/sun50i-h618-orangepi-zero2w.dts b/arch/arm/dts/sun50i-h618-orangepi-zero2w.dts
new file mode 100644 (file)
index 0000000..21ca197
--- /dev/null
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Arm Ltd.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+       model = "OrangePi Zero 2W";
+       compatible = "xunlong,orangepi-zero2w", "allwinner,sun50i-h618";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led-0 {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
+               };
+       };
+
+       reg_vcc5v: vcc5v {
+               /* board wide 5V supply directly from the USB-C socket */
+               compatible = "regulator-fixed";
+               regulator-name = "vcc-5v";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+       };
+
+       reg_vcc3v3: vcc3v3 {
+               /* SY8089 DC/DC converter */
+               compatible = "regulator-fixed";
+               regulator-name = "vcc-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&reg_vcc5v>;
+               regulator-always-on;
+       };
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+/* USB 2 & 3 are on the FPC connector (or the exansion board) */
+
+&mmc0 {
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;  /* PF6 */
+       bus-width = <4>;
+       vmmc-supply = <&reg_vcc3v3>;
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&pio {
+       vcc-pc-supply = <&reg_dldo1>;
+       vcc-pf-supply = <&reg_dldo1>;   /* internally via VCC-IO */
+       vcc-pg-supply = <&reg_aldo1>;
+       vcc-ph-supply = <&reg_dldo1>;   /* internally via VCC-IO */
+       vcc-pi-supply = <&reg_dldo1>;
+};
+
+&r_i2c {
+       status = "okay";
+
+       axp313: pmic@36 {
+               compatible = "x-powers,axp313a";
+               reg = <0x36>;
+               #interrupt-cells = <1>;
+               interrupt-controller;
+               interrupt-parent = <&pio>;
+               interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>;  /* PC9 */
+
+               vin1-supply = <&reg_vcc5v>;
+               vin2-supply = <&reg_vcc5v>;
+               vin3-supply = <&reg_vcc5v>;
+
+               regulators {
+                       /* Supplies VCC-PLL and DRAM */
+                       reg_aldo1: aldo1 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vcc1v8";
+                       };
+
+                       /* Supplies VCC-IO, so needs to be always on. */
+                       reg_dldo1: dldo1 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc3v3";
+                       };
+
+                       reg_dcdc1: dcdc1 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <810000>;
+                               regulator-max-microvolt = <990000>;
+                               regulator-name = "vdd-gpu-sys";
+                       };
+
+                       reg_dcdc2: dcdc2 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <810000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-name = "vdd-cpu";
+                       };
+
+                       reg_dcdc3: dcdc3 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <1100000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-name = "vdd-dram";
+                       };
+               };
+       };
+};
+
+&spi0  {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
+
+       flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <40000000>;
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_ph_pins>;
+       status = "okay";
+};
+
+&usbotg {
+       /*
+        * PHY0 pins are connected to a USB-C socket, but a role switch
+        * is not implemented: both CC pins are pulled to GND.
+        * The VBUS pins power the device, so a fixed peripheral mode
+        * is the best choice.
+        * The board can be powered via GPIOs, in this case port0 *can*
+        * act as a host (with a cable/adapter ignoring CC), as VBUS is
+        * then provided by the GPIOs. Any user of this setup would
+        * need to adjust the DT accordingly: dr_mode set to "host",
+        * enabling OHCI0 and EHCI0.
+        */
+       dr_mode = "peripheral";
+       status = "okay";
+};
+
+&usbphy {
+       usb1_vbus-supply = <&reg_vcc5v>;
+       status = "okay";
+};
diff --git a/arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts b/arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts
new file mode 100644 (file)
index 0000000..8ea1fd4
--- /dev/null
@@ -0,0 +1,161 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Arm Ltd.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+       model = "Transpeed 8K618-T";
+       compatible = "transpeed,8k618-t", "allwinner,sun50i-h618";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       reg_vcc5v: vcc5v {
+               /* board wide 5V supply directly from the DC input */
+               compatible = "regulator-fixed";
+               regulator-name = "vcc-5v";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+       };
+
+       reg_vcc3v3: vcc3v3 {
+               /* discrete 3.3V regulator */
+               compatible = "regulator-fixed";
+               regulator-name = "vcc-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ir {
+       status = "okay";
+};
+
+&mmc0 {
+       vmmc-supply = <&reg_dldo1>;
+       cd-gpios = <&pio 8 16 GPIO_ACTIVE_LOW>; /* PI16 */
+       bus-width = <4>;
+       status = "okay";
+};
+
+&mmc2 {
+       vmmc-supply = <&reg_dldo1>;
+       vqmmc-supply = <&reg_aldo1>;
+       bus-width = <8>;
+       non-removable;
+       cap-mmc-hw-reset;
+       mmc-ddr-1_8v;
+       mmc-hs200-1_8v;
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&r_i2c {
+       status = "okay";
+
+       axp313: pmic@36 {
+               compatible = "x-powers,axp313a";
+               reg = <0x36>;
+               #interrupt-cells = <1>;
+               interrupt-controller;
+
+               vin1-supply = <&reg_vcc5v>;
+               vin2-supply = <&reg_vcc5v>;
+               vin3-supply = <&reg_vcc5v>;
+
+               regulators {
+                       reg_aldo1: aldo1 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vcc-1v8-pll";
+                       };
+
+                       reg_dldo1: dldo1 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc-3v3-io-mmc";
+                       };
+
+                       reg_dcdc1: dcdc1 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <810000>;
+                               regulator-max-microvolt = <990000>;
+                               regulator-name = "vdd-gpu-sys";
+                       };
+
+                       reg_dcdc2: dcdc2 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <810000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-name = "vdd-cpu";
+                       };
+
+                       reg_dcdc3: dcdc3 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <1360000>;
+                               regulator-max-microvolt = <1360000>;
+                               regulator-name = "vdd-dram";
+                       };
+               };
+       };
+};
+
+&pio {
+       vcc-pc-supply = <&reg_aldo1>;
+       vcc-pg-supply = <&reg_dldo1>;
+       vcc-ph-supply = <&reg_dldo1>;
+       vcc-pi-supply = <&reg_dldo1>;
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_ph_pins>;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+       uart-has-rtscts;
+       status = "okay";
+};
+
+&usbotg {
+       dr_mode = "host";       /* USB A type receptable */
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index 4ef26d8f534034b705d40a3d6eaf21bd39ff6280..a5b1f1e3900d4ebfbf59018134789513c28b1400 100644 (file)
                        resets = <&ccu RST_BUS_VE>;
                        interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
                        allwinner,sram = <&ve_sram 1>;
+                       interconnects = <&mbus 4>;
+                       interconnect-names = "dma-mem";
                };
 
                mmc0: mmc@1c0f000 {
diff --git a/arch/arm/dts/sun8i-v3s-anbernic-rg-nano.dts b/arch/arm/dts/sun8i-v3s-anbernic-rg-nano.dts
new file mode 100644 (file)
index 0000000..f34dfdf
--- /dev/null
@@ -0,0 +1,276 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+#include <dt-bindings/input/linux-event-codes.h>
+#include "sun8i-v3s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+/ {
+       model = "Anbernic RG Nano";
+       compatible = "anbernic,rg-nano", "allwinner,sun8i-v3s";
+
+       aliases {
+               rtc0 = &pcf8563;
+               rtc1 = &rtc;
+               serial0 = &uart0;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               brightness-levels = <0 1 2 3 8 14 21 32 46 60 80 100>;
+               default-brightness-level = <11>;
+               power-supply = <&reg_vcc5v0>;
+               pwms = <&pwm 0 40000 1>;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       gpio_keys: gpio-keys {
+               compatible = "gpio-keys";
+
+               button-a {
+                       gpios = <&gpio_expander 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "BTN-A";
+                       linux,code = <BTN_EAST>;
+               };
+
+               button-b {
+                       gpios = <&gpio_expander 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "BTN-B";
+                       linux,code = <BTN_SOUTH>;
+               };
+
+               button-down {
+                       gpios = <&gpio_expander 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "DPAD-DOWN";
+                       linux,code = <BTN_DPAD_DOWN>;
+               };
+
+               button-left {
+                       gpios = <&gpio_expander 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "DPAD-LEFT";
+                       linux,code = <BTN_DPAD_LEFT>;
+               };
+
+               button-right {
+                       gpios = <&gpio_expander 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "DPAD-RIGHT";
+                       linux,code = <BTN_DPAD_RIGHT>;
+               };
+
+               button-se {
+                       gpios = <&gpio_expander 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "BTN-SELECT";
+                       linux,code = <BTN_SELECT>;
+               };
+
+               button-st {
+                       gpios = <&gpio_expander 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "BTN-START";
+                       linux,code = <BTN_START>;
+               };
+
+               button-tl {
+                       gpios = <&gpio_expander 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "BTN-L";
+                       linux,code = <BTN_TL>;
+               };
+
+               button-tr {
+                       gpios = <&gpio_expander 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "BTN-R";
+                       linux,code = <BTN_TR>;
+               };
+
+               button-up {
+                       gpios = <&gpio_expander 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "DPAD-UP";
+                       linux,code = <BTN_DPAD_UP>;
+               };
+
+               button-x {
+                       gpios = <&gpio_expander 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "BTN-X";
+                       linux,code = <BTN_NORTH>;
+               };
+
+               button-y {
+                       gpios = <&gpio_expander 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       label = "BTN-Y";
+                       linux,code = <BTN_WEST>;
+               };
+       };
+};
+
+&codec {
+       allwinner,audio-routing = "Speaker", "HP",
+                                 "MIC1", "Mic",
+                                 "Mic", "HBIAS";
+       allwinner,pa-gpios = <&pio 5 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PF6 */
+       status = "okay";
+};
+
+&ehci {
+       status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+
+       gpio_expander: gpio@20 {
+               compatible = "nxp,pcal6416";
+               reg = <0x20>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               interrupt-parent = <&pio>;
+               interrupts = <1 3 IRQ_TYPE_EDGE_BOTH>; /* PB3/EINT3 */
+               vcc-supply = <&reg_vcc3v3>;
+       };
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+               interrupt-parent = <&pio>;
+               interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5/EINT5 */
+       };
+
+       pcf8563: rtc@51 {
+               compatible = "nxp,pcf8563";
+               reg = <0x51>;
+       };
+};
+
+#include "axp209.dtsi"
+
+&battery_power_supply {
+       status = "okay";
+};
+
+&mmc0 {
+       broken-cd;
+       bus-width = <4>;
+       disable-wp;
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc3v3>;
+       status = "okay";
+};
+
+&ohci {
+       status = "okay";
+};
+
+&pio {
+       vcc-pb-supply = <&reg_vcc3v3>;
+       vcc-pc-supply = <&reg_vcc3v3>;
+       vcc-pf-supply = <&reg_vcc3v3>;
+       vcc-pg-supply = <&reg_vcc3v3>;
+
+       spi0_no_miso_pins: spi0-no-miso-pins {
+               pins = "PC1", "PC2", "PC3";
+               function = "spi0";
+       };
+};
+
+&pwm {
+       pinctrl-0 = <&pwm0_pin>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
+/* DCDC2 wired into vdd-cpu, vdd-sys, and vdd-ephy. */
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-max-microvolt = <1250000>;
+       regulator-min-microvolt = <1250000>;
+       regulator-name = "vdd-cpu";
+};
+
+/* DCDC3 wired into every 3.3v input that isn't the RTC. */
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-max-microvolt = <3300000>;
+       regulator-min-microvolt = <3300000>;
+       regulator-name = "vcc-io";
+};
+
+/* LDO1 wired into RTC, voltage is hard-wired at 3.3v. */
+&reg_ldo1 {
+       regulator-always-on;
+       regulator-name = "vcc-rtc";
+};
+
+/* LDO2 wired into VCC-PLL and audio codec. */
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-max-microvolt = <3000000>;
+       regulator-min-microvolt = <3000000>;
+       regulator-name = "vcc-pll";
+};
+
+/* LDO3, LDO4, and LDO5 unused. */
+&reg_ldo3 {
+       status = "disabled";
+};
+
+&reg_ldo4 {
+       status = "disabled";
+};
+
+/* RTC uses internal oscillator */
+&rtc {
+       /delete-property/ clocks;
+};
+
+&spi0 {
+       pinctrl-0 = <&spi0_no_miso_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       display@0 {
+               compatible = "saef,sftc154b", "panel-mipi-dbi-spi";
+               reg = <0>;
+               backlight = <&backlight>;
+               dc-gpios = <&pio 2 0 GPIO_ACTIVE_HIGH>; /* PC0 */
+               reset-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2 */
+               spi-max-frequency = <100000000>;
+
+               height-mm = <39>;
+               width-mm = <39>;
+
+               /* Set hb-porch to compensate for non-visible area */
+               panel-timing {
+                       hactive = <240>;
+                       vactive = <240>;
+                       hback-porch = <80>;
+                       vback-porch = <0>;
+                       clock-frequency = <0>;
+                       hfront-porch = <0>;
+                       hsync-len = <0>;
+                       vfront-porch = <0>;
+                       vsync-len = <0>;
+               };
+       };
+};
+
+&uart0 {
+       pinctrl-0 = <&uart0_pb_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
+&usbphy {
+       usb0_id_det-gpios = <&pio 6 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PG5 */
+       status = "okay";
+};
index 3b9a282c274635361ce2d3563e3c72a6c2be0279..e8a04476b776251312ce5d36cf2dea8c503f5a71 100644 (file)
                        #phy-cells = <1>;
                };
 
+               ehci: usb@1c1a000 {
+                       compatible = "allwinner,sun8i-v3s-ehci", "generic-ehci";
+                       reg = <0x01c1a000 0x100>;
+                       interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>;
+                       resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
+               ohci: usb@1c1a400 {
+                       compatible = "allwinner,sun8i-v3s-ohci", "generic-ohci";
+                       reg = <0x01c1a400 0x100>;
+                       interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>,
+                                <&ccu CLK_USB_OHCI0>;
+                       resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
                ccu: clock@1c20000 {
                        compatible = "allwinner,sun8i-v3s-ccu";
                        reg = <0x01c20000 0x400>;
                                bias-pull-up;
                        };
 
+                       /omit-if-no-ref/
+                       pwm0_pin: pwm0-pin {
+                               pins = "PB4";
+                               function = "pwm0";
+                       };
+
+                       /omit-if-no-ref/
+                       pwm1_pin: pwm1-pin {
+                               pins = "PB5";
+                               function = "pwm1";
+                       };
+
                        spi0_pins: spi0-pins {
                                pins = "PC0", "PC1", "PC2", "PC3";
                                function = "spi0";