[FE training-materials-updates] kernel i2c comm lab: update am33xx.dtsi excerpt

Michael Opdenacker michael.opdenacker at free-electrons.com
Wed Jul 22 16:13:15 CEST 2015


Repository : git://git.free-electrons.com/training-materials.git

On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=ea9c8ec9d84adac0042afdb423e398113172cdc6

>---------------------------------------------------------------

commit ea9c8ec9d84adac0042afdb423e398113172cdc6
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date:   Wed Jul 22 16:10:57 2015 +0200

    kernel i2c comm lab: update am33xx.dtsi excerpt
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>


>---------------------------------------------------------------

ea9c8ec9d84adac0042afdb423e398113172cdc6
 .../kernel-i2c-communication.tex                   | 24 ++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/labs/kernel-i2c-communication/kernel-i2c-communication.tex b/labs/kernel-i2c-communication/kernel-i2c-communication.tex
index b52a854..71ef68f 100644
--- a/labs/kernel-i2c-communication/kernel-i2c-communication.tex
+++ b/labs/kernel-i2c-communication/kernel-i2c-communication.tex
@@ -93,17 +93,25 @@ Control Module Registers is defined. Look for \code{pinctrl-single} in
 \code{arch/arm/boot/dts/am33xx.dtsi}:
 
 \begin{verbatim}
-am33xx_pinmux: pinmux at 44e10800 {
-        compatible = "pinctrl-single";
-        reg = <0x44e10800 0x0238>;
-        #address-cells = <1>;
-        #size-cells = <0>;
-        pinctrl-single,register-width = <32>;
-        pinctrl-single,function-mask = <0x7f>;
+am33xx_pinmux: pinmux at 800 {
+	compatible = "pinctrl-single";
+	reg = <0x800 0x238>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	pinctrl-single,register-width = <32>;
+	pinctrl-single,function-mask = <0x7f>;
 };
 \end{verbatim}
 
-The base address is \code{0x44e10800} instead of \code{0x44e10000} in
+We first have to compute the absolute address of the above node. It is
+at offset \code{800} inside node \code{scm at 210000} inside node
+\code{l4_wkup at 44c00000}. So, the absolute address is:
+
+\begin{verbatim}
+0x44c00000 + 0x210000 + 0x800 = 0x44e10800
+\end{verbatim}
+
+So, the base address is \code{0x44e10800} instead of \code{0x44e10000} in
 the datasheet! The value in the DTS is \code{0x800} greater, which
 matches the difference in the offsets.
 



More information about the training-materials-updates mailing list