]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: dts: arm/arm64: update devicetree files from Linux-v6.4-rc2
authorAndre Przywara <andre.przywara@arm.com>
Sun, 2 Apr 2023 00:17:07 +0000 (01:17 +0100)
committerAndre Przywara <andre.przywara@arm.com>
Wed, 7 Jun 2023 21:44:40 +0000 (22:44 +0100)
Sync the devicetree files from the official Linux kernel tree, v6.4-rc2.
This is covering both 64-bit and 32-bit Allwinner SoCs with Arm Ltd.
cores, we skip the new RISC-V bits for now, as sunxi RISC-V support
is still work in progress.

Among smaller cosmetic changes, this adds a SATA regulator node which we
need in U-Boot to get rid of hard-coded GPIOs.
Also this updates the Allwinner F1C100s DTs, enabling USB support, and
also adds the DTs for two new boards.

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>
20 files changed:
arch/arm/dts/axp22x.dtsi
arch/arm/dts/axp809.dtsi
arch/arm/dts/axp81x.dtsi
arch/arm/dts/sun50i-a64.dtsi
arch/arm/dts/sun50i-h5-orangepi-pc2.dts
arch/arm/dts/sun5i-gr8-chip-pro.dts
arch/arm/dts/sun5i-r8-chip.dts
arch/arm/dts/sun6i-a31.dtsi
arch/arm/dts/sun6i-a31s-sina31s.dts
arch/arm/dts/sun8i-a23-a33.dtsi
arch/arm/dts/sun8i-a33.dtsi
arch/arm/dts/sun8i-a83t-bananapi-m3.dts
arch/arm/dts/sun8i-h3-beelink-x2.dts
arch/arm/dts/sun8i-h3-nanopi-duo2.dts
arch/arm/dts/sun8i-v3s.dtsi
arch/arm/dts/suniv-f1c100s-licheepi-nano.dts
arch/arm/dts/suniv-f1c100s.dtsi
arch/arm/dts/suniv-f1c200s-lctech-pi.dts [new file with mode: 0644]
arch/arm/dts/suniv-f1c200s-popstick-v1.1.dts [new file with mode: 0644]
arch/arm/dts/sunxi-h3-h5.dtsi

index a020c12b2884799e3394d7c7b893248ccad7fad1..f79650afd0a76b95183af23317e4d646acec2eac 100644 (file)
                status = "disabled";
        };
 
+       axp_gpio: gpio {
+               compatible = "x-powers,axp221-gpio";
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
        regulators {
                /* Default work frequency for buck regulators */
                x-powers,dcdc-freq = <3000>;
index ab8e5f2d924695161941b0b167da774be9e8ea23..d134d4c00bd86cc1096ce8464720828971aae58d 100644 (file)
        compatible = "x-powers,axp809";
        interrupt-controller;
        #interrupt-cells = <1>;
+
+       axp_gpio: gpio {
+               compatible = "x-powers,axp809-gpio",
+                            "x-powers,axp221-gpio";
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
 };
index b93387b0c1c35bbbc34e4d574b70fc6e3fc4a402..ebaf1c3ce8dbb1b6a54e80b69d663e5160843796 100644 (file)
                compatible = "x-powers,axp813-gpio";
                gpio-controller;
                #gpio-cells = <2>;
-
-               gpio0_ldo: gpio0-ldo-pin {
-                       pins = "GPIO0";
-                       function = "ldo";
-               };
-
-               gpio1_ldo: gpio1-ldo-pin {
-                       pins = "GPIO1";
-                       function = "ldo";
-               };
        };
 
        battery_power_supply: battery-power {
                };
 
                reg_ldo_io0: ldo-io0 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&gpio0_ldo>;
                        /* Disable by default to avoid conflicts with GPIO */
                        status = "disabled";
                };
 
                reg_ldo_io1: ldo-io1 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&gpio1_ldo>;
                        /* Disable by default to avoid conflicts with GPIO */
                        status = "disabled";
                };
index b04f492c0f20b7ea61147944e5b6c26cec01478e..135762b34fdfb94e50029da252daea3dc75c40ff 100644 (file)
                        compatible = "allwinner,sun50i-a64-mipi-dphy",
                                     "allwinner,sun6i-a31-mipi-dphy";
                        reg = <0x01ca1000 0x1000>;
