Skip to contentSkip to conversation

dt-bindings: serial: Move rs485.yaml reference to serial.yaml

PATCH New Kryštof Černý 2 participants 2 messages Dec 1

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

PATCH v2 1/1 dt-bindings: serial: Move rs485.yaml reference to serial.yaml

RS-485 support is not specific to a particular UART. The rs485.yaml properties describe the transceiver attached to the UART and how it is wired, so a UART binding should not need to opt in to them, whether its driver supports RS-485 or not.

Reference rs485.yaml from serial.yaml and drop the now redundant references from the bindings that included it next to serial.yaml. UART bindings that reference only serial.yaml, such as arm,pl011, now accept the RS-485 properties; dtbs_check rejected linux,rs485-enabled-at-boot-time on the PL011 UARTs of a BCM2711 board used for RS-485.

---
dtbs_check rejects RS-485 properties such as linux,rs485-enabled-at-boot-time on PL011 UARTs, although the driver supports RS-485. As Rob suggested on v1, the properties are not specific to a UART, so reference rs485.yaml from serial.yaml instead of from the individual bindings. Thanks for the suggestion.

An AI assistant (Claude) helped write the commit message and this
cover letter, following the commit-message, find-fixes and stable-tag skills from Sasha Levin's agents branch
(git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux.git agents, d8d07dd58c62).
---
Changes in v2:
- Reference rs485.yaml from serial.yaml instead of pl011.yaml and drop the now redundant references from the other serial bindings (Rob)
- v1 subject was "dt-bindings: serial: pl011: Reference rs485.yaml"
- Drop the Fixes tag
- Link to v1: https://patch.msgid.link/[email protected]

---
 Documentation/devicetree/bindings/serial/8250_omap.yaml        | 1 -
 Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml | 1 -
 Documentation/devicetree/bindings/serial/cdns,uart.yaml        | 1 -
 Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml     | 1 -
 Documentation/devicetree/bindings/serial/fsl-lpuart.yaml       | 1 -
 Documentation/devicetree/bindings/serial/maxim,max310x.yaml    | 2 --
 Documentation/devicetree/bindings/serial/nxp,sc16is7xx.yaml    | 1 -
 Documentation/devicetree/bindings/serial/serial.yaml           | 2 ++
 Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 -
 Documentation/devicetree/bindings/serial/st,stm32-uart.yaml    | 1 -
 10 files changed, 2 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/serial/8250_omap.yaml +0 -1
index aabacca2b2fa6..b3c1596873349 100644
@@ -11,7 +11,6 @@ maintainers:
 
 allOf:
   - $ref: /schemas/serial/serial.yaml#
-  - $ref: /schemas/serial/rs485.yaml#
 
 properties:
   compatible:
Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml +0 -1
index 375cd50bc5cca..efc9cfc586ae0 100644
@@ -127,7 +127,6 @@ allOf:
     else:
       allOf:
         - $ref: /schemas/serial/serial.yaml#
-        - $ref: /schemas/serial/rs485.yaml#
 
 unevaluatedProperties: false
 
Documentation/devicetree/bindings/serial/cdns,uart.yaml +0 -1
index 11292de42c67b..3c90c71fdb26f 100644
@@ -60,7 +60,6 @@ required:
 
 allOf:
   - $ref: serial.yaml#
-  - $ref: rs485.yaml#
   - if:
       properties:
         compatible:
Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml +0 -1
index 9c6dc16f88a6f..3d66fd55f645a 100644
@@ -112,7 +112,6 @@ required:
 
 allOf:
   - $ref: serial.yaml#
-  - $ref: rs485.yaml#
 
   - if:
       properties:
Documentation/devicetree/bindings/serial/fsl-lpuart.yaml +0 -1
index c42261b5a80a8..6e1cd91ddd015 100644
@@ -10,7 +10,6 @@ maintainers:
   - Fugang Duan <[email protected]>
 
 allOf:
-  - $ref: rs485.yaml#
   - $ref: serial.yaml#
 
 properties:
Documentation/devicetree/bindings/serial/maxim,max310x.yaml +0 -2
index e598dda4d13f5..efa7127c6e73b 100644
@@ -67,7 +67,6 @@ allOf:
     then:
       allOf:
         - $ref: /schemas/serial/serial.yaml#
-        - $ref: /schemas/serial/rs485.yaml#
 
   - if:
       properties:
@@ -88,7 +87,6 @@ allOf:
           description: A single UART channel of the chip.
           allOf:
             - $ref: /schemas/serial/serial.yaml#
-            - $ref: /schemas/serial/rs485.yaml#
           properties:
             reg:
               description: UART channel number on the chip.
Documentation/devicetree/bindings/serial/nxp,sc16is7xx.yaml +0 -1
index ab39b95dae402..880f7adefd1aa 100644
@@ -82,7 +82,6 @@ required:
 allOf:
   - $ref: /schemas/spi/spi-peripheral-props.yaml#
   - $ref: /schemas/serial/serial.yaml#
-  - $ref: /schemas/serial/rs485.yaml#
 
 oneOf:
   - required:
Documentation/devicetree/bindings/serial/serial.yaml +2 -0
index 96eb1de8771e9..ca62b3a606ed3 100644
@@ -19,6 +19,8 @@ description:
   where N is the port number (non-negative decimal integer) as printed on the
   label next to the physical port.
 
+$ref: rs485.yaml#
+
 properties:
   $nodename:
     pattern: "^serial(@.*)?$"
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +0 -1
index e2ca126d58ba8..f669262f81521 100644
@@ -11,7 +11,6 @@ maintainers:
 
 allOf:
   - $ref: serial.yaml#
-  - $ref: rs485.yaml#
 
   - if:
       properties:
Documentation/devicetree/bindings/serial/st,stm32-uart.yaml +0 -1
index 2ed526139269c..6f5598d139c77 100644
@@ -78,7 +78,6 @@ properties:
     maxItems: 2
 
 allOf:
-  - $ref: rs485.yaml#
   - $ref: serial.yaml#
   - if:
       required:

---
base-commit: 909ef7a9a30fa139e69e555e3606680f5cca7726
change-id: 20261121-pl011-rs485-6e5113a8faad

Best regards,

Signature · 1 line
Kryštof Černý <[email protected]>
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 7 lines

From: Kryštof Černý <[email protected]>

RS-485 support is not specific to a particular UART. The rs485.yaml properties describe the transceiver attached to the UART and how it is wired, so a UART binding should not need to opt in to them, whether its driver supports RS-485 or not.

Quoted 8 lines

Reference rs485.yaml from serial.yaml and drop the now redundant references from the bindings that included it next to serial.yaml. UART bindings that reference only serial.yaml, such as arm,pl011, now accept the RS-485 properties; dtbs_check rejected linux,rs485-enabled-at-boot-time on the PL011 UARTs of a BCM2711 board used for RS-485.

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1