Merge tag 'sunxi-dt-for-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi...
authorArnd Bergmann <arnd@arndb.de>
Thu, 21 May 2020 20:35:34 +0000 (22:35 +0200)
committerArnd Bergmann <arnd@arndb.de>
Thu, 21 May 2020 20:35:59 +0000 (22:35 +0200)
Our usual number of patches to improve the Allwinner Device Tree
support, including:
  - Support for the IOMMU on the H6
  - Support for cpufreq / thermal throttling on the H6
  - Support for the mailbox on the A64, A83t, H3, H5 and H6
  - New boards: A20-OLinuXino-LIME-eMMC

* tag 'sunxi-dt-for-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (23 commits)
  arm64: dts: allwinner: h6: Add IOMMU
  arm64: dts: allwinner: h6: Enable CPU opp tables for Tanix TX6
  arm64: dts: allwinner: h6: add voltage range to OPP table
  arm64: dts: allwinner: sun50i-a64: Add missing address/size-cells
  arm64: dts: allwinner: h6: Enable CPU opp tables for Pine H64
  arm64: dts: allwinner: Sort Pine H64 device-tree nodes
  arm64: dts: allwinner: h6: Enable CPU opp tables for Orange Pi 3
  arm64: dts: allwinner: h6: Enable CPU opp tables for Beelink GS1
  arm64: dts: allwinner: h6: Add CPU Operating Performance Points table
  arm64: dts: allwinner: h6: Add thermal trip points/cooling map
  arm64: dts: allwinner: h6: Add clock to CPU cores
  arm64: allwinner: h6: orangepi-lite2: Support BT+WIFI combo module
  arm64: dts: allwinner: h6: orangepi: Disable OTG mode
  arm64: dts: allwinner: h6: orangepi: Add gpio power supply
  ARM: dts: sun8i-h2-plus-bananapi-m2-zero: Fix led polarity
  arm64: dts: allwinner: h6: Add msgbox node
  arm64: dts: allwinner: a64: Add msgbox node
  ARM: dts: sunxi: h3/h5: Add msgbox node
  ARM: dts: sunxi: a83t: Add msgbox node
  ARM: dts: sun8i-h3: add opp table for mali gpu
  ...

Link: https://lore.kernel.org/r/cfa66bd9-f74c-4614-9ea5-9ef8546cc571.lettre@localhost
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 files changed:
Documentation/devicetree/bindings/arm/sunxi.yaml
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/sun7i-a20-olinuxino-lime-emmc.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-a83t.dtsi
arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
arch/arm/boot/dts/sun8i-h3.dtsi
arch/arm/boot/dts/sunxi-h3-h5.dtsi
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi

index abf2d97fb7ae32e35bf5c1a061062bc49b4d2e48..87817ff0cd358d876d9fca38def37726b06f8139 100644 (file)
@@ -561,6 +561,11 @@ properties:
           - const: olimex,a20-olinuxino-lime
           - const: allwinner,sun7i-a20
 
+      - description: Olimex A20-OlinuXino LIME (with eMMC)
+        items:
+          - const: olimex,a20-olinuxino-lime-emmc
+          - const: allwinner,sun7i-a20
+
       - description: Olimex A20-OlinuXino LIME2
         items:
           - const: olimex,a20-olinuxino-lime2
index 73c9f284ed5a0ee8c56c1be1fc1c6d6cfc375dda..e2c5fc3e5d5ed9f8477a619369c94dd44f78b02e 100644 (file)
@@ -1121,6 +1121,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
        sun7i-a20-olimex-som204-evb.dtb \
        sun7i-a20-olimex-som204-evb-emmc.dtb \
        sun7i-a20-olinuxino-lime.dtb \
