linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth
@ 2020-04-25 15:55 Alistair Francis
  2020-04-25 15:55 ` [PATCH v4 2/3] Bluetooth: hci_h5: Add support for binding RTL8723BS with device tree Alistair Francis
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Alistair Francis @ 2020-04-25 15:55 UTC (permalink / raw)
  To: netdev, linux-kernel, marcel, johan.hedberg, linux-bluetooth,
	mripard, wens
  Cc: anarsoul, devicetree, alistair23, linux-arm-kernel, Alistair Francis

From: Vasily Khoruzhick <anarsoul@gmail.com>

Add binding document for bluetooth part of RTL8723BS/RTL8723CS

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 .../bindings/net/realtek-bluetooth.yaml       | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth.yaml

diff --git a/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml b/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
new file mode 100644
index 000000000000..f15a5e5e4859
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/realtek-bluetooth.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RTL8723BS/RTL8723CS/RTL8822CS Bluetooth Device Tree Bindings
+
+maintainers:
+  - Vasily Khoruzhick <anarsoul@gmail.com>
+  - Alistair Francis <alistair@alistair23.me>
+
+description:
+  RTL8723CS/RTL8723CS/RTL8822CS is WiFi + BT chip. WiFi part is connected over
+  SDIO, while BT is connected over serial. It speaks H5 protocol with few
+  extra commands to upload firmware and change module speed.
+
+properties:
+  compatible:
+    oneOf:
+      - const: "realtek,rtl8723bs-bt"
+      - const: "realtek,rtl8723cs-bt"
+      - const: "realtek,rtl8822cs-bt"
+
+  device-wake-gpios:
+    maxItems: 1
+    description: GPIO specifier, used to wakeup the BT module
+
+  enable-gpios:
+    maxItems: 1
+    description: GPIO specifier, used to enable the BT module
+
+  host-wake-gpios:
+    maxItems: 1
+    description: GPIO specifier, used to wakeup the host processor
+
+required:
+  - compatible
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    uart1 {
+        pinctrl-names = "default";
+        pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+        uart-has-rtscts = <1>;
+
+        bluetooth {
+            compatible = "realtek,rtl8723bs-bt";
+            device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
+            host-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+        };
+    };
-- 
2.26.0


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

* [PATCH v4 2/3] Bluetooth: hci_h5: Add support for binding RTL8723BS with device tree
  2020-04-25 15:55 [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth Alistair Francis
@ 2020-04-25 15:55 ` Alistair Francis
  2020-04-25 15:55 ` [DO-NOT-MERGE][PATCH v4 3/3] arm64: allwinner: Enable Bluetooth and WiFi on sopine baseboard Alistair Francis
  2020-04-28 10:13 ` [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth Marcel Holtmann
  2 siblings, 0 replies; 8+ messages in thread
From: Alistair Francis @ 2020-04-25 15:55 UTC (permalink / raw)
  To: netdev, linux-kernel, marcel, johan.hedberg, linux-bluetooth,
	mripard, wens
  Cc: anarsoul, devicetree, alistair23, linux-arm-kernel, Alistair Francis

From: Vasily Khoruzhick <anarsoul@gmail.com>

RTL8723BS is often used in ARM boards, so add ability to bind it
using device tree.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 drivers/bluetooth/hci_h5.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index 106c110efe56..e60b2e0773db 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -1018,6 +1018,8 @@ static const struct of_device_id rtl_bluetooth_of_match[] = {
 #ifdef CONFIG_BT_HCIUART_RTL
 	{ .compatible = "realtek,rtl8822cs-bt",
 	  .data = (const void *)&rtl_vnd },
+	{ .compatible = "realtek,rtl8723bs-bt",
+	  .data = (const void *)&rtl_vnd },
 #endif
 	{ },
 };
-- 
2.26.0


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

* [DO-NOT-MERGE][PATCH v4 3/3] arm64: allwinner: Enable Bluetooth and WiFi on sopine baseboard
  2020-04-25 15:55 [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth Alistair Francis
  2020-04-25 15:55 ` [PATCH v4 2/3] Bluetooth: hci_h5: Add support for binding RTL8723BS with device tree Alistair Francis
@ 2020-04-25 15:55 ` Alistair Francis
  2020-04-28  9:51   ` Marcel Holtmann
  2020-04-28 10:13 ` [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth Marcel Holtmann
  2 siblings, 1 reply; 8+ messages in thread
From: Alistair Francis @ 2020-04-25 15:55 UTC (permalink / raw)
  To: netdev, linux-kernel, marcel, johan.hedberg, linux-bluetooth,
	mripard, wens
  Cc: anarsoul, devicetree, alistair23, linux-arm-kernel, Alistair Francis

The sopine board has an optional RTL8723BS WiFi + BT module that can be
connected to UART1. Add this to the device tree so that it will work
for users if connected.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 .../allwinner/sun50i-a64-sopine-baseboard.dts | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index 2f6ea9f3f6a2..34357ba143cb 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -42,6 +42,11 @@ reg_vcc1v8: vcc1v8 {
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <1800000>;
 	};
+
+	wifi_pwrseq: wifi_pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
+	};
 };
 
 &ac_power_supply {
@@ -103,6 +108,17 @@ ext_rgmii_phy: ethernet-phy@1 {
 	};
 };
 
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins>;
+	vmmc-supply = <&reg_dldo4>;
+	vqmmc-supply = <&reg_eldo1>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	non-removable;
+	bus-width = <4>;
+	status = "okay";
+};
+
 &mmc2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc2_pins>;
