[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] i2c pass-through in mpsoc
On 24/10/17 07:45, Jesús Lázaro wrote: Hi, Hello,Please avoid top-posting. I am CC-ing Edgar who might also be able to give some feedback here. 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_ConfigsDom0 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. I am not sure what you mean here. When I looked at the mpsoc DT (xilinx/zynqmp.dtsi), the i2c is indeed under a node called amba. But the name of the node is irrelevant here. However the compatible string is "simple-bus" as used in the partial device-tree below. Did I miss anything? 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>; This not does not contain any compatible string. Is it normal? 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_Configsdmesg 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, -- Julien Grall _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx https://lists.xen.org/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |