dt-bindings: serial: Convert snps,dw-apb-uart to json-schema
Subsystems (2)
Rob Herring
maintainerPATCH v2 1/2 dt-bindings: serial: Convert snps,dw-apb-uart to json-schema
Convert the snps,dw-apb-uart binding to DT schema using json-schema.
The Rockchip and Broadcom compatible strings were not documented, so add them here.
---
v2:
- Move Renesas compatible strings to patch 2
.../bindings/serial/snps-dw-apb-uart.txt | 76 ---------- .../bindings/serial/snps-dw-apb-uart.yaml | 135 ++++++++++++++++++ 2 files changed, 135 insertions(+), 76 deletions(-) delete mode 100644 Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt create mode 100644 Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt deleted +0 -76
@@ -1,76 +0,0 @@ -* Synopsys DesignWare ABP UART - -Required properties: -- compatible : "snps,dw-apb-uart" -- reg : offset and length of the register set for the device. -- interrupts : should contain uart interrupt. - -Clock handling: -The clock rate of the input clock needs to be supplied by one of -- clock-frequency : the input clock frequency for the UART. -- clocks : phandle to the input clock - -The supplying peripheral clock can also be handled, needing a second property -- clock-names: tuple listing input clock names. - Required elements: "baudclk", "apb_pclk" - -Optional properties: -- snps,uart-16550-compatible : reflects the value of UART_16550_COMPATIBLE - configuration parameter. Define this if your UART does not implement the busy - functionality. -- resets : phandle to the parent reset controller. -- reg-shift : quantity to shift the register offsets by. If this property is - not present then the register offsets are not shifted. -- reg-io-width : the size (in bytes) of the IO accesses that should be - performed on the device. If this property is not present then single byte - accesses are used. -- dcd-override : Override the DCD modem status signal. This signal will always - be reported as active instead of being obtained from the modem status - register. Define this if your serial port does not use this pin. -- dsr-override : Override the DTS modem status signal. This signal will always - be reported as active instead of being obtained from the modem status - register. Define this if your serial port does not use this pin. -- cts-override : Override the CTS modem status signal. This signal will always - be reported as active instead of being obtained from the modem status - register. Define this if your serial port does not use this pin. -- ri-override : Override the RI modem status signal. This signal will always be - reported as inactive instead of being obtained from the modem status register. - Define this if your serial port does not use this pin. - -Example: - - uart@80230000 { - compatible = "snps,dw-apb-uart"; - reg = <0x80230000 0x100>; - clock-frequency = <3686400>; - interrupts = <10>; - reg-shift = <2>; - reg-io-width = <4>; - dcd-override; - dsr-override; - cts-override; - ri-override; - }; - -Example with one clock: - - uart@80230000 { - compatible = "snps,dw-apb-uart"; - reg = <0x80230000 0x100>; - clocks = <&baudclk>; - interrupts = <10>; - reg-shift = <2>; - reg-io-width = <4>; - }; - -Example with two clocks: - - uart@80230000 { - compatible = "snps,dw-apb-uart"; - reg = <0x80230000 0x100>; - clocks = <&baudclk>, <&apb_pclk>; - clock-names = "baudclk", "apb_pclk"; - interrupts = <10>; - reg-shift = <2>; - reg-io-width = <4>; - };
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml new file +135 -0
135 lines not on this page · raw message
Signature · 1 line
2.19.1
Rob Herring
maintainerPATCH v2 2/2 dt-bindings: serial: Move renesas,rzn1-uart into the snps-dw-apb-uart binding
The renesas,rzn1-uart binding only differs in compatible string from the snps-dw-apb-uart binding. Move it there, converting it to json-schema in the process.
---
v2:
- Move Renesas compatible strings to this patch
.../devicetree/bindings/serial/renesas,rzn1-uart.txt | 10 ---------- .../devicetree/bindings/serial/snps-dw-apb-uart.yaml | 5 +++++ 2 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 Documentation/devicetree/bindings/serial/renesas,rzn1-uart.txt
Documentation/devicetree/bindings/serial/renesas,rzn1-uart.txt deleted +0 -10
@@ -1,10 +0,0 @@ -Renesas RZ/N1 UART - -This controller is based on the Synopsys DesignWare ABP UART and inherits all -properties defined in snps-dw-apb-uart.txt except for the compatible property. - -Required properties: -- compatible : The device specific string followed by the generic RZ/N1 string. - Therefore it must be one of: - "renesas,r9a06g032-uart", "renesas,rzn1-uart" - "renesas,r9a06g033-uart", "renesas,rzn1-uart"
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +5 -0
@@ -15,6 +15,11 @@ allOf: properties: compatible: oneOf: + - items: + - enum: + - renesas,r9a06g032-uart + - renesas,r9a06g033-uart + - const: renesas,rzn1-uart - items: - enum: - rockchip,px30-uart
Signature · 1 line
2.19.1
Re: [PATCH v2 2/2] dt-bindings: serial: Move renesas,rzn1-uart into the snps-dw-apb-uart binding
Hi Rob,
Quoted 14 lines · Rob Herring
The renesas,rzn1-uart binding only differs in compatible string from the snps-dw-apb-uart binding. Move it there, converting it to json-schema in the process.
Cc Phil Edworthy <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Reviewed-by Simon Horman <[email protected]>Signed-off-by Rob Herring <[email protected]>Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +0
-0@@ -15,6 +15,11 @@ allOf: properties:
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml allOf: · line 25
Quoted 10 lines
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +5
-0compatible: oneOf: + - items: + - enum: + - renesas,r9a06g032-uart + - renesas,r9a06g033-uart + - const: renesas,rzn1-uart - items: - enum: - rockchip,px30-uart
With ARCH=arm and shmobile_defconfig, "make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml" complains:
arch/arm/boot/dts/r9a06g032-rzn1d400-db.dt.yaml: compatible:
['renesas,r9a06g032-uart', 'renesas,rzn1-uart', 'snps,dw-apb-uart'] is not valid under any of the given schemas arch/arm/boot/dts/r9a06g032-rzn1d400-db.dt.yaml: compatible:
['renesas,r9a06g032-uart', 'renesas,rzn1-uart', 'snps,dw-apb-uart'] is not valid under any of the given schemas arch/arm/boot/dts/r9a06g032-rzn1d400-db.dt.yaml: compatible:
['renesas,r9a06g032-uart', 'renesas,rzn1-uart', 'snps,dw-apb-uart'] is not valid under any of the given schemas
Do you know what's wrong?
Thanks!
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Rob Herring
maintainerRe: [PATCH v2 2/2] dt-bindings: serial: Move renesas,rzn1-uart into the snps-dw-apb-uart binding
Quoted 43 lines · Geert Uytterhoeven
Hi Rob,
Quoted 14 lines · Rob Herring
The renesas,rzn1-uart binding only differs in compatible string from the snps-dw-apb-uart binding. Move it there, converting it to json-schema in the process.
Cc Phil Edworthy <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Reviewed-by Simon Horman <[email protected]>Signed-off-by Rob Herring <[email protected]>Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +0
-0@@ -15,6 +15,11 @@ allOf: properties:Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml allOf: · line 25
Quoted 10 lines
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +5
-0compatible: oneOf: + - items: + - enum: + - renesas,r9a06g032-uart + - renesas,r9a06g033-uart + - const: renesas,rzn1-uart - items: - enum: - rockchip,px30-uartWith ARCH=arm and
shmobile_defconfig, "makedtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml" complains:
arch/arm/boot/dts/r9a06g032-rzn1d400-db.dt.yaml: compatible:
['renesas,r9a06g032-uart', 'renesas,rzn1-uart', 'snps,dw-apb-uart'] is not valid under any of the given schemasarch/arm/boot/dts/r9a06g032-rzn1d400-db.dt.yaml: compatible:
['renesas,r9a06g032-uart', 'renesas,rzn1-uart', 'snps,dw-apb-uart'] is not valid under any of the given schemasarch/arm/boot/dts/r9a06g032-rzn1d400-db.dt.yaml: compatible:
['renesas,r9a06g032-uart', 'renesas,rzn1-uart', 'snps,dw-apb-uart'] is not valid under any of the given schemas
Quoted 1 line
Do you know what's wrong?
The addition doesn't allow for "snps,dw-apb-uart". Guess I relied on the binding doc being accurate. So we need to either drop it from dts files if the generic compatible is never useful (maybe simple cases like earlycon?) or add it here.
Rob