+       sun7i-a20-olinuxino-lime-emmc.dtb \
        sun7i-a20-olinuxino-lime2.dtb \
        sun7i-a20-olinuxino-lime2-emmc.dtb \
        sun7i-a20-olinuxino-micro.dtb \
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime-emmc.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime-emmc.dts
new file mode 100644 (file)
index 0000000..033cab3
--- /dev/null
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Olimex Ltd.
+ *   Author: Stefan Mavrodiev <stefan@olimex.com>
+ */
+
+#include "sun7i-a20-olinuxino-lime.dts"
+
+/ {
+       model = "Olimex A20-OLinuXino-LIME-eMMC";
+       compatible = "olimex,a20-olinuxino-lime-emmc", "allwinner,sun7i-a20";
+
+       mmc2_pwrseq: pwrseq {
+               compatible = "mmc-pwrseq-emmc";
+               reset-gpios = <&pio 2 16 GPIO_ACTIVE_LOW>;
+       };
+};
+
+&mmc2 {
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       non-removable;
+       mmc-pwrseq = <&mmc2_pwrseq>;
+       status = "okay";
+
+       emmc: emmc@0 {
+               reg = <0>;
+               compatible = "mmc-card";
+               broken-hpi;
+       };
+};
index 655404d6d3a3c7794376d8f5fdd246468b93be74..c010b27fdb6a662a0d912d7100afd1f693f4d2b4 100644 (file)
                        clock-names = "bus", "mod";
                };
 
+               msgbox: mailbox@1c17000 {
+                       compatible = "allwinner,sun8i-a83t-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-a83t-musb",
                                     "allwinner,sun8i-a33-musb";
index d277d043031b230f9de1e3f22da70ba7c69db760..4c6704e4c57ecdabf6b08852a0621894ffe89c88 100644 (file)
@@ -31,7 +31,7 @@
 
                pwr_led {
                        label = "bananapi-m2-zero:red:pwr";
-                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_LOW>; /* PL10 */
                        default-state = "on";
                };
        };
index e83aa6866e7ea5de7e25880f20b0ddb48079cdbc..4e89701df91f8f94d59e366612842835cb52b6e2 100644 (file)
                };
        };
 
+       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 {
index 01a5df9aa71b3db052a1eb836f67107d631040ae..22d533d18992bec6ce22943a9e48494ed87515d8 100644 (file)
                        };
                };
 
+               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>;
index 5fa9ca0191a82f302d35bfcca1c397b6f665af92..f3f8e177ab610352846905ec7a4edffb8341c2df 100644 (file)
                };
        };
 
+       leds {
+               compatible = "gpio-leds";
+
+               led-0 {
+                       label = "a64-olinuxino:red:user";
+                       gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
+               };
+       };
+
        reg_usb1_vbus: usb1-vbus {
                compatible = "regulator-fixed";
                regulator-name = "usb1-vbus";
index 31143fe64d91ff38acd52348dbead36c94358d7c..ddd34183d5e4125d76363fe9425e98a0c337d2bf 100644 (file)
                        resets = <&ccu RST_BUS_CE>;
                };
 
+               msgbox: mailbox@1c17000 {
+                       compatible = "allwinner,sun50i-a64-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-a33-musb";
                        reg = <0x01c19000 0x0400>;
                        compatible = "allwinner,sun50i-a64-mbus";
                        reg = <0x01c62000 0x1000>;
                        clocks = <&ccu 112>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
                        dma-ranges = <0x00000000 0x40000000 0xc0000000>;
                        #interconnect-cells = <1>;
                };
index 8f09d209359b74c8edd0d6fb5861ec52fbbb3038..3f7ceeb1a767a70abd44166dd9f3ee1800fbad90 100644 (file)
@@ -4,6 +4,7 @@
 /dts-v1/;
 
 #include "sun50i-h6.dtsi"
+#include "sun50i-h6-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
        };
 };
 
+&cpu0 {
+       cpu-supply = <&reg_dcdca>;
+};
+
 &de {
        status = "okay";
 };
                        reg_dcdca: dcdca {
                                regulator-always-on;
                                regulator-min-microvolt = <810000>;
-                               regulator-max-microvolt = <1080000>;
+                               regulator-max-microvolt = <1160000>;
+                               regulator-ramp-delay = <2500>;
                                regulator-name = "vdd-cpu";
                        };
 
                                regulator-enable-ramp-delay = <32000>;
                                regulator-min-microvolt = <810000>;
                                regulator-max-microvolt = <1080000>;
+                               regulator-ramp-delay = <2500>;
                                regulator-name = "vdd-gpu";
                        };
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi
new file mode 100644 (file)
index 0000000..1a5eddc
--- /dev/null
@@ -0,0 +1,117 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2020 Ondrej Jirman <megous@megous.com>
+// Copyright (C) 2020 Clément Péron <peron.clem@gmail.com>
+
+/ {
+       cpu_opp_table: cpu-opp-table {
+               compatible = "allwinner,sun50i-h6-operating-points";
+               nvmem-cells = <&cpu_speed_grade>;
+               opp-shared;
+
+               opp@480000000 {
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       opp-hz = /bits/ 64 <480000000>;
+
+                       opp-microvolt-speed0 = <880000 880000 1200000>;
+                       opp-microvolt-speed1 = <820000 820000 1200000>;
+                       opp-microvolt-speed2 = <820000 820000 1200000>;
+               };
+
+               opp@720000000 {
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       opp-hz = /bits/ 64 <720000000>;
+
+                       opp-microvolt-speed0 = <880000 880000 1200000>;
+                       opp-microvolt-speed1 = <820000 820000 1200000>;
+                       opp-microvolt-speed2 = <820000 820000 1200000>;
+               };
+
+               opp@816000000 {
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       opp-hz = /bits/ 64 <816000000>;
+
+                       opp-microvolt-speed0 = <880000 880000 1200000>;
+                       opp-microvolt-speed1 = <820000 820000 1200000>;
+                       opp-microvolt-speed2 = <820000 820000 1200000>;
+               };
+
+               opp@888000000 {
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       opp-hz = /bits/ 64 <888000000>;
+
+                       opp-microvolt-speed0 = <880000 880000 1200000>;
+                       opp-microvolt-speed1 = <820000 820000 1200000>;
+                       opp-microvolt-speed2 = <820000 820000 1200000>;
+               };
+
+               opp@1080000000 {
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       opp-hz = /bits/ 64 <1080000000>;
+
+                       opp-microvolt-speed0 = <940000 940000 1200000>;
+                       opp-microvolt-speed1 = <880000 880000 1200000>;
+                       opp-microvolt-speed2 = <880000 880000 1200000>;
+               };
+
+               opp@1320000000 {
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       opp-hz = /bits/ 64 <1320000000>;
+
+                       opp-microvolt-speed0 = <1000000 1000000 1200000>;
+                       opp-microvolt-speed1 = <940000 940000 1200000>;
+                       opp-microvolt-speed2 = <940000 940000 1200000>;
+               };
+
+               opp@1488000000 {
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       opp-hz = /bits/ 64 <1488000000>;
+
+                       opp-microvolt-speed0 = <1060000 1060000 1200000>;
+                       opp-microvolt-speed1 = <1000000 1000000 1200000>;
+                       opp-microvolt-speed2 = <1000000 1000000 1200000>;
+               };
+
+               opp@1608000000 {
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       opp-hz = /bits/ 64 <1608000000>;
+
+                       opp-microvolt-speed0 = <1090000 1090000 1200000>;
+                       opp-microvolt-speed1 = <1030000 1030000 1200000>;
+                       opp-microvolt-speed2 = <1030000 1030000 1200000>;
+               };
+
+               opp@1704000000 {
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       opp-hz = /bits/ 64 <1704000000>;
+
+                       opp-microvolt-speed0 = <1120000 1120000 1200000>;
+                       opp-microvolt-speed1 = <1060000 1060000 1200000>;
+                       opp-microvolt-speed2 = <1060000 1060000 1200000>;
+               };
+
+               opp@1800000000 {
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       opp-hz = /bits/ 64 <1800000000>;
+
+                       opp-microvolt-speed0 = <1160000 1160000 1200000>;
+                       opp-microvolt-speed1 = <1100000 1100000 1200000>;
+                       opp-microvolt-speed2 = <1100000 1100000 1200000>;
+               };
+       };
+};
+
+&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 47f579610dcc3dc2bcb2efe5ee6833b68c790b47..15c9dd8c447955f9bf0f2e24b8eaeaf316da62d7 100644 (file)
@@ -4,6 +4,7 @@
 /dts-v1/;
 
 #include "sun50i-h6.dtsi"
