]> git.baikalelectronics.ru Git - uboot.git/commitdiff
sunxi: dts: arm64: update devicetree files from Linux v6.2-rc2
authorAndre Przywara <andre.przywara@arm.com>
Thu, 12 Jan 2023 11:22:20 +0000 (11:22 +0000)
committerAndre Przywara <andre.przywara@arm.com>
Sun, 5 Mar 2023 23:33:14 +0000 (23:33 +0000)
Sync the devicetree files from the Linux kernel repo, v6.2-rc2.
This is covering the 64-bit SoCs, from arch/arm64/boot/dts/allwinner.

This enables GPU power management in the kernel for the H6, enables
Bluetooth on the Pinebook, and adds USB to the H616 devices (just
for newer Linux kernels at the moment, U-Boot support is pending).

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/axp803.dtsi
arch/arm/dts/sun50i-a64-pinebook.dts
arch/arm/dts/sun50i-h6-beelink-gs1.dts
arch/arm/dts/sun50i-h6-gpu-opp.dtsi [new file with mode: 0644]
arch/arm/dts/sun50i-h6.dtsi
arch/arm/dts/sun50i-h616-orangepi-zero2.dts
arch/arm/dts/sun50i-h616-x96-mate.dts
arch/arm/dts/sun50i-h616.dtsi

index 578ef368e2b4811bbd715585d2ad1c352c7802d2..a6b4b87f185ddf48f58373b0ab9ffb22d37224a7 100644 (file)
                compatible = "x-powers,axp803-gpio", "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 {
index c00c4c1e9e73527ced2eb70c79627960a6062814..576eae132230f02d8738b7e711eaf1ccb19b4380 100644 (file)
        status = "okay";
 };
 
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+       uart-has-rtscts;
+       status = "okay";
+
+       bluetooth {
+               compatible = "realtek,rtl8723cs-bt";
+               device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
+               enable-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
+               host-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+       };
+};
+
 &usb_otg {
        dr_mode = "host";
 };
index 649b146dfff804914759000c5e8d4e5e498ccc84..d6897ec97998368f3f4dfb915b635840e33a767d 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "sun50i-h6.dtsi"
 #include "sun50i-h6-cpu-opp.dtsi"
+#include "sun50i-h6-gpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
diff --git a/arch/arm/dts/sun50i-h6-gpu-opp.dtsi b/arch/arm/dts/sun50i-h6-gpu-opp.dtsi
new file mode 100644 (file)
index 0000000..b48049c
--- /dev/null
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2022 Clément Péron <peron.clem@gmail.com>
+
+/ {
+       gpu_opp_table: opp-table-gpu {
+               compatible = "operating-points-v2";
+
+               opp-216000000 {
+                       opp-hz = /bits/ 64 <216000000>;
+                       opp-microvolt = <810000 810000 1200000>;
+               };
+
+               opp-264000000 {
+                       opp-hz = /bits/ 64 <264000000>;
+                       opp-microvolt = <810000 810000 1200000>;
+               };
+
+               opp-312000000 {
+                       opp-hz = /bits/ 64 <312000000>;
+                       opp-microvolt = <810000 810000 1200000>;
+               };
+
+               opp-336000000 {
+                       opp-hz = /bits/ 64 <336000000>;
+                       opp-microvolt = <810000 810000 1200000>;
+               };
+
+               opp-360000000 {
+                       opp-hz = /bits/ 64 <360000000>;
+                       opp-microvolt = <820000 820000 1200000>;
+               };
+
+               opp-384000000 {
+                       opp-hz = /bits/ 64 <384000000>;
+                       opp-microvolt = <830000 830000 1200000>;
+               };
+
+               opp-408000000 {
+                       opp-hz = /bits/ 64 <408000000>;
+                       opp-microvolt = <840000 840000 1200000>;
+               };
+
+               opp-420000000 {
+                       opp-hz = /bits/ 64 <420000000>;
+                       opp-microvolt = <850000 850000 1200000>;
+               };
+
+               opp-432000000 {
+                       opp-hz = /bits/ 64 <432000000>;
+                       opp-microvolt = <860000 860000 1200000>;
+               };
+
+               opp-456000000 {
+                       opp-hz = /bits/ 64 <456000000>;
+                       opp-microvolt = <870000 870000 1200000>;
+               };
+
+               opp-504000000 {
+                       opp-hz = /bits/ 64 <504000000>;
+                       opp-microvolt = <890000 890000 1200000>;
+               };
+
+               opp-540000000 {
+                       opp-hz = /bits/ 64 <540000000>;
+                       opp-microvolt = <910000 910000 1200000>;
+               };
+
+               opp-576000000 {
+                       opp-hz = /bits/ 64 <576000000>;
+                       opp-microvolt = <930000 930000 1200000>;
+               };
+
+               opp-624000000 {
+                       opp-hz = /bits/ 64 <624000000>;
+                       opp-microvolt = <950000 950000 1200000>;
+               };
+
+               opp-756000000 {
+                       opp-hz = /bits/ 64 <756000000>;
+                       opp-microvolt = <1040000 1040000 1200000>;
+               };
+       };
+};
+
+&gpu {
+       operating-points-v2 = <&gpu_opp_table>;
+};
index afbbfc252697f878ddbef6880380e98abd608d98..3c85c8cc8eaaa292de7d3effa1f65913dc84a5f1 100644 (file)
                        clocks = <&ccu CLK_BUS_VP9>, <&ccu CLK_VP9>;
                        clock-names = "bus", "mod";
                        resets = <&ccu RST_BUS_VP9>;
