[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] i2c pass-through in mpsoc



Hi,

Avoiding the dtdev property avoids any error. Now the issue is that, although in the devicetree/passthrough section the i2c appears, the kernel fails to load any drivers and does not create the /dev/i2c device.

The dom0 kernel has XEN support following https://wiki.xenproject.org/wiki/Mainline_Linux_Kernel_Configs

dmesg does not offer any messages regarding issues with the i2c.

What else should I do in order to pass-through the device?

Regards,

Jesús

On 11/10/17 14:20, Julien Grall wrote:
On 09/10/17 10:33, Jesús Lázaro wrote:
Hi,

Hello,

I am trying to pass the I2C peripherial in an mpsoc. I have been following the example to pass the mac but I keep getting the following error:

----
(XEN) XEN_DOMCTL_assign_dt_device: assign "/amba/i2c@ff030000" to dom1 failed (-22) libxl: error: libxl_create.c:1424:libxl__add_dtdevs: xc_assign_dtdevice failed: -1 libxl: error: libxl_create.c:1461:domcreate_attach_devices: unable to add dtdev devices
----

This is normal. dtdev will fail when the device passthrough-ed is not behind an SMMU.

dtdev is only necessary when your device is behind an SMMU. If you know your device will not do DMA, then you can safely drop dtdev=... and continue.

You might also be interested by the discussion [1] which happened on xen-devel recently regarding the same problem.

Cheers,

[1] https://lists.xenproject.org/archives/html/xen-devel/2017-10/msg00386.html


Attached I send the config file as well as the pass-through device tree.

In the main device tree I have modified the I2C to:

i2c@ff030000 {
   compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10";
   status = "disabled";
   xen,passthrough = "1";
   interrupt-parent = <0x4>;
   interrupts = <0x0 0x12 0x4>;
   reg = <0x0 0xff030000 0x0 0x1000>;
   #address-cells = <0x1>;
   #size-cells = <0x0>;
   power-domains = <0x12>;
   clocks = <0x3 0x3e>;
   clock-frequency = <0x61a80>;
};

Any hints on where the problem is?

Regards,

Jesús


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
https://lists.xen.org/xen-users



--
-------------------------------------------------------------------------
Jesús Lázaro Arrotegui Universidad del País Vasco
Tecnología Electrónica
Departamento de Tecnología Electrónica
Escuela de Ingeniería de Bilbao
Email: jesus.lazaro@xxxxxxx
WWW:   det.bi.ehu.eus/~apert
Pl. Ingeniero Torres Quevedo 1     Tel.: 34 - 94 - 601 73 44
48013 BILBAO (SPAIN)                   Fax.: 34 - 94 - 601 39 07
-------------------------------------------------------------------------

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
https://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.