ARM: dts: imx6q-cm-fx6: add sdio wifi/bt nodes
authorChristopher Spinrath <christopher.spinrath@rwth-aachen.de>
Tue, 30 May 2017 20:16:01 +0000 (22:16 +0200)
committerShawn Guo <shawnguo@kernel.org>
Sat, 17 Jun 2017 13:17:04 +0000 (21:17 +0800)
The cm-fx6 module has an on-board AW-NH387 WiFi/BT module which is
based on Marvell's SD8787 chip and is connected to the usdhc1
controller.

Unfortunately, the chip gets unresponsive if the Bluetooth AMP
(Alternate Mac/Phy) function gets probed but the loaded firmware
doesn't support it. For instance, this is the case for the most
recent firmware in linux-firmware (Version 14.66.35.p52).

Thus, just add the required nodes but leave the usdhc1 node disabled
explicitly. Users who disabled the Bluetooth (AMP) support of their
OS can then conveniently enable WiFi (or even plain Bluetooth) support
with a simple device tree overlay/bootloader configuration.

Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/imx6q-cm-fx6.dts

index a8af3822d9dfb79accbf94dfef13751b7017c3b1..fe6ab0aa34f9dd5f7b5d0fb19b6c9be4858fb9d9 100644 (file)
                };
        };
 
+       awnh387_pwrseq: pwrseq {
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_pwrseq>;
+               compatible = "mmc-pwrseq-sd8787";
+               powerdown-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>;
+               reset-gpios = <&gpio6 16 GPIO_ACTIVE_HIGH>;
+       };
+
        reg_pcie_power_on_gpio: regulator-pcie-power-on-gpio {
                compatible = "regulator-fixed";
                regulator-name = "regulator-pcie-power-on-gpio";
                >;
        };
 
+       pinctrl_pwrseq: pwrseqgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_17__GPIO7_IO12          0x1b0b0
+                       MX6QDL_PAD_NANDF_CS3__GPIO6_IO16        0x1b0b0
+               >;
+       };
+
        pinctrl_spdif: spdifgrp {
                fsl,pins = <
                        MX6QDL_PAD_GPIO_16__SPDIF_IN  0x1b0b0
                        MX6QDL_PAD_EIM_D22__GPIO3_IO22  0x130b0
                >;
        };
+
+       pinctrl_usdhc1: usdhc1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD1_CMD__SD1_CMD     0x17071
+                       MX6QDL_PAD_SD1_CLK__SD1_CLK     0x10071
+                       MX6QDL_PAD_SD1_DAT0__SD1_DATA0  0x17071
+                       MX6QDL_PAD_SD1_DAT1__SD1_DATA1  0x17071
+                       MX6QDL_PAD_SD1_DAT2__SD1_DATA2  0x17071
+                       MX6QDL_PAD_SD1_DAT3__SD1_DATA3  0x17071
+               >;
+       };
 };
 
 &pcie {
        dr_mode = "otg";
        status = "okay";
 };
+
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       mmc-pwrseq = <&awnh387_pwrseq>;
+       non-removable;
+       /*
+        * If the OS probes the Bluetooth AMP function advertised on this bus
+        * but the firmware in place does not support it, the WiFi/BT module
+        * gets unresponsive.
+        * Users who configured their OS properly can enable this node to gain
+        * WiFi and/or plain Bluetooth support.
+        */
+       status = "disabled";
+};