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

dt-bindings: serial: max310x: convert to YAML

Convert binding from text format to YAML.

Additions to original text binding:
- add rs485 reference.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231012152647.2607455-1-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hugo Villeneuve and committed by
Greg Kroah-Hartman
0b169177 fe2017ba

+74 -48
-48
Documentation/devicetree/bindings/serial/maxim,max310x.txt
··· 1 - * Maxim MAX310X advanced Universal Asynchronous Receiver-Transmitter (UART) 2 - 3 - Required properties: 4 - - compatible: Should be one of the following: 5 - - "maxim,max3107" for Maxim MAX3107, 6 - - "maxim,max3108" for Maxim MAX3108, 7 - - "maxim,max3109" for Maxim MAX3109, 8 - - "maxim,max14830" for Maxim MAX14830. 9 - - reg: SPI chip select number. 10 - - interrupts: Specifies the interrupt source of the parent interrupt 11 - controller. The format of the interrupt specifier depends on the 12 - parent interrupt controller. 13 - - clocks: phandle to the IC source clock. 14 - - clock-names: Should be "xtal" if clock is an external crystal or 15 - "osc" if an external clock source is used. 16 - 17 - Optional properties: 18 - - gpio-controller: Marks the device node as a GPIO controller. 19 - - #gpio-cells: Should be two. The first cell is the GPIO number and 20 - the second cell is used to specify the GPIO polarity: 21 - 0 = active high, 22 - 1 = active low. 23 - 24 - Example: 25 - 26 - / { 27 - clocks { 28 - spi_uart_clk: osc_max14830 { 29 - compatible = "fixed-clock"; 30 - #clock-cells = <0>; 31 - clock-frequency = <3686400>; 32 - }; 33 - 34 - }; 35 - }; 36 - 37 - &spi0 { 38 - max14830: max14830@0 { 39 - compatible = "maxim,max14830"; 40 - reg = <0>; 41 - clocks = <&spi_uart_clk>; 42 - clock-names = "osc"; 43 - interrupt-parent = <&gpio3>; 44 - interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 45 - gpio-controller; 46 - #gpio-cells = <2>; 47 - }; 48 - };
+74
Documentation/devicetree/bindings/serial/maxim,max310x.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/serial/maxim,max310x.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX310X Advanced Universal Asynchronous Receiver-Transmitter (UART) 8 + 9 + maintainers: 10 + - Hugo Villeneuve <hvilleneuve@dimonoff.com> 11 + 12 + properties: 13 + compatible: 14 + enum: 15 + - maxim,max3107 16 + - maxim,max3108 17 + - maxim,max3109 18 + - maxim,max14830 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + interrupts: 24 + maxItems: 1 25 + 26 + clocks: 27 + maxItems: 1 28 + 29 + clock-names: 30 + enum: 31 + - xtal # External crystal 32 + - osc # External clock source 33 + 34 + gpio-controller: true 35 + 36 + "#gpio-cells": 37 + const: 2 38 + 39 + gpio-line-names: 40 + minItems: 1 41 + maxItems: 16 42 + 43 + required: 44 + - compatible 45 + - reg 46 + - interrupts 47 + - clocks 48 + - clock-names 49 + 50 + allOf: 51 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 52 + - $ref: /schemas/serial/serial.yaml# 53 + - $ref: /schemas/serial/rs485.yaml# 54 + 55 + unevaluatedProperties: false 56 + 57 + examples: 58 + - | 59 + #include <dt-bindings/interrupt-controller/irq.h> 60 + i2c { 61 + #address-cells = <1>; 62 + #size-cells = <0>; 63 + 64 + serial@2c { 65 + compatible = "maxim,max3107"; 66 + reg = <0x2c>; 67 + clocks = <&xtal4m>; 68 + clock-names = "xtal"; 69 + interrupt-parent = <&gpio3>; 70 + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 71 + gpio-controller; 72 + #gpio-cells = <2>; 73 + }; 74 + };