ARM: dts: qcom: msm8974-klte: Add support for wifi
authorIskren Chernev <iskren.chernev@gmail.com>
Sun, 20 Sep 2020 14:48:58 +0000 (17:48 +0300)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 26 Oct 2020 14:52:40 +0000 (09:52 -0500)
The Samsung Galaxy S5 (klte), uses a Broadcom 4354 Chip connected on the
SDIO bus. The chip also requires a corresponding firmware + txt file[1].

[1] https://gitlab.com/postmarketOS/pmaports/-/blob/master/firmware/firmware-samsung-klte/APKBUILD

Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
Link: https://lore.kernel.org/r/20200920144859.813032-7-iskren.chernev@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts

index 29099b8..989447b 100644 (file)
                };
        };
 
+       vreg_wlan: wlan-regulator {
+               compatible = "regulator-fixed";
+
+               regulator-name = "wl-reg";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpio = <&gpio_expander 8 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        /delete-node/ vreg-boost;
 };
 
                        };
                };
 
+               sdhc3_pin_a: sdhc3-pin-active {
+                       clk {
+                               pins = "sdc2_clk";
+                               drive-strength = <6>;
+                               bias-disable;
+                       };
+
+                       cmd-data {
+                               pins = "sdc2_cmd", "sdc2_data";
+                               drive-strength = <6>;
+                               bias-pull-up;
+                       };
+               };
+
                i2c2_pins: i2c2 {
                        mux {
                                pins = "gpio6", "gpio7";
                                drive-strength = <2>;
                        };
                };
+
+               wifi_pin: wifi {
+                       int {
+                               pins = "gpio92";
+                               function = "gpio";
+
+                               input-enable;
+                               bias-pull-down;
+                       };
+               };
        };
 
        sdhci@f9824900 {
                pinctrl-0 = <&sdhc1_pin_a>;
        };
 
+       sdhci@f98a4900 {
+               status = "okay";
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               max-frequency = <100000000>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&sdhc3_pin_a>;
+
+               vmmc-supply = <&vreg_wlan>;
+               vqmmc-supply = <&pma8084_s4>;
+
+               bus-width = <4>;
+               non-removable;
+
+               wifi@1 {
+                       reg = <1>;
+                       compatible = "brcm,bcm4329-fmac";
+
+                       interrupt-parent = <&msmgpio>;
+                       interrupts = <92 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "host-wake";
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&wlan_sleep_clk_pin &wifi_pin>;
+               };
+       };
+
        usb@f9a55000 {
                status = "ok";
 
                                input-enable;
                                power-source = <PMA8084_GPIO_S4>;
                        };
+
+                       wlan_sleep_clk_pin: wlan-sleep-clk-pin {
+                               pins = "gpio16";
+                               function = "func2";
+
+                               output-high;
+                               power-source = <PMA8084_GPIO_S4>;
+                               qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
+                       };
                };
        };
 };