Skip to contentSkip to conversation

dt-bindings: serial: add Broadcom's BCM63138 High Speed UART

PATCH Superseded Rafał Miłecki 3 participants 6 messages Nov 21, 2023 – Nov 22, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: serial: add Broadcom's BCM63138 High Speed UART

From: Rafał Miłecki <[email protected]>

It's an UART controller that first appeared on BCM63138 SoC and then was reused on other bcmbca familiy chipsets.

---
 .../serial/brcm,bcm63138-hs-uart.yaml         | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm63138-hs-uart.yaml
Documentation/devicetree/bindings/serial/brcm,bcm63138-hs-uart.yaml new file +44 -0
new file mode 100644
index 000000000000..91a7e945be39
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/brcm,bcm63138-hs-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom's BCM63138 High Speed UART
+
+description:
+  High speed serial port controller that was designed to handle Bluetooth
+  devices communication. It supports sending custom frames that need to be
+  processed by a host system.
+
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+allOf:
+  - $ref: serial.yaml#
+
+properties:
+  compatible:
+    const: brcm,bcm63138-hs-uart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    serial@fffec400 {
+        compatible = "brcm,bcm63138-hs-uart";
+        reg = <0xfffec400 0x1e0>;
+        interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+    };
Signature · 1 line
2.35.3
#1 lore raw

PATCH 2/2 ARM: dts: broadcom: Add BCM63138's high speed UART

From: Rafał Miłecki <[email protected]>

It's designed for hardwiring Bluetooth devices to it.

---
 arch/arm/boot/dts/broadcom/bcm63138.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/broadcom/bcm63138.dtsi +6 -0
index 93281c47c9ba..bf0538896f0e 100644
@@ -232,6 +232,12 @@ nand_controller: nand-controller@2000 {
 			interrupt-names = "nand";
 		};
 
+		serial@4400 {
+			compatible = "brcm,bcm63138-hs-uart";
+			reg = <0x4400 0x1e0>;
+			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
 		bootlut: bootlut@8000 {
 			compatible = "brcm,bcm63138-bootlut";
 			reg = <0x8000 0x50>;
Signature · 1 line
2.35.3
maintainer
#2 lore raw
In reply to Rafał Miłecki

Hi Rafal,

This same HS UART exists on all the bcmbca SoCs that listed in brcm,bcmbca.yaml. I suggest to use bcmbca for all instead of naming based on each individual chip. This will be consistent with spi, nand and other common periph blocks used in bcmbca SoCs.

Thanks,
William

Quoted 62 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

It's an UART controller that first appeared on BCM63138 SoC and then was reused on other bcmbca familiy chipsets.

---
  .../serial/brcm,bcm63138-hs-uart.yaml         | 44 +++++++++++++++++++
  1 file changed, 44 insertions(+)

create mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm63138-hs-uart.yaml

Documentation/devicetree/bindings/serial/brcm,bcm63138-hs-uart.yaml new file +44 -0
new file mode 100644
index 000000000000..91a7e945be39
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/brcm,bcm63138-hs-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom's BCM63138 High Speed UART
+
+description:
+  High speed serial port controller that was designed to handle Bluetooth
+  devices communication. It supports sending custom frames that need to be
+  processed by a host system.
+
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+allOf:
+  - $ref: serial.yaml#
+
+properties:
+  compatible:
+    const: brcm,bcm63138-hs-uart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    serial@fffec400 {
+        compatible = "brcm,bcm63138-hs-uart";
+        reg = <0xfffec400 0x1e0>;
+        interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+    };
#3 lore raw
In reply to Rafał Miłecki
Quoted 2 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

Thank you for your patch. There is something to discuss/improve.

Documentation/devicetree/bindings/serial/brcm,bcm63138-hs-uart.yaml line 30

Quoted 12 lines
Documentation/devicetree/bindings/serial/brcm,bcm63138-hs-uart.yaml new file +12 -0
+
+properties:
+  compatible:
+    const: brcm,bcm63138-hs-uart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:

Missing compatible.

Best regards,
Krzysztof

#4 lore raw
Quoted 6 lines · Krzysztof Kozlowski
Quoted 2 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

Thank you for your patch. There is something to discuss/improve.

Quoted 14 lines

Documentation/devicetree/bindings/serial/brcm,bcm63138-hs-uart.yaml line 30

Quoted 12 lines
Documentation/devicetree/bindings/serial/brcm,bcm63138-hs-uart.yaml new file +12 -0
+
+properties:
+  compatible:
+    const: brcm,bcm63138-hs-uart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:

Missing compatible.

I stopped putting "compatible" in "required" in schemas back in 2020 :O

Back then I received a comment from Rob [0] in discussion on [PATCH] dt-bindings: mtd: convert "fixed-partitions" to the json-schema telling to drop it:

Quoted 2 lines · Rob Herring

And drop 'compatible' as required. It's redundant anyways because the schema will only be applied if compatible matches.

So I'll need some help here please. Should I start including "compatible" in "required" after all? Or is that situation specific (could you explain what does it depend on)?

[0] https://lore.kernel.org/linux-devicetree/[email protected]/

#5 lore raw
Quoted 28 lines · Rafał Miłecki
Quoted 6 lines · Krzysztof Kozlowski
Quoted 2 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

Thank you for your patch. There is something to discuss/improve.

Quoted 14 lines

Documentation/devicetree/bindings/serial/brcm,bcm63138-hs-uart.yaml line 30

Quoted 12 lines
Documentation/devicetree/bindings/serial/brcm,bcm63138-hs-uart.yaml new file +12 -0
+
+properties:
+  compatible:
+    const: brcm,bcm63138-hs-uart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:

Missing compatible.

I stopped putting "compatible" in "required" in schemas back in 2020 :O

Back then I received a comment from Rob [0] in discussion on [PATCH] dt-bindings: mtd: convert "fixed-partitions" to the json-schema telling to drop it:

Quoted 7 lines
Quoted 2 lines · Rob Herring

And drop 'compatible' as required. It's redundant anyways because the schema will only be applied if compatible matches.

So I'll need some help here please. Should I start including "compatible" in "required" after all? Or is that situation specific (could you explain what does it depend on)?

Hm, it is redundant, true, although I always preferred it listed to be explicit. But in such case no problem:

Best regards,
Krzysztof