173 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/net/can/bosch,m_can.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Bosch MCAN controller8 9description: Bosch MCAN controller for CAN bus10 11maintainers:12 - Chandrasekar Ramakrishnan <rcsekar@samsung.com>13 14allOf:15 - $ref: can-controller.yaml#16 17properties:18 compatible:19 const: bosch,m_can20 21 reg:22 items:23 - description: M_CAN registers map24 - description: message RAM25 26 reg-names:27 items:28 - const: m_can29 - const: message_ram30 31 interrupts:32 items:33 - description: interrupt line034 - description: interrupt line135 minItems: 136 37 interrupt-names:38 items:39 - const: int040 - const: int141 minItems: 142 43 clocks:44 items:45 - description: peripheral clock46 - description: bus clock47 48 clock-names:49 items:50 - const: hclk51 - const: cclk52 53 bosch,mram-cfg:54 description: |55 Message RAM configuration data.56 Multiple M_CAN instances can share the same Message RAM57 and each element(e.g Rx FIFO or Tx Buffer and etc) number58 in Message RAM is also configurable, so this property is59 telling driver how the shared or private Message RAM are60 used by this M_CAN controller.61 62 The format should be as follows:63 <offset sidf_elems xidf_elems rxf0_elems rxf1_elems rxb_elems txe_elems txb_elems>64 The 'offset' is an address offset of the Message RAM where65 the following elements start from. This is usually set to66 0x0 if you're using a private Message RAM. The remain cells67 are used to specify how many elements are used for each FIFO/Buffer.68 69 M_CAN includes the following elements according to user manual:70 11-bit Filter 0-128 elements / 0-128 words71 29-bit Filter 0-64 elements / 0-128 words72 Rx FIFO 0 0-64 elements / 0-1152 words73 Rx FIFO 1 0-64 elements / 0-1152 words74 Rx Buffers 0-64 elements / 0-1152 words75 Tx Event FIFO 0-32 elements / 0-64 words76 Tx Buffers 0-32 elements / 0-576 words77 78 Please refer to 2.4.1 Message RAM Configuration in Bosch79 M_CAN user manual for details.80 $ref: /schemas/types.yaml#/definitions/int32-array81 items:82 - description: The 'offset' is an address offset of the Message RAM where83 the following elements start from. This is usually set to 0x0 if84 you're using a private Message RAM.85 default: 086 - description: 11-bit Filter 0-128 elements / 0-128 words87 minimum: 088 maximum: 12889 - description: 29-bit Filter 0-64 elements / 0-128 words90 minimum: 091 maximum: 6492 - description: Rx FIFO 0 0-64 elements / 0-1152 words93 minimum: 094 maximum: 6495 - description: Rx FIFO 1 0-64 elements / 0-1152 words96 minimum: 097 maximum: 6498 - description: Rx Buffers 0-64 elements / 0-1152 words99 minimum: 0100 maximum: 64101 - description: Tx Event FIFO 0-32 elements / 0-64 words102 minimum: 0103 maximum: 32104 - description: Tx Buffers 0-32 elements / 0-576 words105 minimum: 0106 maximum: 32107 minItems: 1108 109 power-domains:110 description:111 Power domain provider node and an args specifier containing112 the can device id value.113 maxItems: 1114 115 can-transceiver:116 $ref: can-transceiver.yaml#117 118 phys:119 maxItems: 1120 121 access-controllers:122 minItems: 1123 maxItems: 2124 125required:126 - compatible127 - reg128 - reg-names129 - clocks130 - clock-names131 - bosch,mram-cfg132 133unevaluatedProperties: false134 135examples:136 - |137 // Example with interrupts138 #include <dt-bindings/clock/imx6sx-clock.h>139 can@20e8000 {140 compatible = "bosch,m_can";141 reg = <0x020e8000 0x4000>, <0x02298000 0x4000>;142 reg-names = "m_can", "message_ram";143 interrupts = <0 114 0x04>, <0 114 0x04>;144 interrupt-names = "int0", "int1";145 clocks = <&clks IMX6SX_CLK_CANFD>,146 <&clks IMX6SX_CLK_CANFD>;147 clock-names = "hclk", "cclk";148 bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>;149 150 can-transceiver {151 max-bitrate = <5000000>;152 };153 };154 155 - |156 // Example with timer polling157 #include <dt-bindings/clock/imx6sx-clock.h>158 can@20e8000 {159 compatible = "bosch,m_can";160 reg = <0x020e8000 0x4000>, <0x02298000 0x4000>;161 reg-names = "m_can", "message_ram";162 clocks = <&clks IMX6SX_CLK_CANFD>,163 <&clks IMX6SX_CLK_CANFD>;164 clock-names = "hclk", "cclk";165 bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>;166 167 can-transceiver {168 max-bitrate = <5000000>;169 };170 };171 172...173