2021-04-29 06:10:04

by Chen-Yu Tsai

[permalink] [raw]
Subject: [PATCH] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth

From: Chen-Yu Tsai <[email protected]>

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 <[email protected]>
---
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


2021-04-29 07:10:54

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth

On 29/04/2021 08:08, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <[email protected]>
>
> 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 <[email protected]>
> ---
> 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 <[email protected]>

2021-04-29 21:35:37

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth

On Thu, Apr 29, 2021 at 8:08 AM Chen-Yu Tsai <[email protected]> wrote:
>
> From: Chen-Yu Tsai <[email protected]>
>
> 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 <[email protected]>
one nit-pick below - with that you can add my:
Reviewed-by: Martin Blumenstingl <[email protected]>

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