Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2023 20:25:08 +0000
From:      Stanislav Silnicki <stanislav.silnicki@mailgate.us>
To:        Oskar Holmlund <info@ohdata.se>, "freebsd-arm" <freebsd-arm@freebsd.org>
Subject:   Re: STM32MP157
Message-ID:  <d12e3b1a90216.8e6290090dd15@mailgate.us>
References:  <4d6bf0126f4fb.c24cc5f2fa47c@mailgate.us> <cade2176971ebe57c4cf952a633e12d5@ohdata.se> <00cab7929791c.8af55c0bd1d5f@mailgate.us> <5d65957f4c04a4bec7ae6ef5469b149c@ohdata.se>

next in thread | previous in thread | raw e-mail | index | archive | help
------sinikael-?=_1-16986111093260.8140990208563574
Content-Type: text/plain; format=flowed
Content-Transfer-Encoding: 7bit

OK, I got the idea!
As I realize, there is a minor bug in dtc, which affects compilation of 
stm's originated DTBs. I think it is best to make a PR into 
https://github.com/davidchisnall/dtc, 
<https://github.com/davidchisnall/dtc,>; which I'm discussing with repo 
owner already. Please tell me, that I need to post PR into FBSD source tree 
if it is a shorter way for my fix.
My current setup is based upon QBASE1 from Karo-Electronics, but there is 
no goal to support/debug all peripherals, only a subset, including USB, 
I2C, SDMMC, DSI (and GPU, if lucky).
https://www.karo-electronics.com/fileadmin/download/Datasheets/QSMP-QSBASE1-Evalkit.pdf 
<https://www.karo-electronics.com/fileadmin/download/Datasheets/QSMP-QSBASE1-Evalkit.pdf>; 

The vendor (Karo) supports only their Yocto based Linux distro. I spent 
some time to prepare TF-A & Uboot, capable with booting from SD card (that 
is more robust approach, as I think). STM does not promote/support 
non-secure boot approach with SPL, they insist to use TF-A or OPTEE, so it 
is pretty cumbersome path, I had to pass. I think, it will be easier for me 
to prepare some sort of README to support customization of uboot for STM's 
port and dig it somewhere in SRC rather than try to post PR's in those 
repos... Not sure, anyway.
So far I'm struggling with uart and early_printf...
I'm mixing this activity with my current occupation, so I don't expect 
rapid progress.
Thank you for clarifications! I'll try to do my best!
Stan
Oskar Holmlund wrote:
Hi Stanislav,
Please resend your message and CC the arm mailing list. It might be 
interesting for someone in the future ( 
https://lists.freebsd.org/archives/freebsd-arm/ ) otherwise they all think 
you stopped working on the STM32 port.
You should always keep one terminal up n running % man 9 style :)
https://wiki.freebsd.org/Phabricator will give you some information.
Its good if you get to know the people active in the ARM area, just keep an 
eye on the mailinglist and you will notice some names. If you have the 
opportunity to join any of the conference (eurobsdcon.org, asiabsdcon.org, 
bsdcan.org) to get to know even more people.
Join the IRC, for example on efnet #bsdmips is a good channel for ARM 
stuff.
Start with small changes and you will get feedback. From there the 
experience will grow and you will get into it all.
Correct, the device-tree import is from the Linux kernel and there is no 
prior work for the STM32MP15 SoCs. I cant find anything about the 
STM32MP15x in Net or OpenBSD either.
Probably because the STM32MP15 is the first(?) application SoC from ST?
1) hum? Do you need that for the reviews? It should be in SRC
2) Target branch is probably main.
3) It depends, if your custom board is opensource and availble around the 
globe through mouser/farnell/.. I dont see any problem. Otherwise pick the 
board from ST that you used as a reference when you developed the custom 
board.
For example in my day job we have a custom board built around the 
octavosystems OSD3358 that can be found in pocketbeagle/beaglebone black 
wifi. So the code thats goes into the FreeBSD project are all tested on the 
beaglebone boards. The stuff we need for our custom board like the device 
tree is keept as local patches in our inhouse build process.
//Oskar
2023-10-28 14:25 skrev Stanislav Silnicki:
Hi Oskar!
 > can you point me some guidelines to help myself to fit development
process? I'm sure, there is mature dev. culture around FBSD and I'd be
happy to make my contribution coherently from the beginning.
 > So far I'm done with setup of my account at reviews (keys, 2FA, etc.)
 > As I understand, there is no considerable progress with STM32,
