Skip to content
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

add new board armsom-cm5-io #7211

Merged
merged 2 commits into from
Sep 13, 2024
Merged

Conversation

amazingfate
Copy link
Contributor

Description

ArmSoM CM5 is a rk3576 SoM compitable with raspberrypi CM4 carrier board. And CM5 IO is the official carrier board from ArmSoM.
More info:
https://docs.armsom.org/armsom-cm5
https://docs.armsom.org/armsom-cm5-io

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • ./compile.sh BOARD=armsom-cm5-io BRANCH=vendor BUILD_MINIMAL=no DEB_COMPRESS=xz KERNEL_CONFIGURE=no RELEASE=noble KERNEL_GIT=shallow BUILD_DESKTOP=yes DESKTOP_APPGROUPS_SELECTED= DESKTOP_ENVIRONMENT=gnome DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base
  • Tested with emmc and sdcard boot. Notice that sd card can't boot with a blank emmc, at least idbloader.img in emmc is necessary.

Checklist:

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@github-actions github-actions bot added size/large PR with 250 lines or more Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Sep 11, 2024
@SuperKali SuperKali added 11 Milestone: Fourth quarter release Needs review Seeking for review labels Sep 11, 2024
@nyanmisaka
Copy link
Collaborator

@amazingfate The jpeg encoder does not seem to be initialized, although it has been enabled in the device tree.

armsom-cm5-io mpp[4881]: mpp_platform: client 20 driver is not ready!
armsom-cm5-io mpp[4881]: hal_jpege_api_v2: vcodec type 10012200 can not find JPEG encoder device
armsom-cm5-io mpp[4881]: hal_jpege_api_v2: Assertion api failed at hal_jpege_init:68
armsom-cm5-io mpp[4881]: mpp_enc_hal: mpp_enc_hal_init hal hal_jpege init failed ret -1
armsom-cm5-io mpp[4881]: mpp_enc_hal: mpp_enc_hal_init could not found coding type 8
armsom-cm5-io mpp[4881]: mpp_enc: mpp_enc_init_v2 could not init enc hal
armsom-cm5-io mpp[4881]: mpp: error found on mpp initialization
armsom-cm5-io mpp[4881]: mpp_log: warning: use new logx function
armsom-cm5-io mpp[4881]: mpi: mpi_reset found invalid context (nil)


nyanmisaka@armsom-cm5-io:~$ sudo dmesg | grep -E "jpeg|JPEG|jpg|JPG"
[    6.989525] mpp_jpgdec 27910000.jpegd: Adding to iommu group 1
[    6.989696] mpp_jpgdec 27910000.jpegd: probe device
[    6.989839] mpp_jpgdec 27910000.jpegd: reset_group->rw_sem_on=0
[    6.989855] mpp_jpgdec 27910000.jpegd: reset_group->rw_sem_on=0
[    6.989911] mpp_jpgdec 27910000.jpegd: probing finish

@amazingfate
Copy link
Contributor Author

@amazingfate The jpeg encoder does not seem to be initialized, although it has been enabled in the device tree.

armsom-cm5-io mpp[4881]: mpp_platform: client 20 driver is not ready!
armsom-cm5-io mpp[4881]: hal_jpege_api_v2: vcodec type 10012200 can not find JPEG encoder device
armsom-cm5-io mpp[4881]: hal_jpege_api_v2: Assertion api failed at hal_jpege_init:68
armsom-cm5-io mpp[4881]: mpp_enc_hal: mpp_enc_hal_init hal hal_jpege init failed ret -1
armsom-cm5-io mpp[4881]: mpp_enc_hal: mpp_enc_hal_init could not found coding type 8
armsom-cm5-io mpp[4881]: mpp_enc: mpp_enc_init_v2 could not init enc hal
armsom-cm5-io mpp[4881]: mpp: error found on mpp initialization
armsom-cm5-io mpp[4881]: mpp_log: warning: use new logx function
armsom-cm5-io mpp[4881]: mpi: mpi_reset found invalid context (nil)


nyanmisaka@armsom-cm5-io:~$ sudo dmesg | grep -E "jpeg|JPEG|jpg|JPG"
[    6.989525] mpp_jpgdec 27910000.jpegd: Adding to iommu group 1
[    6.989696] mpp_jpgdec 27910000.jpegd: probe device
[    6.989839] mpp_jpgdec 27910000.jpegd: reset_group->rw_sem_on=0
[    6.989855] mpp_jpgdec 27910000.jpegd: reset_group->rw_sem_on=0
[    6.989911] mpp_jpgdec 27910000.jpegd: probing finish

Dirver of jpege is not enabled. I will build kernel with it enabled and test.

@amazingfate
Copy link
Contributor Author

