]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge tag 'sunxi-dt64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorArnd Bergmann <arnd@arndb.de>
Tue, 2 Oct 2018 08:28:14 +0000 (10:28 +0200)
committerArnd Bergmann <arnd@arndb.de>
Tue, 2 Oct 2018 08:28:23 +0000 (10:28 +0200)
Allwinner arm64 DT changes for 4.20

Our usual set of DT changes for the arm64 Allwinner SoCs.

The most notable things are:
  - HDMI support on the A64
  - New boards: OrangePi One Plus

* tag 'sunxi-dt64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (28 commits)
  arm64: dts: allwinner: a64: a64-olinuxino: set the PHY TX delay
  arm64: dts: allwinner: a64: Enable HDMI output on A64 boards w/ HDMI
  arm64: dts: allwinner: a64: Add display pipeline
  arm64: dts: allwinner: h6: add system controller device tree node
  arm64: dts: allwinner: h6: Add OrangePi One Plus initial support
  arm64: dts: allwinner: a64: Rename r_i2c_pins_a label to r_i2c_pl89_pins
  arm64: dts: allwinner: a64: Rename uart0_pins_a label to uart0_pb_pins
  arm64: dts: allwinner: a64: Split out data strobe pin from mmc2 pinmux
  arm64: dts: allwinner: a64: NanoPi-A64: Add blue status LED
  arm64: dts: allwinner: a64: NanoPi-A64: Add Wifi chip
  arm64: dts: allwinner: a64: NanoPi-A64: Add Ethernet
  arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage
  arm64: dts: allwinner: a64: Olinuxino: enable USB
  arm64: dts: allwinner: a64: Olinuxino: add Ethernet nodes
  arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage
  arm64: dts: allwinner: a64: Orange Pi Win: Adjust CSI power rails
  arm64: dts: allwinner: a64: Orange Pi Win: Add SPI flash node
  arm64: dts: allwinner: a64: Orange Pi Win: Add SDIO node
  arm64: dts: allwinner: a64: Orange Pi Win: Add LED node
  arm64: dts: allwinner: a64: Orange Pi Win: Add UARTs
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
14 files changed:
arch/arm64/boot/dts/allwinner/Makefile
arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts [new file with mode: 0644]
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts [new file with mode: 0644]
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi

index b7f6cfbeb6156fbeff00c3274760e7a9e21c9d59..8d4f97f279e022570b5bb17c5f0e4d692d71f584 100644 (file)
@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-nanopi-a64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-lts.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinebook.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
@@ -17,4 +18,5 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-one-plus.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
index eac4793c850249b2016e8ddf4bffb710b3e6e129..6cb2b7f0c8173387f1914ab5b3f143494ad1523b 100644 (file)
@@ -203,7 +203,7 @@ &reg_rtc_ldo {
 
 &uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };
 
index 094cfed13df97aa35e58ec6e06dc86fcbc18767a..ef1c90401bb2a027a4823ad4e50268a1523beca5 100644 (file)
@@ -60,6 +60,17 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
+       hdmi-connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
 
@@ -86,6 +97,10 @@ wifi_pwrseq: wifi_pwrseq {
        };
 };
 
+&de {
+       status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };
@@ -103,6 +118,17 @@ &emac {
        status = "okay";
 };
 
+&hdmi {
+       hvcc-supply = <&reg_dldo1>;
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
 &i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins>;
@@ -151,7 +177,7 @@ brcmf: wifi@1 {
 
 &mmc2 {
        pinctrl-names = "default";
-       pinctrl-0 = <&mmc2_pins>;
+       pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
        vmmc-supply = <&reg_dcdc1>;
        bus-width = <8>;
        non-removable;
@@ -302,7 +328,7 @@ &simplefb_hdmi {
 
 &uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };
 
index 98dbff19f5cccd6db3711cbe611f2fe3f0f8128f..31884dbc8838fd4681f3021f8a302ec3ffe2efa5 100644 (file)
@@ -51,12 +51,44 @@ / {
        compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64";
 
        aliases {
+               ethernet0 = &emac;
                serial0 = &uart0;
        };
 
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       hdmi-connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               blue {
+                       label = "nanopi-a64:blue:status";
+                       gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
+               };
+       };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&rtc 1>;
+               clock-names = "ext_clock";
+               reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
+       };
+};
+
+&de {
+       status = "okay";
 };
 
 &ehci0 {
@@ -67,6 +99,26 @@ &ehci1 {
        status = "okay";
 };
 
+&emac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       phy-mode = "rgmii";
+       phy-handle = <&ext_rgmii_phy>;
+       phy-supply = <&reg_dcdc1>;
+       status = "okay";
+};
+
+&hdmi {
+       hvcc-supply = <&reg_dldo1>;
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
 /* i2c1 connected with gpio headers like pine64, bananapi */
 &i2c1 {
        pinctrl-names = "default";
@@ -78,6 +130,13 @@ &i2c1_pins {
        bias-pull-up;
 };
 
+&mdio {
+       ext_rgmii_phy: ethernet-phy@1 {
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <7>;
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;
@@ -88,6 +147,24 @@ &mmc0 {
        status = "okay";
 };
 
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+       vmmc-supply = <&reg_dcdc1>;
+       vqmmc-supply = <&reg_dldo4>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       rtl8189etv: wifi@1 {
+               reg = <1>;
+               interrupt-parent = <&r_pio>;
+               interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
+               interrupt-names = "host-wake";
+       };
+};
+
 &ohci0 {
        status = "okay";
 };
@@ -125,9 +202,9 @@ &reg_aldo3 {
 
 &reg_dcdc1 {
        regulator-always-on;
-       regulator-min-microvolt = <3000000>;
-       regulator-max-microvolt = <3000000>;
-       regulator-name = "vcc-3v";
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-3v3";
 };
 
 &reg_dcdc2 {
@@ -201,7 +278,7 @@ &simplefb_hdmi {
 
 &uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };
 
index 3f531393eaee9a8cbae54ad5e1f5fd0e1b3aafbb..f7a4bccaa5d40a0a4c15309cf3b832eb711f0fbf 100644 (file)
@@ -51,6 +51,7 @@ / {
        compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64";
 
        aliases {
+               ethernet0 = &emac;
                serial0 = &uart0;
        };
 
@@ -58,12 +59,74 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
+       hdmi-connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
+       reg_usb1_vbus: usb1-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb1-vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-boot-on;
+               enable-active-high;
+               gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */
+               status = "okay";
+       };
+
        wifi_pwrseq: wifi_pwrseq {
                compatible = "mmc-pwrseq-simple";
                reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
        };
 };
 
+&de {
+       status = "okay";
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&emac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       phy-mode = "rgmii";
+       phy-handle = <&ext_rgmii_phy>;
+       phy-supply = <&reg_dcdc1>;
+       allwinner,tx-delay-ps = <600>;
+       status = "okay";
+};
+
+&hdmi {
+       hvcc-supply = <&reg_dldo1>;
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
+&mdio {
+       ext_rgmii_phy: ethernet-phy@1 {
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;
@@ -92,6 +155,14 @@ rtl8723bs: wifi@1 {
        };
 };
 
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
 &r_rsb {
        status = "okay";
 
@@ -100,6 +171,7 @@ axp803: pmic@3a3 {
                reg = <0x3a3>;
                interrupt-parent = <&r_intc>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+               x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
        };
 };
 
@@ -142,10 +214,14 @@ &reg_dcdc2 {
 
 /* DCDC3 is polyphased with DCDC2 */
 
+/*
+ * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal
+ * 1.35V that the PMIC can drive.
+ */
 &reg_dcdc5 {
        regulator-always-on;
-       regulator-min-microvolt = <1500000>;
-       regulator-max-microvolt = <1500000>;
+       regulator-min-microvolt = <1360000>;
+       regulator-max-microvolt = <1360000>;
        regulator-name = "vcc-ddr3";
 };
 
@@ -180,6 +256,11 @@ &reg_dldo4 {
        regulator-name = "vcc-wifi-io";
 };
 
+&reg_drivevbus {
+       regulator-name = "usb0-vbus";
+       status = "okay";
+};
+
 &reg_eldo1 {
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
@@ -220,6 +301,18 @@ &simplefb_hdmi {
 
 &uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&uart0_pb_pins>;
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usbphy {
        status = "okay";
+       usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
+       usb0_vbus-supply = <&reg_drivevbus>;
+       usb1_vbus-supply = <&reg_usb1_vbus>;
 };
index 1221764f5719cfe19a97b63c440ff8465e2b5dec..b0c64f75792c163bd7d0000ea023541079fbd1be 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
+ * Copyright (C) 2017-2018 Samuel Holland <samuel@sholland.org>
  *
  * This file is dual-licensed: you can use it either under the terms
  * of the GPL or the X11 license, at your option. Note that this dual
@@ -51,23 +52,127 @@ / {
        compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
 
        aliases {
+               ethernet0 = &emac;
                serial0 = &uart0;
+               serial1 = &uart1;
+               serial2 = &uart2;
+               serial3 = &uart3;
+               serial4 = &uart4;
        };
 
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       hdmi-connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               status {
+                       label = "orangepi:green:status";
+                       gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
+               };
+       };
+
+       reg_gmac_3v3: gmac-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "gmac-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               enable-active-high;
+               gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>; /* PD14 */
+               status = "okay";
+       };
+
+       reg_usb1_vbus: usb1-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb1-vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-boot-on;
+               enable-active-high;
+               gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* PD7 */
+               status = "okay";
+       };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
+       };
+};
+
+&de {
+       status = "okay";
+};
+
+&ehci0 {
+       status = "okay";
 };
 
 &ehci1 {
        status = "okay";
 };
 
+&emac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       phy-mode = "rgmii";
+       phy-handle = <&ext_rgmii_phy>;
+       phy-supply = <&reg_gmac_3v3>;
+       status = "okay";
+};
+
+&hdmi {
+       hvcc-supply = <&reg_dldo1>;
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
+&mdio {
+       ext_rgmii_phy: ethernet-phy@1 {
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;
        vmmc-supply = <&reg_dcdc1>;
-       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+       disable-wp;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+       vmmc-supply = <&reg_dldo2>;
+       vqmmc-supply = <&reg_dldo4>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&ohci0 {
        status = "okay";
 };
 
@@ -89,9 +194,8 @@ axp803: pmic@3a3 {
 #include "axp803.dtsi"
 
 &reg_aldo1 {
-       regulator-always-on;
-       regulator-min-microvolt = <1800000>;
-       regulator-max-microvolt = <3300000>;
+       regulator-min-microvolt = <2800000>;
+       regulator-max-microvolt = <2800000>;
        regulator-name = "afvcc-csi";
 };
 
@@ -163,12 +267,23 @@ &reg_dldo4 {
        regulator-name = "vcc-wifi-io";
 };
 
+&reg_drivevbus {
+       regulator-name = "usb0-vbus";
+       status = "okay";
+};
+
 &reg_eldo1 {
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-name = "cpvdd";
 };
 
+&reg_eldo3 {
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1800000>;
+       regulator-name = "dvdd-csi";
+};
+
 &reg_fldo1 {
        regulator-min-microvolt = <1200000>;
        regulator-max-microvolt = <1200000>;
@@ -195,13 +310,61 @@ &simplefb_hdmi {
        vcc-hdmi-supply = <&reg_dldo1>;
 };
 
+&spi0 {
+       status = "okay";
+
+       spi-flash@0 {
+               compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <80000000>;
+               m25p,fast-read;
+               status = "okay";
+       };
+};
+
+/* On debug connector */
 &uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };
 
-&usbphy {
+/* Bluetooth */
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
        status = "okay";
 };
 
+/* On Pi-2 connector, RTS/CTS optional */
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
+       status = "disabled";
+};
+
+/* On Pi-2 connector, RTS/CTS optional */
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_pins>;
+       status = "disabled";
+};
+
+/* On Pi-2 connector (labeled for SPI1), RTS/CTS optional */
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart4_pins>;
+       status = "disabled";
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usbphy {
+       usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
+       usb0_vbus-supply = <&reg_drivevbus>;
+       usb1_vbus-supply = <&reg_usb1_vbus>;
+       status = "okay";
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
new file mode 100644 (file)
index 0000000..72d6961
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+ * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+ *
+ * Copyright (c) 2018 ARM Ltd.
+ */
+
+#include "sun50i-a64-sopine-baseboard.dts"
+
+/ {
+       model = "Pine64 LTS";
+       compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
+                    "allwinner,sun50i-a64";
+};
index 1b9b92e541d2d7348225a38dd49dd45202687356..c077b6c1f458a31f731e0a8ec388c13fedef50ae 100644 (file)
@@ -62,6 +62,21 @@ aliases {
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       hdmi-connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+};
+
+&de {
+       status = "okay";
 };
 
 &ehci0 {
@@ -82,6 +97,17 @@ &emac {
 
 };
 
+&hdmi {
+       hvcc-supply = <&reg_dldo1>;
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
 &i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins>;
@@ -241,7 +267,7 @@ &spdif {
 /* On Exp and Euler connectors */
 &uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };
 
index 897e60cbe38d1121c0878c742e7d3fd1bf4a52a5..77fac84797e9d03cfd78a0e1ed285e713a0f871e 100644 (file)
@@ -80,8 +80,7 @@ &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;
        vmmc-supply = <&reg_dcdc1>;
-       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
        disable-wp;
        bus-width = <4>;
        status = "okay";
@@ -104,7 +103,7 @@ rtl8723cs: wifi@1 {
 
 &mmc2 {
        pinctrl-names = "default";
-       pinctrl-0 = <&mmc2_pins>;
+       pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
        vmmc-supply = <&reg_dcdc1>;
        vqmmc-supply = <&reg_eldo1>;
        bus-width = <8>;
@@ -143,7 +142,7 @@ axp803: pmic@3a3 {
 &r_i2c {
        clock-frequency = <100000>;
        pinctrl-names = "default";
-       pinctrl-0 = <&r_i2c_pins_a>;
+       pinctrl-0 = <&r_i2c_pl89_pins>;
        status = "okay";
 };
 
@@ -270,7 +269,7 @@ &simplefb_hdmi {
 
 &uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };
 
index c21f2331add60255d0cb97b49319a3e30c22d354..53fcc9098df364c165c19705ee115c5cd959cac2 100644 (file)
@@ -61,6 +61,17 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
+       hdmi-connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
        reg_vcc1v8: vcc1v8 {
                compatible = "regulator-fixed";
                regulator-name = "vcc1v8";
@@ -69,6 +80,10 @@ reg_vcc1v8: vcc1v8 {
        };
 };
 
+&de {
+       status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };
@@ -86,6 +101,17 @@ &emac {
        status = "okay";
 };
 
+&hdmi {
+       hvcc-supply = <&reg_dldo1>;
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
 &mdio {
        ext_rgmii_phy: ethernet-phy@1 {
                compatible = "ethernet-phy-ieee802.3-c22";
@@ -140,7 +166,7 @@ &simplefb_hdmi {
 
 &uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };
 
index 81f8e0098699e89ec3f9b56405aa5f1509957ab1..c455b24dd079a426f6feaa3b6659b8e14eb9e40b 100644 (file)
@@ -260,7 +260,7 @@ &simplefb_hdmi {
 
 &uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };
 
index d3daf90a8715c50b844eb6e6f577aeb2c756991b..f3a66f888205e11d54b8fdba57618e6c2df5daed 100644 (file)
@@ -88,6 +88,7 @@ cpu0: cpu@0 {
                        device_type = "cpu";
                        reg = <0>;
                        enable-method = "psci";
+                       next-level-cache = <&L2>;
                };
 
                cpu1: cpu@1 {
@@ -95,6 +96,7 @@ cpu1: cpu@1 {
                        device_type = "cpu";
                        reg = <1>;
                        enable-method = "psci";
+                       next-level-cache = <&L2>;
                };
 
                cpu2: cpu@2 {
@@ -102,6 +104,7 @@ cpu2: cpu@2 {
                        device_type = "cpu";
                        reg = <2>;
                        enable-method = "psci";
+                       next-level-cache = <&L2>;
                };
 
                cpu3: cpu@3 {
@@ -109,7 +112,20 @@ cpu3: cpu@3 {
                        device_type = "cpu";
                        reg = <3>;
                        enable-method = "psci";
+                       next-level-cache = <&L2>;
                };
+
+               L2: l2-cache {
+                       compatible = "cache";
+                       cache-level = <2>;
+               };
+       };
+
+       de: display-engine {
+               compatible = "allwinner,sun50i-a64-display-engine";
+               allwinner,pipelines = <&mixer0>,
+                                     <&mixer1>;
+               status = "disabled";
        };
 
        osc24M: osc24M_clk {
@@ -194,6 +210,52 @@ display_clocks: clock@0 {
                                #clock-cells = <1>;
                                #reset-cells = <1>;
                        };
+
+                       mixer0: mixer@100000 {
+                               compatible = "allwinner,sun50i-a64-de2-mixer-0";
+                               reg = <0x100000 0x100000>;
+                               clocks = <&display_clocks CLK_BUS_MIXER0>,
+                                        <&display_clocks CLK_MIXER0>;
+                               clock-names = "bus",
+                                             "mod";
+                               resets = <&display_clocks RST_MIXER0>;
+
+                               ports {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       mixer0_out: port@1 {
+                                               reg = <1>;
+
+                                               mixer0_out_tcon0: endpoint {
+                                                       remote-endpoint = <&tcon0_in_mixer0>;
+                                               };
+                                       };
+                               };
+                       };
+
+                       mixer1: mixer@200000 {
+                               compatible = "allwinner,sun50i-a64-de2-mixer-1";
+                               reg = <0x200000 0x100000>;
+                               clocks = <&display_clocks CLK_BUS_MIXER1>,
+                                        <&display_clocks CLK_MIXER1>;
+                               clock-names = "bus",
+                                             "mod";
+                               resets = <&display_clocks RST_MIXER1>;
+
+                               ports {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       mixer1_out: port@1 {
+                                               reg = <1>;
+
+                                               mixer1_out_tcon1: endpoint {
+                                                       remote-endpoint = <&tcon1_in_mixer1>;
+                                               };
+                                       };
+                               };
+                       };
                };
 
                syscon: syscon@1c00000 {
@@ -228,6 +290,75 @@ dma: dma-controller@1c02000 {
                        #dma-cells = <1>;
                };
 
+               tcon0: lcd-controller@1c0c000 {
+                       compatible = "allwinner,sun50i-a64-tcon-lcd",
+                                    "allwinner,sun8i-a83t-tcon-lcd";
+                       reg = <0x01c0c000 0x1000>;
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>;
+                       clock-names = "ahb", "tcon-ch0";
+                       clock-output-names = "tcon-pixel-clock";
+                       resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>;
+                       reset-names = "lcd", "lvds";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               tcon0_in: port@0 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       reg = <0>;
+
+                                       tcon0_in_mixer0: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&mixer0_out_tcon0>;
+                                       };
+                               };
+
+                               tcon0_out: port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       reg = <1>;
+                               };
+                       };
+               };
+
+               tcon1: lcd-controller@1c0d000 {
+                       compatible = "allwinner,sun50i-a64-tcon-tv",
+                                    "allwinner,sun8i-a83t-tcon-tv";
+                       reg = <0x01c0d000 0x1000>;
+                       interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_TCON1>, <&ccu CLK_TCON1>;
+                       clock-names = "ahb", "tcon-ch1";
+                       resets = <&ccu RST_BUS_TCON1>;
+                       reset-names = "lcd";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               tcon1_in: port@0 {
+                                       reg = <0>;
+
+                                       tcon1_in_mixer1: endpoint {
+                                               remote-endpoint = <&mixer1_out_tcon1>;
+                                       };
+                               };
+
+                               tcon1_out: port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       reg = <1>;
+
+                                       tcon1_out_hdmi: endpoint@1 {
+                                               reg = <1>;
+                                               remote-endpoint = <&hdmi_in_tcon1>;
+                                       };
+                               };
+                       };
+               };
+
                mmc0: mmc@1c0f000 {
                        compatible = "allwinner,sun50i-a64-mmc";
                        reg = <0x01c0f000 0x1000>;
@@ -270,6 +401,11 @@ mmc2: mmc@1c11000 {
                        #size-cells = <0>;
                };
 
+               sid: eeprom@1c14000 {
+                       compatible = "allwinner,sun50i-a64-sid";
+                       reg = <0x1c14000 0x400>;
+               };
+
                usb_otg: usb@1c19000 {
                        compatible = "allwinner,sun8i-a33-musb";
                        reg = <0x01c19000 0x0400>;
@@ -399,7 +535,7 @@ mmc1_pins: mmc1-pins {
                        };
 
                        mmc2_pins: mmc2-pins {
-                               pins = "PC1", "PC5", "PC6", "PC8", "PC9",
+                               pins = "PC5", "PC6", "PC8", "PC9",
                                       "PC10","PC11", "PC12", "PC13",
                                       "PC14", "PC15", "PC16";
                                function = "mmc2";
@@ -407,6 +543,13 @@ mmc2_pins: mmc2-pins {
                                bias-pull-up;
                        };
 
+                       mmc2_ds_pin: mmc2-ds-pin {
+                               pins = "PC1";
+                               function = "mmc2";
+                               drive-strength = <30>;
+                               bias-pull-up;
+                       };
+
                        pwm_pin: pwm_pin {
                                pins = "PD22";
                                function = "pwm";
@@ -442,7 +585,7 @@ spi1_pins: spi1 {
                                function = "spi1";
                        };
 
-                       uart0_pins_a: uart0 {
+                       uart0_pb_pins: uart0-pb-pins {
                                pins = "PB8", "PB9";
                                function = "uart0";
                        };
@@ -686,6 +829,50 @@ pwm: pwm@1c21400 {
                        status = "disabled";
                };
 
+               hdmi: hdmi@1ee0000 {
+                       compatible = "allwinner,sun50i-a64-dw-hdmi",
+                                    "allwinner,sun8i-a83t-dw-hdmi";
+                       reg = <0x01ee0000 0x10000>;
+                       reg-io-width = <1>;
+                       interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
+                                <&ccu CLK_HDMI>;
+                       clock-names = "iahb", "isfr", "tmds";
+                       resets = <&ccu RST_BUS_HDMI1>;
+                       reset-names = "ctrl";
+                       phys = <&hdmi_phy>;
+                       phy-names = "hdmi-phy";
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               hdmi_in: port@0 {
+                                       reg = <0>;
+
+                                       hdmi_in_tcon1: endpoint {
+                                               remote-endpoint = <&tcon1_out_hdmi>;
+                                       };
+                               };
+
+                               hdmi_out: port@1 {
+                                       reg = <1>;
+                               };
+                       };
+               };
+
+               hdmi_phy: hdmi-phy@1ef0000 {
+                       compatible = "allwinner,sun50i-a64-hdmi-phy";
+                       reg = <0x01ef0000 0x10000>;
+                       clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
+                                <&ccu 7>;
+                       clock-names = "bus", "mod", "pll-0";
+                       resets = <&ccu RST_BUS_HDMI0>;
+                       reset-names = "phy";
+                       #phy-cells = <0>;
+               };
+
                rtc: rtc@1f00000 {
                        compatible = "allwinner,sun6i-a31-rtc";
                        reg = <0x01f00000 0x54>;
@@ -749,7 +936,7 @@ r_pio: pinctrl@1f02c00 {
                        interrupt-controller;
                        #interrupt-cells = <3>;
 
-                       r_i2c_pins_a: i2c-a {
+                       r_i2c_pl89_pins: r-i2c-pl89-pins {
                                pins = "PL8", "PL9";
                                function = "s_i2c";
                        };
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
new file mode 100644 (file)
index 0000000..0612c19
--- /dev/null
@@ -0,0 +1,150 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (C) 2018 Amarula Solutions
+ * Author: Jagan Teki <jagan@amarulasolutions.com>
+ */
+
+/dts-v1/;
+
+#include "sun50i-h6.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "OrangePi One Plus";
+       compatible = "xunlong,orangepi-one-plus", "allwinner,sun50i-h6";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins>;
+       vmmc-supply = <&reg_cldo1>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&r_i2c {
+       status = "okay";
+
+       axp805: pmic@36 {
+               compatible = "x-powers,axp805", "x-powers,axp806";
+               reg = <0x36>;
+               interrupt-parent = <&r_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               x-powers,self-working-mode;
+
+               regulators {
+                       reg_aldo1: aldo1 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc-pl";
+                       };
+
+                       reg_aldo2: aldo2 {
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc-ac200";
+                       };
+
+                       reg_aldo3: aldo3 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc25-dram";
+                       };
+
+                       reg_bldo1: bldo1 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vcc-bias-pll";
+                       };
+
+                       reg_bldo2: bldo2 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vcc-efuse-pcie-hdmi-io";
+                       };
+
+                       reg_bldo3: bldo3 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vcc-dcxoio";
+                       };
+
+                       bldo4 {
+                               /* unused */
+                       };
+
+                       reg_cldo1: cldo1 {
+                               regulator-always-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc-3v3";
+                       };
+
+                       reg_cldo2: cldo2 {
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc-wifi-1";
+                       };
+
+                       reg_cldo3: cldo3 {
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc-wifi-2";
+                       };
+
+                       reg_dcdca: dcdca {
+                               regulator-always-on;
+                               regulator-min-microvolt = <810000>;
+                               regulator-max-microvolt = <1080000>;
+                               regulator-name = "vdd-cpu";
+                       };
+
+                       reg_dcdcc: dcdcc {
+                               regulator-min-microvolt = <810000>;
+                               regulator-max-microvolt = <1080000>;
+                               regulator-name = "vdd-gpu";
+                       };
+
+                       reg_dcdcd: dcdcd {
+                               regulator-always-on;
+                               regulator-min-microvolt = <960000>;
+                               regulator-max-microvolt = <960000>;
+                               regulator-name = "vdd-sys";
+                       };
+
+                       reg_dcdce: dcdce {
+                               regulator-always-on;
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-name = "vcc-dram";
+                       };
+
+                       sw {
+                               /* unused */
+                       };
+               };
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_ph_pins>;
+       status = "okay";
+};
index cfa5fffcf62b437c60a9fde4b601767ecc7548b3..040828d2e2c097d00cd5b379b15bc88cb233c47f 100644 (file)
@@ -92,6 +92,29 @@ soc {
                #size-cells = <1>;
                ranges;
 
+               syscon: syscon@3000000 {
+                       compatible = "allwinner,sun50i-h6-system-control",
+                                    "allwinner,sun50i-a64-system-control";
+                       reg = <0x03000000 0x1000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       sram_c: sram@28000 {
+                               compatible = "mmio-sram";
+                               reg = <0x00028000 0x1e000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <0 0x00028000 0x1e000>;
+
+                               de2_sram: sram-section@0 {
+                                       compatible = "allwinner,sun50i-h6-sram-c",
+                                                    "allwinner,sun50i-a64-sram-c";
+                                       reg = <0x0000 0x1e000>;
+                               };
+                       };
+               };
+
                ccu: clock@3001000 {
                        compatible = "allwinner,sun50i-h6-ccu";
                        reg = <0x03001000 0x1000>;