although I have noticed, there are some DTS imported into the project.
 > > Indeed, several major questions:
1. repo url?
2. tagret branch for patches for stm32 hw?
3. is it possible to target custom board from our project, or I have
to ensure support for all dev. boards, provided by STM?
 > Thank you,Stan
 > Oskar Holmlund wrote:
 >> 2023-10-27 22:33 skrev Stanislav Silnicki:
<block
quote class="gmail_quote" type="cite" style="margin:0 0 0 
.8ex;border-left:1px #ccc solid;padding-left:1ex">
 >>> Hello!
I'm porting onto the subject hardware. So far the progress is
modest,
while the system boots (without console although...)
One of major issues is hardcoded value inside locore-v6.S. Here
is my
relevant post:
 >> > 
https://community.st.com/t5/stm32-mpus-embedded-software/freebsd-port-for-mp157c/td-p/601438

[1]
What is the best way to proceed? Patch, vendor kernel build,
something
else?
Stan
 > Links:
------
 >> [1] >
 > 
https://community.st.com/t5/stm32-mpus-embedded-software/freebsd-port-for-mp157c/td-p/601438
 
>> Hi Stan,
 >> Upload your patch to reviews.freebsd.org
 >> Love to see your other patches for the STM32MP15x.
kquote>
</block
 >> //Oskar

------sinikael-?=_1-16986111093260.8140990208563574
Content-Type: text/html; format=flowed
Content-Transfer-Encoding: 7bit

<html><head></head><body><div>
                    
     
     
       
         <meta charset="utf-8">
       
       
         <div id="compose-body-wrapper" dir="auto"><div dir="auto"><div 
