SpacemiT: Add SD card support, CPU freq scaling and other fixups#9518
Conversation
https://lore.kernel.org/spacemit/CANAwSgRcatU3BQrsd11kA-nj_xos_Oa_47p0P_K+RYrB6QtfXA@mail.gmail.com/T/#t Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
https://lore.kernel.org/all/20260311-v7-0-rc1-rv-dis-int-before-restart-v1-1-bc46b4351cac@linux.dev/ Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
https://lore.kernel.org/spacemit/20260307043806.957175-1-amadeus@jmu.edu.cn/T/#t https://lore.kernel.org/spacemit/177285302252.135595.8145843484531781952.git-patchwork-notify@kernel.org/T/#t https://lore.kernel.org/spacemit/177285301226.135595.13840950042647803809.git-patchwork-notify@kernel.org/T/#t Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
https://lore.kernel.org/spacemit/20260308-shadow-deps-v1-0-0ceb5c7c07eb@mailbox.org/T/#t Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Assign CPU power supply to fully enable CPU DVFS. Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
https://lore.kernel.org/spacemit/abG3ofh1nLWPO_XS@aurel32.net/T/#t Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
CONFIG_CPUFREQ_DT=y CONFIG_NVMEM_LAYOUT_ONIE_TLV=m Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This time the kernel 7.0 boots and I have an initramfs prompt (stopped b/c not finding it's root file sys). Tested on SD card and NVME. I have to rename the *.dtb or change extlinux.conf in order to match DTB names:
The legacy and current Armbian images matches a DTB name to the Spacemit-K1 chip that is visible in u-boot via TLV_CODE_PRODUCT_NAME in the product_name env var. This is how the Bianbu u-boot is able to boot on different boards while Armbian uses the extlinux.conf file. Please either change the BOOT_FDT_FILE (for edge) in board config or rename *.dts in kernel tree. I attach a dmesg for futher analysis (SD-Card not inserted, u-boot started via MTD and NVME). |
sven-ola
left a comment
There was a problem hiding this comment.
Anyhow, this is a step forward for kernel 7.0. For that: please merge.
|
✅ This PR has been reviewed and approved — all set for merge! |
Do a PR and create a symlink in both legacy and current and update your $board.conf to point to the mainline tree If I would have stuck with the bianbu source names it would be |
|
The k1-orangepirv2 name is from upstream (Linux7)? The x1-orangepi name is stored in the chip and thus it is from the chip vendor, e.g. where you probably find MUSE in your board (stop u-boot, then printenv product_name should show "MUSE"). The kernel folks are rather stubborn, so if thats from there namespace I would adapt legacy and current... |
This makes sense as we are currently using vendor u-boot, but once we move to mainline u-boot this will no longer be the case. I would think staying ahead of the curb would be a better choice? Are you afraid that by renaming the DTS files in the kernel, this is some how going to break something? |
No, it's only a file name. Using the name stored in the chip has the (future) option to have a single "firmware for all". using the name from upstream promises less fiddling. Thus it's the latter... |
I suspect we could do this now by editing u-boot. Going that route would open up the door for UEFI I'm fine with either, its just not on my list of things to mess around with at the moment. You are more than welcome to have at it though :) |
This was tested on the BPI-F3 using the last musepipro test img I made. If we setup a boot script, we could "I suppose" get rid of individual If you are interested in working on it? |
Not sure if I want to do that now. Lets postpone and focus on unfinished tasks instead: I'll send a PR x1opirv.dtb->k1opirv2 first, then overthink / integrate that GPU package grab from Bianbu (see forum post on RV2), then massage Linux7, then maybe play a bit with the NPU/Ollama thingy, then unified images. LG // Sven-Ola |
Rename DTS/DTB files for OrangePi RV2/R2S to match the filename expected from Linux-7.x upstream. See discussion on armbian#9518 Signed-off-by: Sven-Ola Tuecke <sven-ola@gmx.de>
Rename DTS/DTB files for OrangePi RV2/R2S to match the filename expected from Linux-7.x upstream. See discussion on #9518 Signed-off-by: Sven-Ola Tuecke <sven-ola@gmx.de>
BPI-F3 / MusePi Pro
https://paste.armbian.com/vebelezife.yaml
SD card and CPU freq scaling is still being worked on upstream, but this at least gets us to a place that makes devel and testing easier.