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
13allOf:
14  - $ref: can-controller.yaml#
15
16properties:
17  compatible:
18    oneOf:
19      - items:
20          - const: allwinner,sun7i-a20-can
21          - const: allwinner,sun4i-a10-can
22      - const: allwinner,sun4i-a10-can
23      - const: allwinner,sun8i-r40-can
24
25  reg:
26    maxItems: 1
27
28  interrupts:
29    maxItems: 1
30
31  clocks:
32    maxItems: 1
33
34  resets:
35    maxItems: 1
36
37if:
38  properties:
39    compatible:
40      contains:
41        const: allwinner,sun8i-r40-can
42
43then:
44  required:
45    - resets
46
47required:
48  - compatible
49  - reg
50  - interrupts
51  - clocks
52
53additionalProperties: false
54
55examples:
56  - |
57    #include <dt-bindings/interrupt-controller/arm-gic.h>
58    #include <dt-bindings/clock/sun7i-a20-ccu.h>
59
60    can0: can@1c2bc00 {
61        compatible = "allwinner,sun7i-a20-can",
62                     "allwinner,sun4i-a10-can";
63        reg = <0x01c2bc00 0x400>;
64        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
65        clocks = <&ccu CLK_APB1_CAN>;
66    };
67  - |
68    #define RST_BUS_CAN		68
69    #define CLK_BUS_CAN		91
70    can1: can@1c2bc00 {
71        compatible = "allwinner,sun8i-r40-can";
72        reg = <0x01c2bc00 0x400>;
73        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
74        clocks = <&ccu CLK_BUS_CAN>;
75        resets = <&ccu RST_BUS_CAN>;
76    };
77
78...
79