dir="auto" style="font-family: &quot;Open Sans&quot;, -apple-system, 
BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Helvetica Neue&quot;, 
Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI 
Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 
14px;">OK,&nbsp;<wbr>I&nbsp;<wbr>got&nbsp;<wbr>the&nbsp;<wbr>idea!<wbr></div><div 
dir="auto" style="font-family: &quot;Open Sans&quot;, -apple-system, 
BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Helvetica Neue&quot;, 
Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI 
Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 14px;"><br></div><div 
dir="auto" style="font-family: &quot;Open Sans&quot;, -apple-system, 
BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Helvetica Neue&quot;, 
Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI 
Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 
14px;"><wbr>As&nbsp;<wbr>I&nbsp;<wbr>realize,&nbsp;<wbr>there&nbsp;<wbr>is&nbsp;<wbr>a&nbsp;<wbr>minor&nbsp;<wbr>bug&nbsp;<wbr>in&nbsp;<wbr>dtc,&nbsp;<wbr>which&nbsp;<wbr>affects&nbsp;<wbr>compilation&nbsp;<wbr>of&nbsp;<wbr>stm's&nbsp;<wbr>originated&nbsp;<wbr>DTBs.&nbsp;<wbr>I&nbsp;<wbr>think&nbsp;<wbr>it&nbsp;<wbr>is&nbsp;<wbr>best&nbsp;<wbr>to&nbsp;<wbr>make&nbsp;<wbr>a&nbsp;<wbr>PR&nbsp;<wbr>into&nbsp;<wbr><a 
href="https://github.com/davidchisnall/dtc," target="_blank" rel="noopener 
noreferrer" title="https://github.com/davidchisnall/dtc," 
style="font-family: Roboto; font-weight: 
400;">https://github.com/davidchisnall/dtc,</a>&nbsp;<wbr>which&nbsp;<wbr>I'm&nbsp;<wbr>discussing&nbsp;<wbr>with&nbsp;<wbr>repo&nbsp;<wbr>owner&nbsp;<wbr>already.&nbsp;<wbr>Please&nbsp;<wbr>tell&nbsp;<wbr>me,&nbsp;<wbr>that&nbsp;<wbr>I&nbsp;<wbr>need&nbsp;<wbr>to&nbsp;<wbr>post&nbsp;<wbr>PR&nbsp;<wbr>into&nbsp;<wbr>FBSD&nbsp;<wbr>source&nbsp;<wbr>tree&nbsp;<wbr>if&nbsp;<wbr>it&nbsp;<wbr>is&nbsp;<wbr>a&nbsp;<wbr>shorter&nbsp;<wbr>way&nbsp;<wbr>for&nbsp;<wbr>my&nbsp;<wbr>fix.<wbr><br></div><div 
id="tmjah_g_1299" dir="auto" style="font-family: &quot;Open Sans&quot;, 
-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Helvetica 
Neue&quot;, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe 
UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 
14px;"><br></div><div id="tmjah_g_1299" dir="auto" style="font-family: 
&quot;Open Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe 
UI&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif, &quot;Apple Color 
Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; 
font-size: 
14px;"><wbr>My&nbsp;<wbr>current&nbsp;<wbr>setup&nbsp;<wbr>is&nbsp;<wbr>based&nbsp;<wbr>upon&nbsp;<wbr>QBASE1&nbsp;<wbr>from&nbsp;<wbr>Karo-<wbr>Electronics,&nbsp;<wbr>but&nbsp;<wbr>there&nbsp;<wbr>is&nbsp;<wbr>no&nbsp;<wbr>goal&nbsp;<wbr>to&nbsp;<wbr>support/<wbr>debug&nbsp;<wbr>all&nbsp;<wbr>peripherals,&nbsp;<wbr>only&nbsp;<wbr>a&nbsp;<wbr>subset,&nbsp;<wbr>including&nbsp;<wbr>USB,&nbsp;<wbr>I2C,&nbsp;<wbr>SDMMC,&nbsp;<wbr>DSI 
(<wbr>and&nbsp;<wbr>GPU,&nbsp;<wbr>if&nbsp;<wbr>lucky).<wbr></div><div 
id="tmjah_g_1299" dir="auto" style="font-family: &quot;Open Sans&quot;, 
-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Helvetica 
Neue&quot;, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe 
UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 14px;"><a 
href="https://www.karo-electronics.com/fileadmin/download/Datasheets/QSMP-QSBASE1-Evalkit.pdf" 
target="_blank" rel="noopener noreferrer" 
title="https://www.karo-electronics.com/fileadmin/download/Datasheets/QSMP-QSBASE1-Evalkit.pdf">https://www.karo-electronics.com/fileadmin/download/Datasheets/QSMP-QSBASE1-Evalkit.pdf</a></div><div 
id="tmjah_g_1299" dir="auto" style="font-family: &quot;Open Sans&quot;, 
-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Helvetica 
Neue&quot;, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe 
UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 
14px;"><br></div><div id="tmjah_g_1299" dir="auto" style="font-family: 
&quot;Open Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe 
UI&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif, &quot;Apple Color 
Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; 
font-size: 14px;"><wbr>The&nbsp;<wbr>vendor 
(<wbr>Karo)&nbsp;<wbr>supports&nbsp;<wbr>only&nbsp;<wbr>their&nbsp;<wbr>Yocto&nbsp;<wbr>based&nbsp;<wbr>Linux&nbsp;<wbr>distro.&nbsp;<wbr>I&nbsp;<wbr>spent&nbsp;<wbr>some&nbsp;<wbr>time&nbsp;<wbr>to&nbsp;<wbr>prepare&nbsp;<wbr>TF-<wbr>A 
&amp;&nbsp;<wbr>Uboot,&nbsp;<wbr>capable&nbsp;<wbr>with&nbsp;<wbr>booting&nbsp;<wbr>from&nbsp;<wbr>SD&nbsp;<wbr>card 
(<wbr>that&nbsp;<wbr>is&nbsp;<wbr>more&nbsp;<wbr>robust&nbsp;<wbr>approach,&nbsp;<wbr>as&nbsp;<wbr>I&nbsp;<wbr>think).&nbsp;<wbr>STM&nbsp;<wbr>does&nbsp;<wbr>not&nbsp;<wbr>promote/<wbr>support&nbsp;<wbr>non-<wbr>secure&nbsp;<wbr>boot&nbsp;<wbr>approach&nbsp;<wbr>with&nbsp;<wbr>SPL,&nbsp;<wbr>they&nbsp;<wbr>insist&nbsp;<wbr>to&nbsp;<wbr>use&nbsp;<wbr>TF-<wbr>A&nbsp;<wbr>or&nbsp;<wbr>OPTEE,&nbsp;<wbr>so&nbsp;<wbr>it&nbsp;<wbr>is&nbsp;<wbr>pretty&nbsp;<wbr>cumbersome&nbsp;<wbr>path,&nbsp;<wbr>I&nbsp;<wbr>had&nbsp;<wbr>to&nbsp;<wbr>pass.&nbsp;<wbr>I&nbsp;<wbr>think,&nbsp;<wbr>it&nbsp;<wbr>will&nbsp;<wbr>be&nbsp;<wbr>easier&nbsp;<wbr>for&nbsp;<wbr>me&nbsp;<wbr>to&nbsp;<wbr>prepare&nbsp;<wbr>some&nbsp;<wbr>sort&nbsp;<wbr>of&nbsp;<wbr>README&nbsp;<wbr>to&nbsp;<wbr>support&nbsp;<wbr>customization&nbsp;<wbr>of&nbsp;<wbr>uboot&nbsp;<wbr>for&nbsp;<wbr>STM's&nbsp;<wbr>port&nbsp;<wbr>and&nbsp;<wbr>dig&nbsp;<wbr>it&nbsp;<wbr>somewhere&nbsp;<wbr>in&nbsp;<wbr>SRC&nbsp;<wbr>rather&nbsp;<wbr>than&nbsp
 ;<wbr>try&nbsp;<wbr>to&nbsp;<wbr>post&nbsp;<wbr>PR's&nbsp;<wbr>in&nbsp;<wbr>those&nbsp;<wbr>repos...&nbsp;<wbr>Not&nbsp;<wbr>sure,&nbsp;<wbr>anyway.<wbr></div><div 
