Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: dts: allwinner: pinephone: Add WiFi support

The PinePhone has a Realtek rtl8723cs WiFi module.

On mainboard revisions 1.0 and 1.1, the reset input is always pulled
high, so no power sequence is needed. On mainboard revision 1.2, the
reset input is connected to PL2.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20201105054135.24860-6-samuel@sholland.org

authored by

Ondrej Jirman and committed by
Maxime Ripard
4fcf6f34 a966ef62

+31
+9
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
··· 8 8 / { 9 9 model = "Pine64 PinePhone (1.2)"; 10 10 compatible = "pine64,pinephone-1.2", "allwinner,sun50i-a64"; 11 + 12 + wifi_pwrseq: wifi-pwrseq { 13 + compatible = "mmc-pwrseq-simple"; 14 + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ 15 + }; 11 16 }; 12 17 13 18 &backlight { ··· 42 37 */ 43 38 interrupt-parent = <&pio>; 44 39 interrupts = <1 1 IRQ_TYPE_EDGE_RISING>; /* PB1 */ 40 + }; 41 + 42 + &mmc1 { 43 + mmc-pwrseq = <&wifi_pwrseq>; 45 44 }; 46 45 47 46 &sgm3140 {
+22
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
··· 13 13 14 14 / { 15 15 aliases { 16 + ethernet0 = &rtl8723cs; 16 17 serial0 = &uart0; 17 18 }; 18 19 ··· 48 47 color = <LED_COLOR_ID_RED>; 49 48 gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */ 50 49 }; 50 + }; 51 + 52 + reg_vbat_wifi: vbat-wifi { 53 + compatible = "regulator-fixed"; 54 + regulator-min-microvolt = <3300000>; 55 + regulator-max-microvolt = <3300000>; 56 + regulator-name = "vbat-wifi"; 51 57 }; 52 58 53 59 sgm3140: led-controller { ··· 222 214 disable-wp; 223 215 bus-width = <4>; 224 216 status = "okay"; 217 + }; 218 + 219 + &mmc1 { 220 + pinctrl-names = "default"; 221 + pinctrl-0 = <&mmc1_pins>; 222 + vmmc-supply = <&reg_vbat_wifi>; 223 + vqmmc-supply = <&reg_dldo4>; 224 + bus-width = <4>; 225 + non-removable; 226 + status = "okay"; 227 + 228 + rtl8723cs: wifi@1 { 229 + reg = <1>; 230 + }; 225 231 }; 226 232 227 233 &mmc2 {