arm64: dts: ti: k3-am625-sk: Add support for WL1837 module onboard
Subsystems (2)
PATCH 1/1 arm64: dts: ti: k3-am625-sk: Add support for WL1837 module onboard
From: Vignesh Raghavendra <[email protected]>
WL1837 WLAN card is present on the original AM625 SK board. It communicates with the SoC using 4 bit SDIO through the second instance of MMCSD.
Starting with SK-AM62B, there is a M.2 WLAN device connector instead of the integrated WL1837 WLAN. The M.2 connector should be handled separately in the k3-am62a.dtsi and k3-am62b.dtsi files as needed.
Note that WLAN currently needs fw_devlink=permissive set on the command line. Not sure what is missing here but that seems like a separate change.
--- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 79 ++++++++++++++++++++++++++ 1 file changed, 79 insertions(+)
arch/arm64/boot/dts/ti/k3-am625-sk.dts +79 -0
@@ -103,6 +103,32 @@ vcc_1v8: regulator-5 { regulator-always-on; regulator-boot-on; }; + + wlan_lten: regulator-6 { + bootph-all; + compatible = "regulator-fixed"; + regulator-name = "wlan_lten"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + vin-supply = <&vcc_3v3_sys>; + gpios = <&exp1 11 GPIO_ACTIVE_LOW>; + }; + + wlan_en: regulator-7 { + /* OUTPUT of SN74AVC2T244DQMR */ + bootph-all; + compatible = "regulator-fixed"; + regulator-name = "wlan_en"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + enable-active-high; + regulator-always-on; + vin-supply = <&wlan_lten>; + gpios = <&main_gpio0 71 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&wlan_en_default_pins>; + }; }; &main_pmx0 {
@@ -154,6 +180,33 @@ main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-default-pins { AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ >; }; + + wlan_en_default_pins: wlan-en-default-pins { + bootph-all; + pinctrl-single,pins = < + AM62X_IOPAD(0x124, PIN_OUTPUT, 7) /* (A23) MMC2_SDCD.GPIO0_71 */ + >; + }; + + main_mmc2_default_pins: main-mmc2-default-pins { + bootph-all; + pinctrl-single,pins = < + AM62X_IOPAD(0x120, PIN_INPUT, 0) /* (C24) MMC2_CMD */ + AM62X_IOPAD(0x118, PIN_INPUT, 0) /* (D25) MMC2_CLK */ + AM62X_IOPAD(0x114, PIN_INPUT, 0) /* (B24) MMC2_DAT0 */ + AM62X_IOPAD(0x110, PIN_INPUT, 0) /* (C25) MMC2_DAT1 */ + AM62X_IOPAD(0x10c, PIN_INPUT, 0) /* (E23) MMC2_DAT2 */ + AM62X_IOPAD(0x108, PIN_INPUT, 0) /* (D24) MMC2_DAT3 */ + AM62X_IOPAD(0x11c, PIN_INPUT, 0) /* (#N/A) MMC2_CLKB */ + >; + }; + + main_wlirq_default_pins: main-wlirq-default-pins { + bootph-all; + pinctrl-single,pins = < + AM62X_IOPAD(0x128, PIN_INPUT, 7) /* (B23) MMC2_SDWP.GPIO0_72 */ + >; + }; }; &main_gpio0 {
@@ -200,6 +253,32 @@ &sdhci1 { vqmmc-supply = <&vdd_sd_dv>; }; +&sdhci2 { + status = "okay"; + vmmc-supply = <&wlan_en>; + pinctrl-names = "default"; + pinctrl-0 = <&main_mmc2_default_pins>; + bus-width = <4>; + non-removable; + ti,fails-without-test-cd; + cap-power-off-card; + keep-power-in-suspend; + ti,driver-strength-ohm = <50>; + assigned-clocks = <&k3_clks 157 158>; + assigned-clock-parents = <&k3_clks 157 160>; + #address-cells = <1>; + #size-cells = <0>; + + wlcore: wlcore@2 { + compatible = "ti,wl1837"; + reg = <2>; + pinctrl-names = "default"; + pinctrl-0 = <&main_wlirq_default_pins>; + interrupt-parent = <&main_gpio0>; + interrupts = <72 IRQ_TYPE_EDGE_FALLING>; + }; +}; + &cpsw3g { pinctrl-names = "default"; pinctrl-0 = <&main_rgmii1_pins_default>, <&main_rgmii2_pins_default>;
Signature · 1 line
2.42.1
Nishanth Menon
maintainerQuoted 7 lines · Tony Lindgren
From: Vignesh Raghavendra <[email protected]>
WL1837 WLAN card is present on the original AM625 SK board. It communicates with the SoC using 4 bit SDIO through the second instance of MMCSD.
Starting with SK-AM62B, there is a M.2 WLAN device connector instead of
We support AM62B-SK.
Quoted 2 lines
the integrated WL1837 WLAN. The M.2 connector should be handled separately in the
k3-am62a.dtsiandk3-am62b.dtsifiles as needed.
Should this rather be an overlay instead of integrated dts fixup? M2 connector allows for various options including the newer 33xx family[2].
It makes sense for the regulator etc to be on the main dts file, but I am not convinced about it being integrated as part of the dts.
arch/arm64/boot/dts/ti/k3-am625-sk.dts vcc_1v8: regulator-5 {
Quoted 16 lines
Note that WLAN currently needs fw_devlink=permissive set on the command line. Not sure what is missing here but that seems like a separate change.
Signed-off-by Vignesh Raghavendra <[email protected]>Signed-off-by Aswath Govindraju <[email protected]>[[email protected]: updated for pinctrl, improved comments]Signed-off-by Tony Lindgren <[email protected]>--- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 79 ++++++++++++++++++++++++++ 1 file changed, 79 insertions(+)arch/arm64/boot/dts/ti/k3-am625-sk.dts +0
-0@@ -103,6 +103,32 @@ vcc_1v8: regulator-5 {
[...]
arch/arm64/boot/dts/ti/k3-am625-sk.dts &sdhci1 { · line 258
Quoted 11 lines
arch/arm64/boot/dts/ti/k3-am625-sk.dts +4
-0+ }; }; &main_gpio0 {@@ -200,6 +253,32 @@ &sdhci1 { vqmmc-supply = <&vdd_sd_dv>; }; +&sdhci2 { + status = "okay"; + vmmc-supply = <&wlan_en>;
Should we use mmc-pwrseq ?
Looks like we have run into an issue in BeaglePlay with wlan_en being always on for loading firmware. so is there a need to keep the wlan on while suspended?
[1] https://sukrutb.github.io/s2d_TI_am625-BeaglePlay/ (see towards the end)
[2] https://www.ti.com/tool/M2-CC3301
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Quoted 10 lines · Nishanth Menon
Quoted 7 lines · Tony Lindgren
From: Vignesh Raghavendra <[email protected]>
WL1837 WLAN card is present on the original AM625 SK board. It communicates with the SoC using 4 bit SDIO through the second instance of MMCSD.
Starting with SK-AM62B, there is a M.2 WLAN device connector instead of
We support AM62B-SK.
Is that with k3-am62-lp-sk.dts though? Wondering if they should have separate dts files for the M.2.
Quoted 5 lines
Quoted 2 lines
the integrated WL1837 WLAN. The M.2 connector should be handled separately in the
k3-am62a.dtsiandk3-am62b.dtsifiles as needed.Should this rather be an overlay instead of integrated dts fixup? M2 connector allows for various options including the newer 33xx family[2].
Not sure if an overlay makes sense for an integrated device.. It sure makes sense for plug in boards though.
Quoted 2 lines
It makes sense for the regulator etc to be on the main dts file, but I am not convinced about it being integrated as part of the dts.
Yeah if AM62B-SK is supported with the same dts. My vote would be for separate dts files for the integrated variant to keep things simple :)
Quoted 1 line
Should we use mmc-pwrseq ?
Yes probably, I think there was some issue earlier with that but sounds like it's been solved already.
Quoted 3 lines
Looks like we have run into an issue in BeaglePlay with
wlan_enbeing always on for loading firmware. so is there a need to keep the wlan on while suspended?
If the wlan irq was on the first gpio bank, wake-up path would work for the wlan. But I think it's wired to a gpio bank with no wake-up capability, and the padconf wake related patches are still pending. So no need to keep the wlan enabled so far AFAIK.
Regards,
Tony
Quoted 3 lines
[1] https://sukrutb.github.io/s2d_TI_am625-BeaglePlay/ (see towards the end)
[2] https://www.ti.com/tool/M2-CC3301
Nishanth Menon
maintainerQuoted 8 lines · Tony Lindgren
Quoted 7 lines · Nishanth Menon
Quoted 6 lines · Tony Lindgren
From: Vignesh Raghavendra <[email protected]>
WL1837 WLAN card is present on the original AM625 SK board. It communicates with the SoC using 4 bit SDIO through the second instance of MMCSD.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Starting with SK-AM62B, there is a M.2 WLAN device connector instead of
We support AM62B-SK.
Is that with
k3-am62-lp-sk.dtsthough? Wondering if they should have separate dts files for the M.2.
It has been the same dts. Separating the wlan out of the dts sounds correct.
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
the integrated WL1837 WLAN. The M.2 connector should be handled separately in the
k3-am62a.dtsiandk3-am62b.dtsifiles as needed.Should this rather be an overlay instead of integrated dts fixup? M2 connector allows for various options including the newer 33xx family[2].
Not sure if an overlay makes sense for an integrated device.. It sure makes sense for plug in boards though.
overlay works for both variant of devices (please see additional comment below).
Quoted 6 lines
Quoted 3 lines
It makes sense for the regulator etc to be on the main dts file, but I am not convinced about it being integrated as part of the dts.
Yeah if AM62B-SK is supported with the same dts. My vote would be for separate dts files for the integrated variant to keep things simple :)
we can handle it via dtb itself
dts can remain common, the m2 is a dtso, we generate a dtbo and the original will be an additional dtb? I think this can work out without dts/dtsi duplication.
arch/arm64/boot/dts/ti/Makefile has previous examples of the form.
Quoted 6 lines
Quoted 2 lines
Should we use mmc-pwrseq ?
Yes probably, I think there was some issue earlier with that but sounds like it's been solved already.
Quoted 8 lines
Quoted 3 lines
Looks like we have run into an issue in BeaglePlay with
wlan_enbeing always on for loading firmware. so is there a need to keep the wlan on while suspended?If the wlan irq was on the first gpio bank, wake-up path would work for the wlan. But I think it's wired to a gpio bank with no wake-up capability, and the padconf wake related patches are still pending. So no need to keep the wlan enabled so far AFAIK.
I believe the issue was around the wlan firmware load itself, but i think the mmc-pwrseq will probably help resolve it.
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Quoted 3 lines · Nishanth Menon
dts can remain common, the m2 is a dtso, we generate a dtbo and the original will be an additional dtb? I think this can work out without dts/dtsi duplication.
That sounds good to me, I'll take a look.
Quoted 1 line
arch/arm64/boot/dts/ti/Makefilehas previous examples of the form.
OK
Quoted 2 lines
I believe the issue was around the wlan firmware load itself, but i think the mmc-pwrseq will probably help resolve it.
Yes mmc-pwrseq makes sense.
Regards,
Tony