From 0a4cd57575d3f7416564a3272062ea80876e3a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Wed, 26 Apr 2017 13:53:50 +0200 Subject: [PATCH] Update page 'M_CAN Driver Usage Device Tree' --- M_CAN Driver Usage Device Tree.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/M_CAN Driver Usage Device Tree.md b/M_CAN Driver Usage Device Tree.md index 97ea2e9..ede54d5 100644 --- a/M_CAN Driver Usage Device Tree.md +++ b/M_CAN Driver Usage Device Tree.md @@ -1,3 +1,4 @@ +## Device Tree Overview 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: @@ -27,7 +28,18 @@ mcan0: can@0xff240000 { clock-names = "hclk", "cclk"; bosch,mram-cfg = <0x0 128 64 64 32 64 32 32>; }; -``` -* The driver only uses interrupt line 'int0' of the M_CAN. However, specifiying 'int1' is allowed. +``` ### 'reg' Values + +The M_CAN device node consists of two memory regions. The first is the register address space of the M_CAN. The M_CAN uses a 9 bit address space. Therefore it is 0x200 long. + +The second memory region is the _whole_ message RAM. this RAM can be shared betwen different M_CAN nodes. In this example it has a length of 0x4000 bytes. + +### Interrupts + +It is necessary to configure interrupt line 0 of the M_CAN according to your SoC. Although interrupt line 1 is specified in some device trees, it will not be used by the driver. + +### Clocks + +The M_CAN needs two clocks. The first clock *hclk* \ No newline at end of file