Re: [PATCH 3/3] arm64: allwinner: a64: enable Bluetooth On Pinebook

2020-07-12 Thread Vasily Khoruzhick
On Mon, Jul 6, 2020 at 4:47 AM Maxime Ripard  wrote:
>
> Hi,
>
> On Sun, Jul 05, 2020 at 12:51:10PM -0700, Vasily Khoruzhick wrote:
> > Pinebook has an RTL8723CS WiFi + BT chip, BT is connected to UART1
> > and uses PL5 as device wake GPIO, PL6 as host wake GPIO the I2C
> > controlling signals are connected to R_I2C bus.
> >
> > Enable it in the device tree.
> >
> > Signed-off-by: Vasily Khoruzhick 
> > ---
> >  .../arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 12 
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts 
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> > index 64b1c54f87c0..e63ff271be4e 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> > @@ -408,6 +408,18 @@  {
> >   status = "okay";
> >  };
> >
> > + {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <_pins>, <_rts_cts_pins>;
> > + status = "okay";
>
> You probably need uart-has-rtscts here

Will add in v2

> > +
> > + bluetooth {
> > + compatible = "realtek,rtl8723cs-bt";
> > + device-wake-gpios = <_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
> > + host-wake-gpios = <_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
> > + };
>
> And max-speed I guess?

There's no max-speed in the schema for this bluetooth controller.
Moreover it reads uart settings from firmware config. See
btrtl_get_uart_settings() in drivers/bluetooth/btrtl.c

> Maxime
> >


Re: [PATCH 3/3] arm64: allwinner: a64: enable Bluetooth On Pinebook

2020-07-06 Thread Maxime Ripard
Hi,

On Sun, Jul 05, 2020 at 12:51:10PM -0700, Vasily Khoruzhick wrote:
> Pinebook has an RTL8723CS WiFi + BT chip, BT is connected to UART1
> and uses PL5 as device wake GPIO, PL6 as host wake GPIO the I2C
> controlling signals are connected to R_I2C bus.
> 
> Enable it in the device tree.
> 
> Signed-off-by: Vasily Khoruzhick 
> ---
>  .../arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 12 
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts 
> b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> index 64b1c54f87c0..e63ff271be4e 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> @@ -408,6 +408,18 @@  {
>   status = "okay";
>  };
>  
> + {
> + pinctrl-names = "default";
> + pinctrl-0 = <_pins>, <_rts_cts_pins>;
> + status = "okay";

You probably need uart-has-rtscts here

> +
> + bluetooth {
> + compatible = "realtek,rtl8723cs-bt";
> + device-wake-gpios = <_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
> + host-wake-gpios = <_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
> + };

And max-speed I guess?

Maxime
>


[PATCH 3/3] arm64: allwinner: a64: enable Bluetooth On Pinebook

2020-07-05 Thread Vasily Khoruzhick
Pinebook has an RTL8723CS WiFi + BT chip, BT is connected to UART1
and uses PL5 as device wake GPIO, PL6 as host wake GPIO the I2C
controlling signals are connected to R_I2C bus.

Enable it in the device tree.

Signed-off-by: Vasily Khoruzhick 
---
 .../arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 12 
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts 
b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 64b1c54f87c0..e63ff271be4e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -408,6 +408,18 @@  {
status = "okay";
 };
 
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins>, <_rts_cts_pins>;
+   status = "okay";
+
+   bluetooth {
+   compatible = "realtek,rtl8723cs-bt";
+   device-wake-gpios = <_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
+   host-wake-gpios = <_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+   };
+};
+
 _otg {
dr_mode = "host";
 };
-- 
2.27.0