[FE training-materials-updates] kernel i2c communication lab: pin muxing paragraph
Michael Opdenacker
michael.opdenacker at free-electrons.com
Mon Sep 30 09:39:32 CEST 2013
Repository : git://git.free-electrons.com/training-materials.git
On branch : kernel-ng
Link : http://git.free-electrons.com/training-materials/commit/?id=6fc821ea9756ec3d809c7d5e07122f03ed8bd085
>---------------------------------------------------------------
commit 6fc821ea9756ec3d809c7d5e07122f03ed8bd085
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Mon Sep 30 09:38:33 2013 +0200
kernel i2c communication lab: pin muxing paragraph
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
6fc821ea9756ec3d809c7d5e07122f03ed8bd085
.../kernel-i2c-communication.tex | 30 +++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/labs/kernel-i2c-communication/kernel-i2c-communication.tex b/labs/kernel-i2c-communication/kernel-i2c-communication.tex
index 495f731..c181243 100644
--- a/labs/kernel-i2c-communication/kernel-i2c-communication.tex
+++ b/labs/kernel-i2c-communication/kernel-i2c-communication.tex
@@ -1,5 +1,5 @@
\subchapter{Using the I2C bus}{Objective: make the I2C bus work and
-use it to implement communication with the Nunchuck device}
+use it to implement communication with the Nunchuk device}
After this lab, you will be able to:
@@ -8,3 +8,31 @@ After this lab, you will be able to:
\item Access I2C device registers through the bus
\end{itemize}
+\section{Setup}
+
+Stay in the \code{~/felabs/linux/src/linux} directory for kernel and DTB
+compiling (stay in the \code{nunchuk} branch), and in
+\code{~/felabs/linux/modules/nfsroot/nunchuk} for module compiling
+(use two different terminals).
+
+\section{Add pinctrl properties to the Device Tree}
+
+As you found in the previous lab, we now managed to have our nunchuk
+device enumerated on the \code{i2c1} bus.
+
+However, to access the bus data and clock signals, we need to configure
+the pin muxing of the SoC.
+
+If you go back to the BeagleBone Black System Reference Manual, in the
+{\em Connector P9} section, you can see that the pins \code{17} and
+\code{18} that we are using correspond to pins \code{A16} and \code{B16}
+of the AM335 SoC. You can also see that such pins need to be configured
+as \code{MODE2} to get the functionality that we need (\code{I2C1_SCL}
+and \code{I2C1_SDA}).
+
+Now look at the Device Tree for the AM335x EVM board
+(\code{arch/arm/boot/dts/am335x-evm.dts}). It's using \code{i2c1} too.
+
+Edit the \code{arch/arm/boot/dts/am335x-bone-common.dtsi} file and
+add what's needed to enable pin muxing for \code{i2c1}.
+Don't hesitate to go back to the lectures to understand what to do!
More information about the training-materials-updates
mailing list