-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rockchip: add initial support for RK356x and RK3588 #7864
base: master
Are you sure you want to change the base?
Conversation
I have a https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R5C here that eventually is planned to run LibreELEC, if there is anything I can do to help/test please just comment here. Support for the device itself has ended up in Linux fairly recently (torvalds/linux@0562003), but at least it is already there. :-) |
170a08c
to
17fe9cc
Compare
@MarkusTeufelberger thanks, I have imported the r5c/r5s device tree into my local u-boot repo and will push patches and build images that can be tested in next few days. Still some rk356x u-boot patches to finalize and submit upstream before that. |
fd78fa9
to
99e9f0b
Compare
I have a Pine64 Quartz64 Model A and B and if there's an image to download, I'd happily test it. |
7bb13af
to
be77d9a
Compare
1f90f47
to
3c07da8
Compare
I tested U-boot part, success build, flash, boot. |
is there any effort on |
u-boot is already at 2024.04 in this repo, is there still something missing to go forward with RK356x support? |
@MarkusTeufelberger not that I know, will try to update re-test this PR later this weekend. Both mainline U-Boot and Linux kernel should be in a good enough state for most 1080p usage last time I checked. |
@Kwiboo I rebased this PR on the latest master, removed both u-boot and kernel patches and built an image for rock 3a. The image works with hw acceleration using EGL rendering. I think it would be very valuable to get this PR merged |
Here is the sha I used: catalinii@7c4d316 |
@Kwiboo |
@catalinii @andyshrk I will try to take a new look next week or two |
@Kwiboo It would mean a lot for the users of rk3568 if this would be merged :) |
I am running local test on RK356x boards again and have pushed an update, also included a initial RK3588 target without display/HDMI support. Hoping to have a final PR and drop from draft later this month, we may also want to wait on final Linux v6.11 to add support for a few more boards that have landed upstream. |
0a7e266
to
106d5cc
Compare
I can test both rock-3a or rock-5b if needed |
Hi, I've just ordered a FriendlyElec's NanoPC-T6 based on RK3588. |
@gonciarz I think PR still misses some critical patches such as the HDMI support (which will be part of 6.13) for rk3588 to work. Then there is the lack of support for HDMI audio and CEC. |
5178b56
to
6843881
Compare
GRAPHIC_DRIVERS="panfrost" | ||
|
||
# kernel serial console | ||
EXTRA_CMDLINE="console=uart8250,mmio32,0xfe660000 console=tty0 coherent_pool=2M cec.debounce_ms=5000 mem=3838M" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first console
should get earlycon=uart8250,mmio32,0xfe660000
- besides of being more correct this will also prevent double printing lines in case systemd.debug_shell
is the same uart port.
Would good if other devices would be updated accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because most/all supported boards has a proper /chosen/stdout-path
prop, we could just add earlycon
without any options and Linux should pick up correct configuration.
Having the console=uart8250,mmio32,0xfe660000
ensure uart2 get full kernel startup logs when quiet
is dropped.
prevent double printing lines in case systemd.debug_shell is the same uart port
Do you have a simple way to reproduce this?
I have mostly seen double logs when I incorrectly had a second uart2 console added, i.e. console=ttyS2
, something that is not needed with the first console=uart8250
already added.
My serial debug cmdline for these boards is typically:
earlycon console=uart8250,mmio32,0xfe660000 systemd.debug-shell=ttyS2 textmode ssh
Seem to correctly configure the early bootconsole and later hand of to a console at ttyS2
and once kernel is running a debug shell is attached to ttyS2
.
I would have preferred to add console=ttyS2
instead of console=uart8250,mmio32,0xfe660000
, however then we would need to include the baudrate, i.e. console=ttyS2,1500000n8
, with use of console=uart8250
the 8250 serial driver picks up the baudrate already configured by bootloader and/or earlycon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the console=uart8250,mmio32,0xfe660000 ensure uart2 get full kernel startup logs when quiet is dropped.
Without having this tested recently: This was always the case with only console=mmio...
and the second console
arg set to console=tty0
for me, but that might have changed. I've always needed to change the second to console=ttySX
to get a full bootlog. I really wonder if we are doing the right thing here, as having two console
args looks just wrong. To my understanding console=tty0
is needed for the frambuffer console used by plymouth
- maybe it's time to switch to non-lite version of plymouth
which supports drm
and doesn't rely on ancient fb console 😆
That being said you should probably pull in HDMI-patches for RK3588 which have been merged 6.13, as I'd expect LE to stay on expected-LTS 6.12 kernel for a while and then is PR should be GTG, as the remaining issues (iommu issue with DRAM addresses > 4 GB, no rkvdec2 driver) are not expected to be resolved soonish.
@Kwiboo Hi, is there a chance you may rename PR's title. It also covers RK3588 SoC. |
Done |
Use thermal zone type to determin how to read cpu or gpu temp
Starting with U-Boot v2024.07 RK3328 and RK3399 have common Kconfig options enabled by default. Keep DISPLAY/VIDEO, USB_KEYBOARD, ENV_IS_IN and EFI_LOADER options disabled to speed up boot.
This PR introduces initial support for Rockchip RK356x devices.
U-Boot 2023.07, scheduled for 03 July 2023, will be the first version with decent support for RK356x/RK3588.
The PR currently include and depends on #7365 and will be kept in draft state until
u-boot
package has been updated to 2023.07.Main focus of this PR is:
rkbin
to latest version and add support for usingROCKCHIP_TPL
when building U-BootThere are two variants of the SoC supported using the same device, RK3566 and RK3568, they are very similar but unfortunately require unique ddr init blobs.
A new
soc
value is defined for the added devices inscripts/uboot_helper
, this value is used when building a bootableu-boot
for the targeted device.PR will be updated with related
u-boot
and minimallinux
patches until U-Boot 2023.07 has been released.Future PRs will focus on improving Linux display and media stack.