2023-03-21 17:13:40

by Martin Blumenstingl

[permalink] [raw]
Subject: [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus

MXIII-Plus comes with a Ampak AP6330 Bluetooth and WiFi combo chip.
The 32kHz clock is provided by the SoC and is enabled by simply using
the correct pin mux.
Also this is the first board which uses the SDXC_A for connecting to
the SDIO chip.

Other than the two new pin muxes this is just a matter of describing
the hardware in meson8m2-mxiii-plus.dts.


Martin Blumenstingl (3):
ARM: dts: meson8: add the xtal_32k_out pin
ARM: dts: meson8: add the SDXC_A pins
ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support

arch/arm/boot/dts/meson8.dtsi | 17 ++++++++
arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 48 ++++++++++++++++++++++-
2 files changed, 64 insertions(+), 1 deletion(-)

--
2.40.0



2023-03-21 17:13:45

by Martin Blumenstingl

[permalink] [raw]
Subject: [PATCH v1 2/3] ARM: dts: meson8: add the SDXC_A pins

Add the pins for the SDHC MMC controller which connect to the SDIO wifi
on some boards.

Signed-off-by: Martin Blumenstingl <[email protected]>
---
arch/arm/boot/dts/meson8.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index 4d18bb4e3c33..4f22ab451aae 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -506,6 +506,15 @@ mux {
};
};

+ sdxc_a_pins: sdxc-a {
+ mux {
+ groups = "sdxc_d0_a", "sdxc_d13_a",
+ "sdxc_clk_a", "sdxc_cmd_a";
+ function = "sdxc_a";
+ bias-pull-up;
+ };
+ };
+
sdxc_b_pins: sdxc-b {
mux {
groups = "sdxc_d0_b", "sdxc_d13_b",
--
2.40.0


2023-03-21 17:13:49

by Martin Blumenstingl

[permalink] [raw]
Subject: [PATCH v1 3/3] ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support

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 <[email protected]>
---
arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 48 ++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts
index fa6d55f1cfb9..aa4d4bf70629 100644
--- a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts
+++ b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts
@@ -19,7 +19,6 @@ aliases {
ethernet0 = &ethmac;
i2c0 = &i2c_AO;
serial0 = &uart_AO;
- serial1 = &uart_A;
mmc0 = &sd_card_slot;
};

@@ -45,12 +44,32 @@ button-function {
};
};

+ 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 {
@@ -192,6 +211,27 @@ &saradc {
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";

@@ -222,6 +262,12 @@ &uart_A {
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 {
--
2.40.0


2023-03-22 10:31:00

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH v1 2/3] ARM: dts: meson8: add the SDXC_A pins

On 21/03/2023 18:12, Martin Blumenstingl wrote:
> Add the pins for the SDHC MMC controller which connect to the SDIO wifi
> on some boards.
>
> Signed-off-by: Martin Blumenstingl <[email protected]>
> ---
> arch/arm/boot/dts/meson8.dtsi | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
> index 4d18bb4e3c33..4f22ab451aae 100644
> --- a/arch/arm/boot/dts/meson8.dtsi
> +++ b/arch/arm/boot/dts/meson8.dtsi
> @@ -506,6 +506,15 @@ mux {
> };
> };
>
> + sdxc_a_pins: sdxc-a {
> + mux {
> + groups = "sdxc_d0_a", "sdxc_d13_a",
> + "sdxc_clk_a", "sdxc_cmd_a";
> + function = "sdxc_a";
> + bias-pull-up;
> + };
> + };
> +
> sdxc_b_pins: sdxc-b {
> mux {
> groups = "sdxc_d0_b", "sdxc_d13_b",

Reviewed-by: Neil Armstrong <[email protected]>

2023-03-22 10:33:21

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH v1 3/3] ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support

On 21/03/2023 18:12, Martin Blumenstingl wrote:
> 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 <[email protected]>
> ---
> arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 48 ++++++++++++++++++++++-
> 1 file changed, 47 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts
> index fa6d55f1cfb9..aa4d4bf70629 100644
> --- a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts
> +++ b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts
> @@ -19,7 +19,6 @@ aliases {
> ethernet0 = &ethmac;
> i2c0 = &i2c_AO;
> serial0 = &uart_AO;
> - serial1 = &uart_A;
> mmc0 = &sd_card_slot;
> };
>
> @@ -45,12 +44,32 @@ button-function {
> };
> };
>
> + 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 {
> @@ -192,6 +211,27 @@ &saradc {
> 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";
>
> @@ -222,6 +262,12 @@ &uart_A {
> 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 {

Reviewed-by: Neil Armstrong <[email protected]>

2023-03-22 10:38:13

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus

Hi,

On Tue, 21 Mar 2023 18:12:10 +0100, Martin Blumenstingl wrote:
> MXIII-Plus comes with a Ampak AP6330 Bluetooth and WiFi combo chip.
> The 32kHz clock is provided by the SoC and is enabled by simply using
> the correct pin mux.
> Also this is the first board which uses the SDXC_A for connecting to
> the SDIO chip.
>
> Other than the two new pin muxes this is just a matter of describing
> the hardware in meson8m2-mxiii-plus.dts.
>
> [...]

Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v6.4/arm-dt)

[1/3] ARM: dts: meson8: add the xtal_32k_out pin
https://git.kernel.org/amlogic/c/4ca4a633205fb372882de3e6e93a0a3584298249
[2/3] ARM: dts: meson8: add the SDXC_A pins
https://git.kernel.org/amlogic/c/ef8474d50a37ab5f2f2f60e179d749b4273470de
[3/3] ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support
https://git.kernel.org/amlogic/c/8446b84c894f7441f8bf4410f9638e38dcb29c49

These changes has been applied on the intermediate git tree [1].

The v6.4/arm-dt branch will then be sent via a formal Pull Request to the Linux SoC maintainers
for inclusion in their intermediate git branches in order to be sent to Linus during
the next merge window, or sooner if it's a set of fixes.

In the cases of fixes, those will be merged in the current release candidate
kernel and as soon they appear on the Linux master branch they will be
backported to the previous Stable and Long-Stable kernels [2].

The intermediate git branches are merged daily in the linux-next tree [3],
people are encouraged testing these pre-release kernels and report issues on the
relevant mailing-lists.

If problems are discovered on those changes, please submit a signed-off-by revert
patch followed by a corrective changeset.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[3] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

--
Neil