linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth
@ 2021-04-29  6:08 Chen-Yu Tsai
  2021-04-29  7:09 ` Neil Armstrong
  2021-04-29 21:34 ` Martin Blumenstingl
  0 siblings, 2 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2021-04-29  6:08 UTC (permalink / raw)
  To: Kevin Hilman, Neil Armstrong, Jerome Brunet, Martin Blumenstingl
  Cc: Chen-Yu Tsai, devicetree, linux-amlogic, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The NanoPi K2 has a AP6212 WiFi+BT combo module. The WiFi portion is
already enabled. The BT part is connected via UART and I2S.

Enable the UART and add a device node describing the Bluetooth portion
of the module.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
index 7273eed5292c..10f48fb1af61 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
@@ -385,9 +385,19 @@ &uart_AO {
 
 /* Bluetooth on AP6212 */
 &uart_A {
-	status = "disabled";
+	status = "okay";
 	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
 	pinctrl-names = "default";
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		clocks = <&wifi_32k>;
+		clock-names = "lpo";
+		vbat-supply = <&vddio_ao3v3>;
+		vddio-supply = <&vddio_ao18>;
+		host-wakeup-gpios = <&gpio GPIOX_21 GPIO_ACTIVE_HIGH>;
+		shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 /* 40-pin CON1 */
-- 
2.31.1


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

* Re: [PATCH] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth
  2021-04-29  6:08 [PATCH] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth Chen-Yu Tsai
@ 2021-04-29  7:09 ` Neil Armstrong
  2021-04-29 21:34 ` Martin Blumenstingl
  1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2021-04-29  7:09 UTC (permalink / raw)
  To: Chen-Yu Tsai, Kevin Hilman, Jerome Brunet, Martin Blumenstingl
  Cc: Chen-Yu Tsai, devicetree, linux-amlogic, linux-arm-kernel, linux-kernel

On 29/04/2021 08:08, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The NanoPi K2 has a AP6212 WiFi+BT combo module. The WiFi portion is
> already enabled. The BT part is connected via UART and I2S.
> 
> Enable the UART and add a device node describing the Bluetooth portion
> of the module.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
> index 7273eed5292c..10f48fb1af61 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
> @@ -385,9 +385,19 @@ &uart_AO {
>  
>  /* Bluetooth on AP6212 */
>  &uart_A {
> -	status = "disabled";
> +	status = "okay";
>  	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
>  	pinctrl-names = "default";
> +
> +	bluetooth {
> +		compatible = "brcm,bcm43438-bt";
> +		clocks = <&wifi_32k>;
> +		clock-names = "lpo";
> +		vbat-supply = <&vddio_ao3v3>;
> +		vddio-supply = <&vddio_ao18>;
> +		host-wakeup-gpios = <&gpio GPIOX_21 GPIO_ACTIVE_HIGH>;
> +		shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
> +	};
>  };
>  
>  /* 40-pin CON1 */
> 

Thanks !

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

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

* Re: [PATCH] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth
  2021-04-29  6:08 [PATCH] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth Chen-Yu Tsai
  2021-04-29  7:09 ` Neil Armstrong
@ 2021-04-29 21:34 ` Martin Blumenstingl
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Blumenstingl @ 2021-04-29 21:34 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Kevin Hilman, Neil Armstrong, Jerome Brunet, Chen-Yu Tsai,
	devicetree, linux-amlogic, linux-arm-kernel, linux-kernel

On Thu, Apr 29, 2021 at 8:08 AM Chen-Yu Tsai <wens@kernel.org> wrote:
>
> From: Chen-Yu Tsai <wens@csie.org>
>
> The NanoPi K2 has a AP6212 WiFi+BT combo module. The WiFi portion is
> already enabled. The BT part is connected via UART and I2S.
>
> Enable the UART and add a device node describing the Bluetooth portion
> of the module.
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
one nit-pick below - with that you can add my:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

> ---
>  arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
> index 7273eed5292c..10f48fb1af61 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
> @@ -385,9 +385,19 @@ &uart_AO {
>
>  /* Bluetooth on AP6212 */
>  &uart_A {
> -       status = "disabled";
> +       status = "okay";
>         pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
>         pinctrl-names = "default";
based on Documentation/devicetree/bindings/serial/serial.yaml please add:
  uart-has-rtscts;


Thank you!
Martin

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

end of thread, other threads:[~2021-04-29 21:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29  6:08 [PATCH] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth Chen-Yu Tsai
2021-04-29  7:09 ` Neil Armstrong
2021-04-29 21:34 ` Martin Blumenstingl

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