Message ID | 20190309153923.22806-3-beagleboard@davidjohnsummers.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3,1/3] arm: dts: rk3288-tinker.dtsi: Fix SD card detection | expand |
Hi David, > This patch is an outline for bluetooth on the ASUS Tinker Board (S). > > Bluetooth is provided my RTL8723BS on these machine, and this is wired > into UART0. > > Here this is performed as a SerDev device. > > Now as presented, this does not give functioning bluetooth. The > updates needed to the device driver: > > https://www.spinics.net/lists/linux-bluetooth/msg78661.html > > Haven't yet been accepted. So this device tree hook doesn't yet have > "realtek,rtl8723bs-bt" compatible flag. > > It is however still submitted as a patch, as it sets the UART up > correctly. And so basic communciation can be had with the device. This > has been confirmed by Tony McKahan @ Armbian, in particular that the > CTS/RTS is needed. > > When Vasily patch is accepted, this will be added as a minor patch on > top of this patch; as this patch gives the pins needed. > > The one oddity, is the RESET pin, it is labeled this way on the > schematic. However the hci_h5.c driver calls this ENABLE. Here we have > stuck with the schematic name. > > Signed-off-by: David Summers <beagleboard@davidjohnsummers.uk> > --- > arch/arm/boot/dts/rk3288-tinker.dtsi | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi > index 0ffab1b7c940..d29f5b34d7e6 100644 > --- a/arch/arm/boot/dts/rk3288-tinker.dtsi > +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi > @@ -486,6 +486,17 @@ > > &uart0 { > status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; > + > + bluetooth { > + clocks = <&rk808 RK808_CLKOUT1>; > + reset-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; > + device-wake-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; > + host-wake-gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>; > + vcc-18-supply = <&vcc_18>; > + vcc-io-supply = <&vcc_io>; > + }; > }; I need an ACK from Rob for this and also you might want to send the whole series for me to review in full context. Regards Marcel
Hi Marcel, On 11/03/2019 16:41, Marcel Holtmann wrote: > Hi David, > >> This patch is an outline for bluetooth on the ASUS Tinker Board (S). >> >> Bluetooth is provided my RTL8723BS on these machine, and this is wired >> into UART0. >> >> Here this is performed as a SerDev device. >> >> Now as presented, this does not give functioning bluetooth. The >> updates needed to the device driver: >> >> https://www.spinics.net/lists/linux-bluetooth/msg78661.html >> >> Haven't yet been accepted. So this device tree hook doesn't yet have >> "realtek,rtl8723bs-bt" compatible flag. >> >> It is however still submitted as a patch, as it sets the UART up >> correctly. And so basic communciation can be had with the device. This >> has been confirmed by Tony McKahan @ Armbian, in particular that the >> CTS/RTS is needed. >> >> When Vasily patch is accepted, this will be added as a minor patch on >> top of this patch; as this patch gives the pins needed. >> >> The one oddity, is the RESET pin, it is labeled this way on the >> schematic. However the hci_h5.c driver calls this ENABLE. Here we have >> stuck with the schematic name. >> >> Signed-off-by: David Summers <beagleboard@davidjohnsummers.uk> >> --- >> arch/arm/boot/dts/rk3288-tinker.dtsi | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi >> index 0ffab1b7c940..d29f5b34d7e6 100644 >> --- a/arch/arm/boot/dts/rk3288-tinker.dtsi >> +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi >> @@ -486,6 +486,17 @@ >> >> &uart0 { >> status = "okay"; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; >> + >> + bluetooth { >> + clocks = <&rk808 RK808_CLKOUT1>; >> + reset-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; >> + device-wake-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; >> + host-wake-gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>; >> + vcc-18-supply = <&vcc_18>; >> + vcc-io-supply = <&vcc_io>; >> + }; >> }; > I need an ACK from Rob for this and also you might want to send the whole series for me to review in full context. > > Regards > > Marcel > Yes happy to wait for ACK from Rob. Of the 3 patches done this is the least urgent, as Bluetooth is currently non functioning on these machines, so delay in this doesn't change the status quo. Patch 3 is self standing, e.g. not applying it doesn't affect the other two. However patch 3 probably has to be applied sequentially after patches 1&2 as all are on the single file. Following on from Robs comments on last patch sent adding bluetooth, I've made this one FAR more detailed. That said though the drivers for bluetooth in this case doesn't use clock or supply ASAIK. Most things are brought up by the wifi part of the device tree which was patch 2. However adding to the bluetooth device tree as well, at least leaves the option open to a user just loading bluetooth, and not wifi. The one thing missing from this bluetooth device tree, is explaining which pins need to be pulled to bring up the card. This is part be design (the tinker board and rt8723bs both have bad public documentation - so exact operation is hard to guess ...); but also because I couldn't see a way of getting a SerDev device to pull pins on loading, unlike sdio (used for wifi). Full series: Part 1 - device tree changes for sd card Part 2 - adding wifi to the device tree Part 3 - adding outline bluetooth So are each fairly self standing. However if interested in parts 1 and 2 they can be found: http://lists.infradead.org/pipermail/linux-rockchip/2019-March/023330.html http://lists.infradead.org/pipermail/linux-rockchip/2019-March/023331.html Regards, and yes happy to wait and see what Rob has to say. David.
Hi David, Am Samstag, 9. März 2019, 16:39:23 CET schrieb David Summers: > This patch is an outline for bluetooth on the ASUS Tinker Board (S). > > Bluetooth is provided my RTL8723BS on these machine, and this is wired > into UART0. > > Here this is performed as a SerDev device. > > Now as presented, this does not give functioning bluetooth. The > updates needed to the device driver: > > https://www.spinics.net/lists/linux-bluetooth/msg78661.html > > Haven't yet been accepted. So this device tree hook doesn't yet have > "realtek,rtl8723bs-bt" compatible flag. > > It is however still submitted as a patch, as it sets the UART up > correctly. And so basic communciation can be had with the device. This > has been confirmed by Tony McKahan @ Armbian, in particular that the > CTS/RTS is needed. > > When Vasily patch is accepted, this will be added as a minor patch on > top of this patch; as this patch gives the pins needed. > > The one oddity, is the RESET pin, it is labeled this way on the > schematic. However the hci_h5.c driver calls this ENABLE. Here we have > stuck with the schematic name. > > Signed-off-by: David Summers <beagleboard@davidjohnsummers.uk> > --- > arch/arm/boot/dts/rk3288-tinker.dtsi | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi > b/arch/arm/boot/dts/rk3288-tinker.dtsi index 0ffab1b7c940..d29f5b34d7e6 > 100644 > --- a/arch/arm/boot/dts/rk3288-tinker.dtsi > +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi > @@ -486,6 +486,17 @@ > > &uart0 { > status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; > + > + bluetooth { > + clocks = <&rk808 RK808_CLKOUT1>; > + reset-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; > + device-wake-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; > + host-wake-gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>; > + vcc-18-supply = <&vcc_18>; > + vcc-io-supply = <&vcc_io>; > + }; As this is supposed to work as serial attached device it should follow a dt-binding, so first of all definitly needs a compatible and a binding specifying all the properties declared above. See for example Documentation/devicetree/bindings/net/broadcom-bluetooth.txt for a similar device. Heiko
On 13/03/2019 10:56, Heiko Stübner wrote: > Hi David, > > Am Samstag, 9. März 2019, 16:39:23 CET schrieb David Summers: >> This patch is an outline for bluetooth on the ASUS Tinker Board (S). >> >> Bluetooth is provided my RTL8723BS on these machine, and this is wired >> into UART0. >> >> Here this is performed as a SerDev device. >> >> Now as presented, this does not give functioning bluetooth. The >> updates needed to the device driver: >> >> https://www.spinics.net/lists/linux-bluetooth/msg78661.html >> >> Haven't yet been accepted. So this device tree hook doesn't yet have >> "realtek,rtl8723bs-bt" compatible flag. >> >> It is however still submitted as a patch, as it sets the UART up >> correctly. And so basic communciation can be had with the device. This >> has been confirmed by Tony McKahan @ Armbian, in particular that the >> CTS/RTS is needed. >> >> When Vasily patch is accepted, this will be added as a minor patch on >> top of this patch; as this patch gives the pins needed. >> >> The one oddity, is the RESET pin, it is labeled this way on the >> schematic. However the hci_h5.c driver calls this ENABLE. Here we have >> stuck with the schematic name. >> >> Signed-off-by: David Summers <beagleboard@davidjohnsummers.uk> >> --- >> arch/arm/boot/dts/rk3288-tinker.dtsi | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi >> b/arch/arm/boot/dts/rk3288-tinker.dtsi index 0ffab1b7c940..d29f5b34d7e6 >> 100644 >> --- a/arch/arm/boot/dts/rk3288-tinker.dtsi >> +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi >> @@ -486,6 +486,17 @@ >> >> &uart0 { >> status = "okay"; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; >> + >> + bluetooth { >> + clocks = <&rk808 RK808_CLKOUT1>; >> + reset-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; >> + device-wake-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; >> + host-wake-gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>; >> + vcc-18-supply = <&vcc_18>; >> + vcc-io-supply = <&vcc_io>; >> + }; > As this is supposed to work as serial attached device it should follow a > dt-binding, so first of all definitly needs a compatible and a binding > specifying all the properties declared above. > > See for example Documentation/devicetree/bindings/net/broadcom-bluetooth.txt > for a similar device. > > Heiko > > Heiko, Yes I understand. Means I'll need to take care not to loose these email, as getting all the pins right took some time ... I'll probably follow https://www.spinics.net/lists/linux-bluetooth/msg78654.html if it gets accepted. That is the main problem here, at the moment there is no compatible that can be used, as none yet accepted. Rob H, Question for you, before you said [1]: > There's no interrupts, GPIO control lines, power supplies, etc. for > these chips? The binding should be complete even if your platform > doesn't need these. Now its clear that so far the driver for bluetooth doesn't know about supply, and clocks etc. So should these be included in the dts, as a correct description as how its wired; even if not used in the current driver, they may be used in future. Am happy to do whatever best. Regards, David. [1] https://www.spinics.net/lists/linux-bluetooth/msg78545.html
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi index 0ffab1b7c940..d29f5b34d7e6 100644 --- a/arch/arm/boot/dts/rk3288-tinker.dtsi +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi @@ -486,6 +486,17 @@ &uart0 { status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; + + bluetooth { + clocks = <&rk808 RK808_CLKOUT1>; + reset-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; + device-wake-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; + host-wake-gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>; + vcc-18-supply = <&vcc_18>; + vcc-io-supply = <&vcc_io>; + }; }; &uart1 {
This patch is an outline for bluetooth on the ASUS Tinker Board (S). Bluetooth is provided my RTL8723BS on these machine, and this is wired into UART0. Here this is performed as a SerDev device. Now as presented, this does not give functioning bluetooth. The updates needed to the device driver: https://www.spinics.net/lists/linux-bluetooth/msg78661.html Haven't yet been accepted. So this device tree hook doesn't yet have "realtek,rtl8723bs-bt" compatible flag. It is however still submitted as a patch, as it sets the UART up correctly. And so basic communciation can be had with the device. This has been confirmed by Tony McKahan @ Armbian, in particular that the CTS/RTS is needed. When Vasily patch is accepted, this will be added as a minor patch on top of this patch; as this patch gives the pins needed. The one oddity, is the RESET pin, it is labeled this way on the schematic. However the hci_h5.c driver calls this ENABLE. Here we have stuck with the schematic name. Signed-off-by: David Summers <beagleboard@davidjohnsummers.uk> --- arch/arm/boot/dts/rk3288-tinker.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)