From: Svyatoslav Ryhel <clamor95@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mikko Perttunen <mperttunen@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Svyatoslav Ryhel <clamor95@gmail.com>
Cc: linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v1 3/4] usb: phy: tegra: parametrize HSIC PTS value
Date: Mon, 2 Feb 2026 10:05:25 +0200 [thread overview]
Message-ID: <20260202080526.23487-4-clamor95@gmail.com> (raw)
In-Reply-To: <20260202080526.23487-1-clamor95@gmail.com>
The parallel transceiver select used in HSIC mode differs on Tegra20,
where it uses the UTMI value (0), whereas Tegra30+ uses a dedicated HSIC
value. Reflect this in the SoC config.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
drivers/usb/phy/phy-tegra-usb.c | 7 +++----
include/linux/usb/tegra_usb_phy.h | 2 ++
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c
index 6173b240c3ea..812d99443180 100644
--- a/drivers/usb/phy/phy-tegra-usb.c
+++ b/drivers/usb/phy/phy-tegra-usb.c
@@ -957,10 +957,7 @@ static int uhsic_phy_power_on(struct tegra_usb_phy *phy)
writel_relaxed(val, base + USB_USBMODE);
}
- if (phy->soc_config->has_hostpc)
- set_pts(phy, TEGRA_USB_HOSTPC1_DEVLC_PTS_HSIC);
- else
- set_pts(phy, 0);
+ set_pts(phy, phy->soc_config->uhsic_pts_value);
val = readl_relaxed(base + USB_TXFILLTUNING);
if ((val & USB_FIFO_TXFILL_MASK) != USB_FIFO_TXFILL_THRES(0x10)) {
@@ -1474,6 +1471,7 @@ static const struct tegra_phy_soc_config tegra20_soc_config = {
.requires_pmc_ao_power_up = false,
.uhsic_registers_offset = 0,
.uhsic_tx_rtune = 0, /* 40 ohm */
+ .uhsic_pts_value = 0, /* UTMI */
};
static const struct tegra_phy_soc_config tegra30_soc_config = {
@@ -1484,6 +1482,7 @@ static const struct tegra_phy_soc_config tegra30_soc_config = {
.requires_pmc_ao_power_up = true,
.uhsic_registers_offset = 0x400,
.uhsic_tx_rtune = 8, /* 50 ohm */
+ .uhsic_pts_value = TEGRA_USB_HOSTPC1_DEVLC_PTS_HSIC,
};
static const struct of_device_id tegra_usb_phy_id_table[] = {
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h
index fbdd2dcb3a2b..81d9f22e58b5 100644
--- a/include/linux/usb/tegra_usb_phy.h
+++ b/include/linux/usb/tegra_usb_phy.h
@@ -27,6 +27,7 @@ struct gpio_desc;
* uhsic_registers_offset: for Tegra30+ where HSIC registers were offset
* comparing to Tegra20 by 0x400, since Tegra20 has no UTMIP on PHY2
* uhsic_tx_rtune: fine tuned 50 Ohm termination resistor for NMOS/PMOS driver
+ * uhsic_pts_value: parallel transceiver select enumeration value
*/
struct tegra_phy_soc_config {
@@ -37,6 +38,7 @@ struct tegra_phy_soc_config {
bool requires_pmc_ao_power_up;
u32 uhsic_registers_offset;
u32 uhsic_tx_rtune;
+ u32 uhsic_pts_value;
};
struct tegra_utmip_config {
--
2.51.0
next prev parent reply other threads:[~2026-02-02 8:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 8:05 [PATCH v1 0/4] usb: phy: tegra: HSIC adjustments Svyatoslav Ryhel
2026-02-02 8:05 ` [PATCH v1 1/4] usb: phy: tegra: cosmetic fixes Svyatoslav Ryhel
2026-02-02 8:05 ` [PATCH v1 2/4] usb: phy: tegra: return error value from utmi_wait_register Svyatoslav Ryhel
2026-02-02 12:05 ` Sergey Shtylyov
2026-02-02 12:14 ` Svyatoslav Ryhel
2026-02-02 18:01 ` Sergey Shtylyov
2026-02-02 19:28 ` Sergey Shtylyov
2026-02-02 8:05 ` Svyatoslav Ryhel [this message]
2026-02-02 8:05 ` [PATCH v1 4/4] usb: phy: tegra: parametrize PORTSC1 register offset Svyatoslav Ryhel
2026-02-02 8:10 ` [PATCH v1 0/4] usb: phy: tegra: HSIC adjustments Mikko Perttunen
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=20260202080526.23487-4-clamor95@gmail.com \
--to=clamor95@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mperttunen@nvidia.com \
--cc=thierry.reding@gmail.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