From: Hans de Goede Date: Sun, 20 Mar 2016 16:00:35 +0000 (+0100) Subject: ARM: dts: sun8i: Add wifi dt node on Orangepi Plus boards X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4bf89c1dc692ad58d774c88dcf8f7946759ab04d;p=linux-beck.git ARM: dts: sun8i: Add wifi dt node on Orangepi Plus boards The Orangepi Plus and Orangepi Plus 2 have a realtek rtl8189etv sdio wifi chip. This commit adds a device-tree node to power it up, so that the mmc subsys can scan it, and enables the mmc controller which is connected to it. Note that this just makes the wifi controller show up as a sdio device. In order for it to work a compatible sdio driver is necessary, an out of tree driver is available here: https://github.com/jwrdegoede/rtl8189ES_linux/ Binding the driver is not done through device tree, but through sdio vendor- and device-id, so it can safely be enabled in devicetree without having a driver upstream yet. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard --- diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts index ba7a959d304a..c5c17bdf8542 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts @@ -102,6 +102,13 @@ enable-active-high; gpio = <&pio 6 11 GPIO_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>; /* PL7 WIFI_EN */ + }; }; &ehci1 { @@ -150,6 +157,13 @@ allwinner,drive = ; allwinner,pull = ; }; + + wifi_pwrseq_pin_orangepi: wifi_pwrseq_pin@0 { + allwinner,pins = "PL7"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; }; &mmc0 { @@ -162,6 +176,16 @@ status = "okay"; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + ®_usb1_vbus { gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>; status = "okay";