* [PATCH 1/3] ARM: dts: sun9i: Add mmc1 pinmux setting
2016-10-28 10:11 [PATCH 0/3] ARM: dts: sun9i: Enable SDIO-based WiFi Chen-Yu Tsai
@ 2016-10-28 10:11 ` Chen-Yu Tsai
2016-10-28 10:11 ` [PATCH 2/3] ARM: dts: sun9i: a80-optimus: Enable AP6330 WiFi Chen-Yu Tsai
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2016-10-28 10:11 UTC (permalink / raw)
To: linux-arm-kernel
On the A80, mmc1 is available on pingroup G. Designs mostly use this
to connect to an SDIO WiFi chip.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun9i-a80.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
index 3c5214cbe4e6..ab6a221027ef 100644
--- a/arch/arm/boot/dts/sun9i-a80.dtsi
+++ b/arch/arm/boot/dts/sun9i-a80.dtsi
@@ -700,6 +700,14 @@
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
+ mmc1_pins: mmc1 {
+ allwinner,pins = "PG0", "PG1" ,"PG2", "PG3",
+ "PG4", "PG5";
+ allwinner,function = "mmc1";
+ allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
mmc2_8bit_pins: mmc2_8bit {
allwinner,pins = "PC6", "PC7", "PC8", "PC9",
"PC10", "PC11", "PC12",
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/3] ARM: dts: sun9i: a80-optimus: Enable AP6330 WiFi
2016-10-28 10:11 [PATCH 0/3] ARM: dts: sun9i: Enable SDIO-based WiFi Chen-Yu Tsai
2016-10-28 10:11 ` [PATCH 1/3] ARM: dts: sun9i: Add mmc1 pinmux setting Chen-Yu Tsai
@ 2016-10-28 10:11 ` Chen-Yu Tsai
2016-10-28 10:11 ` [PATCH 3/3] ARM: dts: sun9i: cubieboard4: " Chen-Yu Tsai
2016-11-02 13:32 ` [PATCH 0/3] ARM: dts: sun9i: Enable SDIO-based WiFi Maxime Ripard
3 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2016-10-28 10:11 UTC (permalink / raw)
To: linux-arm-kernel
The board has a Ampak AP6330 WiFi/BT/FM module. Inside it is a Broadcom
BCM4330 WiFi/BT/FM combo IC. The WiFi portion is connected to mmc1, with
the enabling pin connected to PL2. The AC100 RTC provides a low power
clock signal.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun9i-a80-optimus.dts | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80-optimus.dts b/arch/arm/boot/dts/sun9i-a80-optimus.dts
index ceb6ef15d669..7e036b2be762 100644
--- a/arch/arm/boot/dts/sun9i-a80-optimus.dts
+++ b/arch/arm/boot/dts/sun9i-a80-optimus.dts
@@ -105,6 +105,14 @@
enable-active-high;
gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
};
+
+ wifi_pwrseq: wifi_pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&ac100_rtc 1>;
+ clock-names = "ext_clock";
+ /* enables internal regulator and de-asserts reset */
+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
+ };
};
&ehci0 {
@@ -130,6 +138,21 @@
status = "okay";
};
+&mmc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins>, <&wifi_en_pin_optimus>;
+ vmmc-supply = <®_dldo1>;
+ vqmmc-supply = <®_cldo3>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+};
+
+&mmc1_pins {
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_pins>;
@@ -199,6 +222,13 @@
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
+
+ wifi_en_pin_optimus: wifi_en_pin at 0 {
+ allwinner,pins = "PL2";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
};
&r_rsb {
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/3] ARM: dts: sun9i: cubieboard4: Enable AP6330 WiFi
2016-10-28 10:11 [PATCH 0/3] ARM: dts: sun9i: Enable SDIO-based WiFi Chen-Yu Tsai
2016-10-28 10:11 ` [PATCH 1/3] ARM: dts: sun9i: Add mmc1 pinmux setting Chen-Yu Tsai
2016-10-28 10:11 ` [PATCH 2/3] ARM: dts: sun9i: a80-optimus: Enable AP6330 WiFi Chen-Yu Tsai
@ 2016-10-28 10:11 ` Chen-Yu Tsai
2016-11-02 13:32 ` [PATCH 0/3] ARM: dts: sun9i: Enable SDIO-based WiFi Maxime Ripard
3 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2016-10-28 10:11 UTC (permalink / raw)
To: linux-arm-kernel
The board has a Ampak AP6330 WiFi/BT/FM module. Inside it is a Broadcom
BCM4330 WiFi/BT/FM combo IC. The WiFi portion is connected to mmc1, with
the enabling pin connected to PL2. The AC100 RTC provides a low power
clock signal.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 32 +++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts b/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
index 439847acd41e..67b02fe7f11c 100644
--- a/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
+++ b/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
@@ -76,6 +76,14 @@
gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
};
};
+
+ wifi_pwrseq: wifi_pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&ac100_rtc 1>;
+ clock-names = "ext_clock";
+ /* enables internal regulator and de-asserts reset */
+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
+ };
};
&mmc0 {
@@ -88,6 +96,21 @@
status = "okay";
};
+&mmc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins>, <&wifi_en_pin_cubieboard4>;
+ vmmc-supply = <®_dldo1>;
+ vqmmc-supply = <®_cldo3>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+};
+
+&mmc1_pins {
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_pins>;
@@ -128,6 +151,15 @@
status = "okay";
};
+&r_pio {
+ wifi_en_pin_cubieboard4: wifi_en_pin at 0 {
+ allwinner,pins = "PL2";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+};
+
&r_rsb {
status = "okay";
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 0/3] ARM: dts: sun9i: Enable SDIO-based WiFi
2016-10-28 10:11 [PATCH 0/3] ARM: dts: sun9i: Enable SDIO-based WiFi Chen-Yu Tsai
` (2 preceding siblings ...)
2016-10-28 10:11 ` [PATCH 3/3] ARM: dts: sun9i: cubieboard4: " Chen-Yu Tsai
@ 2016-11-02 13:32 ` Maxime Ripard
3 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2016-11-02 13:32 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 28, 2016 at 06:11:51PM +0800, Chen-Yu Tsai wrote:
> Hi Maxime,
>
> Now that we have support for both PMICs, we can turn on the
> regulators needed for the onboard WiFi chips.
>
> This is a fairly simple series. The WiFi chips themselves are
> supported by the brcmfmac driver, but the user needs to get an
> nvram.txt file and put it in their firmware directory, in
> addition to the firmware file in linux-firmware. Otherwise we
> just need to enable the mmc controller and supply the vmmc and
> vqmmc regulators.
Applied all three, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161102/f6a550a6/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread