* [PATCH 0/3] ARM: dts: sun9i: Enable SDIO-based WiFi @ 2016-10-28 10:11 Chen-Yu Tsai [not found] ` <20161028101154.7350-1-wens-jdAy2FN1RRM@public.gmane.org> ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Chen-Yu Tsai @ 2016-10-28 10:11 UTC (permalink / raw) To: Maxime Ripard; +Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel 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. Regards ChenYu Chen-Yu Tsai (3): ARM: dts: sun9i: Add mmc1 pinmux setting ARM: dts: sun9i: a80-optimus: Enable AP6330 WiFi ARM: dts: sun9i: cubieboard4: Enable AP6330 WiFi arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 32 +++++++++++++++++++++++++++++ arch/arm/boot/dts/sun9i-a80-optimus.dts | 30 +++++++++++++++++++++++++++ arch/arm/boot/dts/sun9i-a80.dtsi | 8 ++++++++ 3 files changed, 70 insertions(+) -- 2.9.3 ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20161028101154.7350-1-wens-jdAy2FN1RRM@public.gmane.org>]
* [PATCH 1/3] ARM: dts: sun9i: Add mmc1 pinmux setting [not found] ` <20161028101154.7350-1-wens-jdAy2FN1RRM@public.gmane.org> @ 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 1 sibling, 0 replies; 5+ messages in thread From: Chen-Yu Tsai @ 2016-10-28 10:11 UTC (permalink / raw) To: Maxime Ripard Cc: Chen-Yu Tsai, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA 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-jdAy2FN1RRM@public.gmane.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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] ARM: dts: sun9i: a80-optimus: Enable AP6330 WiFi [not found] ` <20161028101154.7350-1-wens-jdAy2FN1RRM@public.gmane.org> 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 1 sibling, 0 replies; 5+ messages in thread From: Chen-Yu Tsai @ 2016-10-28 10:11 UTC (permalink / raw) To: Maxime Ripard Cc: Chen-Yu Tsai, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA 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-jdAy2FN1RRM@public.gmane.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@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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ 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 [not found] ` <20161028101154.7350-1-wens-jdAy2FN1RRM@public.gmane.org> @ 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 2 siblings, 0 replies; 5+ messages in thread From: Chen-Yu Tsai @ 2016-10-28 10:11 UTC (permalink / raw) To: Maxime Ripard; +Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-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@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
* Re: [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 [not found] ` <20161028101154.7350-1-wens-jdAy2FN1RRM@public.gmane.org> 2016-10-28 10:11 ` [PATCH 3/3] ARM: dts: sun9i: cubieboard4: " Chen-Yu Tsai @ 2016-11-02 13:32 ` Maxime Ripard 2 siblings, 0 replies; 5+ messages in thread From: Maxime Ripard @ 2016-11-02 13:32 UTC (permalink / raw) To: Chen-Yu Tsai; +Cc: devicetree, linux-arm-kernel, linux-kernel [-- Attachment #1: Type: text/plain, Size: 683 bytes --] 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-02 13:32 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-28 10:11 [PATCH 0/3] ARM: dts: sun9i: Enable SDIO-based WiFi Chen-Yu Tsai [not found] ` <20161028101154.7350-1-wens-jdAy2FN1RRM@public.gmane.org> 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 ` [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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).