+                       iommus = <&iommu 5>;
                };
 
                video-codec@1c0e000 {
                        clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
                        clock-names = "core", "bus";
                        resets = <&ccu RST_BUS_GPU>;
+                       #cooling-cells = <2>;
                        status = "disabled";
                };
 
                };
 
                gpu-thermal {
-                       polling-delay-passive = <0>;
-                       polling-delay = <0>;
+                       polling-delay-passive = <1000>;
+                       polling-delay = <2000>;
                        thermal-sensors = <&ths 1>;
+
+                       trips {
+                               gpu_alert0: gpu-alert-0 {
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               gpu_alert1: gpu-alert-1 {
+                                       temperature = <100000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               gpu_alert2: gpu-alert-2 {
+                                       temperature = <105000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               gpu-crit {
+                                       temperature = <115000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               // Forbid the GPU to go over 756MHz
+                               map0 {
+                                       trip = <&gpu_alert0>;
+                                       cooling-device = <&gpu 1 THERMAL_NO_LIMIT>;
+                               };
+
+                               // Forbid the GPU to go over 624MHz
+                               map1 {
+                                       trip = <&gpu_alert1>;
+                                       cooling-device = <&gpu 2 THERMAL_NO_LIMIT>;
+                               };
+
+                               // Forbid the GPU to go over 576MHz
+                               map2 {
+                                       trip = <&gpu_alert2>;
+                                       cooling-device = <&gpu 3 THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
        };
 };
index 02893f3ac99d41bd758957029319d034c2bbf082..cb8600d0ea1ef6007704b840a966494fae19ee0c 100644 (file)
                regulator-max-microvolt = <5000000>;
                regulator-always-on;
        };
+
+       reg_usb1_vbus: regulator-usb1-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb1-vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&reg_vcc5v>;
+               enable-active-high;
+               gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
+       };
 };
 
+&ehci1 {
+       status = "okay";
+};
+
+/* USB 2 & 3 are on headers only. */
+
 &emac0 {
        pinctrl-names = "default";
        pinctrl-0 = <&ext_rgmii_pins>;
        status = "okay";
 };
 
+&ohci1 {
+       status = "okay";
+};
+
 &r_rsb {
        status = "okay";
 
        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_usb1_vbus>;
+       status = "okay";
+};
index 6619db34714a4d906bcbe23f0db9c5850f6886da..07424c28b696c90bd33421404fb7547170bc6c5d 100644 (file)
        };
 };
 
+&ehci0 {
+       status = "okay";
+};
+
+&ehci2 {
+       status = "okay";
+};
+
 &ir {
        status = "okay";
 };
        status = "okay";
 };
 
+&ohci0 {
+       status = "okay";
+};
+
+&ohci2 {
+       status = "okay";
+};
+
 &r_rsb {
        status = "okay";
 
        pinctrl-0 = <&uart0_ph_pins>;
        status = "okay";
 };
+
+&usbotg {
+       dr_mode = "host";       /* USB A type receptable */
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index 622a1f7d16412f9c348f2f7b4b350d5f6ebbbbc6..74aed0d232a9cfa88af43f5a2688d90d1ff1cfa5 100644 (file)
                        };
                };
 
+               usbotg: usb@5100000 {
+                       compatible = "allwinner,sun50i-h616-musb",
+                                    "allwinner,sun8i-h3-musb";
+                       reg = <0x05100000 0x0400>;
+                       clocks = <&ccu CLK_BUS_OTG>;
+                       resets = <&ccu RST_BUS_OTG>;
+                       interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "mc";
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       extcon = <&usbphy 0>;
+                       status = "disabled";
+               };
+
+               usbphy: phy@5100400 {
+                       compatible = "allwinner,sun50i-h616-usb-phy";
+                       reg = <0x05100400 0x24>,
+                             <0x05101800 0x14>,
+                             <0x05200800 0x14>,
+                             <0x05310800 0x14>,
+                             <0x05311800 0x14>;
+                       reg-names = "phy_ctrl",
+                                   "pmu0",
+                                   "pmu1",
+                                   "pmu2",
+                                   "pmu3";
+                       clocks = <&ccu CLK_USB_PHY0>,
+                                <&ccu CLK_USB_PHY1>,
+                                <&ccu CLK_USB_PHY2>,
+                                <&ccu CLK_USB_PHY3>,
+                                <&ccu CLK_BUS_EHCI2>;
+                       clock-names = "usb0_phy",
+                                     "usb1_phy",
+                                     "usb2_phy",
+                                     "usb3_phy",
+                                     "pmu2_clk";
+                       resets = <&ccu RST_USB_PHY0>,
+                                <&ccu RST_USB_PHY1>,
+                                <&ccu RST_USB_PHY2>,
+                                <&ccu RST_USB_PHY3>;
+                       reset-names = "usb0_reset",
+                                     "usb1_reset",
+                                     "usb2_reset",
+                                     "usb3_reset";
+                       status = "disabled";
+                       #phy-cells = <1>;
+               };
+
+               ehci0: usb@5101000 {
+                       compatible = "allwinner,sun50i-h616-ehci",
+                                    "generic-ehci";
+                       reg = <0x05101000 0x100>;
+                       interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_OHCI0>,
+                                <&ccu CLK_BUS_EHCI0>,
+                                <&ccu CLK_USB_OHCI0>;
+                       resets = <&ccu RST_BUS_OHCI0>,
+                                <&ccu RST_BUS_EHCI0>;
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
+               ohci0: usb@5101400 {
+                       compatible = "allwinner,sun50i-h616-ohci",
+                                    "generic-ohci";
+                       reg = <0x05101400 0x100>;
+                       interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_OHCI0>,
+                                <&ccu CLK_USB_OHCI0>;
+                       resets = <&ccu RST_BUS_OHCI0>;
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
+               ehci1: usb@5200000 {
+                       compatible = "allwinner,sun50i-h616-ehci",
+                                    "generic-ehci";
+                       reg = <0x05200000 0x100>;
+                       interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_OHCI1>,
+                                <&ccu CLK_BUS_EHCI1>,
+                                <&ccu CLK_USB_OHCI1>;
+                       resets = <&ccu RST_BUS_OHCI1>,
+                                <&ccu RST_BUS_EHCI1>;
+                       phys = <&usbphy 1>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
+               ohci1: usb@5200400 {
+                       compatible = "allwinner,sun50i-h616-ohci",
+                                    "generic-ohci";
+                       reg = <0x05200400 0x100>;
+                       interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_OHCI1>,
+                                <&ccu CLK_USB_OHCI1>;
+                       resets = <&ccu RST_BUS_OHCI1>;
+                       phys = <&usbphy 1>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
+               ehci2: usb@5310000 {
+                       compatible = "allwinner,sun50i-h616-ehci",
+                                    "generic-ehci";
+                       reg = <0x05310000 0x100>;
+                       interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_OHCI2>,
+                                <&ccu CLK_BUS_EHCI2>,
+                                <&ccu CLK_USB_OHCI2>;
+                       resets = <&ccu RST_BUS_OHCI2>,
+                                <&ccu RST_BUS_EHCI2>;
+                       phys = <&usbphy 2>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
+               ohci2: usb@5310400 {
+                       compatible = "allwinner,sun50i-h616-ohci",
+                                    "generic-ohci";
+                       reg = <0x05310400 0x100>;
+                       interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_OHCI2>,
+                                <&ccu CLK_USB_OHCI2>;
+                       resets = <&ccu RST_BUS_OHCI2>;
+                       phys = <&usbphy 2>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
+               ehci3: usb@5311000 {
+                       compatible = "allwinner,sun50i-h616-ehci",
+                                    "generic-ehci";
+                       reg = <0x05311000 0x100>;
+                       interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_OHCI3>,
+                                <&ccu CLK_BUS_EHCI3>,
+                                <&ccu CLK_USB_OHCI3>;
+                       resets = <&ccu RST_BUS_OHCI3>,
+                                <&ccu RST_BUS_EHCI3>;
+                       phys = <&usbphy 3>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
+               ohci3: usb@5311400 {
+                       compatible = "allwinner,sun50i-h616-ohci",
+                                    "generic-ohci";
+                       reg = <0x05311400 0x100>;
+                       interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_OHCI3>,
+                                <&ccu CLK_USB_OHCI3>;
+                       resets = <&ccu RST_BUS_OHCI3>;
+                       phys = <&usbphy 3>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
                rtc: rtc@7000000 {
                        compatible = "allwinner,sun50i-h616-rtc";
                        reg = <0x07000000 0x400>;