]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: dts: sun50i: H6: Sync from Linux v5.18-rc1
authorSamuel Holland <samuel@sholland.org>
Wed, 27 Apr 2022 20:31:31 +0000 (15:31 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Sun, 22 May 2022 23:37:51 +0000 (00:37 +0100)
Copy the devicetree source for the H6 SoC and all existing boards
from the Linux v5.18-rc1 tag.

To maintain ABI compatibility with existing LTS kernels, one change
moving some IP blocks to the r_intc interrupt controller is excluded.
This effectively reverts Linux commits 189bef235dd3 and 73088dfee635.

This commit also adds the following new board devicetrees:
 - sun50i-h6-pine-h64-model-b.dts
 - sun50i-h6-tanix-tx6-mini.dts

This update should not impact any existing U-Boot functionality.

Signed-off-by: Samuel Holland <samuel@sholland.org>
arch/arm/dts/Makefile
arch/arm/dts/sun50i-h6-beelink-gs1.dts
arch/arm/dts/sun50i-h6-cpu-opp.dtsi
arch/arm/dts/sun50i-h6-orangepi-3.dts
arch/arm/dts/sun50i-h6-orangepi.dtsi
arch/arm/dts/sun50i-h6-pine-h64-model-b.dts [new file with mode: 0644]
arch/arm/dts/sun50i-h6-tanix-tx6-mini.dts [new file with mode: 0644]
arch/arm/dts/sun50i-h6-tanix-tx6.dts
arch/arm/dts/sun50i-h6-tanix.dtsi [new file with mode: 0644]
arch/arm/dts/sun50i-h6.dtsi

index c61002554442301d97be03e396f4ec5c88d2ff1b..cfc5fea290a429e3549f5094e2b6e4f66ed30d75 100644 (file)
@@ -694,7 +694,9 @@ dtb-$(CONFIG_MACH_SUN50I_H6) += \
        sun50i-h6-orangepi-lite2.dtb \
        sun50i-h6-orangepi-one-plus.dtb \
        sun50i-h6-pine-h64.dtb \
-       sun50i-h6-tanix-tx6.dtb
+       sun50i-h6-pine-h64-model-b.dtb \
+       sun50i-h6-tanix-tx6.dtb \
+       sun50i-h6-tanix-tx6-mini.dtb
 dtb-$(CONFIG_MACH_SUN50I_H616) += \
        sun50i-h616-orangepi-zero2.dtb
 dtb-$(CONFIG_MACH_SUN50I) += \
index b5808047d6e4ac4250a486dd0944c204b4a4b2fb..649b146dfff804914759000c5e8d4e5e498ccc84 100644 (file)
        vcc-pg-supply = <&reg_aldo1>;
 };
 
