diff --git a/M_CAN Driver Usage Device Tree.md b/M_CAN Driver Usage Device Tree.md new file mode 100644 index 0000000..1474f6e --- /dev/null +++ b/M_CAN Driver Usage Device Tree.md @@ -0,0 +1,30 @@ +This page explains how to use the M_CAN device driver in the newest version (v2.0 or greater). + +A basic example on the device tree of the M_CAN can be found in the README.md and is shown below: +``` +/* M_CAN Device Tree Nodes */ +/* Example clocks */ +hclk: hclk { + compatible = "fixed-clock"; + #clock-cells = < 0 >; + clock-frequency = <50000000>; +}; +cclk: cclk { + compatible = "fixed-clock"; + #clock-cells = < 0 >; + clock-frequency = <40000000>; +}; + +/* M_CAN device */ +mcan0: can@0xff240000 { + compatible = "bosch,m_can"; + reg = <0xff240000 0x200>,<0xff260000 0x4000>; + reg-names = "m_can", "message_ram"; + interrupt-parent = <&intc>; + interrupts = <0x0 40 0x4>; + interrupt-names = "int0"; + clocks = <&hclk>, <&cclk>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 128 64 64 32 64 32 32>; +}; +``` diff --git a/M_CAN driver usage.md b/M_CAN driver usage.md deleted file mode 100644 index d951d7e..0000000 --- a/M_CAN driver usage.md +++ /dev/null @@ -1,2 +0,0 @@ -This page explains how to use the M_CAN device driver in the newest version (v2.0 or greater). -