ChanServ changed the topic of #linux-rockchip to: Rockchip development discussion
naoki has quit [Quit: naoki]
naoki has joined #linux-rockchip
vagrantc has quit [Quit: leaving]
lurchi_ has quit [Quit: Konversation terminated!]
lurchi_ has joined #linux-rockchip
lurchi_ is now known as lurchi__
hanetzer has quit [Quit: WeeChat 3.7.1]
ldevulder_ has joined #linux-rockchip
ldevulder has quit [Ping timeout: 260 seconds]
vagrantc has joined #linux-rockchip
stikonas has quit [Ping timeout: 256 seconds]
rembo10 has quit [Quit: ZNC 1.8.2 - https://znc.in]
rembo10 has joined #linux-rockchip
vagrantc has quit [Quit: leaving]
<epoll> okay i've tried a few combinations
<epoll> u-boot 2022.10 with bl31 v1.32 hangs at the spl after checking the atf hashes
<epoll> u-boot 2022.10 with bl31 v1.28 gets to the kernel but the kernel hangs on "Starting kernel ..."
<epoll> u-boot 2023.01-rc4 with bl31 v1.28 hangs after "BL31: Initializing BL32" so it doesn't get past the spl
<epoll> and u-boot 2023.01-c4 with bl31 v1.32 hangs at atf invocation at the end of the spl (so it technically gets farther than 2022.10 with v1.32)
<epoll> i've tried building atf with this patch too https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/16952
<epoll> it gets to the kernel but it won't start (same symptoms as u-boot 2022.10 with v1.28)
ldevulder__ has joined #linux-rockchip
ldevulder_ has quit [Ping timeout: 260 seconds]
<epoll> i've also tried a more strict reordering of the atf entries in u-boot.its (by copying it from the bsp) and the symptoms for 2023.01-rc4 swap (between the bl31 version), while with 2022.10 both bl31 versions hang at starting the kernel
<epoll> what combination of 1) bl31 and 2) u-boot were people able to get this working on? are there any pointers to trees?
<epoll> does the kernel version matter too?
lurchi_ has joined #linux-rockchip
lurchi__ has quit [Ping timeout: 264 seconds]
macromorgan is now known as Guest3789
Guest3789 has quit [Killed (cadmium.libera.chat (Nickname regained by services))]
macromorgan has joined #linux-rockchip
ldevulder__ is now known as ldevulder
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #linux-rockchip
<epoll> fwiw the bsp u-boot can't boot the kernel either with the atf from that gerrit
<epoll> although it does get past the "Starting kernel ..." line
<epoll> it just hangs later in the boot
<epoll> oh? i got a dump
<pinchartl> seems expected
<pinchartl> what puzzles me is why you can't get mainline u-boot + binary BL31 to work
<pinchartl> as multiple people here reported success
<pinchartl> can anyone share a working git branch for u-boot ? :-)
<epoll> yeah that's what im puzzled by too
<pinchartl> (and maybe any build instructions that would be specific to this)
<naoki> on rock 3a, u-boot 2023.01 with bl31 v1.36 hangs after "Trying to boot from MMC1"
<naoki> u-boot 2023.01 with bl31 v1.28 with 6.1.6 kernel hangs after "[ 3.349304] hub 8-0:1.0: 1 port detected"
<naoki> hmmm.....
<naoki> radxa cm3 sodimm & e25 are working with u-boot 2023.01, bl31 v1.36, kernel 6.1.6
<epoll> for 2023.01-rc4 u-boot im on this branch https://git.uk.ideasonboard.com/epaul/u-boot/src/branch/rk3568
stikonas has joined #linux-rockchip
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #linux-rockchip
<CounterPillow> pinchartl: I'm currently using https://github.com/CounterPillow/u-boot-quartz64 (based on 2022.04) with some old bl31
<CounterPillow> I don't think mainline proper works for RK3568 at the moment, macromorgan was working on that I believe
<pinchartl> CounterPillow: thank you
<pinchartl> epoll: ^^
<pinchartl> can you test that ?
stikonas has quit [Remote host closed the connection]
stikonas has joined #linux-rockchip
<pinchartl> does anyone have gmac1 ethernet working in mainline (or mainline-ish, with extra patches) u-boot ? the compatible string used in rk356x.dtsi is not listed in the driver, I assume it requires custom ops/data
<CounterPillow> I know mine does not support it, unfortunately
<naoki> ah, kernel 6.1.6 is running... just uSD card is not detected...
<naoki> mainline linux can be booted (when uSD (rootfs) is detected properly...)
<pinchartl> naoki: thank you!
<pinchartl> which version of BL31 do you use with that ?
<pinchartl> thanks
<pinchartl> naoki: is ethernet working in u-boot in that branch ?
<naoki> well
<CounterPillow> naoki: try booting it a few times, I have an issue with my mainline-ish u-boot where the SD card isn't detected 1 out of every 4 boots
<naoki> I commented out most part of dts... only uart2 and mmc are enabled
<naoki> (let's try to use full dts...)
<pinchartl> naoki: I'm looking at the device tree sources in your branch, and gmac1 has compatible = "rockchip,rk3568-gmac", "snps,dwmac-4.20a";
<pinchartl> drivers/net/dwc_eth_qos.c has 3 matches entries
<pinchartl> "nvidia,tegra186-eqos", "st,stm32mp1-dwmac" and "nxp,imx8mp-dwmac-eqos"
<pinchartl> so I assume it won't work out-of-the-box
<naoki> grep compatible drivers/net/gmac_rockchip.c
<naoki> hmm
Tenkawa has joined #linux-rockchip
<pinchartl> oh, I hadn't noticed that one
<pinchartl> in the mainline kernel the compatible string matches with ethernet/stmicro/stmmac/dwmac-rk.c
<pinchartl> selected by CONFIG_DWMAC_ROCKCHIP
<pinchartl> which is a sub-option of CONFIG_STMMAC_ETH
* pinchartl wonders which u-boot driver is the matching one
<pinchartl> (if any)
<pinchartl> it looks like gmac_rockchip.c is for older SoCs, but I'm not entirely sure
<Tenkawa> pinchartl: what are you trying to work on? (I missed the beginning part)
<pinchartl> rock 3a, based on a rk3568
<pinchartl> I'd like to get mainline u-boot working on that, with ethernet support
<pinchartl> (and ideally mainline tf-a)
<pinchartl> it's epoll doing most of the work, I'm just supporting him
<Tenkawa> Let me check our build and see which u-boot we are using on our 3568
<Tenkawa> We build for the Odroid-M1 which is a 3568 so I'm going to see which u-boot we are using for it
<pinchartl> thanks
<Tenkawa> looks like we are still using a vendor u-boot still
<Tenkawa> We tried mainline but it was very flaky
<Tenkawa> The PWM, sensors, and something else (can't remember) was not reliable
<pinchartl> we tried the vendor u-boot too (from radxa) but it has no ethernet support
<Tenkawa> I have some RK3588's that are still waiting on a useable mainline update
<Tenkawa> Interesting..
Rathann has joined #linux-rockchip
<pinchartl> (well, it has ethernet, but no support for the ethernet controller on that SoC)
<Tenkawa> Nod
robmur01 has quit [Remote host closed the connection]
robmur01 has joined #linux-rockchip
stikonas has quit [Remote host closed the connection]
stikonas has joined #linux-rockchip
Tenkawa has quit [Quit: Was I really ever here?]
Rathann has quit [Remote host closed the connection]
vagrantc has joined #linux-rockchip
<macromorgan> sorry, was busy so I missed the previous conversation. Here's what I have for a branch that boots consistently for me on a 3566 device (tested on 4 distinct Anbernic based devices): https://github.com/macromorgan/u-boot-rk3566/tree/anbernic-v2022.10
<macromorgan> You either need to use the BL31 version 1.28 or prior, OR re-order the A-TF modules and rebuild your u-boot.itb if you use a BL31 greater than 1.28.
<macromorgan> I was slowly in the process of getting these patches mainlined, I started with the first 5 or so but still have more to go.
<macromorgan> The things that helped me with SD card detection are 1) setting the drive strength like so: https://github.com/u-boot/u-boot/commit/0f68095f176d4c5fcee4882a3960f87e07dc86ae and 2) dropping fifo mode like so: https://github.com/u-boot/u-boot/commit/918ffcf988fc89abb5fb3d74b6ffa9b8c0d692f8
<macromorgan> note that I have been using that branch for roughly 3 months now and in that time have had 0 issues detecting an SD card at all whether it be via cold boot or warm boot in U-Boot
<macromorgan> OHH, also make sure you set your clock speed for the MMC card... look at what I have for the "assigned-clocks" and "assigned-clock-rates". If the rates aren't set detection is intermittant too.
<macromorgan> so in summary for SD detection 1) set your drive strength (might be optional), 2) drop the fifo mode, and 3) set your clocks
<macromorgan> to be clear, the "assigned-clocks" and "assigned-clock-rates" I have set on the &cru node
<macromorgan> but yes... mainline U-Boot and mainline Linux work perfect for me now on the Anbernic RG353 devices, and all that's missing on the RG503 is the panel (and all of them are still missing wifi and bluetooth and suspend, but I'm working on that). U-Boot itself for me works perfectly fine.
lurchi_ has quit [Quit: Konversation terminated!]
lurchi_ has joined #linux-rockchip
lurchi_ is now known as lurchi__
stikonas_ has joined #linux-rockchip
stikonas has quit [Ping timeout: 264 seconds]
stikonas_ is now known as stikonas