linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus
@ 2023-03-21 17:12 Martin Blumenstingl
  2023-03-21 17:12 ` [PATCH v1 1/3] ARM: dts: meson8: add the xtal_32k_out pin Martin Blumenstingl
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Martin Blumenstingl @ 2023-03-21 17:12 UTC (permalink / raw)
  To: linux-amlogic
  Cc: linux-arm-kernel, linux-kernel, neil.armstrong, Martin Blumenstingl

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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v1 1/3] ARM: dts: meson8: add the xtal_32k_out pin
  2023-03-21 17:12 [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus Martin Blumenstingl
@ 2023-03-21 17:12 ` Martin Blumenstingl
  2023-03-22 10:29   ` neil.armstrong
  2023-03-21 17:12 ` [PATCH v1 2/3] ARM: dts: meson8: add the SDXC_A pins Martin Blumenstingl
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Martin Blumenstingl @ 2023-03-21 17:12 UTC (permalink / raw)
  To: linux-amlogic
  Cc: linux-arm-kernel, linux-kernel, neil.armstrong, Martin Blumenstingl

GPIOX_10 can generate a 32768Hz signal when enabling the "xtal_32k_out"
group with the xtal function. This is typically used as LPO clock for
the SDIO wifi chips.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index 21eb59041a7d..4d18bb4e3c33 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -568,6 +568,14 @@ mux {
 				bias-disable;
 			};
 		};
+
+		xtal_32k_out_pins: xtal-32k-out {
+			mux {
+				groups = "xtal_32k_out";
+				function = "xtal";
+				bias-disable;
+			};
+		};
 	};
 };
 
-- 
2.40.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v1 2/3] ARM: dts: meson8: add the SDXC_A pins
  2023-03-21 17:12 [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus Martin Blumenstingl
  2023-03-21 17:12 ` [PATCH v1 1/3] ARM: dts: meson8: add the xtal_32k_out pin Martin Blumenstingl
@ 2023-03-21 17:12 ` Martin Blumenstingl
  2023-03-22 10:30   ` neil.armstrong
  2023-03-21 17:12 ` [PATCH v1 3/3] ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support Martin Blumenstingl
  2023-03-22 10:37 ` [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus Neil Armstrong
  3 siblings, 1 reply; 8+ messages in thread
From: Martin Blumenstingl @ 2023-03-21 17:12 UTC (permalink / raw)
  To: linux-amlogic
  Cc: linux-arm-kernel, linux-kernel, neil.armstrong, Martin Blumenstingl

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

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v1 3/3] ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support
  2023-03-21 17:12 [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus Martin Blumenstingl
  2023-03-21 17:12 ` [PATCH v1 1/3] ARM: dts: meson8: add the xtal_32k_out pin Martin Blumenstingl
  2023-03-21 17:12 ` [PATCH v1 2/3] ARM: dts: meson8: add the SDXC_A pins Martin Blumenstingl
@ 2023-03-21 17:12 ` Martin Blumenstingl
  2023-03-22 10:30   ` neil.armstrong
  2023-03-22 10:37 ` [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus Neil Armstrong
  3 siblings, 1 reply; 8+ messages in thread
From: Martin Blumenstingl @ 2023-03-21 17:12 UTC (permalink / raw)
  To: linux-amlogic
  Cc: linux-arm-kernel, linux-kernel, neil.armstrong, Martin Blumenstingl

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 <martin.blumenstingl@googlemail.com>
---
 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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 1/3] ARM: dts: meson8: add the xtal_32k_out pin
  2023-03-21 17:12 ` [PATCH v1 1/3] ARM: dts: meson8: add the xtal_32k_out pin Martin Blumenstingl
@ 2023-03-22 10:29   ` neil.armstrong
  0 siblings, 0 replies; 8+ messages in thread
From: neil.armstrong @ 2023-03-22 10:29 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic; +Cc: linux-arm-kernel, linux-kernel

On 21/03/2023 18:12, Martin Blumenstingl wrote:
> GPIOX_10 can generate a 32768Hz signal when enabling the "xtal_32k_out"
> group with the xtal function. This is typically used as LPO clock for
> the SDIO wifi chips.
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>   arch/arm/boot/dts/meson8.dtsi | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
> index 21eb59041a7d..4d18bb4e3c33 100644
> --- a/arch/arm/boot/dts/meson8.dtsi
> +++ b/arch/arm/boot/dts/meson8.dtsi
> @@ -568,6 +568,14 @@ mux {
>   				bias-disable;
>   			};
>   		};
> +
> +		xtal_32k_out_pins: xtal-32k-out {
> +			mux {
> +				groups = "xtal_32k_out";
> +				function = "xtal";
> +				bias-disable;
> +			};
> +		};
>   	};
>   };
>   

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 2/3] ARM: dts: meson8: add the SDXC_A pins
  2023-03-21 17:12 ` [PATCH v1 2/3] ARM: dts: meson8: add the SDXC_A pins Martin Blumenstingl
@ 2023-03-22 10:30   ` neil.armstrong
  0 siblings, 0 replies; 8+ messages in thread
From: neil.armstrong @ 2023-03-22 10:30 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic; +Cc: linux-arm-kernel, linux-kernel

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 <martin.blumenstingl@googlemail.com>
> ---
>   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 <neil.armstrong@linaro.org>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 3/3] ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support
  2023-03-21 17:12 ` [PATCH v1 3/3] ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support Martin Blumenstingl
@ 2023-03-22 10:30   ` neil.armstrong
  0 siblings, 0 replies; 8+ messages in thread
From: neil.armstrong @ 2023-03-22 10:30 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic; +Cc: linux-arm-kernel, linux-kernel

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 <martin.blumenstingl@googlemail.com>
> ---
>   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 <neil.armstrong@linaro.org>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus
  2023-03-21 17:12 [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus Martin Blumenstingl
                   ` (2 preceding siblings ...)
  2023-03-21 17:12 ` [PATCH v1 3/3] ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support Martin Blumenstingl
@ 2023-03-22 10:37 ` Neil Armstrong
  3 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2023-03-22 10:37 UTC (permalink / raw)
  To: linux-amlogic, Martin Blumenstingl; +Cc: linux-arm-kernel, linux-kernel

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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-22 10:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 17:12 [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus Martin Blumenstingl
2023-03-21 17:12 ` [PATCH v1 1/3] ARM: dts: meson8: add the xtal_32k_out pin Martin Blumenstingl
2023-03-22 10:29   ` neil.armstrong
2023-03-21 17:12 ` [PATCH v1 2/3] ARM: dts: meson8: add the SDXC_A pins Martin Blumenstingl
2023-03-22 10:30   ` neil.armstrong
2023-03-21 17:12 ` [PATCH v1 3/3] ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support Martin Blumenstingl
2023-03-22 10:30   ` neil.armstrong
2023-03-22 10:37 ` [PATCH v1 0/3] ARM: dts: Enable WiFi and Bluetooth support on MXIII-Plus Neil Armstrong

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).