LibreELEC.tv icon indicating copy to clipboard operation
LibreELEC.tv copied to clipboard

Rockchip: add initial support for RK356x

Open Kwiboo opened this issue 1 year ago • 14 comments

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:

  • Adding initial RK3568 device support to the build system
  • Update rkbin to latest version and add support for using ROCKCHIP_TPL when building U-Boot
  • Boot RK356x devices using mainline U-Boot 2023.07

There 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 in scripts/uboot_helper, this value is used when building a bootable u-boot for the targeted device.

PR will be updated with related u-boot and minimal linux patches until U-Boot 2023.07 has been released.

Future PRs will focus on improving Linux display and media stack.

Kwiboo avatar May 21 '23 23:05 Kwiboo

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 (https://github.com/torvalds/linux/commit/05620031408ac6cfc6d5c048431827e49aa0ade1), but at least it is already there. :-)

MarkusTeufelberger avatar May 23 '23 14:05 MarkusTeufelberger

@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.

Kwiboo avatar May 27 '23 20:05 Kwiboo

I have a Pine64 Quartz64 Model A and B and if there's an image to download, I'd happily test it.

diederikdehaas avatar Jun 15 '23 12:06 diederikdehaas

I tested U-boot part, success build, flash, boot.

zhangn1985 avatar Dec 22 '23 03:12 zhangn1985

is there any effort on rkvdec-v2 which used on RK3568

zhangn1985 avatar Feb 02 '24 07:02 zhangn1985

u-boot is already at 2024.04 in this repo, is there still something missing to go forward with RK356x support?

MarkusTeufelberger avatar May 06 '24 23:05 MarkusTeufelberger

@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 avatar May 07 '24 08:05 Kwiboo

@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

catalinii avatar Jun 30 '24 15:06 catalinii

Here is the sha I used: https://github.com/catalinii/LibreELEC.tv/commit/7c4d31690522366b6a244d9be52e675ece5d2b8f

catalinii avatar Jul 03 '24 00:07 catalinii

@Kwiboo
Hi Jonas, do you have a plane to get this merged?

andyshrk avatar Jul 24 '24 08:07 andyshrk

@catalinii @andyshrk I will try to take a new look next week or two

Kwiboo avatar Jul 24 '24 11:07 Kwiboo