id="tmjah_g_1299" dir="auto" style="font-family: &quot;Open Sans&quot;, 
-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Helvetica 
Neue&quot;, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe 
UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 
14px;"><br></div><div id="tmjah_g_1299" dir="auto" style="font-family: 
&quot;Open Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe 
UI&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif, &quot;Apple Color 
Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; 
font-size: 14px;"><div 
dir="auto"><wbr>So&nbsp;<wbr>far&nbsp;<wbr>I'm&nbsp;<wbr>struggling&nbsp;<wbr>with&nbsp;<wbr>uart&nbsp;<wbr>and&nbsp;<wbr>early_printf...<wbr></div><div 
dir="auto"><br></div><div 
dir="auto"><wbr>I'm&nbsp;<wbr>mixing&nbsp;<wbr>this&nbsp;<wbr>activity&nbsp;<wbr>with&nbsp;<wbr>my&nbsp;<wbr>current&nbsp;<wbr>occupation,&nbsp;<wbr>so&nbsp;<wbr>I&nbsp;<wbr>don't&nbsp;<wbr>expect&nbsp;<wbr>rapid&nbsp;<wbr>progress.<wbr></div><div 
dir="auto"><br></div><div 
dir="auto"><wbr>Thank&nbsp;<wbr>you&nbsp;<wbr>for&nbsp;<wbr>clarifications!&nbsp;<wbr>I'll&nbsp;<wbr>try&nbsp;<wbr>to&nbsp;<wbr>do&nbsp;<wbr>my&nbsp;<wbr>best!<wbr></div><div 
dir="auto"><br></div><div dir="auto"><wbr>Stan</div></div></div><div 
dir="auto"><br></div></div><div class="replyHeader" dir="auto">Oskar 
Holmlund wrote:</div><br><br><div><blockquote 
cite="mid:5d65957f4c04a4bec7ae6ef5469b149c@ohdata.se" type="cite" 
style="margin:0 0 0 .8ex;border-left:1px #ccc 
solid;padding-left:1ex"><div>Hi Stanislav,</div><div><br></div><div>Please 
resend your message and CC the arm mailing list. It might be interesting 
for someone in the future ( https://lists.freebsd.org/archives/freebsd-arm/ 
) otherwise they all think you stopped working on the STM32 
port.</div><div><br></div><div>You should always keep one terminal up n 
running % man 9 style :)</div><div>https://wiki.freebsd.org/Phabricator 
will give you some information.</div><div>Its good if you get to know the 
people active in the ARM area, just keep an eye on the mailinglist and you 
will notice some names. If you have the opportunity to join any of the 
conference (eurobsdcon.org, asiabsdcon.org, bsdcan.org) to get to know even 
more people.</div><div>Join the IRC, for example on efnet #bsdmips is a 
good channel for ARM stuff.</div><div><br></div><div>Start with small 
changes and you will get feedback. From there the experience will grow and 
you will get into it all.</div><div><br></div><div>Correct, the device-tree 
import is from the Linux kernel and there is no prior work for the 
STM32MP15 SoCs. I cant find anything about the STM32MP15x in Net or OpenBSD 
either.</div><div>Probably because the STM32MP15 is the first(?) 
application SoC from ST?</div><div><br></div><div><br></div><div>1) hum? Do 
you need that for the reviews? It should be in SRC</div><div>2) Target 
branch is probably main.</div><div>3) It depends, if your custom board is 
opensource and availble around the globe through mouser/farnell/.. I dont 
see any problem. Otherwise pick the board from ST that you used as a 
reference when you developed the custom board.</div><div>For example in my 
day job we have a custom board built around the octavosystems OSD3358 that 
can be found in pocketbeagle/beaglebone black wifi. So the code thats goes 
into the FreeBSD project are all tested on the beaglebone boards. The stuff 
we need for our custom board like the device tree is keept as local patches 
in our inhouse build 
process.</div><div><br></div><div>//Oskar</div><div><br></div><div><div>2023-10-28 
14:25 skrev Stanislav Silnicki:</div></div><br><blockquote 
class="gmail_quote" type="cite" style="margin:0 0 0 .8ex;border-left:1px 
#ccc solid;padding-left:1ex"><div> Hi Oskar!</div><div> &gt; can you point 
me some guidelines to help myself to fit development</div><div> process? 
I'm sure, there is mature dev. culture around FBSD and I'd be</div><div> 
happy to make my contribution coherently from the beginning.</div><div> 
&gt; So far I'm done with setup of my account at reviews (keys, 2FA, 
etc.)</div><div> &gt; As I understand, there is no considerable progress 
with STM32,</div><div> although I have noticed, there are some DTS imported 
into the project.</div><div> &gt; &gt; Indeed, several major 
questions:</div><div> 1. repo url?</div><div> 2. tagret branch for patches 
for stm32 hw?</div><div> 3. is it possible to target custom board from our 
project, or I have</div><div> to ensure support for all dev. boards, 
provided by STM?</div><div> &gt; Thank you,Stan</div><div> &gt; Oskar 
Holmlund wrote:</div><div> &gt;&gt; 2023-10-27 22:33 skrev Stanislav 
Silnicki:</div><br><block<div>quote class="gmail_quote" type="cite" 
style="margin:0 0 0 .8ex;border-left:1px #ccc 
solid;padding-left:1ex"&gt;<div> &gt;&gt;&gt; Hello!</div><br><blockquote 
class="gmail_quote" type="cite" style="margin:0 0 0 .8ex;border-left:1px 
#ccc solid;padding-left:1ex"><br><blockquote class="gmail_quote" 
type="cite" style="margin:0 0 0 .8ex;border-left:1px #ccc 
solid;padding-left:1ex"><div> I'm porting onto the subject hardware. So far 
the progress is</div><div> modest,</div><div> while the system boots 
(without console although...)</div><div> One of major issues is hardcoded 
value inside locore-v6.S. Here</div><div> is my</div><div> relevant 
post:</div><div> &gt;&gt; &gt; 
https://community.st.com/t5/stm32-mpus-embedded-software/freebsd-port-for-mp157c/td-p/601438</div><div>; 
[1]</div><div> What is the best way to proceed? Patch, vendor kernel 
build,</div><div> something</div><div> else?</div><div> 
Stan</div><br></blockquote><br><blockquote class="gmail_quote" type="cite" 
style="margin:0 0 0 .8ex;border-left:1px #ccc 
solid;padding-left:1ex"><br></blockquote><div> &gt; 
Links:</div><br></blockquote><div> ------</div><div> &gt;&gt; [1] 
&gt;</div><div> &gt; 
https://community.st.com/t5/stm32-mpus-embedded-software/freebsd-port-for-mp157c/td-p/601438</div><div>; 
&gt;&gt; Hi Stan,</div><div> &gt;&gt; Upload your patch to 
reviews.freebsd.org</div><div> &gt;&gt; Love to see your other patches for 
the 
STM32MP15x.</div><br><div><div>kquote&gt;</div></div><br></block<div></blockquote><div> 
&gt;&gt; //Oskar</div></blockquote></div>
       
     
   
                   </div></body></html>
------sinikael-?=_1-16986111093260.8140990208563574--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d12e3b1a90216.8e6290090dd15>