Re: [PATCH 1/3] ARM: dts: sun5i: chip: Enable bluetooth

From: Jonathan McDowell
Date: Thu Apr 20 2023 - 15:12:35 EST


On Sun, Apr 16, 2023 at 01:24:21AM +0100, Andre Przywara wrote:
> On Sat, 15 Apr 2023 18:46:03 +0100
> Jonathan McDowell <noodles@xxxxxxxx> wrote:
>
> > The C.H.I.P has an rtl8723bs device with the bluetooth interface hooked
> > up on UART3. Support for this didn't exist in mainline when the DTS was
> > initially added, but it does now, so enable it.
> >
> > Signed-off-by: Jonathan McDowell <noodles@xxxxxxxx>
> > ---
> > arch/arm/boot/dts/sun5i-r8-chip.dts | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts
> > index fd37bd1f3920..4d72a181d8aa 100644
> > --- a/arch/arm/boot/dts/sun5i-r8-chip.dts
> > +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts
> > @@ -255,6 +255,10 @@ &uart3 {
> > pinctrl-0 = <&uart3_pg_pins>,
> > <&uart3_cts_rts_pg_pins>;
> > status = "okay";
> > +
> > + bluetooth {
> > + compatible = "realtek,rtl8723bs-bt";
> > + }
>
> As the kernel test robot already pointed out, there is a semicolon
> missing here.
> Otherwise looks good (dt-validate passes), but don't know if there are
> any wakeup GPIOs connected (can't seem to find a schematic?).

So there are wakeups, but if I add:

device-wake-gpios = <&axp_gpio 3 GPIO_ACTIVE_LOW>;
host-wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */

then some odd sort of dependency issue happens where the serial port
load is deferred waiting for the GPIO to appear, and then the device
doesn't work. Error in dmesg is:

serial serial0-0: deferred probe pending

on 6.3-rc and on 6.1 I get:

dw-apb-uart 1c28c00.serial: Failed to create device link (0x180) with axp20x-gpio

I'm not clear why it's trying to link the serial port to the GPIO; it
seems that it should be the bluetooth device that depends on both the
UART and the GPIO, and that the GPIO is actually optional so shouldn't
hold up loading, but I can't see how that should be represented.

Adding Greg + Saravana in the hope they can tell me what I've done wrong
here. The LED driver using a different GPIO line on the axp209 works
fine, so the device is definitely loaded and working ok.

> > };
> >
> > &usb_otg {
>

J.

--
Sex, truth and jellibabies. | .''`. Debian GNU/Linux Developer
| : :' : Happy to accept PGP signed
| `. `' or encrypted mail - RSA
| `- key on the keyservers.