+#include "sun50i-h6-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
                                regulator-always-on;
                                regulator-min-microvolt = <800000>;
                                regulator-max-microvolt = <1160000>;
+                               regulator-ramp-delay = <2500>;
                                regulator-name = "vdd-cpu";
                        };
 
                                regulator-enable-ramp-delay = <32000>;
                                regulator-min-microvolt = <810000>;
                                regulator-max-microvolt = <1080000>;
+                               regulator-ramp-delay = <2500>;
                                regulator-name = "vdd-gpu";
                        };
 
index e7ca75c0d0f76dd360861089d7c4d653b82b03e9..e8770858b5d058090da5ca0f99b5134680fccb14 100644 (file)
@@ -6,4 +6,69 @@
 / {
        model = "OrangePi Lite2";
        compatible = "xunlong,orangepi-lite2", "allwinner,sun50i-h6";
+
+       aliases {
+               serial1 = &uart1; /* BT-UART */
+       };
+
+       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 */
+               post-power-on-delay-ms = <200>;
+       };
+};
+
+&mmc1 {
+       vmmc-supply = <&reg_cldo2>;
+       vqmmc-supply = <&reg_bldo3>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       brcm: sdio-wifi@1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&r_pio>;
+               interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>;  /* PM0 */
+               interrupt-names = "host-wake";
+       };
+};
+
+&reg_cldo2 {
+       /*
+        * This regulator is connected with CLDO3.
+        * Before the kernel can support synchronized
+        * enable of coupled regulators, keep them
+        * both always on as a ugly hack.
+        */
+       regulator-always-on;
+};
+
+&reg_cldo3 {
+       /*
+        * This regulator is connected with CLDO2.
+        * See the comments for CLDO2.
+        */
+       regulator-always-on;
+};
+
+/* There's the BT part of the AP6255 connected to that UART */
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+       uart-has-rtscts;
+       status = "okay";
+
+       bluetooth {
+               compatible = "brcm,bcm4345c5";
+               clocks = <&rtc 1>;
+               clock-names = "lpo";
+               device-wakeup-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
+               host-wakeup-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */
+               shutdown-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
+               max-speed = <1500000>;
+       };
 };
index 9287976c4a50ae6db664391d4975970528181fd3..ebc120a9232f64fc8b43d6a24df6728259b983a1 100644 (file)
        status = "okay";
 };
 
+&pio {
+       vcc-pc-supply = <&reg_bldo2>;
+       vcc-pd-supply = <&reg_cldo1>;
+       vcc-pg-supply = <&reg_aldo1>;
+};
+
 &r_i2c {
        status = "okay";
 
        status = "okay";
 };
 
+&r_pio {
+       vcc-pm-supply = <&reg_bldo3>;
+};
+
 &rtc {
        clocks = <&ext_osc32k>;
 };
 };
 
 &usb2otg {
-       dr_mode = "otg";
+       /*
+        * OrangePi Lite 2 and One Plus, where this DT is used, don't
+        * have a controllable VBUS even though they do have an ID pin.
+        * Using it as anything but a USB host is unsafe.
+        */
+       dr_mode = "host";
        status = "okay";
 };
 
index b0642d84193350891d33607e8255d8951eda52e6..af85b2074867fdd6d13c30196b1620fb717ea868 100644 (file)
@@ -4,6 +4,7 @@
 /dts-v1/;
 
 #include "sun50i-h6.dtsi"
+#include "sun50i-h6-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
        };
 };
 
+&cpu0 {
+       cpu-supply = <&reg_dcdca>;
+};
+
+&de {
+       status = "okay";
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci3 {
+       status = "okay";
+};
+
 &emac {
        pinctrl-names = "default";
        pinctrl-0 = <&ext_rgmii_pins>;
        status = "okay";
 };
 
-&mdio {
-       ext_rgmii_phy: ethernet-phy@1 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <1>;
-       };
-};
-
-&de {
-       status = "okay";
-};
-
 &gpu {
        mali-supply = <&reg_dcdcc>;
        status = "okay";
        };
 };
 
-&ehci0 {
-       status = "okay";
-};
-
-&ehci3 {
-       status = "okay";
+&mdio {
+       ext_rgmii_phy: ethernet-phy@1 {
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <1>;
+       };
 };
 
 &mmc0 {
                        reg_dcdca: dcdca {
                                regulator-always-on;
                                regulator-min-microvolt = <810000>;
-                               regulator-max-microvolt = <1080000>;
+                               regulator-max-microvolt = <1160000>;
+                               regulator-ramp-delay = <2500>;
                                regulator-name = "vdd-cpu";
                        };
 
                                regulator-enable-ramp-delay = <32000>;
                                regulator-min-microvolt = <810000>;
                                regulator-max-microvolt = <1080000>;
+                               regulator-ramp-delay = <2500>;
                                regulator-name = "vdd-gpu";
                        };
 
index 83e6cb0e59cea5a147cf6da457e2416a85e1fc9d..be81330db14f6642eba8f7b0995364ec9206414b 100644 (file)
@@ -4,6 +4,7 @@
 /dts-v1/;
 
 #include "sun50i-h6.dtsi"
+#include "sun50i-h6-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
                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 {
@@ -56,6 +68,7 @@
 };
 
 &gpu {
+       mali-supply = <&reg_vdd_cpu_gpu>;
        status = "okay";
 };
 
index b9ab7d8fa8af81b7ebe26d99ca89162e131e55fd..78b1361dfbb963b3fd94c92cd714df99dd488203 100644 (file)
@@ -25,6 +25,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 {
@@ -32,6 +35,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 {
@@ -39,6 +45,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 {
@@ -46,6 +55,9 @@
                        device_type = "cpu";
                        reg = <3>;
                        enable-method = "psci";
+                       clocks = <&ccu CLK_CPUX>;
+                       clock-latency-ns = <244144>; /* 8 32k periods */
+                       #cooling-cells = <2>;
                };
        };
 
                                clock-names = "bus",
                                              "mod";
                                resets = <&display_clocks RST_MIXER0>;
+                               iommus = <&iommu 0>;
 
                                ports {
                                        #address-cells = <1>;
                        #dma-cells = <1>;
                };
 
+               msgbox: mailbox@3003000 {
+                       compatible = "allwinner,sun50i-h6-msgbox",
+                                    "allwinner,sun6i-a31-msgbox";
+                       reg = <0x03003000 0x1000>;
+                       clocks = <&ccu CLK_BUS_MSGBOX>;
+                       resets = <&ccu RST_BUS_MSGBOX>;
+                       interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+                       #mbox-cells = <1>;
+               };
+
                sid: efuse@3006000 {
                        compatible = "allwinner,sun50i-h6-sid";
                        reg = <0x03006000 0x400>;
                        ths_calibration: thermal-sensor-calibration@14 {
                                reg = <0x14 0x8>;
                        };
+
+                       cpu_speed_grade: cpu-speed-grade@1c {
+                               reg = <0x1c 0x4>;
+                       };
                };
 
                watchdog: watchdog@30090a0 {
                        #interrupt-cells = <3>;
                };
 
+               iommu: iommu@30f0000 {
+                       compatible = "allwinner,sun50i-h6-iommu";
+                       reg = <0x030f0000 0x10000>;
+                       interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_IOMMU>;
+                       resets = <&ccu RST_BUS_IOMMU>;
+                       #iommu-cells = <1>;
+               };
+
                mmc0: mmc@4020000 {
                        compatible = "allwinner,sun50i-h6-mmc",
                                     "allwinner,sun50i-a64-mmc";
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
                        thermal-sensors = <&ths 0>;
+
+                       trips {
+                               cpu_alert: cpu-alert {
+                                       temperature = <85000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu-crit {
+                                       temperature = <100000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu_alert>;
+                                       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 {