@@ -174,6 +190,19 @@ &uart0 {
 	status = "okay";
 };
 
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+	uart-has-rtscts = <1>;
+	status = "okay";
+
+	bluetooth {
+		compatible = "realtek,rtl8723bs-bt";
+		device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
+		host-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+	};
+};
+
 /* On Pi-2 connector */
 &uart2 {
 	pinctrl-names = "default";
-- 
2.26.0


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

* Re: [DO-NOT-MERGE][PATCH v4 3/3] arm64: allwinner: Enable Bluetooth and WiFi on sopine baseboard
  2020-04-25 15:55 ` [DO-NOT-MERGE][PATCH v4 3/3] arm64: allwinner: Enable Bluetooth and WiFi on sopine baseboard Alistair Francis
@ 2020-04-28  9:51   ` Marcel Holtmann
  2020-04-28 10:03     ` Maxime Ripard
  0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2020-04-28  9:51 UTC (permalink / raw)
  To: Alistair Francis
  Cc: netdev, LKML, Johan Hedberg, linux-bluetooth, mripard, wens,
	anarsoul, devicetree, alistair23, linux-arm-kernel

Hi Alistair,

> The sopine board has an optional RTL8723BS WiFi + BT module that can be
> connected to UART1. Add this to the device tree so that it will work
> for users if connected.
> 
> Signed-off-by: Alistair Francis <alistair@alistair23.me>
> ---
> .../allwinner/sun50i-a64-sopine-baseboard.dts | 29 +++++++++++++++++++
> 1 file changed, 29 insertions(+)

so I am bit confused on what to do with this series? Do you want me to apply a subset of patches or do you require specific reviews or acks?

Regards

Marcel


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

* Re: [DO-NOT-MERGE][PATCH v4 3/3] arm64: allwinner: Enable Bluetooth and WiFi on sopine baseboard
  2020-04-28  9:51   ` Marcel Holtmann
@ 2020-04-28 10:03     ` Maxime Ripard
  0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2020-04-28 10:03 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Alistair Francis, netdev, LKML, Johan Hedberg, linux-bluetooth,
	wens, anarsoul, devicetree, alistair23, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

Hi Marcel,

On Tue, Apr 28, 2020 at 11:51:24AM +0200, Marcel Holtmann wrote:
> Hi Alistair,
> 
> > The sopine board has an optional RTL8723BS WiFi + BT module that can be
> > connected to UART1. Add this to the device tree so that it will work
> > for users if connected.
> > 
> > Signed-off-by: Alistair Francis <alistair@alistair23.me>
> > ---
> > .../allwinner/sun50i-a64-sopine-baseboard.dts | 29 +++++++++++++++++++
> > 1 file changed, 29 insertions(+)
> 
> so I am bit confused on what to do with this series? Do you want me to apply a
> subset of patches or do you require specific reviews or acks?

Applying 1 and 2 and leaving 3 aside would be great :)

Thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth
  2020-04-25 15:55 [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth Alistair Francis
  2020-04-25 15:55 ` [PATCH v4 2/3] Bluetooth: hci_h5: Add support for binding RTL8723BS with device tree Alistair Francis
  2020-04-25 15:55 ` [DO-NOT-MERGE][PATCH v4 3/3] arm64: allwinner: Enable Bluetooth and WiFi on sopine baseboard Alistair Francis
@ 2020-04-28 10:13 ` Marcel Holtmann
  2 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2020-04-28 10:13 UTC (permalink / raw)
  To: Alistair Francis
  Cc: netdev, LKML, Johan Hedberg, linux-bluetooth, mripard, wens,
	anarsoul, devicetree, alistair23, linux-arm-kernel

Hi Alistair,

> Add binding document for bluetooth part of RTL8723BS/RTL8723CS
> 
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> Signed-off-by: Alistair Francis <alistair@alistair23.me>
> ---
> .../bindings/net/realtek-bluetooth.yaml       | 54 +++++++++++++++++++
> 1 file changed, 54 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth.yaml

patches 1 and 2 have been applied to bluetooth-next tree.

Regards

Marcel


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

* Re: [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth
  2020-04-22  3:53 Alistair Francis
@ 2020-04-22 19:42 ` Rob Herring
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2020-04-22 19:42 UTC (permalink / raw)
  To: Alistair Francis
  Cc: netdev, linux-kernel, marcel, johan.hedberg, linux-bluetooth,
	mripard, wens, anarsoul, devicetree, alistair23,
	linux-arm-kernel, Alistair Francis

On Tue, 21 Apr 2020 20:53:31 -0700, Alistair Francis wrote:
> From: Vasily Khoruzhick <anarsoul@gmail.com>
> 
> Add binding document for bluetooth part of RTL8723BS/RTL8723CS
> 
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> Signed-off-by: Alistair Francis <alistair@alistair23.me>
> ---
>  .../bindings/net/realtek-bluetooth.yaml       | 54 +++++++++++++++++++
>  1 file changed, 54 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/net/realtek-bluetooth.yaml: $id: relative path/filename doesn't match actual path or filename
	expected: http://devicetree.org/schemas/net/realtek-bluetooth.yaml#

See https://patchwork.ozlabs.org/patch/1274671

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.

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

* [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth
@ 2020-04-22  3:53 Alistair Francis
  2020-04-22 19:42 ` Rob Herring
  0 siblings, 1 reply; 8+ messages in thread
From: Alistair Francis @ 2020-04-22  3:53 UTC (permalink / raw)
  To: netdev, linux-kernel, marcel, johan.hedberg, linux-bluetooth,
	mripard, wens
  Cc: anarsoul, devicetree, alistair23, linux-arm-kernel, Alistair Francis

From: Vasily Khoruzhick <anarsoul@gmail.com>

Add binding document for bluetooth part of RTL8723BS/RTL8723CS

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 .../bindings/net/realtek-bluetooth.yaml       | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth.yaml

diff --git a/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml b/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
new file mode 100644
index 000000000000..4eb141b00fcb
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/realtek,rtl8723bs-bt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RTL8723BS/RTL8723CS/RTL8822CS Bluetooth Device Tree Bindings
+
+maintainers:
+  - Vasily Khoruzhick <anarsoul@gmail.com>
+  - Alistair Francis <alistair@alistair23.me>
+
+description:
+  RTL8723CS/RTL8723CS/RTL8822CS is WiFi + BT chip. WiFi part is connected over
+  SDIO, while BT is connected over serial. It speaks H5 protocol with few
+  extra commands to upload firmware and change module speed.
+
+properties:
+  compatible:
+    oneOf:
+      - const: "realtek,rtl8723bs-bt"
+      - const: "realtek,rtl8723cs-bt"
+      - const: "realtek,rtl8822cs-bt"
+
+  device-wake-gpios:
+    maxItems: 1
+    description: GPIO specifier, used to wakeup the BT module
+
+  enable-gpios:
+    maxItems: 1
+    description: GPIO specifier, used to enable the BT module
+
+  host-wake-gpios:
+    maxItems: 1
+    description: GPIO specifier, used to wakeup the host processor
+
+required:
+  - compatible
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    uart1 {
+        pinctrl-names = "default";
+        pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+        uart-has-rtscts = <1>;
+
+        bluetooth {
+            compatible = "realtek,rtl8723bs-bt";
+            device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
+            host-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+        };
+    };
-- 
2.26.0


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

end of thread, other threads:[~2020-04-28 10:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 15:55 [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth Alistair Francis
2020-04-25 15:55 ` [PATCH v4 2/3] Bluetooth: hci_h5: Add support for binding RTL8723BS with device tree Alistair Francis
2020-04-25 15:55 ` [DO-NOT-MERGE][PATCH v4 3/3] arm64: allwinner: Enable Bluetooth and WiFi on sopine baseboard Alistair Francis
2020-04-28  9:51   ` Marcel Holtmann
2020-04-28 10:03     ` Maxime Ripard
2020-04-28 10:13 ` [PATCH v4 1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2020-04-22  3:53 Alistair Francis
2020-04-22 19:42 ` Rob Herring

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