maia-sdr / plutosdr-fw

Maia SDR ADALM Pluto Firmware
https://maia-sdr.org
Other
25 stars 5 forks source link

v0.4.1 fails to boot on Adalm-Pluto RevC #11

Closed plaes closed 8 months ago

plaes commented 8 months ago

Seems like something has broken in the support for revC between v0.4.1 (fails to boot) and v0.4.0. Fortunately it's recoverable via dfu.

daniestevez commented 8 months ago

Can you paste the serial port log?

daniestevez commented 8 months ago

Looking at the changes between v0.4.1 and v0.4.0 and thinking about what's different between rev B and rev C, I suspect that the problem is the addition of the axi_tdd in https://github.com/maia-sdr/linux/commit/16511aa10e47b4c7b832d8c8d52d2997cf6baef3. The maia-sdr dts should delete these nodes. I'll build a firmware with this change tomorrow, but the boot log will help me make sure if this is actually the problem.

daniestevez commented 8 months ago

I'm building a firmware image with the device tree fix: https://github.com/maia-sdr/plutosdr-fw/actions/runs/7430466111

The firmware will be published as an artifact of the workflow when the build finishes. Can you test this on the Pluto rev C?

plaes commented 8 months ago

I'm building a firmware image with the device tree fix: https://github.com/maia-sdr/plutosdr-fw/actions/runs/7430466111 The firmware will be published as an artifact of the workflow when the build finishes. Can you test this on the Pluto rev C?

Yes, this firmware boots and after updating uboot as well, I got maia-httpd working.

Can you paste the serial port log?

This would require tapping into these tx/rx/gnd pins? (I can eventually do it, but not just right now..) image

Right now I can provide devicetree dumps from both versions: analog-dts-0.38.txt maia-sdr-dts.txt

plaes commented 8 months ago

v0.4.1 crashes when it attempts to probe adi-axi-tdd:

