linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shah, Nehal-bakulchandra" <nehal-bakulchandra.shah@amd.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	linux-usb@vger.kernel.org, Jagadish.Hadimani@amd.com
Subject: Re: ucsi and DRD controller interaction
Date: Thu, 30 Apr 2020 01:32:53 +0530	[thread overview]
Message-ID: <8ba98ceb-8a69-be7d-944e-f2b96c12bf1d@amd.com> (raw)
In-Reply-To: <20200429130315.GD2738754@kuha.fi.intel.com>

Hi,

On 4/29/2020 6:33 PM, Heikki Krogerus wrote:
> Hi again,
>
>>> Thanks for the details so this will enable the role switch  for drd controller. Now for UCSI driver to call the role make functions it needs the reference of the same switch reference,
>>>
>>> so for that do i have to use device_get_named_child_node(dev,"CON0"), in UCSI Driver?
>> No. If you use the ucsi driver, and if your connector child nodes are
>> in correct order, then ucsi_find_fwnode() takes care of assigning the
>> node for you.
>>
>> But you do need to use the USB role class API to get a handle to the
>> switch (dwc3) in the typec driver.
>>
>> UCSI is really meant to be a status interface. The specification
>> states that the USB Type-C connectors should function autonomously
>> without any OS involvement. So by relying on the driver to configure
>> the muxes, you are actually corrupting that part of the specification.
> I had to recheck that. I seem to be wrong about this. It does not
> clearly state that the ports need to function autonomously. Also, in
> this case the USB role switch isn't a mux.
>
> Sorry about that.
>
>> I would still strongly recommend that you use TI's own host interface.

Thanks for the mail, in my view role switch is just software interface here to update the DWC3 controller for role change.

I may be wrong here but this is my understanding.

So on our platform PD is also connected as Master to USB/DP phy. Hence here is sequence as per my understanding during the role change.

1. PD detects the role change and update the phy register over I2C (as a i2c master)

2. PD also generated the interrupt to UCSI Driver (PD as a i2c slave) regarding the role change.

3. UCSI driver has to update same to DRD ( this is what we are all after that)

4. DRD will program controller register.

 I can implement /use TI's own host interface but requirement for us to have UCSI based driver.


Regards

Nehal



      reply	other threads:[~2020-04-29 20:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 13:39 ucsi and DRD controller interaction Shah, Nehal-bakulchandra
2020-04-21  7:43 ` Heikki Krogerus
2020-04-21 13:53   ` Shah, Nehal-bakulchandra
2020-04-22 11:00     ` Heikki Krogerus
2020-04-22 13:07       ` Shah, Nehal-bakulchandra
2020-04-22 14:28         ` Heikki Krogerus
2020-04-22 14:53           ` Shah, Nehal-bakulchandra
2020-04-27 12:00             ` Heikki Krogerus
2020-04-27 14:15               ` Shah, Nehal-bakulchandra
2020-04-29 12:43                 ` Heikki Krogerus
2020-04-29 13:03                   ` Heikki Krogerus
2020-04-29 20:02                     ` Shah, Nehal-bakulchandra [this message]

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=8ba98ceb-8a69-be7d-944e-f2b96c12bf1d@amd.com \
    --to=nehal-bakulchandra.shah@amd.com \
    --cc=Jagadish.Hadimani@amd.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-usb@vger.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).