imx95 + la12xx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx95 + la12xx

289 Views
yrj
Contributor III

hi NXP

      问题描述:我现在使用imx95加la1234,之间通过pcie连接,我现在将hostsw_la12xx的kernel_driver编译,并且加载了yami.ko,让后通过lspci没有查看到la1234这个设备

     1.我现在la1234中没有烧写程序,需要烧写程序以后imx95才可以通过lspci查看吗,如何烧写呢

0 Kudos
Reply
1 Reply

274 Views
yipingwang
NXP TechSupport
NXP TechSupport

从现象看,当前问题大概率不是 host 侧 yami.ko 编译或加载本身导致的。lspci 能看到 LA1234 的前提是 LA1234 已经作为 PCIe Endpoint 正常启动,并且 PCIe link 已经训练成功。

如果 LA1234 端目前没有烧写/启动任何程序,那么 i.MX95 侧通过 lspci 看不到 LA1234 是合理的。需要先让 LA1234 从支持的 boot source 启动 LA12xx 端 BSP/FreeRTOS/PCIe EP firmware,使其完成 PCIe Endpoint 初始化后,i.MX95 作为 Root Complex 才能枚举到该设备。

hostsw_la12xx/kernel_driver/yami.ko 是 host Linux 侧 LA12xx PCIe driver。它通常是在 PCIe 设备已经能被 host 枚举后,再负责 LA12xx 进一步初始化,例如 PCIe inbound/outbound window、e200 OS boot、VSPA image boot、IPC/RFIC 等。它不能在 LA1234 端完全未启动 PCIe EP 的情况下,让设备直接出现在 lspci 中。

建议先按以下方向检查:

  1. 确认 LA1234 boot mode/boot source 是否正确,LA1234 端是否已启动包含 PCIe Endpoint driver 的 LA12xx BSP/FreeRTOS image。
  2. 确认 LA1234 PCIe controller 配置为 EP,i.MX95 侧配置为 RC。
  3. 检查 PCIe REFCLK、PERST#、power sequence、SerDes lane 设置、lane width/speed 是否匹配。
  4. i.MX95 侧先执行 dmesg | grep -i pcieecho 1 > /sys/bus/pci/rescanlspci -nn -vv,确认是否有任何 endpoint 枚举。
  5. 若仍无设备,建议先用一个已知可工作的 PCIe endpoint 接到 i.MX95,确认 i.MX95 RC 侧硬件和 device tree/kernel 配置没有问题;然后再回到 LA1234 侧检查 EP boot 和硬件连接。

