From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Rob Herring <robh@kernel.org>
Cc: Wolfram Sang <wsa@kernel.org>,
Chris Packham <chris.packham@alliedtelesis.co.nz>,
krzysztof.kozlowski+dt@linaro.org, gregory.clement@bootlin.com,
andi.shyti@kernel.org, conor+dt@kernel.org,
linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Abel Vesa <abel.vesa@linaro.org>
Subject: Re: [PATCH v5 1/2] dt-bindings: i2c: mv64xxx: add bus-reset-gpios property
Date: Sat, 28 Oct 2023 09:51:58 +0200 [thread overview]
Message-ID: <7260268c-c646-426c-90d6-edd1fc3e1f46@linaro.org> (raw)
In-Reply-To: <20231027192236.GA2946793-robh@kernel.org>
On 27/10/2023 21:22, Rob Herring wrote:
> On Fri, Oct 27, 2023 at 01:25:56PM +0200, Krzysztof Kozlowski wrote:
>> On 27/10/2023 11:09, Wolfram Sang wrote:
>>> On Fri, Oct 27, 2023 at 04:31:03PM +1300, Chris Packham wrote:
>>>> Add bus-reset-gpios and bus-reset-duration-us properties to the
>>>> marvell,mv64xxx-i2c binding. These can be used to describe hardware
>>>> where a common reset GPIO is connected to all downstream devices on and
>>>> I2C bus. This reset will be asserted then released before the downstream
>>>> devices on the bus are probed.
>>>>
>>>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>>>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>
>>> Krzysztof, are you fine with this change?
>>
>> Actually no. NAK.
>>
>> Not because of the naming, but because the new name triggered some new
>> paths in my brain which brought the point - this is old problem of power
>> sequencing of children.
>>
>> I believe this must be solved in more generic way. First - generic for
>> all I2C devices. Second - generic also matching other buses/subsystems,
>> which have similar problem. We did it for USB (onboard USB), MMC
>> (unloved MMC power sequence) and now we are doing it for PCIe and few
>> others (Cc: Abel)
>
> Unlike the others I2C doesn't expect to access the bus/device before
> devices probe, right?
>
>> https://lpc.events/event/17/contributions/1507/
>
> Oh, good!
>
>> Current solution is heavily limited. What about regulators? What about
>> buses having 2 reset lines (still the same bus)? What about sequence?
>
> A more complicated case should be handled by the device's driver. If the
> GPIO reset was not shared we'd be handling it there too. I think what's
> needed is to solve the shared aspect. That's already done with reset
> subsys, so I think making 'reset-gpios' handled by it too is the way
> forward. That would handle the QCA WiFi/BT case I think.
>
> I'm not sure waiting for that or something else to happen is worth
> holding up this simple case. It's not the only case of a common reset
> for a bus (MDIO).
I argue also that this bus-reset-gpios is not a property of this I2C
controller. IIUC, the I2C controller does not have a line to reset all
children. It's the children who have reset lines and it happens it is
shared. Just like my WSA884x case:
https://lore.kernel.org/alsa-devel/84f9f1c4-0627-4986-8160-b4ab99469b81@linaro.org/
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-10-28 7:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 3:31 [PATCH v5 0/2] i2c: mv64xxx: bus-reset-gpios Chris Packham
2023-10-27 3:31 ` [PATCH v5 1/2] dt-bindings: i2c: mv64xxx: add bus-reset-gpios property Chris Packham
2023-10-27 9:09 ` Wolfram Sang
2023-10-27 11:25 ` Krzysztof Kozlowski
2023-10-27 19:22 ` Rob Herring
2023-10-28 7:51 ` Krzysztof Kozlowski [this message]
2023-10-27 3:31 ` [PATCH v5 2/2] i2c: mv64xxx: add an optional " Chris Packham
2023-10-27 8:48 ` Andi Shyti
2023-10-27 11:27 ` Krzysztof Kozlowski
2023-10-27 11:37 ` Krzysztof Kozlowski
2023-10-27 12:55 ` Andi Shyti
2023-10-29 21:02 ` Chris Packham
2023-10-27 15:10 ` Mark Brown
2023-10-29 20:48 ` Chris Packham
2023-10-31 6:01 ` Krzysztof Kozlowski
2023-10-31 19:59 ` Chris Packham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7260268c-c646-426c-90d6-edd1fc3e1f46@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=abel.vesa@linaro.org \
--cc=andi.shyti@kernel.org \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).