All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Quentin Schulz <quentin.schulz@cherry.de>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Heiko Stuebner <heiko.stuebner@cherry.de>,
	Chen-Yu Tsai <wens@csie.org>
Subject: Re: [PATCH v2] arm64: dts: rockchip: add usb typec host support to rk3588-jaguar
Date: Wed, 26 Feb 2025 09:07:11 +0100	[thread overview]
Message-ID: <1952248.GKX7oQKdZx@diego> (raw)
In-Reply-To: <18716872.sWSEgdgrri@diego>

Am Freitag, 21. Februar 2025, 22:53:20 MEZ schrieb Heiko Stübner:
> Am Freitag, 21. Februar 2025, 17:43:08 MEZ schrieb Quentin Schulz:
> > Hi Heiko,
> > 
> > On 2/18/25 10:10 PM, Heiko Stuebner wrote:
> > > From: Heiko Stuebner <heiko.stuebner@cherry.de>
> > > 
> > > Jaguar has two type-c ports connected to fusb302 controllers that can
> > > work both in host and device mode and can also run in display-port
> > > altmode.
> > > 
> > > While these ports can work in dual-role data mode, they do not support
> > > powering the device itself as power-sink. This causes issues because
> > > the current infrastructure does not cope well with dual-role data
> > > without dual-role power.
> > > 
> > > So add the necessary nodes for the type-c controllers as well
> > > as enable the relevant core usb nodes, but limit the mode to host-mode
> > > for now until we figure out device mode.
> > > 
> > > Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
> > 
> > While the USB functionality does work for both ports, and the 
> > orientation is properly reported, it seems like there may be some issue 
> > with how the PHY or controller interacts with that info because I do not 
> > get USB3 speeds when the device is inserted in reverse orientation, 
> > while I do when it's in normal orientation.
> 
> I've tested both ports and saw the issue too.
> Interestingly on the usbdp-phy side, orientation detection seems correct
> and also the sbu pins are set accordingly.
> 
> 
> > I assume that's the case for the Rock 5 ITX and Orange Pi 5+ as well and 
> > probably has nothing to do with the DT?
> > 
> > Should we go still go on with trying to merge this patch knowing that? I 
> > mean USB2 is still better than no USB at all :)
> > 
> > +Cc Chen-Yu, owner of an Orange Pi 5+, who may be able to confirm the 
> > issue is widespread.

For reference, after digging around I found out that the usbdp-phy does not
handle the orientation correctly but relies on specific behaviour of the dwc3
controller (suspending between unplug and plugin).

usbdp-phy series fixing that is in
https://lore.kernel.org/linux-rockchip/20250225184519.3586926-1-heiko@sntech.de/




WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: Quentin Schulz <quentin.schulz@cherry.de>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Heiko Stuebner <heiko.stuebner@cherry.de>,
	Chen-Yu Tsai <wens@csie.org>
Subject: Re: [PATCH v2] arm64: dts: rockchip: add usb typec host support to rk3588-jaguar
Date: Wed, 26 Feb 2025 09:07:11 +0100	[thread overview]
Message-ID: <1952248.GKX7oQKdZx@diego> (raw)
In-Reply-To: <18716872.sWSEgdgrri@diego>

Am Freitag, 21. Februar 2025, 22:53:20 MEZ schrieb Heiko Stübner:
> Am Freitag, 21. Februar 2025, 17:43:08 MEZ schrieb Quentin Schulz:
> > Hi Heiko,
> > 
> > On 2/18/25 10:10 PM, Heiko Stuebner wrote:
> > > From: Heiko Stuebner <heiko.stuebner@cherry.de>
> > > 
> > > Jaguar has two type-c ports connected to fusb302 controllers that can
> > > work both in host and device mode and can also run in display-port
> > > altmode.
> > > 
> > > While these ports can work in dual-role data mode, they do not support
> > > powering the device itself as power-sink. This causes issues because
> > > the current infrastructure does not cope well with dual-role data
> > > without dual-role power.
> > > 
> > > So add the necessary nodes for the type-c controllers as well
> > > as enable the relevant core usb nodes, but limit the mode to host-mode
> > > for now until we figure out device mode.
> > > 
> > > Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
> > 
> > While the USB functionality does work for both ports, and the 
> > orientation is properly reported, it seems like there may be some issue 
> > with how the PHY or controller interacts with that info because I do not 
> > get USB3 speeds when the device is inserted in reverse orientation, 
> > while I do when it's in normal orientation.
> 
> I've tested both ports and saw the issue too.
> Interestingly on the usbdp-phy side, orientation detection seems correct
> and also the sbu pins are set accordingly.
> 
> 
> > I assume that's the case for the Rock 5 ITX and Orange Pi 5+ as well and 
> > probably has nothing to do with the DT?
> > 
> > Should we go still go on with trying to merge this patch knowing that? I 
> > mean USB2 is still better than no USB at all :)
> > 
> > +Cc Chen-Yu, owner of an Orange Pi 5+, who may be able to confirm the 
> > issue is widespread.

For reference, after digging around I found out that the usbdp-phy does not
handle the orientation correctly but relies on specific behaviour of the dwc3
controller (suspending between unplug and plugin).

usbdp-phy series fixing that is in
https://lore.kernel.org/linux-rockchip/20250225184519.3586926-1-heiko@sntech.de/



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2025-02-26  8:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 21:10 [PATCH v2] arm64: dts: rockchip: add usb typec host support to rk3588-jaguar Heiko Stuebner
2025-02-18 21:10 ` Heiko Stuebner
2025-02-20 12:00 ` Quentin Schulz
2025-02-20 12:00   ` Quentin Schulz
2025-02-21 16:43 ` Quentin Schulz
2025-02-21 16:43   ` Quentin Schulz
2025-02-21 21:53   ` Heiko Stübner
2025-02-21 21:53     ` Heiko Stübner
2025-02-26  8:07     ` Heiko Stübner [this message]
2025-02-26  8:07       ` Heiko Stübner

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=1952248.GKX7oQKdZx@diego \
    --to=heiko@sntech.de \
    --cc=heiko.stuebner@cherry.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=quentin.schulz@cherry.de \
    --cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.