STM32MP157x-EV1 stlinux device tree build
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-21 1:29 PM
Hi. I have generated a full device tree for the EV1 to add I2C5 pins PA11/PA12 for external connector hookup to some of my I2C widgets using STM32CubeMX. I've place the generated .dts file from the kernel/ folder into <linux-source>/arch/arm/boot/dts.
I am now following the Wiki at
https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Developer_Package
in section 5.3.
. . .
PC $> pushd $WORKDIR/kernel/kernel-sources
(ok)
PC $> make O="$PWD/../build" multi_v7_defconfig
(ok)
PC $> for f in `ls -1 ../../sources/arm-openstlinux_weston-linux-gnueabi/linux-stm32mp-4.19-r0/fragment*.config`; do scripts/kconfig/merge_config.sh -m -r -O $PWD/../build $PWD/../build/.config $f; done
(ok)
PC $> make oldconfig O="$PWD/../build"
(STOP)
PROBLEM. The config script starts asking all of its unknown Y/n | y/N questions to which I have absolutely NO CLUE how to answer.
Please advise regarding how to proceed to get a correct build.
. . .
(not done):
PC $> make stm32mp157c-mydevicetree-mx.dtb LOADADDR=0xC2000040 O="$PWD/../build"
PC $> popd
PC $> ls -l $WORKDIR/kernel/build/arch/arm/boot/dts/stm32mp157c-mydevicetree-mx.dtb
(BTW I have rebuilt and reloaded this kernel more than once onto the EV1 without breaking anything so this is totally new behavior I'm seeing).
Thank you.
Solved! Go to Solution.
- Labels:
-
OpenSTLinux
-
ST-Boards
-
STM32MP15 Lines
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-22 2:59 AM
Hi @ThePUP​
Regarding the YES question see GitHub readme: https://github.com/STMicroelectronics/meta-st-stm32mp/blob/thud/recipes-kernel/linux/linux-stm32mp/README.HOW_TO.txt chapter 5
yes '' | make ARCH=arm oldconfig O="$PWD/../build"
Hope this helps
Milan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-22 2:45 AM
Hi @ThePUP​ ,
Please see first https://wiki.st.com/stm32mpu/wiki/I2C_device_tree_configuration
Note that "The STM32CubeMX may not support all the properties described" (chapter 4) and must be set manually.
If still not working, send your dts file.
Best reagrds,
Milan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-22 2:59 AM
Hi @ThePUP​
Regarding the YES question see GitHub readme: https://github.com/STMicroelectronics/meta-st-stm32mp/blob/thud/recipes-kernel/linux/linux-stm32mp/README.HOW_TO.txt chapter 5
yes '' | make ARCH=arm oldconfig O="$PWD/../build"
Hope this helps
Milan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-22 9:31 AM
using yes '' | make oldconfig ... does allow the build to continue and complete, even thought I'm not sure ALL the new configurations are really applicable. At any rate, here I am:
- I have completed building the .dtb from my cube-mx generated .dts.
- I have loaded and booted the ev1 using my cube-mx compiled .dtb. given so many _extlinux/ options, I simply copied my .dtb to the same name as the default distribution .dtb (stm32mp157c-ev1.dtb).
- The board boots with no indications differing from the default .dtb boot, so I assume my .dtb is ok at least.
BUT
- I still have no access to anything in linux /dev/i2cx that provides i2cutils to access the port.
- DO I NEED TO ALSO ENABLE SPECIFIC KERNEL DRIVER(s) FOR /dev/i2cx to access I2C5 ?
SO
I am attaching my cube-mx generated .dts source per your previous suggestion.
Thanks for the help (this is my first time through a DTB from scratch).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-22 11:09 AM
SOLVED (I believe)
I think my previous post was not needed because in fact my cube-mx generated .dts ==> kernel /boot/.dtb process was working in the first place. Thanks again for your suggestions on compilation, those helped.
With the ev1 distribution DTB loaded I get only /dev/i2c0 and /dev/i2c2.
With MY DTB loaded I get and additional /dev/i2c1. I don't know why I didn't see this earlier.
Below is screen dump from terminal showing that I can at least get address ACK from one of my devices now wired to I2C_EXT connector!
Very pleasant result for a Friday ...
root@stm32mp1:~# i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- UU -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@stm32mp1:~# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
40: -- -- UU -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@stm32mp1:~# i2cdetect -y 1 <-- /dev/i2c1 in linux (shows up w/ my DTB)
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- -- <-- this IS my device's address
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@stm32mp1:~# ls
Thanks again.
-pete
