[PATCH v3] ARM: dts: bcm2711-rpi-cm4-io: Add rtc on a pinctrl-muxed i2c bus

Cyril Brulebois cyril at debamax.com
Sat Jan 1 22:34:18 PST 2022


Cyril Brulebois <cyril at debamax.com> (2022-01-02):
> In passing, I'm seeing the RTC exclusively on (userspace) i2c-2 while
> I'm seeing the LED matrix on both (userspace) i2c-2 and i2c-3: […]

After a few more tests/reboots, checking the output of `i2cdetect -l`
gives the appropriate information, so that one can pick the right i2c-N
device, by looking at the *-mux entries and their channel IDs:

    …
    i2c-2	i2c       	bcm2835 (i2c at 7e205000)          	I2C adapter
    …
    i2c-4	i2c       	i2c-2-mux (chan_id 0)           	I2C adapter
    i2c-5	i2c       	i2c-2-mux (chan_id 1)           	I2C adapter

And indeed, those channel IDs match what's been defined in the DTB, with
#0 set to i2c0_gpio0 (e.g. LED matrix on 40-pin header) and #1 set to
i2c0_gpio44 (e.g. RTC, fan control, etc.), which seem quite consistent
this time:

 - `i2cdetect -y 4` reports only 74 (the LED matrix);
 - `i2cdetect -y 5` reports 0c, 2f, and 51 as UU (the RTC).


Cheers,
-- 
Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220102/8a039378/attachment.sig>


More information about the linux-arm-kernel mailing list