Other Parts Discussed in Thread:TDA4VM
请问一下这个问题有补丁了嘛
TDA4VM_ECO TDA4VM_EVH ospi不识别_a72
TDA4VM: TDA4VM_EVH ospi不识别_a72 – 处理器论坛 – 处理器 – E2E 设计支持 (ti.com)
Shine:
请尝试使用最新的processor SDK。https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-J721E
,
yk z:
你好,此sdk不能在eco的版本中跑起来
,
Shine:
e2e工程师需要去问一下,请关注下面帖子的回复。https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1278582/tda4vm-tda4vm_eco-tda4vm_evh-ospi-can-t-recognize-_a72
,
yk z:
下载prebuilt包www.ti.com/…/PROCESSOR-SDK-RTOS-J721S2ti-processor-sdk-rtos-j721s2-evm-09_00_00_02-prebuilt.tar.gz将包中的Image-6.1.33-g8f7f371be2 k3-j721s2-common-proc-board.dtb 替换我们的板子中Image ,k3-j721s2-common-proc-board.dtb然后做交叉实验,发现造成DMA报错的部分在Image
[2.730223]mmcblk0: p1 p2 p3 [2.733639] mmcblk0boot0: mmc0:0001 BGUF4R 31.9 MiB[2.739119] mmcblk0boot1: mmc0:0001 BGUF4R 31.9 MiB[2.744561] mmcblk0rpmb: mmc0:0001 BGUF4R 4.00 MiB, chardev (240:0) [2.901351] tps6594-rtc tps6594-rtc.4.auto: registered as rtc0 [2.907314] tps6594-rtc tps6594-rtc.4.auto: hctosys: unable to read the hardware clock [3.311449] omap-mailbox 31f80000.mailbox: omap mailbox rev 0x66fca100 [3.318278] omap-mailbox 31f81000.mailbox: omap mailbox rev 0x66fca100 [3.325079] omap-mailbox 31f82000.mailbox: omap mailbox rev 0x66fca100 [3.331881] omap-mailbox 31f84000.mailbox: omap mailbox rev 0x66fca100 [3.339927] ti-udma 285c0000.dma-controller: Channels: 26 (tchan: 13, rchan: 13, gp-rflow: 8) [3.350029] ti-udma 31150000.dma-controller: Channels: 60 (tchan: 30, rchan: 30, gp-rflow: 16) [3.359923] pinctrl-single 4301c000.pinctrl: mux offset out of range: 0x38 (0x34) [3.367411] pinctrl-single 4301c000.pinctrl: could not add functions for mcu-fss0-ospi0-pins-default 56x [3.378632] spi-nor spi0.0: unrecognized JEDEC id bytes: 00 00 00 00 00 00 [3.387239] spi-nor spi1.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff [3.394621] davinci_mdio 46000f00.mdio: Configuring MDIO in manual mode好像没有dma的相关报错,我们下载了对应的代码,但内核版本有些差异,驱动部分,代码差异大请求patch,针对8.6sdk
下载prebuilt包www.ti.com/…/PROCESSOR-SDK-RTOS-J721S2ti-processor-sdk-rtos-j721s2-evm-09_00_00_02-prebuilt.tar.gz将包中的Image-6.1.33-g8f7f371be2 k3-j721s2-common-proc-board.dtb 替换我们的板子中Image ,k3-j721s2-common-proc-board.dtb然后做交叉实验,发现造成DMA报错的部分在Image好像没有dma的相关报错,我们下载了对应的代码,但内核版本有些差异,驱动部分,代码差异大请问,DMA部分有patch嘛,针对8.6sdk
,
Shine:
已跟进!
,
Shine:
请看下面e2e工程师的回复。This patch can be easily ported to 8.6. Not much different. Customer can try this on 8.6.
,
yk z:
行 436: 20230524_14:34:22:850:[ 1.500467] cadence-qspi 47050000.spi: error (____ptrval____): No Rx DMA available
436: 20230524_14:34:22:850:[ 1.500467] cadence-qspi 47050000.spi: error (____ptrval____): No Rx DMA available
我的意思是,上面这个DMA报错问题,针对dma的patch有嘛,8.6的sdk上是有找不到对应dma的报错的,现在是将9.0的img ,dtb放进去,没有DMA报错,可以将对应的修改项指出来嘛,我们porting到8.6
,
yk z:
或者告知一下移哪部分代码,因为遇到很多编译错误
比如一步步移植ti-processor-sdk-linux-adas-j721s2-evm-09_00_01_02\board-support\linux-6.1.46+gitAUTOINC+f8110d9ce8-gf8110d9ce8\drivers\dma\ti\k3-udma.c及相关到8.6,就有很多接口不一样
CALLscripts/atomic/check-atomics.shCCarch/arm64/kernel/asm-offsets.sCALLscripts/checksyscalls.shCHKinclude/generated/compile.hCCarch/arm64/mm/dma-mapping.oCCarch/arm64/kernel/smp.oCCdrivers/irqchip/irq-gic-v2m.oCCkernel/irq/chip.oCCdrivers/irqchip/irq-gic-v3-mbi.oARarch/arm64/mm/built-in.a drivers/irqchip/irq-gic-v2m.c:91:23: error: ‘pci_msi_domain_write_msg’ undeclared here (not in a function); did you mean ‘pci_msi_domain_get_msi_rid’?91 |.irq_write_msi_msg = pci_msi_domain_write_msg,|^~~~~~~~~~~~~~~~~~~~~~~~|pci_msi_domain_get_msi_rid make[3]: *** [scripts/Makefile.build:286: drivers/irqchip/irq-gic-v2m.o] Error 1 make[3]: *** Waiting for unfinished jobs.... drivers/irqchip/irq-gic-v3-mbi.c:174:23: error: ‘pci_msi_domain_write_msg’ undeclared here (not in a function); did you mean ‘pci_msi_domain_get_msi_rid’?174 |.irq_write_msi_msg = pci_msi_domain_write_msg,|^~~~~~~~~~~~~~~~~~~~~~~~|pci_msi_domain_get_msi_rid make[3]: *** [scripts/Makefile.build:286: drivers/irqchip/irq-gic-v3-mbi.o] Error 1 make[2]: *** [scripts/Makefile.build:503: drivers/irqchip] Error 2 make[1]: *** [Makefile:1840: drivers] Error 2 make[1]: *** Waiting for unfinished jobs....CCkernel/irq/msi.oCCarch/arm64/kernel/perf_event.oCCarch/arm64/kernel/hibernate.o kernel/irq/msi.c: In function ‘alloc_msi_entry’: kernel/irq/msi.c:38:22: error: ‘struct msi_desc’ has no member named ‘list’38 |INIT_LIST_HEAD(&desc->list);|^~ kernel/irq/msi.c: In function ‘msi_domain_populate_irqs’: kernel/irq/msi.c:326:2: error: implicit declaration of function ‘for_each_msi_entry’; did you mean ‘free_msi_entry’? [-Werror=implicit-function-declaration]326 |for_each_msi_entry(desc, dev) {|^~~~~~~~~~~~~~~~~~|free_msi_entry kernel/irq/msi.c:326:31: error: expected ‘;’ before ‘{’ token326 |for_each_msi_entry(desc, dev) {|^~|; kernel/irq/msi.c:324:6: warning: unused variable ‘ret’ [-Wunused-variable]324 |int ret = 0;|^~~ kernel/irq/msi.c:322:25: warning: unused variable ‘ops’ [-Wunused-variable]322 |struct msi_domain_ops *ops = info->ops;|^~~ kernel/irq/msi.c: In function ‘msi_check_reservation_mode’: kernel/irq/msi.c:394:9: error: implicit declaration of function ‘first_msi_entry’; did you mean ‘free_msi_entry’? [-Werror=implicit-function-declaration]394 |desc = first_msi_entry(dev);|^~~~~~~~~~~~~~~|free_msi_entry kernel/irq/msi.c:394:7: warning: assignment to ‘struct msi_desc *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]394 |desc = first_msi_entry(dev);|^ kernel/irq/msi.c:395:13: error: ‘struct msi_desc’ has no member named ‘msi_attrib’395 |return desc->msi_attrib.is_msix || desc->msi_attrib.maskbit;|^~ kernel/irq/msi.c:395:41: error: ‘struct msi_desc’ has no member named ‘msi_attrib’395 |return desc->msi_attrib.is_msix || desc->msi_attrib.maskbit;|^~ kernel/irq/msi.c: In function ‘__msi_domain_alloc_irqs’:
,
Shine:
已跟进!
,
Shine:
请看下面工程师的回复。
Shine said:
CALL scripts/atomic/check-atomics.shCC arch/arm64/kernel/asm-offsets.sCALL scripts/checksyscalls.shCHK include/generated/compile.hCC arch/arm64/mm/dma-mapping.oCC arch/arm64/kernel/smp.oCC drivers/irqchip/irq-gic-v2m.oCC kernel/irq/chip.oCC drivers/irqchip/irq-gic-v3-mbi.oAR arch/arm64/mm/built-in.adrivers/irqchip/irq-gic-v2m.c:91:23: error: ‘pci_msi_domain_write_msg’ undeclared here (not in a function); did you mean ‘pci_msi_domain_get_msi_rid’?91 | .irq_write_msi_msg = pci_msi_domain_write_msg,| ^~~~~~~~~~~~~~~~~~~~~~~~| pci_msi_domain_get_msi_ridmake[3]: *** [scripts/Makefile.build:286: drivers/irqchip/irq-gic-v2m.o] Error 1make[3]: *** Waiting for unfinished jobs….https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/drivers/spi/spi-cadence-quadspi.c?h=ti-linux-6.1.y&id=585d19a7be0c90fc8806beca6155c8d10b942127
The above patch is a simple if check patch.
The build errors should be nowhere related to the above patch. If 9.0 is working correctly can they migrate?
,
yk z:
HACK: spi: spi-cadence-quadspi: Ignore DMA channel request failure – ti-linux-kernel/ti-linux-kernel – This repo contains a Linux kernel that has been integrated with outstanding TI open source patches based on the open source Linux kernel found at kernel.org. Contributions to this kernel need to be sent to the open source community for review.
这个补丁切过去,没能识别到ospi,
[ 2.390400] j721e-pcie 2910000.pcie: IB MEM 0x0000000000..0xffffffffffff -> 0x0000000000[ 2.399362] ti-udma 285c0000.dma-controller: Channels: 22 (tchan: 11, rchan: 11, gp-rflow: 8)[ 2.409318] ti-udma 31150000.dma-controller: Channels: 66 (tchan: 33, rchan: 33, gp-rflow: 16)
spi-nor spi0.0: octal mode not supported
[ 2.421553] spi-nor: probe of spi0.0 failed with error -22
但是我们这边可以用非dma的方式识别到ospi(这可以说明pinmux没有问题)
https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/drivers/spi/spi-cadence-quadspi.c?h=ti-linux-6.1.y&id=585d19a7be0c90fc8806beca6155c8d10b942127HACK: spi: spi-cadence-quadspi: Ignore DMA channel request failure – ti-linux-kernel/ti-linux-kernel – This repo contains a Linux kernel that has been integrated with outstanding TI open source patches based on the open source Linux kernel found at kernel.org. Contributions to this kernel need to be sent to the open source community for review.
,
Shine:
已跟进!
,
Shine:
请看下面e2e工程师的回复。
Have they tried 9.0 SDK and can they confirm if that's working fine?
,
yk z:
是我们confirm过
下载了ti-processor-sdk-rtos-j784s4-evm-09_00_00_02-prebuilt.tar.gz sdcard启动后
[2.062862] ti-udma 285c0000.dma-controller: Channels: 22 (tchan: 11, rchan: 11, gp-rflow: 8) [2.072763] ti-udma 31150000.dma-controller: Channels: 66 (tchan: 33, rchan: 33, gp-rflow: 16) [2.084268] spi-nor spi0.0: unrecognized JEDEC id bytes: ff ef dc 21 00 00 [2.092877] spi-nor spi1.0: mt25qu512a (65536 Kbytes) [2.097961] 7 fixed-partitions partitions found on MTD device 47050000.spi.0 [2.104996] Creating 7 MTD partitions on "47050000.spi.0": [2.110468] 0x000000000000-0x000000080000 : "qspi.tiboot3" [2.116601] 0x000000080000-0x000000280000 : "qspi.tispl" [2.122434] 0x000000280000-0x000000680000 : "qspi.u-boot" [2.128355] 0x000000680000-0x0000006c0000 : "qspi.env" [2.133990] 0x0000006c0000-0x000000700000 : "qspi.env.backup" [2.140243] 0x000000800000-0x000003fc0000 : "qspi.rootfs" [2.146150] 0x000003fc0000-0x000004000000 : "qspi.phypattern" [2.190765] davinci_mdio 46000f00.mdio: davinci mdio revision 9.7, bus freq 1000000https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/drivers/spi/spi-cadence-quadspi.c?h=ti-linux-6.1.y&id=585d19a7be0c90fc8806beca6155c8d10b942127
移植过去后,
这个补丁切过去,没能识别到ospi,[ 2.390400] j721e-pcie 2910000.pcie: IB MEM 0x0000000000..0xffffffffffff -> 0x0000000000 [ 2.399362] ti-udma 285c0000.dma-controller: Channels: 22 (tchan: 11, rchan: 11, gp-rflow: 8) [ 2.409318] ti-udma 31150000.dma-controller: Channels: 66 (tchan: 33, rchan: 33, gp-rflow: 16)spi-nor spi0.0: octal mode not supported[ 2.421553] spi-nor: probe of spi0.0 failed with error -22debug发现
spi_nor_micron_octal_dtr_enable
不匹配,而提示不支持8位模式
,
Shine:
已跟进,请关注帖子的回复。
,
yk z:
请问有补丁嘛
,
Shine:
我去问一下