Merge pull request #1056 from 5kft/sunxi-patch-fixes

fixed issues with sunxi overlay kernel patches
This commit is contained in:
Igor Pečovnik 2018-07-21 22:14:19 +02:00 committed by GitHub
commit 866d9ada6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 1797 deletions

View File

@ -4520,6 +4520,16 @@ index 0000000..f4ccb7f
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 94de6044..1e85fd7c 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -14,3 +14,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
+subdir-y := $(dts-dirs) overlay
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/allwinner/overlay/Makefile b/arch/arm64/boot/dts/allwinner/overlay/Makefile
new file mode 100644
index 0000000..5cad268
@ -4531,7 +4541,7 @@ index 0000000..5cad268
+ sun50i-a64-i2c0.dtbo \
+ sun50i-a64-i2c1.dtbo \
+ sun50i-a64-pps-gpio.dtbo \
+ sun50i-a64/sun50i-a64-spi-add-cs1.dtbo \
+ sun50i-a64-spi-add-cs1.dtbo \
+ sun50i-a64-spi-jedec-nor.dtbo \
+ sun50i-a64-spi-spidev.dtbo \
+ sun50i-a64-uart1.dtbo \
@ -4559,13 +4569,18 @@ index 0000000..5cad268
+ sun50i-h5-usbhost3.dtbo \
+ sun50i-h5-w1-gpio.dtbo
+
+scr-$(CONFIG_ARCH_SUNXI) += sun50i-a64-fixup.scr
+scr-$(CONFIG_ARCH_SUNXI) += sun50i-h5-fixup.scr
+scr-$(CONFIG_ARCH_SUNXI) += \
+ sun50i-a64-fixup.scr \
+ sun50i-h5-fixup.scr
+
+dtbotxt-$(CONFIG_ARCH_SUNXI) += README.sun50i-a64-overlays
+dtbotxt-$(CONFIG_ARCH_SUNXI) += README.sun50i-h5-overlays
+dtbotxt-$(CONFIG_ARCH_SUNXI) += \
+ README.sun50i-a64-overlays \
+ README.sun50i-h5-overlays
+
+targets += $(dtbo-y) $(scr-y) $(dtbotxt-y)
+
+always := $(dtbo-y) $(scr-y) $(dtbotxt-y)
+clean-files := *.dtbo *.scr
diff --git a/arch/arm64/boot/dts/allwinner/overlay/README.sun50i-a64-overlays b/arch/arm64/boot/dts/allwinner/overlay/README.sun50i-a64-overlays
new file mode 100644
index 0000000..cd9dbc6
@ -5613,8 +5628,8 @@ index 0000000..744889c
+test "${tmp_bank}" = "G" && setenv tmp_bank 6'
+
+if test -n "${param_spinor_spi_bus}"; then
+ test "${param_spinor_spi_bus}" = "0" && setenv tmp_spi_path "spi@01c68000"
+ test "${param_spinor_spi_bus}" = "1" && setenv tmp_spi_path "spi@01c69000"
+ test "${param_spinor_spi_bus}" = "0" && setenv tmp_spi_path "spi@1c68000"
+ test "${param_spinor_spi_bus}" = "1" && setenv tmp_spi_path "spi@1c69000"
+ fdt set /soc/${tmp_spi_path} status "okay"
+ fdt set /soc/${tmp_spi_path}/spiflash status "okay"
+ if test -n "${param_spinor_max_freq}"; then
@ -5627,8 +5642,8 @@ index 0000000..744889c
+fi
+
+if test -n "${param_spidev_spi_bus}"; then
+ test "${param_spidev_spi_bus}" = "0" && setenv tmp_spi_path "spi@01c68000"
+ test "${param_spidev_spi_bus}" = "1" && setenv tmp_spi_path "spi@01c69000"
+ test "${param_spidev_spi_bus}" = "0" && setenv tmp_spi_path "spi@1c68000"
+ test "${param_spidev_spi_bus}" = "1" && setenv tmp_spi_path "spi@1c69000"
+ fdt set /soc/${tmp_spi_path} status "okay"
+ fdt set /soc/${tmp_spi_path}/spidev status "okay"
+ if test -n "${param_spidev_max_freq}"; then
@ -5644,8 +5659,8 @@ index 0000000..744889c
+ setenv tmp_bank "${param_pps_pin}"
+ setenv tmp_pin "${param_pps_pin}"
+ run decompose_pin
+ fdt set /soc/pinctrl@01c20800/pps_pins pins "${param_pps_pin}"
+ fdt get value tmp_phandle /soc/pinctrl@01c20800 phandle
+ fdt set /soc/pinctrl@1c20800/pps_pins pins "${param_pps_pin}"
+ fdt get value tmp_phandle /soc/pinctrl@1c20800 phandle
+ fdt set /pps@0 gpios "<${tmp_phandle} ${tmp_bank} ${tmp_pin} 0>"
+ env delete tmp_pin tmp_bank tmp_phandle
+fi
@ -5672,40 +5687,40 @@ index 0000000..744889c
+ 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 /soc/pinctrl@1c20800/w1_pins pins "${param_w1_pin}"
+ fdt get value tmp_phandle /soc/pinctrl@1c20800 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
+ fdt set /soc/pinctrl@1c20800/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}>"
+ fdt get value tmp_phandle1 /soc/pinctrl@1c20800/uart1 phandle
+ fdt get value tmp_phandle2 /soc/pinctrl@1c20800/uart1_rts_cts phandle
+ fdt set /soc/serial@1c28400 pinctrl-names "default" "default"
+ fdt set /soc/serial@1c28400 pinctrl-0 "<${tmp_phandle1}>"
+ fdt set /soc/serial@1c28400 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}>"
+ fdt get value tmp_phandle1 /soc/pinctrl@1c20800/uart2 phandle
+ fdt get value tmp_phandle2 /soc/pinctrl@1c20800/uart2_rts_cts phandle
+ fdt set /soc/serial@1c28800 pinctrl-names "default" "default"
+ fdt set /soc/serial@1c28800 pinctrl-0 "<${tmp_phandle1}>"
+ fdt set /soc/serial@1c28800 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}>"
+ fdt get value tmp_phandle1 /soc/pinctrl@1c20800/uart3 phandle
+ fdt get value tmp_phandle2 /soc/pinctrl@1c20800/uart3_rts_cts phandle
+ fdt set /soc/serial@1c28c00 pinctrl-names "default" "default"
+ fdt set /soc/serial@1c28c00 pinctrl-0 "<${tmp_phandle1}>"
+ fdt set /soc/serial@1c28c00 pinctrl-1 "<${tmp_phandle2}>"
+ env delete tmp_phandle1 tmp_phandle2
+fi
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-i2c0.dts b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-i2c0.dts
@ -5723,7 +5738,7 @@ index 0000000..55d249d
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ i2c0 = "/soc/i2c@01c2ac00";
+ i2c0 = "/soc/i2c@1c2ac00";
+ };
+ };
+
@ -5749,7 +5764,7 @@ index 0000000..2528870
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ i2c1 = "/soc/i2c@01c2b000";
+ i2c1 = "/soc/i2c@1c2b000";
+ };
+ };
+
@ -5775,7 +5790,7 @@ index 0000000..ff42f01
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ i2c2 = "/soc/i2c@01c2b400";
+ i2c2 = "/soc/i2c@1c2b400";
+ };
+ };
+
@ -5972,8 +5987,8 @@ index 0000000..d4accd9
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ spi0 = "/soc/spi@01c68000";
+ spi1 = "/soc/spi@01c69000";
+ spi0 = "/soc/spi@1c68000";
+ spi1 = "/soc/spi@1c69000";
+ };
+ };
+
@ -6020,8 +6035,8 @@ index 0000000..d8a008d
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ spi0 = "/soc/spi@01c68000";
+ spi1 = "/soc/spi@01c69000";
+ spi0 = "/soc/spi@1c68000";
+ spi1 = "/soc/spi@1c69000";
+ };
+ };
+
@ -6068,7 +6083,7 @@ index 0000000..0ce76ef
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ serial1 = "/soc/serial@01c28400";
+ serial1 = "/soc/serial@1c28400";
+ };
+ };
+
@ -6096,7 +6111,7 @@ index 0000000..88cc0cd
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ serial2 = "/soc/serial@01c28800";
+ serial2 = "/soc/serial@1c28800";
+ };
+ };
+
@ -6134,7 +6149,7 @@ index 0000000..3ad6cc9
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ serial3 = "/soc/serial@01c28c00";
+ serial3 = "/soc/serial@1c28c00";
+ };
+ };
+

File diff suppressed because it is too large Load Diff