Re: [PATCH RFC 06/12] usb: typec: qcom: Add gen1 Type-C port support
From: Dmitry Baryshkov
Date: Sun Oct 18 2026 - 19:45:48 EST
On Mon, Oct 19, 2026 at 01:29:53AM +0200, David Heidelberg wrote:
> On 26/09/2026 16:22, Bryan O'Donoghue wrote:
> > On 26/09/2026 13:40, David Heidelberg via B4 Relay wrote:
> > > From: David Heidelberg <david@xxxxxxx>
> > >
> > > Add a port backend for the first generation of the Qualcomm PMIC Type-C
> > > block, found on PM660 and PMI8998.
> > >
> > > On gen1 the Type-C CC logic is part of the charger's USBIN peripheral
> > > (base 0x1300) instead of the standalone Type-C peripheral used by
> > > PM8150B and later PMICs. All Type-C events (CC state change,
> > > tCCDebounce done, VBUS change and error) are signalled through a single
> > > aggregate "type-c-change" interrupt, the handler re-reads TYPEC_STATUS_4
> > > to find out what changed. The PD PHY is register compatible with PM8150B
> > > and is reused as is.
> > >
> > > Differences to the PM8150B backend:
> > > - get_cc() returns -EBUSY until the hardware reports tCCDebounce done,
> > > instead of using a software debounce.
> > > - As a source, only the default and 1.5A Rp can be advertised, 3.0A
> > > requests are advertised as 1.5A.
> > > - The PBS workaround of the downstream SMB2 driver (TM_IO_DTEST4_SEL)
> > > is applied on every power role change.
> > >
> > > VBUS sourcing is optional and only used when the connector provides
> > > a vbus-supply, as the charger doesn't expose a VBUS regulator yet.
> > > static const struct of_device_id qcom_pmic_typec_table[] = {
> > > + { .compatible = "qcom,pm660-typec", .data = &gen1_typec_res },
> > > { .compatible = "qcom,pm8150b-typec", .data = &pm8150b_typec_res },
> > > { .compatible = "qcom,pmi632-typec", .data = &pmi632_typec_res },
> > > + { .compatible = "qcom,pmi8998-typec", .data = &gen1_typec_res },
> >
> > I think this should be
> >
> > > + { .compatible = "qcom,pm660-typec", .data = &pm660_typec_res },
> > > { .compatible = "qcom,pm8150b-typec", .data = &pm8150b_typec_res },
> > > { .compatible = "qcom,pmi632-typec", .data = &pmi632_typec_res },
> > > + { .compatible = "qcom,pmi8998-typec", .data = &pmi8998_typec_res },
> >
> > Since I'm not sure "gen1" is a real thing and besides, I see this
> > gen1/gen2/gen3 stuff in CAMSS and it means almost nothing. The silicon
> > version is the salient thing.
>
> Best I can do is GenZ.
> But now seriously, I hoped someone from Qualcomm will chime in and tells me
> how is this type-c block generation properly called.
Just use PMIC name, please. It's the easiest and the simplest option.
--
With best wishes
Dmitry