Linux USB
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Alexey Charkov <alchark@flipper.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Badhri Jagan Sridharan <badhri@google.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: tcpci: add DRM DP HPD bridge support
Date: Tue, 19 May 2026 16:51:07 +0300	[thread overview]
Message-ID: <agxqyzMwxYcVQU4F@kuha> (raw)
In-Reply-To: <20260513-tcpci-drm-bridge-v1-1-1467e770727d@flipper.net>

Hi Alexey,

On Wed, May 13, 2026 at 05:43:16PM +0400, Alexey Charkov wrote:
> Add support to use TCPCI based USB-C connectors with the DP AltMode
> helper code on devicetree based platforms.

We should be getting a generic HPD bridge, I think that should work
in this case as well:
https://lore.kernel.org/lkml/20260304094152.92-2-kernel@airkyi.com/

Can you please check that?

thanks,

> Signed-off-by: Alexey Charkov <alchark@flipper.net>
> ---
>  drivers/usb/typec/tcpm/Kconfig |  2 ++
>  drivers/usb/typec/tcpm/tcpci.c | 13 +++++++++++++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/drivers/usb/typec/tcpm/Kconfig b/drivers/usb/typec/tcpm/Kconfig
> index 00baa7503d45..53abde8ebef9 100644
> --- a/drivers/usb/typec/tcpm/Kconfig
> +++ b/drivers/usb/typec/tcpm/Kconfig
> @@ -13,7 +13,9 @@ if TYPEC_TCPM
>  
>  config TYPEC_TCPCI
>  	tristate "Type-C Port Controller Interface driver"
> +	depends on DRM || DRM=n
>  	depends on I2C
> +	select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF
>  	select REGMAP_I2C
>  	help
>  	  Type-C Port Controller driver for TCPCI-compliant controller.
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index 0148b8f50412..e6cccbd377f7 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -5,6 +5,7 @@
>   * USB Type-C Port Controller Interface.
>   */
>  
> +#include <drm/bridge/aux-bridge.h>
>  #include <linux/bitfield.h>
>  #include <linux/delay.h>
>  #include <linux/gpio/consumer.h>
> @@ -837,6 +838,7 @@ static int tcpci_parse_config(struct tcpci *tcpci)
>  
>  struct tcpci *tcpci_register_port(struct device *dev, struct tcpci_data *data)
>  {
> +	struct auxiliary_device *bridge_dev;
>  	struct tcpci *tcpci;
>  	int err;
>  
> @@ -889,12 +891,23 @@ struct tcpci *tcpci_register_port(struct device *dev, struct tcpci_data *data)
>  	if (err < 0)
>  		return ERR_PTR(err);
>  
> +	bridge_dev = devm_drm_dp_hpd_bridge_alloc(tcpci->dev, to_of_node(tcpci->tcpc.fwnode));
> +	if (IS_ERR(bridge_dev))
> +		return ERR_CAST(bridge_dev);
> +
>  	tcpci->port = tcpm_register_port(tcpci->dev, &tcpci->tcpc);
>  	if (IS_ERR(tcpci->port)) {
>  		fwnode_handle_put(tcpci->tcpc.fwnode);
>  		return ERR_CAST(tcpci->port);
>  	}
>  
> +	err = devm_drm_dp_hpd_bridge_add(tcpci->dev, bridge_dev);
> +	if (err < 0) {
> +		tcpm_unregister_port(tcpci->port);
> +		fwnode_handle_put(tcpci->tcpc.fwnode);
> +		return ERR_PTR(err);
> +	}
> +
>  	return tcpci;
>  }
>  EXPORT_SYMBOL_GPL(tcpci_register_port);
> 
> ---
> base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83
> change-id: 20260513-tcpci-drm-bridge-d8dc384d71ee
> 
> Best regards,
> -- 
> Alexey Charkov <alchark@flipper.net>

-- 
heikki

      reply	other threads:[~2026-05-19 13:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 13:43 [PATCH] usb: typec: tcpci: add DRM DP HPD bridge support Alexey Charkov
2026-05-19 13:51 ` Heikki Krogerus [this message]

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=agxqyzMwxYcVQU4F@kuha \
    --to=heikki.krogerus@linux.intel.com \
    --cc=alchark@flipper.net \
    --cc=badhri@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --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