public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Add support for Amlogic HCI UART
@ 2024-08-09  5:42 Yang Li via B4 Relay
  2024-08-09  5:42 ` [PATCH v4 1/3] dt-bindings: net: bluetooth: Add support for Amlogic Bluetooth Yang Li via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Yang Li via B4 Relay @ 2024-08-09  5:42 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel,
	linux-arm-kernel, Yang Li, Krzysztof Kozlowski, Ye He

Add support for Amlogic HCI UART, including dt-binding,
and Amlogic Bluetooth driver.

Signed-off-by: Yang Li <yang.li@amlogic.com>
---
Changes in v4:
- Modified the compatible list in the DT binding.
- Reduced the boot delay from 350ms to 60ms.
- Minor fixes.
- Link to v3: https://lore.kernel.org/r/20240802-btaml-v3-0-d8110bf9963f@amlogic.com

Changes in v3:
- Updated the properties within the device tree binding file.
- Remove the "antenna-number" property.
- Performed code optimization for improved efficiency and readability.
- Link to v2: https://lore.kernel.org/r/20240718-btaml-v2-0-1392b2e21183@amlogic.com

Changes in v2:
- Introduce a regulator for powering up the Bluetooth chip instead of power sequencing.
- Use the GPIO Consumer API to manipulate the GPIO pins instead of the legacy API.
- Minor fixes.
- Link to v1: https://lore.kernel.org/r/20240705-btaml-v1-0-7f1538f98cef@amlogic.com

---
Yang Li (3):
      dt-bindings: net: bluetooth: Add support for Amlogic Bluetooth
      Bluetooth: hci_uart: Add support for Amlogic HCI UART
      MAINTAINERS: Add an entry for Amlogic HCI UART (M: Yang Li)

 .../bindings/net/bluetooth/amlogic,w155s2-bt.yaml  |  63 ++
 MAINTAINERS                                        |   7 +
 drivers/bluetooth/Kconfig                          |  12 +
 drivers/bluetooth/Makefile                         |   1 +
 drivers/bluetooth/hci_aml.c                        | 755 +++++++++++++++++++++
 drivers/bluetooth/hci_ldisc.c                      |   8 +-
 drivers/bluetooth/hci_uart.h                       |   8 +-
 7 files changed, 851 insertions(+), 3 deletions(-)
---
base-commit: bd0b4dae74b0f0ee9ea37818e1c132b56a26d6dd
change-id: 20240418-btaml-f9d7b19724ab

Best regards,
-- 
Yang Li <yang.li@amlogic.com>



^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH v3 1/3] dt-bindings: net: bluetooth: Add support for Amlogic Bluetooth
@ 2024-08-02  9:39 Yang Li via B4 Relay
  2024-08-02 10:36 ` Add support for Amlogic HCI UART bluez.test.bot
  0 siblings, 1 reply; 9+ messages in thread
From: Yang Li via B4 Relay @ 2024-08-02  9:39 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel,
	linux-arm-kernel, Yang Li

From: Yang Li <yang.li@amlogic.com>

Add binding document for Amlogic Bluetooth chipsets attached over UART.

Signed-off-by: Yang Li <yang.li@amlogic.com>
---
 .../bindings/net/bluetooth/amlogic,w155s2-bt.yaml  | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/bluetooth/amlogic,w155s2-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/amlogic,w155s2-bt.yaml
new file mode 100644
index 000000000000..c0c4209cd687
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/bluetooth/amlogic,w155s2-bt.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2024 Amlogic, Inc. All rights reserved
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/bluetooth/amlogic,w155s2-bt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Bluetooth chips
+
+description:
+  The W155S2 is an Amlogic Bluetooth and Wi-Fi combo chip. It works on
+  the standard H4 protocol via a 4-wire UART interface, with baud rates
+  up to 4 Mbps.
+
+maintainers:
+  - Yang Li <yang.li@amlogic.com>
+
+properties:
+  compatible:
+    oneOf:
+      - const: amlogic,w155s2-bt
+      - items:
+          - enum:
+              - amlogic,w265s1-bt
+              - amlogic,w265p1-bt
+              - amlogic,w265s2-bt
+          - const: amlogic,w155s2-bt
+
+  clocks:
+    maxItems: 1
+    description: clock provided to the controller (32.768KHz)
+
+  enable-gpios:
+    maxItems: 1
+
+  vddio-supply:
+    description: VDD_IO supply regulator handle
+
+  firmware-name:
+    maxItems: 1
+    description: specify the path of firmware bin to load
+
+required:
+  - compatible
+  - enable-gpios
+  - vddio-supply
+  - clocks
+  - firmware-name
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    bluetooth {
+        compatible = "amlogic,w155s2-bt";
+        clocks = <&extclk>;
+        enable-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+        vddio-supply = <&wcn_3v3>;
+        firmware-name = "amlogic/aml_w155s2_bt_uart.bin";
+    };
+

