Skip to contentSkip to conversation

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

PATCH Applied Rafał Miłecki 4 participants 16 messages Nov 22, 2023 – Dec 5, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 dt-bindings: serial: add Broadcom's BCMBCA family 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.

---
V2: Extend "compatible" and rename YAML file accordingly

Krzysztof: since I reworked "compatible" I didn't want to carry on your Reviewed in case there is sth wrong with the updated schema.

 .../bindings/serial/brcm,bcmbca-hs-uart.yaml  | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +60 -0
new file mode 100644
index 000000000000..64ef9eee7be2
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/brcm,bcmbca-hs-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom Broadband SoC 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:
+    items:
+      - enum:
+          - brcm,bcm4908-hs-uart
+          - brcm,bcm4912-hs-uart
+          - brcm,bcm6756-hs-uart
+          - brcm,bcm6813-hs-uart
+          - brcm,bcm6846-hs-uart
+          - brcm,bcm6855-hs-uart
+          - brcm,bcm6856-hs-uart
+          - brcm,bcm6858-hs-uart
+          - brcm,bcm6878-hs-uart
+          - brcm,bcm47622-hs-uart
+          - brcm,bcm63138-hs-uart
+          - brcm,bcm63146-hs-uart
+          - brcm,bcm63158-hs-uart
+          - brcm,bcm63178-hs-uart
+      - const: brcm,bcmbca-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", "brcm,bcmbca-hs-uart";
+        reg = <0xfffec400 0x1e0>;
+        interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+    };
Signature · 1 line
2.35.3
#1 lore raw

PATCH v2 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.

---
V2: Update "compatible"

 arch/arm/boot/dts/broadcom/bcm63138.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/broadcom/bcm63138.dtsi +6 -0
index 93281c47c9ba..4ef02283612b 100644
@@ -232,6 +232,12 @@ nand_controller: nand-controller@2000 {
 			interrupt-names = "nand";
 		};
 
