drivers: can: Add dts bindings for CAN
This commit adds generic device tree bindings for can devices. Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
This commit is contained in:
parent
d3101b1fa4
commit
50f8296baa
3 changed files with 121 additions and 0 deletions
37
dts/bindings/can/can-device.yaml
Normal file
37
dts/bindings/can/can-device.yaml
Normal file
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# Copyright (c) 2018 Alexander Wachter
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
---
|
||||
title: CAN Device Base Structure
|
||||
id: can-device
|
||||
version: 0.1
|
||||
|
||||
description: >
|
||||
This binding gives the base structures for all can devices
|
||||
|
||||
parent:
|
||||
bus: can
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
type: string
|
||||
category: required
|
||||
description: compatible strings
|
||||
reg:
|
||||
type: array
|
||||
description: register base address
|
||||
generation: define
|
||||
category: required
|
||||
label:
|
||||
type: string
|
||||
category: required
|
||||
description: Human readable string describing the device (used by Zephyr for API name)
|
||||
generation: define
|
||||
bus-speed:
|
||||
type: int
|
||||
category: required
|
||||
description: bus spees in Baud/s
|
||||
generation: define
|
||||
...
|
36
dts/bindings/can/can.yaml
Normal file
36
dts/bindings/can/can.yaml
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
title: CAN Base Structure
|
||||
id: can
|
||||
version: 0.1
|
||||
|
||||
description: >
|
||||
This binding gives the base structures for all CAN devices
|
||||
|
||||
child:
|
||||
bus: can
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
type: int
|
||||
category: required
|
||||
description: should be 1.
|
||||
"#size-cells":
|
||||
type: int
|
||||
category: required
|
||||
description: should be 0.
|
||||
label:
|
||||
type: string
|
||||
category: required
|
||||
description: Human readable string describing the device (used by Zephyr for API name)
|
||||
generation: define
|
||||
bus-speed:
|
||||
type: int
|
||||
category: required
|
||||
description: bus spees in Baud/s
|
||||
generation: define
|
||||
pinctrl-\d+:
|
||||
type: array
|
||||
category: optional
|
||||
description: pinmux information for RX, TX
|
||||
generation: structure
|
||||
...
|
48
dts/bindings/can/st,stm32-can.yaml
Normal file
48
dts/bindings/can/st,stm32-can.yaml
Normal file
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
title: STM32 CAN
|
||||
id: st,stm32-can
|
||||
version: 0.1
|
||||
|
||||
description: >
|
||||
This binding gives a base representation of the STM32 CAN controller
|
||||
|
||||
inherits:
|
||||
!include can.yaml
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
type: string
|
||||
category: required
|
||||
description: compatible strings
|
||||
constraint: "st,stm32-can"
|
||||
|
||||
reg:
|
||||
type: array
|
||||
description: register base address
|
||||
generation: define
|
||||
category: required
|
||||
|
||||
interrupts:
|
||||
type: array
|
||||
category: required
|
||||
description: required interrupts
|
||||
generation: define
|
||||
|
||||
gpio-port:
|
||||
type: string
|
||||
category: required
|
||||
description: gpio port name
|
||||
generation: define
|
||||
|
||||
rx-pin:
|
||||
type: string
|
||||
category: required
|
||||
description: rx pin name
|
||||
generation: define
|
||||
|
||||
tx-pin:
|
||||
type: string
|
||||
category: required
|
||||
description: tx pin name
|
||||
generation: define
|
||||
...
|
Loading…
Add table
Add a link
Reference in a new issue