xref: /freebsd-src/sys/contrib/device-tree/Bindings/net/can/st,stm32-bxcan.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1*fac71e4eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*fac71e4eSEmmanuel Vadot%YAML 1.2
3*fac71e4eSEmmanuel Vadot---
4*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/net/can/st,stm32-bxcan.yaml#
5*fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*fac71e4eSEmmanuel Vadot
7*fac71e4eSEmmanuel Vadottitle: STMicroelectronics bxCAN controller
8*fac71e4eSEmmanuel Vadot
9*fac71e4eSEmmanuel Vadotdescription: STMicroelectronics BxCAN controller for CAN bus
10*fac71e4eSEmmanuel Vadot
11*fac71e4eSEmmanuel Vadotmaintainers:
12*fac71e4eSEmmanuel Vadot  - Dario Binacchi <dario.binacchi@amarulasolutions.com>
13*fac71e4eSEmmanuel Vadot
14*fac71e4eSEmmanuel VadotallOf:
15*fac71e4eSEmmanuel Vadot  - $ref: can-controller.yaml#
16*fac71e4eSEmmanuel Vadot
17*fac71e4eSEmmanuel Vadotproperties:
18*fac71e4eSEmmanuel Vadot  compatible:
19*fac71e4eSEmmanuel Vadot    enum:
20*fac71e4eSEmmanuel Vadot      - st,stm32f4-bxcan
21*fac71e4eSEmmanuel Vadot
22*fac71e4eSEmmanuel Vadot  st,can-primary:
23*fac71e4eSEmmanuel Vadot    description:
24*fac71e4eSEmmanuel Vadot      Primary mode of the bxCAN peripheral is only relevant if the chip has
25*fac71e4eSEmmanuel Vadot      two CAN peripherals in dual CAN configuration. In that case they share
26*fac71e4eSEmmanuel Vadot      some of the required logic.
27*fac71e4eSEmmanuel Vadot      Not to be used if the peripheral is in single CAN configuration.
28*fac71e4eSEmmanuel Vadot      To avoid misunderstandings, it should be noted that ST documentation
29*fac71e4eSEmmanuel Vadot      uses the terms master instead of primary.
30*fac71e4eSEmmanuel Vadot    type: boolean
31*fac71e4eSEmmanuel Vadot
32*fac71e4eSEmmanuel Vadot  st,can-secondary:
33*fac71e4eSEmmanuel Vadot    description:
34*fac71e4eSEmmanuel Vadot      Secondary mode of the bxCAN peripheral is only relevant if the chip
35*fac71e4eSEmmanuel Vadot      has two CAN peripherals in dual CAN configuration. In that case they
36*fac71e4eSEmmanuel Vadot      share some of the required logic.
37*fac71e4eSEmmanuel Vadot      Not to be used if the peripheral is in single CAN configuration.
38*fac71e4eSEmmanuel Vadot      To avoid misunderstandings, it should be noted that ST documentation
39*fac71e4eSEmmanuel Vadot      uses the terms slave instead of secondary.
40*fac71e4eSEmmanuel Vadot    type: boolean
41*fac71e4eSEmmanuel Vadot
42*fac71e4eSEmmanuel Vadot  reg:
43*fac71e4eSEmmanuel Vadot    maxItems: 1
44*fac71e4eSEmmanuel Vadot
45*fac71e4eSEmmanuel Vadot  interrupts:
46*fac71e4eSEmmanuel Vadot    items:
47*fac71e4eSEmmanuel Vadot      - description: transmit interrupt
48*fac71e4eSEmmanuel Vadot      - description: FIFO 0 receive interrupt
49*fac71e4eSEmmanuel Vadot      - description: FIFO 1 receive interrupt
50*fac71e4eSEmmanuel Vadot      - description: status change error interrupt
51*fac71e4eSEmmanuel Vadot
52*fac71e4eSEmmanuel Vadot  interrupt-names:
53*fac71e4eSEmmanuel Vadot    items:
54*fac71e4eSEmmanuel Vadot      - const: tx
55*fac71e4eSEmmanuel Vadot      - const: rx0
56*fac71e4eSEmmanuel Vadot      - const: rx1
57*fac71e4eSEmmanuel Vadot      - const: sce
58*fac71e4eSEmmanuel Vadot
59*fac71e4eSEmmanuel Vadot  resets:
60*fac71e4eSEmmanuel Vadot    maxItems: 1
61*fac71e4eSEmmanuel Vadot
62*fac71e4eSEmmanuel Vadot  clocks:
63*fac71e4eSEmmanuel Vadot    maxItems: 1
64*fac71e4eSEmmanuel Vadot
65*fac71e4eSEmmanuel Vadot  st,gcan:
66*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
67*fac71e4eSEmmanuel Vadot    description:
68*fac71e4eSEmmanuel Vadot      The phandle to the gcan node which allows to access the 512-bytes
69*fac71e4eSEmmanuel Vadot      SRAM memory shared by the two bxCAN cells (CAN1 primary and CAN2
70*fac71e4eSEmmanuel Vadot      secondary) in dual CAN peripheral configuration.
71*fac71e4eSEmmanuel Vadot
72*fac71e4eSEmmanuel Vadotrequired:
73*fac71e4eSEmmanuel Vadot  - compatible
74*fac71e4eSEmmanuel Vadot  - reg
75*fac71e4eSEmmanuel Vadot  - interrupts
76*fac71e4eSEmmanuel Vadot  - resets
77*fac71e4eSEmmanuel Vadot  - clocks
78*fac71e4eSEmmanuel Vadot  - st,gcan
79*fac71e4eSEmmanuel Vadot
80*fac71e4eSEmmanuel VadotadditionalProperties: false
81*fac71e4eSEmmanuel Vadot
82*fac71e4eSEmmanuel Vadotexamples:
83*fac71e4eSEmmanuel Vadot  - |
84*fac71e4eSEmmanuel Vadot    #include <dt-bindings/clock/stm32fx-clock.h>
85*fac71e4eSEmmanuel Vadot    #include <dt-bindings/mfd/stm32f4-rcc.h>
86*fac71e4eSEmmanuel Vadot
87*fac71e4eSEmmanuel Vadot    can1: can@40006400 {
88*fac71e4eSEmmanuel Vadot        compatible = "st,stm32f4-bxcan";
89*fac71e4eSEmmanuel Vadot        reg = <0x40006400 0x200>;
90*fac71e4eSEmmanuel Vadot        interrupts = <19>, <20>, <21>, <22>;
91*fac71e4eSEmmanuel Vadot        interrupt-names = "tx", "rx0", "rx1", "sce";
92*fac71e4eSEmmanuel Vadot        resets = <&rcc STM32F4_APB1_RESET(CAN1)>;
93*fac71e4eSEmmanuel Vadot        clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>;
94*fac71e4eSEmmanuel Vadot        st,can-primary;
95*fac71e4eSEmmanuel Vadot        st,gcan = <&gcan>;
96*fac71e4eSEmmanuel Vadot    };
97