From 02fc32bd0b49297931807d9983df1e1f9e60ddc0 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Tue, 5 Sep 2017 23:26:32 +0300 Subject: [PATCH] Update sunxi-next overlays --- .../sunxi-next/add-sunxi-overlays.patch | 333 ++++++++++++++---- 1 file changed, 257 insertions(+), 76 deletions(-) diff --git a/patch/kernel/sunxi-next/add-sunxi-overlays.patch b/patch/kernel/sunxi-next/add-sunxi-overlays.patch index 54051e1083..9e7dab1803 100644 --- a/patch/kernel/sunxi-next/add-sunxi-overlays.patch +++ b/patch/kernel/sunxi-next/add-sunxi-overlays.patch @@ -1,8 +1,8 @@ diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 9c5e1d94..175523fe 100644 +index 4b17f35d..ff6b68e2 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -1047,4 +1047,7 @@ dtstree := $(srctree)/$(src) +@@ -1062,4 +1062,7 @@ dtstree := $(srctree)/$(src) dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) always := $(dtb-y) @@ -12,10 +12,10 @@ index 9c5e1d94..175523fe 100644 +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..ca0e3039 +index 00000000..2285ac06 --- /dev/null +++ b/arch/arm/boot/dts/overlay/Makefile -@@ -0,0 +1,78 @@ +@@ -0,0 +1,84 @@ +ifeq ($(CONFIG_OF_CONFIGFS),y) + +dtbo-$(CONFIG_MACH_SUN4I) += \ @@ -27,6 +27,9 @@ index 00000000..ca0e3039 + sun4i-a10-pps-gpio.dtbo \ + sun4i-a10-pwm.dtbo \ + sun4i-a10-spdif-out.dtbo \ ++ sun4i-a10-spi0.dtbo \ ++ sun4i-a10-spi1.dtbo \ ++ sun4i-a10-spi2.dtbo \ + sun4i-a10-spi-jedec-nor.dtbo \ + sun4i-a10-spi-spidev.dtbo \ + sun4i-a10-uart2.dtbo \ @@ -49,6 +52,9 @@ index 00000000..ca0e3039 + sun7i-a20-pps-gpio.dtbo \ + sun7i-a20-pwm.dtbo \ + sun7i-a20-spdif-out.dtbo \ ++ sun7i-a20-spi0.dtbo \ ++ sun7i-a20-spi1.dtbo \ ++ sun7i-a20-spi2.dtbo \ + sun7i-a20-spi-add-cs1.dtbo \ + sun7i-a20-spi-jedec-nor.dtbo \ + sun7i-a20-spi-spidev.dtbo \ @@ -96,10 +102,10 @@ index 00000000..ca0e3039 +clean-files := *.dtbo *.scr diff --git a/arch/arm/boot/dts/overlay/README.sun4i-a10-overlays b/arch/arm/boot/dts/overlay/README.sun4i-a10-overlays new file mode 100644 -index 00000000..adcc66f0 +index 00000000..fd059d1d --- /dev/null +++ b/arch/arm/boot/dts/overlay/README.sun4i-a10-overlays -@@ -0,0 +1,253 @@ +@@ -0,0 +1,271 @@ +This document describes overlays provided in the kernel packages +For generic Armbian overlays documentation please see +https://docs.armbian.com/User-Guide_Allwinner_overlays/ @@ -128,6 +134,9 @@ index 00000000..adcc66f0 +- pps-gpio +- pwm +- spdif-out ++- spi0 ++- spi1 ++- spi2 +- spi-jedec-nor +- spi-spidev +- uart1 @@ -212,6 +221,35 @@ index 00000000..adcc66f0 + +SPDIF pin: PB13 + ++### spi0 ++ ++Activates SPI controller 0 to use it with other overlays and sets up the pin multiplexing for it ++ ++SPI 0 pins (MOSI, MISO, SCK, CS0, CS1): PI12, PI13, PI11, PI10, PI14 ++ ++### spi1 ++ ++Activates SPI controller 1 to use it with other overlays and sets up the pin multiplexing for it ++ ++SPI 1 pins (MOSI, MISO, SCK, CS0): PI18, PI19, PI17, PI16 ++ ++### spi2 ++ ++Activates SPI controller 2 to use it with other overlays and sets up the pin multiplexing for it ++ ++SPI 2 pins a (MOSI, MISO, SCK, CS0): PC21, PC22, PC20, PC19 ++SPI 2 pins b (MOSI, MISO, SCK, CS0): PB16, PB17, PB15, PB14 ++ ++Parameters: ++ ++param_spi2_bus_pins (char) ++ SPI bus 2 pinmux variant ++ Optional ++ Default: a ++ Supported values: a, b ++ Determines what pins SPI bus 2 is exposed on if SPI 2 is used ++ ++ +### spi-jedec-nor + +Activates MTD support for JEDEC compatible SPI NOR flash chips on SPI bus @@ -229,13 +267,6 @@ index 00000000..adcc66f0 + Required + Supported values: 0, 1, 2 + -+param_spi2_bus_pins (char) -+ SPI bus 2 pinmux variant -+ Optional -+ Default: a -+ Supported values: a, b -+ Determines what pins SPI bus 2 is exposed on if SPI 2 is used by any overlay -+ +param_spinor_max_freq (int) + Maximum SPI frequency + Optional @@ -259,13 +290,6 @@ index 00000000..adcc66f0 + Required + Supported values: 0, 1, 2 + -+param_spi2_bus_pins (char) -+ SPI bus 2 pinmux variant -+ Optional -+ Default: a -+ Supported values: a, b -+ Determines what pins SPI bus 2 is exposed on if SPI 2 is used by any overlay -+ +param_spidev_max_freq (int) + Maximum SPIdev frequency + Optional @@ -355,10 +379,10 @@ index 00000000..adcc66f0 + please use external pull-up resistor instead diff --git a/arch/arm/boot/dts/overlay/README.sun7i-a20-overlays b/arch/arm/boot/dts/overlay/README.sun7i-a20-overlays new file mode 100644 -index 00000000..602a2087 +index 00000000..9e53a862 --- /dev/null +++ b/arch/arm/boot/dts/overlay/README.sun7i-a20-overlays -@@ -0,0 +1,310 @@ +@@ -0,0 +1,327 @@ +This document describes overlays provided in the kernel packages +For generic Armbian overlays documentation please see +https://docs.armbian.com/User-Guide_Allwinner_overlays/ @@ -390,6 +414,9 @@ index 00000000..602a2087 +- pps-gpio +- pwm +- spdif-out ++- spi0 ++- spi1 ++- spi2 +- spi-add-cs1 +- spi-jedec-nor +- spi-spidev @@ -507,6 +534,34 @@ index 00000000..602a2087 + +SPDIF pin: PB13 + ++### spi0 ++ ++Activates SPI controller 0 to use it with other overlays and sets up the pin multiplexing for it ++ ++SPI 0 pins (MOSI, MISO, SCK, CS0, CS1): PI12, PI13, PI11, PI10, PI14 ++ ++### spi1 ++ ++Activates SPI controller 1 to use it with other overlays and sets up the pin multiplexing for it ++ ++SPI 1 pins (MOSI, MISO, SCK, CS0): PI18, PI19, PI17, PI16 ++ ++### spi2 ++ ++Activates SPI controller 2 to use it with other overlays and sets up the pin multiplexing for it ++ ++SPI 2 pins a (MOSI, MISO, SCK, CS0): PC21, PC22, PC20, PC19 ++SPI 2 pins b (MOSI, MISO, SCK, CS0): PB16, PB17, PB15, PB14 ++ ++Parameters: ++ ++param_spi2_bus_pins (char) ++ SPI bus 2 pinmux variant ++ Optional ++ Default: a ++ Supported values: a, b ++ Determines what pins SPI bus 2 is exposed on if SPI 2 is used ++ +### spi-add-cs1 + +Activates SPI chip select 1 on SPI controller 0 @@ -538,13 +593,6 @@ index 00000000..602a2087 + Supported values: 0, 1 + Using chip select 1 on SPI 0 requires using "spi-add-cs1" overlay + -+param_spi2_bus_pins (char) -+ SPI bus 2 pinmux variant -+ Optional -+ Default: a -+ Supported values: a, b -+ Determines what pins SPI bus 2 is exposed on if SPI 2 is used by any overlay -+ +param_spinor_max_freq (int) + Maximum SPI frequency + Optional @@ -575,13 +623,6 @@ index 00000000..602a2087 + Supported values: 0, 1 + Using chip select 1 on SPI 0 requires using "spi-add-cs1" overlay + -+param_spi2_bus_pins (char) -+ SPI bus 2 pinmux variant -+ Optional -+ Default: a -+ Supported values: a, b -+ Determines what pins SPI bus 2 is exposed on if SPI 2 is used by any overlay -+ +param_spidev_max_freq (int) + Maximum SPIdev frequency + Optional @@ -1347,10 +1388,10 @@ index 00000000..5811e474 +}; diff --git a/arch/arm/boot/dts/overlay/sun4i-a10-spi-jedec-nor.dts b/arch/arm/boot/dts/overlay/sun4i-a10-spi-jedec-nor.dts new file mode 100644 -index 00000000..a9feedf8 +index 00000000..7d3c2528 --- /dev/null +++ b/arch/arm/boot/dts/overlay/sun4i-a10-spi-jedec-nor.dts -@@ -0,0 +1,65 @@ +@@ -0,0 +1,57 @@ +/dts-v1/; +/plugin/; + @@ -1369,9 +1410,6 @@ index 00000000..a9feedf8 + fragment@1 { + target = <&spi0>; + __overlay__ { -+ pinctrl-names = "default", "default"; -+ pinctrl-0 = <&spi0_pins_a>; -+ pinctrl-1 = <&spi0_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spiflash { @@ -1386,8 +1424,6 @@ index 00000000..a9feedf8 + fragment@2 { + target = <&spi1>; + __overlay__ { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi1_pins_a>, <&spi1_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spiflash { @@ -1402,9 +1438,6 @@ index 00000000..a9feedf8 + fragment@3 { + target = <&spi2>; + __overlay__ { -+ pinctrl-names = "default", "default"; -+ pinctrl-0 = <&spi2_pins_a>; -+ pinctrl-1 = <&spi2_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spiflash { @@ -1418,10 +1451,10 @@ index 00000000..a9feedf8 +}; diff --git a/arch/arm/boot/dts/overlay/sun4i-a10-spi-spidev.dts b/arch/arm/boot/dts/overlay/sun4i-a10-spi-spidev.dts new file mode 100644 -index 00000000..6072c66a +index 00000000..ecdffc02 --- /dev/null +++ b/arch/arm/boot/dts/overlay/sun4i-a10-spi-spidev.dts -@@ -0,0 +1,65 @@ +@@ -0,0 +1,57 @@ +/dts-v1/; +/plugin/; + @@ -1440,9 +1473,6 @@ index 00000000..6072c66a + fragment@1 { + target = <&spi0>; + __overlay__ { -+ pinctrl-names = "default", "default"; -+ pinctrl-0 = <&spi0_pins_a>; -+ pinctrl-1 = <&spi0_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spidev { @@ -1457,8 +1487,6 @@ index 00000000..6072c66a + fragment@2 { + target = <&spi1>; + __overlay__ { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi1_pins_a>, <&spi1_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spidev { @@ -1473,9 +1501,6 @@ index 00000000..6072c66a + fragment@3 { + target = <&spi2>; + __overlay__ { -+ pinctrl-names = "default", "default"; -+ pinctrl-0 = <&spi2_pins_a>; -+ pinctrl-1 = <&spi2_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spidev { @@ -1487,6 +1512,92 @@ index 00000000..6072c66a + }; + }; +}; +diff --git a/arch/arm/boot/dts/overlay/sun4i-a10-spi0.dts b/arch/arm/boot/dts/overlay/sun4i-a10-spi0.dts +new file mode 100644 +index 00000000..73f01a63 +--- /dev/null ++++ b/arch/arm/boot/dts/overlay/sun4i-a10-spi0.dts +@@ -0,0 +1,23 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "allwinner,sun7i-a20"; ++ ++ fragment@0 { ++ target-path = "/aliases"; ++ __overlay__ { ++ spi0 = "/soc/spi@01c05000"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi0>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default", "default"; ++ pinctrl-0 = <&spi0_pins_a>; ++ pinctrl-1 = <&spi0_cs0_pins_a>; ++ }; ++ }; ++}; +diff --git a/arch/arm/boot/dts/overlay/sun4i-a10-spi1.dts b/arch/arm/boot/dts/overlay/sun4i-a10-spi1.dts +new file mode 100644 +index 00000000..0b4f70fa +--- /dev/null ++++ b/arch/arm/boot/dts/overlay/sun4i-a10-spi1.dts +@@ -0,0 +1,22 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "allwinner,sun7i-a20"; ++ ++ fragment@0 { ++ target-path = "/aliases"; ++ __overlay__ { ++ spi1 = "/soc/spi@01c06000"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi1>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi1_pins_a>, <&spi1_cs0_pins_a>; ++ }; ++ }; ++}; +diff --git a/arch/arm/boot/dts/overlay/sun4i-a10-spi2.dts b/arch/arm/boot/dts/overlay/sun4i-a10-spi2.dts +new file mode 100644 +index 00000000..216058ef +--- /dev/null ++++ b/arch/arm/boot/dts/overlay/sun4i-a10-spi2.dts +@@ -0,0 +1,23 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "allwinner,sun7i-a20"; ++ ++ fragment@0 { ++ target-path = "/aliases"; ++ __overlay__ { ++ spi2 = "/soc/spi@01c17000"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi2>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default", "default"; ++ pinctrl-0 = <&spi2_pins_a>; ++ pinctrl-1 = <&spi2_cs0_pins_a>; ++ }; ++ }; ++}; diff --git a/arch/arm/boot/dts/overlay/sun4i-a10-uart2.dts b/arch/arm/boot/dts/overlay/sun4i-a10-uart2.dts new file mode 100644 index 00000000..3711af57 @@ -2318,10 +2429,10 @@ index 00000000..2de39a20 +}; diff --git a/arch/arm/boot/dts/overlay/sun7i-a20-spi-jedec-nor.dts b/arch/arm/boot/dts/overlay/sun7i-a20-spi-jedec-nor.dts new file mode 100644 -index 00000000..08177a33 +index 00000000..8df02506 --- /dev/null +++ b/arch/arm/boot/dts/overlay/sun7i-a20-spi-jedec-nor.dts -@@ -0,0 +1,65 @@ +@@ -0,0 +1,57 @@ +/dts-v1/; +/plugin/; + @@ -2340,9 +2451,6 @@ index 00000000..08177a33 + fragment@1 { + target = <&spi0>; + __overlay__ { -+ pinctrl-names = "default", "default"; -+ pinctrl-0 = <&spi0_pins_a>; -+ pinctrl-1 = <&spi0_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spiflash { @@ -2357,8 +2465,6 @@ index 00000000..08177a33 + fragment@2 { + target = <&spi1>; + __overlay__ { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi1_pins_a>, <&spi1_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spiflash { @@ -2373,9 +2479,6 @@ index 00000000..08177a33 + fragment@3 { + target = <&spi2>; + __overlay__ { -+ pinctrl-names = "default", "default"; -+ pinctrl-0 = <&spi2_pins_a>; -+ pinctrl-1 = <&spi2_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spiflash { @@ -2389,10 +2492,10 @@ index 00000000..08177a33 +}; diff --git a/arch/arm/boot/dts/overlay/sun7i-a20-spi-spidev.dts b/arch/arm/boot/dts/overlay/sun7i-a20-spi-spidev.dts new file mode 100644 -index 00000000..c52ba0e4 +index 00000000..c89382ef --- /dev/null +++ b/arch/arm/boot/dts/overlay/sun7i-a20-spi-spidev.dts -@@ -0,0 +1,65 @@ +@@ -0,0 +1,57 @@ +/dts-v1/; +/plugin/; + @@ -2411,9 +2514,6 @@ index 00000000..c52ba0e4 + fragment@1 { + target = <&spi0>; + __overlay__ { -+ pinctrl-names = "default", "default"; -+ pinctrl-0 = <&spi0_pins_a>; -+ pinctrl-1 = <&spi0_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spidev { @@ -2428,8 +2528,6 @@ index 00000000..c52ba0e4 + fragment@2 { + target = <&spi1>; + __overlay__ { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi1_pins_a>, <&spi1_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spidev { @@ -2444,9 +2542,6 @@ index 00000000..c52ba0e4 + fragment@3 { + target = <&spi2>; + __overlay__ { -+ pinctrl-names = "default", "default"; -+ pinctrl-0 = <&spi2_pins_a>; -+ pinctrl-1 = <&spi2_cs0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + spidev { @@ -2458,6 +2553,92 @@ index 00000000..c52ba0e4 + }; + }; +}; +diff --git a/arch/arm/boot/dts/overlay/sun7i-a20-spi0.dts b/arch/arm/boot/dts/overlay/sun7i-a20-spi0.dts +new file mode 100644 +index 00000000..73f01a63 +--- /dev/null ++++ b/arch/arm/boot/dts/overlay/sun7i-a20-spi0.dts +@@ -0,0 +1,23 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "allwinner,sun7i-a20"; ++ ++ fragment@0 { ++ target-path = "/aliases"; ++ __overlay__ { ++ spi0 = "/soc/spi@01c05000"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi0>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default", "default"; ++ pinctrl-0 = <&spi0_pins_a>; ++ pinctrl-1 = <&spi0_cs0_pins_a>; ++ }; ++ }; ++}; +diff --git a/arch/arm/boot/dts/overlay/sun7i-a20-spi1.dts b/arch/arm/boot/dts/overlay/sun7i-a20-spi1.dts +new file mode 100644 +index 00000000..0b4f70fa +--- /dev/null ++++ b/arch/arm/boot/dts/overlay/sun7i-a20-spi1.dts +@@ -0,0 +1,22 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "allwinner,sun7i-a20"; ++ ++ fragment@0 { ++ target-path = "/aliases"; ++ __overlay__ { ++ spi1 = "/soc/spi@01c06000"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi1>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi1_pins_a>, <&spi1_cs0_pins_a>; ++ }; ++ }; ++}; +diff --git a/arch/arm/boot/dts/overlay/sun7i-a20-spi2.dts b/arch/arm/boot/dts/overlay/sun7i-a20-spi2.dts +new file mode 100644 +index 00000000..216058ef +--- /dev/null ++++ b/arch/arm/boot/dts/overlay/sun7i-a20-spi2.dts +@@ -0,0 +1,23 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "allwinner,sun7i-a20"; ++ ++ fragment@0 { ++ target-path = "/aliases"; ++ __overlay__ { ++ spi2 = "/soc/spi@01c17000"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi2>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default", "default"; ++ pinctrl-0 = <&spi2_pins_a>; ++ pinctrl-1 = <&spi2_cs0_pins_a>; ++ }; ++ }; ++}; diff --git a/arch/arm/boot/dts/overlay/sun7i-a20-uart2.dts b/arch/arm/boot/dts/overlay/sun7i-a20-uart2.dts new file mode 100644 index 00000000..721a02de