-- 
2.42.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH v2 1/3] dt-bindings: net: bluetooth: Add support for Amlogic Bluetooth
@ 2024-07-18  7:42 Yang Li via B4 Relay
  2024-07-18  8:38 ` Add support for Amlogic HCI UART bluez.test.bot
  0 siblings, 1 reply; 9+ messages in thread
From: Yang Li via B4 Relay @ 2024-07-18  7:42 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel,
	linux-arm-kernel, Yang Li

From: Yang Li <yang.li@amlogic.com>

Add binding document for Amlogic Bluetooth chipsets attached over UART.

Signed-off-by: Yang Li <yang.li@amlogic.com>
---
 .../bindings/net/bluetooth/amlogic,w155s2-bt.yaml  | 66 ++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/bluetooth/amlogic,w155s2-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/amlogic,w155s2-bt.yaml
new file mode 100644
index 000000000000..2e433d5692ff
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/bluetooth/amlogic,w155s2-bt.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2024 Amlogic, Inc. All rights reserved
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/bluetooth/amlogic,w155s2-bt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Bluetooth chips
+
+description:
+  This binding describes UART-attached Amlogic bluetooth chips.
+
+maintainers:
+  - Yang Li <yang.li@amlogic.com>
+
+properties:
+  compatible:
+    oneOf:
+      - const: amlogic,w155s2-bt
+      - items:
+          - enum:
+              - amlogic,w265s1-bt
+              - amlogic,w265p1-bt
+              - amlogic,w265s2-bt
+          - const: amlogic,w155s2-bt
+
+  bt-enable-gpios:
+    maxItems: 1
+    description: gpio specifier used to enable BT
+
+  bt-supply:
+    description: bluetooth chip 3.3V supply regulator handle
+
+  clocks:
+    maxItems: 1
+    description: clock provided to the controller (32.768KHz)
+
+  antenna-number:
+    default: 1
+    description: device supports up to two antennas
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  firmware-name:
+    description: specify the path of firmware bin to load
+    $ref: /schemas/types.yaml#/definitions/string-array
+
+required:
+  - compatible
+  - bt-enable-gpios
+  - bt-supply
+  - clocks
+  - firmware-name
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    bluetooth {
+        compatible = "amlogic,w155s2-bt";
+        bt-enable-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+        bt-supply = <&wcn_3v3>;
+        clocks = <&extclk>;
+        firmware-name = "amlogic/aml_w155s2_bt_uart.bin";
+    };
+

-- 
2.42.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH 1/4] dt-bindings: net: bluetooth: Add support for Amlogic Bluetooth
@ 2024-07-05 11:20 Yang Li via B4 Relay
  2024-07-05 11:57 ` Add support for Amlogic HCI UART bluez.test.bot
  0 siblings, 1 reply; 9+ messages in thread
From: Yang Li via B4 Relay @ 2024-07-05 11:20 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel,
	linux-arm-kernel, Yang Li

From: Yang Li <yang.li@amlogic.com>

Add binding document for Amlogic Bluetooth chipsets attached over UART.

Signed-off-by: Yang Li <yang.li@amlogic.com>
---
 .../bindings/net/bluetooth/amlogic,w155s2-bt.yaml  | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/bluetooth/amlogic,w155s2-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/amlogic,w155s2-bt.yaml
new file mode 100644
index 000000000000..d59e3206af62
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/bluetooth/amlogic,w155s2-bt.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2024 Amlogic, Inc. All rights reserved
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/bluetooth/amlogic,w155s2-bt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Bluetooth chips
+
+description:
+  This binding describes UART-attached Amlogic bluetooth chips.
+
+maintainers:
+  - Yang Li <yang.li@amlogic.com>
+
+properties:
+  compatible:
+    oneOf:
+      - const: amlogic,w155s2-bt
+      - items:
+          - enum:
+              - amlogic,w265s1-bt
+              - amlogic,w265p1-bt
+              - amlogic,w265s2-bt
+          - const: amlogic,w155s2-bt
+
+  amlogic,wcn-pwrseq:
+    default: 0
+    description: specify the power sequence used to power on Bluetooth
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  amlogic,firmware:
+    description: specify the path of firmware bin to load
+    $ref: /schemas/types.yaml#/definitions/string-array
+
+  amlogic,antenna-number:
+    default: 1
+    description: number of antenna
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  amlogic,a2dp-sink-enable:
+    default: 0
+    description: enable sink mode with controller
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+  - compatible
+  - amlogic,wcn-pwrseq
+  - amlogic,firmware
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    serial {
+        bluetooth {
+            compatible = "amlogic,w155s2-bt";
+            amlogic,wcn-pwrseq = <1>;
+            amlogic,firmware = "amlogic/aml_w155s2_bt_uart.bin";
+        };
+    };

-- 
2.42.0



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

end of thread, other threads:[~2024-08-09 14:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-09  5:42 [PATCH v4 0/3] Add support for Amlogic HCI UART Yang Li via B4 Relay
2024-08-09  5:42 ` [PATCH v4 1/3] dt-bindings: net: bluetooth: Add support for Amlogic Bluetooth Yang Li via B4 Relay
2024-08-09  6:40   ` Add support for Amlogic HCI UART bluez.test.bot
2024-08-09  5:42 ` [PATCH v4 2/3] Bluetooth: hci_uart: " Yang Li via B4 Relay
2024-08-09  5:42 ` [PATCH v4 3/3] MAINTAINERS: Add an entry for Amlogic HCI UART (M: Yang Li) Yang Li via B4 Relay
2024-08-09 14:50 ` [PATCH v4 0/3] Add support for Amlogic HCI UART patchwork-bot+bluetooth
  -- strict thread matches above, loose matches on Subject: below --
2024-08-02  9:39 [PATCH v3 1/3] dt-bindings: net: bluetooth: Add support for Amlogic Bluetooth Yang Li via B4 Relay
2024-08-02 10:36 ` Add support for Amlogic HCI UART bluez.test.bot
2024-07-18  7:42 [PATCH v2 1/3] dt-bindings: net: bluetooth: Add support for Amlogic Bluetooth Yang Li via B4 Relay
2024-07-18  8:38 ` Add support for Amlogic HCI UART bluez.test.bot
2024-07-05 11:20 [PATCH 1/4] dt-bindings: net: bluetooth: Add support for Amlogic Bluetooth Yang Li via B4 Relay
2024-07-05 11:57 ` Add support for Amlogic HCI UART bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox