m_can.txt 2.5 KB

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