From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Ondřej Jirman" <megi@xff.cz>, "Pavel Machek" <pavel@ucw.cz>,
phone-devel@vger.kernel.org,
"kernel list" <linux-kernel@vger.kernel.org>,
fiona.klute@gmx.de, martijn@brixit.nl, samuel@sholland.org,
heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org
Subject: Re: [PATCHv3 1/2] dt-bindings: usb: typec: anx7688: start a binding document
Date: Mon, 8 Apr 2024 22:12:30 +0200 [thread overview]
Message-ID: <97f2d38d-c863-4c76-91f1-52cd250759d7@linaro.org> (raw)
In-Reply-To: <vbo7bacecuagu4qzrr6tsdh4qlejrv7ia67yylf6ay4u7qnwge@kqj27bun2m7d>
On 08/04/2024 17:17, Ondřej Jirman wrote:
> On Mon, Apr 08, 2024 at 03:27:00PM GMT, Krzysztof Kozlowski wrote:
>> On 08/04/2024 14:48, Ondřej Jirman wrote:
>>> Yeah, I understand where the confusion is. The driver is not for anx7688 chip
>>> really. The driver is named anx7688, but that's mostly a historical accident at
>>> this point.
>>>
>>> I guess there can be a driver for anx7688 chip that can directly use the chip's
>>> resources from the host by directly manipulating its registers and implementing
>>> type-c functionality via eg. Linux's TCPM or TCPCI stack, etc. (eg. like
>>> fusb302 driver, or various tcpci subdrivers).
>>>
>>> But in this case the chip is driven by an optional on-chip microcontroller's
>>> firmware and *this driver* is specifically for *the Type-C port on Pinephone*
>>
>> We do not talk here about the driver, but bindings, so hardware.
>
> Got it. Bindings should be the same regardless of what driver would be used,
> whether this OCM based one, or some future one based on the above mentioned
> TCPCI in-kernel implementation. Hardware is the same in both cases.
>
> Just trying to imagine how to actually solve the issues...
>
> Basic thing with the I2C regulator thing is that needs to be enabled as long
> as anx7688 needs to communicate over I2C. Other user of this power rail is
> touchscreen controller for its normal power supply, and it needs to be able
> to disable it during system suspend.
This does not look like anything specific to this particular device...
but even without this, please think how you want it to be solved. Same
supply which has to be on always, because your anx7688 can talk over
I2C, and in the same time sometimes off, so touchscreen can be shutdown.
If this is regulator for the I2C bus, then I think we already had this
discussion some time ago. I think it is not a property of the I2C
device, but the controller.
>
> Now for things to not fail during suspend/resume based on PM callbacks
> invocation order, anx7688 driver needs to enable this regulator too, as long
> as it needs it.
No, the I2C bus driver needs to manage it. Not one individual I2C
device. Again, why anx7688 is specific? If you next phone has anx8867,
using different driver, you also add there i2c-supply? And if it is
nxp,ptn5100 as well?
>
> I can put bus-supply to I2C controller node, and read it from the ANX7688 driver
> I guess, by going up a DT node. Whether that's going to be acceptable, I don't
> know.
>
>
> VCONN regulator I don't know where else to put either. It doesn't seem to belong
> anywhere. It's not something directly connected to Type-C connector, so
> not part of connector bindings, and there's nothing else I can see, other
> than anx7688 device which needs it for core functionality.
That sounds like a GPIO, not regulator. anx7688 has GPIOs, right? On
Pinephone they go to regulator, but on FooPhone also using anx7688 they
go somewhere else, so why this anx7688 assumes this is a regulator?
You need to properly represent the hardware, not bend it to your one
use-case for one hardware.
>
> ANX7688 chip desing doesn't have integrated VCONN mosfet switches so it always
> needs external supply + switches that are controlled by the chip itself. There's
> no sensible design where someone would not want this and the driver needs
> to get this regulator reference from somewhere. The switches are sort of an
> extension of the chip.
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-04-08 20:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 10:51 [PATCHv3 1/2] dt-bindings: usb: typec: anx7688: start a binding document Pavel Machek
2024-04-08 10:54 ` [PATCHv3 2/2] usb: typec: anx7688: Add driver for ANX7688 USB-C HDMI bridge Pavel Machek
2024-04-09 9:56 ` Heikki Krogerus
2024-04-09 11:04 ` Pavel Machek
2024-04-09 15:35 ` Dmitry Baryshkov
2024-04-10 11:32 ` Ondřej Jirman
2024-04-10 11:35 ` Ondřej Jirman
2024-04-16 7:29 ` Heikki Krogerus
2024-04-08 11:17 ` [PATCHv3 1/2] dt-bindings: usb: typec: anx7688: start a binding document Krzysztof Kozlowski
2024-04-08 11:21 ` Pavel Machek
2024-04-08 11:24 ` Krzysztof Kozlowski
2024-04-08 11:52 ` Ondřej Jirman
2024-04-08 11:59 ` Krzysztof Kozlowski
2024-04-08 12:48 ` Ondřej Jirman
2024-04-08 13:27 ` Krzysztof Kozlowski
2024-04-08 15:17 ` Ondřej Jirman
2024-04-08 20:12 ` Krzysztof Kozlowski [this message]
2024-04-10 2:20 ` Ondřej Jirman
2024-04-11 19:59 ` Krzysztof Kozlowski
2024-04-11 20:17 ` Dmitry Baryshkov
2024-04-08 11:51 ` Ondřej Jirman
2024-04-08 12:01 ` Krzysztof Kozlowski
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=97f2d38d-c863-4c76-91f1-52cd250759d7@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=fiona.klute@gmx.de \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=martijn@brixit.nl \
--cc=megi@xff.cz \
--cc=pavel@ucw.cz \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=samuel@sholland.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