-&r_i2c {
+&r_ir {
+       linux,rc-map-name = "rc-beelink-gs1";
+       status = "okay";
+};
+
+&r_pio {
+       /*
+        * FIXME: We can't add that supply for now since it would
+        * create a circular dependency between pinctrl, the regulator
+        * and the RSB Bus.
+        *
+        * vcc-pl-supply = <&reg_aldo1>;
+        */
+       vcc-pm-supply = <&reg_aldo1>;
+};
+
+&r_rsb {
        status = "okay";
 
-       axp805: pmic@36 {
+       axp805: pmic@745 {
                compatible = "x-powers,axp805", "x-powers,axp806";
-               reg = <0x36>;
+               reg = <0x745>;
                interrupt-parent = <&r_intc>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
                interrupt-controller;
        };
 };
 
-&r_ir {
-       linux,rc-map-name = "rc-beelink-gs1";
-       status = "okay";
-};
-
-&r_pio {
-       /*
-        * PL0 and PL1 are used for PMIC I2C
-        * don't enable the pl-supply else
-        * it will fail at boot
-        *
-        * vcc-pl-supply = <&reg_aldo1>;
-        */
-       vcc-pm-supply = <&reg_aldo1>;
-};
-
 &spdif {
        status = "okay";
 };
index 8c6e8536b69faf8e7fb51ac093450c4f87263829..0baf0f8e4d27285aa11239b8271797f6d1936425 100644 (file)
@@ -3,7 +3,7 @@
 // Copyright (C) 2020 Clément Péron <peron.clem@gmail.com>
 
 / {
-       cpu_opp_table: cpu-opp-table {
+       cpu_opp_table: opp-table-cpu {
                compatible = "allwinner,sun50i-h6-operating-points";
                nvmem-cells = <&cpu_speed_grade>;
                opp-shared;
index 7e83f6146f8a589f06fad2d1f5ec215a78217a8a..9f12c05e21f7825e75e40d01c3f8d5b9e01e05d6 100644 (file)
        vcc-pg-supply = <&reg_vcc_wifi_io>;
 };
 
-&r_i2c {
+&r_ir {
+       status = "okay";
+};
+
+&r_rsb {
        status = "okay";
 
-       axp805: pmic@36 {
+       axp805: pmic@745 {
                compatible = "x-powers,axp805", "x-powers,axp806";
-               reg = <0x36>;
+               reg = <0x745>;
                interrupt-parent = <&r_intc>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
                interrupt-controller;
        };
 };
 
-&r_ir {
-       status = "okay";
-};
-
 &rtc {
        clocks = <&ext_osc32k>;
 };
index da0875bd38d40e2e5419bf5e8b0c577cc45714b2..a5811d55bbec56e3a3917b534fbfe81bf3c0a4ae 100644 (file)
        vcc-pg-supply = <&reg_aldo1>;
 };
 
-&r_i2c {
+&r_ir {
+       status = "okay";
+};
+
+&r_pio {
+       vcc-pm-supply = <&reg_bldo3>;
+};
+
+&r_rsb {
        status = "okay";
 
-       axp805: pmic@36 {
+       axp805: pmic@745 {
                compatible = "x-powers,axp805", "x-powers,axp806";
-               reg = <0x36>;
+               reg = <0x745>;
                interrupt-parent = <&r_intc>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
                interrupt-controller;
        };
 };
 
-&r_ir {
-       status = "okay";
-};
-
-&r_pio {
-       vcc-pm-supply = <&reg_bldo3>;
-};
-
 &rtc {
        clocks = <&ext_osc32k>;
 };
diff --git a/arch/arm/dts/sun50i-h6-pine-h64-model-b.dts b/arch/arm/dts/sun50i-h6-pine-h64-model-b.dts
new file mode 100644 (file)
index 0000000..686f58e
--- /dev/null
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (C) 2019 Corentin LABBE <clabbe@baylibre.com>
+ */
+
+#include "sun50i-h6-pine-h64.dts"
+
+/ {
+       model = "Pine H64 model B";
+       compatible = "pine64,pine-h64-model-b", "allwinner,sun50i-h6";
+
+       /delete-node/ reg_gmac_3v3;
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */
+               post-power-on-delay-ms = <200>;
+       };
+};
+
+&hdmi_connector {
+       /delete-property/ ddc-en-gpios;
+};
+
+&emac {
+       phy-supply = <&reg_aldo2>;
+};
+
+&mmc1 {
+       vmmc-supply = <&reg_cldo3>;
+       vqmmc-supply = <&reg_aldo1>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+       uart-has-rtscts;
+       status = "okay";
+
+       bluetooth {
+               compatible = "realtek,rtl8723bs-bt";
+               device-wake-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
+               host-wake-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */
+               enable-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
+               max-speed = <1500000>;
+       };
+};
diff --git a/arch/arm/dts/sun50i-h6-tanix-tx6-mini.dts b/arch/arm/dts/sun50i-h6-tanix-tx6-mini.dts
new file mode 100644 (file)
index 0000000..08d8416
--- /dev/null
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (c) 2021 Jernej Skrabec <jernej.skrabec@gmail.com>
+
+/dts-v1/;
+
+#include "sun50i-h6-tanix.dtsi"
+
+/ {
+       model = "Tanix TX6 mini";
+       compatible = "oranth,tanix-tx6-mini", "allwinner,sun50i-h6";
+};
+
+&r_ir {
+       linux,rc-map-name = "rc-tanix-tx3mini";
+};
index be81330db14f6642eba8f7b0995364ec9206414b..9a38ff9b3fc751a6658cafd87b91745fd11ec550 100644 (file)
 
 /dts-v1/;
 
-#include "sun50i-h6.dtsi"
-#include "sun50i-h6-cpu-opp.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
+#include "sun50i-h6-tanix.dtsi"
 
 / {
        model = "Tanix TX6";
        compatible = "oranth,tanix-tx6", "allwinner,sun50i-h6";
-
-       aliases {
-               serial0 = &uart0;
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
-
-       connector {
-               compatible = "hdmi-connector";
-               ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
-               type = "a";
-
-               port {
-                       hdmi_con_in: endpoint {
-                               remote-endpoint = <&hdmi_out_con>;
-                       };
-               };
-       };
-
-       reg_vcc3v3: vcc3v3 {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc3v3";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-       };
-
-       reg_vdd_cpu_gpu: vdd-cpu-gpu {
-               compatible = "regulator-fixed";
-               regulator-name = "vdd-cpu-gpu";
-               regulator-min-microvolt = <1135000>;
-               regulator-max-microvolt = <1135000>;
-       };
-};
-
-&cpu0 {
-       cpu-supply = <&reg_vdd_cpu_gpu>;
-};
-
-&de {
-       status = "okay";
-};
-
-&dwc3 {
-       status = "okay";
-};
-
-&ehci0 {
-       status = "okay";
-};
-
-&ehci3 {
-       status = "okay";
-};
-
-&gpu {
-       mali-supply = <&reg_vdd_cpu_gpu>;
-       status = "okay";
-};
-
-&hdmi {
-       status = "okay";
-};
-
-&hdmi_out {
-       hdmi_out_con: endpoint {
-               remote-endpoint = <&hdmi_con_in>;
-       };
-};
-
-&mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins>;
-       vmmc-supply = <&reg_vcc3v3>;
-       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
-       bus-width = <4>;
-       status = "okay";
-};
-
-&ohci0 {
-       status = "okay";
-};
-
-&ohci3 {
-       status = "okay";
 };
 
 &r_ir {
        linux,rc-map-name = "rc-tanix-tx5max";
-       status = "okay";
 };
 
-&uart0 {
+&uart1 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_ph_pins>;
+       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+       uart-has-rtscts;
        status = "okay";
-};
 
-&usb2otg {
-       dr_mode = "host";
-       status = "okay";
-};
-
-&usb2phy {
-       status = "okay";
-};
-
-&usb3phy {
-       status = "okay";
+       bluetooth {
+               compatible = "realtek,rtl8822cs-bt";
+               device-wake-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
+               host-wake-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */
+               enable-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
+       };
 };
diff --git a/arch/arm/dts/sun50i-h6-tanix.dtsi b/arch/arm/dts/sun50i-h6-tanix.dtsi
new file mode 100644 (file)
index 0000000..edb71e4
--- /dev/null
@@ -0,0 +1,189 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (c) 2019 Jernej Skrabec <jernej.skrabec@siol.net>
+
+/dts-v1/;
+
+#include "sun50i-h6.dtsi"
+#include "sun50i-h6-cpu-opp.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       connector {
+               compatible = "hdmi-connector";
+               ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
+       /* used for FD650 LED display driver */
+       i2c {
+               compatible = "i2c-gpio";
+               sda-gpios = <&pio 7 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PH6 */
+               scl-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PH5 */
+               i2c-gpio,delay-us = <5>;
+       };
+
+       reg_vcc1v8: regulator-vcc1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc1v8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       reg_vcc3v3: regulator-vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       reg_vdd_cpu_gpu: regulator-vdd-cpu-gpu {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd-cpu-gpu";
+               regulator-min-microvolt = <1135000>;
+               regulator-max-microvolt = <1135000>;
+       };
+
+       sound-spdif {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "sun50i-h6-spdif";
+
+               simple-audio-card,cpu {
+                       sound-dai = <&spdif>;
+               };
+
+               simple-audio-card,codec {
+                       sound-dai = <&spdif_out>;
+               };
+       };
+
+       spdif_out: spdif-out {
+               #sound-dai-cells = <0>;
+               compatible = "linux,spdif-dit";
+       };
+
+       wifi_pwrseq: wifi-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&rtc 1>;
+               clock-names = "ext_clock";
+               reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_vdd_cpu_gpu>;
+};
+
+&de {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci3 {
+       status = "okay";
+};
+
+&gpu {
+       mali-supply = <&reg_vdd_cpu_gpu>;
+       status = "okay";
+};
+
+&hdmi {
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&mmc1 {
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc1v8>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&mmc2 {
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc1v8>;
+       bus-width = <8>;
+       non-removable;
+       cap-mmc-hw-reset;
+       mmc-hs200-1_8v;
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci3 {
+       status = "okay";
+};
+
+&pio {
+       vcc-pc-supply = <&reg_vcc1v8>;
+       vcc-pd-supply = <&reg_vcc3v3>;
+       vcc-pg-supply = <&reg_vcc1v8>;
+};
+
+&r_ir {
+       status = "okay";
+};
+
+&spdif {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_ph_pins>;
+       status = "okay";
+};
+
+&usb2otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usb2phy {
+       status = "okay";
+};
+
+&usb3phy {
+       status = "okay";
+};
index af8b7d0ef75068040ce7bcc569cdca8e618d30e6..71a45a624da9fe248196256525cd75880f5be294 100644 (file)
                        display_clocks: clock@0 {
                                compatible = "allwinner,sun50i-h6-de3-clk";
                                reg = <0x0 0x10000>;
-                               clocks = <&ccu CLK_DE>,
-                                        <&ccu CLK_BUS_DE>;
-                               clock-names = "mod",
-                                             "bus";
+                               clocks = <&ccu CLK_BUS_DE>,
+                                        <&ccu CLK_DE>;
+                               clock-names = "bus",
+                                             "mod";
                                resets = <&ccu RST_BUS_DE>;
                                #clock-cells = <1>;
                                #reset-cells = <1>;
                        };
                };
 
+               video-codec-g2@1c00000 {
+                       compatible = "allwinner,sun50i-h6-vpu-g2";
+                       reg = <0x01c00000 0x1000>;
+                       interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_VP9>, <&ccu CLK_VP9>;
+                       clock-names = "bus", "mod";
+                       resets = <&ccu RST_BUS_VP9>;
+               };
+
                video-codec@1c0e000 {
                        compatible = "allwinner,sun50i-h6-video-engine";
                        reg = <0x01c0e000 0x2000>;
                        };
                };
 
+               timer@3009000 {
+                       compatible = "allwinner,sun50i-h6-timer",
+                                    "allwinner,sun8i-a23-timer";
+                       reg = <0x03009000 0xa0>;
+                       interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&osc24M>;
+               };
+
                watchdog: watchdog@30090a0 {
                        compatible = "allwinner,sun50i-h6-wdt",
                                     "allwinner,sun6i-a31-wdt";