From: Yuanshen Cao <alex.caoys@gmail.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org
Cc: Yuanshen Cao <alex.caoys@gmail.com>
Subject: [PATCH] USB: typec: tcpm: Add support for Etek ET7304 Controller
Date: Tue, 17 Feb 2026 18:58:59 +0000 [thread overview]
Message-ID: <20260217190010.67-1-alex.caoys@gmail.com> (raw)
The Etek ET7304 is a USB Type-C Port Controller with USB-PD used on
the Radxa Cubie A7Z.
According to the ET7304 datasheet [1] and the vendor BSP source code
provided by Radxa [2], this controller is the same device as RT1715
with a different VID.
Add support for the ET7304 by registering its VID in the driver.
Tested on Radxa Cubie A7Z.
[1] https://www.etekmicro.com/wp-content/uploads/datasheets/ET7304_datasheet.pdf
[2] https://github.com/radxa/allwinner-bsp/commit/156b6578cc173855b41ea311a229403ccbadb17c
Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com>
---
.../devicetree/bindings/usb/richtek,rt1711h.yaml | 3 ++-
drivers/usb/typec/tcpm/tcpci_rt1711h.c | 16 +++++++++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
index ae611f7e57ca4..ed0802112eb9f 100644
--- a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
+++ b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
@@ -21,8 +21,9 @@ properties:
enum:
- richtek,rt1711h
- richtek,rt1715
+ - etek,et7304
description:
- RT1711H support PD20, RT1715 support PD30 except Fast Role Swap.
+ RT1711H support PD20, RT1715 and ET7304 support PD30 except Fast Role Swap.
reg:
maxItems: 1
diff --git a/drivers/usb/typec/tcpm/tcpci_rt1711h.c b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
index 88c50b984e8a3..4848748a10dd2 100644
--- a/drivers/usb/typec/tcpm/tcpci_rt1711h.c
+++ b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
@@ -19,9 +19,11 @@
#include <linux/regulator/consumer.h>
#define RT1711H_VID 0x29CF
+#define ET7304_VID 0x6DCF
#define RT1711H_PID 0x1711
#define RT1711H_DID 0x2171
#define RT1715_DID 0x2173
+#define ET7304_DID 0x2173
#define RT1711H_PHYCTRL1 0x80
#define RT1711H_PHYCTRL2 0x81
@@ -55,6 +57,7 @@
struct rt1711h_chip_info {
u32 rxdz_sel;
+ u16 vid;
u16 did;
bool enable_pd30_extended_message;
};
@@ -308,7 +311,7 @@ static int rt1711h_check_revision(struct i2c_client *i2c, struct rt1711h_chip *c
ret = i2c_smbus_read_word_data(i2c, TCPC_VENDOR_ID);
if (ret < 0)
return ret;
- if (ret != RT1711H_VID) {
+ if (ret != chip->info->vid) {
dev_err(&i2c->dev, "vid is not correct, 0x%04x\n", ret);
return -ENODEV;
}
@@ -406,18 +409,28 @@ static void rt1711h_remove(struct i2c_client *client)
}
static const struct rt1711h_chip_info rt1711h = {
+ .vid = RT1711H_VID,
.did = RT1711H_DID,
};
static const struct rt1711h_chip_info rt1715 = {
.rxdz_sel = RT1711H_BMCIO_RXDZSEL,
+ .vid = RT1711H_VID,
.did = RT1715_DID,
.enable_pd30_extended_message = true,
};
+static const struct rt1711h_chip_info et7304 = {
+ .rxdz_sel = RT1711H_BMCIO_RXDZSEL,
+ .vid = ET7304_VID,
+ .did = ET7304_DID,
+ .enable_pd30_extended_message = true,
+};
+
static const struct i2c_device_id rt1711h_id[] = {
{ "rt1711h", (kernel_ulong_t)&rt1711h },
{ "rt1715", (kernel_ulong_t)&rt1715 },
+ { "et7304", (kernel_ulong_t)&et7304 },
{}
};
MODULE_DEVICE_TABLE(i2c, rt1711h_id);
@@ -425,6 +438,7 @@ MODULE_DEVICE_TABLE(i2c, rt1711h_id);
static const struct of_device_id rt1711h_of_match[] = {
{ .compatible = "richtek,rt1711h", .data = &rt1711h },
{ .compatible = "richtek,rt1715", .data = &rt1715 },
+ { .compatible = "etek,et7304", .data = &et7304 },
{}
};
MODULE_DEVICE_TABLE(of, rt1711h_of_match);
--
2.53.0
next reply other threads:[~2026-02-17 19:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 18:58 Yuanshen Cao [this message]
2026-02-18 7:25 ` [PATCH] USB: typec: tcpm: Add support for Etek ET7304 Controller 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=20260217190010.67-1-alex.caoys@gmail.com \
--to=alex.caoys@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--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