maia-sdr / plutosdr-fw

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

Problems with Pluto rev. C #2

Closed daniestevez closed 1 year ago

daniestevez commented 1 year ago

There are reports that the Maia SDR firmware v0.1.0 doesn't work with a Pluto rev. C. After the firmware is flashed, the Linux kernel doesn't seem to boot completely.

On closer inspection of the differences between Pluto rev. B and rev. C, I think that the problem might be that the Device Tree for Pluto rev. C defines a Xilinx SPI controller in the PL. This is not present in the Maia SDR FPGA design, so the kernel will hang the AXI bus when trying to talk to the SPI controller.

Here is a pluto.frm file for the Maia SDR firmware with the SPI controller entry removed from the Pluto rev. C Device Tree. It is a zipped file because of Github file type restrictions. It needs to be unzipped before flashing.

pluto.frm.zip

I don't have a Pluto rev. C to test this at the moment, so reports about whether this works would be helpful.

loic-fejoz commented 1 year ago

Quick test before bed time. So indeed this version is booting properly. Yet, maia-httpd does not start. I thus tried to launch it manually:

# ./maia-httpd
Error: ad9361-phy IIO device not found

Just in case it helps:

# dmesg
Booting Linux on physical CPU 0x0
Linux version 5.10.0-98233-g49446b6f2e53 (user@maia-sdr-devel) (arm-linux-gnueabihf-gcc (GCC) 8.2.0, GNU ld (Linaro_Binutils-) 2.31) #2 SMP PREEMPT Fri Feb 10 18:25:55 UTC 2023
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Analog Devices PlutoSDR Rev.B (Z7010/AD9363) - Maia SDR
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x1f000000
Zone ranges:
  Normal   [mem 0x0000000000000000-0x000000001fffffff]
  HighMem  empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000000000-0x0000000000ffffff]
  node   0: [mem 0x000000001a040000-0x000000001fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
On node 0 totalpages: 28608
  Normal zone: 1024 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 28608 pages, LIFO batch:7
percpu: Embedded 15 pages/cpu s29580 r8192 d23668 u61440
pcpu-alloc: s29580 r8192 d23668 u61440 alloc=15*4096
pcpu-alloc: [0] 0 [0] 1
Built 1 zonelists, mobility grouping on.  Total pages: 27584
Kernel command line: console=ttyPS0,115200 maxcpus=1 rootfstype=ramfs root=/dev/ram0 rw quiet loglevel=4 clk_ignore_unused uio_pdrv_genirq.of_id=uio_pdrv_genirq uboot=U-Boot PlutoSDR v0.20-PlutoSDR-00055-g469a0fd (Jul 06 2020 - 16:01:30 +0200)
...
# dmesg | grep ad9361
ad9361 spi0.0: ad9361_probe : enter (ad9364)
ad9361 spi0.0: ad9361_probe : enter (ad9364)
ad9361 spi0.0: ad9361_probe : enter (ad9364)
ad9361 spi0.0: ad9361_probe : enter (ad9364)
ad9361 spi0.0: ad9361_probe : enter (ad9364)
# lsmod
Module                  Size  Used by    Tainted: G
maia_sdr               16384  0

Aside note related to other advise, I am currently only able to test under MS/Windows, and while I properly see the COM3 in peripherals manager. I am not able to serial connect to it with PuTTY to observe the boot logs. Will try again later during week-end.

loic-fejoz commented 1 year ago

PuTTY's problem was between chair and keyboard ...and a bit due to PuTTY bad user interface. Anyway here is the kernel panic error with the first release:

U-Boot PlutoSDR v0.20-PlutoSDR-00055-g469a0fd (Jul 06 2020 - 16:01:30 +0200)

I2C:   ready
DRAM:  ECC disabled 512 MiB
SF: Detected N25Q256A with page size 256 Bytes, erase size 4 KiB, total 32 MiB
In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
Model: Zynq Pluto SDR Board
Hit any key to stop autoboot:  0
Booting silently
requesting hog GPIO clock_internal_en (chip zynq_gpio, offset 48) failed, -16
gpiochip_add_data_with_key: GPIOs 906..1023 (zynq_gpio) failed to register, -16
zynq-gpio e000a000.gpio: Failed to add gpio chip
8<--- cut here ---
Unhandled fault: imprecise external abort (0x406) at 0x00000000
pgd = (ptrval)
[00000000] *pgd=00000000
Internal error: : 406 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.0-98233-g49446b6f2e53 #2
Hardware name: Xilinx Zynq Platform
PC is at xspi_read32+0x8/0xc
LR is at xilinx_spi_probe+0x318/0x628
pc : [<c03ff6e8>]    lr : [<c03ffdb0>]    psr: 60000053
sp : da081df8  ip : da123500  fp : e0950000
r10: 00000000  r9 : c0b03ec8  r8 : da123400
r7 : de4cb400  r6 : da123410  r5 : 00000000  r4 : de4cb780
r3 : c03ff6e0  r2 : 00000000  r1 : 60000053  r0 : dec0de1c
Flags: nZCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 0000404a  DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0x(ptrval))
Stack: (0xda081df8 to 0xda082000)
1de0:                                                       da111420 c025c6ac
1e00: 00000000 da111420 00000001 00000008 da1112c0 da124bb0 00000010 bf3346ca
1e20: c0bc0798 da123410 00000000 c0b35778 00000000 c0b35778 c0bc0798 00000000
1e40: 00000000 c03af070 da123410 00000000 c0bc0790 c03ad5a4 da123410 c0b35778
1e60: c0b35778 c03adaa8 00000000 c0a2b834 c0a003e4 c03ad8f0 00000000 da123410
1e80: c0b35778 c03ada90 00000000 da123410 c0b35778 c03adb54 da123410 c0b03ec8
1ea0: c0b35778 c03aba2c c0a003e4 da05ce58 da11a734 bf3346ca da05ce6c c0b35778
1ec0: da0de280 00000000 c0b31a20 c03ac9cc c086d563 c086d564 00000000 c0b35778
1ee0: c0b03ec8 c0a1d1e0 ffffe000 c03ae2c8 c0ba6000 c0b03ec8 c0a1d1e0 c01017e4
1f00: 00000000 c0132e4c 00000000 c0a00300 c08e00d8 000000de 00000006 00000006
1f20: 00000000 c08e1230 000000dd c08e1230 00000dc0 da05cbd8 00000000 bf3346ca
1f40: 60000053 00000007 c0ba6000 bf3346ca 00000007 c0ba6000 c08e00d8 da05cb00
1f60: c0a2b854 c0a00f98 00000006 00000006 00000000 c0a003e4 000000de c0a33dec
1f80: 00000000 00000000 c069649c 00000000 00000000 00000000 00000000 00000000
1fa0: 00000000 c06964a4 00000000 c0100148 00000000 00000000 00000000 00000000
1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<c03ff6e8>] (xspi_read32) from [<c03ffdb0>] (xilinx_spi_probe+0x318/0x628)
[<c03ffdb0>] (xilinx_spi_probe) from [<c03af070>] (platform_drv_probe+0x48/0x94)
[<c03af070>] (platform_drv_probe) from [<c03ad5a4>] (really_probe+0x210/0x36c)
[<c03ad5a4>] (really_probe) from [<c03ad8f0>] (driver_probe_device+0x9c/0xa8)
[<c03ad8f0>] (driver_probe_device) from [<c03ada90>] (device_driver_attach+0x44/0x5c)
[<c03ada90>] (device_driver_attach) from [<c03adb54>] (__driver_attach+0xac/0xb4)
[<c03adb54>] (__driver_attach) from [<c03aba2c>] (bus_for_each_dev+0x64/0xa0)
[<c03aba2c>] (bus_for_each_dev) from [<c03ac9cc>] (bus_add_driver+0x150/0x1b0)
[<c03ac9cc>] (bus_add_driver) from [<c03ae2c8>] (driver_register+0xac/0xf0)
[<c03ae2c8>] (driver_register) from [<c01017e4>] (do_one_initcall+0x70/0x194)
[<c01017e4>] (do_one_initcall) from [<c0a00f98>] (kernel_init_freeable+0x174/0x1c4)
[<c0a00f98>] (kernel_init_freeable) from [<c06964a4>] (kernel_init+0x8/0x118)
[<c06964a4>] (kernel_init) from [<c0100148>] (ret_from_fork+0x14/0x2c)
Exception stack(0xda081fb0 to 0xda081ff8)
1fa0:                                     00000000 00000000 00000000 00000000
1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e28cc004 eafffff1 e5900000 f57ff04f (e12fff1e)
---[ end trace 93393c047b75c87b ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---

And here is the boot sequence with your revised version:

U-Boot PlutoSDR v0.20-PlutoSDR-00055-g469a0fd (Jul 06 2020 - 16:01:30 +0200)

I2C:   ready
DRAM:  ECC disabled 512 MiB
SF: Detected N25Q256A with page size 256 Bytes, erase size 4 KiB, total 32 MiB
In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
Model: Zynq Pluto SDR Board
Hit any key to stop autoboot:  0
Booting silently
requesting hog GPIO clock_internal_en (chip zynq_gpio, offset 48) failed, -16
gpiochip_add_data_with_key: GPIOs 906..1023 (zynq_gpio) failed to register, -16
zynq-gpio e000a000.gpio: Failed to add gpio chip
gpio-keys gpio_keys: Found button without gpio or irq
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Starting mdev: OK
Starting watchdog: OK
Starting initializing random number generator: OK
Starting miscellaneous setup: OK
Starting UDC Gadgets: cat: can't open '/sys/bus/iio/devices//of_node/compatible'                                                                                                             : No such file or directory
cat: can't open '/sys/bus/iio/devices//xo_correction': No such file or directory
OK
Starting system message bus: done
Starting network: OK
Starting dhcpd Daemon & httpd Server: OK
Starting MSD Daemon: OK
Starting dropbear sshd: OK
Loading maia-sdr.ko: OK
Starting maia-httpd: OK
Starting input-event-daemon: input-event-daemon: open(/dev/input/event0): No such file or directory
done

Welcome to Pluto
pluto login:
daniestevez commented 1 year ago

Thanks for all the debug info. The main problem now is

# ./maia-httpd
Error: ad9361-phy IIO device not found

This means that for some reason the IIO device for the AD9361 hasn't shown up correctly.

I've been looking more thoroughly at the differences between rev. B and rev. C, specially in the device tree. I have realized that the u-boot configuration does a bunch of checks against the device tree model entry to check if the Pluto is rev. C (in which case it does a bunch of editing of the device tree depending on some u-boot env parameters). The Maia SDR device tree was overwriting the model to include "Maia SDR", because I didn't realize that u-boot was relying on the model being a specific string exactly. Therefore, that has broken a bunch of u-boot checks, and is potentially the cause for the AD9361 IIO device not showing up.

This thing also explains some of the errors you got about GPIOs. There are two conflicting gpio-hogs in the rev. C device tree, and u-boot needs to remove one of them according to the env variable that indicates if an external clock is used (these gpio-hogs control the clock selection with a GPIO output). Since u-boot doesn't know that the Pluto is rev. C because of the model string not matching, it doesn't remove any of the two gpio-hogs, and the kernel gets a device tree with conflicts.

Here is a new pluto.frm where the device tree model is the same as in the ADI firmware: pluto.frm.zip

If this doesn't work, a full dmesg output plus the output of ls -l /sys/bus/iio/devices and cat /sys/bus/iio/devices/*/name would be helpful.

Sorry for the trial and error. It is a bit difficult to debug this problems without access to the hardware.

loic-fejoz commented 1 year ago

No worries for the trial and error ...that is somehow part of the opensource story. In the Future, I may have some proposal but that is a story for another time.

Anyway, Your last revision is working apparently fine! I see the waterfall with some signals. A big thank you!

For the sake of understanding, here is some logs:

# dmesg
Booting Linux on physical CPU 0x0
Linux version 5.10.0-98233-g49446b6f2e53 (user@maia-sdr-devel) (arm-linux-gnueabihf-gcc (GCC) 8.2.0, GNU ld (Linaro_Binutils-) 2.31) #2 SMP PREEMPT Fri Feb 10 18:25:55 UTC 2023
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Analog Devices PlutoSDR Rev.C (Z7010/AD9363)
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x1f000000
Zone ranges:
  Normal   [mem 0x0000000000000000-0x000000001fffffff]
  HighMem  empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000000000-0x0000000000ffffff]
  node   0: [mem 0x000000001a040000-0x000000001fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
On node 0 totalpages: 28608
  Normal zone: 1024 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 28608 pages, LIFO batch:7
percpu: Embedded 15 pages/cpu s29580 r8192 d23668 u61440
pcpu-alloc: s29580 r8192 d23668 u61440 alloc=15*4096
pcpu-alloc: [0] 0 [0] 1
Built 1 zonelists, mobility grouping on.  Total pages: 27584
Kernel command line: console=ttyPS0,115200 maxcpus=1 rootfstype=ramfs root=/dev/ram0 rw quiet loglevel=4 clk_ignore_unused uio_pdrv_genirq.of_id=uio_pdrv_genirq uboot=U-Boot PlutoSDR v0.20-PlutoSDR-00055-g469a0fd (Jul 06 2020 - 16:01:30 +0200)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 77644K/114432K available (6144K kernel code, 661K rwdata, 1928K rodata, 1024K init, 133K bss, 20404K reserved, 16384K cma-reserved, 0K highmem)
rcu: Preemptible hierarchical RCU implementation.
rcu:    RCU event tracing is enabled.
rcu:    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
        Trampoline variant of Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to (ptrval)
slcr mapped to (ptrval)
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
random: get_random_bytes called from start_kernel+0x2d4/0x4c4 with crng_init=0
zynq_clock_init: clkc starts at (ptrval)
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at (ptrval), irq=25
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
CPU: Testing write buffer coherency: ok
CPU0: Spectre v2: using BPIALL workaround
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
SMP: Total of 1 processors activated (666.66 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
thermal_sys: Registered thermal governor 'step_wise'
cpuidle: using governor ladder
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)
xuartps e0001000.serial: No serial alias passed. Using the first free id
xuartps e0001000.serial: Checking id 0
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 33, base_baud = 6249999) is a xuartps
printk: console [ttyPS0] enabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
FPGA manager framework
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 7600K
hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
Initialise system trusted keyrings
workingset: timestamp_bits=30 max_order=15 bucket_order=0
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
Key type asymmetric registered
Asymmetric key parser 'x509' registered
io scheduler mq-deadline registered
io scheduler kyber registered
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
gpio-954 (clock_internal_en): hogged as output/low
brd: module loaded
loop: module loaded
spi-nor spi1.0: SPI-NOR-UniqueID 1044739a470b000c1700270088767f892e
spi-nor spi1.0: n25q256ax1 (32768 Kbytes)
4 fixed-partitions partitions found on MTD device spi1.0
Creating 4 MTD partitions on "spi1.0":
0x000000000000-0x000000100000 : "qspi-fsbl-uboot"
0x000000100000-0x000000120000 : "qspi-uboot-env"
0x000000120000-0x000000200000 : "qspi-nvmfs"
0x000000200000-0x000002000000 : "qspi-linux"
libphy: Fixed MDIO Bus: probed
usbcore: registered new interface driver rt2500usb
usbcore: registered new interface driver rt73usb
usbcore: registered new interface driver rt2800usb
usbcore: registered new interface driver rtl8187
usbcore: registered new interface driver rtl8192cu
usbcore: registered new interface driver rtl8xxxu
usbcore: registered new interface driver r8152
usbcore: registered new interface driver lan78xx
usbcore: registered new interface driver asix
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver dm9601
usbcore: registered new interface driver smsc75xx
usbcore: registered new interface driver smsc95xx
usbcore: registered new interface driver rndis_host
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
ULPI transceiver vendor/product ID 0x0424/0x0007
Found SMSC USB3320 ULPI transceiver.
ULPI integrity check: passed.
i2c /dev entries driver
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer with timeout 10s
Xilinx Zynq CpuIdle Driver started
ledtrig-cpu: registered to indicate activity on CPUs
hid: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usbcore: registered new interface driver r8712u
usbcore: registered new interface driver r8188eu
ad9361 spi0.0: ad9361_probe : enter (ad9363a)
random: fast init done
ad9361 spi0.0: ad9361_probe : AD936x Rev 0 successfully initialized
cf_axi_dds 79024000.cf-ad9361-dds-core-lpc: Analog Devices CF_AXI_DDS_DDS MASTER (9.01.b) at 0x79024000 mapped to 0x(ptrval), probed DDS AD9364
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
lib80211_crypt: registered algorithm 'NULL'
lib80211_crypt: registered algorithm 'WEP'
lib80211_crypt: registered algorithm 'CCMP'
Registering SWP/SWPB emulation handler
Loading compiled-in X.509 certificates
cf_axi_adc 79020000.cf-ad9361-lpc: ADI AIM (10.01.b) at 0x79020000 mapped to 0x(ptrval), probed ADC AD9364 as MASTER
input: gpio_keys as /devices/soc0/gpio_keys/input/input0
cfg80211: Loading compiled-in X.509 certificates for regulatory database
cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
cfg80211: failed to load regulatory.db
clk: Not disabling unused clocks
Freeing unused kernel memory: 1024K
Run /init as init process
  with arguments:
    /init
    PlutoSDR
    (Jul
    06
    2020
    -
    16:01:30
    +0200)
  with environment:
    HOME=/
    TERM=linux
    uboot=U-Boot
