* [PATCH v2 0/2] usb: typec: mux: tusb1046: Support no-hpd @ 2026-11-26 9:38 Ajit Singh 2026-11-26 9:38 ` [PATCH v2 1/2] dt-bindings: usb: ti,tusb1046: Document no-hpd Ajit Singh 2026-11-26 9:38 ` [PATCH v2 2/2] usb: typec: mux: tusb1046: Support no-hpd Ajit Singh 0 siblings, 2 replies; 7+ messages in thread From: Ajit Singh @ 2026-11-26 9:38 UTC (permalink / raw) To: romain.gantois Cc: gregkh, robh, krzk+dt, conor+dt, heikki.krogerus, linux-usb, devicetree, linux-kernel, Ajit Singh On boards where the TUSB1046 HPD_IN pin has no usable HPD signal, configure the device over I2C to treat HPD_IN as asserted while DisplayPort Alt Mode is active. Describe this with no-hpd. Changes in v2: - Use the existing no-hpd property instead of ti,hpd-in-override, as suggested by Rob Herring. Ajit Singh (2): dt-bindings: usb: ti,tusb1046: Document no-hpd usb: typec: mux: tusb1046: Support no-hpd .../devicetree/bindings/usb/ti,tusb1046.yaml | 7 +++++++ drivers/usb/typec/mux/tusb1046.c | 13 +++++++++++++ 2 files changed, 20 insertions(+) -- 2.50.1 (Apple Git-155) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] dt-bindings: usb: ti,tusb1046: Document no-hpd 2026-11-26 9:38 [PATCH v2 0/2] usb: typec: mux: tusb1046: Support no-hpd Ajit Singh @ 2026-11-26 9:38 ` Ajit Singh 2026-11-27 10:56 ` Romain Gantois 2026-11-27 11:02 ` Romain Gantois 2026-11-26 9:38 ` [PATCH v2 2/2] usb: typec: mux: tusb1046: Support no-hpd Ajit Singh 1 sibling, 2 replies; 7+ messages in thread From: Ajit Singh @ 2026-11-26 9:38 UTC (permalink / raw) To: romain.gantois Cc: gregkh, robh, krzk+dt, conor+dt, heikki.krogerus, linux-usb, devicetree, linux-kernel, Ajit Singh Describe boards where the TUSB1046 HPD_IN pin has no usable HPD signal. In DisplayPort Alt Mode, the device can be configured over I2C to treat HPD_IN as asserted. Signed-off-by: Ajit Singh <blfizzyy@gmail.com> --- Documentation/devicetree/bindings/usb/ti,tusb1046.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/ti,tusb1046.yaml b/Documentation/devicetree/bindings/usb/ti,tusb1046.yaml index e1501ea6b50b..a512df1bd6fe 100644 --- a/Documentation/devicetree/bindings/usb/ti,tusb1046.yaml +++ b/Documentation/devicetree/bindings/usb/ti,tusb1046.yaml @@ -20,6 +20,13 @@ properties: reg: maxItems: 1 + no-hpd: + type: boolean + description: + The HPD_IN pin is not connected to a usable HPD signal. When DisplayPort + Alt Mode is active, the device is configured over I2C to treat HPD_IN as + asserted. + required: - compatible - reg -- 2.50.1 (Apple Git-155) ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: usb: ti,tusb1046: Document no-hpd 2026-11-26 9:38 ` [PATCH v2 1/2] dt-bindings: usb: ti,tusb1046: Document no-hpd Ajit Singh @ 2026-11-27 10:56 ` Romain Gantois 2026-11-27 11:02 ` Romain Gantois 1 sibling, 0 replies; 7+ messages in thread From: Romain Gantois @ 2026-11-27 10:56 UTC (permalink / raw) To: Ajit Singh Cc: romain.gantois, gregkh, robh, krzk+dt, conor+dt, heikki.krogerus, linux-usb, devicetree, linux-kernel Hello Ajit, On Thu, 26 Nov 2026 15:08:18 +0530, Ajit Singh <blfizzyy@gmail.com> wrote: > reg: > maxItems: 1 > > + no-hpd: > + type: boolean > + description: > + The HPD_IN pin is not connected to a usable HPD signal. When DisplayPort > + Alt Mode is active, the device is configured over I2C to treat HPD_IN as > + asserted. IMO device tree bindings should not describe configuration procedures, only hardware. So I would just limit this description to "The HPD pin is not connected to a usable HPD signal" and let the OS figure out what to do with this information (in this case, treat it as asserted). Thanks, -- Romain Gantois, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: usb: ti,tusb1046: Document no-hpd 2026-11-26 9:38 ` [PATCH v2 1/2] dt-bindings: usb: ti,tusb1046: Document no-hpd Ajit Singh 2026-11-27 10:56 ` Romain Gantois @ 2026-11-27 11:02 ` Romain Gantois 2026-11-27 11:03 ` Romain Gantois 1 sibling, 1 reply; 7+ messages in thread From: Romain Gantois @ 2026-11-27 11:02 UTC (permalink / raw) To: Ajit Singh Cc: romain.gantois, gregkh, robh, krzk+dt, conor+dt, heikki.krogerus, linux-usb, devicetree, linux-kernel On Thu, 26 Nov 2026 15:08:19 +0530, Ajit Singh <blfizzyy@gmail.com> wrote: > When HPD_IN has no usable hardware signal, set HPDIN_OVERRIDE over > I2C in DisplayPort Alt Mode so the device treats HPD_IN as asserted. > Clear the override when leaving DisplayPort mode, and preserve the > existing register value on boards without no-hpd. > > Signed-off-by: Ajit Singh <blfizzyy@gmail.com> > --- > drivers/usb/typec/mux/tusb1046.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/usb/typec/mux/tusb1046.c b/drivers/usb/typec/mux/tusb1046.c > index 34ef81f75693..50a856c8245d 100644 > --- a/drivers/usb/typec/mux/tusb1046.c > +++ b/drivers/usb/typec/mux/tusb1046.c > @@ -21,6 +21,7 @@ > /* General register bits */ > #define TUSB1046_GENERAL_FLIPSEL BIT(2) > #define TUSB1046_GENERAL_CTLSEL GENMASK(1, 0) > +#define TUSB1046_GENERAL_HPDIN_OVERRIDE BIT(3) > > /* Mux modes */ > #define TUSB1046_CTLSEL_DISABLED 0x0 > @@ -32,6 +33,7 @@ struct tusb1046_priv { > struct i2c_client *client; > struct typec_switch_dev *sw; > struct typec_mux_dev *mux; > + bool no_hpd; > > /* Lock General register during accesses */ > struct mutex general_reg_lock; > @@ -44,6 +46,7 @@ static int tusb1046_mux_set(struct typec_mux_dev *mux, > struct i2c_client *client = priv->client; > struct device *dev = &client->dev; > int mode, val, ret = 0; > + bool dp_active = false; > > if (state->mode >= TYPEC_STATE_MODAL && > state->alt->svid != USB_TYPEC_DP_SID) > @@ -67,9 +70,11 @@ static int tusb1046_mux_set(struct typec_mux_dev *mux, > case TYPEC_DP_STATE_C: > case TYPEC_DP_STATE_E: > mode = TUSB1046_CTLSEL_4LANE_DP; > + dp_active = true; > break; > case TYPEC_DP_STATE_D: > mode = TUSB1046_CTLSEL_USB3_AND_2LANE_DP; > + dp_active = true; > break; > case TYPEC_STATE_SAFE: > default: > @@ -80,6 +85,13 @@ static int tusb1046_mux_set(struct typec_mux_dev *mux, > val &= ~TUSB1046_GENERAL_CTLSEL; > val |= mode; > > + if (priv->no_hpd) { > + if (dp_active) > + val |= TUSB1046_GENERAL_HPDIN_OVERRIDE; > + else > + val &= ~TUSB1046_GENERAL_HPDIN_OVERRIDE; > + } > + > ret = i2c_smbus_write_byte_data(client, TUSB1046_REG_GENERAL, val); > > out_unlock: > @@ -131,6 +143,7 @@ static int tusb1046_i2c_probe(struct i2c_client *client) > return -ENOMEM; > > priv->client = client; > + priv->no_hpd = device_property_read_bool(dev, "no-hpd"); > > mutex_init(&priv->general_reg_lock); > > -- > 2.50.1 (Apple Git-155) Reviewed-by: Romain Gantois <romain.gantois@bootlin.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: usb: ti,tusb1046: Document no-hpd 2026-11-27 11:02 ` Romain Gantois @ 2026-11-27 11:03 ` Romain Gantois 0 siblings, 0 replies; 7+ messages in thread From: Romain Gantois @ 2026-11-27 11:03 UTC (permalink / raw) To: Ajit Singh Cc: gregkh, robh, krzk+dt, conor+dt, heikki.krogerus, linux-usb, devicetree, linux-kernel [-- Attachment #1: Type: text/plain, Size: 394 bytes --] On Friday, 27 November 2026 12:02:13 CET Romain Gantois wrote: ... > > > > + priv->no_hpd = device_property_read_bool(dev, "no-hpd"); > > > > mutex_init(&priv->general_reg_lock); > > Reviewed-by: Romain Gantois <romain.gantois@bootlin.com> Apologies, that one was meant for patch 2/2, I'll resend it. -- Romain Gantois, Bootlin Embedded Linux and Kernel engineering https://bootlin.com [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] usb: typec: mux: tusb1046: Support no-hpd 2026-11-26 9:38 [PATCH v2 0/2] usb: typec: mux: tusb1046: Support no-hpd Ajit Singh 2026-11-26 9:38 ` [PATCH v2 1/2] dt-bindings: usb: ti,tusb1046: Document no-hpd Ajit Singh @ 2026-11-26 9:38 ` Ajit Singh 2026-11-27 11:04 ` Romain Gantois 1 sibling, 1 reply; 7+ messages in thread From: Ajit Singh @ 2026-11-26 9:38 UTC (permalink / raw) To: romain.gantois Cc: gregkh, robh, krzk+dt, conor+dt, heikki.krogerus, linux-usb, devicetree, linux-kernel, Ajit Singh When HPD_IN has no usable hardware signal, set HPDIN_OVERRIDE over I2C in DisplayPort Alt Mode so the device treats HPD_IN as asserted. Clear the override when leaving DisplayPort mode, and preserve the existing register value on boards without no-hpd. Signed-off-by: Ajit Singh <blfizzyy@gmail.com> --- drivers/usb/typec/mux/tusb1046.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/usb/typec/mux/tusb1046.c b/drivers/usb/typec/mux/tusb1046.c index 34ef81f75693..50a856c8245d 100644 --- a/drivers/usb/typec/mux/tusb1046.c +++ b/drivers/usb/typec/mux/tusb1046.c @@ -21,6 +21,7 @@ /* General register bits */ #define TUSB1046_GENERAL_FLIPSEL BIT(2) #define TUSB1046_GENERAL_CTLSEL GENMASK(1, 0) +#define TUSB1046_GENERAL_HPDIN_OVERRIDE BIT(3) /* Mux modes */ #define TUSB1046_CTLSEL_DISABLED 0x0 @@ -32,6 +33,7 @@ struct tusb1046_priv { struct i2c_client *client; struct typec_switch_dev *sw; struct typec_mux_dev *mux; + bool no_hpd; /* Lock General register during accesses */ struct mutex general_reg_lock; @@ -44,6 +46,7 @@ static int tusb1046_mux_set(struct typec_mux_dev *mux, struct i2c_client *client = priv->client; struct device *dev = &client->dev; int mode, val, ret = 0; + bool dp_active = false; if (state->mode >= TYPEC_STATE_MODAL && state->alt->svid != USB_TYPEC_DP_SID) @@ -67,9 +70,11 @@ static int tusb1046_mux_set(struct typec_mux_dev *mux, case TYPEC_DP_STATE_C: case TYPEC_DP_STATE_E: mode = TUSB1046_CTLSEL_4LANE_DP; + dp_active = true; break; case TYPEC_DP_STATE_D: mode = TUSB1046_CTLSEL_USB3_AND_2LANE_DP; + dp_active = true; break; case TYPEC_STATE_SAFE: default: @@ -80,6 +85,13 @@ static int tusb1046_mux_set(struct typec_mux_dev *mux, val &= ~TUSB1046_GENERAL_CTLSEL; val |= mode; + if (priv->no_hpd) { + if (dp_active) + val |= TUSB1046_GENERAL_HPDIN_OVERRIDE; + else + val &= ~TUSB1046_GENERAL_HPDIN_OVERRIDE; + } + ret = i2c_smbus_write_byte_data(client, TUSB1046_REG_GENERAL, val); out_unlock: @@ -131,6 +143,7 @@ static int tusb1046_i2c_probe(struct i2c_client *client) return -ENOMEM; priv->client = client; + priv->no_hpd = device_property_read_bool(dev, "no-hpd"); mutex_init(&priv->general_reg_lock); -- 2.50.1 (Apple Git-155) ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] usb: typec: mux: tusb1046: Support no-hpd 2026-11-26 9:38 ` [PATCH v2 2/2] usb: typec: mux: tusb1046: Support no-hpd Ajit Singh @ 2026-11-27 11:04 ` Romain Gantois 0 siblings, 0 replies; 7+ messages in thread From: Romain Gantois @ 2026-11-27 11:04 UTC (permalink / raw) To: Ajit Singh Cc: gregkh, robh, krzk+dt, conor+dt, heikki.krogerus, linux-usb, devicetree, linux-kernel, Ajit Singh [-- Attachment #1: Type: text/plain, Size: 2519 bytes --] On Thursday, 26 November 2026 10:38:19 CET Ajit Singh wrote: > When HPD_IN has no usable hardware signal, set HPDIN_OVERRIDE over > I2C in DisplayPort Alt Mode so the device treats HPD_IN as asserted. > Clear the override when leaving DisplayPort mode, and preserve the > existing register value on boards without no-hpd. > > Signed-off-by: Ajit Singh <blfizzyy@gmail.com> > --- > drivers/usb/typec/mux/tusb1046.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/usb/typec/mux/tusb1046.c > b/drivers/usb/typec/mux/tusb1046.c index 34ef81f75693..50a856c8245d 100644 > --- a/drivers/usb/typec/mux/tusb1046.c > +++ b/drivers/usb/typec/mux/tusb1046.c > @@ -21,6 +21,7 @@ > /* General register bits */ > #define TUSB1046_GENERAL_FLIPSEL BIT(2) > #define TUSB1046_GENERAL_CTLSEL GENMASK(1, 0) > +#define TUSB1046_GENERAL_HPDIN_OVERRIDE BIT(3) > > /* Mux modes */ > #define TUSB1046_CTLSEL_DISABLED 0x0 > @@ -32,6 +33,7 @@ struct tusb1046_priv { > struct i2c_client *client; > struct typec_switch_dev *sw; > struct typec_mux_dev *mux; > + bool no_hpd; > > /* Lock General register during accesses */ > struct mutex general_reg_lock; > @@ -44,6 +46,7 @@ static int tusb1046_mux_set(struct typec_mux_dev *mux, > struct i2c_client *client = priv->client; > struct device *dev = &client->dev; > int mode, val, ret = 0; > + bool dp_active = false; > > if (state->mode >= TYPEC_STATE_MODAL && > state->alt->svid != USB_TYPEC_DP_SID) > @@ -67,9 +70,11 @@ static int tusb1046_mux_set(struct typec_mux_dev *mux, > case TYPEC_DP_STATE_C: > case TYPEC_DP_STATE_E: > mode = TUSB1046_CTLSEL_4LANE_DP; > + dp_active = true; > break; > case TYPEC_DP_STATE_D: > mode = TUSB1046_CTLSEL_USB3_AND_2LANE_DP; > + dp_active = true; > break; > case TYPEC_STATE_SAFE: > default: > @@ -80,6 +85,13 @@ static int tusb1046_mux_set(struct typec_mux_dev *mux, > val &= ~TUSB1046_GENERAL_CTLSEL; > val |= mode; > > + if (priv->no_hpd) { > + if (dp_active) > + val |= TUSB1046_GENERAL_HPDIN_OVERRIDE; > + else > + val &= ~TUSB1046_GENERAL_HPDIN_OVERRIDE; > + } > + > ret = i2c_smbus_write_byte_data(client, TUSB1046_REG_GENERAL, val); > > out_unlock: > @@ -131,6 +143,7 @@ static int tusb1046_i2c_probe(struct i2c_client *client) > return -ENOMEM; > > priv->client = client; > + priv->no_hpd = device_property_read_bool(dev, "no-hpd"); > > mutex_init(&priv->general_reg_lock); Reviewed-by: Romain Gantois <romain.gantois@bootlin.com> [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-27 11:04 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-26 9:38 [PATCH v2 0/2] usb: typec: mux: tusb1046: Support no-hpd Ajit Singh 2026-11-26 9:38 ` [PATCH v2 1/2] dt-bindings: usb: ti,tusb1046: Document no-hpd Ajit Singh 2026-11-27 10:56 ` Romain Gantois 2026-11-27 11:02 ` Romain Gantois 2026-11-27 11:03 ` Romain Gantois 2026-11-26 9:38 ` [PATCH v2 2/2] usb: typec: mux: tusb1046: Support no-hpd Ajit Singh 2026-11-27 11:04 ` Romain Gantois
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox