[PATCH] usb: typec: ucsi: ccg: Log firmware version and hardware info at probe

From: Loic Poulain

Date: Tue Jun 30 2026 - 09:10:52 EST


The CCG firmware version and silicon ID are read during probe but never
logged, making it difficult to identify the hardware and the firmware
running on the device.

Add dev_info messages to display the firmware version and silicon ID:

ucsi_ccg 2-0008: CCG FW version: 3.9.0 build 0x0000
ucsi_ccg 2-0008: CCG silicon_id:0x1234 mode:1

Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxxxxxxxxx>
---
drivers/usb/typec/ucsi/ucsi_ccg.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
index 4463c1ae96bd..2715bb7b53aa 100644
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -738,11 +738,21 @@ static int get_fw_info(struct ucsi_ccg *uc)
uc->fw_version = CCG_VERSION(uc->version[FW2].app.ver) |
CCG_VERSION_PATCH(uc->version[FW2].app.patch);

+ dev_info(uc->dev, "CCG FW version: %d.%d.%d build 0x%04x\n",
+ (uc->version[FW2].app.ver & CCG_VERSION_MAJ_MASK) >> CCG_VERSION_MAJ_SHIFT,
+ (uc->version[FW2].app.ver & CCG_VERSION_MIN_MASK) >> CCG_VERSION_MIN_SHIFT,
+ uc->version[FW2].app.patch,
+ le16_to_cpu(uc->version[FW2].app.build));
+
err = ccg_read(uc, CCGX_RAB_DEVICE_MODE, (u8 *)(&uc->info),
sizeof(uc->info));
if (err < 0)
return err;

+ dev_info(uc->dev, "CCG silicon_id:0x%04x mode:%u\n",
+ le16_to_cpu(uc->info.silicon_id),
+ (uc->info.mode & CCG_DEVINFO_FWMODE_MASK) >> CCG_DEVINFO_FWMODE_SHIFT);
+
return 0;
}

--
2.34.1