diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 48e5a5f5..f460f269 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -845,6 +845,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a33-sinlinx-sina33.dtb \ sun8i-a83t-allwinner-h8homlet-v2.dtb \ sun8i-a83t-cubietruck-plus.dtb \ + sun8i-h2-plus-orangepi-zero.dtb \ sun8i-h3-bananapi-m2-plus.dtb \ sun8i-h3-nanopi-m1.dtb \ sun8i-h3-nanopi-neo.dtb \ diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts new file mode 100644 index 00000000..98a44240 --- /dev/null +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts @@ -0,0 +1,106 @@ + +#include "sun8i-h3-orangepi-one.dts" + +/ { + model = "Xunlong Orange Pi Zero"; + compatible = "xunlong,orangepi-zero", "allwinner,sun8i-h2plus", "allwinner,sun8i-h3"; + + aliases { + ethernet1 = &xr819wifi; + }; + + leds { + pinctrl-names = "default"; + pinctrl-0 = <&leds_r_opc>; + + /delete-node/ status_led; + }; + + vdd_wifi: vdd_wifi@0 { + compatible = "regulator-fixed"; + regulator-name = "wifi"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>; + startup-delay-us = <70000>; + enable-active-high; + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_pwrseq_pin_orangepi>; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; + post-power-on-delay-ms = <50>; + }; +}; + +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <&vdd_wifi>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + xr819wifi: xr819wifi@1 { + reg = <1>; + compatible = "xradio,xr819"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_wake>; + interrupt-parent = <&pio>; + interrupts = <6 10 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "host-wake"; + local-mac-address = [dc 44 6d c0 ff ee]; + }; +}; + +&pio { + /delete-node/ leds_opc; + + wifi_wake: wifi_wake@0 { + allwinner,pins = "PG10"; + allwinner,function = "irq"; + allwinner,pull = ; + }; +}; + +&r_pio { + wifi_pwrseq_pin_orangepi: wifi_pwrseq_pin@0 { + allwinner,pins = "PL7"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; +}; + +&spi0 { + status = "okay"; + spi-flash@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "jedec,spi-nor"; + reg = <0>; /* Chip select 0 */ + spi-max-frequency = <10000000>; + status = "okay"; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + partition@0 { + label = "uboot"; + reg = <0x0 0x100000>; + }; + partition@100000 { + label = "env"; + reg = <0x100000 0x100000>; + }; + partition@200000 { + label = "data"; + reg = <0x200000 0x200000>; + }; + }; + }; +};