[bootlin/training-materials updates] master: yocto: adapt to cover the ST32MP157A variant (99a1a31d)

Luca Ceresoli luca.ceresoli at bootlin.com
Tue Jun 7 21:03:19 CEST 2022


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/99a1a31d7ee6cef6c8a077ab49402bb3a38536e9

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

commit 99a1a31d7ee6cef6c8a077ab49402bb3a38536e9
Author: Luca Ceresoli <luca.ceresoli at bootlin.com>
Date:   Tue Jun 7 19:58:23 2022 +0200

    yocto: adapt to cover the ST32MP157A variant
    
    The A variant is still useful as the D is hard to find, so better be able
    to use any of the two.
    
    The 157A is almost compatible with the 157D, so this is mostly a matter of
    just mentioning it where applicable and to re-add and update the nunchuk DT
    patch removed in 0ec7575b62a157c0814c7c84dd5dbad73276df0b.
    
    Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>


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

99a1a31d7ee6cef6c8a077ab49402bb3a38536e9
 agenda/yocto-online-agenda.tex                     |  4 +--
 .../0002-ARM-dts-stm32mp157a-dk1-add-nunchuk.patch | 41 ++++++++++++++++++++++
 .../yocto-advanced-configuration-stm32.tex         |  5 +--
 .../yocto-first-build-stm32.tex                    |  2 +-
 4 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/agenda/yocto-online-agenda.tex b/agenda/yocto-online-agenda.tex
index ae14a4fb..cf0b6912 100644
--- a/agenda/yocto-online-agenda.tex
+++ b/agenda/yocto-online-agenda.tex
@@ -92,9 +92,9 @@
 \feagendatwocolumn
 {Hardware, second option}
 {
-  STMicroelectronics STM32MP157D-DK1 Discovery board
+  STMicroelectronics STM32MP157A-DK1 or STM32MP157D-DK1 Discovery board
   \begin{itemize}
-  \item STM32MP157D (dual Cortex-A7) CPU from STMicroelectronics
+  \item STM32MP157A or STM32MP157D (dual Cortex-A7) CPU from STMicroelectronics
   \item USB powered
   \item 512 MB DDR3L RAM
   \item Gigabit Ethernet port
diff --git a/lab-data/yocto-stm32/bootlin-lab-data/nunchuk/linux/0002-ARM-dts-stm32mp157a-dk1-add-nunchuk.patch b/lab-data/yocto-stm32/bootlin-lab-data/nunchuk/linux/0002-ARM-dts-stm32mp157a-dk1-add-nunchuk.patch
new file mode 100644
index 00000000..ba48b839
--- /dev/null
+++ b/lab-data/yocto-stm32/bootlin-lab-data/nunchuk/linux/0002-ARM-dts-stm32mp157a-dk1-add-nunchuk.patch
@@ -0,0 +1,41 @@
+From 6aa0d738775fcc3a43ec659f7cd054ee0a86671a Mon Sep 17 00:00:00 2001
+From: Alexandre Belloni <alexandre.belloni at bootlin.com>
+Date: Fri, 6 Sep 2019 23:37:48 +0200
+Subject: [PATCH] ARM: dts: stm32mp157a-dk1: add nunchuk
+
+Signed-off-by: Alexandre Belloni <alexandre.belloni at bootlin.com>
+Signed-off-by: Thomas Perrot <thomas.perrot at bootlin.com>
+Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
+---
+ arch/arm/boot/dts/stm32mp157a-dk1.dts | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/arch/arm/boot/dts/stm32mp157a-dk1.dts b/arch/arm/boot/dts/stm32mp157a-dk1.dts
+index 1f265fed2..147ff9e1d 100644
+--- a/arch/arm/boot/dts/stm32mp157a-dk1.dts
++++ b/arch/arm/boot/dts/stm32mp157a-dk1.dts
+@@ -33,3 +33,21 @@
+ 		};
+ 	};
+ };
++
++&i2c5 {
++	pinctrl-names = "default", "sleep";
++	pinctrl-0 = <&i2c5_pins_a>;
++	pinctrl-1 = <&i2c5_pins_sleep_a>;
++	i2c-scl-rising-time-ns = <100>;
++	i2c-scl-falling-time-ns = <7>;
++	status = "okay";
++	/delete-property/dmas;
++	/delete-property/dma-names;
++	clock-frequency = <100000>;
++
++	nunchuk: nunchuk at 52 {
++				compatible = "nintendo,wiimote-extension";
++				reg = <0x52>;
++				status = "okay";
++	};
++};
+-- 
+2.25.1
+
diff --git a/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex b/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex
index 4549312b..aa50c70a 100644
--- a/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex
+++ b/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex
@@ -27,8 +27,9 @@ APPEND root=/dev/nfs rw console=ttySTM0,115200 nfsroot=192.168.0.1:/nfs,vers=3,t
 }
 
 \begin{itemize}
-  \item For the \code{stm32mp157d-dk1-sdcard}, edit the
-        \code{mmc0_extlinux/extlinux.conf} file
+  \item For the \code{stm32mp157a-dk1-sdcard}
+        and the \code{stm32mp157d-dk1-sdcard}, edit
+        the \code{mmc0_extlinux/extlinux.conf} file
   \item For the \code{stm32mp157c-dk2-sdcard}, edit the
         \code{mmc0_extlinux/stm32mp157c-dk2_extlinux.conf} file
 \end{itemize}
diff --git a/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex b/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex
index 282c34a2..4b9daac6 100644
--- a/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex
+++ b/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex
@@ -79,7 +79,7 @@ In this first lab we will use an SD card to store the bootloader, kernel and
 root filesystem files. To generate the final image, You will find scripts in
 \code{$BUILDDIR/tmp/deploy/images/stm32mp1/scripts}.
 
-Execute it:
+Execute it (replace \code{157d} with \code{157a} depending on your board variant):
 \begin{verbatim}
 sudo ./create_sdcard_from_flashlayout.sh \
 ../flashlayout_core-image-minimal/trusted/FlashLayout_sdcard_stm32mp157d-dk1-trusted.tsv




More information about the training-materials-updates mailing list