-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
RK3588 edge kernel: Add support for Linux 6.10 + introduce stable current
branch (6.8)
#6699
Conversation
I can check edge2 and opi5 patches weekend |
I can test opi5+ hdmi by chance |
armsom-sige7 has been upstreamed to v6.10. I will push a commit later to delete the dts under |
Doesn't the current dts in the dt folder have more stuff like |
I think if a given file is upstream, the correct thing is to convert the bare-DT into a patch. Otherwise, there's a tendency that although "there's no conflicts", in practice/runtime there might be problems -- the bare-DT will simply overwrite the mainline one, and we will have a very hard time understanding what the hell is going on. eg: suppose Amazingfate forgot this, we might be a couple months before we even realized that board had an old DT vs a new kernel. It has happened in the past that we had patches that rewrote most of a DT on purpose, but I think those are mostly gone by now. (Helios64, if memory doesn't fail me, and others). At the same time, being able to quickly overwrite a DT without fiddling with patches is useful for development and trying out things, etc -- so I hesitate to prevent overwrites from happening in the patching tool. Maybe a large warning would be enough? Either way, thanks for the work! -- I shall cherry pick right now & test on nanopct6 |
276cc40
to
4c07190
Compare
Your reasonign does make sense! Even though I'm still not a huge fan of patches in general. Maybe I just need to figure out a faster workflow to create or apply patches :) One of my biggest time losers is that my IDE can't edit kernel files in the
Yes, definitely don't remove it, I use the overwriting a lot :) |
Cherry picked and built. Boots. Seems stable. Haven't tested any HDMI / GPU or such since my T6 runs headless for now. (The T6 needs a blob bump to be stable, will PR separately since it's in board file). |
Awesome, thanks for testing!
U-Boot blob? |
OPi5+ does not boot. Does not stop always on the same step. I assume this is because stuff is executed in parallel and order might change randomly. Two examples: |
armsom sige7 also not boot
|
After disabling the hdmi dts patch, I can boot now. So the hdmi driver patch should have issues. |
Thanks for testing! I have discovered the same. Booting a board without the HDMI nodes enabled in the dts file OR removing the patch series (0161-0174) does not have any problem. So the patched in HDMI controller driver might have some problems. I may investigate more about this issue, but @amazingfate is much more versed in HDMI stuff than me since I don't use HDMI stuff much. |
I tried building the current Collabora 6.10 kernel for comparison, and their kernel doesn't even build, at least not with Armbian (because warning is treated as error?) Collabora rk3588-hdmi-bridge-v6.10-rc1: [🔨] drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c: In function 'rockchip_hdmi_parse_dt':
[🔨] drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c:280:40: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_clk_get_optional'? [-Werror=implicit-function-declaration]
[🔨] 280 | hdmi->qp_enable_gpio = devm_gpiod_get_optional(hdmi->dev, "enable",
[🔨] | ^~~~~~~~~~~~~~~~~~~~~~~
[🔨] | devm_clk_get_optional
[🔨] drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c:281:64: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function)
[🔨] 281 | GPIOD_OUT_HIGH);
[🔨] | ^~~~~~~~~~~~~~
[🔨] drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c:281:64: note: each undeclared identifier is reported only once for each function it appears in
[🔨] drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c: In function 'dw_hdmi_rockchip_encoder_enable':
[🔨] drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c:364:17: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration]
[🔨] 364 | gpiod_set_value(hdmi->qp_enable_gpio, 1);
[🔨] | ^~~~~~~~~~~~~~~
[🔨] cc1: some warnings being treated as errors
[🔨] make[7]: *** [scripts/Makefile.build:244: drivers/gpu/drm/rockchip/dw_hdmi-rockchip.o] Error 1
[🔨] make[6]: *** [scripts/Makefile.build:485: drivers/gpu/drm/rockchip] Error 2
[🔨] make[5]: *** [scripts/Makefile.build:485: drivers/gpu/drm] Error 2
[🔨] make[4]: *** [scripts/Makefile.build:485: drivers/gpu] Error 2 Soooooo things might be complicated... |
Yeah:
On my fork, I've done some work to move things around (using |
Heck, we could even call it |
No no no no no, let's better keep things simple and similar accross all Armbian kernels. 😀 If at all, I believe we should establish even more consistency accross boards and families, rather than spread them apart. That's mostly how it currently is I believe. |
60f7748
to
2b0666e
Compare
04243b0
to
d6de4a8
Compare
Update: I have fixed HDMI :) Tested with NanoPi R6C (command line over HDMI only, no desktop) |
🥳
Excellent, was my intention all along.
It's better. |
- Bump mainline kernel from 6.10-rc1 to 6.10-rc2 - Remove patches which are now mainlined - Re-number "fix-initial-PERST-GPIO-value" patch as per number ordering seen in 0000.patching_config.yaml - Rewrite kernel config
"general-add-overlay-compilation-support.patch" became obsolete in Linux 6.9 (see AR-2352 [1]). Fix this problem: - Rename *.dts sources in overlay directory to *.dtso - Change "target +=" line to "dts-y +=" in overlay Makefile - Remove "always +=" line in overlay Makefile - Add .scr compilation support in kernel scripts/Makefile.lib - Patch kernel scripts/Makefile.dtbinst to avoid flattening overlay directory For the last two points, see general-add-overlay-compilation-support.patch Credits for this fix go to @paolosabatino [1] https://armbian.atlassian.net/browse/AR-2352
This simplifies the process updating to newer kernel versions and makes it easier to see and edit the actual dts file being used.
Patches are from the Linux Rockchip Mailing List, submitted by Alexey Charkov. [1] Notable improvements from changelog: - Moved the TSADC enablement to per-board .dts/.dtsi files - Dropped extra "inefficient" OPPs (same voltage - lower frequencies) - Dropped second passive cooling trips altogether to keep things simple - Added a cooling map for passive GPU cooling (in a separate patch) - Added regulator coupling for EVB1 and QuartzPro64 Also enable automatic fan control on Rock 5B. [1] https://lore.kernel.org/linux-rockchip/[email protected]/
The old driver didn't build on 6.10, so the kernel build couldn't finish. Fix this driver.
This enables powerkey functionality for the PrangePi 5 Plus and other devices using the RK805
Since the `edge` kernel branch often uses RC kernels, introduce a more stable `current` branch. This branch should not be RC kernels and it also should move to an LTS kernel once released.
Move kernel patch folder to archive/rockchip-rk3588-${KERNEL_MAJOR_MINOR} which is the default. Also rename kernel config to linux-rockchip-rk3588-${KERNEL_MAJOR_MINOR}
7ca077b
to
8eb6916
Compare
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.
Lets merge before more conflicts come in from main.
We can always fix edge
more during next -rcX's and current
should exactly as edge before this.
current
branch (6.8)
Merged 🎉 |
Description
The general improvements for RK3588 on 6.9 and 6.10 weren't as many as we've hoped, but still this is what was mainlined:
We already had most of those features patched in via patches, but this gives us the chance to finally be able to remove those and stay closer to mainline.
-> PR summary: (+5,895 - 28,098) ~=
22,000 lines less👍 (meaning less hassles in the future, less maintenance needed) (not anymore since this PR now introduces acurrent
kernel branch for RK3588)In addition to that, I have also updated our patch to support RK3588 thermal sensors and management, enabling and improving the use of cooling fans. This patch also includes updates for CpuFreq and OPP.
We had an old patch that patched in the HDMI Controller driver, but this patch does not build on 6.10. Fortunately, I was able to include a new, improved version for this driver, which is as recent as 1st of June.This driver patch set did not work, thus I fixed the old patch that wouldn't build on 6.10.Since out "general-add-overlay-compilation-support.patch" became obsolete in Linux 6.9 (see AR-2352) , @paolosabatino developed an improved way on adding overlays as first seen in #6690. I have adapted this patch for 6.10, which also paves the way for other kernel bumps to 6.10 in the future.
In addition to that, there are some fixes included for Orange Pi 5 and Khadas Edge 2 patches, which were failing on 6.10.
Please see the commit messages for details.
How Has This Been Tested?
./compile.sh BOARD=nanopc-cm3588-nas BRANCH=edge RELEASE=trixie EXPERT=yes KERNEL_CONFIGURE=no BUILD_MINIMAL=no BUILD_DESKTOP=no
Checklist: