MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.91k stars 501 forks source link

Rock 5B - Uarts #6989

Open isarrider opened 8 months ago

isarrider commented 8 months ago

Hi,

on my Rock 5B I can only see 2 Uarts: │ ttyS6 console : [On] │ │ ttyFIQ0 console : [Off] │ I guess thats is similar for everybody when not on a newer kernel like here: https://forum.armbian.com/topic/27877-rs232-activation/

And it has to wait for a kernel update?

BR, Alex

MichaIng commented 8 months ago

Which kernel version do you currently have?

uname -a
isarrider commented 8 months ago

Latest that comes along: Linux Rock5-4GB 5.10.160-legacy-rk35xx

MichaIng commented 8 months ago

Ah right. I wanted to add builds for the new Linux 6.1 "vendor" branch Armbian generated for RK3588. But I need to add support for building those to our GitHub Actions workflow.

isarrider commented 8 months ago

https://forum.armbian.com/topic/32108-how-to-switch-to-mainline-kernel-in-armbian-2311-on-orange-pi-5/ this guy already went to 6.7

isarrider commented 8 months ago

https://www.collabora.com/news-and-blog/blog/2024/02/21/almost-a-fully-open-source-boot-chain-for-rockchips-rk3588/ seems folks are active around the 3588

isarrider commented 8 months ago

https://gitlab.collabora.com/hardware-enablement/rockchip-3588/notes-for-rockchip-3588/-/blob/main/mainline-status.md

isarrider commented 8 months ago

looking at this 6.1 might not be enough for UART...

isarrider commented 6 months ago

This would also work here, right? https://github.com/MichaIng/DietPi/issues/6797

isarrider commented 6 months ago

Doing "apt install linux-{image,dtb}-vendor-rk35xx" on the Rock 5B works, but then u only have: ttyFIQ0 console : [Off] and nth else... This link shows that 6.3 changes sth as there is then support... Any plan to get the Rock 5B also to the latest kernel?

isarrider commented 6 months ago

and it gives you btw this Kernel: Linux Rock5-4GB 6.1.43-vendor-rk35xx #1 SMP Sat May 11 11:15:57 UTC 2024 aarch64 GNU/Linux

MichaIng commented 6 months ago

Hmm, there are a bunch of overlays for RK3588 and UART, but not sure whether they apply in this particular case: image Can you try that: rk3588 is the prefix, so use e.g. uart0-m2 in the overlays= line (in case add it) in /boot/dietpiEnv.txt to enable UART0. Not sure which one is which on this SBC, and whether they really work on all RK3588 SBCs, but worth to try.

isarrider commented 6 months ago

I saw that but it seemed so random and I was hpoing for a newer kernel where it should be in... But let me try...

isarrider commented 6 months ago

doenst change, still: ttyFIQ0 console : [Off] no matter if with or without prefix...

MichaIng commented 6 months ago

It must be without prefix, else it cannot work. Also the file extension must be skipped. So really just "uart0-m2", respectively.

overlays=uart0-m2

And try that with all overlays, whether any of them works.

isarrider commented 6 months ago

We get this (and again what learned ;)) with overlays=uart0-m2: ttyS0 console : [Off] ttyFIQ0 console : [Off]

MichaIng commented 6 months ago

So far so good. The question then is which pins that one uses, which UART you need and if it actually works 🙂.

isarrider commented 6 months ago

actually I need more than one UART - so only a tiny step. Like a car with one instead of zero wheels... ;)

MichaIng commented 6 months ago

Just add more overlays, space-separated:

overlays=uart0-m2 uart1-m1

I read some time ago, but forgot what those -mX suffixes mean 🤔.

isarrider commented 6 months ago

hmm - interesting - didnt know you can use more of them at once... Could be a good workaround until a newer kernel is there...

MichaIng commented 4 months ago

@isarrider Does it work to enable the UARTs you need? Since those overlays exist, it is expected that one must use them, a newer kernel won't change something about it (unless mainline defaults are different in this regards). But at some point I want to add a dietpi-config menu to toggle overlays.