+                       interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&ccu CLK_BUS_MIPI_DSI>,
                                 <&ccu CLK_DSI_DPHY>;
                        clock-names = "bus", "mod";
index b5c1ff19b4c41607d9e01988ffcb0660eeb88c11..ce3ae19e72dbd4582db7d67f3722d86f877c34a4 100644 (file)
@@ -3,6 +3,7 @@
 
 /dts-v1/;
 #include "sun50i-h5.dtsi"
+#include "sun50i-h5-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
index a32cde3e32eb14a2163122bb12b804b0721b7335..5c3562b85a5bf95003b63013ba5d6e43cbda2d71 100644 (file)
@@ -70,7 +70,7 @@
        leds {
                compatible = "gpio-leds";
 
-               status {
+               led-0 {
                        label = "chip-pro:white:status";
                        gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
index 4bf4943d4eb77c923ca25b57ecb678b5eb347bc7..fd37bd1f3920857f51ae9257a625f3c497bbe0c6 100644 (file)
@@ -70,7 +70,7 @@
        leds {
                compatible = "gpio-leds";
 
-               status {
+               led-0 {
                        label = "chip:white:status";
                        gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
index f6701ece7b745307c64d8d11d84b94550c146d2b..b32d2ab6aa28b3d98ac60670c9fc0704402162d2 100644 (file)
                        clocks = <&ccu CLK_APB2_UART0>;
                        resets = <&ccu RST_APB2_UART0>;
                        dmas = <&dma 6>, <&dma 6>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_APB2_UART1>;
                        resets = <&ccu RST_APB2_UART1>;
                        dmas = <&dma 7>, <&dma 7>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_APB2_UART2>;
                        resets = <&ccu RST_APB2_UART2>;
                        dmas = <&dma 8>, <&dma 8>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_APB2_UART3>;
                        resets = <&ccu RST_APB2_UART3>;
                        dmas = <&dma 9>, <&dma 9>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_APB2_UART4>;
                        resets = <&ccu RST_APB2_UART4>;
                        dmas = <&dma 10>, <&dma 10>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_APB2_UART5>;
                        resets = <&ccu RST_APB2_UART5>;
                        dmas = <&dma 22>, <&dma 22>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
index 0af48e143b664c299e303418e0f01495e5e70ee4..56956352914d72536c4a169c1ffd576c2617ec5b 100644 (file)
@@ -67,7 +67,7 @@
        leds {
                compatible = "gpio-leds";
 
-               status {
+               led-0 {
                        label = "sina31s:status:usr";
                        gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
                };
index 06809c3a1f21ab43eced875ab5d79bd1a33c953f..84c6d9379a3807722d88834a556a35ec80e275ab 100644 (file)
                        clocks = <&ccu CLK_BUS_UART0>;
                        resets = <&ccu RST_BUS_UART0>;
                        dmas = <&dma 6>, <&dma 6>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_BUS_UART1>;
                        resets = <&ccu RST_BUS_UART1>;
                        dmas = <&dma 7>, <&dma 7>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_BUS_UART2>;
                        resets = <&ccu RST_BUS_UART2>;
                        dmas = <&dma 8>, <&dma 8>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_BUS_UART3>;
                        resets = <&ccu RST_BUS_UART3>;
                        dmas = <&dma 9>, <&dma 9>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_BUS_UART4>;
                        resets = <&ccu RST_BUS_UART4>;
                        dmas = <&dma 10>, <&dma 10>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
index b3d1bdfb5118e6291b2c8217083b610bcf776773..30fdd2703b1ff493f06d4c44f566608172daf45e 100644 (file)
                dphy: d-phy@1ca1000 {
                        compatible = "allwinner,sun6i-a31-mipi-dphy";
                        reg = <0x01ca1000 0x1000>;
+                       interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&ccu CLK_BUS_MIPI_DSI>,
                                 <&ccu CLK_DSI_DPHY>;
                        clock-names = "bus", "mod";
index b60016a4429c54ea9c69ac02be7c5b853a442c0b..197cf6959b503db3a598ff158bdd2a408105fb95 100644 (file)
                /* enables internal regulator and de-asserts reset */
                reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
        };
+
+       /*
+        * Power supply for the SATA disk, behind a USB-SATA bridge.
+        * Since it is a USB device, there is no consumer in the DT, so we
+        * have to keep this always on.
+        */
+       regulator-sata-disk-pwr {
+               compatible = "regulator-fixed";
+               regulator-name = "sata-disk-pwr";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+               enable-active-high;
+               gpio = <&pio 3 25 GPIO_ACTIVE_HIGH>; /* PD25 */
+       };
 };
 
 &cpu0 {
index 27a0d51289ddd4eeb9b9eaa14c1ebd565e30e38c..a6d38ecee141d438898325f08bcd5e595d425950 100644 (file)
@@ -57,7 +57,7 @@
                ethernet1 = &sdiowifi;
        };
 
-       cec-gpio {
+       cec {
                compatible = "cec-gpio";
                cec-gpios = <&pio 0 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PA14 */
                hdmi-phandle = <&hdmi>;
index 43641cb82398fca8c5b234e492764441cebb1118..343b02b97155539c4b9b8a0356647c1dda691b17 100644 (file)
@@ -57,7 +57,7 @@
                regulator-ramp-delay = <50>; /* 4ms */
 
                enable-active-high;
-               enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
+               enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
                gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
                gpios-states = <0x1>;
                states = <1100000 0>, <1300000 1>;
index db194c606fdcdf48bb7d13c9ca5de0042cd8a69b..b001251644f75ec5018371dac57a10df1c9c7474 100644 (file)
                        reg-io-width = <4>;
                        clocks = <&ccu CLK_BUS_UART0>;
                        dmas = <&dma 6>, <&dma 6>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        resets = <&ccu RST_BUS_UART0>;
                        status = "disabled";
                };
                        reg-io-width = <4>;
                        clocks = <&ccu CLK_BUS_UART1>;
                        dmas = <&dma 7>, <&dma 7>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        resets = <&ccu RST_BUS_UART1>;
                        status = "disabled";
                };
                        reg-io-width = <4>;
                        clocks = <&ccu CLK_BUS_UART2>;
                        dmas = <&dma 8>, <&dma 8>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        resets = <&ccu RST_BUS_UART2>;
                        pinctrl-0 = <&uart2_pins>;
                        pinctrl-names = "default";
index 04e59b8381cb8b340d853ba019db8ae917df4732..43896723a994c5aa37fbbdb45670ba3e9f25bde2 100644 (file)
@@ -6,6 +6,8 @@
 /dts-v1/;
 #include "suniv-f1c100s.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Lichee Pi Nano";
        compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s";
        };
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pe_pins>;
        status = "okay";
 };
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usbphy {
+       usb0_id_det-gpios = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */
+       status = "okay";
+};
index 9455d27e516eeeeeeded4d263b3fe7dac52f57af..3c61d59ab5f86eb4724709c96cdebb3f0c93de12 100644 (file)
                        #size-cells = <0>;
                };
 
+               usb_otg: usb@1c13000 {
+                       compatible = "allwinner,suniv-f1c100s-musb";
+                       reg = <0x01c13000 0x0400>;
+                       clocks = <&ccu CLK_BUS_OTG>;
+                       resets = <&ccu RST_BUS_OTG>;
+                       interrupts = <26>;
+                       interrupt-names = "mc";
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       extcon = <&usbphy 0>;
+                       allwinner,sram = <&otg_sram 1>;
+                       status = "disabled";
+               };
+
+               usbphy: phy@1c13400 {
+                       compatible = "allwinner,suniv-f1c100s-usb-phy";
+                       reg = <0x01c13400 0x10>;
+                       reg-names = "phy_ctrl";
+                       clocks = <&ccu CLK_USB_PHY0>;
+                       clock-names = "usb0_phy";
+                       resets = <&ccu RST_USB_PHY0>;
+                       reset-names = "usb0_reset";
+                       #phy-cells = <1>;
+                       status = "disabled";
+               };
+
                ccu: clock@1c20000 {
                        compatible = "allwinner,suniv-f1c100s-ccu";
                        reg = <0x01c20000 0x400>;
                                pins = "PE0", "PE1";
                                function = "uart0";
                        };
+
+                       /omit-if-no-ref/
+                       uart1_pa_pins: uart1-pa-pins {
+                               pins = "PA2", "PA3";
+                               function = "uart1";
+                       };
                };
 
                i2c0: i2c@1c27000 {
diff --git a/arch/arm/dts/suniv-f1c200s-lctech-pi.dts b/arch/arm/dts/suniv-f1c200s-lctech-pi.dts
new file mode 100644 (file)
index 0000000..2d2a3f0
--- /dev/null
@@ -0,0 +1,76 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2022 Arm Ltd,
+ * based on work:
+ *   Copyright 2022 Icenowy Zheng <uwu@icenowy.me>
+ */
+
+/dts-v1/;
+#include "suniv-f1c100s.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "Lctech Pi F1C200s";
+       compatible = "lctech,pi-f1c200s", "allwinner,suniv-f1c200s",
+                    "allwinner,suniv-f1c100s";
+
+       aliases {
+               serial0 = &uart1;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       reg_vcc3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+};
+
+&mmc0 {
+       broken-cd;
+       bus-width = <4>;
+       disable-wp;
+       vmmc-supply = <&reg_vcc3v3>;
+       status = "okay";
+};
+
+&otg_sram {
+       status = "okay";
+};
+
+&spi0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi0_pc_pins>;
+       status = "okay";
+
+       flash@0 {
+               compatible = "spi-nand";
+               reg = <0>;
+               spi-max-frequency = <40000000>;
+       };
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pa_pins>;
+       status = "okay";
+};
+
+/*
+ * This is a Type-C socket, but CC1/2 are not connected, and VBUS is connected
+ * to Vin, which supplies the board. Host mode works (if the board is powered
+ * otherwise), but peripheral is probably the intention.
+ */
+&usb_otg {
+       dr_mode = "peripheral";
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
diff --git a/arch/arm/dts/suniv-f1c200s-popstick-v1.1.dts b/arch/arm/dts/suniv-f1c200s-popstick-v1.1.dts
new file mode 100644 (file)
index 0000000..184c245
--- /dev/null
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2022 Icenowy Zheng <uwu@icenowy.me>
+ */
+
+/dts-v1/;
+#include "suniv-f1c100s.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+       model = "Popcorn Computer PopStick v1.1";
+       compatible = "sourceparts,popstick-v1.1", "sourceparts,popstick",
+                    "allwinner,suniv-f1c200s", "allwinner,suniv-f1c100s";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; /* PE6 */
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       reg_vcc3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+};
+
+&mmc0 {
+       cd-gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; /* PE3 */
+       bus-width = <4>;
+       disable-wp;
+       vmmc-supply = <&reg_vcc3v3>;
+       status = "okay";
+};
+
+&otg_sram {
+       status = "okay";
+};
+
+&spi0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi0_pc_pins>;
+       status = "okay";
+
+       flash@0 {
+               compatible = "spi-nand";
+               reg = <0>;
+               spi-max-frequency = <40000000>;
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pe_pins>;
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "peripheral";
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index fc1af9b608ba716b9fb6803c7517c8480d184818..bdc796f4622d506e98a3a1ae3ded8699c58e9a9e 100644 (file)
                        clocks = <&ccu CLK_BUS_UART0>;
                        resets = <&ccu RST_BUS_UART0>;
                        dmas = <&dma 6>, <&dma 6>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_BUS_UART1>;
                        resets = <&ccu RST_BUS_UART1>;
                        dmas = <&dma 7>, <&dma 7>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_BUS_UART2>;
                        resets = <&ccu RST_BUS_UART2>;
                        dmas = <&dma 8>, <&dma 8>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
                        clocks = <&ccu CLK_BUS_UART3>;
                        resets = <&ccu RST_BUS_UART3>;
                        dmas = <&dma 9>, <&dma 9>;
-                       dma-names = "rx", "tx";
+                       dma-names = "tx", "rx";
                        status = "disabled";
                };