Enable ROCKCHIP_MPP_JPGENC and ROCKCHIP_MPP_VDPP in kernel config.
ROCKCHIP_MPP_JPGENC is for jpege in rk3576 while ROCKCHIP_MPP_VDPP is for vdpp in rk3528.

@SuperKali
Copy link
Member

I will check it on my board, by default on my dts should be enabled

@SuperKali
Copy link
Member

SuperKali commented Sep 12, 2024

@amazingfate can be useful?

root@youyeetoo-r1-v3:~# sudo dmesg | grep -E "jpeg|JPEG|jpg|JPG"
[    9.611996] mpp_vepu2 jpege-ccu: probing start
[    9.612004] mpp_vepu2 jpege-ccu: probing finish
[   10.070067] mpp_vepu2 fdba0000.jpege-core: Adding to iommu group 4
[   10.070192] mpp_vepu2 fdba0000.jpege-core: probing start
[   10.070337] mpp_vepu2 fdba0000.jpege-core: attach ccu success
[   10.070364] mpp_vepu2 fdba0000.jpege-core: probing finish
[   10.070485] mpp_vepu2 fdba4000.jpege-core: Adding to iommu group 5
[   10.070545] mpp_vepu2 fdba4000.jpege-core: probing start
[   10.070655] mpp_vepu2 fdba4000.jpege-core: attach ccu success
[   10.070675] mpp_vepu2 fdba4000.jpege-core: probing finish
[   10.070781] mpp_vepu2 fdba8000.jpege-core: Adding to iommu group 6
[   10.070841] mpp_vepu2 fdba8000.jpege-core: probing start
[   10.070945] mpp_vepu2 fdba8000.jpege-core: attach ccu success
[   10.070967] mpp_vepu2 fdba8000.jpege-core: probing finish
[   10.071082] mpp_vepu2 fdbac000.jpege-core: Adding to iommu group 7
[   10.071144] mpp_vepu2 fdbac000.jpege-core: probing start
[   10.071247] mpp_vepu2 fdbac000.jpege-core: attach ccu success
[   10.071267] mpp_vepu2 fdbac000.jpege-core: probing finish
[   10.071683] mpp_jpgdec fdb90000.jpegd: Adding to iommu group 3
[   10.071848] mpp_jpgdec fdb90000.jpegd: probe device
[   10.071980] mpp_jpgdec fdb90000.jpegd: probing finish

My actual configuration:

root@youyeetoo-r1-v3:~# zcat /proc/config.gz | grep -i ROCKCHIP_MPP_*
CONFIG_ROCKCHIP_MPP_SERVICE=y
CONFIG_ROCKCHIP_MPP_PROC_FS=y
CONFIG_ROCKCHIP_MPP_RKVDEC=y
CONFIG_ROCKCHIP_MPP_RKVDEC2=y
CONFIG_ROCKCHIP_MPP_RKVENC=y
CONFIG_ROCKCHIP_MPP_RKVENC2=y
CONFIG_ROCKCHIP_MPP_VDPU1=y
CONFIG_ROCKCHIP_MPP_VEPU1=y
CONFIG_ROCKCHIP_MPP_VDPU2=y
CONFIG_ROCKCHIP_MPP_VEPU2=y
CONFIG_ROCKCHIP_MPP_IEP2=y
CONFIG_ROCKCHIP_MPP_JPGDEC=y
# CONFIG_ROCKCHIP_MPP_JPGENC is not set
CONFIG_ROCKCHIP_MPP_AV1DEC=y
# CONFIG_ROCKCHIP_MPP_VDPP is not set

@amazingfate
Copy link
Contributor Author

@SuperKali jpege is only found on rk3576 now and vdd is only found on rk3528. Rk3588 should have all vpu nodes working with current vendor kernel config.

@nyanmisaka
Copy link
Collaborator

Enable ROCKCHIP_MPP_JPGENC and ROCKCHIP_MPP_VDPP in kernel config. ROCKCHIP_MPP_JPGENC is for jpege in rk3576 while ROCKCHIP_MPP_VDPP is for vdpp in rk3528.

Thanks, that solved the problem.

@SuperKali
Copy link
Member

Rk3588 should have all vpu nodes working with current vendor kernel config.

Oh, i gotcha

@SuperKali SuperKali removed the Needs review Seeking for review label Sep 12, 2024
@SuperKali SuperKali added Ready to merge Reviewed, tested and ready for merge Needs review Seeking for review and removed Ready to merge Reviewed, tested and ready for merge labels Sep 12, 2024
@igorpecovnik igorpecovnik added the Ready to merge Reviewed, tested and ready for merge label Sep 12, 2024
@SuperKali SuperKali removed the Needs review Seeking for review label Sep 12, 2024
@amazingfate amazingfate merged commit 511fd0d into armbian:main Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11 Milestone: Fourth quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/large PR with 250 lines or more
Development

Successfully merging this pull request may close these issues.

4 participants