512 lines
11 KiB
Diff
512 lines
11 KiB
Diff
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
|
index 01d178a2..714998d1 100644
|
|
--- a/arch/arm/boot/dts/Makefile
|
|
+++ b/arch/arm/boot/dts/Makefile
|
|
@@ -984,10 +984,17 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
|
|
dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
|
|
dtb-$(CONFIG_ARCH_ASPEED) += aspeed-bmc-opp-palmetto.dtb \
|
|
aspeed-ast2500-evb.dtb
|
|
+
|
|
+targets += dtbs dtbs_install
|
|
+targets += $(dtb-y)
|
|
+
|
|
endif
|
|
|
|
dtstree := $(srctree)/$(src)
|
|
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
|
|
|
|
always := $(dtb-y)
|
|
+subdir-y := overlay
|
|
clean-files := *.dtb
|
|
+
|
|
+dts-dirs += overlay
|
|
diff --git a/arch/arm/boot/dts/overlay/Makefile b/arch/arm/boot/dts/overlay/Makefile
|
|
new file mode 100644
|
|
index 00000000..a86987ea
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/Makefile
|
|
@@ -0,0 +1,25 @@
|
|
+ifeq ($(CONFIG_OF_CONFIGFS),y)
|
|
+
|
|
+dtbo-$(CONFIG_MACH_SUN8I) += \
|
|
+ sun8i-h3-analog-codec.dtbo \
|
|
+ sun8i-h3-i2c0.dtbo \
|
|
+ sun8i-h3-i2c1.dtbo \
|
|
+ sun8i-h3-spi0-spidev.dtbo \
|
|
+ sun8i-h3-spi0-mcp2515.dtbo \
|
|
+ sun8i-h3-spi1-spidev.dtbo \
|
|
+ sun8i-h3-spi1-mcp2515.dtbo \
|
|
+ sun8i-h3-uart1.dtbo \
|
|
+ sun8i-h3-uart2.dtbo \
|
|
+ sun8i-h3-uart3.dtbo \
|
|
+ sun8i-h3-usbhost0.dtbo \
|
|
+ sun8i-h3-usbhost2.dtbo \
|
|
+ sun8i-h3-usbhost3.dtbo \
|
|
+ sun8i-h3-w1.dtbo
|
|
+
|
|
+targets += dtbs dtbs_install
|
|
+targets += $(dtbo-y)
|
|
+
|
|
+endif
|
|
+
|
|
+always := $(dtbo-y)
|
|
+clean-files := *.dtbo
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-analog-codec.dts b/arch/arm/boot/dts/overlay/sun8i-h3-analog-codec.dts
|
|
new file mode 100644
|
|
index 00000000..ddcd8e84
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-analog-codec.dts
|
|
@@ -0,0 +1,16 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target = <&codec>;
|
|
+ __overlay__ {
|
|
+ allwinner,audio-routing =
|
|
+ "Line Out", "LINEOUT",
|
|
+ "MIC1", "Mic",
|
|
+ "Mic", "MBIAS";
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-i2c0.dts b/arch/arm/boot/dts/overlay/sun8i-h3-i2c0.dts
|
|
new file mode 100644
|
|
index 00000000..5377cc67
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-i2c0.dts
|
|
@@ -0,0 +1,19 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ i2c0 = "/soc/i2c@01c2ac00";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&i2c0>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-i2c1.dts b/arch/arm/boot/dts/overlay/sun8i-h3-i2c1.dts
|
|
new file mode 100644
|
|
index 00000000..36291c51
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-i2c1.dts
|
|
@@ -0,0 +1,19 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ i2c1 = "/soc/i2c@01c2b000";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&i2c1>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spi0-mcp2515.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spi0-mcp2515.dts
|
|
new file mode 100644
|
|
index 00000000..b7c3e85b
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spi0-mcp2515.dts
|
|
@@ -0,0 +1,59 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+#include <dt-bindings/interrupt-controller/irq.h>
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ spi0 = "/soc/spi@01c68000";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target-path = "/clocks";
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <1>;
|
|
+ can0_osc_fixed: can0_osc_fixed {
|
|
+ compatible = "fixed-clock";
|
|
+ #clock-cells = <0>;
|
|
+ clock-frequency = <8000000>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@2 {
|
|
+ target = <&pio>;
|
|
+ __overlay__ {
|
|
+ can0_pin_irq: can0_pin_irq@0 {
|
|
+ allwinner,pins = "PA7";
|
|
+ allwinner,function = "irq";
|
|
+ allwinner,drive = <0>;
|
|
+ allwinner,pull = <1>; /* Pull up */
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@3 {
|
|
+ target = <&spi0>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ can0: mcp2515@0 {
|
|
+ reg = <0>; /* Chip Select 0 */
|
|
+ compatible = "microchip,mcp2515";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&can0_pin_irq>;
|
|
+ spi-max-frequency = <10000000>;
|
|
+ interrupt-parent = <&pio>;
|
|
+ interrupts = <0 7 IRQ_TYPE_EDGE_FALLING>; /* PA7 */
|
|
+ clocks = <&can0_osc_fixed>;
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spi0-spidev.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spi0-spidev.dts
|
|
new file mode 100644
|
|
index 00000000..8eacf1b2
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spi0-spidev.dts
|
|
@@ -0,0 +1,26 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ spi0 = "/soc/spi@01c68000";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&spi0>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ spidev@0 {
|
|
+ compatible = "spidev";
|
|
+ reg = <0>;
|
|
+ spi-max-frequency = <1000000>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spi1-mcp2515.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spi1-mcp2515.dts
|
|
new file mode 100644
|
|
index 00000000..66be392d
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spi1-mcp2515.dts
|
|
@@ -0,0 +1,59 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+#include <dt-bindings/interrupt-controller/irq.h>
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ spi1 = "/soc/spi@01c69000";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target-path = "/clocks";
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <1>;
|
|
+ can0_osc_fixed: can0_osc_fixed {
|
|
+ compatible = "fixed-clock";
|
|
+ #clock-cells = <0>;
|
|
+ clock-frequency = <8000000>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@2 {
|
|
+ target = <&pio>;
|
|
+ __overlay__ {
|
|
+ can0_pin_irq: can0_pin_irq@0 {
|
|
+ allwinner,pins = "PA7";
|
|
+ allwinner,function = "irq";
|
|
+ allwinner,drive = <0>;
|
|
+ allwinner,pull = <1>; /* Pull up */
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@3 {
|
|
+ target = <&spi1>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ can0: mcp2515@0 {
|
|
+ reg = <0>; /* Chip Select 0 */
|
|
+ compatible = "microchip,mcp2515";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&can0_pin_irq>;
|
|
+ spi-max-frequency = <10000000>;
|
|
+ interrupt-parent = <&pio>;
|
|
+ interrupts = <0 7 IRQ_TYPE_EDGE_FALLING>; /* PA7 */
|
|
+ clocks = <&can0_osc_fixed>;
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spi1-spidev.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spi1-spidev.dts
|
|
new file mode 100644
|
|
index 00000000..9491c426
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spi1-spidev.dts
|
|
@@ -0,0 +1,26 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ spi1 = "/soc/spi@01c69000";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&spi1>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ spidev@0 {
|
|
+ compatible = "spidev";
|
|
+ reg = <0>;
|
|
+ spi-max-frequency = <1000000>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-uart1.dts b/arch/arm/boot/dts/overlay/sun8i-h3-uart1.dts
|
|
new file mode 100644
|
|
index 00000000..5081c234
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-uart1.dts
|
|
@@ -0,0 +1,21 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ serial1 = "/soc/serial@01c28400";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&uart1>;
|
|
+ __overlay__ {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-uart2.dts b/arch/arm/boot/dts/overlay/sun8i-h3-uart2.dts
|
|
new file mode 100644
|
|
index 00000000..8a910690
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-uart2.dts
|
|
@@ -0,0 +1,21 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ serial2 = "/soc/serial@01c28800";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&uart2>;
|
|
+ __overlay__ {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&uart2_pins>;
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-uart3.dts b/arch/arm/boot/dts/overlay/sun8i-h3-uart3.dts
|
|
new file mode 100644
|
|
index 00000000..3f729d45
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-uart3.dts
|
|
@@ -0,0 +1,21 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ serial3 = "/soc/serial@01c28c00";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&uart3>;
|
|
+ __overlay__ {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&uart3_pins>;
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-usbhost0.dts b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost0.dts
|
|
new file mode 100644
|
|
index 00000000..1eef96c1
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost0.dts
|
|
@@ -0,0 +1,19 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target = <&ehci0>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&ohci0>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-usbhost2.dts b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost2.dts
|
|
new file mode 100644
|
|
index 00000000..97199aad
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost2.dts
|
|
@@ -0,0 +1,19 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target = <&ehci2>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&ohci2>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-usbhost3.dts b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost3.dts
|
|
new file mode 100644
|
|
index 00000000..99155b16
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost3.dts
|
|
@@ -0,0 +1,19 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target = <&ehci3>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&ohci3>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-w1.dts b/arch/arm/boot/dts/overlay/sun8i-h3-w1.dts
|
|
new file mode 100644
|
|
index 00000000..7642ef03
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-w1.dts
|
|
@@ -0,0 +1,30 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target = <&pio>;
|
|
+ __overlay__ {
|
|
+ w1_pins: w1_pins {
|
|
+ allwinner,pins = "PD14";
|
|
+ allwinner,function = "gpio_in";
|
|
+ allwinner,drive = <0>;
|
|
+ allwinner,pull = <0>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target-path = "/";
|
|
+ __overlay__ {
|
|
+ w1: onewire@0 {
|
|
+ compatible = "w1-gpio";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&w1_pins>;
|
|
+ gpios = <&pio 3 14 0>; /* PD14 */
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|