lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c2803eed-b4f4-44cf-a7f7-9557d05e798e@roeck-us.net>
Date: Tue, 18 Jun 2024 10:30:56 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Quentin Schulz <quentin.schulz@...rry.de>,
 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

On 6/18/24 09:51, Quentin Schulz wrote:
> 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?
> 

If it is properly defined in devicetree, the emulated AMC6821 should be
an i2c device, possibly sitting behind an i2c multiplexer, not a
platform device.

Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