file system registered
using random self ethernet address
using random host ethernet address
Mass Storage Function, version: 2009/09/11
LUN: removable file: (no medium)
read descriptors
read strings
usb0: HOST MAC 00:e0:22:8d:1e:d6
usb0: MAC 00:05:f7:e8:99:b9
random: dbus-uuidgen: uninitialized urandom read (12 bytes read)
random: dbus-uuidgen: uninitialized urandom read (8 bytes read)
random: dbus-daemon: uninitialized urandom read (12 bytes read)
random: crng init done
random: 1 urandom warning(s) missed due to ratelimiting
maia_sdr: no symbol version for module_layout
maia_sdr: loading out-of-tree module taints kernel.
ad9361 spi0.0: Failed to read gain, state m/c at 2
ad9361 spi0.0: Failed to read gain, state m/c at 3
# ls -l /sys/bus/iio/devices
total 0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 iio:device0 -> ../../../devices/soc0/amba/e0006000.spi/spi_master/spi0/spi0.0/iio:device0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 iio:device1 -> ../../../devices/soc0/amba/f8007100.adc/iio:device1
lrwxrwxrwx    1 root     root             0 Jan  1  1970 iio:device2 -> ../../../devices/soc0/fpga-axi@0/79024000.cf-ad9361-dds-core-lpc/iio:device2
lrwxrwxrwx    1 root     root             0 Jan  1  1970 iio:device3 -> ../../../devices/soc0/fpga-axi@0/79020000.cf-ad9361-lpc/iio:device3
# cat /sys/bus/iio/devices/*/name
ad9361-phy
xadc
cf-ad9361-dds-core-lpc
cf-ad9361-lpc
daniestevez commented 1 year ago

Great. The only thing that looks slightly weird is

ad9361 spi0.0: Failed to read gain, state m/c at 2
ad9361 spi0.0: Failed to read gain, state m/c at 3

I don't get this on my Pluto rev. B, but it seems harmless. It could be that the web app is trying to read the gain before the AD9361 has finished initializing completely. In such case, it would be a short lived error.

I have just packaged a new release fixing the device tree problems properly (before I was editing the device tree manually). I've checked that the new firmware image has the same device tree that the one in my last comment.

Once the new release is tested with rev. C, we can close this issue.

loic-fejoz commented 1 year ago

Tested v0.1.1 on my Rev C, works fine. Thanks.

Still have messages about gain in dmesg but further changing it in the UI is working.

I believe this issue can be closed.