关于如何烧写 LA1234,需要使用 LA12xx SDK/BSP 中提供的 LA1234/LA12xx 端 boot image 和对应烧写流程。公开的 hostsw_la12xx 仓库主要是 host 侧软件,FreeRTOS 端代码不在该仓库中,因此需要参考 LA12xx SDK User Guide / BSP release package 中关于 LA12xx board boot 和 image programming 的章节。

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2399779%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3Eimx95%20%2B%20la12xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399779%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3Ehi%20NXP%3C%2FP%3E%3CP%3EProblem%20Description%3A%20I'm%20currently%20using%20an%20IMX95%20and%20a%20LA1234%20connected%20via%20PCIe.%20I've%20compiled%3CA%20title%3D%22kernel_driver%22%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-qoriq%2Fhostsw_la12xx%2Ftree%2Foss%2Fkernel_driver%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%20the%20kernel%20driver%3C%2FA%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-qoriq%2Fhostsw_la12xx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%20for%20hostsw_la12xx%3C%2FA%3E%20and%20loaded%20yami.ko%2C%20but%20I%20can't%20detect%20the%20LA1234%20device%20using%20LSPCI.%3C%2FP%3E%3CP%3E1.%20I%20don't%20have%20a%20program%20for%20burning%20into%20my%20LA1234.%20Do%20I%20need%20to%20burn%20the%20program%20before%20I%20can%20view%20it%20via%20LSPCI%3F%20How%20do%20I%20burn%20the%20program%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2399786%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20imx95%20%2B%20la12xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399786%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CDIV%3E%0A%3CP%3EBased%20on%20the%20observed%20phenomena%2C%20the%20current%20problem%20is%20most%20likely%20not%20caused%20by%20the%3CCODE%20translate%3D%22no%22%3Eyami.ko%3C%2FCODE%3E%20compilation%20or%20loading%20process%20on%20the%20host%20side.%3CCODE%20translate%3D%22no%22%3Elspci%3C%2FCODE%3E%20The%20premise%20for%20seeing%20LA1234%20is%20that%20LA1234%20has%20already%20started%20normally%20as%20a%20PCIe%20Endpoint%20and%20the%20PCIe%20link%20has%20been%20successfully%20trained.%3C%2FP%3E%0A%3CP%3EIf%20no%20programs%20have%20been%20flashed%2Fbooted%20on%20the%20LA1234%2C%20it's%20reasonable%20that%20the%20i.MX95%20side%20cannot%20see%20the%20LA1234%20via%20%3CCODE%20translate%3D%22no%22%3Elspci%3C%2FCODE%3E.%20The%20LA1234%20needs%20to%20boot%20from%20a%20supported%20boot%20source%20to%20run%20the%20LA12xx%20BSP%2FFreeRTOS%2FPCIe%20EP%20firmware%2C%20completing%20the%20PCIe%20Endpoint%20initialization%2C%20before%20the%20i.MX95%2C%20as%20the%20Root%20Complex%2C%20can%20enumerate%20the%20device.%3C%2FP%3E%0A%3CP%3E%3CCODE%20translate%3D%22no%22%3Ehostsw_la12xx%2Fkernel_driver%2Fyami.ko%3C%2FCODE%3E%20This%20is%20the%20host%20Linux-side%20LA12xx%20PCIe%20driver.%20It%20typically%20handles%20further%20LA12xx%20initialization%20after%20the%20PCIe%20device%20has%20been%20enumerated%20by%20the%20host%2C%20such%20as%20PCIe%20inbound%2Foutbound%20windows%2C%20e200%20OS%20boot%2C%20VSPA%20image%20boot%2C%20IPC%2FRFIC%2C%20etc.%20It%20cannot%20allow%20the%20device%20to%20appear%20directly%20in%20%3CCODE%20translate%3D%22no%22%3Elspci%3C%2FCODE%3E%20if%20the%20PCIe%20EP%20is%20not%20fully%20enabled%20on%20the%20LA1234%20side.%3C%2FP%3E%0A%3CP%3EWe%20recommend%20checking%20in%20the%20following%20directions%20first%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EVerify%20that%20the%20LA1234%20boot%20mode%2Fboot%20source%20is%20correct%2C%20and%20that%20the%20LA1234%20has%20started%20the%20LA12xx%20BSP%2FFreeRTOS%20image%20containing%20the%20PCIe%20Endpoint%20driver.%3C%2FLI%3E%0A%3CLI%3EConfirm%20that%20the%20LA1234%20PCIe%20controller%20is%20configured%20as%20EP%2C%20and%20the%20i.MX95%20side%20is%20configured%20as%20RC.%3C%2FLI%3E%0A%3CLI%3ECheck%20if%20PCIe%20REFCLK%2C%20PERST%23%2C%20power%20sequence%2C%20SerDes%20lane%20settings%2C%20and%20lane%20width%2Fspeed%20are%20matched.%3C%2FLI%3E%0A%3CLI%3EThe%20i.MX95%20side%20first%20executes%20%3CCODE%20translate%3D%22no%22%3Edmesg%20%7C%20grep%20-i%20pcie%3C%2FCODE%3E%2C%20%3CCODE%20translate%3D%22no%22%3Eecho%201%20%26gt%3B%20%2Fsys%2Fbus%2Fpci%2Frescan%3C%2FCODE%3E%2C%20and%20%3CCODE%20translate%3D%22no%22%3Elspci%20-nn%20-vv%3C%2FCODE%3E%20to%20check%20if%20there%20are%20any%20endpoint%20enumerations.%3C%2FLI%3E%0A%3CLI%3EIf%20there%20is%20still%20no%20device%2C%20it%20is%20recommended%20to%20first%20connect%20to%20the%20i.MX95%20with%20a%20known%20working%20PCIe%20endpoint%20to%20confirm%20that%20the%20i.MX95%20RC%20side%20hardware%20and%20device%20tree%2Fkernel%20configuration%20are%20correct%3B%20then%20go%20back%20to%20the%20LA1234%20side%20to%20check%20EP%20boot%20and%20hardware%20connection.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3ETo%20program%20the%20LA1234%2C%20you%20need%20to%20use%20the%20LA1234%2FLA12xx%20board%20boot%20image%20and%20corresponding%20programming%20process%20provided%20in%20the%20LA12xx%20SDK%2FBSP.%20The%20publicly%20available%20%3CCODE%20translate%3D%22no%22%3Ehostsw_la12xx%3C%2FCODE%3E%20repository%20mainly%20contains%20host-side%20software%3B%20the%20FreeRTOS%20side%20code%20is%20not%20in%20this%20repository.%20Therefore%2C%20you%20need%20to%20refer%20to%20the%20sections%20on%20LA12xx%20board%20boot%20and%20image%20programming%20in%20the%20LA12xx%20SDK%20User%20Guide%20%2F%20BSP%20release%20package.%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E