]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: dts: sunxi: h5: Update DT files
authorAndre Przywara <andre.przywara@arm.com>
Tue, 25 May 2021 00:20:25 +0000 (01:20 +0100)
committerAndre Przywara <andre.przywara@arm.com>
Sat, 10 Jul 2021 00:22:09 +0000 (01:22 +0100)
Update the H5 DT files from the Linux 5.12 release.

The changes don't affect U-Boot at all, but fix Gigabit Ethernet when
this DT is passed on to the Linux kernel. It also introduces DVFS.

This also updates the shared sunxi-h3-h5.dtsi, but that only adds nodes
that are of no concern to U-Boot.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
13 files changed:
arch/arm/dts/sun50i-h5-bananapi-m2-plus-v1.2.dts
arch/arm/dts/sun50i-h5-cpu-opp.dtsi [new file with mode: 0644]
arch/arm/dts/sun50i-h5-libretech-all-h3-cc.dts
arch/arm/dts/sun50i-h5-libretech-all-h5-cc.dts
arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts
arch/arm/dts/sun50i-h5-nanopi-neo2.dts
arch/arm/dts/sun50i-h5-orangepi-pc2.dts
arch/arm/dts/sun50i-h5-orangepi-prime.dts
arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts
arch/arm/dts/sun50i-h5-orangepi-zero-plus2.dts
arch/arm/dts/sun50i-h5.dtsi
arch/arm/dts/sun8i-h3.dtsi
arch/arm/dts/sunxi-h3-h5.dtsi

index 2e2b14c0ae75922ca71fc809d941ca80e82ef3d2..8857a3791593fb787a6d207bbc579c5f4cfdb67b 100644 (file)
@@ -3,6 +3,7 @@
 
 /dts-v1/;
 #include "sun50i-h5.dtsi"
