On Wed, 28 May 2025 at 12:50, Pavel Pisa <p...@cmp.felk.cvut.cz> wrote: > > The system/platform bus mapping alternative to PCI/PCIe mapping. > In this case, the platform bus is used to match FPGA design > for Xilinx Zynq MZ_APO education kit with four CTU CAN FD > cores on branch mz_apo-2x-xcan-4x-ctu of repo > > https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top > > The system is started by command > > qemu-system-arm -m 1G -M xilinx-zynq-a9 \ > -kernel kernel-zynq \ > -dtb zynq-microzed-uart1-2x-xcan-4x-ctu-axi.dtb \ > -initrd ramdisk.cpio \ > -serial null -serial mon:stdio \ > -nographic \ > -object can-bus,id=canbus0-bus \ > -object > can-host-socketcan,if=can0,canbus=canbus0-bus,id=canbus0-socketcan \ > -device > ctucan_mm,iobase=0x43c30000,irqnum=29,irqctrl=/machine/unattached/device[3],canbus=canbus0-bus > \ > -device > ctucan_mm,iobase=0x43c70000,irqnum=30,irqctrl=/machine/unattached/device[3],canbus=canbus0-bus > \ > -device > ctucan_mm,iobase=0x43bf0000,irqnum=31,irqctrl=/machine/unattached/device[3],canbus=canbus0-bus > \ > -device > ctucan_mm,iobase=0x43bb0000,irqnum=32,irqctrl=/machine/unattached/device[3],canbus=canbus0-bus
Please don't use the platform bus for this. Command line created devices should not have properties like "iobase" and should not be mapping their own MMIO regions in their realize methods. If we have a board that does or should have a memory-mapped CAN device, then that board should create it at the appropriate address and wire up the interrupt lines. We don't have infrastructure currently for users to create custom "frankenstein" setups on the command line, and I don't want us to add small disconnected portions of it ad-hoc. I'll let the Zynq board maintainers make the call about whether they want to add a CAN bus controller to it. thanks -- PMM