linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth
@ 2021-05-04  4:16 Chen-Yu Tsai
  2021-05-04 20:52 ` Martin Blumenstingl
  0 siblings, 1 reply; 3+ messages in thread
From: Chen-Yu Tsai @ 2021-05-04  4:16 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>
---
Changes since v1:
  - added uart-has-rtscts property
  - added alias for uart_A

Hi Neil, Martin,

I dropped your review-bys since I added the UART alias and I'm not sure
what the policy for those are.

ChenYu
---
 .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts      | 14 +++++++++++++-
 1 file changed, 13 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..f017a263784f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
@@ -15,6 +15,7 @@ / {
 
 	aliases {
 		serial0 = &uart_AO;
+		serial1 = &uart_A;
 		ethernet0 = &ethmac;
 	};
 
@@ -385,9 +386,20 @@ &uart_AO {
 
 /* Bluetooth on AP6212 */
 &uart_A {
-	status = "disabled";
+	status = "okay";
 	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
 	pinctrl-names = "default";
+	uart-has-rtscts;
+
+	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 v2] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth
  2021-05-04  4:16 [PATCH v2] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth Chen-Yu Tsai
@ 2021-05-04 20:52 ` Martin Blumenstingl
  2021-05-05  2:13   ` Chen-Yu Tsai
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Blumenstingl @ 2021-05-04 20:52 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

Hi,

On Tue, May 4, 2021 at 6:17 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>
> ---
> Changes since v1:
>   - added uart-has-rtscts property
>   - added alias for uart_A
>
> Hi Neil, Martin,
>
> I dropped your review-bys since I added the UART alias and I'm not sure
> what the policy for those are.
>
> ChenYu
> ---
>  .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts      | 14 +++++++++++++-
>  1 file changed, 13 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..f017a263784f 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
> @@ -15,6 +15,7 @@ / {
>
>         aliases {
>                 serial0 = &uart_AO;
> +               serial1 = &uart_A;
this should not be needed anymore since
a26988e8fef4b258d1b771e0f4b2e3b67cb2e044 ("tty: serial: meson: if no
alias specified use an available id")

IIRC for "newly added" .dts we are only adding the alias for anything
that shows up in /dev/ for the user
meson-khadas-vim3.dtsi for example is not adding an alias for uart_A
(also used for Bluetooth)


Best regards,
Martin

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

* Re: [PATCH v2] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth
  2021-05-04 20:52 ` Martin Blumenstingl
@ 2021-05-05  2:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2021-05-05  2:13 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Kevin Hilman, Neil Armstrong, Jerome Brunet, devicetree,
	open list:ARM/Amlogic Meson...,
	linux-arm-kernel, linux-kernel

On Wed, May 5, 2021 at 4:52 AM Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Hi,
>
> On Tue, May 4, 2021 at 6:17 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>
> > ---
> > Changes since v1:
> >   - added uart-has-rtscts property
> >   - added alias for uart_A
> >
> > Hi Neil, Martin,
> >
> > I dropped your review-bys since I added the UART alias and I'm not sure
> > what the policy for those are.
> >
> > ChenYu
> > ---
> >  .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts      | 14 +++++++++++++-
> >  1 file changed, 13 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..f017a263784f 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
> > @@ -15,6 +15,7 @@ / {
> >
> >         aliases {
> >                 serial0 = &uart_AO;
> > +               serial1 = &uart_A;
> this should not be needed anymore since
> a26988e8fef4b258d1b771e0f4b2e3b67cb2e044 ("tty: serial: meson: if no
> alias specified use an available id")
>
> IIRC for "newly added" .dts we are only adding the alias for anything
> that shows up in /dev/ for the user
> meson-khadas-vim3.dtsi for example is not adding an alias for uart_A
> (also used for Bluetooth)

I see. So if some user had a customized .dts enabling more UARTs, they
would probably have the user visible ones aliased, and the Bluetooth
one would be in the reserved range regardless.

I'll drop the extra alias then.

Thanks
ChenYu

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

end of thread, other threads:[~2021-05-05  2:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04  4:16 [PATCH v2] arm64: dts: meson-gxbb: nanopi-k2: Enable Bluetooth Chen-Yu Tsai
2021-05-04 20:52 ` Martin Blumenstingl
2021-05-05  2:13   ` Chen-Yu Tsai

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