[Bug 1215995] New: [Mediatek] mt8195-demo: please help to include these MediaTek drivers in initrd.img in CD/DVD release image
https://bugzilla.suse.com/show_bug.cgi?id=1215995 Bug ID: 1215995 Summary: [Mediatek] mt8195-demo: please help to include these MediaTek drivers in initrd.img in CD/DVD release image Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: aarch64 OS: openSUSE Tumbleweed Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-bugs@opensuse.org Reporter: macpaul.lin@mediatek.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- Reference: [Ubuntu] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2035591 [Impact] Peripheral probe failure and boot to console failure for MediaTek boards 'mt8195-demo' and 'genio-1200-evk'. [Kernel version] 6.4~latest Note: 'COMMON_CLK_MT8195' has been refactored since kernel 6.4. Hence many 'clk-mt8195-foo.ko' are required in initrd.img. [MediaTek relate drivers] file: mediatek-drivers-for-mt8195-demo-bringup.txt (Not listed in probing sequence) Clock drivers: clk-mt8195-apusys_pll clk-mt8195-cam clk-mt8195-ccu clk-mt8195-img clk-mt8195-imp_iic_wrap clk-mt8195-ipe clk-mt8195-mfg clk-mt8195-scp_adsp clk-mt8195-vdec clk-mt8195-vdo0 clk-mt8195-vdo1 clk-mt8195-venc clk-mt8195-vpp0 clk-mt8195-vpp1 clk-mt8195-wpe clk-mt8195-msdc Other peripheral and power drivers: i2c-mt65xx spi-mt65xx reset-ti-syscon mt6397 rtc-mt6397 mtk-pmic-wrap mt6315-regulator spmi-mtk-pmif mtk_scp mtk_scp_ipi mediatek-drm mtk-vcodec-dec mtk-vcodec-enc mtk_jpeg mtk-vcodec-common mtk-jpeg-enc-hw mtk-vpu mtk-jpeg-dec-hw mtk-cmdq-helper mtk-cmdq-helper mtk-cmdq-mailbox mtk-mdp3 phy-mtk-mipi-dsi-drv btmtk leds-mt6360 tcpci_mt6360 mt6360_charger mt6360-regulator mt6360-core mt6359-regulator mt6360-adc snd-soc-mt8195-afe snd-soc-mtk-common snd-soc-dmic dwmac-mediatek stmmac-platform stmmac mtk-rng mtk_rpmsg pwm-mediatek pwm-mtk-disp nvmem_mtk-efuse mtk-sd cqhci phy-mtk-tphy mtu3 xhci-mtk-hcd mtk_iommu mtk-smi phy-mtk-pcie pcie-mediatek-gen3 [file: mediatek-drivers-for-mt8195-demo-bringup.txt] description: module drivers should be included in initrd.img [file: lsmod-i1200-demo-kernel-6.2-dracut-initrd.txt] description: lsmod-i1200-demo-kernel-6.2-dracut-initrd.txt [file: /etc/modprobe.d/mediatek.conf] description: module dependencies (Not optimized yet, some dependencies between modules might need to be fixed.) [Other info] effected kernel (6.4~latest) [Known issue] 1. USB port 1 failed (t-phy, xhci port 1, and hub port not working) port3 is working. 2. Ethernet driver loaded but not working. 3. PCIE not working. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c1 Ivan Ivanov <ivan.ivanov@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(macpaul.lin@media | |tek.com) --- Comment #1 from Ivan Ivanov <ivan.ivanov@suse.com> --- Well, I can't believe that all of these needs to be part of initrd :-). I can accept that they are needed to have all peripheral devices work properly, but just to be able to mount rootfs, really? -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c2 --- Comment #2 from Macpaul Lin <macpaul.lin@mediatek.com> --- I think some of the multimedia parts (video/camera encoder/decoders) could be excluded. But I think display might be necessary for installation with panels when uart is not available on some boards? Since Debian supports accessibility speech synthesis installation, I'm not sure if audio part could also be excluded? Video encode/decoders: mtk-vcodec-dec mtk-vcodec-enc mtk_jpeg mtk-vcodec-common mtk-jpeg-enc-hw mtk-vpu mtk-jpeg-dec-hw Audio: snd-soc-mt8195-afe snd-soc-mtk-common snd-soc-dmic Many of the clocks are share and they have some dependencies. I need to check which clocks are not related to display systems. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c3 --- Comment #3 from Macpaul Lin <macpaul.lin@mediatek.com> --- Created attachment 869976 --> https://bugzilla.suse.com/attachment.cgi?id=869976&action=edit /etc/modprobe.d/mediatek.conf (version 20231006) /etc/modprobe.d/mediatek.conf (version 20231006) This is not the optimized version but the settings could help to bring up system to console with USB port 3 enabled, which could be used for U-disk installation. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c4 --- Comment #4 from Macpaul Lin <macpaul.lin@mediatek.com> --- (In reply to Macpaul Lin from comment #3)
Created attachment 869976 [details] /etc/modprobe.d/mediatek.conf (version 20231006)
/etc/modprobe.d/mediatek.conf (version 20231006) This is not the optimized version but the settings could help to bring up system to console with USB port 3 enabled, which could be used for U-disk installation.
Oops.. How can I delete this attachment? I've found there are some return/line feed characters issue of this file. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 Macpaul Lin <macpaul.lin@mediatek.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #869976|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c5 --- Comment #5 from Macpaul Lin <macpaul.lin@mediatek.com> --- Created attachment 869977 --> https://bugzilla.suse.com/attachment.cgi?id=869977&action=edit /etc/modprobe.d/mediatek.conf (version 20231006) This is not the optimized version but the settings could help to bring up system to console with USB port 3 enabled, which could be used for U-disk installation. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c6 --- Comment #6 from Macpaul Lin <macpaul.lin@mediatek.com> --- Created attachment 869978 --> https://bugzilla.suse.com/attachment.cgi?id=869978&action=edit mediatek-drivers-for-mt8195-demo-bringup (version 20231006) Maybe this file could be saved as /etc/modules-load.d/mediatek.conf Some of the multimedia drivers could be removed if they are not related to display. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c7 --- Comment #7 from Macpaul Lin <macpaul.lin@mediatek.com> --- Created attachment 869979 --> https://bugzilla.suse.com/attachment.cgi?id=869979&action=edit lsmod log for i1200-demo on kernel 6.2 with dracut made initrd.img (version 20231006) The clock were refactored since kernel 6.4. Hence clock modules were all built-in in kernel 6.2 and not included in this 'lsmod' dump log. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c8 --- Comment #8 from Ivan Ivanov <ivan.ivanov@suse.com> --- Hi, it will be of great help if you could narrow down minimal list of required modules which makes you platform bootable. Here what you could do: Download kernel-default package from here [1]. Click on "Grab binary packages directly" from section "Packages for ARM", get the one which end with aarch64.rpm. Save downloaded package. Download latest "minimal" Tumbleweed ISO from here [2]. Specify which modules you think are essential for device to boot. For example: MODULES="i2c-mt65xx spi-mt65xx pinctrl-mt8195 mt6315-regulator phy-mtk-tphy \ mtk-pmic-wrap mediatek-drm mt6359-regulator mt6357-regulator" Create driver upadate package (DUD) [3] from the downloaded kernel package: mkdud --create mediatek.dud --dist TW --install repo kernel-default* Rebuild installation ISO [4] init ramfs with your additional modules specified above. sudo mksusecd --verbose --create mediatek.iso --rebuild-initrd \ --initrd mediatek.dud --kernel kernel-default* \ --modules ${MODULES} -- openSUSE-Tumbleweed-NET-aarch64-Current.iso Test new mediatek.iso. Please try to narrow down required modules. Once you are happy with the result share the lit of modules here. Hope this helps. [1] https://software.opensuse.org//download.html?project=Kernel%3Astable&package=kernel-default [2] https://download.opensuse.org/ports/aarch64/tumbleweed/iso/openSUSE-Tumblewe... [3] https://github.com/openSUSE/mkdud [4] https://github.com/openSUSE/mksusecd -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c9 --- Comment #9 from Macpaul Lin <macpaul.lin@mediatek.com> --- Hi Ivan, Thank you for providing very clear steps. I must say that Suse's 'mkdud' and 'mksusecd' are very easy to get started and use. Although there are no dpkg packages, I can use alien to convert them into .deb files, so I can run these debug steps on Ubuntu. When I put all the drivers (about 50+) into initrd.img, it's clear that most of the drivers can be detected. This also includes USB HOST and ethernet. After about half a day of cleaning up, it is now clear that to support the USB host driver (USB PORT 3) on the mt8195-demo board, the following drivers need to be added. This is base on the current iso images and kernel packages. For enable USB HOST: MODULES="clk-mt8195-imp_iic_wrap mt6360_charger mtk-pmic-wrap nvmem_mtk-efuse" The following are the binaries I've used: - kernel: kernel-default-6.5.6-1.1.gc97c2df.aarch64.rpm current-ISO: - openSUSE-Tumbleweed-NET-aarch64-Snapshot20231003-Media.iso I'll do next for enabling the ethernet driver. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c10 Ivan Ivanov <ivan.ivanov@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |snwint@suse.com --- Comment #10 from Ivan Ivanov <ivan.ivanov@suse.com> --- Hi Steffen, Macpaul Lin is working on creating narrow list of modules which are required in inirtd for Mediatek demo board to boot (comment#9). Please could you help integrate required changes in installation-images once Macpaul Lin is ready? Thanks! -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c11 --- Comment #11 from Macpaul Lin <macpaul.lin@mediatek.com> --- Hi Ivan and Steffen, To enable USB HOST and Ethernet driver for mt8195-demo boards more clock drivers are required. Solution: MODULES="clk-mt8195-imp_iic_wrap mt6360_charger mtk-pmic-wrap nvmem_mtk-efuse clk-mt8195-vdec clk-mt8195-venc clk-mt8195-vdo0 clk-mt8195-vdo1 clk-mt8195-vpp0 clk-mt8195-vpp1 clk-mt8195-wpe clk-mt8195-ipe clk-mt8195-cam clk-mt8195-ccu clk-mt8195-img" Compared previous found solution for enabling USB HOST. MODULES="clk-mt8195-imp_iic_wrap mt6360_charger mtk-pmic-wrap nvmem_mtk-efuse" There are more multi media clocks drivers are required, and I just could not to get rid any one from the following list to enable ethernet. "clk-mt8195-vdec clk-mt8195-venc clk-mt8195-vdo0 clk-mt8195-vdo1 clk-mt8195-vpp0 clk-mt8195-vpp1 clk-mt8195-wpe clk-mt8195-ipe clk-mt8195-cam clk-mt8195-ccu clk-mt8195-img" After checking the code, ethernet only depends on 'topckgen' and 'apmixsys' which should be a built-in clock driver already. Is it possible to create a cd-image with adding softdep to ethernet drivers? I'm not sure if re-order the probe sequence will help. The following logs are the 'lsmod' log for used ethernet drivers. realtek 36864 1 dwmac_mediatek 16384 0 stmmac_platform 32768 1 dwmac_mediatek stmmac 282624 3 stmmac_platform,dwmac_mediatek pcs_xpcs 20480 1 stmmac phylink 69632 2 stmmac,pcs_xpcs At last, I could use the modified 'openSUSE-Tumbleweed-DVD-aarch64-Snapshot20231010-Media.iso' with these driver to install Suse on to the mt8195-demo right now. However there still some issue blocking system boot after installation. I'll attach the boot log later. But at this stage, please help to add the solution into pre-built CD/DVD image at least we could get installer to work on mt8195-demo boards. Thanks. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c12 --- Comment #12 from Macpaul Lin <macpaul.lin@mediatek.com> --- Hi, By adding blasklist modules to kernel cmdline in grub I could boot the installation into console. "module_blacklist=arm_dsu_pmu,ffa-module,drm,mediatek-drm" I'm not sure if this is because I've chosen 'server installation' hence I'm not sure if some display relate drivers were not included. Thank you for the supporting. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c13 --- Comment #13 from Chester Lin <chester.lin@suse.com> --- (In reply to Macpaul Lin from comment #12)
Hi,
By adding blasklist modules to kernel cmdline in grub I could boot the installation into console.
Do you mean serial console? or tty console via any video port?
"module_blacklist=arm_dsu_pmu,ffa-module,drm,mediatek-drm"
I'm not sure if this is because I've chosen 'server installation' hence I'm not sure if some display relate drivers were not included. Thank you for the supporting.
-- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c14 --- Comment #14 from Chester Lin <chester.lin@suse.com> --- (In reply to Chester Lin from comment #13)
(In reply to Macpaul Lin from comment #12)
Hi,
By adding blasklist modules to kernel cmdline in grub I could boot the installation into console.
Do you mean serial console? or tty console via any video port?
"module_blacklist=arm_dsu_pmu,ffa-module,drm,mediatek-drm"
I'm not sure if this is because I've chosen 'server installation' hence I'm not sure if some display relate drivers were not included. Thank you for the supporting.
You may need to check if any DT dependencies [e.g. nodes and drivers they should match] required by mediatek-drm could be unavailable at that time since the module could be automatically deferred by kernel. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c15 --- Comment #15 from Steffen Winterfeldt <snwint@suse.com> ---
Please could you help integrate required changes in installation-images once Macpaul Lin is ready?
Sure. Just ping we when you have the list. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c17 --- Comment #17 from Macpaul Lin <macpaul.lin@mediatek.com> --- Created attachment 870132 --> https://bugzilla.suse.com/attachment.cgi?id=870132&action=edit /var/log/boot.msg generated when the system is booted via USB disk with CD-Image -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c19 --- Comment #19 from Macpaul Lin <macpaul.lin@mediatek.com> --- Created attachment 870134 --> https://bugzilla.suse.com/attachment.cgi?id=870134&action=edit /var/log/boot.log generated on a Suse installed mt8195-demo board. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c22 --- Comment #22 from Steffen Winterfeldt <snwint@suse.com> --- Done: https://github.com/openSUSE/installation-images/pull/665 -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c23 --- Comment #23 from Ivan Ivanov <ivan.ivanov@suse.com> --- Thank you Seffen! Do happen to know if there a way that Bugzilla is notified when new ISO with PR#665 is build and published? -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c24 --- Comment #24 from Steffen Winterfeldt <snwint@suse.com> ---
Do happen to know if there a way that Bugzilla is notified when new ISO with PR#665 is build and published?
Not to my knowledge. You have to check regularly. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c25 --- Comment #25 from Macpaul Lin <macpaul.lin@mediatek.com> --- (In reply to Steffen Winterfeldt from comment #22)
Done:
Thanks for you all. I've tested 20231013's daily build. openSUSE-Tumbleweed-DVD-aarch64-Snapshot20231013-Media.iso The installation process on "mt8195-demo" board was very smooth. After booting, user need to add kernel CMDLINE with "module_blacklist=arm_dsu_pmu,ffa-module,drm,mediatek-drm" for avoiding unsupported drivers. I've also found adding "loglevel=8" is required. It seems there are some timing or dependency issues when probing the drivers. Next MediaTek will continue on enabling PCIE and display systems. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c26 Ivan Ivanov <ivan.ivanov@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(macpaul.lin@media | |tek.com) | --- Comment #26 from Ivan Ivanov <ivan.ivanov@suse.com> --- Thanks for the feedback Macpaul Lin. I would suggest to close this bug and open new one for the rest of the peripheral device support. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 https://bugzilla.suse.com/show_bug.cgi?id=1215995#c27 Macpaul Lin <macpaul.lin@mediatek.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #27 from Macpaul Lin <macpaul.lin@mediatek.com> --- Verified with openSUSE-Tumbleweed-DVD-aarch64-Snapshot20231013-Media.iso daily build. (heart) -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215995 Macpaul Lin <macpaul.lin@mediatek.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1216767 -- You are receiving this mail because: You are the assignee for the bug.
participants (1)
-
bugzilla_noreply@suse.com