diff --git a/examples/sun8i-h3-i2c-apds9960.dts b/examples/sun8i-h3-i2c-apds9960.dts index e306182..aa83dff 100644 --- a/examples/sun8i-h3-i2c-apds9960.dts +++ b/examples/sun8i-h3-i2c-apds9960.dts @@ -5,13 +5,6 @@ compatible = "allwinner,sun8i-h3"; fragment@0 { - target-path = "/aliases"; - __overlay__ { - i2c0 = "/soc/i2c@01c2ac00"; - }; - }; - - fragment@1 { target = <&pio>; __overlay__ { apds9960_pin_irq: apds9960_pin_irq { @@ -22,7 +15,7 @@ }; }; - fragment@2 { + fragment@1 { target = <&i2c0>; __overlay__ { #address-cells = <1>; diff --git a/examples/sun8i-h3-i2c-ds1307.dts b/examples/sun8i-h3-i2c-ds1307.dts new file mode 100644 index 0000000..ba08ffc --- /dev/null +++ b/examples/sun8i-h3-i2c-ds1307.dts @@ -0,0 +1,20 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun8i-h3"; + + fragment@0 { + target = <&i2c0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + ds1307@68 { + compatible = "dallas,ds1307"; + reg = <0x68>; + status = "okay"; + }; + }; + }; +}; diff --git a/examples/sun8i-h3-i2c-pca8574.dts b/examples/sun8i-h3-i2c-pca8574.dts index 8e785ab..dbf3571 100644 --- a/examples/sun8i-h3-i2c-pca8574.dts +++ b/examples/sun8i-h3-i2c-pca8574.dts @@ -5,13 +5,6 @@ compatible = "allwinner,sun8i-h3"; fragment@0 { - target-path = "/aliases"; - __overlay__ { - i2c0 = "/soc/i2c@01c2ac00"; - }; - }; - - fragment@1 { /* This fragment is required only if using interrupts */ target = <&pio>; __overlay__ { @@ -23,7 +16,7 @@ }; }; - fragment@2 { + fragment@1 { target = <&i2c0>; __overlay__ { #address-cells = <1>; diff --git a/examples/sun8i-h3-spi-ad9833.dts b/examples/sun8i-h3-spi-ad9833.dts index ebbf6c3..566997e 100644 --- a/examples/sun8i-h3-spi-ad9833.dts +++ b/examples/sun8i-h3-spi-ad9833.dts @@ -5,13 +5,6 @@ compatible = "allwinner,sun8i-h3"; fragment@0 { - target-path = "/aliases"; - __overlay__ { - spi0 = "/soc/spi@01c68000"; - }; - }; - - fragment@1 { target-path = "/clocks"; __overlay__ { #address-cells = <1>; @@ -24,7 +17,7 @@ }; }; - fragment@2 { + fragment@1 { target = <&spi0>; __overlay__ { #address-cells = <1>; diff --git a/examples/sun8i-h3-spi-ads7846.dts b/examples/sun8i-h3-spi-ads7846.dts index 80f543c..802b27e 100644 --- a/examples/sun8i-h3-spi-ads7846.dts +++ b/examples/sun8i-h3-spi-ads7846.dts @@ -5,13 +5,6 @@ compatible = "allwinner,sun8i-h3"; fragment@0 { - target-path = "/aliases"; - __overlay__ { - spi0 = "/soc/spi@01c68000"; - }; - }; - - fragment@1 { target = <&pio>; __overlay__ { ads7846_pins: ads7846_pins { @@ -21,7 +14,7 @@ }; }; - fragment@2 { + fragment@1 { target = <&spi0>; __overlay__ { #address-cells = <1>; diff --git a/examples/sun8i-h3-spi-double-spidev.dts b/examples/sun8i-h3-spi-double-spidev.dts index 9b6678d..14a7da6 100644 --- a/examples/sun8i-h3-spi-double-spidev.dts +++ b/examples/sun8i-h3-spi-double-spidev.dts @@ -5,13 +5,6 @@ compatible = "allwinner,sun8i-h3"; fragment@0 { - target-path = "/aliases"; - __overlay__ { - spi0 = "/soc/spi@01c68000"; - }; - }; - - fragment@1 { target = <&spi0>; __overlay__ { #address-cells = <1>; diff --git a/sun8i-h3/sun8i-h3-spi-mcp2515.dts b/examples/sun8i-h3-spi-mcp2515.dts similarity index 61% rename from sun8i-h3/sun8i-h3-spi-mcp2515.dts rename to examples/sun8i-h3-spi-mcp2515.dts index c756a75..41e62b8 100644 --- a/sun8i-h3/sun8i-h3-spi-mcp2515.dts +++ b/examples/sun8i-h3-spi-mcp2515.dts @@ -7,14 +7,6 @@ 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>; @@ -27,7 +19,7 @@ }; }; - fragment@2 { + fragment@1 { target = <&pio>; __overlay__ { can0_pin_irq: can0_pin_irq { @@ -38,11 +30,12 @@ }; }; - fragment@3 { + fragment@2 { target = <&spi0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; + status = "okay"; mcp2515 { reg = <0>; compatible = "microchip,mcp2515"; @@ -52,26 +45,7 @@ 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 { - 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"; + status = "okay"; }; }; }; diff --git a/sun4i-a10/README.sun4i-a10-overlays b/sun4i-a10/README.sun4i-a10-overlays index c5093b5..adcc66f 100644 --- a/sun4i-a10/README.sun4i-a10-overlays +++ b/sun4i-a10/README.sun4i-a10-overlays @@ -22,13 +22,11 @@ I2C bus 0 is used for the AXP209 PMIC - can - i2c1 - i2c2 -- i2c-ds1307 - nand - pps-gpio - pwm - spdif-out - spi-jedec-nor -- spi-mcp2515 - spi-spidev - uart1 - uart2 @@ -64,17 +62,6 @@ Activates TWI/I2C bus 2 I2C2 pins (SCL, SDA): PB20, PB21 -### 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 - ### nand Activates NAND controller @@ -153,47 +140,6 @@ param_spinor_max_freq (int) Default: 1000000 Range: 3000 - 100000000 -### spi-mcp2515 - -Activates mcp2515 SPI CAN controller connected to SPI bus - -SPI 0 pins (MOSI, MISO, SCK, CS0, CS1): PI12, PI13, PI11, PI10, PI14 -SPI 1 pins (MOSI, MISO, SCK, CS0): PI18, PI19, PI17, PI16 -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_mcp2515_spi_bus (int) - SPI bus to activate mcp2515 support on - Required - Supported values: 0, 1, 2 - -param_mcp2515_max_freq (int) - Maximum SPI frequency - Optional - Default: 10000000 - Range: 3000 - 100000000 - -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_mcp2515_clk_freq (int) - Onboard oscillator clock frequency - Optional - Default: 8000000 - Typical values: 8000000, 16000000 - -param_mcp2515_int_pin (pin) - Interrupt pin - Optional - Default: PH15 - Selected pin should support interrupts (EINT) - ### spi-spidev Activates SPIdev device node (/dev/spidevX.Y) for userspace SPI access, diff --git a/sun4i-a10/sun4i-a10-fixup.scr-cmd b/sun4i-a10/sun4i-a10-fixup.scr-cmd index 36cce8f..69af411 100644 --- a/sun4i-a10/sun4i-a10-fixup.scr-cmd +++ b/sun4i-a10/sun4i-a10-fixup.scr-cmd @@ -27,26 +27,6 @@ if test -n "${param_spinor_spi_bus}"; then env delete tmp_spi_path fi -if test -n "${param_mcp2515_spi_bus}"; then - test "${param_mcp2515_spi_bus}" = "0" && setenv tmp_spi_path "spi@01c05000" - test "${param_mcp2515_spi_bus}" = "1" && setenv tmp_spi_path "spi@01c06000" - test "${param_mcp2515_spi_bus}" = "2" && setenv tmp_spi_path "spi@01c17000" - fdt set /soc@01c00000/${tmp_spi_path} status "okay" - fdt set /soc@01c00000/${tmp_spi_path}/mcp2515 status "okay" - if test -n "${param_mcp2515_max_freq}"; then - fdt set /soc@01c00000/${tmp_spi_path}/mcp2515 spi-max-frequency "<${param_mcp2515_max_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@01c00000/pinctrl@01c20800/can0_pin_irq pins "${param_mcp2515_int_pin}" - fdt set /soc@01c00000/${tmp_spi_path}/mcp2515 interrupts "<${tmp_bank} ${tmp_pin} 0x2>" - env delete tmp_pin tmp_bank tmp_spi_path - fi - env delete tmp_spi_path -fi - if test -n "${param_spidev_spi_bus}"; then test "${param_spidev_spi_bus}" = "0" && setenv tmp_spi_path "spi@01c05000" test "${param_spidev_spi_bus}" = "1" && setenv tmp_spi_path "spi@01c06000" @@ -59,21 +39,6 @@ if test -n "${param_spidev_spi_bus}"; then env delete tmp_spi_path 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_ds1307_i2c_bus}"; then - test "${param_ds1307_i2c_bus}" = "0" && setenv tmp_i2c_path "i2c@01c2ac00" - test "${param_ds1307_i2c_bus}" = "1" && setenv tmp_i2c_path "i2c@01c2b000" - test "${param_ds1307_i2c_bus}" = "2" && setenv tmp_i2c_path "i2c@01c2b400" - test "${param_ds1307_i2c_bus}" = "3" && setenv tmp_i2c_path "i2c@01c2b800" - test "${param_ds1307_i2c_bus}" = "4" && setenv tmp_i2c_path "i2c@01c2c000" - fdt set /soc@01c00000/${tmp_i2c_path} status "okay" - fdt set /soc@01c00000/${tmp_i2c_path}/ds1307@68 status "okay" - env delete tmp_i2c_path -fi - if test "${param_spi2_bus_pins}" = "b"; then fdt get value tmp_phandle1 /soc@01c00000/pinctrl@01c20800/spi2@1 phandle fdt get value tmp_phandle2 /soc@01c00000/pinctrl@01c20800/spi2_cs0@1 phandle diff --git a/sun4i-a10/sun4i-a10-i2c-ds1307.dts b/sun4i-a10/sun4i-a10-i2c-ds1307.dts deleted file mode 100644 index 898149f..0000000 --- a/sun4i-a10/sun4i-a10-i2c-ds1307.dts +++ /dev/null @@ -1,54 +0,0 @@ -/dts-v1/; -/plugin/; - -/ { - compatible = "allwinner,sun4i-a10"; - - fragment@0 { - target-path = "/aliases"; - __overlay__ { - i2c0 = "/soc@01c00000/i2c@01c2ac00"; - i2c1 = "/soc@01c00000/i2c@01c2b000"; - i2c2 = "/soc@01c00000/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/sun4i-a10/sun4i-a10-spi-mcp2515.dts b/sun4i-a10/sun4i-a10-spi-mcp2515.dts deleted file mode 100644 index 2d2ef6d..0000000 --- a/sun4i-a10/sun4i-a10-spi-mcp2515.dts +++ /dev/null @@ -1,106 +0,0 @@ -/dts-v1/; -/plugin/; - -#include - -/ { - compatible = "allwinner,sun4i-a10"; - - fragment@0 { - target-path = "/aliases"; - __overlay__ { - spi1 = "/soc/spi@01c06000"; - spi2 = "/soc/spi@01c17000"; - spi3 = "/soc/spi@01c1f000"; - }; - }; - - 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 = "PH15"; - function = "irq"; - bias-pull-up; - }; - }; - }; - - fragment@3 { - target = <&spi0>; - __overlay__ { - pinctrl-names = "default", "default"; - pinctrl-0 = <&spi0_pins_a>; - pinctrl-1 = <&spi0_cs0_pins_a>; - #address-cells = <1>; - #size-cells = <0>; - mcp2515 { - reg = <0>; - compatible = "microchip,mcp2515"; - pinctrl-names = "default"; - pinctrl-0 = <&can0_pin_irq>; - spi-max-frequency = <10000000>; - interrupt-parent = <&pio>; - interrupts = <7 15 IRQ_TYPE_EDGE_FALLING>; /* PH15 */ - clocks = <&can0_osc_fixed>; - status = "disabled"; - }; - }; - }; - - fragment@4 { - target = <&spi1>; - __overlay__ { - pinctrl-names = "default"; - pinctrl-0 = <&spi1_pins_a>, <&spi1_cs0_pins_a>; - #address-cells = <1>; - #size-cells = <0>; - mcp2515 { - reg = <0>; - compatible = "microchip,mcp2515"; - pinctrl-names = "default"; - pinctrl-0 = <&can0_pin_irq>; - spi-max-frequency = <10000000>; - interrupt-parent = <&pio>; - interrupts = <7 15 IRQ_TYPE_EDGE_FALLING>; /* PH15 */ - clocks = <&can0_osc_fixed>; - status = "disabled"; - }; - }; - }; - - fragment@5 { - target = <&spi2>; - __overlay__ { - pinctrl-names = "default", "default"; - pinctrl-0 = <&spi2_pins_a>; - pinctrl-1 = <&spi2_cs0_pins_a>; - #address-cells = <1>; - #size-cells = <0>; - mcp2515 { - reg = <0>; - compatible = "microchip,mcp2515"; - pinctrl-names = "default"; - pinctrl-0 = <&can0_pin_irq>; - spi-max-frequency = <10000000>; - interrupt-parent = <&pio>; - interrupts = <7 15 IRQ_TYPE_EDGE_FALLING>; /* PH15 */ - clocks = <&can0_osc_fixed>; - status = "disabled"; - }; - }; - }; -}; diff --git a/sun7i-a20/README.sun7i-a20-overlays b/sun7i-a20/README.sun7i-a20-overlays index b676bc3..602a208 100644 --- a/sun7i-a20/README.sun7i-a20-overlays +++ b/sun7i-a20/README.sun7i-a20-overlays @@ -24,7 +24,6 @@ I2C bus 0 is used for the AXP209 PMIC - i2c2 - i2c3 - i2c4 -- i2c-ds1307 - mmc2 - nand - pps-gpio @@ -32,7 +31,6 @@ I2C bus 0 is used for the AXP209 PMIC - spdif-out - spi-add-cs1 - spi-jedec-nor -- spi-mcp2515 - spi-spidev - uart1 - uart2 @@ -80,17 +78,6 @@ Activates TWI/I2C bus 4 I2C4 pins (SCL, SDA): PI2, PI3 -### 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, 3, 4 - ### mmc2 Activates SD/MMC controller 2. To be used on boards with second SD slot, eMMC @@ -203,54 +190,6 @@ param_spinor_max_freq (int) Default: 1000000 Range: 3000 - 100000000 -### spi-mcp2515 - -Activates mcp2515 SPI CAN controller connected to SPI bus - -SPI 0 pins (MOSI, MISO, SCK, CS0, CS1): PI12, PI13, PI11, PI10, PI14 -SPI 1 pins (MOSI, MISO, SCK, CS0): PI18, PI19, PI17, PI16 -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_mcp2515_spi_bus (int) - SPI bus to activate mcp2515 support on - Required - Supported values: 0, 1, 2 - -param_mcp2515_spi_cs (int) - SPI chip select number for MCP2515 connected to SPI bus 0 - Optional - Default: 0 - Supported values: 0, 1 - Using chip select 1 on SPI 0 requires using "spi-add-cs1" overlay - -param_mcp2515_max_freq (int) - Maximum SPI frequency - Optional - Default: 10000000 - Range: 3000 - 100000000 - -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_mcp2515_clk_freq (int) - Onboard oscillator clock frequency - Optional - Default: 8000000 - Typical values: 8000000, 16000000 - -param_mcp2515_int_pin (pin) - Interrupt pin - Optional - Default: PH15 - Selected pin should support interrupts (EINT) - ### spi-spidev Activates SPIdev device node (/dev/spidevX.Y) for userspace SPI access, diff --git a/sun7i-a20/sun7i-a20-fixup.scr-cmd b/sun7i-a20/sun7i-a20-fixup.scr-cmd index 3edaae9..86028d7 100644 --- a/sun7i-a20/sun7i-a20-fixup.scr-cmd +++ b/sun7i-a20/sun7i-a20-fixup.scr-cmd @@ -30,29 +30,6 @@ if test -n "${param_spinor_spi_bus}"; then env delete tmp_spi_path fi -if test -n "${param_mcp2515_spi_bus}"; then - test "${param_mcp2515_spi_bus}" = "0" && setenv tmp_spi_path "spi@01c05000" - test "${param_mcp2515_spi_bus}" = "1" && setenv tmp_spi_path "spi@01c06000" - test "${param_mcp2515_spi_bus}" = "2" && setenv tmp_spi_path "spi@01c17000" - fdt set /soc@01c00000/${tmp_spi_path} status "okay" - fdt set /soc@01c00000/${tmp_spi_path}/mcp2515 status "okay" - if test -n "${param_mcp2515_max_freq}"; then - fdt set /soc@01c00000/${tmp_spi_path}/mcp2515 spi-max-frequency "<${param_mcp2515_max_freq}>" - fi - if test "${param_mcp2515_spi_bus}" = "0" && test "${param_mcp2515_spi_cs}" = "1"; then - fdt set /soc@01c00000/${tmp_spi_path}/mcp2515 reg "<1>" - 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@01c00000/pinctrl@01c20800/can0_pin_irq pins "${param_mcp2515_int_pin}" - fdt set /soc@01c00000/${tmp_spi_path}/mcp2515 interrupts "<${tmp_bank} ${tmp_pin} 0x2>" - env delete tmp_pin tmp_bank tmp_spi_path - fi - env delete tmp_spi_path -fi - if test -n "${param_spidev_spi_bus}"; then test "${param_spidev_spi_bus}" = "0" && setenv tmp_spi_path "spi@01c05000" test "${param_spidev_spi_bus}" = "1" && setenv tmp_spi_path "spi@01c06000" @@ -68,21 +45,6 @@ if test -n "${param_spidev_spi_bus}"; then env delete tmp_spi_path 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_ds1307_i2c_bus}"; then - test "${param_ds1307_i2c_bus}" = "0" && setenv tmp_i2c_path "i2c@01c2ac00" - test "${param_ds1307_i2c_bus}" = "1" && setenv tmp_i2c_path "i2c@01c2b000" - test "${param_ds1307_i2c_bus}" = "2" && setenv tmp_i2c_path "i2c@01c2b400" - test "${param_ds1307_i2c_bus}" = "3" && setenv tmp_i2c_path "i2c@01c2b800" - test "${param_ds1307_i2c_bus}" = "4" && setenv tmp_i2c_path "i2c@01c2c000" - fdt set /soc@01c00000/${tmp_i2c_path} status "okay" - fdt set /soc@01c00000/${tmp_i2c_path}/ds1307@68 status "okay" - env delete tmp_i2c_path -fi - if test "${param_spi2_bus_pins}" = "b"; then fdt get value tmp_phandle1 /soc@01c00000/pinctrl@01c20800/spi2@1 phandle fdt get value tmp_phandle2 /soc@01c00000/pinctrl@01c20800/spi2_cs0@1 phandle diff --git a/sun7i-a20/sun7i-a20-i2c-ds1307.dts b/sun7i-a20/sun7i-a20-i2c-ds1307.dts deleted file mode 100644 index c72f8d9..0000000 --- a/sun7i-a20/sun7i-a20-i2c-ds1307.dts +++ /dev/null @@ -1,82 +0,0 @@ -/dts-v1/; -/plugin/; - -/ { - compatible = "allwinner,sun7i-a20"; - - fragment@0 { - target-path = "/aliases"; - __overlay__ { - i2c0 = "/soc@01c00000/i2c@01c2ac00"; - i2c1 = "/soc@01c00000/i2c@01c2b000"; - i2c2 = "/soc@01c00000/i2c@01c2b400"; - i2c3 = "/soc@01c00000/i2c@01c2b800"; - i2c4 = "/soc@01c00000/i2c@01c2c000"; - }; - }; - - 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"; - }; - }; - }; - - fragment@4 { - target = <&i2c3>; - __overlay__ { - #address-cells = <1>; - #size-cells = <0>; - ds1307@68 { - compatible = "dallas,ds1307"; - reg = <0x68>; - status = "disabled"; - }; - }; - }; - - fragment@5 { - target = <&i2c4>; - __overlay__ { - #address-cells = <1>; - #size-cells = <0>; - ds1307@68 { - compatible = "dallas,ds1307"; - reg = <0x68>; - status = "disabled"; - }; - }; - }; -}; diff --git a/sun7i-a20/sun7i-a20-spi-mcp2515.dts b/sun7i-a20/sun7i-a20-spi-mcp2515.dts deleted file mode 100644 index 148c06e..0000000 --- a/sun7i-a20/sun7i-a20-spi-mcp2515.dts +++ /dev/null @@ -1,106 +0,0 @@ -/dts-v1/; -/plugin/; - -#include - -/ { - compatible = "allwinner,sun7i-a20"; - - fragment@0 { - target-path = "/aliases"; - __overlay__ { - spi1 = "/soc/spi@01c06000"; - spi2 = "/soc/spi@01c17000"; - spi3 = "/soc/spi@01c1f000"; - }; - }; - - 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 = "PH15"; - function = "irq"; - bias-pull-up; - }; - }; - }; - - fragment@3 { - target = <&spi0>; - __overlay__ { - pinctrl-names = "default", "default"; - pinctrl-0 = <&spi0_pins_a>; - pinctrl-1 = <&spi0_cs0_pins_a>; - #address-cells = <1>; - #size-cells = <0>; - mcp2515 { - reg = <0>; - compatible = "microchip,mcp2515"; - pinctrl-names = "default"; - pinctrl-0 = <&can0_pin_irq>; - spi-max-frequency = <10000000>; - interrupt-parent = <&pio>; - interrupts = <7 15 IRQ_TYPE_EDGE_FALLING>; /* PH15 */ - clocks = <&can0_osc_fixed>; - status = "disabled"; - }; - }; - }; - - fragment@4 { - target = <&spi1>; - __overlay__ { - pinctrl-names = "default"; - pinctrl-0 = <&spi1_pins_a>, <&spi1_cs0_pins_a>; - #address-cells = <1>; - #size-cells = <0>; - mcp2515 { - reg = <0>; - compatible = "microchip,mcp2515"; - pinctrl-names = "default"; - pinctrl-0 = <&can0_pin_irq>; - spi-max-frequency = <10000000>; - interrupt-parent = <&pio>; - interrupts = <7 15 IRQ_TYPE_EDGE_FALLING>; /* PH15 */ - clocks = <&can0_osc_fixed>; - status = "disabled"; - }; - }; - }; - - fragment@5 { - target = <&spi2>; - __overlay__ { - pinctrl-names = "default", "default"; - pinctrl-0 = <&spi2_pins_a>; - pinctrl-1 = <&spi2_cs0_pins_a>; - #address-cells = <1>; - #size-cells = <0>; - mcp2515 { - reg = <0>; - compatible = "microchip,mcp2515"; - pinctrl-names = "default"; - pinctrl-0 = <&can0_pin_irq>; - spi-max-frequency = <10000000>; - interrupt-parent = <&pio>; - interrupts = <7 15 IRQ_TYPE_EDGE_FALLING>; /* PH15 */ - clocks = <&can0_osc_fixed>; - status = "disabled"; - }; - }; - }; -}; diff --git a/sun8i-h3/README.sun8i-h3-overlays b/sun8i-h3/README.sun8i-h3-overlays index 996308c..0ae207a 100644 --- a/sun8i-h3/README.sun8i-h3-overlays +++ b/sun8i-h3/README.sun8i-h3-overlays @@ -20,13 +20,11 @@ adding fixed software (GPIO) chip selects is possible with a separate overlay - i2c0 - i2c1 - i2c2 -- i2c-ds1307 - pps-gpio - pwm - spdif-out - spi-add-cs1 - spi-jedec-nor -- spi-mcp2515 - spi-spidev - uart1 - uart2 @@ -69,17 +67,6 @@ 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 - ### pps-gpio Activates pulse-per-second GPIO client @@ -154,45 +141,6 @@ param_spinor_max_freq (int) 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_spi_cs (int) - SPI chip select number - Optional - Default: 0 - Supported values: 0, 1 - Using chip select 1 requires using "spi-add-cs1" overlay - -param_mcp2515_max_freq (int) - Maximum SPI frequency - Optional - Default: 10000000 - Range: 3000 - 100000000 - -param_mcp2515_clk_freq (int) - Onboard oscillator clock frequency - Optional - Default: 8000000 - Typical values: 8000000, 16000000 - -param_mcp2515_int_pin (pin) - Interrupt pin - Optional - Default: PA7 - Selected pin should support interrupts (EINT) - ### spi-spidev Activates SPIdev device node (/dev/spidevX.Y) for userspace SPI access, diff --git a/sun8i-h3/sun8i-h3-fixup.scr-cmd b/sun8i-h3/sun8i-h3-fixup.scr-cmd index 1919964..744889c 100644 --- a/sun8i-h3/sun8i-h3-fixup.scr-cmd +++ b/sun8i-h3/sun8i-h3-fixup.scr-cmd @@ -26,28 +26,6 @@ if test -n "${param_spinor_spi_bus}"; then env delete tmp_spi_path fi -if test -n "${param_mcp2515_spi_bus}"; then - test "${param_mcp2515_spi_bus}" = "0" && setenv tmp_spi_path "spi@01c68000" - test "${param_mcp2515_spi_bus}" = "1" && setenv tmp_spi_path "spi@01c69000" - fdt set /soc/${tmp_spi_path} status "okay" - fdt set /soc/${tmp_spi_path}/mcp2515 status "okay" - if test -n "${param_mcp2515_max_freq}"; then - fdt set /soc/${tmp_spi_path}/mcp2515 spi-max-frequency "<${param_mcp2515_max_freq}>" - fi - if test "${param_mcp2515_spi_cs}" = "1"; then - fdt set /soc/${tmp_spi_path}/mcp2515 reg "<1>" - 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}" - fdt set /soc/${tmp_spi_path}/mcp2515 interrupts "<${tmp_bank} ${tmp_pin} 0x2>" - env delete tmp_pin tmp_bank - fi - env delete tmp_spi_path -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" @@ -62,19 +40,6 @@ if test -n "${param_spidev_spi_bus}"; then env delete tmp_spi_path 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_ds1307_i2c_bus}"; then - test "${param_ds1307_i2c_bus}" = "0" && setenv tmp_i2c_path "i2c@01c2ac00" - test "${param_ds1307_i2c_bus}" = "1" && setenv tmp_i2c_path "i2c@01c2b000" - test "${param_ds1307_i2c_bus}" = "2" && setenv tmp_i2c_path "i2c@01c2b400" - fdt set /soc/${tmp_i2c_path} status "okay" - fdt set /soc/${tmp_i2c_path}/ds1307@68 status "okay" - env delete tmp_i2c_path -fi - if test -n "${param_pps_pin}"; then setenv tmp_bank "${param_pps_pin}" setenv tmp_pin "${param_pps_pin}" diff --git a/sun8i-h3/sun8i-h3-i2c-ds1307.dts b/sun8i-h3/sun8i-h3-i2c-ds1307.dts deleted file mode 100644 index 00c18b7..0000000 --- a/sun8i-h3/sun8i-h3-i2c-ds1307.dts +++ /dev/null @@ -1,54 +0,0 @@ -/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"; - }; - }; - }; -};