xref: /linux/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.yaml (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/serial/nxp,sc16is7xx.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NXP SC16IS7xx Advanced Universal Asynchronous Receiver-Transmitter (UART)
8
9maintainers:
10  - Hugo Villeneuve <hvilleneuve@dimonoff.com>
11
12properties:
13  compatible:
14    enum:
15      - nxp,sc16is740
16      - nxp,sc16is741
17      - nxp,sc16is750
18      - nxp,sc16is752
19      - nxp,sc16is760
20      - nxp,sc16is762
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    maxItems: 1
27
28  clocks:
29    maxItems: 1
30
31  clock-frequency:
32    description:
33      When there is no clock provider visible to the platform, this
34      is the source crystal or external clock frequency for the IC in Hz.
35    minimum: 1
36    maximum: 80000000
37
38  gpio-controller: true
39
40  "#gpio-cells":
41    const: 2
42
43  gpio-line-names:
44    minItems: 1
45    maxItems: 8
46
47  irda-mode-ports:
48    description: |
49      An array that lists the indices of the port that should operate in IrDA
50      mode:
51      0: port A
52      1: port B
53    $ref: /schemas/types.yaml#/definitions/uint32-array
54    minItems: 1
55    maxItems: 2
56    items:
57      minimum: 0
58      maximum: 1
59
60  nxp,modem-control-line-ports:
61    description: |
62      An array that lists the indices of the port that should have shared GPIO
63      lines configured as modem control lines:
64      0: port A
65      1: port B
66    $ref: /schemas/types.yaml#/definitions/uint32-array
67    minItems: 1
68    maxItems: 2
69    items:
70      minimum: 0
71      maximum: 1
72
73required:
74  - compatible
75  - reg
76  - interrupts
77
78allOf:
79  - $ref: /schemas/spi/spi-peripheral-props.yaml#
80  - $ref: /schemas/serial/serial.yaml#
81  - $ref: /schemas/serial/rs485.yaml#
82
83oneOf:
84  - required:
85      - clocks
86  - required:
87      - clock-frequency
88
89unevaluatedProperties: false
90
91examples:
92  - |
93    #include <dt-bindings/interrupt-controller/irq.h>
94    i2c {
95        #address-cells = <1>;
96        #size-cells = <0>;
97
98        serial@51 {
99            compatible = "nxp,sc16is750";
100            reg = <0x51>;
101            clocks = <&clk20m>;
102            interrupt-parent = <&gpio3>;
103            interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
104            gpio-controller;
105            #gpio-cells = <2>;
106        };
107
108        serial@53 {
109            compatible = "nxp,sc16is752";
110            reg = <0x53>;
111            clocks = <&clk20m>;
112            interrupt-parent = <&gpio3>;
113            interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
114            nxp,modem-control-line-ports = <1>; /* Port 1 as modem control lines */
115            gpio-controller; /* Port 0 as GPIOs */
116            #gpio-cells = <2>;
117        };
118
119        serial@54 {
120            compatible = "nxp,sc16is752";
121            reg = <0x54>;
122            clocks = <&clk20m>;
123            interrupt-parent = <&gpio3>;
124            interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
125            nxp,modem-control-line-ports = <0 1>; /* Ports 0 and 1 as modem control lines */
126        };
127    };
128