[FE training-materials-updates] Pin muxing: take a better example for OMAP/AM33xx
Michael Opdenacker
michael.opdenacker at free-electrons.com
Tue Nov 28 18:39:19 CET 2017
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=dec5d72f861bdeb2609e4faaa582e3b426e3beaa
>---------------------------------------------------------------
commit dec5d72f861bdeb2609e4faaa582e3b426e3beaa
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Tue Nov 28 18:39:19 2017 +0100
Pin muxing: take a better example for OMAP/AM33xx
- Using an up-to-date example that uses a label
to reference the pinctrl node.
- Also with comments expliciting the pin package names
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
dec5d72f861bdeb2609e4faaa582e3b426e3beaa
slides/kernel-pinmuxing/kernel-pinmuxing.tex | 43 ++++++++++++++++------------
1 file changed, 24 insertions(+), 19 deletions(-)
diff --git a/slides/kernel-pinmuxing/kernel-pinmuxing.tex b/slides/kernel-pinmuxing/kernel-pinmuxing.tex
index 1c12032..5c45b75 100644
--- a/slides/kernel-pinmuxing/kernel-pinmuxing.tex
+++ b/slides/kernel-pinmuxing/kernel-pinmuxing.tex
@@ -96,7 +96,7 @@ i2c at 11000 {
\begin{frame}[fragile]{Example on OMAP/AM33xx}
\begin{columns}
- \column{0.5\textwidth}
+ \column{0.45\textwidth}
\begin{itemize}
\small
\item On OMAP/AM33xx, the \code{pinctrl-single} driver is used. It
@@ -110,29 +110,34 @@ i2c at 11000 {
\item To know the correct values, one must use the SoC and board
datasheets.
\end{itemize}
- \column{0.5\textwidth}
+ \column{0.55\textwidth}
\begin{minted}[fontsize=\tiny]{perl}
-am33xx_pinmux: pinmux at 44e10800 {
- i2c0_pins: pinmux_i2c0_pins {
- pinctrl-single,pins = <
- /* i2c0_sda.i2c0_sda */
- 0x188 (PIN_INPUT_PULLUP | MUX_MODE0)
- /* i2c0_scl.i2c0_scl */
- 0x18c (PIN_INPUT_PULLUP | MUX_MODE0)
- >;
- };
+/* Excerpt from am335x-boneblue.dts */
+
+&am33xx_pinmux {
+ ...
+ i2c2_pins: pinmux_i2c2_pins {
+ pinctrl-single,pins = <
+ AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3)
+ /* (D18) uart1_ctsn.I2C2_SDA */
+ AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3)
+ /* (D17) uart1_rtsn.I2C2_SCL */
+ >;
+ };
};
-i2c0: i2c at 44e0b000 {
- pinctrl-names = "default";
- pinctrl-0 = <&i2c0_pins>;
+&i2c2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_pins>;
- status = "okay";
- clock-frequency = <400000>;
+ status = "okay";
+ clock-frequency = <400000>;
+ ...
- tps: tps at 2d {
- reg = <0x2d>;
- };
+ pressure at 76 {
+ compatible = "bosch,bmp280";
+ reg = <0x76>;
+ };
};
\end{minted}
\end{columns}
More information about the training-materials-updates
mailing list