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

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



Hi,

I had a typo in my previous message.

Dom0 has Xen support and I am able to launch different DomU.

DomU has also Xen support for guests following:
https://wiki.xenproject.org/wiki/Mainline_Linux_Kernel_Configs

Dom0 has knowledge, through the device tree, about the I2C but appears as disabled and with xen,passthough property.

If instead of launching Dom0 as primary OS, I launch DomU (they both are very similar), with the I2C in the DT to okay, it appears and can be used, so I2C support is built into the kernel.

The issue is that when being launch as DomU from Dom0, the i2c device does not appear. The main difference is that when in non Xen environment, the i2c is in the amba bus but when in Xen environment, it is in the pass-through simple bus.

The passed devicetree is:

/dts-v1/;
/ {
   #address-cells = <0x2>;
   #size-cells = <0x2>;


    passthrough {
        compatible = "simple-bus";
        ranges;
        #address-cells = <0x2>;
        #size-cells = <0x2>;

        misc_clk {
                #clock-cells = <0x0>;
                clock-frequency = <0x7735940>;
                compatible = "fixed-clock";
                linux,phandle = <0x2>;
                phandle = <0x2>;
        };

        pd-i2c1 {
                #power-domain-cells = <0x0>;
                pd-id = <0x26>;
                linux,phandle = <0x1>;
                phandle = <0x1>;
        };


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

The final result is that it does not load the i2c module and does not create the i2c device. It looks like, since it does not find any i2c in the amba, does not bother to load the module. There are not I2C related messages in none of the dmesgs (Dom0, DomU).


Regards,

Jesús

On 23/10/17 12:57, Julien Grall wrote:


On 13/10/17 10:55, Jesús Lázaro wrote:
Hi,

Hello,

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.

I am a bit confused. You say you pass-through to a guest, but speak about Dom0 kernel. So the dmesg is from DomU or Dom0?

Note that when doing platform device passthrough, Dom0 kernel is not involved in the process. The guest will have full access and should detect it via device-tree.

Make sure you have I2C built in your guest kernel.

Cheers,


--
-------------------------------------------------------------------------
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®.