+		serial@4400 {
+			compatible = "brcm,bcm63138-hs-uart", "brcm,bcmbca-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
#3 lore raw
In reply to Rafał Miłecki
Quoted 4 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.

If there is going to be a new version, typo: family

Quoted 7 lines

---
V2: Extend "compatible" and rename YAML file accordingly

Krzysztof: since I reworked "compatible" I didn't want to carry on your Reviewed in case there is sth wrong with the updated schema.

Thanks for letting me know.

Quoted 16 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +16 -0
+
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+allOf:
+  - $ref: serial.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,bcm4908-hs-uart
+          - brcm,bcm4912-hs-uart
+          - brcm,bcm6756-hs-uart
+          - brcm,bcm6813-hs-uart
+          - brcm,bcm6846-hs-uart

Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml line 38

Quoted 10 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +10 -0
+          - brcm,bcm6855-hs-uart
+          - brcm,bcm6856-hs-uart
+          - brcm,bcm6858-hs-uart
+          - brcm,bcm6878-hs-uart
+          - brcm,bcm47622-hs-uart
+          - brcm,bcm63138-hs-uart
+          - brcm,bcm63146-hs-uart
+          - brcm,bcm63158-hs-uart
+          - brcm,bcm63178-hs-uart
+      - const: brcm,bcmbca-hs-uart

git grep did not find driver for this compatible. Is it in separate patchset?

Best regards,
Krzysztof

#4 lore raw
Quoted 39 lines · Krzysztof Kozlowski
Quoted 4 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.

If there is going to be a new version, typo: family

Quoted 7 lines

---
V2: Extend "compatible" and rename YAML file accordingly

Krzysztof: since I reworked "compatible" I didn't want to carry on your Reviewed in case there is sth wrong with the updated schema.

Thanks for letting me know.

Quoted 21 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +21 -0
+
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+allOf:
+  - $ref: serial.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,bcm4908-hs-uart
+          - brcm,bcm4912-hs-uart
+          - brcm,bcm6756-hs-uart
+          - brcm,bcm6813-hs-uart
+          - brcm,bcm6846-hs-uart
+          - brcm,bcm6855-hs-uart
+          - brcm,bcm6856-hs-uart
+          - brcm,bcm6858-hs-uart
+          - brcm,bcm6878-hs-uart
+          - brcm,bcm47622-hs-uart
Quoted 8 lines

Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml line 38

Quoted 5 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +5 -0
+          - brcm,bcm63138-hs-uart
+          - brcm,bcm63146-hs-uart
+          - brcm,bcm63158-hs-uart
+          - brcm,bcm63178-hs-uart
+      - const: brcm,bcmbca-hs-uart

git grep did not find driver for this compatible. Is it in separate patchset?

No. My project based on BCMBCA has been canceled and I don't work on it full time anymore. I just wanted to fill empty bits I can afford handling in my free time and complete hardware description in DTS.

I may still work on some BCMBCA drivers from time to time but as a side project.

#5 lore raw
Quoted 29 lines · Rafał Miłecki
Quoted 20 lines
Quoted 20 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +20 -0
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+allOf:
+  - $ref: serial.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,bcm4908-hs-uart
+          - brcm,bcm4912-hs-uart
+          - brcm,bcm6756-hs-uart
+          - brcm,bcm6813-hs-uart
+          - brcm,bcm6846-hs-uart
+          - brcm,bcm6855-hs-uart
+          - brcm,bcm6856-hs-uart
+          - brcm,bcm6858-hs-uart
+          - brcm,bcm6878-hs-uart
+          - brcm,bcm47622-hs-uart
Quoted 8 lines

Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml line 38

Quoted 5 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +5 -0
+          - brcm,bcm63138-hs-uart
+          - brcm,bcm63146-hs-uart
+          - brcm,bcm63158-hs-uart
+          - brcm,bcm63178-hs-uart
+      - const: brcm,bcmbca-hs-uart

git grep did not find driver for this compatible. Is it in separate patchset?

Quoted 6 lines

No. My project based on BCMBCA has been canceled and I don't work on it full time anymore. I just wanted to fill empty bits I can afford handling in my free time and complete hardware description in DTS.

I may still work on some BCMBCA drivers from time to time but as a side project.

This means we cannot use driver to verify whether the fallback is actually suitable. Considering that existing UART bindings do not fallback (brcm,bcm6345-uart, brcm,bcm7271-uart), I don't understand what is the benefit here.

Best regards,
Krzysztof

#6 lore raw
Quoted 34 lines · Krzysztof Kozlowski
Quoted 33 lines · Rafał Miłecki
Quoted 20 lines
Quoted 20 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +20 -0
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+allOf:
+  - $ref: serial.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,bcm4908-hs-uart
+          - brcm,bcm4912-hs-uart
+          - brcm,bcm6756-hs-uart
+          - brcm,bcm6813-hs-uart
+          - brcm,bcm6846-hs-uart
+          - brcm,bcm6855-hs-uart
+          - brcm,bcm6856-hs-uart
+          - brcm,bcm6858-hs-uart
+          - brcm,bcm6878-hs-uart
+          - brcm,bcm47622-hs-uart
Quoted 8 lines

Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml line 38

Quoted 5 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +5 -0
+          - brcm,bcm63138-hs-uart
+          - brcm,bcm63146-hs-uart
+          - brcm,bcm63158-hs-uart
+          - brcm,bcm63178-hs-uart
+      - const: brcm,bcmbca-hs-uart

git grep did not find driver for this compatible. Is it in separate patchset?

No. My project based on BCMBCA has been canceled and I don't work on it full time anymore. I just wanted to fill empty bits I can afford handling in my free time and complete hardware description in DTS.

Quoted 7 lines
Quoted 2 lines

I may still work on some BCMBCA drivers from time to time but as a side project.

This means we cannot use driver to verify whether the fallback is actually suitable. Considering that existing UART bindings do not fallback (brcm,bcm6345-uart, brcm,bcm7271-uart), I don't understand what is the benefit here.

I believed the rule for maintaining bindings and DTS files was to describe hardware no matter what/if system needs it.

For example a year ago I added binding for BCMBCA SoC timer without actual driver, see e112f2de151b ("dt-bindings: timer: Add Broadcom's BCMBCA timers").

I'm not sure if we're going to agree on this, but personally I like describing hardware as much as I can. So it's well documented / understood and people may eventually write drivers for it. Maybe it's partially because I come from Broadcom's world that isn't well known for upstream efforts in general.

As for verifying this binding against actual driver I can definitely understand your concerns. Hoping it may help I uploaded Broadcom's HS UART driver extracted from the RAXE500-V1.0.8.70_2.0.36_gpl SDK/GPL
package: http://files.zajec.net/hs_uart/

Please note it's not much of a clean code and its design would not be accepted upstream but hopefully you can glance at it to verify this binding's compatibility.

Let me know if there is anything else (other than rewriting Broadcom's downstream driver) I could do to get this binding accepted.

#7 lore raw
Quoted 50 lines · Rafał Miłecki
Quoted 34 lines · Krzysztof Kozlowski
Quoted 33 lines · Rafał Miłecki
Quoted 20 lines
Quoted 20 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +20 -0
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+allOf:
+  - $ref: serial.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,bcm4908-hs-uart
+          - brcm,bcm4912-hs-uart
+          - brcm,bcm6756-hs-uart
+          - brcm,bcm6813-hs-uart
+          - brcm,bcm6846-hs-uart
+          - brcm,bcm6855-hs-uart
+          - brcm,bcm6856-hs-uart
+          - brcm,bcm6858-hs-uart
+          - brcm,bcm6878-hs-uart
+          - brcm,bcm47622-hs-uart
Quoted 8 lines

Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml line 38

Quoted 5 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +5 -0
+          - brcm,bcm63138-hs-uart
+          - brcm,bcm63146-hs-uart
+          - brcm,bcm63158-hs-uart
+          - brcm,bcm63178-hs-uart
+      - const: brcm,bcmbca-hs-uart

git grep did not find driver for this compatible. Is it in separate patchset?

No. My project based on BCMBCA has been canceled and I don't work on it full time anymore. I just wanted to fill empty bits I can afford handling in my free time and complete hardware description in DTS.

Quoted 7 lines
Quoted 2 lines

I may still work on some BCMBCA drivers from time to time but as a side project.

This means we cannot use driver to verify whether the fallback is actually suitable. Considering that existing UART bindings do not fallback (brcm,bcm6345-uart, brcm,bcm7271-uart), I don't understand what is the benefit here.

I believed the rule for maintaining bindings and DTS files was to describe hardware no matter what/if system needs it.

For example a year ago I added binding for BCMBCA SoC timer without actual driver, see e112f2de151b ("dt-bindings: timer: Add Broadcom's BCMBCA timers").

Quoted 5 lines

I'm not sure if we're going to agree on this, but personally I like describing hardware as much as I can. So it's well documented / understood and people may eventually write drivers for it. Maybe it's partially because I come from Broadcom's world that isn't well known for upstream efforts in general.

The problem is that "brcm,bcmbca-hs-uart" is not describing hardware. It is saying that all these devices have similar (compatible) programming model, so the OS can use just one compatible. This goes away from pure hardware description into interpretation.

Rob already commented on such non-SoC compatibles multiple times. I do not see any reason here to not use specific compatible as fallback.

Quoted 6 lines

As for verifying this binding against actual driver I can definitely understand your concerns. Hoping it may help I uploaded Broadcom's HS UART driver extracted from the RAXE500-V1.0.8.70_2.0.36_gpl SDK/GPL
package: http://files.zajec.net/hs_uart/

Quoted 6 lines

Please note it's not much of a clean code and its design would not be accepted upstream but hopefully you can glance at it to verify this binding's compatibility.

Let me know if there is anything else (other than rewriting Broadcom's downstream driver) I could do to get this binding accepted.

Best regards,
Krzysztof

#8 lore raw
Quoted 57 lines · Krzysztof Kozlowski
Quoted 50 lines · Rafał Miłecki
Quoted 34 lines · Krzysztof Kozlowski
Quoted 33 lines · Rafał Miłecki
Quoted 20 lines
Quoted 20 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +20 -0
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+allOf:
+  - $ref: serial.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,bcm4908-hs-uart
+          - brcm,bcm4912-hs-uart
+          - brcm,bcm6756-hs-uart
+          - brcm,bcm6813-hs-uart
+          - brcm,bcm6846-hs-uart
+          - brcm,bcm6855-hs-uart
+          - brcm,bcm6856-hs-uart
+          - brcm,bcm6858-hs-uart
+          - brcm,bcm6878-hs-uart
+          - brcm,bcm47622-hs-uart
Quoted 8 lines

Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml line 38

Quoted 5 lines
Documentation/devicetree/bindings/serial/brcm,bcmbca-hs-uart.yaml new file +5 -0
+          - brcm,bcm63138-hs-uart
+          - brcm,bcm63146-hs-uart
+          - brcm,bcm63158-hs-uart
+          - brcm,bcm63178-hs-uart
+      - const: brcm,bcmbca-hs-uart

git grep did not find driver for this compatible. Is it in separate patchset?

No. My project based on BCMBCA has been canceled and I don't work on it full time anymore. I just wanted to fill empty bits I can afford handling in my free time and complete hardware description in DTS.

Quoted 7 lines
Quoted 2 lines

I may still work on some BCMBCA drivers from time to time but as a side project.

This means we cannot use driver to verify whether the fallback is actually suitable. Considering that existing UART bindings do not fallback (brcm,bcm6345-uart, brcm,bcm7271-uart), I don't understand what is the benefit here.

I believed the rule for maintaining bindings and DTS files was to describe hardware no matter what/if system needs it.

For example a year ago I added binding for BCMBCA SoC timer without actual driver, see e112f2de151b ("dt-bindings: timer: Add Broadcom's BCMBCA timers").

Quoted 5 lines

I'm not sure if we're going to agree on this, but personally I like describing hardware as much as I can. So it's well documented / understood and people may eventually write drivers for it. Maybe it's partially because I come from Broadcom's world that isn't well known for upstream efforts in general.

Quoted 7 lines

The problem is that "brcm,bcmbca-hs-uart" is not describing hardware. It is saying that all these devices have similar (compatible) programming model, so the OS can use just one compatible. This goes away from pure hardware description into interpretation.

Rob already commented on such non-SoC compatibles multiple times. I do not see any reason here to not use specific compatible as fallback.

Do I get it right we should rather have some base specific compatible
like: "brcm,bcm63138-hs-uart" and then if anything use fallback to it
like: "brcm,bcm4908-hs-uart", "brcm,bcm63138-hs-uart"; ?

#9 lore raw
Quoted 15 lines · Rafał Miłecki
Quoted 15 lines
Quoted 9 lines

For example a year ago I added binding for BCMBCA SoC timer without actual driver, see e112f2de151b ("dt-bindings: timer: Add Broadcom's BCMBCA timers").

I'm not sure if we're going to agree on this, but personally I like describing hardware as much as I can. So it's well documented / understood and people may eventually write drivers for it. Maybe it's partially because I come from Broadcom's world that isn't well known for upstream efforts in general.

The problem is that "brcm,bcmbca-hs-uart" is not describing hardware. It is saying that all these devices have similar (compatible) programming model, so the OS can use just one compatible. This goes away from pure hardware description into interpretation.

Quoted 6 lines
Quoted 2 lines

Rob already commented on such non-SoC compatibles multiple times. I do not see any reason here to not use specific compatible as fallback.

Do I get it right we should rather have some base specific compatible
like: "brcm,bcm63138-hs-uart" and then if anything use fallback to it
like: "brcm,bcm4908-hs-uart", "brcm,bcm63138-hs-uart"; ?

Yes, or the other way around, depends which is probably the oldest.

Best regards,
Krzysztof

#10 lore raw
Quoted 16 lines · Krzysztof Kozlowski
Quoted 15 lines · Rafał Miłecki
Quoted 15 lines
Quoted 9 lines

For example a year ago I added binding for BCMBCA SoC timer without actual driver, see e112f2de151b ("dt-bindings: timer: Add Broadcom's BCMBCA timers").

I'm not sure if we're going to agree on this, but personally I like describing hardware as much as I can. So it's well documented / understood and people may eventually write drivers for it. Maybe it's partially because I come from Broadcom's world that isn't well known for upstream efforts in general.

The problem is that "brcm,bcmbca-hs-uart" is not describing hardware. It is saying that all these devices have similar (compatible) programming model, so the OS can use just one compatible. This goes away from pure hardware description into interpretation.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Rob already commented on such non-SoC compatibles multiple times. I do not see any reason here to not use specific compatible as fallback.

Do I get it right we should rather have some base specific compatible
like: "brcm,bcm63138-hs-uart" and then if anything use fallback to it
like: "brcm,bcm4908-hs-uart", "brcm,bcm63138-hs-uart"; ?

Yes, or the other way around, depends which is probably the oldest.

Thank you for helping me on that!

maintainer
#11 lore raw

Hi,

Quoted 12 lines · Rafał Miłecki
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · Rafał Miłecki
Quoted 10 lines
Quoted 9 lines

For example a year ago I added binding for BCMBCA SoC timer without actual driver, see e112f2de151b ("dt-bindings: timer: Add Broadcom's BCMBCA timers").

I'm not sure if we're going to agree on this, but personally I like describing hardware as much as I can. So it's well documented / understood and people may eventually write drivers for it. Maybe it's partially because I come from Broadcom's world that isn't well known for upstream efforts in general.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

The problem is that "brcm,bcmbca-hs-uart" is not describing hardware. It is saying that all these devices have similar (compatible) programming model, so the OS can use just one compatible. This goes away from pure hardware description into interpretation.

It is the same hardware IP block used in bcmbca SoCs. To me, it perfectly describe the hardware IP block and it does not need fallback because there is no fallback. We did that for SPI controller although it has two revisions of that IP block so we have brcm,bcmbca-hsspi-v1.0 and 1.1

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Rob already commented on such non-SoC compatibles multiple times. I do not see any reason here to not use specific compatible as fallback.

Sorry I missed Rob's comments. If we have any new rule or notes about this, I would like to check it out.

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

Do I get it right we should rather have some base specific compatible
like: "brcm,bcm63138-hs-uart" and then if anything use fallback to it
like: "brcm,bcm4908-hs-uart", "brcm,bcm63138-hs-uart"; ?

Yes, or the other way around, depends which is probably the oldest.

If we absolutely can not use bcmbca-hs-uart, I would suggest to use bcm63xx-hs-uart to be more soc specific and in fact the oldest SoC have such IP is 63138.

Quoted 2 lines

Thank you for helping me on that!

#12 lore raw
Quoted 33 lines · William Zhang

Hi,

Quoted 12 lines · Rafał Miłecki
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · Rafał Miłecki
Quoted 10 lines
Quoted 9 lines

For example a year ago I added binding for BCMBCA SoC timer without actual driver, see e112f2de151b ("dt-bindings: timer: Add Broadcom's BCMBCA timers").

I'm not sure if we're going to agree on this, but personally I like describing hardware as much as I can. So it's well documented / understood and people may eventually write drivers for it. Maybe it's partially because I come from Broadcom's world that isn't well known for upstream efforts in general.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

The problem is that "brcm,bcmbca-hs-uart" is not describing hardware. It
is saying that all these devices have similar (compatible) programming model, so the OS can use just one compatible. This goes away from pure hardware description into interpretation.

It is the same hardware IP block used in bcmbca SoCs. To me, it perfectly describe the hardware IP block and it does not need fallback because there is no fallback. We did that for SPI controller although it has two revisions of that IP block so we have brcm,bcmbca-hsspi-v1.0 and 1.1

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Rob already commented on such non-SoC compatibles multiple times. I do not see any reason here to not use specific compatible as fallback.

Sorry I missed Rob's comments. If we have any new rule or notes about this, I would like to check it out.

Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

Do I get it right we should rather have some base specific compatible
like: "brcm,bcm63138-hs-uart" and then if anything use fallback to it
like: "brcm,bcm4908-hs-uart", "brcm,bcm63138-hs-uart"; ?

Yes, or the other way around, depends which is probably the oldest.

If we absolutely can not use bcmbca-hs-uart, I would suggest to use

We can, but I am surprised that you want without any driver. What's the point of generic compatible?

Quoted 1 line

bcm63xx-hs-uart to be more soc specific and in fact the oldest SoC have

What is xx? Wildcard? I mean... ehhh...

Best regards,
Krzysztof

#13 lore raw
Quoted 39 lines · Krzysztof Kozlowski
Quoted 38 lines · William Zhang

Hi,

Quoted 12 lines · Rafał Miłecki
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · Rafał Miłecki
Quoted 10 lines
Quoted 9 lines

For example a year ago I added binding for BCMBCA SoC timer without actual driver, see e112f2de151b ("dt-bindings: timer: Add Broadcom's BCMBCA timers").

I'm not sure if we're going to agree on this, but personally I like describing hardware as much as I can. So it's well documented / understood and people may eventually write drivers for it. Maybe it's partially because I come from Broadcom's world that isn't well known for upstream efforts in general.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

The problem is that "brcm,bcmbca-hs-uart" is not describing hardware. It
is saying that all these devices have similar (compatible) programming model, so the OS can use just one compatible. This goes away from pure hardware description into interpretation.

It is the same hardware IP block used in bcmbca SoCs. To me, it perfectly describe the hardware IP block and it does not need fallback because there is no fallback. We did that for SPI controller although it has two revisions of that IP block so we have brcm,bcmbca-hsspi-v1.0 and 1.1

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Rob already commented on such non-SoC compatibles multiple times. I do not see any reason here to not use specific compatible as fallback.

Sorry I missed Rob's comments. If we have any new rule or notes about this, I would like to check it out.

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

Do I get it right we should rather have some base specific compatible
like: "brcm,bcm63138-hs-uart" and then if anything use fallback to it
like: "brcm,bcm4908-hs-uart", "brcm,bcm63138-hs-uart"; ?

Yes, or the other way around, depends which is probably the oldest.

Quoted 8 lines
Quoted 1 line

If we absolutely can not use bcmbca-hs-uart, I would suggest to use

We can, but I am surprised that you want without any driver. What's the point of generic compatible?

Quoted 1 line

bcm63xx-hs-uart to be more soc specific and in fact the oldest SoC have

What is xx? Wildcard? I mean... ehhh...

OK, it's not worth my time. Neither Rafał's.

I can go to Embedded OSS every year and give the same speech every year and still people will on:
1. insist on generic fallback compatible,
2. wildcards
3. families

I will keep this email and use it to justify the same, third speech next year. Which won't be listened to, so I will go in 2025 fourth time. :)

Best regards,
Krzysztof

maintainer
#15 lore raw
In reply to Krzysztof Kozlowski
Quoted 63 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, November 22, 2023 10:46 AM
To: William Zhang <[email protected]>; Rafał Miłecki <[email protected]>; Florian Fainelli <[email protected]>; Anand Gore <[email protected]>; Kursad Oney <[email protected]>; Rob Herring <[email protected]>; Krzysztof Kozlowski <[email protected]>; Conor Dooley <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>; Jiri Slaby <[email protected]>; Andre Przywara <[email protected]>; Alexandre TORGUE <[email protected]>; Neil Armstrong <[email protected]>; [email protected]; [email protected]; [email protected]; bcm- [email protected]; Rafał Miłecki <[email protected]>
Subject: Re: [PATCH V2 1/2] dt-bindings: serial: add Broadcom's BCMBCA family High Speed UART

Quoted 6 lines · William Zhang

Hi,

Quoted 3 lines · Rafał Miłecki
Quoted 2 lines · Krzysztof Kozlowski
Quoted 1 line · Rafał Miłecki
Quoted 1 line
Quoted 1 line

For example a year ago I added binding for BCMBCA SoC timer

without

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

actual driver, see e112f2de151b ("dt-bindings: timer: Add

Broadcom's

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

BCMBCA timers").

I'm not sure if we're going to agree on this, but personally I like describing hardware as much as I can. So it's well documented / understood and people may eventually write drivers for it. Maybe

it's

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

partially because I come from Broadcom's world that isn't well

known

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

for upstream efforts in general.

The problem is that "brcm,bcmbca-hs-uart" is not describing hardware. It
is saying that all these devices have similar (compatible) programming
model, so the OS can use just one compatible. This goes away from

pure

Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

hardware description into interpretation.

It is the same hardware IP block used in bcmbca SoCs. To me, it perfectly describe the hardware IP block and it does not need fallback because there is no fallback. We did that for SPI controller although it has two revisions of that IP block so we have brcm,bcmbca-hsspi-v1.0 and 1.1

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Rob already commented on such non-SoC compatibles multiple times.

I do

Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line

not see any reason here to not use specific compatible as fallback.

Sorry I missed Rob's comments. If we have any new rule or notes about this, I would like to check it out.

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

Do I get it right we should rather have some base specific compatible
like: "brcm,bcm63138-hs-uart" and then if anything use fallback to it
like: "brcm,bcm4908-hs-uart", "brcm,bcm63138-hs-uart"; ?

Quoted 6 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line

Yes, or the other way around, depends which is probably the oldest.

If we absolutely can not use bcmbca-hs-uart, I would suggest to use

We can, but I am surprised that you want without any driver. What's the point of generic compatible?

I agree we should have the driver along with the dts. But it looks it depends on
the bandwidth of Rafal.

Quoted 4 lines
Quoted 1 line

bcm63xx-hs-uart to be more soc specific and in fact the oldest SoC have

What is xx? Wildcard? I mean... ehhh...

Bcm63 series of SoC (DSL broadband chip, part of the bcmbca family) and it is
the oldest chip for such IP. bcm63xx has been used in many ip block's
compatible
string for long time in the upstream kernel.

Quoted 2 lines

Best regards,
Krzysztof

maintainer
#14 lore raw
In reply to Krzysztof Kozlowski

Howdy,

Quoted 4 lines · Krzysztof Kozlowski
Quoted 2 lines

What is xx? Wildcard? I mean... ehhh...

OK, it's not worth my time. Neither Rafał's.

Let me start of that I do get your point, but I also get William's.

If you are going to use this email thread as proof that people should not use wildcards or families in compatible strings, this is very much worth everyone's time so we can actually detail better why that is an issue. So far it has been described as an inadequate description of the hardware which is somewhat fair, but subjective as well.

The point of the fallback is precisely to express that the various HW IP versions have a similar programming model and that unless specified otherwise by a more descriptive compatible string, the driver can make that assumption. This is entirely within the spirit of the DT spec:

"""
The compatible property value consists of one or more strings that define the specific programming model for the device. This list of strings should be used by a client program for device driver selection. The property value consists of a concatenated list of null terminated strings, from most specific to most general. They allow a device to express its compatibility with a family of similar devices, potentially allowing a single device driver to match against several devices
"""

we simply differ from the recommendation, which is a recommendation, meaning deviation is allowed, and even that is entirely subjective:

"""
The recommended format is "manufacturer,model", where manufacturer is a string describing the name of the manufacturer (such as a stock ticker symbol), and model specifies the model number. ""

that kind of fits in. I suppose that if we like to paint ourselves in a corner that allows us to simplify the logistics of maintaining our platforms' DTS and drivers without bending the specification we should be allowed to. How does that make your job as a DT maintainer any harder?

I do not disagree that identifying the oldest SoC that featured the specific block is best, but it may not always be that simple or that descriptive either.

There are a lot more properties and compatibles that are IMHO bending the Device Tree to describe how they *intend* to get the HW configured by the client program, and fall backs are really not amongst them IMHO.

Anyway.

Quoted 3 lines

Thanks.

Signature · 1 line
Florian
maintainer Applied
#2 lore raw

Re: [PATCH V2 2/2] ARM: dts: broadcom: Add BCM63138's high speed UART

In reply to Rafał Miłecki

From: Florian Fainelli <[email protected]>

Quoted 6 lines · Rafał Miłecki

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

It's designed for hardwiring Bluetooth devices to it.

---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! --
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel