mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-23 13:29:33 +00:00
Reverting sunxi/sunxi64 NEXT to 4.14. (#1087)
* Bump to 4.18, removing the obvious, fixing build problems, put some on waiting. * Pin 4.18 to DEV, rollback 4.14 to NEXT, adjust configs, remove one deprecated patch from NEXT and add board-h3-address-some-stability-issues.patch * Adjust few boards in development to new reality, removing it from NEXT for now * Adjust few board configs * Board config adjustement * Adjust few boards configs * Port NeoCore2 and Neo21.1 to 4.14.y * Adjust board config * Adjust board config
This commit is contained in:
parent
f64f031e74
commit
a57ce78b37
342 changed files with 2160795 additions and 5773 deletions
|
@ -0,0 +1,12 @@
|
|||
diff --git a/Documentation/devicetree/bindings/clock/sun8i-de2.txt b/Documentation/devicetree/bindings/clock/sun8i-de2.txt
|
||||
index f2fa87c4765c..e94582e8b8a9 100644
|
||||
--- a/Documentation/devicetree/bindings/clock/sun8i-de2.txt
|
||||
+++ b/Documentation/devicetree/bindings/clock/sun8i-de2.txt
|
||||
@@ -6,6 +6,7 @@ Required properties :
|
||||
- "allwinner,sun8i-a83t-de2-clk"
|
||||
- "allwinner,sun8i-h3-de2-clk"
|
||||
- "allwinner,sun8i-v3s-de2-clk"
|
||||
+ - "allwinner,sun50i-a64-de2-clk"
|
||||
- "allwinner,sun50i-h5-de2-clk"
|
||||
|
||||
- reg: Must contain the registers base address and length
|
|
@ -0,0 +1,43 @@
|
|||
diff --git a/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt b/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
|
||||
new file mode 100644
|
||||
index 000000000000..87dfb33fb3be
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
|
||||
@@ -0,0 +1,37 @@
|
||||
+Device tree bindings for Allwinner A64 DE2 bus
|
||||
+
|
||||
+The Allwinner A64 DE2 is on a special bus, which needs a SRAM region (SRAM C)
|
||||
+to be claimed for enabling the access.
|
||||
+
|
||||
+Required properties:
|
||||
+
|
||||
+ - compatible: Should contain "allwinner,sun50i-a64-de2"
|
||||
+ - reg: A resource specifier for the register space
|
||||
+ - #address-cells: Must be set to 1
|
||||
+ - #size-cells: Must be set to 1
|
||||
+ - ranges: Must be set up to map the address space inside the
|
||||
+ DE2, for the sub-blocks of DE2.
|
||||
+ - allwinner,sram: the SRAM that needs to be claimed
|
||||
+
|
||||
+Example:
|
||||
+
|
||||
+ de2@1000000 {
|
||||
+ compatible = "allwinner,sun50i-a64-de2";
|
||||
+ reg = <0x1000000 0x400000>;
|
||||
+ allwinner,sram = <&de2_sram 1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges = <0 0x1000000 0x400000>;
|
||||
+
|
||||
+ display_clocks: clock@0 {
|
||||
+ compatible = "allwinner,sun50i-a64-de2-clk";
|
||||
+ reg = <0x0 0x100000>;
|
||||
+ clocks = <&ccu CLK_DE>,
|
||||
+ <&ccu CLK_BUS_DE>;
|
||||
+ clock-names = "mod",
|
||||
+ "bus";
|
||||
+ resets = <&ccu RST_BUS_DE>;
|
||||
+ #clock-cells = <1>;
|
||||
+ #reset-cells = <1>;
|
||||
+ };
|
||||
+ };
|
|
@ -0,0 +1,88 @@
|
|||
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
|
||||
index d1c0b60e9326..1851112ccc29 100644
|
||||
--- a/drivers/bus/Kconfig
|
||||
+++ b/drivers/bus/Kconfig
|
||||
@@ -103,6 +103,16 @@ config SIMPLE_PM_BUS
|
||||
Controller (BSC, sometimes called "LBSC within Bus Bridge", or
|
||||
"External Bus Interface") as found on several Renesas ARM SoCs.
|
||||
|
||||
+config SUN50I_DE2_BUS
|
||||
+ bool "Allwinner A64 DE2 Bus Driver"
|
||||
+ default ARM64
|
||||
+ depends on ARCH_SUNXI
|
||||
+ select SUNXI_SRAM
|
||||
+ help
|
||||
+ Say y here to enable support for Allwinner A64 DE2 bus driver. It's
|
||||
+ mostly transparent, but a SRAM region needs to be claimed in the SRAM
|
||||
+ controller to make the all blocks in the DE2 part accessible.
|
||||
+
|
||||
config SUNXI_RSB
|
||||
tristate "Allwinner sunXi Reduced Serial Bus Driver"
|
||||
default MACH_SUN8I || MACH_SUN9I || ARM64
|
||||
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
|
||||
index b8f036cca7ff..ca300b1914ce 100644
|
||||
--- a/drivers/bus/Makefile
|
||||
+++ b/drivers/bus/Makefile
|
||||
@@ -21,6 +21,7 @@ obj-$(CONFIG_OMAP_INTERCONNECT) += omap_l3_smx.o omap_l3_noc.o
|
||||
|
||||
obj-$(CONFIG_OMAP_OCP2SCP) += omap-ocp2scp.o
|
||||
obj-$(CONFIG_QCOM_EBI2) += qcom-ebi2.o
|
||||
+obj-$(CONFIG_SUN50I_DE2_BUS) += sun50i-de2.o
|
||||
obj-$(CONFIG_SUNXI_RSB) += sunxi-rsb.o
|
||||
obj-$(CONFIG_SIMPLE_PM_BUS) += simple-pm-bus.o
|
||||
obj-$(CONFIG_TEGRA_ACONNECT) += tegra-aconnect.o
|
||||
diff --git a/drivers/bus/sun50i-de2.c b/drivers/bus/sun50i-de2.c
|
||||
new file mode 100644
|
||||
index 000000000000..836828ef96d5
|
||||
--- /dev/null
|
||||
+++ b/drivers/bus/sun50i-de2.c
|
||||
@@ -0,0 +1,49 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Allwinner A64 Display Engine 2.0 Bus Driver
|
||||
+ *
|
||||
+ * Copyright (C) 2018 Icenowy Zheng <icenowy@aosc.io>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/of_platform.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/soc/sunxi/sunxi_sram.h>
|
||||
+
|
||||
+static int sun50i_de2_bus_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device_node *np = pdev->dev.of_node;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = sunxi_sram_claim(&pdev->dev);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "Error couldn't map SRAM to device\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ if (np)
|
||||
+ of_platform_populate(np, NULL, NULL, &pdev->dev);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int sun50i_de2_bus_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ sunxi_sram_release(&pdev->dev);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id sun50i_de2_bus_of_match[] = {
|
||||
+ { .compatible = "allwinner,sun50i-a64-de2", },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+
|
||||
+static struct platform_driver sun50i_de2_bus_driver = {
|
||||
+ .probe = sun50i_de2_bus_probe,
|
||||
+ .remove = sun50i_de2_bus_remove,
|
||||
+ .driver = {
|
||||
+ .name = "sun50i-de2-bus",
|
||||
+ .of_match_table = sun50i_de2_bus_of_match,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+builtin_platform_driver(sun50i_de2_bus_driver);
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-de2.c b/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
|
||||
index 468d1abaf0ee..8df7cd93453e 100644
|
||||
--- a/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
|
||||
+++ b/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
|
||||
@@ -292,13 +292,10 @@ static const struct of_device_id sunxi_de2_clk_ids[] = {
|
||||
.compatible = "allwinner,sun50i-h5-de2-clk",
|
||||
.data = &sun50i_a64_de2_clk_desc,
|
||||
},
|
||||
- /*
|
||||
- * The Allwinner A64 SoC needs some bit to be poke in syscon to make
|
||||
- * DE2 really working.
|
||||
- * So there's currently no A64 compatible here.
|
||||
- * H5 shares the same reset line with A64, so here H5 is using the
|
||||
- * clock description of A64.
|
||||
- */
|
||||
+ {
|
||||
+ .compatible = "allwinner,sun50i-a64-de2-clk",
|
||||
+ .data = &sun50i_a64_de2_clk_desc,
|
||||
+ },
|
||||
{ }
|
||||
};
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
index 1c37659d..90854616 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
@@ -43,9 +43,12 @@
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/sun50i-a64-ccu.h>
|
||||
+#include <dt-bindings/clock/sun8i-de2.h>
|
||||
#include <dt-bindings/clock/sun8i-r-ccu.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
+#include <dt-bindings/reset/sun8i-de2.h>
|
||||
#include <dt-bindings/reset/sun50i-a64-ccu.h>
|
||||
+#include <dt-bindings/reset/sun8i-r-ccu.h>
|
||||
|
||||
/ {
|
||||
interrupt-parent = <&gic>;
|
||||
@@ -56,20 +59,46 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
+
|
||||
+ simplefb_hdmi: framebuffer-hdmi {
|
||||
+ compatible = "allwinner,simple-framebuffer",
|
||||
+ "simple-framebuffer";
|
||||
+ allwinner,pipeline = "mixer1-lcd1-hdmi";
|
||||
+ clocks = <&display_clocks CLK_MIXER1>,
|
||||
+ <&ccu CLK_TCON1>, <&ccu CLK_HDMI>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
|
||||
-/*
|
||||
- * The pipeline mixer0-lcd0 depends on clock CLK_MIXER0 from DE2 CCU.
|
||||
- * However there is no support for this clock on A64 yet, so we depend
|
||||
- * on the upstream clocks here to keep them (and thus CLK_MIXER0) up.
|
||||
- */
|
||||
simplefb_lcd: framebuffer-lcd {
|
||||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "mixer0-lcd0";
|
||||
clocks = <&ccu CLK_TCON0>,
|
||||
- <&ccu CLK_DE>, <&ccu CLK_BUS_DE>;
|
||||
+ <&display_clocks CLK_MIXER0>;
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ de2@1000000 {
|
||||
+ compatible = "allwinner,sun50i-a64-de2";
|
||||
+ reg = <0x1000000 0x400000>;
|
||||
+ allwinner,sram = <&de2_sram 1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges = <0 0x1000000 0x400000>;
|
||||
+
|
||||
+ display_clocks: clock@0 {
|
||||
+ compatible = "allwinner,sun50i-a64-de2-clk";
|
||||
+ reg = <0x0 0x100000>;
|
||||
+ clocks = <&ccu CLK_DE>,
|
||||
+ <&ccu CLK_BUS_DE>;
|
||||
+ clock-names = "mod",
|
||||
+ "bus";
|
||||
+ resets = <&ccu RST_BUS_DE>;
|
||||
+ #clock-cells = <1>;
|
||||
+ #reset-cells = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
cpus {
|
|
@ -0,0 +1,105 @@
|
|||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
|
||||
index 0716b1441187..094cfed13df9 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
|
||||
@@ -296,6 +296,10 @@
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
+&simplefb_hdmi {
|
||||
+ vcc-hdmi-supply = <®_dldo1>;
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
|
||||
index e2dce48fa29a..98dbff19f5cc 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
|
||||
@@ -195,6 +195,10 @@
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
+&simplefb_hdmi {
|
||||
+ vcc-hdmi-supply = <®_dldo1>;
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
|
||||
index 3b3081b10ecb..3f531393eaee 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
|
||||
@@ -214,6 +214,10 @@
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
+&simplefb_hdmi {
|
||||
+ vcc-hdmi-supply = <®_dldo1>;
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
index a75825798a71..1b9b92e541d2 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
@@ -229,6 +229,10 @@
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
+&simplefb_hdmi {
|
||||
+ vcc-hdmi-supply = <®_dldo1>;
|
||||
+};
|
||||
+
|
||||
/* On Euler connector */
|
||||
&spdif {
|
||||
status = "disabled";
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
index 58253d6f9be1..104f8a6c6ca8 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
|
||||
@@ -263,6 +263,10 @@
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
+&simplefb_hdmi {
|
||||
+ vcc-hdmi-supply = <®_dldo1>;
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
|
||||
index abe179de35d7..c21f2331add6 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
|
||||
@@ -134,6 +134,10 @@
|
||||
regulator-name = "vcc-wifi";
|
||||
};
|
||||
|
||||
+&simplefb_hdmi {
|
||||
+ vcc-hdmi-supply = <®_dldo1>;
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
|
||||
index d9baab3dc96b..9065f30a758e 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
|
||||
@@ -253,6 +253,10 @@
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
+&simplefb_hdmi {
|
||||
+ vcc-hdmi-supply = <®_dldo1>;
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
|
@ -0,0 +1,267 @@
|
|||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
|
||||
index bf42690a..69c3eb7c 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
|
||||
@@ -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,156 @@
|
||||
compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
|
||||
|
||||
aliases {
|
||||
+ ethernet0 = &emac;
|
||||
serial0 = &uart0;
|
||||
+ serial1 = &uart1;
|
||||
+ serial2 = &uart2;
|
||||
+ serial3 = &uart3;
|
||||
+ serial4 = &uart4;
|
||||
+ };
|
||||
+
|
||||
+ connector {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
+
|
||||
+ 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>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
|
||||
+ post-power-on-delay-ms = <50>;
|
||||
+ };
|
||||
+
|
||||
+ 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";
|
||||
};
|
||||
|
||||
+&hdmi {
|
||||
+ hdmi-supply = <®_dldo1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi_out {
|
||||
+ hdmi_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&emac {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rgmii_pins>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-handle = <&ext_rgmii_phy>;
|
||||
+ phy-supply = <®_gmac_3v3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio {
|
||||
+ ext_rgmii_phy: ethernet-phy@1 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mixer1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
vmmc-supply = <®_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 = <®_dldo2>;
|
||||
+ vqmmc-supply = <®_dldo4>;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ brcmf: brcmf@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ interrupt-parent = <&r_pio>;
|
||||
+ interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 / EINT7 */
|
||||
+ interrupt-names = "host-wake";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -89,9 +223,8 @@
|
||||
#include "axp803.dtsi"
|
||||
|
||||
®_aldo1 {
|
||||
- regulator-always-on;
|
||||
- regulator-min-microvolt = <1800000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
+ regulator-min-microvolt = <2800000>;
|
||||
+ regulator-max-microvolt = <2800000>;
|
||||
regulator-name = "afvcc-csi";
|
||||
};
|
||||
|
||||
@@ -169,6 +302,12 @@
|
||||
regulator-name = "cpvdd";
|
||||
};
|
||||
|
||||
+®_eldo3 {
|
||||
+ regulator-min-microvolt = <1500000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "dvdd-csi";
|
||||
+};
|
||||
+
|
||||
®_fldo1 {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
@@ -191,13 +330,71 @@
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
+&spi0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spi-flash@0 {
|
||||
+ compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <80000000>;
|
||||
+ m25p,fast-read;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&simplefb_hdmi {
|
||||
+ vcc-hdmi-supply = <®_dldo1>;
|
||||
+};
|
||||
+
|
||||
+&tcon1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* On debug connector */
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&usbphy {
|
||||
+/* Bluetooth */
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rtl8723bs-bt {
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* 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 */
|
||||
+ usb1_vbus-supply = <®_usb1_vbus>;
|
||||
+ status = "okay";
|
||||
+};
|
|
@ -0,0 +1,16 @@
|
|||
diff --git a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt
|
||||
index 3d6d5fa0c4d5..0c5f63a80617 100644
|
||||
--- a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt
|
||||
+++ b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt
|
||||
@@ -20,8 +20,9 @@ Required properties:
|
||||
- phy-handle: See ethernet.txt
|
||||
- #address-cells: shall be 1
|
||||
- #size-cells: shall be 0
|
||||
-- syscon: A phandle to the syscon of the SoC with one of the following
|
||||
- compatible string:
|
||||
+- syscon: A phandle to a device which exports the EMAC clock register as a
|
||||
+ regmap or to the syscon of the SoC with one of the following compatible
|
||||
+ string:
|
||||
- allwinner,sun8i-h3-system-controller
|
||||
- allwinner,sun8i-v3s-system-controller
|
||||
- allwinner,sun50i-a64-system-controller
|
|
@ -0,0 +1,122 @@
|
|||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
||||
index a3fa65b1ca8e..1037f6c78bca 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
||||
@@ -61,9 +61,10 @@ struct emac_variant {
|
||||
* @regulator: reference to the optional regulator
|
||||
* @rst_ephy: reference to the optional EPHY reset for the internal PHY
|
||||
* @variant: reference to the current board variant
|
||||
- * @regmap: regmap for using the syscon
|
||||
+ * @regmap_field: regmap field for the gmac register
|
||||
* @internal_phy_powered: Does the internal PHY is enabled
|
||||
* @mux_handle: Internal pointer used by mdio-mux lib
|
||||
+ * @emac_reg_field: reg_field for the regmap's gmac register
|
||||
*/
|
||||
struct sunxi_priv_data {
|
||||
struct clk *tx_clk;
|
||||
@@ -71,9 +72,17 @@ struct sunxi_priv_data {
|
||||
struct regulator *regulator;
|
||||
struct reset_control *rst_ephy;
|
||||
const struct emac_variant *variant;
|
||||
- struct regmap *regmap;
|
||||
+ struct regmap_field *regmap_field;
|
||||
bool internal_phy_powered;
|
||||
void *mux_handle;
|
||||
+ const struct reg_field *emac_reg_field;
|
||||
+};
|
||||
+
|
||||
+/* EMAC clock register @ 0x30 in the "system control" address range */
|
||||
+const struct reg_field old_syscon_reg_field = {
|
||||
+ .reg = 0x30,
|
||||
+ .lsb = 0,
|
||||
+ .msb = 31,
|
||||
};
|
||||
|
||||
static const struct emac_variant emac_variant_h3 = {
|
||||
@@ -216,7 +225,6 @@ static const struct emac_variant emac_variant_a64 = {
|
||||
#define SYSCON_ETCS_MII 0x0
|
||||
#define SYSCON_ETCS_EXT_GMII 0x1
|
||||
#define SYSCON_ETCS_INT_GMII 0x2
|
||||
-#define SYSCON_EMAC_REG 0x30
|
||||
|
||||
/* sun8i_dwmac_dma_reset() - reset the EMAC
|
||||
* Called from stmmac via stmmac_dma_ops->reset
|
||||
@@ -745,7 +753,7 @@ static int mdio_mux_syscon_switch_fn(int current_child, int desired_child,
|
||||
bool need_power_ephy = false;
|
||||
|
||||
if (current_child ^ desired_child) {
|
||||
- regmap_read(gmac->regmap, SYSCON_EMAC_REG, ®);
|
||||
+ regmap_field_read(gmac->regmap_field, ®);
|
||||
switch (desired_child) {
|
||||
case DWMAC_SUN8I_MDIO_MUX_INTERNAL_ID:
|
||||
dev_info(priv->device, "Switch mux to internal PHY");
|
||||
@@ -763,7 +771,7 @@ static int mdio_mux_syscon_switch_fn(int current_child, int desired_child,
|
||||
desired_child);
|
||||
return -EINVAL;
|
||||
}
|
||||
- regmap_write(gmac->regmap, SYSCON_EMAC_REG, val);
|
||||
+ regmap_field_write(gmac->regmap_field, val);
|
||||
if (need_power_ephy) {
|
||||
ret = sun8i_dwmac_power_internal_phy(priv);
|
||||
if (ret)
|
||||
@@ -801,7 +809,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
|
||||
int ret;
|
||||
u32 reg, val;
|
||||
|
||||
- regmap_read(gmac->regmap, SYSCON_EMAC_REG, &val);
|
||||
+ regmap_field_read(gmac->regmap_field, &val);
|
||||
reg = gmac->variant->default_syscon_value;
|
||||
if (reg != val)
|
||||
dev_warn(priv->device,
|
||||
@@ -883,7 +891,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- regmap_write(gmac->regmap, SYSCON_EMAC_REG, reg);
|
||||
+ regmap_field_write(gmac->regmap_field, reg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -892,7 +900,7 @@ static void sun8i_dwmac_unset_syscon(struct sunxi_priv_data *gmac)
|
||||
{
|
||||
u32 reg = gmac->variant->default_syscon_value;
|
||||
|
||||
- regmap_write(gmac->regmap, SYSCON_EMAC_REG, reg);
|
||||
+ regmap_field_write(gmac->regmap_field, reg);
|
||||
}
|
||||
|
||||
static void sun8i_dwmac_exit(struct platform_device *pdev, void *priv)
|
||||
@@ -980,6 +988,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
|
||||
int ret;
|
||||
struct stmmac_priv *priv;
|
||||
struct net_device *ndev;
|
||||
+ struct regmap *regmap;
|
||||
|
||||
ret = stmmac_get_platform_resources(pdev, &stmmac_res);
|
||||
if (ret)
|
||||
@@ -1014,13 +1023,21 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
|
||||
gmac->regulator = NULL;
|
||||
}
|
||||
|
||||
- gmac->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
|
||||
- "syscon");
|
||||
- if (IS_ERR(gmac->regmap)) {
|
||||
- ret = PTR_ERR(gmac->regmap);
|
||||
+ regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "syscon");
|
||||
+ if (IS_ERR(regmap)) {
|
||||
+ ret = PTR_ERR(regmap);
|
||||
dev_err(&pdev->dev, "Unable to map syscon: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
+ gmac->emac_reg_field = old_syscon_reg_field;
|
||||
+
|
||||
+ gmac->regmap_field = devm_regmap_field_alloc(dev, regmap,
|
||||
+ *gmac->emac_reg_field);
|
||||
+ if (IS_ERR(gmac->regmap_field)) {
|
||||
+ ret = PTR_ERR(gmac->regmap_field);
|
||||
+ dev_err(dev, "Unable to map syscon register: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
plat_dat->interface = of_get_phy_mode(dev->of_node);
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
||||
index 1037f6c78bca..b61210c0d415 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
||||
@@ -85,6 +85,13 @@ const struct reg_field old_syscon_reg_field = {
|
||||
.msb = 31,
|
||||
};
|
||||
|
||||
+/* Specially exported regmap which contains only EMAC register */
|
||||
+const struct reg_field single_reg_field = {
|
||||
+ .reg = 0,
|
||||
+ .lsb = 0,
|
||||
+ .msb = 31,
|
||||
+};
|
||||
+
|
||||
static const struct emac_variant emac_variant_h3 = {
|
||||
.default_syscon_value = 0x58000,
|
||||
.soc_has_internal_phy = true,
|
||||
@@ -979,6 +986,44 @@ static struct mac_device_info *sun8i_dwmac_setup(void *ppriv)
|
||||
return mac;
|
||||
}
|
||||
|
||||
+static struct regmap *sun8i_dwmac_get_emac_regmap(struct sunxi_priv_data *emac,
|
||||
+ struct device_node *node)
|
||||
+{
|
||||
+ struct device_node *syscon_node;
|
||||
+ struct platform_device *syscon_pdev = NULL;
|
||||
+ struct regmap *regmap = NULL;
|
||||
+
|
||||
+ syscon_node = of_parse_phandle(node, "syscon", 0);
|
||||
+ if (!syscon_node)
|
||||
+ return ERR_PTR(-ENODEV);
|
||||
+
|
||||
+ if (of_device_is_compatible(syscon_node, "syscon")) {
|
||||
+ regmap = syscon_regmap_lookup_by_phandle(node, "syscon");
|
||||
+
|
||||
+ emac->emac_reg_field = &old_syscon_reg_field;
|
||||
+ } else {
|
||||
+ syscon_pdev = of_find_device_by_node(syscon_node);
|
||||
+ if (!syscon_pdev) {
|
||||
+ /* platform device might not be probed yet */
|
||||
+ regmap = ERR_PTR(-EPROBE_DEFER);
|
||||
+ goto out_put_node;
|
||||
+ }
|
||||
+
|
||||
+ /* If no regmap is found then trap into error */
|
||||
+ regmap = dev_get_regmap(&syscon_pdev->dev, "emac-clock");
|
||||
+ if (!regmap)
|
||||
+ regmap = ERR_PTR(-EINVAL);
|
||||
+
|
||||
+ emac->emac_reg_field = &single_reg_field;
|
||||
+ }
|
||||
+
|
||||
+ if (syscon_pdev)
|
||||
+ platform_device_put(syscon_pdev);
|
||||
+out_put_node:
|
||||
+ of_node_put(syscon_node);
|
||||
+ return regmap;
|
||||
+}
|
||||
+
|
||||
static int sun8i_dwmac_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct plat_stmmacenet_data *plat_dat;
|
||||
@@ -1023,13 +1068,12 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
|
||||
gmac->regulator = NULL;
|
||||
}
|
||||
|
||||
- regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "syscon");
|
||||
+ regmap = sun8i_dwmac_get_emac_regmap(gmac, pdev->dev.of_node);
|
||||
if (IS_ERR(regmap)) {
|
||||
ret = PTR_ERR(regmap);
|
||||
dev_err(&pdev->dev, "Unable to map syscon: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
- gmac->emac_reg_field = old_syscon_reg_field;
|
||||
|
||||
gmac->regmap_field = devm_regmap_field_alloc(dev, regmap,
|
||||
*gmac->emac_reg_field);
|
|
@ -0,0 +1,84 @@
|
|||
diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
|
||||
index 882be5ed7e84..35ab5f334bb1 100644
|
||||
--- a/drivers/soc/sunxi/sunxi_sram.c
|
||||
+++ b/drivers/soc/sunxi/sunxi_sram.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/regmap.h>
|
||||
|
||||
#include <linux/soc/sunxi/sunxi_sram.h>
|
||||
|
||||
@@ -281,13 +282,41 @@ int sunxi_sram_release(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL(sunxi_sram_release);
|
||||
|
||||
+struct sunxi_sramc_variant {
|
||||
+ bool has_emac_clock;
|
||||
+};
|
||||
+
|
||||
+static const struct sunxi_sramc_variant sun4i_a10_sramc_variant = {
|
||||
+ /* Nothing special */
|
||||
+};
|
||||
+
|
||||
+static const struct sunxi_sramc_variant sun50i_a64_sramc_variant = {
|
||||
+ .has_emac_clock = true,
|
||||
+};
|
||||
+
|
||||
+static struct regmap_config sunxi_sram_emac_clock_regmap = {
|
||||
+ .reg_bits = 32,
|
||||
+ .val_bits = 32,
|
||||
+ .reg_stride = 4,
|
||||
+ .max_register = 0x0, /* only single register */
|
||||
+ .name = "emac-clock",
|
||||
+};
|
||||
+
|
||||
+#define SUNXI_SRAM_EMAC_CLOCK_REG 0x30
|
||||
+
|
||||
static int sunxi_sram_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res;
|
||||
struct dentry *d;
|
||||
+ struct regmap *emac_clock;
|
||||
+ const struct sunxi_sramc_variant *variant;
|
||||
|
||||
sram_dev = &pdev->dev;
|
||||
|
||||
+ variant = of_device_get_match_data(&pdev->dev);
|
||||
+ if (!variant)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(base))
|
||||
@@ -300,12 +329,27 @@ static int sunxi_sram_probe(struct platform_device *pdev)
|
||||
if (!d)
|
||||
return -ENOMEM;
|
||||
|
||||
+ if (variant->has_emac_clock) {
|
||||
+ emac_clock = devm_regmap_init_mmio(&pdev->dev,
|
||||
+ base + SUNXI_SRAM_EMAC_CLOCK_REG,
|
||||
+ &sunxi_sram_emac_clock_regmap);
|
||||
+
|
||||
+ if (IS_ERR(emac_clock))
|
||||
+ return PTR_ERR(emac_clock);
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id sunxi_sram_dt_match[] = {
|
||||
- { .compatible = "allwinner,sun4i-a10-sram-controller" },
|
||||
- { .compatible = "allwinner,sun50i-a64-sram-controller" },
|
||||
+ {
|
||||
+ .compatible = "allwinner,sun4i-a10-sram-controller",
|
||||
+ .data = &sun4i_a10_sramc_variant,
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "allwinner,sun50i-a64-sram-controller",
|
||||
+ .data = &sun50i_a64_sramc_variant,
|
||||
+ },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sunxi_sram_dt_match);
|
|
@ -0,0 +1,42 @@
|
|||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
index 1b2ef28c42bd..1c37659d9d41 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
@@ -168,10 +168,25 @@
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
- syscon: syscon@1c00000 {
|
||||
- compatible = "allwinner,sun50i-a64-system-controller",
|
||||
- "syscon";
|
||||
+ sram_controller: sram-controller@1c00000 {
|
||||
+ compatible = "allwinner,sun50i-a64-sram-controller";
|
||||
reg = <0x01c00000 0x1000>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges;
|
||||
+
|
||||
+ sram_c: sram@18000 {
|
||||
+ compatible = "mmio-sram";
|
||||
+ reg = <0x00018000 0x28000>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges = <0 0x00018000 0x28000>;
|
||||
+
|
||||
+ de2_sram: sram-section@0 {
|
||||
+ compatible = "allwinner,sun50i-a64-sram-c";
|
||||
+ reg = <0x0000 0x28000>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
dma: dma-controller@1c02000 {
|
||||
@@ -599,7 +614,7 @@
|
||||
|
||||
emac: ethernet@1c30000 {
|
||||
compatible = "allwinner,sun50i-a64-emac";
|
||||
- syscon = <&syscon>;
|
||||
+ syscon = <&sram_controller>;
|
||||
reg = <0x01c30000 0x10000>;
|
||||
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
|
@ -0,0 +1,64 @@
|
|||
diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
|
||||
index ee9c12cf3f08..d0e30192f0cf 100644
|
||||
--- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
|
||||
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
|
||||
@@ -64,17 +64,18 @@ static SUNXI_CCU_NM_WITH_GATE_LOCK(pll_audio_base_clk, "pll-audio-base",
|
||||
BIT(28), /* lock */
|
||||
CLK_SET_RATE_UNGATE);
|
||||
|
||||
-static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_video0_clk, "pll-video0",
|
||||
- "osc24M", 0x010,
|
||||
- 8, 7, /* N */
|
||||
- 0, 4, /* M */
|
||||
- BIT(24), /* frac enable */
|
||||
- BIT(25), /* frac select */
|
||||
- 270000000, /* frac rate 0 */
|
||||
- 297000000, /* frac rate 1 */
|
||||
- BIT(31), /* gate */
|
||||
- BIT(28), /* lock */
|
||||
- CLK_SET_RATE_UNGATE);
|
||||
+static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN(pll_video0_clk, "pll-video0",
|
||||
+ "osc24M", 0x010,
|
||||
+ 192000000, /* Minimum rate */
|
||||
+ 8, 7, /* N */
|
||||
+ 0, 4, /* M */
|
||||
+ BIT(24), /* frac enable */
|
||||
+ BIT(25), /* frac select */
|
||||
+ 270000000, /* frac rate 0 */
|
||||
+ 297000000, /* frac rate 1 */
|
||||
+ BIT(31), /* gate */
|
||||
+ BIT(28), /* lock */
|
||||
+ CLK_SET_RATE_UNGATE);
|
||||
|
||||
static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_ve_clk, "pll-ve",
|
||||
"osc24M", 0x018,
|
||||
@@ -125,17 +126,18 @@ static struct ccu_nk pll_periph1_clk = {
|
||||
},
|
||||
};
|
||||
|
||||
-static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_video1_clk, "pll-video1",
|
||||
- "osc24M", 0x030,
|
||||
- 8, 7, /* N */
|
||||
- 0, 4, /* M */
|
||||
- BIT(24), /* frac enable */
|
||||
- BIT(25), /* frac select */
|
||||
- 270000000, /* frac rate 0 */
|
||||
- 297000000, /* frac rate 1 */
|
||||
- BIT(31), /* gate */
|
||||
- BIT(28), /* lock */
|
||||
- CLK_SET_RATE_UNGATE);
|
||||
+static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN(pll_video1_clk, "pll-video1",
|
||||
+ "osc24M", 0x030,
|
||||
+ 192000000, /* Minimum rate */
|
||||
+ 8, 7, /* N */
|
||||
+ 0, 4, /* M */
|
||||
+ BIT(24), /* frac enable */
|
||||
+ BIT(25), /* frac select */
|
||||
+ 270000000, /* frac rate 0 */
|
||||
+ 297000000, /* frac rate 1 */
|
||||
+ BIT(31), /* gate */
|
||||
+ BIT(28), /* lock */
|
||||
+ CLK_SET_RATE_UNGATE);
|
||||
|
||||
static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_gpu_clk, "pll-gpu",
|
||||
"osc24M", 0x038,
|
|
@ -0,0 +1,30 @@
|
|||
diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
|
||||
index f8773ecb7525..7b79c5e3dffc 100644
|
||||
--- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
|
||||
+++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
|
||||
@@ -151,6 +151,8 @@ Required properties:
|
||||
* allwinner,sun8i-v3s-tcon
|
||||
* allwinner,sun9i-a80-tcon-lcd
|
||||
* allwinner,sun9i-a80-tcon-tv
|
||||
+ * "allwinner,sun50i-a64-tcon-lcd", "allwinner,sun8i-a83t-tcon-lcd"
|
||||
+ * "allwinner,sun50i-a64-tcon-tv", "allwinner,sun8i-a83t-tcon-tv"
|
||||
- reg: base address and size of memory-mapped region
|
||||
- interrupts: interrupt associated to this IP
|
||||
- clocks: phandles to the clocks feeding the TCON.
|
||||
@@ -370,6 +372,8 @@ Required properties:
|
||||
* allwinner,sun8i-a83t-de2-mixer-1
|
||||
* allwinner,sun8i-h3-de2-mixer-0
|
||||
* allwinner,sun8i-v3s-de2-mixer
|
||||
+ * allwinner,sun50i-a64-de2-mixer-0
|
||||
+ * allwinner,sun50i-a64-de2-mixer-1
|
||||
- reg: base address and size of the memory-mapped region.
|
||||
- clocks: phandles to the clocks feeding the mixer
|
||||
* bus: the mixer interface clock
|
||||
@@ -403,6 +407,7 @@ Required properties:
|
||||
* allwinner,sun8i-r40-display-engine
|
||||
* allwinner,sun8i-v3s-display-engine
|
||||
* allwinner,sun9i-a80-display-engine
|
||||
+ * allwinner,sun50i-a64-display-engine
|
||||
|
||||
- allwinner,pipelines: list of phandle to the display engine
|
||||
frontends (DE 1.0) or mixers (DE 2.0) available.
|
|
@ -0,0 +1,42 @@
|
|||
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
index fc3713608f78..8b3d02b146b7 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
|
||||
@@ -569,6 +569,22 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
|
||||
.mod_rate = 150000000,
|
||||
};
|
||||
|
||||
+static const struct sun8i_mixer_cfg sun50i_a64_mixer0_cfg = {
|
||||
+ .ccsc = 0,
|
||||
+ .mod_rate = 297000000,
|
||||
+ .scaler_mask = 0xf,
|
||||
+ .ui_num = 3,
|
||||
+ .vi_num = 1,
|
||||
+};
|
||||
+
|
||||
+static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
|
||||
+ .ccsc = 1,
|
||||
+ .mod_rate = 297000000,
|
||||
+ .scaler_mask = 0x3,
|
||||
+ .ui_num = 1,
|
||||
+ .vi_num = 1,
|
||||
+};
|
||||
+
|
||||
static const struct of_device_id sun8i_mixer_of_table[] = {
|
||||
{
|
||||
.compatible = "allwinner,sun8i-a83t-de2-mixer-0",
|
||||
@@ -594,6 +610,14 @@ static const struct of_device_id sun8i_mixer_of_table[] = {
|
||||
.compatible = "allwinner,sun8i-v3s-de2-mixer",
|
||||
.data = &sun8i_v3s_mixer_cfg,
|
||||
},
|
||||
+ {
|
||||
+ .compatible = "allwinner,sun50i-a64-de2-mixer-0",
|
||||
+ .data = &sun50i_a64_mixer0_cfg,
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "allwinner,sun50i-a64-de2-mixer-1",
|
||||
+ .data = &sun50i_a64_mixer1_cfg,
|
||||
+ },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun8i_mixer_of_table);
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
|
||||
index dd19d674055c..e3c1c436b9d5 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
|
||||
@@ -421,6 +421,7 @@ static const struct of_device_id sun4i_drv_of_table[] = {
|
||||
{ .compatible = "allwinner,sun8i-r40-display-engine" },
|
||||
{ .compatible = "allwinner,sun8i-v3s-display-engine" },
|
||||
{ .compatible = "allwinner,sun9i-a80-display-engine" },
|
||||
+ { .compatible = "allwinner,sun50i-a64-display-engine" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun4i_drv_of_table);
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
|
||||
index 7b79c5e3dffc..fdb8fb29033f 100644
|
||||
--- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
|
||||
+++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
|
||||
@@ -78,6 +78,7 @@ Required properties:
|
||||
|
||||
- compatible: value must be one of:
|
||||
* "allwinner,sun8i-a83t-dw-hdmi"
|
||||
+ * "allwinner,sun50i-a64-dw-hdmi", "allwinner,sun8i-a83t-dw-hdmi"
|
||||
- reg: base address and size of memory-mapped region
|
||||
- reg-io-width: See dw_hdmi.txt. Shall be 1.
|
||||
- interrupts: HDMI interrupt number
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/include/dt-bindings/clock/sun50i-a64-ccu.h b/include/dt-bindings/clock/sun50i-a64-ccu.h
|
||||
index d66432c6e675..d1d7d5b7d06a 100644
|
||||
--- a/include/dt-bindings/clock/sun50i-a64-ccu.h
|
||||
+++ b/include/dt-bindings/clock/sun50i-a64-ccu.h
|
||||
@@ -43,7 +43,9 @@
|
||||
#ifndef _DT_BINDINGS_CLK_SUN50I_A64_H_
|
||||
#define _DT_BINDINGS_CLK_SUN50I_A64_H_
|
||||
|
||||
+#define CLK_PLL_VIDEO0 7
|
||||
#define CLK_PLL_PERIPH0 11
|
||||
+#define CLK_PLL_VIDEO1 15
|
||||
|
||||
#define CLK_BUS_MIPI_DSI 28
|
||||
#define CLK_BUS_CE 29
|
|
@ -0,0 +1,201 @@
|
|||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
index d75e1fc3..a46b5ec2 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
@@ -143,6 +143,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ de: display-engine {
|
||||
+ compatible = "allwinner,sun50i-a64-display-engine";
|
||||
+ allwinner,pipelines = <&mixer1>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
osc24M: osc24M_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
@@ -224,6 +230,76 @@
|
||||
#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";
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ 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>;
|
||||
@@ -467,6 +543,55 @@
|
||||
pins = "PD4", "PD5";
|
||||
function = "uart4";
|
||||
};
|
||||
+
|
||||
+ 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>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ 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";
|
||||
+ /* The reset line is shared */
|
||||
+ resets = <&display_clocks RST_WB>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ mixer1_out: port@1 {
|
||||
+ reg = <1>;
|
||||
+
|
||||
+ mixer1_out_tcon1: endpoint {
|
||||
+ remote-endpoint = <&tcon1_in_mixer1>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
spdif: spdif@1c21000 {
|
||||
@@ -668,6 +793,50 @@
|
||||
#interrupt-cells = <3>;
|
||||
};
|
||||
|
||||
+ 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 CLK_PLL_VIDEO0>, <&ccu CLK_PLL_VIDEO1>;
|
||||
+ clock-names = "bus", "mod", "pll-0", "pll-1";
|
||||
+ resets = <&ccu RST_BUS_HDMI0>;
|
||||
+ reset-names = "phy";
|
||||
+ #phy-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
rtc: rtc@1f00000 {
|
||||
compatible = "allwinner,sun6i-a31-rtc";
|
||||
reg = <0x01f00000 0x54>;
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
|
||||
index fdb8fb29033f..cb4769913e89 100644
|
||||
--- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
|
||||
+++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
|
||||
@@ -97,6 +97,9 @@ Required properties:
|
||||
first port should be the input endpoint. The second should be the
|
||||
output, usually to an HDMI connector.
|
||||
|
||||
+Optional properties:
|
||||
+ - hdmi-supply: the VCC power supply of the controller
|
||||
+
|
||||
DWC HDMI PHY
|
||||
------------
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
|
||||
index 31875b636434..bf7bf4f2fb29 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
|
||||
@@ -125,10 +125,22 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
return PTR_ERR(hdmi->clk_tmds);
|
||||
}
|
||||
|
||||
+ hdmi->regulator = devm_regulator_get(dev, "hdmi");
|
||||
+ if (IS_ERR(hdmi->regulator)) {
|
||||
+ dev_err(dev, "Couldn't get regulator\n");
|
||||
+ return PTR_ERR(hdmi->regulator);
|
||||
+ }
|
||||
+
|
||||
+ ret = regulator_enable(hdmi->regulator);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "Failed to enable regulator\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
ret = reset_control_deassert(hdmi->rst_ctrl);
|
||||
if (ret) {
|
||||
dev_err(dev, "Could not deassert ctrl reset control\n");
|
||||
- return ret;
|
||||
+ goto err_disable_regulator;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(hdmi->clk_tmds);
|
||||
@@ -183,6 +195,8 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
clk_disable_unprepare(hdmi->clk_tmds);
|
||||
err_assert_ctrl_reset:
|
||||
reset_control_assert(hdmi->rst_ctrl);
|
||||
+err_disable_regulator:
|
||||
+ regulator_disable(hdmi->regulator);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -196,6 +210,7 @@ static void sun8i_dw_hdmi_unbind(struct device *dev, struct device *master,
|
||||
sun8i_hdmi_phy_remove(hdmi);
|
||||
clk_disable_unprepare(hdmi->clk_tmds);
|
||||
reset_control_assert(hdmi->rst_ctrl);
|
||||
+ regulator_disable(hdmi->regulator);
|
||||
}
|
||||
|
||||
static const struct component_ops sun8i_dw_hdmi_ops = {
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
|
||||
index aadbe0a10b0c..7fdc1ecd2892 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
|
||||
+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <drm/drm_encoder.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/regmap.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
#include <linux/reset.h>
|
||||
|
||||
#define SUN8I_HDMI_PHY_DBG_CTRL_REG 0x0000
|
||||
@@ -176,6 +177,7 @@ struct sun8i_dw_hdmi {
|
||||
struct drm_encoder encoder;
|
||||
struct sun8i_hdmi_phy *phy;
|
||||
struct dw_hdmi_plat_data plat_data;
|
||||
+ struct regulator *regulator;
|
||||
struct reset_control *rst_ctrl;
|
||||
};
|
||||
|
|
@ -0,0 +1,329 @@
|
|||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
|
||||
index 094cfed13df9..0d8f5571d574 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
|
||||
@@ -60,6 +60,17 @@
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
+ connector {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
@@ -103,6 +118,21 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&de {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ hdmi-supply = <®_dldo1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi_out {
|
||||
+ hdmi_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins>;
|
||||
@@ -120,6 +146,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&mixer1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
@@ -300,6 +330,10 @@
|
||||
vcc-hdmi-supply = <®_dldo1>;
|
||||
};
|
||||
|
||||
+&tcon1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
|
||||
index 98dbff19f5cc..2bcf02f46366 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
|
||||
@@ -57,6 +57,21 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
+
|
||||
+ connector {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&de {
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
@@ -67,6 +82,17 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hdmi {
|
||||
+ hdmi-supply = <®_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 +104,10 @@
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
+&mixer1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
@@ -199,6 +229,10 @@
|
||||
vcc-hdmi-supply = <®_dldo1>;
|
||||
};
|
||||
|
||||
+&tcon1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
|
||||
index 3f531393eaee..5445a7a1db51 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
|
||||
@@ -77,12 +77,42 @@
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
+ connector {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
|
||||
};
|
||||
};
|
||||
|
||||
+&de {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ hdmi-supply = <®_dldo1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi_out {
|
||||
+ hdmi_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mixer1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -218,6 +248,10 @@
|
||||
vcc-hdmi-supply = <®_dldo1>;
|
||||
};
|
||||
|
||||
+&tcon1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
index 1b9b92e541d2..1b972bade9f6 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
@@ -62,6 +62,21 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
+
|
||||
+ connector {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&de {
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
@@ -82,6 +97,17 @@
|
||||
|
||||
};
|
||||
|
||||
+&hdmi {
|
||||
+ hdmi-supply = <®_dldo1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi_out {
|
||||
+ hdmi_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins>;
|
||||
@@ -99,6 +125,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&mixer1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
@@ -238,6 +268,10 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+&tcon1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
/* On Exp and Euler connectors */
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
|
||||
index c21f2331add6..eff44b069b1d 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
|
||||
@@ -61,6 +61,17 @@
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
+ 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 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&de {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -86,6 +101,17 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hdmi {
|
||||
+ hdmi-supply = <®_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";
|
||||
@@ -93,6 +119,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&mixer1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&mmc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_pins>;
|
||||
@@ -138,6 +168,10 @@
|
||||
vcc-hdmi-supply = <®_dldo1>;
|
||||
};
|
||||
|
||||
+&tcon1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
Loading…
Add table
Add a link
Reference in a new issue