[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f92528b-8311-4c0b-998b-f0221d7bd474@cherry.de>
Date: Tue, 18 Jun 2024 18:51:28 +0200
From: Quentin Schulz <quentin.schulz@...rry.de>
To: Guenter Roeck <linux@...ck-us.net>,
Farouk Bouabid <farouk.bouabid@...rry.de>, Jean Delvare <jdelvare@...e.com>,
Andi Shyti <andi.shyti@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Lee Jones <lee@...nel.org>,
Peter Rosin <peda@...ntia.se>, Heiko Stuebner <heiko@...ech.de>
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-i2c@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH v4 0/9] Add Mule MFD support
Hi Guenter,
On 6/18/24 6:29 PM, Guenter Roeck wrote:
> On 6/18/24 09:06, Farouk Bouabid wrote:
>> Mule is an MCU that emulates a set of I2C devices which are reachable
>> through an I2C-mux.
>>
>> The mux and amc6821 combined make the Mule multi-function device (@0x18)
>>
>
> I don't think that is appropriate. Those devices should all have separate
> devicetree entries and be modeled as individual i2c devices.
>
I think there is a misunderstanding around the wording. They all have
separate devicetree entries and they all are individual i2c devices
(from the PoV of the kernel, they all are emulated within the same MCU).
- AMC6821 on address 0x18 for registers from 0x00 to 0xfe.
- Mux (paging, however you want to call it) on address 0x18 for register
0xff.
Note that AMC6821 is **emulated** in the MCU so this is not some HW
trickery here.
This MCU also emulates ISL1208 on 0x6f, as well as a PWM controller
(merge request pending) and two small AT24 "protocol" EEPROMs, on that
same address. Those are behind a paging/muxing mechanism. You access
ISL1208 through page 0, PWM controller through page 1, etc...
So basically, the point is:
- 0x18 on i2c is now MFD Mule
- two platform devices behind MFD = AMC6821 (reg 0x00 to 0xfe) + Mux
(reg 0xff)
- 0x6f for devices "behind" the Mux
- page 0 for device behind adapter 0
- page 1 for device behind adapter 1
- ...
All of the above are part of the same MCU.
Mule MFD is a simple-mfd-i2c device with its own devicetree entry.
Child nodes of the Mule MFD are AMC6821 as a platform device (but
operates over i2c) and Mule Mux. That's what was meant as "The mux and
amc6821 combined make the Mule multi-function device (@0x18)".
The Mule Mux then creates N i2c adapters representing the mux/pages, all
of those being represented in DT. Each of those have one device on
address 0x6f, all represented in DT as well.
Nothing hidden or hardcoded, everything in DT.
Did I miss something here?
Cheers,
Quentin
Powered by blists - more mailing lists