Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ALL THE I2C BUSSES
> On Apr 10, 2018, at 2:35 AM, Jared McNeill <jmcneill%invisible.ca@localhost> wrote:
>
> 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.
Yah, I totally grok the dilemma. I recall wackiness back in the NetBSD/sparc salad days around who-comes-first-the-esp-or-the-dma.
One thing that might help — print the BSCn name as part of the auto-configuration messages? That way at least’s there’s a more obvious breadcrumb to follow.
>
> 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
-- thorpej
Home |
Main Index |
Thread Index |
Old Index