+#include "sun50i-h5-cpu-opp.dtsi"
 #include <arm/sunxi-bananapi-m2-plus-v1.2.dtsi>
 
 / {
diff --git a/arch/arm/dts/sun50i-h5-cpu-opp.dtsi b/arch/arm/dts/sun50i-h5-cpu-opp.dtsi
new file mode 100644 (file)
index 0000000..b265720
--- /dev/null
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
+
+/ {
+       cpu_opp_table: cpu-opp-table {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp-408000000 {
+                       opp-hz = /bits/ 64 <408000000>;
+                       opp-microvolt = <1000000 1000000 1310000>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+               };
+
+               opp-648000000 {
+                       opp-hz = /bits/ 64 <648000000>;
+                       opp-microvolt = <1040000 1040000 1310000>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+               };
+
+               opp-816000000 {
+                       opp-hz = /bits/ 64 <816000000>;
+                       opp-microvolt = <1080000 1080000 1310000>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+               };
+
+               opp-912000000 {
+                       opp-hz = /bits/ 64 <912000000>;
+                       opp-microvolt = <1120000 1120000 1310000>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+               };
+
+               opp-960000000 {
+                       opp-hz = /bits/ 64 <960000000>;
+                       opp-microvolt = <1160000 1160000 1310000>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+               };
+
+               opp-1008000000 {
+                       opp-hz = /bits/ 64 <1008000000>;
+                       opp-microvolt = <1200000 1200000 1310000>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+               };
+
+               opp-1056000000 {
+                       opp-hz = /bits/ 64 <1056000000>;
+                       opp-microvolt = <1240000 1240000 1310000>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+               };
+
+               opp-1104000000 {
+                       opp-hz = /bits/ 64 <1104000000>;
+                       opp-microvolt = <1260000 1260000 1310000>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+               };
+
+               opp-1152000000 {
+                       opp-hz = /bits/ 64 <1152000000>;
+                       opp-microvolt = <1300000 1300000 1310000>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+               };
+       };
+};
+
+&cpu0 {
+       operating-points-v2 = <&cpu_opp_table>;
+};
+
+&cpu1 {
+       operating-points-v2 = <&cpu_opp_table>;
+};
+
+&cpu2 {
+       operating-points-v2 = <&cpu_opp_table>;
+};
+
+&cpu3 {
+       operating-points-v2 = <&cpu_opp_table>;
+};
index a91806618e6f8aae406e62654e7094ea86b626e0..016da3ec32177529d336b5b335f8a473f2667903 100644 (file)
@@ -4,6 +4,7 @@
 
 /dts-v1/;
 #include "sun50i-h5.dtsi"
+#include "sun50i-h5-cpu-opp.dtsi"
 #include <sunxi-libretech-all-h3-cc.dtsi>
 
 / {
index df1b9263ad0e21614a25c53ce79dcda2970bba51..6e30a564c87f6dc426edf9f60069df4402bdb379 100644 (file)
@@ -36,7 +36,7 @@
        pinctrl-0 = <&emac_rgmii_pins>;
        phy-supply = <&reg_gmac_3v3>;
        phy-handle = <&ext_rgmii_phy>;
-       phy-mode = "rgmii";
+       phy-mode = "rgmii-id";
        /delete-property/ allwinner,leds-active-low;
        status = "okay";
 };
index 4f9ba53ffaae8999788e77e2f0ca0d5f2908255d..4c3921ac236cca2cacee1b6bfbddc3ee3827351f 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               pwr {
+               led-0 {
                        label = "nanopi:green:pwr";
                        gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
 
-               status {
+               led-1 {
                        label = "nanopi:red:status";
                        gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
                };
@@ -96,7 +96,7 @@
        pinctrl-0 = <&emac_rgmii_pins>;
        phy-supply = <&reg_gmac_3v3>;
        phy-handle = <&ext_rgmii_phy>;
-       phy-mode = "rgmii";
+       phy-mode = "rgmii-id";
        status = "okay";
 };
 
index b059e20813bdff18070601e661efcaa1029ebe1f..02f8e72f0cad1db1e5490ee559cd682b5e8250a5 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               pwr {
+               led-0 {
                        label = "nanopi:green:pwr";
                        gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
 
-               status {
+               led-1 {
                        label = "nanopi:blue:status";
                        gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
                };
index 70b5f09984218e9b0e3fb9f6df8d2d66df5dd2d5..1010c1b22d2e6504ef4f0b214f5a84eb906d9e07 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               pwr {
+               led-0 {
                        label = "orangepi:green:pwr";
                        gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
 
-               status {
+               led-1 {
                        label = "orangepi:red:status";
                        gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
                };
@@ -61,6 +61,7 @@
                        label = "sw4";
                        linux,code = <BTN_0>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 
        status = "okay";
 };
 
+&cpu0 {
+       cpu-supply = <&reg_vdd_cpux>;
+};
+
 &de {
        status = "okay";
 };
        pinctrl-0 = <&emac_rgmii_pins>;
        phy-supply = <&reg_gmac_3v3>;
        phy-handle = <&ext_rgmii_phy>;
-       phy-mode = "rgmii";
+       phy-mode = "rgmii-id";
        status = "okay";
 };
 
        status = "okay";
 };
 
+&r_i2c {
+       status = "okay";
+
+       reg_vdd_cpux: regulator@65 {
+               compatible = "silergy,sy8106a";
+               reg = <0x65>;
+               regulator-name = "vdd-cpux";
+               silergy,fixed-microvolt = <1100000>;
+               regulator-min-microvolt = <1000000>;
+               regulator-max-microvolt = <1400000>;
+               regulator-ramp-delay = <200>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+};
+
 &spi0  {
        status = "okay";
 
index cb44bfa5981fd41778b2edac5e4827f7a50dad90..74e0444af19bf537e195b7d85bedfdaeca43173c 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               pwr {
+               led-0 {
                        label = "orangepi:green:pwr";
                        gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
 
-               status {
+               led-1 {
                        label = "orangepi:red:status";
                        gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
                };
        pinctrl-0 = <&emac_rgmii_pins>;
        phy-supply = <&reg_gmac_3v3>;
        phy-handle = <&ext_rgmii_phy>;
-       phy-mode = "rgmii";
+       phy-mode = "rgmii-id";
        status = "okay";
 };
 
index ef5ca6444220336398588735482ca1b2360fadc6..d13980ed7a79a41c2c9024f7b2d0fe3ba082fbc9 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               pwr {
+               led-0 {
                        label = "orangepi:green:pwr";
                        gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
                        default-state = "on";
                };
 
-               status {
+               led-1 {
                        label = "orangepi:red:status";
                        gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
                };
index c95a68541309c88091d905644ed65957e9ba3096..22530ace12d5a0c9f505f1a7c66d79e794b2c432 100644 (file)
                };
        };
 
+       leds {
+               compatible = "gpio-leds";
+
+               led-0 {
+                       label = "orangepi:green:pwr";
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+
+               led-1 {
+                       label = "orangepi:red:status";
+                       gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
        reg_vcc3v3: vcc3v3 {
                compatible = "regulator-fixed";
                regulator-name = "vcc3v3";
        status = "okay";
 };
 
+&ehci0 {
+       status = "okay";
+};
+
 &hdmi {
        status = "okay";
 };
        status = "okay";
 };
 
+&ohci0 {
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pa_pins>;
        pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
        status = "okay";
 };
+
+&usb_otg {
+       /*
+        * According to schematics CN1 MicroUSB port can be used to take
+        * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB
+        * port cannot provide power externally even if the board is powered
+        * via GPIO pins. It thus makes sense to force peripheral mode.
+        */
+       dr_mode = "peripheral";
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index 3a1c8b2efd697f4a09d548b189954a10f125bd05..ab860e20d08771693f13282ff8eb42964ac62032 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <sunxi-h3-h5.dtsi>
 
+#include <dt-bindings/thermal/thermal.h>
+
 / {
        cpus {
                #address-cells = <1>;
@@ -13,6 +15,9 @@
                        device_type = "cpu";
                        reg = <0>;
                        enable-method = "psci";
+                       clocks = <&ccu CLK_CPUX>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       #cooling-cells = <2>;
                };
 
                cpu1: cpu@1 {
@@ -20,6 +25,9 @@
                        device_type = "cpu";
                        reg = <1>;
                        enable-method = "psci";
+                       clocks = <&ccu CLK_CPUX>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       #cooling-cells = <2>;
                };
 
                cpu2: cpu@2 {
@@ -27,6 +35,9 @@
                        device_type = "cpu";
                        reg = <2>;
                        enable-method = "psci";
+                       clocks = <&ccu CLK_CPUX>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       #cooling-cells = <2>;
                };
 
                cpu3: cpu@3 {
                        device_type = "cpu";
                        reg = <3>;
                        enable-method = "psci";
+                       clocks = <&ccu CLK_CPUX>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       #cooling-cells = <2>;
                };
        };
 
        pmu {
-               compatible = "arm,cortex-a53-pmu",
-                            "arm,armv8-pmuv3";
+               compatible = "arm,cortex-a53-pmu";
                interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
                             <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
                             <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
@@ -54,6 +67,7 @@
 
        timer {
                compatible = "arm,armv8-timer";
+               arm,no-tick-in-suspend;
                interrupts = <GIC_PPI 13
                                (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
                             <GIC_PPI 14
                        resets = <&ccu RST_BUS_CE>;
                };
 
+               deinterlace: deinterlace@1e00000 {
+                       compatible = "allwinner,sun8i-h3-deinterlace";
+                       reg = <0x01e00000 0x20000>;
+                       clocks = <&ccu CLK_BUS_DEINTERLACE>,
+                                <&ccu CLK_DEINTERLACE>,
+                                <&ccu CLK_DRAM_DEINTERLACE>;
+                       clock-names = "bus", "mod", "ram";
+                       resets = <&ccu RST_BUS_DEINTERLACE>;
+                       interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
+                       interconnects = <&mbus 9>;
+                       interconnect-names = "dma-mem";
+               };
+
                mali: gpu@1e80000 {
                        compatible = "allwinner,sun50i-h5-mali", "arm,mali-450";
                        reg = <0x01e80000 0x30000>;
                                     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+                                    <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "gp",
                                          "gpmmu",
                                          "pp",
                                          "pp2",
                                          "ppmmu2",
                                          "pp3",
-                                         "ppmmu3",
-                                         "pmu";
+                                         "ppmmu3";
                        clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
                        clock-names = "bus", "core";
                        resets = <&ccu RST_BUS_GPU>;
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
                        thermal-sensors = <&ths 0>;
+
+                       trips {
+                               cpu_hot_trip: cpu-hot {
+                                       temperature = <80000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu_very_hot_trip: cpu-very-hot {
+                                       temperature = <100000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpu-hot-limit {
+                                       trip = <&cpu_hot_trip>;
+                                       cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                gpu_thermal {
index 20217e2ca4d3a5792f22f9186c63b167a03db301..4e89701df91f8f94d59e366612842835cb52b6e2 100644 (file)
@@ -41,6 +41,7 @@
  */
 
 #include "sunxi-h3-h5.dtsi"
+#include <dt-bindings/thermal/thermal.h>
 
 / {
        cpu0_opp_table: opp_table0 {
                };
        };
 
+       gpu_opp_table: gpu-opp-table {
+               compatible = "operating-points-v2";
+
+               opp-120000000 {
+                       opp-hz = /bits/ 64 <120000000>;
+               };
+
+               opp-312000000 {
+                       opp-hz = /bits/ 64 <312000000>;
+               };
+
+               opp-432000000 {
+                       opp-hz = /bits/ 64 <432000000>;
+               };
+
+               opp-576000000 {
+                       opp-hz = /bits/ 64 <576000000>;
+               };
+       };
+
        pmu {
                compatible = "arm,cortex-a7-pmu";
                interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
                        clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
                        clock-names = "bus", "core";
                        resets = <&ccu RST_BUS_GPU>;
-
-                       assigned-clocks = <&ccu CLK_GPU>;
-                       assigned-clock-rates = <384000000>;
+                       operating-points-v2 = <&gpu_opp_table>;
                };
 
                ths: thermal-sensor@1c25000 {
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
                        thermal-sensors = <&ths 0>;
+
+                       trips {
+                               cpu_hot_trip: cpu-hot {
+                                       temperature = <80000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu_very_hot_trip: cpu-very-hot {
+                                       temperature = <100000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpu-hot-limit {
+                                       trip = <&cpu_hot_trip>;
+                                       cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
        };
 };
index 5e9c3060aa08baed801cca8b461bd46cef60f4ea..9be13378d4df58b8fc54e4b4eec697a942a7400f 100644 (file)
 
                display_clocks: clock@1000000 {
                        /* compatible is in per SoC .dtsi file */
-                       reg = <0x01000000 0x100000>;
+                       reg = <0x01000000 0x10000>;
                        clocks = <&ccu CLK_BUS_DE>,
                                 <&ccu CLK_DE>;
                        clock-names = "bus",
                        };
                };
 
+               msgbox: mailbox@1c17000 {
+                       compatible = "allwinner,sun8i-h3-msgbox",
+                                    "allwinner,sun6i-a31-msgbox";
+                       reg = <0x01c17000 0x1000>;
+                       clocks = <&ccu CLK_BUS_MSGBOX>;
+                       resets = <&ccu RST_BUS_MSGBOX>;
+                       interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
+                       #mbox-cells = <1>;
+               };
+
                usb_otg: usb@1c19000 {
                        compatible = "allwinner,sun8i-h3-musb";
                        reg = <0x01c19000 0x400>;
                        compatible = "allwinner,sun8i-h3-mbus";
                        reg = <0x01c62000 0x1000>;
                        clocks = <&ccu CLK_MBUS>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
                        dma-ranges = <0x00000000 0x40000000 0xc0000000>;
                        #interconnect-cells = <1>;
                };
                        status = "disabled";
                };
 
+               i2s2: i2s@1c22800 {
+                       #sound-dai-cells = <0>;
+                       compatible = "allwinner,sun8i-h3-i2s";
+                       reg = <0x01c22800 0x400>;
+                       interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>;
+                       clock-names = "apb", "mod";
+                       dmas = <&dma 27>;
+                       resets = <&ccu RST_BUS_I2S2>;
+                       dma-names = "tx";
+                       status = "disabled";
+               };
+
                codec: codec@1c22c00 {
                        #sound-dai-cells = <0>;
                        compatible = "allwinner,sun8i-h3-codec";
                                pins = "PL0", "PL1";
                                function = "s_i2c";
                        };
+
+                       r_pwm_pin: r-pwm-pin {
+                               pins = "PL10";
+                               function = "s_pwm";
+                       };
+               };
+
+               r_pwm: pwm@1f03800 {
+                       compatible = "allwinner,sun8i-h3-pwm";
+                       reg = <0x01f03800 0x8>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&r_pwm_pin>;
+                       clocks = <&osc24M>;
+                       #pwm-cells = <3>;
+                       status = "disabled";
                };
        };
 };