Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: serial: meson-uart: convert to yaml

Now that we have the DT validation in place, let's convert the device tree
bindings for the Amlogic UART Serial controller over to a YAML schemas.

Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Neil Armstrong and committed by
Rob Herring
4df7e9a1 87a55485

+73 -38
-38
Documentation/devicetree/bindings/serial/amlogic,meson-uart.txt
··· 1 - Amlogic Meson SoC UART Serial Interface 2 - ======================================= 3 - 4 - The Amlogic Meson SoC UART Serial Interface is present on a large range 5 - of SoCs, and can be present either in the "Always-On" power domain or the 6 - "Everything-Else" power domain. 7 - 8 - The particularity of the "Always-On" Serial Interface is that the hardware 9 - is active since power-on and does not need any clock gating and is usable 10 - as very early serial console. 11 - 12 - Required properties: 13 - - compatible : compatible: value should be different for each SoC family as : 14 - - Meson6 : "amlogic,meson6-uart" 15 - - Meson8 : "amlogic,meson8-uart" 16 - - Meson8b : "amlogic,meson8b-uart" 17 - - GX (GXBB, GXL, GXM) : "amlogic,meson-gx-uart" 18 - eventually followed by : "amlogic,meson-ao-uart" if this UART interface 19 - is in the "Always-On" power domain. 20 - - reg : offset and length of the register set for the device. 21 - - interrupts : identifier to the device interrupt 22 - - clocks : a list of phandle + clock-specifier pairs, one for each 23 - entry in clock names. 24 - - clock-names : 25 - * "xtal" for external xtal clock identifier 26 - * "pclk" for the bus core clock, either the clk81 clock or the gate clock 27 - * "baud" for the source of the baudrate generator, can be either the xtal 28 - or the pclk. 29 - 30 - e.g. 31 - uart_A: serial@84c0 { 32 - compatible = "amlogic,meson-gx-uart"; 33 - reg = <0x0 0x84c0 0x0 0x14>; 34 - interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>; 35 - /* Use xtal as baud rate clock source */ 36 - clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>; 37 - clock-names = "xtal", "pclk", "baud"; 38 - };
+73
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + # Copyright 2019 BayLibre, SAS 3 + %YAML 1.2 4 + --- 5 + $id: "http://devicetree.org/schemas/serial/amlogic,meson-uart.yaml#" 6 + $schema: "http://devicetree.org/meta-schemas/core.yaml#" 7 + 8 + title: Amlogic Meson SoC UART Serial Interface 9 + 10 + maintainers: 11 + - Neil Armstrong <narmstrong@baylibre.com> 12 + 13 + description: | 14 + The Amlogic Meson SoC UART Serial Interface is present on a large range 15 + of SoCs, and can be present either in the "Always-On" power domain or the 16 + "Everything-Else" power domain. 17 + 18 + The particularity of the "Always-On" Serial Interface is that the hardware 19 + is active since power-on and does not need any clock gating and is usable 20 + as very early serial console. 21 + 22 + properties: 23 + compatible: 24 + oneOf: 25 + - description: Always-on power domain UART controller 26 + items: 27 + - enum: 28 + - amlogic,meson6-uart 29 + - amlogic,meson8-uart 30 + - amlogic,meson8b-uart 31 + - amlogic,meson-gx-uart 32 + - const: amlogic,meson-ao-uart 33 + - description: Everything-Else power domain UART controller 34 + enum: 35 + - amlogic,meson6-uart 36 + - amlogic,meson8-uart 37 + - amlogic,meson8b-uart 38 + - amlogic,meson-gx-uart 39 + 40 + reg: 41 + maxItems: 1 42 + 43 + interrupts: 44 + maxItems: 1 45 + 46 + clocks: 47 + items: 48 + - description: external xtal clock identifier 49 + - description: the bus core clock, either the clk81 clock or the gate clock 50 + - description: the source of the baudrate generator, can be either the xtal or the pclk 51 + 52 + clock-names: 53 + items: 54 + - const: xtal 55 + - const: pclk 56 + - const: baud 57 + 58 + required: 59 + - compatible 60 + - reg 61 + - interrupts 62 + - clocks 63 + - clock-names 64 + 65 + examples: 66 + - | 67 + serial@84c0 { 68 + compatible = "amlogic,meson-gx-uart"; 69 + reg = <0x84c0 0x14>; 70 + interrupts = <26>; 71 + clocks = <&xtal>, <&pclk>, <&xtal>; 72 + clock-names = "xtal", "pclk", "baud"; 73 + };