1Bosch MCAN controller Device Tree Bindings 2------------------------------------------------- 3 4Required properties: 5- compatible : Should be "bosch,m_can" for M_CAN controllers 6- reg : physical base address and size of the M_CAN 7 registers map and Message RAM 8- reg-names : Should be "m_can" and "message_ram" 9- interrupts : Should be the interrupt number of M_CAN interrupt 10 line 0 and line 1, could be same if sharing 11 the same interrupt. 12- interrupt-names : Should contain "int0" and "int1" 13- clocks : Clocks used by controller, should be host clock 14 and CAN clock. 15- clock-names : Should contain "hclk" and "cclk" 16- pinctrl-<n> : Pinctrl states as described in bindings/pinctrl/pinctrl-bindings.txt 17- pinctrl-names : Names corresponding to the numbered pinctrl states 18- bosch,mram-cfg : Message RAM configuration data. 19 Multiple M_CAN instances can share the same Message 20 RAM and each element(e.g Rx FIFO or Tx Buffer and etc) 21 number in Message RAM is also configurable, 22 so this property is telling driver how the shared or 23 private Message RAM are used by this M_CAN controller. 24 25 The format should be as follows: 26 <offset sidf_elems xidf_elems rxf0_elems rxf1_elems 27 rxb_elems txe_elems txb_elems> 28 The 'offset' is an address offset of the Message RAM 29 where the following elements start from. This is 30 usually set to 0x0 if you're using a private Message 31 RAM. The remain cells are used to specify how many 32 elements are used for each FIFO/Buffer. 33 34 M_CAN includes the following elements according to user manual: 35 11-bit Filter 0-128 elements / 0-128 words 36 29-bit Filter 0-64 elements / 0-128 words 37 Rx FIFO 0 0-64 elements / 0-1152 words 38 Rx FIFO 1 0-64 elements / 0-1152 words 39 Rx Buffers 0-64 elements / 0-1152 words 40 Tx Event FIFO 0-32 elements / 0-64 words 41 Tx Buffers 0-32 elements / 0-576 words 42 43 Please refer to 2.4.1 Message RAM Configuration in 44 Bosch M_CAN user manual for details. 45 46Optional Subnode: 47- can-transceiver : Can-transceiver subnode describing maximum speed 48 that can be used for CAN/CAN-FD modes. See 49 Documentation/devicetree/bindings/net/can/can-transceiver.txt 50 for details. 51Example: 52SoC dtsi: 53m_can1: can@20e8000 { 54 compatible = "bosch,m_can"; 55 reg = <0x020e8000 0x4000>, <0x02298000 0x4000>; 56 reg-names = "m_can", "message_ram"; 57 interrupts = <0 114 0x04>, 58 <0 114 0x04>; 59 interrupt-names = "int0", "int1"; 60 clocks = <&clks IMX6SX_CLK_CANFD>, 61 <&clks IMX6SX_CLK_CANFD>; 62 clock-names = "hclk", "cclk"; 63 bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>; 64}; 65 66Board dts: 67&m_can1 { 68 pinctrl-names = "default"; 69 pinctrl-0 = <&pinctrl_m_can1>; 70 status = "enabled"; 71 72 can-transceiver { 73 max-bitrate = <5000000>; 74 }; 75}; 76