From 9da89fe1b9ffb00dd961a809240f47452402ed2b Mon Sep 17 00:00:00 2001 From: André Draszik Date: Thu, 25 Jul 2024 08:05:58 +0100 Subject: dt-bindings: serial: samsung: avoid duplicating permitted clock-names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This binding currently duplicates the permitted clock-names in various places, and when adding more compatibles, clock-names will have to be duplicated even more. The reason is: 1) subschemas (-if: ...), still have to match the top-level: pattern: '^clk_uart_baud[0-3]$' 2) there is one compatible that doesn't follow sequential numbering for the clock names (samsung,s3c6400-uart) 3) when limiting the number of clock-names, we also want to enforce sequential names Because of 1) and 2), the patterns can not simply be changed to constant strings, and later overridden in a different subschema (for samsung,s3c6400-uart only). Since we can't populate the top-level clock-names based on the compatible, and because when limiting the number of items we generally want sequential numbers and not a pattern, move the permitted strings into a subschema of its own and populate it based on the compatible: * 'uart clk_uart_baud2 clk_uart_baud3' for the one outlier * 'uart clk_uart_baud0..3' for everything else This way we can avoid having to duplicate the permitted names everywhere. While at it, add blank lines as per the universal style, which is to have blank lines between properties, except where they are booleans. Also add another example using a compatible that uses the default clock-names scheme, as opposed to the existing example that uses samsung,s3c6400-uart's non-default clock-names. This allows testing both versions of the clock-names property when running dt_binding_check. Reviewed-by: Rob Herring (Arm) Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20240725-gs101-uart-binding-v5-1-e237be8253a9@linaro.org Signed-off-by: Greg Kroah-Hartman --- .../devicetree/bindings/serial/samsung_uart.yaml | 64 +++++++++++++++++----- 1 file changed, 50 insertions(+), 14 deletions(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml index 0f0131026911..0075712e7be8 100644 --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml @@ -56,14 +56,8 @@ properties: maxItems: 5 clock-names: - description: N = 0 is allowed for SoCs without internal baud clock mux. minItems: 2 - items: - - const: uart - - pattern: '^clk_uart_baud[0-3]$' - - pattern: '^clk_uart_baud[0-3]$' - - pattern: '^clk_uart_baud[0-3]$' - - pattern: '^clk_uart_baud[0-3]$' + maxItems: 5 dmas: items: @@ -103,18 +97,45 @@ allOf: compatible: contains: enum: - - samsung,s5pv210-uart + - samsung,s3c6400-uart then: properties: clocks: - minItems: 2 + minItems: 3 maxItems: 3 + + clock-names: + items: + - const: uart + - const: clk_uart_baud2 + - const: clk_uart_baud3 + + else: + properties: clock-names: minItems: 2 items: - const: uart - - pattern: '^clk_uart_baud[0-1]$' - - pattern: '^clk_uart_baud[0-1]$' + - const: clk_uart_baud0 + - const: clk_uart_baud1 + - const: clk_uart_baud2 + - const: clk_uart_baud3 + + - if: + properties: + compatible: + contains: + enum: + - samsung,s5pv210-uart + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + + clock-names: + minItems: 3 + maxItems: 3 - if: properties: @@ -129,10 +150,9 @@ allOf: properties: clocks: maxItems: 2 + clock-names: - items: - - const: uart - - const: clk_uart_baud0 + maxItems: 2 - if: properties: @@ -163,3 +183,19 @@ examples: <&clocks SCLK_UART>; samsung,uart-fifosize = <16>; }; + - | + #include + #include + #include + + serial_0: serial@10a00000 { + compatible = "google,gs101-uart"; + reg = <0x10a00000 0xc0>; + clocks = <&cmu_peric0 CLK_GOUT_PERIC0_PERIC0_TOP1_PCLK_0>, + <&cmu_peric0 CLK_GOUT_PERIC0_PERIC0_TOP1_IPCLK_0>; + clock-names = "uart", "clk_uart_baud0"; + interrupts = ; + pinctrl-0 = <&uart0_bus>; + pinctrl-names = "default"; + samsung,uart-fifosize = <256>; + }; -- cgit v1.2.3 From 7b09299c8764f612a46ef34b1e8022b0473ad766 Mon Sep 17 00:00:00 2001 From: André Draszik Date: Thu, 25 Jul 2024 08:05:59 +0100 Subject: dt-bindings: serial: samsung: fix maxItems for gs101 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While gs101 needs exactly two clocks for the UART, the schema doesn't currently limit the maximum number to this and instead the default of five from this schema is applied. Update the schema accordingly. Reviewed-by: Rob Herring (Arm) Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20240725-gs101-uart-binding-v5-2-e237be8253a9@linaro.org Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/serial/samsung_uart.yaml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml index 0075712e7be8..788c80e47831 100644 --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml @@ -166,6 +166,12 @@ allOf: properties: reg-io-width: false + clocks: + maxItems: 2 + + clock-names: + maxItems: 2 + unevaluatedProperties: false examples: -- cgit v1.2.3 From 6683da78c5435e225f0277eb5ab68e12389ae942 Mon Sep 17 00:00:00 2001 From: Rafał Miłecki Date: Sat, 27 Jul 2024 14:14:46 +0200 Subject: dt-bindings: serial: mediatek,uart: add MT7981 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add compatible string for serial on MT7981 SoC. Signed-off-by: Rafał Miłecki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240727121447.1016-1-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/serial/mediatek,uart.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/mediatek,uart.yaml b/Documentation/devicetree/bindings/serial/mediatek,uart.yaml index ff61ffdcad1d..1b02f0b197ff 100644 --- a/Documentation/devicetree/bindings/serial/mediatek,uart.yaml +++ b/Documentation/devicetree/bindings/serial/mediatek,uart.yaml @@ -36,6 +36,7 @@ properties: - mediatek,mt7622-uart - mediatek,mt7623-uart - mediatek,mt7629-uart + - mediatek,mt7981-uart - mediatek,mt7986-uart - mediatek,mt7988-uart - mediatek,mt8127-uart -- cgit v1.2.3 From 755ed2f3030450ee6f5c8d3a4c35345c16376771 Mon Sep 17 00:00:00 2001 From: Varshini Rajendran Date: Mon, 29 Jul 2024 12:36:36 +0530 Subject: dt-bindings: serial: atmel,at91-usart: add compatible for sam9x7. Add sam9x7 compatible to DT bindings documentation. Signed-off-by: Varshini Rajendran Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240729070636.1990368-1-varshini.rajendran@microchip.com Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml b/Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml index eb2992a447d7..f466c38518c4 100644 --- a/Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml +++ b/Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml @@ -23,13 +23,20 @@ properties: - const: atmel,at91sam9260-dbgu - const: atmel,at91sam9260-usart - items: - - const: microchip,sam9x60-usart + - enum: + - microchip,sam9x60-usart + - microchip,sam9x7-usart - const: atmel,at91sam9260-usart - items: - const: microchip,sam9x60-dbgu - const: microchip,sam9x60-usart - const: atmel,at91sam9260-dbgu - const: atmel,at91sam9260-usart + - items: + - const: microchip,sam9x7-dbgu + - const: atmel,at91sam9260-dbgu + - const: microchip,sam9x7-usart + - const: atmel,at91sam9260-usart reg: maxItems: 1 -- cgit v1.2.3 From 2108aa2a01d850f850ed6ccea4e447100df9ee82 Mon Sep 17 00:00:00 2001 From: Oliver Rhodes Date: Thu, 25 Jul 2024 11:05:33 +0100 Subject: dt-bindings: serial: renesas: Document RZ/G2M v3.0 (r8a774a3) scif Document scif bindings for the Renesas RZ/G2M v3.0 (a.k.a r8a774a3) SoC. Signed-off-by: Oliver Rhodes Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240725100534.5374-6-oliver.rhodes.aj@renesas.com Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/serial/renesas,scif.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/renesas,scif.yaml b/Documentation/devicetree/bindings/serial/renesas,scif.yaml index afc7c05898a1..51d9fb0f4763 100644 --- a/Documentation/devicetree/bindings/serial/renesas,scif.yaml +++ b/Documentation/devicetree/bindings/serial/renesas,scif.yaml @@ -46,6 +46,7 @@ properties: - items: - enum: - renesas,scif-r8a774a1 # RZ/G2M + - renesas,scif-r8a774a3 # RZ/G2M v3.0 - renesas,scif-r8a774b1 # RZ/G2N - renesas,scif-r8a774c0 # RZ/G2E - renesas,scif-r8a774e1 # RZ/G2H -- cgit v1.2.3 From a4db50efe0745001c65b8920d3d5609151cedef9 Mon Sep 17 00:00:00 2001 From: Markus Schneider-Pargmann Date: Wed, 7 Aug 2024 16:12:23 +0200 Subject: dt-bindings: serial: 8250_omap: Add wakeup-source property Add the wakeup-source to enable this device as a wakeup source if defined in DT. Signed-off-by: Markus Schneider-Pargmann Acked-by: Conor Dooley Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Link: https://lore.kernel.org/r/20240807141227.1093006-2-msp@baylibre.com Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/serial/8250_omap.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml index 6a7be42da523..4b78de6b46a2 100644 --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml @@ -76,6 +76,7 @@ properties: clock-frequency: true current-speed: true overrun-throttle-ms: true + wakeup-source: true required: - compatible -- cgit v1.2.3