public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Suniel Mahesh <sunil@amarulasolutions.com>
Cc: Guenter Roeck <linux@roeck-us.net>, Kyle Tso <kyletso@google.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	USB list <linux-usb@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: USB PD TYPEC - FUSB302B port controller hard reset issue
Date: Tue, 2 Jan 2024 11:46:34 +0200	[thread overview]
Message-ID: <ZZPbeUbMM3J4pH/K@kuha.fi.intel.com> (raw)
In-Reply-To: <CAM+7aWvGerEdUnsKboUg9+EoL=66k3nULHCnQgHyxsWQhUwmpw@mail.gmail.com>

Hi Suniel,

On Tue, Dec 26, 2023 at 04:14:48PM +0530, Suniel Mahesh wrote:
> Hi Guenter Roeck / Heikki Krogerus and all,
> 
> 1.
> I am testing USB TYPEC PD on a Rockchip Rk3399 SOC based target which has a
> FUSB302B TYPEC port controller.
> 
> 2.
> My source is a wall charger which is based on Gallium Nitride (GaN II)
> technology and has four ports as follows:
> 
> USB-C1: 100W PD3.0, 5V/3A, 9V/3A, 12V/3A, 15V/3A. 20V/5A. PPS: 3.3V-11V/4A
> USB-C2: 100W PD3.0. 5V/3A. 9V/3A. 12V/3A, 15V/3A. 20V/5A PPS:3.3-11V/4A
> USB-C3: 20W PD3.0, 5V/3A, 9V/2.22A, 12V/1.67A
> USB-A: 18W QC3.0. 5V/3A, 9V/2A, 12V/1.5A
> 
> 3.
> i am using latest linux-next and enabled all the relevant configs,
> especially:
> CONFIG_TYPEC=y
> CONFIG_TYPEC_TCPM=y
> CONFIG_TYPEC_FUSB302=y

Which kernel version?

> 4.
> DT node is as follows when i use USB-C1 of wall charger:
> 
>  connector {
>                         compatible = "usb-c-connector";
>                         label = "USB-C";
>                         data-role = "dual";
>                         power-role = "sink";
>                         try-power-role = "sink";
>                         op-sink-microwatt = <1000000>;
>                         sink-pdos = <PDO_FIXED(5000, 3000,
> PDO_FIXED_USB_COMM)
>                                     PDO_FIXED(12000, 3000,
> PDO_FIXED_USB_COMM)>;
>                 };

What do you mean by "when i use USB-C1..."? Why is the above valid
only then and not with the other PD contracts?

> Issue:
> The board power well most of the time, but may be in 1 out of 5 cold boots,
> FUSB302B is getting a hard reset, as
> FUSB302B INTERRUPTA register bit I_HARDRST is getting set.
> 
> After some digging, found out that the above behaviour is accounted to when
> something is wrong with the CRC of
> the received packet (SOP - Start of Packet)

How did you determine that the problem is a bad CRC?

> This behaviour is seen i.e. FUSB302B getting a hard reset more on the
> USB-C3 port.
> 
> Any pointers on how to solve this issue.

Guenter, do you have time to take a look at this?

thanks,

-- 
heikki

       reply	other threads:[~2024-01-02  9:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAM+7aWvGerEdUnsKboUg9+EoL=66k3nULHCnQgHyxsWQhUwmpw@mail.gmail.com>
2024-01-02  9:46 ` Heikki Krogerus [this message]
2024-01-02 17:09   ` USB PD TYPEC - FUSB302B port controller hard reset issue Guenter Roeck
2024-01-03 14:30     ` Suniel Mahesh
2024-01-03 14:26   ` Suniel Mahesh
2024-01-09  7:17 Suniel Mahesh
2024-01-09  9:18 ` Gábor Stefanik
2024-01-09 15:47 ` Guenter Roeck
  -- strict thread matches above, loose matches on Subject: below --
2023-12-26 10:48 Suniel Mahesh

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=ZZPbeUbMM3J4pH/K@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=jagan@amarulasolutions.com \
    --cc=kyletso@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=sunil@amarulasolutions.com \
    /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