8<--- cut here ---
Unhandled fault: imprecise external abort (0x406) at 0x00521af8
pgd = (ptrval)
[00521af8] *pgd=00000000
Internal error: : 406 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 7 Comm: kworker/u4:0 Not tainted 5.15.0-g75eab53d2c96 #1
Hardware name: Xilinx Zynq Platform
Workqueue: events_unbound deferred_probe_work_func
PC is at regmap_mmio_read32le+0x10/0x14
LR is at regmap_mmio_read+0x2c/0x5c
pc : [<c03d719c>]    lr : [<c03d7354>]    psr: 200e0093
sp : da451dc8  ip : 00000000  fp : da405244
r10: c0b31ce4  r9 : da40600d  r8 : da4f3c54
r7 : da451e24  r6 : da451e24  r5 : 00000000  r4 : dde3ac40
r3 : e0930000  r2 : da451e24  r1 : e0930000  r0 : dec0de1c
Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 1de1c04a  DAC: 00000051
Register r0 information: non-slab/vmalloc memory
Register r1 information: 0-page vmalloc region starting at 0xe0930000 allocated at __devm_ioremap+0x68/0xa8
Register r2 information: non-slab/vmalloc memory
Register r3 information: 0-page vmalloc region starting at 0xe0930000 allocated at __devm_ioremap+0x68/0xa8
Register r4 information: slab kmalloc-64 start dde3ac40 pointer offset 0 size 64
Register r5 information: NULL pointer
Register r6 information: non-slab/vmalloc memory
Register r7 information: non-slab/vmalloc memory
Register r8 information: slab kmalloc-1k start da4f3c00 pointer offset 84 size 1024
Register r9 information: slab pool_workqueue start da406000 pointer offset 13
Register r10 information: non-slab/vmalloc memory
Register r11 information: slab kmalloc-512 start da405200 pointer offset 68 size 512
Register r12 information: NULL pointer
Process kworker/u4:0 (pid: 7, stack limit = 0x(ptrval))
Stack: (0xda451dc8 to 0xda452000)
1dc0:                   dde36a00 dde36a00 00000000 c03d2c44 dde36a00 00000000
1de0: da451e24 00000000 da4f3c54 c03d2cac dde26c40 da4f3c10 dde36a00 c03dd018
1e00: 00000000 00000000 dde3be70 c02673cc 00000000 dde3be70 dac19ec8 dde3be70
1e20: dac19ec8 da4f2840 c088d7d5 4a173c4d da40600d da4f3c10 00000000 c0b32c1c
1e40: 00000001 da4f3c54 da40600d c0b31ce4 da405244 c03c1eb0 da4f3c10 00000000
1e60: c0b32c1c c03c00f4 da4f3c10 c0b32c1c da4f3c10 00000001 da4f3c54 c03c033c
1e80: c0bbfab0 c0b32c1c da4f3c10 c03c0374 da4f3c10 c0b32c1c da451ee4 00000000
1ea0: da4f3c54 c03c06c8 da450000 da451ee4 c03c0634 c03be6d8 da40600d da418e6c
1ec0: da7416b8 4a173c4d da4f3c10 da4f3c10 c0b31d98 da450000 00000001 c03c0544
1ee0: da4f3c10 da4f3c10 00000001 4a173c4d da4f3c10 c0b31d98 da4f3c10 00000000
1f00: 00000000 c03bf2fc da4f3c10 c0b31cb8 c0b31d0c c03bfc18 da40aa00 da405200
1f20: c0b31ce0 da406000 00000000 c012fe94 da40aa00 c0b31ce0 da40aa00 da40aa18
1f40: da405200 da450000 da405218 c0b02d00 c0ba5c38 c012ff60 da40aa00 da40aa18
1f60: da405200 c0130708 00000000 da450000 da437cc0 da419800 c01304cc da40aa00
1f80: da43de9c da437ce0 00000000 c0135bd0 da419800 c0135a94 00000000 00000000
1fa0: 00000000 00000000 00000000 c0100130 00000000 00000000 00000000 00000000
1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<c03d719c>] (regmap_mmio_read32le) from [<c03d7354>] (regmap_mmio_read+0x2c/0x5c)
[<c03d7354>] (regmap_mmio_read) from [<c03d2c44>] (_regmap_read+0x84/0xac)
[<c03d2c44>] (_regmap_read) from [<c03d2cac>] (regmap_read+0x40/0x58)
[<c03d2cac>] (regmap_read) from [<c03dd018>] (adi_axi_tdd_probe+0x3dc/0x474)
[<c03dd018>] (adi_axi_tdd_probe) from [<c03c1eb0>] (platform_probe+0x58/0xa8)
[<c03c1eb0>] (platform_probe) from [<c03c00f4>] (really_probe+0x170/0x2f4)
[<c03c00f4>] (really_probe) from [<c03c033c>] (__driver_probe_device+0xc4/0xd8)
[<c03c033c>] (__driver_probe_device) from [<c03c0374>] (driver_probe_device+0x24/0xa4)
[<c03c0374>] (driver_probe_device) from [<c03c06c8>] (__device_attach_driver+0x94/0xb4)
[<c03c06c8>] (__device_attach_driver) from [<c03be6d8>] (bus_for_each_drv+0xa8/0xb8)
[<c03be6d8>] (bus_for_each_drv) from [<c03c0544>] (__device_attach+0xc8/0x138)
[<c03c0544>] (__device_attach) from [<c03bf2fc>] (bus_probe_device+0x28/0x80)
[<c03bf2fc>] (bus_probe_device) from [<c03bfc18>] (deferred_probe_work_func+0x80/0x98)
[<c03bfc18>] (deferred_probe_work_func) from [<c012fe94>] (process_one_work+0x178/0x21c)
[<c012fe94>] (process_one_work) from [<c012ff60>] (process_scheduled_works+0x28/0x2c)
[<c012ff60>] (process_scheduled_works) from [<c0130708>] (worker_thread+0x23c/0x2cc)
[<c0130708>] (worker_thread) from [<c0135bd0>] (kthread+0x13c/0x144)
[<c0135bd0>] (kthread) from [<c0100130>] (ret_from_fork+0x14/0x24)
Exception stack(0xda451fb0 to 0xda451ff8)
1fa0:                                     00000000 00000000 00000000 00000000
1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e5903000 e0831001 e5910000 f57ff04f (e12fff1e) 
---[ end trace 6a62323d67a4ddaf ]---
daniestevez commented 8 months ago

This would require tapping into these tx/rx/gnd pins? (I can eventually do it, but not just right now..)

The Pluto rev C has UART access on one of the USB ports.

v0.4.1 crashes when it attempts to probe adi-axi-tdd:

What have you done exactly to cause this crash?

Edit: I was reading too fast. I now understand that this is the boot log of the v0.4.1, which is the version that crashes when booting. The crash you get is what I expected.

plaes commented 8 months ago

This would require tapping into these tx/rx/gnd pins? (I can eventually do it, but not just right now..)

The Pluto rev C has UART access on one of the USB ports.

Haha.. indeed. :dagger: image

daniestevez commented 8 months ago

Closing this, since it has been fixed on v0.4.2.