Message ID | 20250416000208.3568635-3-swboyd@chromium.org |
---|---|
State | New |
Headers | show |
Series | platform/chrome: Support for USB DP altmode muxing w/ DT | expand |
On Tue, Apr 22, 2025 at 04:37:53PM +0300, Dmitry Baryshkov wrote: > On 16/04/2025 03:02, Stephen Boyd wrote: > > The DP altmode driver fails the configure stage because the status VDO > > that is spoofed in cros_typec_enable_dp() is missing a couple flags. Add > > them so that the configure succeeds. This has the nice side effect of > > properly reflecting the pin assignment and configuration of the DP > > altmode in sysfs. > > > Fixes? Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > > > > Cc: Benson Leung <bleung@chromium.org> > > Cc: Tzung-Bi Shih <tzungbi@kernel.org> > > Cc: <chrome-platform@lists.linux.dev> > > Cc: Pin-yen Lin <treapking@chromium.org> > > Cc: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> > > Cc: Łukasz Bartosik <ukaszb@chromium.org> > > Cc: Jameson Thies <jthies@google.com> > > Cc: Andrei Kuchynski <akuchynski@chromium.org> > > Signed-off-by: Stephen Boyd <swboyd@chromium.org> > > --- > > drivers/platform/chrome/cros_ec_typec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c > > index 6ee182101bc9..2cbe29f08064 100644 > > --- a/drivers/platform/chrome/cros_ec_typec.c > > +++ b/drivers/platform/chrome/cros_ec_typec.c > > @@ -531,7 +531,7 @@ static int cros_typec_enable_dp(struct cros_typec_data *typec, > > } > > /* Status VDO. */ > > - dp_data.status = DP_STATUS_ENABLED; > > + dp_data.status = DP_STATUS_ENABLED | DP_STATUS_CON_UFP_D | DP_STATUS_PREFER_MULTI_FUNC; > > if (port->mux_flags & USB_PD_MUX_HPD_IRQ) > > dp_data.status |= DP_STATUS_IRQ_HPD; > > if (port->mux_flags & USB_PD_MUX_HPD_LVL) > > > -- > With best wishes > Dmitry
diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index 6ee182101bc9..2cbe29f08064 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -531,7 +531,7 @@ static int cros_typec_enable_dp(struct cros_typec_data *typec, } /* Status VDO. */ - dp_data.status = DP_STATUS_ENABLED; + dp_data.status = DP_STATUS_ENABLED | DP_STATUS_CON_UFP_D | DP_STATUS_PREFER_MULTI_FUNC; if (port->mux_flags & USB_PD_MUX_HPD_IRQ) dp_data.status |= DP_STATUS_IRQ_HPD; if (port->mux_flags & USB_PD_MUX_HPD_LVL)
The DP altmode driver fails the configure stage because the status VDO that is spoofed in cros_typec_enable_dp() is missing a couple flags. Add them so that the configure succeeds. This has the nice side effect of properly reflecting the pin assignment and configuration of the DP altmode in sysfs. Cc: Benson Leung <bleung@chromium.org> Cc: Tzung-Bi Shih <tzungbi@kernel.org> Cc: <chrome-platform@lists.linux.dev> Cc: Pin-yen Lin <treapking@chromium.org> Cc: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Cc: Łukasz Bartosik <ukaszb@chromium.org> Cc: Jameson Thies <jthies@google.com> Cc: Andrei Kuchynski <akuchynski@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> --- drivers/platform/chrome/cros_ec_typec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)