ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Tue, 21 Mar 2023 17:12:13 +0000 (18:12 +0100)
committerNeil Armstrong <neil.armstrong@linaro.org>
Wed, 22 Mar 2023 10:35:32 +0000 (11:35 +0100)
The MXIII Plus uses an Ampak AP6330 Bluetooth and WiFi combo chip.
Bluetooth is connected to &uart_A and requires toggling GPIOX_20.
WiFi can be routed to either &sdhc or &sdio. Route WiFi to &sdhc
since  &sdio is already connected to the SD card. Additionally WiFi
requires toggling GPIOX_11 and GPIOAO_6 as well as enabling the 32kHz
clock signal.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230321171213.2808460-4-martin.blumenstingl@googlemail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
arch/arm/boot/dts/meson8m2-mxiii-plus.dts

index fa6d55f1cfb9c8a5d556e14db8f9c0a47a02487a..aa4d4bf70629610e6e7edea31d3222e4d9a6fdce 100644 (file)
@@ -19,7 +19,6 @@
                ethernet0 = &ethmac;
                i2c0 = &i2c_AO;
                serial0 = &uart_AO;
-               serial1 = &uart_A;
                mmc0 = &sd_card_slot;
        };
 
                };
        };
 
+       sdio_pwrseq: sdio-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+
+               pinctrl-0 = <&xtal_32k_out_pins>;
+               pinctrl-names = "default";
+
+               reset-gpios = <&gpio GPIOX_11 GPIO_ACTIVE_LOW>,
+                             <&gpio_ao GPIOAO_6 GPIO_ACTIVE_LOW>;
+
+               clocks = <&xtal_32k_out>;
+               clock-names = "ext_clock";
+       };
+
        vcc_3v3: regulator-vcc3v3 {
                compatible = "regulator-fixed";
                regulator-name = "VCC3V3";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
        };
+
+       xtal_32k_out: xtal-32k-out-clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+               clock-output-names = "xtal_32k_out";
+       };
 };
 
 &cpu0 {
        vref-supply = <&vddio_ao1v8>;
 };
 
+/* SDIO wifi */
+&sdhc {
+       status = "okay";
+
+       pinctrl-0 = <&sdxc_a_pins>;
+       pinctrl-names = "default";
+
+       bus-width = <4>;
+       max-frequency = <50000000>;
+
+       disable-wp;
+       non-removable;
+       cap-mmc-highspeed;
+       cap-sd-highspeed;
+
+       mmc-pwrseq = <&sdio_pwrseq>;
+
+       vmmc-supply = <&vcc_3v3>;
+       vqmmc-supply = <&vcc_3v3>;
+};
+
 &sdio {
        status = "okay";
 
        pinctrl-0 = <&uart_a1_pins>, <&uart_a1_cts_rts_pins>;
        pinctrl-names = "default";
        uart-has-rtscts;
+
+       bluetooth {
+               compatible = "brcm,bcm20702a1";
+               shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
+               max-speed = <2000000>;
+       };
 };
 
 &uart_AO {