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: Thu, 11 Apr 2024 21:59:35 +0200 [thread overview]
Message-ID: <025d268f-96d0-49fa-9a67-f80ab81ed102@linaro.org> (raw)
In-Reply-To: <ounfv3vgg2esvxk2cxckeqyy52mghiyps2rszh7sf5poryyjzs@ftumsalmthza>
On 10/04/2024 04:20, Ondřej Jirman wrote:
> On Mon, Apr 08, 2024 at 10:12:30PM GMT, Krzysztof Kozlowski wrote:
>> On 08/04/2024 17:17, Ondřej Jirman wrote:
>>>
>>> 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?
>
> Yes, that could work, if I2C core would manage this.
Either I don't understand about which I2C regulator you speak or this is
not I2C core regulator. This is a regulator to be managed by the I2C
controller, not by I2C core.
>
>>>
>>> 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?
>
> CC1/CC2_VCONN control pins are "GPIO" of anx7688, sort of. They have fixed
> purpose of switching external 5V regulator output to one of the CC pins
> on type-c port. I don't care what other purpose with some other firmware
> someone puts to those pins. It's irrelevant to the use case of anx7688
> as a type-c controller/HDMI bridge, which we're describing here.
>
> VCONN regulator is an actual GPIO controlled regulator on the board, and
> needs to be controlled by the anx7688 driver. So that CC1/CC2_VCONN control
> pins driven by the firmware actually do what they're supposed to do.
>
> Not sure why it would be a business of anything else but anx7688 driver
> enabling this regulator, because only this driver knows and cares about this.
> If some other board doesn't have the need to manually enable the regulator, or
> doesn't have the regulator, it can simply be optional.
>
> There are also some other funky supplies in the bindings, that are not connected
> to the chip in any way, but need to be controlled by the driver:
>
> + vbus-supply: true
> + vbus-in-supply: true
Yeah, the vconn looks reasonable. Just provide description of the
supply, so it will be obvious.
>
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-04-11 19:59 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
2024-04-10 2:20 ` Ondřej Jirman
2024-04-11 19:59 ` Krzysztof Kozlowski [this message]
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=025d268f-96d0-49fa-9a67-f80ab81ed102@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