Skip to content

Commit 50f8296

Browse files
Alexander Wachtercarlescufi
authored andcommitted
drivers: can: Add dts bindings for CAN
This commit adds generic device tree bindings for can devices. Signed-off-by: Alexander Wachter <[email protected]>
1 parent d3101b1 commit 50f8296

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed

dts/bindings/can/can-device.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Copyright (c) 2018 Alexander Wachter
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
---
7+
title: CAN Device Base Structure
8+
id: can-device
9+
version: 0.1
10+
11+
description: >
12+
This binding gives the base structures for all can devices
13+
14+
parent:
15+
bus: can
16+
17+
properties:
18+
compatible:
19+
type: string
20+
category: required
21+
description: compatible strings
22+
reg:
23+
type: array
24+
description: register base address
25+
generation: define
26+
category: required
27+
label:
28+
type: string
29+
category: required
30+
description: Human readable string describing the device (used by Zephyr for API name)
31+
generation: define
32+
bus-speed:
33+
type: int
34+
category: required
35+
description: bus spees in Baud/s
36+
generation: define
37+
...

dts/bindings/can/can.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: CAN Base Structure
3+
id: can
4+
version: 0.1
5+
6+
description: >
7+
This binding gives the base structures for all CAN devices
8+
9+
child:
10+
bus: can
11+
12+
properties:
13+
"#address-cells":
14+
type: int
15+
category: required
16+
description: should be 1.
17+
"#size-cells":
18+
type: int
19+
category: required
20+
description: should be 0.
21+
label:
22+
type: string
23+
category: required
24+
description: Human readable string describing the device (used by Zephyr for API name)
25+
generation: define
26+
bus-speed:
27+
type: int
28+
category: required
29+
description: bus spees in Baud/s
30+
generation: define
31+
pinctrl-\d+:
32+
type: array
33+
category: optional
34+
description: pinmux information for RX, TX
35+
generation: structure
36+
...

dts/bindings/can/st,stm32-can.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: STM32 CAN
3+
id: st,stm32-can
4+
version: 0.1
5+
6+
description: >
7+
This binding gives a base representation of the STM32 CAN controller
8+
9+
inherits:
10+
!include can.yaml
11+
12+
properties:
13+
compatible:
14+
type: string
15+
category: required
16+
description: compatible strings
17+
constraint: "st,stm32-can"
18+
19+
reg:
20+
type: array
21+
description: register base address
22+
generation: define
23+
category: required
24+
25+
interrupts:
26+
type: array
27+
category: required
28+
description: required interrupts
29+
generation: define
30+
31+
gpio-port:
32+
type: string
33+
category: required
34+
description: gpio port name
35+
generation: define
36+
37+
rx-pin:
38+
type: string
39+
category: required
40+
description: rx pin name
41+
generation: define
42+
43+
tx-pin:
44+
type: string
45+
category: required
46+
description: tx pin name
47+
generation: define
48+
...

0 commit comments

Comments
 (0)