Skip to content

Commit b083171

Browse files
Haowei ZhengKexyBiscuit
authored andcommitted
FROMLIST: dt-bindings: serial: Add Loongson UART controller
Add Loongson UART controller binding with DT schema format using json-schema. Signed-off-by: Haowei Zheng <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Kexy Biscuit <[email protected]>
1 parent 77ce0e7 commit b083171

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/loongson,uart.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Loongson UART
8+
9+
maintainers:
10+
- Haowei Zheng <[email protected]>
11+
12+
allOf:
13+
- $ref: serial.yaml
14+
15+
properties:
16+
compatible:
17+
oneOf:
18+
- enum:
19+
- loongson,ls7a-uart
20+
- loongson,ls3a5000-uart
21+
- loongson,ls2k2000-uart
22+
- items:
23+
- enum:
24+
- loongson,ls2k1000-uart
25+
- loongson,ls2k0500-uart
26+
- const: loongson,ls7a-uart
27+
- items:
28+
- enum:
29+
- loongson,ls2k1500-uart
30+
- const: loongson,ls2k2000-uart
31+
- items:
32+
- enum:
33+
- loongson,ls3a6000-uart
34+
- const: loongson,ls3a5000-uart
35+
36+
reg:
37+
maxItems: 1
38+
39+
interrupts:
40+
maxItems: 1
41+
42+
clock-frequency: true
43+
44+
required:
45+
- compatible
46+
- reg
47+
- interrupts
48+
- clock-frequency
49+
50+
unevaluatedProperties: false
51+
52+
examples:
53+
- |
54+
#include <dt-bindings/interrupt-controller/irq.h>
55+
#include <dt-bindings/clock/loongson,ls2k-clk.h>
56+
57+
serial@1fe20000 {
58+
compatible = "loongson,ls2k1000-uart", "loongson,ls7a-uart";
59+
reg = <0x1fe20000 0x10>;
60+
clock-frequency = <125000000>;
61+
interrupt-parent = <&liointc0>;
62+
interrupts = <0x0 IRQ_TYPE_LEVEL_HIGH>;
63+
};

0 commit comments

Comments
 (0)