From: Marek Vasut <marex@nabladev.com>
To: Fabrice Gasnier <fabrice.gasnier@foss.st.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Christian Bruel <christian.bruel@foss.st.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Srinivas Kandagatla <srini@kernel.org>,
Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Pankaj Dev <pankaj.dev@st.com>
Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-phy@lists.infradead.org
Subject: Re: [PATCH 02/16] usb: typec: tcpm: Add STM32 tcpp driver
Date: Sat, 22 Aug 2026 06:50:19 +0200 [thread overview]
Message-ID: <de3f992b-f39c-4ed3-9033-91eca7fc966c@nabladev.com> (raw)
In-Reply-To: <20260821-ucpd-host-fusb340-v7-2-rfc-v1-2-c5e27cbc0795@foss.st.com>
On 8/21/26 6:23 PM, Fabrice Gasnier wrote:
> From: Christian Bruel <christian.bruel@foss.st.com>
>
> Add support for the STMicroelectronics TCPP02 and TCPP03 USB-C PD
> protection for dual role power (DRP).
> It can be used with the STM32 family embedding UCPD controller.
[...]
> +++ b/drivers/usb/typec/tcpm/st_tcpp.h
> @@ -0,0 +1,21 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Copyright (C) 2026 STMicroelectronics
> + */
> +
> +#ifndef __ST_TCPP_H__
> +#define __ST_TCPP_H__
> +
> +typedef void (*tcpp_vbus_cb_t)(void *data, bool vbus_present);
> +
> +int tcpp_init(struct device *tcpp);
> +void tcpp_deinit(struct device *tcpp);
> +int tcpp_get_vbus(struct device *tcpp);
> +int tcpp_set_vbus(struct device *tcpp, bool on, bool charge);
> +int tcpp_set_vconn(struct device *dev, bool on, enum typec_cc_polarity polarity);
> +int tcpp_attach(struct device *tcpp);
> +int tcpp_detach(struct device *tcpp);
> +int tcpp_register_vbus_notifier(struct device *dev, tcpp_vbus_cb_t cb, void *data);
> +void tcpp_unregister_vbus_notifier(struct device *dev);
Model the TCPP as four GPIOs and you won't need any of this
horribleness. Have a look at the UCPD driver I posted two days ago,
"[PATCH 2/4] usb: typec: ucpd: Add ST UCPD driver", it operates TCPP
exactly that way.
next prev parent reply other threads:[~2026-08-22 7:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 16:23 [PATCH 00/16] Add support for USB Type-C on STM32MP25 Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 01/16] dt-bindings: usb: st,tcpp: Document TCPP USB-C PD protection chip Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 02/16] usb: typec: tcpm: Add STM32 tcpp driver Fabrice Gasnier
2026-08-22 4:50 ` Marek Vasut [this message]
2026-08-21 16:23 ` [PATCH 03/16] dt-bindings: usb: st,stm32-ucpd: Document STM32 UCPD controller Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 04/16] usb: typec: tcpm: Add STM32 UCPD driver Fabrice Gasnier
2026-08-24 14:38 ` Philipp Zabel
2026-08-21 16:23 ` [PATCH 05/16] dt-bindings: usb: add FUSB340 switch binding Fabrice Gasnier
2026-08-22 4:49 ` Marek Vasut
2026-08-25 13:09 ` Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 06/16] usb: typec: add FUSB340 SuperSpeed switch driver Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 07/16] dt-bindings: nvmem: st,stm32-romem: align patternProperties regex on nvmem-deprecated-cells.yaml Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 08/16] arm64: dts: st: Add ucpd node on stm32mp251 Fabrice Gasnier
2026-08-22 5:00 ` Marek Vasut
2026-08-21 16:23 ` [PATCH 09/16] arm64: dts: st: add i2c1 pinctrl entries for stm32mp25 Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 10/16] arm64: dts: st: add tcpp " Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 11/16] dt-bindings: usb: dwc3: stm32: refer to dwc3-common Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 12/16] dt-bindings: phy: stm32: adapt usb2phy as syscon child on stm32mp25 Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 13/16] dt-bindings: arm: stm32mp2: allow child nodes since simple-mfd transition Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 14/16] arm64: dts: st: enable usb on stm32mp257f-ev1 Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 15/16] arm64: dts: st: enable usb on stm32mp257f-dk Fabrice Gasnier
2026-08-21 16:23 ` [PATCH 16/16] arm64: configs: enable usb and its dependencies used on stm32mp25 Fabrice Gasnier
2026-08-22 7:28 ` Krzysztof Kozlowski
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=de3f992b-f39c-4ed3-9033-91eca7fc966c@nabladev.com \
--to=marex@nabladev.com \
--cc=alexandre.torgue@foss.st.com \
--cc=broonie@kernel.org \
--cc=christian.bruel@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrice.gasnier@foss.st.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-usb@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=p.zabel@pengutronix.de \
--cc=pankaj.dev@st.com \
--cc=robh@kernel.org \
--cc=srini@kernel.org \
--cc=vkoul@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