irq-names dt-bindings: serial: Convert marvell,armada-3700-uart to DT schema
Rob Herring (Arm)
maintainerPATCH 1/1 irq-names dt-bindings: serial: Convert marvell,armada-3700-uart to DT schema
Convert the Marvell Armada-3700 UART binding to DT schema. It is a straight-forward conversion.
Drop the long deprecated single interrupt support.
--- .../serial/marvell,armada-3700-uart.yaml | 102 ++++++++++++++++++ .../devicetree/bindings/serial/mvebu-uart.txt | 56 ---------- MAINTAINERS | 2 +- 3 files changed, 103 insertions(+), 57 deletions(-) create mode 100644 Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml delete mode 100644 Documentation/devicetree/bindings/serial/mvebu-uart.txt
Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml new file +102 -0
@@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/marvell,armada-3700-uart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Armada-3700 UART + +maintainers: + - Pali Rohár <[email protected]> + +description: + Marvell UART is a non standard UART used in some of Marvell EBU SoCs (e.g. + Armada-3700). + +properties: + compatible: + enum: + - marvell,armada-3700-uart + - marvell,armada-3700-uart-ext + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: + UART reference clock used to derive the baud rate. If absent, only fixed + baud rate from the bootloader is supported. + + interrupts: + minItems: 2 + items: + - description: UART sum interrupt (deprecated single-element form) + - description: UART TX interrupt + - description: UART RX interrupt + + interrupt-names: + minItems: 2 + maxItems: 3 + +required: + - compatible + - reg + - interrupts + - interrupt-names + +unevaluatedProperties: false + +allOf: + - $ref: /schemas/serial.yaml# + - if: + properties: + compatible: + const: marvell,armada-3700-uart-ext + then: + properties: + interrupts: + maxItems: 2 + + interrupt-names: + items: + - const: uart-tx + - const: uart-rx + else: + properties: + interrupts: + minItems: 3 + + interrupt-names: + items: + - const: uart-sum + - const: uart-tx + - const: uart-rx + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + serial@12000 { + compatible = "marvell,armada-3700-uart"; + reg = <0x12000 0x18>; + clocks = <&uartclk 0>; + interrupts = + <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "uart-sum", "uart-tx", "uart-rx"; + }; + + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + serial@12200 { + compatible = "marvell,armada-3700-uart-ext"; + reg = <0x12200 0x30>; + clocks = <&uartclk 1>; + interrupts = + <GIC_SPI 30 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 31 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "uart-tx", "uart-rx"; + };
Documentation/devicetree/bindings/serial/mvebu-uart.txt deleted +0 -56
56 lines not on this page · raw message
MAINTAINERS +1 -1
@@ -14254,7 +14254,7 @@ MARVELL ARMADA 3700 SERIAL DRIVER M: Pali Rohár <[email protected]> S: Maintained F: Documentation/devicetree/bindings/clock/marvell,armada-3700-uart-clock.yaml -F: Documentation/devicetree/bindings/serial/mvebu-uart.txt +F: Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml F: drivers/tty/serial/mvebu-uart.c MARVELL ARMADA DRM SUPPORT
Signature · 1 line
2.47.2
Pali Rohár
maintainerQuoted 46 lines · On Tuesday 06 May 2025 17:00:41 Rob Herring (Arm) wrote:
Convert the Marvell Armada-3700 UART binding to DT schema. It is a straight-forward conversion.
Drop the long deprecated single interrupt support.
Signed-off-by Rob Herring (Arm) <[email protected]>--- .../serial/marvell,armada-3700-uart.yaml | 102 ++++++++++++++++++ .../devicetree/bindings/serial/mvebu-uart.txt | 56 ---------- MAINTAINERS | 2 +- 3 files changed, 103 insertions(+), 57 deletions(-) create mode 100644 Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml delete mode 100644 Documentation/devicetree/bindings/serial/mvebu-uart.txtDocumentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml new file +26
-0@@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/marvell,armada-3700-uart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Armada-3700 UART + +maintainers: + - Pali Rohár <[email protected]> + +description: + Marvell UART is a non standard UART used in some of Marvell EBU SoCs (e.g. + Armada-3700). + +properties: + compatible: + enum: + - marvell,armada-3700-uart + - marvell,armada-3700-uart-ext + + reg: + maxItems: 1 + + clocks: + maxItems: 1
Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml line 36
Quoted 10 lines
Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml new file +10
-0+ description: + UART reference clock used to derive the baud rate. If absent, only fixed + baud rate from the bootloader is supported. + + interrupts: + minItems: 2 + items: + - description: UART sum interrupt (deprecated single-element form) + - description: UART TX interrupt + - description: UART RX interrupt
I think that this is wrong description and does not match the old txt description:
- Must contain three elements for the standard variant of the IP (marvell,armada-3700-uart): "uart-sum", "uart-tx" and "uart-rx",
- Must contain two elements for the extended variant of the IP (marvell,armada-3700-uart-ext): "uart-tx" and "uart-rx",
"UART sum interrupt" is not deprecated, it must be present for the marvell,armada-3700-uart.
Quoted 144 lines
Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml new file +66
-0+ + interrupt-names: + minItems: 2 + maxItems: 3 + +required: + - compatible + - reg + - interrupts + - interrupt-names + +unevaluatedProperties: false + +allOf: + - $ref: /schemas/serial.yaml# + - if: + properties: + compatible: + const: marvell,armada-3700-uart-ext + then: + properties: + interrupts: + maxItems: 2 + + interrupt-names: + items: + - const: uart-tx + - const: uart-rx + else: + properties: + interrupts: + minItems: 3 + + interrupt-names: + items: + - const: uart-sum + - const: uart-tx + - const: uart-rx + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + serial@12000 { + compatible = "marvell,armada-3700-uart"; + reg = <0x12000 0x18>; + clocks = <&uartclk 0>; + interrupts = + <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "uart-sum", "uart-tx", "uart-rx"; + }; + + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + serial@12200 { + compatible = "marvell,armada-3700-uart-ext"; + reg = <0x12200 0x30>; + clocks = <&uartclk 1>; + interrupts = + <GIC_SPI 30 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 31 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "uart-tx", "uart-rx"; + };Documentation/devicetree/bindings/serial/mvebu-uart.txt deleted +0
-56@@ -1,56 +0,0 @@ -* Marvell UART : Non standard UART used in some of Marvell EBU SoCs - e.g., Armada-3700. - -Required properties: -- compatible: - - "marvell,armada-3700-uart" for the standard variant of the UART - (32 bytes FIFO, no DMA, level interrupts, 8-bit access to the - FIFO), called also UART1. - - "marvell,armada-3700-uart-ext" for the extended variant of the - UART (128 bytes FIFO, DMA, front interrupts, 8-bit or 32-bit - accesses to the FIFO), called also UART2. -- reg: offset and length of the register set for the device. -- clocks: UART reference clock used to derive the baudrate. If no clock - is provided (possible only with the "marvell,armada-3700-uart" - compatible string for backward compatibility), it will only work - if the baudrate was initialized by the bootloader and no baudrate - change will then be possible. When provided it should be UART1-clk - for standard variant of UART and UART2-clk for extended variant - of UART. TBG clock (with UART TBG divisors d1=d2=1) or xtal clock - should not be used and are supported only for backward compatibility. -- interrupts: - - Must contain three elements for the standard variant of the IP - (marvell,armada-3700-uart): "uart-sum", "uart-tx" and "uart-rx", - respectively the UART sum interrupt, the UART TX interrupt and - UART RX interrupt. A corresponding interrupt-names property must - be defined. - - Must contain two elements for the extended variant of the IP - (marvell,armada-3700-uart-ext): "uart-tx" and "uart-rx", - respectively the UART TX interrupt and the UART RX interrupt. A - corresponding interrupt-names property must be defined. - - For backward compatibility reasons, a single element interrupts - property is also supported for the standard variant of the IP, - containing only the UART sum interrupt. This form is deprecated - and should no longer be used. - -Example: - uart0: serial@12000 { - compatible = "marvell,armada-3700-uart"; - reg = <0x12000 0x18>; - clocks = <&uartclk 0>; - interrupts = - <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "uart-sum", "uart-tx", "uart-rx"; - }; - - uart1: serial@12200 { - compatible = "marvell,armada-3700-uart-ext"; - reg = <0x12200 0x30>; - clocks = <&uartclk 1>; - interrupts = - <GIC_SPI 30 IRQ_TYPE_EDGE_RISING>, - <GIC_SPI 31 IRQ_TYPE_EDGE_RISING>; - interrupt-names = "uart-tx", "uart-rx"; - };MAINTAINERS +1
-1@@ -14254,7 +14254,7 @@ MARVELL ARMADA 3700 SERIAL DRIVER M: Pali Rohár <[email protected]> S: Maintained F: Documentation/devicetree/bindings/clock/marvell,armada-3700-uart-clock.yaml -F: Documentation/devicetree/bindings/serial/mvebu-uart.txt +F: Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml F: drivers/tty/serial/mvebu-uart.c MARVELL ARMADA DRM SUPPORTSignature · 1 line
2.47.2
Rob Herring
maintainerQuoted 53 lines · Pali Rohár
Quoted 51 lines · On Tuesday 06 May 2025 17:00:41 Rob Herring (Arm) wrote:
Convert the Marvell Armada-3700 UART binding to DT schema. It is a straight-forward conversion.
Drop the long deprecated single interrupt support.
Signed-off-by Rob Herring (Arm) <[email protected]>--- .../serial/marvell,armada-3700-uart.yaml | 102 ++++++++++++++++++ .../devicetree/bindings/serial/mvebu-uart.txt | 56 ---------- MAINTAINERS | 2 +- 3 files changed, 103 insertions(+), 57 deletions(-) create mode 100644 Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml delete mode 100644 Documentation/devicetree/bindings/serial/mvebu-uart.txtDocumentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml new file +31
-0@@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/marvell,armada-3700-uart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Armada-3700 UART + +maintainers: + - Pali Rohár <[email protected]> + +description: + Marvell UART is a non standard UART used in some of Marvell EBU SoCs (e.g. + Armada-3700). + +properties: + compatible: + enum: + - marvell,armada-3700-uart + - marvell,armada-3700-uart-ext + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: + UART reference clock used to derive the baud rate. If absent, only fixed + baud rate from the bootloader is supported. + + interrupts:
Quoted 8 lines
Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml line 36
Quoted 5 lines
Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml new file +5
-0+ minItems: 2 + items: + - description: UART sum interrupt (deprecated single-element form) + - description: UART TX interrupt + - description: UART RX interruptI think that this is wrong description and does not match the old txt description:
It's correct that a single irq entry is deprecated, but I did say I dropped that. So "(deprecated single-element form)" should be dropped here.
Quoted 5 lines
- Must contain three elements for the standard variant of the IP (marvell,armada-3700-uart): "uart-sum", "uart-tx" and "uart-rx",
- Must contain two elements for the extended variant of the IP (marvell,armada-3700-uart-ext): "uart-tx" and "uart-rx",
Note that the descriptions don't really match this either. Expressing it correctly makes the schema worse (using a oneOf) and doesn't improve validation. We have interrupt-names correct, so I think it is fine.
Really, no one has cared for 6 years about this binding and converting it, so I'm not going to spend a lot of time worrying about descriptions. There's a 1000 more to do.
Rob
Pali Rohár
maintainerQuoted 78 lines · On Tuesday 06 May 2025 17:45:06 Rob Herring wrote:
Quoted 53 lines · Pali Rohár
Quoted 51 lines · On Tuesday 06 May 2025 17:00:41 Rob Herring (Arm) wrote:
Convert the Marvell Armada-3700 UART binding to DT schema. It is a straight-forward conversion.
Drop the long deprecated single interrupt support.
Signed-off-by Rob Herring (Arm) <[email protected]>--- .../serial/marvell,armada-3700-uart.yaml | 102 ++++++++++++++++++ .../devicetree/bindings/serial/mvebu-uart.txt | 56 ---------- MAINTAINERS | 2 +- 3 files changed, 103 insertions(+), 57 deletions(-) create mode 100644 Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml delete mode 100644 Documentation/devicetree/bindings/serial/mvebu-uart.txtDocumentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml new file +31
-0@@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/marvell,armada-3700-uart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Armada-3700 UART + +maintainers: + - Pali Rohár <[email protected]> + +description: + Marvell UART is a non standard UART used in some of Marvell EBU SoCs (e.g. + Armada-3700). + +properties: + compatible: + enum: + - marvell,armada-3700-uart + - marvell,armada-3700-uart-ext + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: + UART reference clock used to derive the baud rate. If absent, only fixed + baud rate from the bootloader is supported. + + interrupts:Quoted 8 lines
Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml line 36
Quoted 5 lines
Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml new file +5
-0+ minItems: 2 + items: + - description: UART sum interrupt (deprecated single-element form) + - description: UART TX interrupt + - description: UART RX interruptI think that this is wrong description and does not match the old txt description:
It's correct that a single irq entry is deprecated, but I did say I dropped that. So "(deprecated single-element form)" should be dropped here.
Quoted 5 lines
- Must contain three elements for the standard variant of the IP (marvell,armada-3700-uart): "uart-sum", "uart-tx" and "uart-rx",
- Must contain two elements for the extended variant of the IP (marvell,armada-3700-uart-ext): "uart-tx" and "uart-rx",
Note that the descriptions don't really match this either. Expressing it correctly makes the schema worse (using a oneOf) and doesn't improve validation. We have interrupt-names correct, so I think it is fine.
Quoted 5 lines
Really, no one has cared for 6 years about this binding and converting it, so I'm not going to spend a lot of time worrying about descriptions. There's a 1000 more to do.
Rob
Sorry, but when I sent you some DT yaml changes, you have not responded for a year, even after periodic reminder. After this experience I have no reason to spend any more time on DT yaml as it makes no sense for me to work in my spare time on something which will ends in the trash.
Rob Herring
maintainerQuoted 84 lines · Pali Rohár
Quoted 82 lines · On Tuesday 06 May 2025 17:45:06 Rob Herring wrote:
Quoted 53 lines · Pali Rohár
Quoted 51 lines · On Tuesday 06 May 2025 17:00:41 Rob Herring (Arm) wrote:
Convert the Marvell Armada-3700 UART binding to DT schema. It is a straight-forward conversion.
Drop the long deprecated single interrupt support.
Signed-off-by Rob Herring (Arm) <[email protected]>--- .../serial/marvell,armada-3700-uart.yaml | 102 ++++++++++++++++++ .../devicetree/bindings/serial/mvebu-uart.txt | 56 ---------- MAINTAINERS | 2 +- 3 files changed, 103 insertions(+), 57 deletions(-) create mode 100644 Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml delete mode 100644 Documentation/devicetree/bindings/serial/mvebu-uart.txtDocumentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml new file +31
-0@@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/marvell,armada-3700-uart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Armada-3700 UART + +maintainers: + - Pali Rohár <[email protected]> + +description: + Marvell UART is a non standard UART used in some of Marvell EBU SoCs (e.g. + Armada-3700). + +properties: + compatible: + enum: + - marvell,armada-3700-uart + - marvell,armada-3700-uart-ext + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: + UART reference clock used to derive the baud rate. If absent, only fixed + baud rate from the bootloader is supported. + + interrupts:Quoted 8 lines
Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml line 36
Quoted 5 lines
Documentation/devicetree/bindings/serial/marvell,armada-3700-uart.yaml new file +5
-0+ minItems: 2 + items: + - description: UART sum interrupt (deprecated single-element form) + - description: UART TX interrupt + - description: UART RX interruptI think that this is wrong description and does not match the old txt description:
It's correct that a single irq entry is deprecated, but I did say I dropped that. So "(deprecated single-element form)" should be dropped here.
Quoted 5 lines
- Must contain three elements for the standard variant of the IP (marvell,armada-3700-uart): "uart-sum", "uart-tx" and "uart-rx",
- Must contain two elements for the extended variant of the IP (marvell,armada-3700-uart-ext): "uart-tx" and "uart-rx",
Note that the descriptions don't really match this either. Expressing it correctly makes the schema worse (using a oneOf) and doesn't improve validation. We have interrupt-names correct, so I think it is fine.
Really, no one has cared for 6 years about this binding and converting it, so I'm not going to spend a lot of time worrying about descriptions. There's a 1000 more to do.
Quoted 6 lines
Quoted 1 line
Rob
Sorry, but when I sent you some DT yaml changes, you have not responded for a year, even after periodic reminder. After this experience I have no reason to spend any more time on DT yaml as it makes no sense for me to work in my spare time on something which will ends in the trash.
If you send patches to the DT list, I pretty much guarantee I (or another maintainer) have responded. You can check the status in PW[0]. If I've already acked/reviewed or they failed automated testing, then generally I don't look at them again (because someone else is going to apply them). Sorry, but that's all I can guarantee I'll get to with the firehose of binding patches. As we speak, I've got 200 patches in my queue. I don't see anything in lore[1] where I didn't respond under those conditions.
Rob
[0] https://patchwork.ozlabs.org/project/devicetree-bindings/list/
[1] https://lore.kernel.org/all/?q=f%3Apali%40kernel.org+s%3Adt-bindings