mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-31 19:21:43 +00:00
954 lines
22 KiB
Diff
954 lines
22 KiB
Diff
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
|
index 01d178a2..bfba239c 100644
|
|
--- a/arch/arm/boot/dts/Makefile
|
|
+++ b/arch/arm/boot/dts/Makefile
|
|
@@ -990,4 +990,7 @@ 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..e4d038d5
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/Makefile
|
|
@@ -0,0 +1,30 @@
|
|
+ifeq ($(CONFIG_OF_CONFIGFS),y)
|
|
+
|
|
+dtbo-$(CONFIG_MACH_SUN8I) += \
|
|
+ sun8i-h3-analog-codec.dtbo \
|
|
+ sun8i-h3-cir.dtbo \
|
|
+ sun8i-h3-i2c0.dtbo \
|
|
+ sun8i-h3-i2c1.dtbo \
|
|
+ sun8i-h3-i2c2.dtbo \
|
|
+ sun8i-h3-i2c-ds1307.dtbo \
|
|
+ sun8i-h3-spi-jedec-nor.dtbo \
|
|
+ sun8i-h3-spi-mcp2515.dtbo \
|
|
+ sun8i-h3-spi-spidev.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-gpio.dtbo
|
|
+
|
|
+scr-$(CONFIG_MACH_SUN8I) += sun8i-h3-fixup.scr
|
|
+
|
|
+dtbotxt-$(CONFIG_MACH_SUN8I) += README.sun8i-h3-overlays
|
|
+
|
|
+targets += $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
|
+
|
|
+endif
|
|
+
|
|
+always := $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
|
+clean-files := *.dtbo *.scr
|
|
diff --git a/arch/arm/boot/dts/overlay/README.sun8i-h3-overlays b/arch/arm/boot/dts/overlay/README.sun8i-h3-overlays
|
|
new file mode 100644
|
|
index 00000000..195a25d2
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/README.sun8i-h3-overlays
|
|
@@ -0,0 +1,214 @@
|
|
+This document describes overlays provided in the kernel packages
|
|
+For generic Armbian overlays documentation please see
|
|
+https://docs.armbian.com/Hardware_Allwinner_overlays/
|
|
+
|
|
+### Platform:
|
|
+
|
|
+sun8i-h3 (Allwinner H3)
|
|
+
|
|
+### Platform details:
|
|
+
|
|
+Supported pin banks: PA, PC, PD, PG
|
|
+
|
|
+Both SPI controllers have only one hardware CS,
|
|
+so SPI chip select is always set to 0
|
|
+
|
|
+Using software (GPIO) SPI chip selects is possible, but since
|
|
+GPIO pins cannot be changed dynamically due to u-boot limitation,
|
|
+this feature is not used in provided overlays.
|
|
+
|
|
+### Provided overlays:
|
|
+
|
|
+- analog-codec
|
|
+- cir
|
|
+- i2c0
|
|
+- i2c1
|
|
+- i2c2
|
|
+- i2c-ds1307
|
|
+- spi-jedec-nor
|
|
+- spi-mcp2515
|
|
+- spi-spidev
|
|
+- uart1
|
|
+- uart2
|
|
+- uart3
|
|
+- usbhost0
|
|
+- usbhost2
|
|
+- usbhost3
|
|
+- w1-gpio
|
|
+
|
|
+### Overlay details:
|
|
+
|
|
+### analog-codec
|
|
+
|
|
+Activates SoC analog codec driver that provides Line Out and Mic In
|
|
+functionality
|
|
+
|
|
+### cir
|
|
+
|
|
+Activates CIR (Infrared remote) receiver
|
|
+
|
|
+CIR pin: PL11
|
|
+
|
|
+### i2c0
|
|
+
|
|
+Activates TWI/I2C bus 0
|
|
+
|
|
+I2C0 pins (SCL, SDA): PA11, PA12
|
|
+
|
|
+### i2c1
|
|
+
|
|
+Activates TWI/I2C bus 1
|
|
+
|
|
+I2C1 pins (SCL, SDA): PA18, PA19
|
|
+
|
|
+### i2c2
|
|
+
|
|
+Activates TWI/I2C bus 2
|
|
+
|
|
+I2C2 pins (SCL, SDA): PE12, PE13
|
|
+
|
|
+On most board this bus is wired to Camera (CSI) socket
|
|
+
|
|
+### i2c-ds1307
|
|
+
|
|
+Activates Maxim/Dallas DS1307 RTC support
|
|
+
|
|
+Parameters:
|
|
+
|
|
+param_ds1307_i2c_bus (int)
|
|
+ I2C bus RTC is connected to
|
|
+ Required
|
|
+ Supported values: 0, 1, 2
|
|
+
|
|
+### spi-jedec-nor
|
|
+
|
|
+Activates MTD support for JEDEC compatible SPI NOR flash chips on SPI bus
|
|
+supported by the kernel SPI NOR driver
|
|
+
|
|
+SPI 0 pins (MOSI, MISO, SCK, CS): PC0, PC1, PC2, PC3
|
|
+SPI 1 pins (MOSI, MISO, SCK, CS): PA15, PA16, PA14, PA13
|
|
+
|
|
+Parameters:
|
|
+
|
|
+param_spinor_spi_bus (int)
|
|
+ SPI bus to activate SPI NOR flash support on
|
|
+ Required
|
|
+ Supported values: 0, 1
|
|
+
|
|
+param_spinor_max_freq (int)
|
|
+ Maximum SPI frequency
|
|
+ Default: 1000000
|
|
+ Range: 3000 - 100000000
|
|
+
|
|
+### spi-mcp2515
|
|
+
|
|
+Activates mcp2515 SPI CAN controller connected to SPI bus
|
|
+
|
|
+SPI 0 pins (MOSI, MISO, SCK, CS): PC0, PC1, PC2, PC3
|
|
+SPI 1 pins (MOSI, MISO, SCK, CS): PA15, PA16, PA14, PA13
|
|
+
|
|
+Parameters:
|
|
+
|
|
+param_mcp2515_spi_bus (int)
|
|
+ SPI bus to activate mcp2515 support on
|
|
+ Required
|
|
+ Supported values: 0, 1
|
|
+
|
|
+param_mcp2515_clk_freq (int)
|
|
+ Onboard oscillator clock frequency
|
|
+ Default: 8000000
|
|
+ Typical values: 8000000, 16000000
|
|
+
|
|
+param_mcp2515_int_pin (pin)
|
|
+ Interrupt pin
|
|
+ Default: PA7
|
|
+ Selected pin should support interrupts (EINT)
|
|
+
|
|
+### spi-spidev
|
|
+
|
|
+Activates SPIdev device node (/dev/spidevX.Y) for userspace SPI access,
|
|
+where X is the bus number and Y is the CS number
|
|
+
|
|
+SPI 0 pins (MOSI, MISO, SCK, CS): PC0, PC1, PC2, PC3
|
|
+SPI 1 pins (MOSI, MISO, SCK, CS): PA15, PA16, PA14, PA13
|
|
+
|
|
+Parameters:
|
|
+
|
|
+param_spidev_spi_bus (int)
|
|
+ SPI bus to activate SPIdev support on
|
|
+ Required
|
|
+ Supported values: 0, 1
|
|
+
|
|
+param_spidev_max_freq (int)
|
|
+ Maximum SPIdev frequency
|
|
+ Default: 1000000
|
|
+ Range: 3000 - 100000000
|
|
+
|
|
+### uart1
|
|
+
|
|
+Activates serial port 1 (/dev/ttyS1)
|
|
+
|
|
+UART 1 pins (TX, RX, RTS, CTS): PG6, PG7, PG8, PG9
|
|
+
|
|
+Parameters:
|
|
+
|
|
+param_uart1_rtscts (bool)
|
|
+ Enable RTS and CTS pins
|
|
+ Default: 0
|
|
+ Set to 1 to enable
|
|
+
|
|
+### uart2
|
|
+
|
|
+Activates serial port 2 (/dev/ttyS2)
|
|
+
|
|
+UART 2 pins (TX, RX, RTS, CTS): PA0, PA1, PA2, PA3
|
|
+
|
|
+Parameters:
|
|
+
|
|
+param_uart2_rtscts (bool)
|
|
+ Enable RTS and CTS pins
|
|
+ Default: 0
|
|
+ Set to 1 to enable CTS and RTS pins
|
|
+
|
|
+### uart3
|
|
+
|
|
+Activates serial port 3 (/dev/ttyS3)
|
|
+
|
|
+UART 3 pins (TX, RX, RTS, CTS): PA13, PA14, PA15, PA16
|
|
+
|
|
+Parameters:
|
|
+
|
|
+param_uart3_rtscts (bool)
|
|
+ Enable RTS and CTS pins
|
|
+ Default: 0
|
|
+ Set to 1 to enable CTS and RTS pins
|
|
+
|
|
+### usbhost0
|
|
+
|
|
+Activates USB host controller 0
|
|
+
|
|
+### usbhost2
|
|
+
|
|
+Activates USB host controller 2
|
|
+
|
|
+### usbhost3
|
|
+
|
|
+Activates USB host controller 3
|
|
+
|
|
+### w1-gpio
|
|
+
|
|
+Activates 1-Wire GPIO master
|
|
+Requires external pull-up resistor on data pin
|
|
+
|
|
+Parameters:
|
|
+
|
|
+param_w1_pin (pin)
|
|
+ Data pin for 1-Wire master
|
|
+ Default: PD14
|
|
+
|
|
+param_w1_pin_int_pullup (bool)
|
|
+ Enable internal pull-up for the data pin
|
|
+ This option should not be used with multiple devices, parasite power setup
|
|
+ or long wires - please use external pull-up resistor instead
|
|
+ Default: 0
|
|
+ Set to 1 to enable the pull-up
|
|
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-cir.dts b/arch/arm/boot/dts/overlay/sun8i-h3-cir.dts
|
|
new file mode 100644
|
|
index 00000000..f611d823
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-cir.dts
|
|
@@ -0,0 +1,14 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target = <&ir>;
|
|
+ __overlay__ {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&ir_pins_a>;
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-fixup.scr-cmd b/arch/arm/boot/dts/overlay/sun8i-h3-fixup.scr-cmd
|
|
new file mode 100644
|
|
index 00000000..9d6540ed
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-fixup.scr-cmd
|
|
@@ -0,0 +1,137 @@
|
|
+# overlays fixup script
|
|
+# implements (or rather substitutes) overlay arguments functionality
|
|
+# using u-boot scripting, environment variables and "fdt" command
|
|
+
|
|
+# setexpr test_var ${tmp_bank} - A
|
|
+# works only for hex numbers (A-F)
|
|
+
|
|
+setenv decompose_pin 'setexpr tmp_bank sub "P(A|C|D|G)\\d+" "\\1";
|
|
+setexpr tmp_pin sub "P\\S(\\d+)" "\\1";
|
|
+test "${tmp_bank}" = "A" && setenv tmp_bank 0;
|
|
+test "${tmp_bank}" = "C" && setenv tmp_bank 2;
|
|
+test "${tmp_bank}" = "D" && setenv tmp_bank 3;
|
|
+test "${tmp_bank}" = "G" && setenv tmp_bank 6'
|
|
+
|
|
+if test "${param_spinor_spi_bus}" = "0"; then
|
|
+ fdt set /soc/spi@01c68000 status "okay"
|
|
+ fdt set /soc/spi@01c68000/spiflash@0 status "okay"
|
|
+fi
|
|
+
|
|
+if test "${param_spinor_spi_bus}" = "1"; then
|
|
+ fdt set /soc/spi@01c69000 status "okay"
|
|
+ fdt set /soc/spi@01c69000/spiflash@0 status "okay"
|
|
+fi
|
|
+
|
|
+if test "${param_mcp2515_spi_bus}" = "0"; then
|
|
+ fdt set /soc/spi@01c68000 status "okay"
|
|
+ fdt set /soc/spi@01c68000/mcp2515@0 status "okay"
|
|
+fi
|
|
+
|
|
+if test "${param_mcp2515_spi_bus}" = "1"; then
|
|
+ fdt set /soc/spi@01c69000 status "okay"
|
|
+ fdt set /soc/spi@01c69000/mcp2515@0 status "okay"
|
|
+fi
|
|
+
|
|
+if test "${param_spidev_spi_bus}" = "0"; then
|
|
+ fdt set /soc/spi@01c68000 status "okay"
|
|
+ fdt set /soc/spi@01c68000/spidev@0 status "okay"
|
|
+fi
|
|
+
|
|
+if test "${param_spidev_spi_bus}" = "1"; then
|
|
+ fdt set /soc/spi@01c69000 status "okay"
|
|
+ fdt set /soc/spi@01c69000/spidev@0 status "okay"
|
|
+fi
|
|
+
|
|
+if test "${param_ds1307_i2c_bus}" = "0"; then
|
|
+ fdt set /soc/i2c@01c2ac00 status "okay"
|
|
+ fdt set /soc/i2c@01c2ac00/ds1307@68 status "okay"
|
|
+fi
|
|
+
|
|
+if test "${param_ds1307_i2c_bus}" = "1"; then
|
|
+ fdt set /soc/i2c@01c2b000 status "okay"
|
|
+ fdt set /soc/i2c@01c2b000/ds1307@68 status "okay"
|
|
+fi
|
|
+
|
|
+if test "${param_ds1307_i2c_bus}" = "2"; then
|
|
+ fdt set /soc/i2c@01c2b400 status "okay"
|
|
+ fdt set /soc/i2c@01c2b400/ds1307@68 status "okay"
|
|
+fi
|
|
+
|
|
+if test -n "${param_mcp2515_clk_freq}"; then
|
|
+ fdt set /clocks/can0_osc_fixed clock-frequency "<${param_mcp2515_clk_freq}>"
|
|
+fi
|
|
+
|
|
+if test -n "${param_mcp2515_int_pin}"; then
|
|
+ setenv tmp_bank "${param_mcp2515_int_pin}"
|
|
+ setenv tmp_pin "${param_mcp2515_int_pin}"
|
|
+ run decompose_pin
|
|
+ fdt set /soc/pinctrl@01c20800/can0_pin_irq pins "${param_mcp2515_int_pin}"
|
|
+ if test "${param_mcp2515_spi_bus}" = "1"; then
|
|
+ setenv tmp_spi_path "spi@01c69000"
|
|
+ else
|
|
+ setenv tmp_spi_path "spi@01c68000"
|
|
+ fi
|
|
+ fdt set /soc/${tmp_spi_path}/mcp2515@0 interrupts "<${tmp_bank} ${tmp_pin} 0x2>"
|
|
+ env delete tmp_pin tmp_bank tmp_spi_path
|
|
+fi
|
|
+
|
|
+if test -n "${param_spidev_max_freq}"; then
|
|
+ if test "${param_spidev_spi_bus}" = "1"; then
|
|
+ setenv tmp_spi_path "spi@01c69000"
|
|
+ else
|
|
+ setenv tmp_spi_path "spi@01c68000"
|
|
+ fi
|
|
+ fdt set /soc/${tmp_spi_path}/spidev@0 spi-max-frequency "<${param_spidev_max_freq}>"
|
|
+ env delete tmp_spi_path
|
|
+fi
|
|
+
|
|
+if test -n "${param_spinor_max_freq}"; then
|
|
+ if test "${param_spinor_spi_bus}" = "1"; then
|
|
+ setenv tmp_spi_path "spi@01c69000"
|
|
+ else
|
|
+ setenv tmp_spi_path "spi@01c68000"
|
|
+ fi
|
|
+ fdt set /soc/${tmp_spi_path}/spiflash@0 spi-max-frequency "<${param_spinor_max_freq}>"
|
|
+ env delete tmp_spi_path
|
|
+fi
|
|
+
|
|
+if test -n "${param_w1_pin}"; then
|
|
+ setenv tmp_bank "${param_w1_pin}"
|
|
+ setenv tmp_pin "${param_w1_pin}"
|
|
+ run decompose_pin
|
|
+ fdt set /soc/pinctrl@01c20800/w1_pins pins "${param_w1_pin}"
|
|
+ fdt get value tmp_phandle /soc/pinctrl@01c20800 phandle
|
|
+ fdt set /onewire@0 gpios "<${tmp_phandle} ${tmp_bank} ${tmp_pin} 0>"
|
|
+ env delete tmp_pin tmp_bank tmp_phandle
|
|
+fi
|
|
+
|
|
+if test "${param_w1_pin_int_pullup}" = "1"; then
|
|
+ fdt set /soc/pinctrl@01c20800/w1_pins bias-pull-up
|
|
+fi
|
|
+
|
|
+if test "${param_uart1_rtscts}" = "1"; then
|
|
+ fdt get value tmp_phandle1 /soc/pinctrl@01c20800/uart1 phandle
|
|
+ fdt get value tmp_phandle2 /soc/pinctrl@01c20800/uart1_rts_cts phandle
|
|
+ fdt set /soc/serial@01c28400 pinctrl-names "default" "default"
|
|
+ fdt set /soc/serial@01c28400 pinctrl-0 "<${tmp_phandle1}>"
|
|
+ fdt set /soc/serial@01c28400 pinctrl-1 "<${tmp_phandle2}>"
|
|
+ env delete tmp_phandle1 tmp_phandle2
|
|
+fi
|
|
+
|
|
+if test "${param_uart2_rtscts}" = "1"; then
|
|
+ fdt get value tmp_phandle1 /soc/pinctrl@01c20800/uart2 phandle
|
|
+ fdt get value tmp_phandle2 /soc/pinctrl@01c20800/uart2_rts_cts phandle
|
|
+ fdt set /soc/serial@01c28800 pinctrl-names "default" "default"
|
|
+ fdt set /soc/serial@01c28800 pinctrl-0 "<${tmp_phandle1}>"
|
|
+ fdt set /soc/serial@01c28800 pinctrl-1 "<${tmp_phandle2}>"
|
|
+ env delete tmp_phandle1 tmp_phandle2
|
|
+fi
|
|
+
|
|
+if test "${param_uart3_rtscts}" = "1"; then
|
|
+ fdt get value tmp_phandle1 /soc/pinctrl@01c20800/uart3 phandle
|
|
+ fdt get value tmp_phandle2 /soc/pinctrl@01c20800/uart3_rts_cts phandle
|
|
+ fdt set /soc/serial@01c28c00 pinctrl-names "default" "default"
|
|
+ fdt set /soc/serial@01c28c00 pinctrl-0 "<${tmp_phandle1}>"
|
|
+ fdt set /soc/serial@01c28c00 pinctrl-1 "<${tmp_phandle2}>"
|
|
+ env delete tmp_phandle1 tmp_phandle2
|
|
+fi
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-i2c-ds1307.dts b/arch/arm/boot/dts/overlay/sun8i-h3-i2c-ds1307.dts
|
|
new file mode 100644
|
|
index 00000000..265d7a67
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-i2c-ds1307.dts
|
|
@@ -0,0 +1,53 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ i2c0 = "/soc/i2c@01c2ac00";
|
|
+ i2c1 = "/soc/i2c@01c2b000";
|
|
+ i2c2 = "/soc/i2c@01c2b400";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&i2c0>;
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ ds1307@68 {
|
|
+ compatible = "dallas,ds1307";
|
|
+ reg = <0x68>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@2 {
|
|
+ target = <&i2c1>;
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ ds1307@68 {
|
|
+ compatible = "dallas,ds1307";
|
|
+ reg = <0x68>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@3 {
|
|
+ target = <&i2c2>;
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ ds1307@68 {
|
|
+ compatible = "dallas,ds1307";
|
|
+ reg = <0x68>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
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-i2c2.dts b/arch/arm/boot/dts/overlay/sun8i-h3-i2c2.dts
|
|
new file mode 100644
|
|
index 00000000..0e1de089
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-i2c2.dts
|
|
@@ -0,0 +1,19 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ i2c2 = "/soc/i2c@01c2b400";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&i2c2>;
|
|
+ __overlay__ {
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spi-jedec-nor.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spi-jedec-nor.dts
|
|
new file mode 100644
|
|
index 00000000..4df8a5ee
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spi-jedec-nor.dts
|
|
@@ -0,0 +1,41 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ spi0 = "/soc/spi@01c68000";
|
|
+ spi1 = "/soc/spi@01c69000";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&spi0>;
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ spiflash@0 {
|
|
+ compatible = "jedec,spi-nor";
|
|
+ reg = <0>;
|
|
+ spi-max-frequency = <1000000>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@2 {
|
|
+ target = <&spi1>;
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ spiflash@0 {
|
|
+ compatible = "jedec,spi-nor";
|
|
+ reg = <0>;
|
|
+ spi-max-frequency = <1000000>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spi-mcp2515.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spi-mcp2515.dts
|
|
new file mode 100644
|
|
index 00000000..f9ae57ab
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spi-mcp2515.dts
|
|
@@ -0,0 +1,77 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+#include <dt-bindings/interrupt-controller/irq.h>
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ spi0 = "/soc/spi@01c68000";
|
|
+ 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 {
|
|
+ pins = "PA7";
|
|
+ function = "irq";
|
|
+ bias-pull-up;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@3 {
|
|
+ target = <&spi0>;
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ mcp2515@0 {
|
|
+ reg = <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 = "disabled";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@4 {
|
|
+ target = <&spi1>;
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ mcp2515@0 {
|
|
+ reg = <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 = "disabled";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spi-spidev.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spi-spidev.dts
|
|
new file mode 100644
|
|
index 00000000..e178e6a1
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spi-spidev.dts
|
|
@@ -0,0 +1,41 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/aliases";
|
|
+ __overlay__ {
|
|
+ spi0 = "/soc/spi@01c68000";
|
|
+ spi1 = "/soc/spi@01c69000";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target = <&spi0>;
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ spidev@0 {
|
|
+ compatible = "spidev";
|
|
+ status = "disabled";
|
|
+ reg = <0>;
|
|
+ spi-max-frequency = <1000000>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@2 {
|
|
+ target = <&spi1>;
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ spidev@0 {
|
|
+ compatible = "spidev";
|
|
+ status = "disabled";
|
|
+ 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..902e3e5a
|
|
--- /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>;
|
|
+ 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-gpio.dts b/arch/arm/boot/dts/overlay/sun8i-h3-w1-gpio.dts
|
|
new file mode 100644
|
|
index 00000000..24a0c2a4
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-w1-gpio.dts
|
|
@@ -0,0 +1,28 @@
|
|
+/dts-v1/ /plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "allwinner,sun8i-h3";
|
|
+
|
|
+ fragment@0 {
|
|
+ target = <&pio>;
|
|
+ __overlay__ {
|
|
+ w1_pins: w1_pins {
|
|
+ pins = "PD14";
|
|
+ function = "gpio_in";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@1 {
|
|
+ target-path = "/";
|
|
+ __overlay__ {
|
|
+ onewire@0 {
|
|
+ compatible = "w1-gpio";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&w1_pins>;
|
|
+ gpios = <&pio 3 14 0>; /* PD14 */
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|