1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/can/allwinner,sun4i-a10-can.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner A10 CAN Controller Device Tree Bindings
8
9maintainers:
10  - Chen-Yu Tsai <wens@csie.org>
11  - Maxime Ripard <mripard@kernel.org>
12
13properties:
14  compatible:
15    oneOf:
16      - items:
17          - const: allwinner,sun7i-a20-can
18          - const: allwinner,sun4i-a10-can
19      - const: allwinner,sun4i-a10-can
20      - const: allwinner,sun8i-r40-can
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    maxItems: 1
27
28  clocks:
29    maxItems: 1
30
31  resets:
32    maxItems: 1
33
34if:
35  properties:
36    compatible:
37      contains:
38        const: allwinner,sun8i-r40-can
39
40then:
41  required:
42    - resets
43
44required:
45  - compatible
46  - reg
47  - interrupts
48  - clocks
49
50additionalProperties: false
51
52examples:
53  - |
54    #include <dt-bindings/interrupt-controller/arm-gic.h>
55    #include <dt-bindings/clock/sun7i-a20-ccu.h>
56
57    can0: can@1c2bc00 {
58        compatible = "allwinner,sun7i-a20-can",
59                     "allwinner,sun4i-a10-can";
60        reg = <0x01c2bc00 0x400>;
61        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
62        clocks = <&ccu CLK_APB1_CAN>;
63    };
64  - |
65    #define RST_BUS_CAN		68
66    #define CLK_BUS_CAN		91
67    can1: can@1c2bc00 {
68        compatible = "allwinner,sun8i-r40-can";
69        reg = <0x01c2bc00 0x400>;
70        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
71        clocks = <&ccu CLK_BUS_CAN>;
72        resets = <&ccu RST_BUS_CAN>;
73    };
74
75...
76