128c9c3d3SPaul Cercueil# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
228c9c3d3SPaul Cercueil%YAML 1.2
328c9c3d3SPaul Cercueil---
428c9c3d3SPaul Cercueil$id: http://devicetree.org/schemas/serial/ingenic,uart.yaml#
528c9c3d3SPaul Cercueil$schema: http://devicetree.org/meta-schemas/core.yaml#
628c9c3d3SPaul Cercueil
728c9c3d3SPaul Cercueiltitle: Ingenic SoCs UART controller devicetree bindings
828c9c3d3SPaul Cercueil
928c9c3d3SPaul Cercueilmaintainers:
1028c9c3d3SPaul Cercueil  - Paul Cercueil <paul@crapouillou.net>
1128c9c3d3SPaul Cercueil
126fdc6e23SRob HerringallOf:
136fdc6e23SRob Herring  - $ref: /schemas/serial.yaml#
146fdc6e23SRob Herring
1528c9c3d3SPaul Cercueilproperties:
1628c9c3d3SPaul Cercueil  $nodename:
1728c9c3d3SPaul Cercueil    pattern: "^serial@[0-9a-f]+$"
1828c9c3d3SPaul Cercueil
1928c9c3d3SPaul Cercueil  compatible:
2028c9c3d3SPaul Cercueil    oneOf:
2128c9c3d3SPaul Cercueil      - enum:
2228c9c3d3SPaul Cercueil          - ingenic,jz4740-uart
2328c9c3d3SPaul Cercueil          - ingenic,jz4760-uart
2428c9c3d3SPaul Cercueil          - ingenic,jz4780-uart
2528c9c3d3SPaul Cercueil          - ingenic,x1000-uart
2628c9c3d3SPaul Cercueil      - items:
2728c9c3d3SPaul Cercueil          - enum:
2828c9c3d3SPaul Cercueil              - ingenic,jz4770-uart
2928c9c3d3SPaul Cercueil              - ingenic,jz4775-uart
3028c9c3d3SPaul Cercueil          - const: ingenic,jz4760-uart
3128c9c3d3SPaul Cercueil      - items:
3228c9c3d3SPaul Cercueil          - const: ingenic,jz4725b-uart
3328c9c3d3SPaul Cercueil          - const: ingenic,jz4740-uart
3428c9c3d3SPaul Cercueil
3528c9c3d3SPaul Cercueil  reg:
3628c9c3d3SPaul Cercueil    maxItems: 1
3728c9c3d3SPaul Cercueil
3828c9c3d3SPaul Cercueil  interrupts:
3928c9c3d3SPaul Cercueil    maxItems: 1
4028c9c3d3SPaul Cercueil
4128c9c3d3SPaul Cercueil  clocks:
4228c9c3d3SPaul Cercueil    items:
4328c9c3d3SPaul Cercueil      - description: Baud clock
4428c9c3d3SPaul Cercueil      - description: UART module clock
4528c9c3d3SPaul Cercueil
4628c9c3d3SPaul Cercueil  clock-names:
4728c9c3d3SPaul Cercueil    items:
4828c9c3d3SPaul Cercueil      - const: baud
4928c9c3d3SPaul Cercueil      - const: module
5028c9c3d3SPaul Cercueil
5128c9c3d3SPaul Cercueil  dmas:
5228c9c3d3SPaul Cercueil    items:
5328c9c3d3SPaul Cercueil      - description: DMA controller phandle and request line for RX
5428c9c3d3SPaul Cercueil      - description: DMA controller phandle and request line for TX
5528c9c3d3SPaul Cercueil
5628c9c3d3SPaul Cercueil  dma-names:
5728c9c3d3SPaul Cercueil    items:
5828c9c3d3SPaul Cercueil      - const: rx
5928c9c3d3SPaul Cercueil      - const: tx
6028c9c3d3SPaul Cercueil
6128c9c3d3SPaul Cercueilrequired:
6228c9c3d3SPaul Cercueil  - compatible
6328c9c3d3SPaul Cercueil  - reg
6428c9c3d3SPaul Cercueil  - interrupts
6528c9c3d3SPaul Cercueil  - clocks
6628c9c3d3SPaul Cercueil  - clock-names
6728c9c3d3SPaul Cercueil  - dmas
6828c9c3d3SPaul Cercueil  - dma-names
6928c9c3d3SPaul Cercueil
706fdc6e23SRob HerringunevaluatedProperties: false
716fdc6e23SRob Herring
7228c9c3d3SPaul Cercueilexamples:
7328c9c3d3SPaul Cercueil  - |
7428c9c3d3SPaul Cercueil    #include <dt-bindings/clock/jz4780-cgu.h>
7528c9c3d3SPaul Cercueil    #include <dt-bindings/dma/jz4780-dma.h>
7628c9c3d3SPaul Cercueil    #include <dt-bindings/gpio/gpio.h>
7728c9c3d3SPaul Cercueil    serial@10032000 {
7828c9c3d3SPaul Cercueil      compatible = "ingenic,jz4780-uart";
7928c9c3d3SPaul Cercueil      reg = <0x10032000 0x100>;
8028c9c3d3SPaul Cercueil
8128c9c3d3SPaul Cercueil      interrupt-parent = <&intc>;
8228c9c3d3SPaul Cercueil      interrupts = <49>;
8328c9c3d3SPaul Cercueil
8428c9c3d3SPaul Cercueil      clocks = <&ext>, <&cgu JZ4780_CLK_UART2>;
8528c9c3d3SPaul Cercueil      clock-names = "baud", "module";
8628c9c3d3SPaul Cercueil
8728c9c3d3SPaul Cercueil      dmas = <&dma JZ4780_DMA_UART2_RX 0xffffffff>,
8828c9c3d3SPaul Cercueil             <&dma JZ4780_DMA_UART2_TX 0xffffffff>;
8928c9c3d3SPaul Cercueil      dma-names = "rx", "tx";
9028c9c3d3SPaul Cercueil
9128c9c3d3SPaul Cercueil      bluetooth {
9228c9c3d3SPaul Cercueil        compatible = "brcm,bcm4330-bt";
9328c9c3d3SPaul Cercueil        reset-gpios = <&gpf 8 GPIO_ACTIVE_HIGH>;
9428c9c3d3SPaul Cercueil        vcc-supply = <&wlan0_power>;
9528c9c3d3SPaul Cercueil        device-wakeup-gpios = <&gpf 5 GPIO_ACTIVE_HIGH>;
9628c9c3d3SPaul Cercueil        host-wakeup-gpios = <&gpf 6 GPIO_ACTIVE_HIGH>;
9728c9c3d3SPaul Cercueil        shutdown-gpios = <&gpf 4 GPIO_ACTIVE_LOW>;
9828c9c3d3SPaul Cercueil      };
9928c9c3d3SPaul Cercueil    };
100