lanefu changed the topic of #armbian-rockchip to: Armbian - Linux for ARM development boards | Rockchip SoC | www.armbian.com | This channel is relayed to the equivalent Discord channel | this channel is logged
DC-IRC has quit [Remote host closed the connection]
DC-IRC has joined #armbian-rockchip
<DC-IRC> [Discord] <lanefu> I'm really at a loss on how to troubleshoot this failure to load `snp.efi` on mainline uboot for rock 5b https://paste.next.armbian.com/osikibinus.rb
<DC-IRC> [Discord] <lanefu> ```
<DC-IRC> [Discord] <lanefu> ## Application failed, r = 2
<DC-IRC> [Discord] <lanefu> Boot failed (err=-22)
<DC-IRC> [Discord] <lanefu> ```
<DC-IRC> [Discord] <marty1938> Anyone else seeing failing ethernet for mainline 6.6.16 rock-3a?
<DC-IRC> [Discord] <marty1938> Anyone else seeing failing ethernet for mainline 6.6.16 rock-3a?
<DC-IRC> [Discord] <marty1938> ```
<DC-IRC> [Discord] <marty1938> [ 19.962488] rk_gmac-dwmac fe010000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
<DC-IRC> [Discord] <marty1938> [ 19.963576] rk_gmac-dwmac fe010000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)
<DC-IRC> [Discord] <marty1938> ```
<DC-IRC> [Discord] <kwiboo> Tested my cm3588 today and found the emmc issue, `mmc-hs200-1_8v` is missing in device tree, will send a U-Boot patch to mailing list shortly that makes U-Boot imply hs200 support when `mmc-hs400-1_8v` is declared, same as what linux does
<DC-IRC> [Discord] <narga_64> Ah great! Congrats on getting a CM3588 NAS 🔥
<DC-IRC> [Discord] <narga_64> It was getting a bit lonely with basically very very few people having one 😆
<DC-IRC> [Discord] <kwiboo> Looks like it was my own patch that got merged into U-Boot v2024.04 that broke booting from emmc on a few rk3588 boards, any board not adding `mmc-hs200-1_8v` prop to `sdhci` node in `<board>-u-boot.dtsi` is affected
<DC-IRC> [Discord] <kwiboo> Thanks, it does seems like a nice board
<DC-IRC> [Discord] <matthewcroughan> yeah, I discovered this recently, why is this?
<DC-IRC> [Discord] <matthewcroughan> mmc-hs200-1_8v works in u-boot, and 400 only works in Linux presumably
<DC-IRC> [Discord] <matthewcroughan> why does it have to be this way?
<DC-IRC> [Discord] <kwiboo> @matthewcroughan there is separate Kconfig options for HS200 and HS400 in U-Boot, and only HS200 is enabled by default on most rk35xx boards in mainline U-Boot, and unfortunately U-Boot and linux differs in how the props is handled, so boards must currently explicitly add the `mmc-hs200-1_8v` prop
<DC-IRC> [Discord] <narga_64> I see. Why is there even two dts per board in U-Boot?
<DC-IRC> [Discord] <narga_64> Like `rk3588s-rock-5a.dts` and also `rk3588s-rock-5a-u-boot.dtsi`?
<DC-IRC> [Discord] <narga_64> Does U-Boot only use the dtsi and the other one is for reference?
<DC-IRC> [Discord] <narga_64> Because I don't see them include each other
<DC-IRC> [Discord] <kwiboo> `rk3588s-rock-5a.dts` should be a 1:1 copy of mainline linux, and the `<board>-u-boot.dtsi` gets automatically included during build, so that U-Boot overrides/fixes can be added without modifiying original `.dts-file`
<DC-IRC> [Discord] <narga_64> Interesting, thanks! That's helpful
<DC-IRC> [Discord] <matthewcroughan> This is similar to my issues trying to get ethernet (gmac0) working on rk3588 on a board I have here
<DC-IRC> [Discord] <matthewcroughan> except I get -22 EINVAL
<DC-IRC> [Discord] <matthewcroughan> you're getting `-19` which means "No such device"
<DC-IRC> [Discord] <matthewcroughan> ```
<DC-IRC> [Discord] <matthewcroughan> errno 19
<DC-IRC> [Discord] <matthewcroughan> ENODEV 19 No such device
<DC-IRC> [Discord] <matthewcroughan> ```
<DC-IRC> [Discord] <matthewcroughan> @kwiboo do you know why I might end up with -22 trying to configure gmac0 on an rk3588 device? I've just reset the board to run android to see if I can get a proper running device tree dump
<DC-IRC> [Discord] <matthewcroughan> configuring gmac1 leads to `-110` which means timeout, presumably because gmac1 should indeed not exist, whereas gmac0 is -22 and I get `__stmmac_open: Cannot attach to PHY (error: -22)`
<DC-IRC> [Discord] <mariob> -22 is EINVAL, the real error is one line above
<DC-IRC> [Discord] <matthewcroughan> You're talking about in my dmesg, and not marty's right? My dmesg is https://termbin.com/kxmi
<DC-IRC> [Discord] <mariob> You can trace that error message back to the phy driver and see why it's failing exactly. Probably some less-obvious mistake in the DTS.
<DC-IRC> [Discord] <mariob> Yeah, your dmesg
<DC-IRC> [Discord] <kwiboo> Have you tried to use closest matchin mainline dts file? the evb or quartzpro64? or rock-5a if it is a rk3588s? they are pretty generic and slim and mostly follows reference hw design, so chances they are a good base, do not try to use a vendor/android device tree dump as-is on mainline
<DC-IRC> [Discord] <matthewcroughan> yeah I copied them all in many ways, and it always leads to something not working
<DC-IRC> [Discord] <matthewcroughan> primarily, I copied the pmic configuration from the evb-v10, and that leads to it crashing, and pci-e from other boards which leads to CPU stall
<DC-IRC> [Discord] <matthewcroughan> this is on collabora 6.9-rc1
<DC-IRC> [Discord] <kwiboo> then I would try to figure out what your dump closes matches at a vendor kernel tree, e.g. https://github.com/JeffyCN/mirrors/tree/kernel-6.1-2024_03_01/arch/arm64/boot/dts/rockchip and start very small, i.e. I can boot my u-boot most of my rk3588 boards using rk3588-generic.dts into linux without anything fancy like pmic/gmac/pcie/usb/display
<DC-IRC> [Discord] <matthewcroughan> @kwiboo here is the minimal DTS for example that I thought would enable gmac0, but instead leads to -22
<DC-IRC> [Discord] <matthewcroughan> https://termbin.com/190e
<DC-IRC> [Discord] <matthewcroughan> based on your rk3588-generic work
<DC-IRC> [Discord] <matthewcroughan> I don't have a dump quite yet, only an extraction from the vendor android image from @mecoblock which may contain extraneous information
<DC-IRC> [Discord] <matthewcroughan> I have a root shell to the android device right now, and I just need to get a statically linked dtc in there and execute it, in order to get the running dts
<DC-IRC> [Discord] <kwiboo> is that in u-boot or in linux?, for u-boot: have you enabled all required gmac/phy Kconfig options, also is this a rk3588s or rk3588 board? the gmac0 only exists on rk3588 not the s variant
<DC-IRC> [Discord] <matthewcroughan> the board is an rk3588, but why should the kconfig options for u-boot matter to the linux kernel?
<DC-IRC> [Discord] <matthewcroughan> unless I'm trying to perform netboot, the phy options for u-boot's kconfig shouldn't matter, right?
<DC-IRC> [Discord] <kwiboo> for RTL8211F ethernet phy to be discovered in linux it has to be reset in u-boot
<DC-IRC> [Discord] <kwiboo> especially if it uses the `reset-gpios` prop in the ethernet phy node
<DC-IRC> [Discord] <matthewcroughan> Ah crap.. so should I look at the kconfig for a board that configured RTL8211F?
<DC-IRC> [Discord] <matthewcroughan> What about RTL8111 btw? I do not see RTL8111 on the board, physically. So should I remove it?
<DC-IRC> [Discord] <matthewcroughan> I see RTL8111 in a lot of DTS that also have the RTL8211F, and am wondering if I'm missing it.
<DC-IRC> [Discord] <matthewcroughan> Here's a crude top view btw https://files.catbox.moe/rn1iqh.jpeg
<DC-IRC> [Discord] <kwiboo> any ethernet phy can have issue, see my old mail on mailing list at https://lore.kernel.org/linux-rockchip/47d55aca-bee6-810f-379f-9431649fefa6@kwiboo.se/ for some details on a chicken-and-egg problem that exists in linux related to probing ethernet phy
<DC-IRC> [Discord] <matthewcroughan> It's good that there is lore to this.. and that it's not an isolated issue
<DC-IRC> [Discord] <matthewcroughan> thank you for the knowledge
<DC-IRC> [Discord] <matthewcroughan> @kwiboo would you know anything about the CPU locking up when copying the PCI-E configuration from the evb? like this https://termbin.com/sbyu
<DC-IRC> [Discord] <kwiboo> Not really, from what I remember pcie could lead to lockups in U-Boot if pinctrl or clocks was not correctly described in device tree, so could be related to that
<DC-IRC> [Discord] <kwiboo> @narga_64 https://patchwork.ozlabs.org/patch/1921039/ should fix the emmc boot issue using the nanopc-t6-rk3588 target, will update my branches later, still have some other patches to update and send out
<DC-IRC> [Discord] <mariob> Missing or wrong reset gpio
<DC-IRC> [Discord] <mariob> You should really try to get a dtb dump from a working running image on the board
<DC-IRC> [Discord] <matthewcroughan> Yes, I'm currently statically linking DTC to do that
<DC-IRC> [Discord] <Tonymac32> @narga_64 good work on the cm3588 device tree BTW. I'm only disappointed I don't have one to help 🙂
<DC-IRC> [Discord] <narga_64> Thanks! Well I simply wanted to make my device work with the latest Linux kernel basically 😆 There is still improvements to be done though.
<DC-IRC> [Discord] <narga_64> I still don't know for example what `pinctrl` actually does (or at least the subnodes put in there), or the voltage regulators. Half of device tree stuff is still voodoo magic to me 🙃
<DC-IRC> [Discord] <narga_64> I guess Friendlyelec will have them in stock again at some point, so you'll be able to get one if you like
<DC-IRC> [Discord] <narga_64> Although I gotta say, for the amount of work hours I have put into this board (my NAS-to-be basically), I probably could have bought like a shiny x86 NAS and several nvme drives in addition 🥲
<DC-IRC> [Discord] <narga_64> Well, at least the rockchip consumes less power 😄
<DC-IRC> [Discord] <narga_64> Great 👍
<DC-IRC> [Discord] <narga_64> Although I gotta say, for the amount of work hours I have put into this board (my NAS-to-be basically), I probably could have bought like a shiny x86 NAS and several nvme drives in addition 🥲
<DC-IRC> [Discord] <narga_64> Well, at least the rockchip consumes less power 😄 And I learned some stuff. Although I'm not sure I'll ever be able to put it to use again
<DC-IRC> [Discord] <lanefu> as your hacker-instincts know--it's about the journey, not the destination..... but.... your work is definitely gonna benefit a lot of folks so lots of reward
<DC-IRC> [Discord] <narga_64> True! Sometimes I forget this. Thanks 👍
<DC-IRC> [Discord] <lanefu> i often go through those "why did I just do that?!" types of emotions after finishing a project lol
<DC-IRC> [Discord] <Tonymac32> ARM is a lifestyle choice. 😆
<DC-IRC> [Discord] <narga_64> Well I think my project is not finished yet 😅 Everytime I look through the build repo, I see some other path for improvement and get the urge to do something about it 😆
<DC-IRC> [Discord] <narga_64> Really gotta continue my Kubernetes journey though that I paused like a month ago
<DC-IRC> [Discord] <narga_64> You know, I really appreciate the power efficiency of ARM.
<DC-IRC> [Discord] <narga_64> Maybe one day I'll get a big ARM
<DC-IRC> [Discord] <narga_64> Like Ampere Altra
<DC-IRC> [Discord] <Tonymac32> Yeah it has that going for it, but at our scale you can save more money by putting your house lamps on timers and saving yourself long hours on PC's trying to fix the ARM stuff 😁
<DC-IRC> [Discord] <lanefu> blerg yeah I have one of those on my backlog too
<DC-IRC> [Discord] <lanefu> yeah they need like a 16 or 24 core chip for something slightly more entry level
<DC-IRC> [Discord] <narga_64> Good thought, maybe I should do that instead
<DC-IRC> [Discord] <Tonymac32> 😆
<DC-IRC> [Discord] <lanefu> you're not helping the cause tony
<DC-IRC> [Discord] <narga_64> But it's pretty satisfying nonetheless if the idle usage of your house is like 15W (without fridge/freezer)
<DC-IRC> [Discord] <monkablyat> wait there are already timers for other lights then plant lamps, future seems not bad
<DC-IRC> [Discord] <Tonymac32> (full disclosure) my timers are z-wave outlets run by home assistant hosted on an Odroiz XU4
<DC-IRC> [Discord] <Tonymac32> (full disclosure) my timers are z-wave outlets run by home assistant hosted on an Odroid XU4
<DC-IRC> [Discord] <Tonymac32> And a few z-wave switches
<DC-IRC> [Discord] <narga_64> Like built into the wall?
<DC-IRC> [Discord] <narga_64> Why Z-wave instead of ZigBee? Always thought that was some proprietary stuff
<DC-IRC> [Discord] <narga_64> I'm really behind in home automation stuff. Did use some ZigBee stuff many years ago but switched back to manual since I didn't see much use 🙃
<DC-IRC> [Discord] <Tonymac32> "built-in" to my closet in the living room 😆
<DC-IRC> [Discord] <Tonymac32> Z-wave covers locks too, and thermostats