Port-arm archive

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

Re: ALL THE I2C BUSSES



On Mon, 9 Apr 2018, Jason Thorpe wrote:

Well, much to my chagrin, dsrtc0 was not, in fact, found on iic1.  i2cscan found them on iic2.  I can fix the kernel config file, no big deal.  But I’d like to understand the device unit mapping at play.

Yeah it sucks, and I'm not sure how best to fix it.

fdtbus does not necessarily attach devices in the order they appear in the dts file. The entire tree is scanned and sorted by the "phandle" property (inserted by the device tree compiler). The sorting helps avoid a lot of "node X needs to be attached before node Y" type of issues.

Since the hdmi@7e902000 node references BSC2 ("ddc = <&i2c2>"), it's likely to be assigned a phandle earlier. AB_DEBUG will print out the sorted nodes, and if you want to disable the sorting, try returning a fixed value from sys/dev/fdt/fdtbus.c:fdt_get_order

Cheers,
Jared


Home | Main Index | Thread Index | Old Index