]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: allwinner: pinephone: Add WiFi support
authorOndrej Jirman <megous@megous.com>
Thu, 5 Nov 2020 05:41:34 +0000 (23:41 -0600)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 5 Nov 2020 11:24:45 +0000 (12:24 +0100)
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
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi

index 94e4f11e02159be1af359df2b7aafa91862bd66f..acc0ab53b9c1a4549af4761ce8db2d93e54bad2e 100644 (file)
@@ -8,6 +8,11 @@
 / {
        model = "Pine64 PinePhone (1.2)";
        compatible = "pine64,pinephone-1.2", "allwinner,sun50i-a64";
+
+       wifi_pwrseq: wifi-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
+       };
 };
 
 &backlight {
        interrupts = <1 1 IRQ_TYPE_EDGE_RISING>; /* PB1 */
 };
 
+&mmc1 {
+       mmc-pwrseq = <&wifi_pwrseq>;
+};
+
 &sgm3140 {
        enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
        flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
index 8617b79d33e6f1e932d16bf3ae7443065b2ab89b..07f66f4cefac63e0d0355fcdb30b6d5933198086 100644 (file)
@@ -13,6 +13,7 @@
 
 / {
        aliases {
+               ethernet0 = &rtl8723cs;
                serial0 = &uart0;
        };
 
                };
        };
 
+       reg_vbat_wifi: vbat-wifi {
+               compatible = "regulator-fixed";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-name = "vbat-wifi";
+       };
+
        sgm3140: led-controller {
                compatible = "sgmicro,sgm3140";
                vin-supply = <&reg_dcdc1>;
        status = "okay";
 };
 
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+       vmmc-supply = <&reg_vbat_wifi>;
+       vqmmc-supply = <&reg_dldo4>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       rtl8723cs: wifi@1 {
+               reg = <1>;
+       };
+};
+
 &mmc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc2_pins>;