From: Rob Herring <robh@kernel.org>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: andreas@fatal.se, jun.li@nxp.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Guenter Roeck <linux@roeck-us.net>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/4] dt-bindings: usb: gpio-sbu-mux: add support for ss-data lanes mux
Date: Thu, 4 May 2023 14:47:57 -0500 [thread overview]
Message-ID: <20230504194757.GA145231-robh@kernel.org> (raw)
In-Reply-To: <20230504-b4-v6-3-topic-boards-imx8mp-evk-dual-role-usb-v2-1-3889b1b2050c@pengutronix.de>
On Thu, May 04, 2023 at 03:46:50PM +0200, Marco Felsch wrote:
> This adds the support for GPIO based USB-C SS data lane muxing.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> .../devicetree/bindings/usb/gpio-sbu-mux.yaml | 82 +++++++++++++++++++---
> 1 file changed, 71 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
> index bf4b1d016e1f..796f3283ac02 100644
> --- a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
> +++ b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
> @@ -4,24 +4,26 @@
> $id: "http://devicetree.org/schemas/usb/gpio-sbu-mux.yaml#"
> $schema: "http://devicetree.org/meta-schemas/core.yaml#"
>
> -title: GPIO-based SBU mux
> +title: GPIO-based SS/SBU mux
>
> maintainers:
> - Bjorn Andersson <andersson@kernel.org>
>
> description:
> - In USB Type-C applications the SBU lines needs to be connected, disconnected
> - and swapped depending on the altmode and orientation. This binding describes
> - a family of hardware solutions which switches between these modes using GPIO
> - signals.
> + In USB Type-C applications the SS/SBU lines needs to be connected,
> + disconnected and swapped depending on the altmode and orientation. This
> + binding describes a family of hardware solutions which switches between these
> + modes using GPIO signals.
Consider whether the mux-control binding would work for this purpose.
Then what controls the muxing can be anything.
>
> properties:
> compatible:
> - items:
> - - enum:
> - - onnn,fsusb43l10x
> - - pericom,pi3usb102
> - - const: gpio-sbu-mux
> + oneOf:
> + - items:
> + - enum:
> + - onnn,fsusb43l10x
> + - pericom,pi3usb102
> + - const: gpio-sbu-mux
> + - const: gpio-ss-mux
>
> enable-gpios:
> description: Switch enable GPIO
> @@ -50,10 +52,18 @@ required:
> - compatible
> - enable-gpios
> - select-gpios
> - - mode-switch
> - orientation-switch
> - port
>
> +if:
> + properties:
> + compatible:
> + contains:
> + const: gpio-sbu-mux
> +then:
> + required:
> + - mode-switch
> +
> additionalProperties: false
>
> examples:
> @@ -107,4 +117,54 @@ examples:
> };
> };
> };
> +
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + tcpm {
> + connector {
> + compatible = "usb-c-connector";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + tcpm_hs_out: endpoint {
> + remote-endpoint = <&usb_hs_phy_in>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + tcpm_ss_out: endpoint {
> + remote-endpoint = <&usb_ss_phy_in>;
> + };
> + };
> +
> + port@2 {
> + reg = <2>;
> + tcpm_ss_mux_out: endpoint {
> + remote-endpoint = <&ss_mux_in>;
> + };
> + };
port@2 already has a defined use for SBU signals. You can't use it.
port@1 corresponds to the SS signals.
> + };
> + };
> + };
> +
> + usb-ss-mux {
> + compatible = "gpio-ss-mux";
> +
> + enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>;
> + select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>;
> +
> + orientation-switch;
> +
> + port {
This is a mux device. It needs an output port and N input ports.
Please present a complete picture of your USB-C related h/w. It's hard
to review with just 'I have a GPIO controlling the SS muxing'.
Rob
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: andreas@fatal.se, jun.li@nxp.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Guenter Roeck <linux@roeck-us.net>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/4] dt-bindings: usb: gpio-sbu-mux: add support for ss-data lanes mux
Date: Thu, 4 May 2023 14:47:57 -0500 [thread overview]
Message-ID: <20230504194757.GA145231-robh@kernel.org> (raw)
In-Reply-To: <20230504-b4-v6-3-topic-boards-imx8mp-evk-dual-role-usb-v2-1-3889b1b2050c@pengutronix.de>
On Thu, May 04, 2023 at 03:46:50PM +0200, Marco Felsch wrote:
> This adds the support for GPIO based USB-C SS data lane muxing.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> .../devicetree/bindings/usb/gpio-sbu-mux.yaml | 82 +++++++++++++++++++---
> 1 file changed, 71 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
> index bf4b1d016e1f..796f3283ac02 100644
> --- a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
> +++ b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
> @@ -4,24 +4,26 @@
> $id: "http://devicetree.org/schemas/usb/gpio-sbu-mux.yaml#"
> $schema: "http://devicetree.org/meta-schemas/core.yaml#"
>
> -title: GPIO-based SBU mux
> +title: GPIO-based SS/SBU mux
>
> maintainers:
> - Bjorn Andersson <andersson@kernel.org>
>
> description:
> - In USB Type-C applications the SBU lines needs to be connected, disconnected
> - and swapped depending on the altmode and orientation. This binding describes
> - a family of hardware solutions which switches between these modes using GPIO
> - signals.
> + In USB Type-C applications the SS/SBU lines needs to be connected,
> + disconnected and swapped depending on the altmode and orientation. This
> + binding describes a family of hardware solutions which switches between these
> + modes using GPIO signals.
Consider whether the mux-control binding would work for this purpose.
Then what controls the muxing can be anything.
>
> properties:
> compatible:
> - items:
> - - enum:
> - - onnn,fsusb43l10x
> - - pericom,pi3usb102
> - - const: gpio-sbu-mux
> + oneOf:
> + - items:
> + - enum:
> + - onnn,fsusb43l10x
> + - pericom,pi3usb102
> + - const: gpio-sbu-mux
> + - const: gpio-ss-mux
>
> enable-gpios:
> description: Switch enable GPIO
> @@ -50,10 +52,18 @@ required:
> - compatible
> - enable-gpios
> - select-gpios
> - - mode-switch
> - orientation-switch
> - port
>
> +if:
> + properties:
> + compatible:
> + contains:
> + const: gpio-sbu-mux
> +then:
> + required:
> + - mode-switch
> +
> additionalProperties: false
>
> examples:
> @@ -107,4 +117,54 @@ examples:
> };
> };
> };
> +
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + tcpm {
> + connector {
> + compatible = "usb-c-connector";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + tcpm_hs_out: endpoint {
> + remote-endpoint = <&usb_hs_phy_in>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + tcpm_ss_out: endpoint {
> + remote-endpoint = <&usb_ss_phy_in>;
> + };
> + };
> +
> + port@2 {
> + reg = <2>;
> + tcpm_ss_mux_out: endpoint {
> + remote-endpoint = <&ss_mux_in>;
> + };
> + };
port@2 already has a defined use for SBU signals. You can't use it.
port@1 corresponds to the SS signals.
> + };
> + };
> + };
> +
> + usb-ss-mux {
> + compatible = "gpio-ss-mux";
> +
> + enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>;
> + select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>;
> +
> + orientation-switch;
> +
> + port {
This is a mux device. It needs an output port and N input ports.
Please present a complete picture of your USB-C related h/w. It's hard
to review with just 'I have a GPIO controlling the SS muxing'.
Rob
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-05-04 19:56 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-04 13:46 [PATCH v2 0/4] Add i.MX8MP-EVK USB Gadget Support Marco Felsch
2023-05-04 13:46 ` Marco Felsch
2023-05-04 13:46 ` [PATCH v2 1/4] dt-bindings: usb: gpio-sbu-mux: add support for ss-data lanes mux Marco Felsch
2023-05-04 13:46 ` Marco Felsch
2023-05-04 14:08 ` Rob Herring
2023-05-04 14:08 ` Rob Herring
2023-05-04 14:29 ` Marco Felsch
2023-05-04 14:29 ` Marco Felsch
2023-05-04 19:47 ` Rob Herring [this message]
2023-05-04 19:47 ` Rob Herring
2023-05-04 13:46 ` [PATCH v2 2/4] usb: typec: mux: gpio-sbu-mux: add support for ss data lane muxing Marco Felsch
2023-05-04 13:46 ` Marco Felsch
2023-05-04 15:46 ` kernel test robot
2023-05-04 15:46 ` kernel test robot
2023-05-04 13:46 ` [PATCH v2 3/4] usb: typec: tcpci: clear the fault status bit Marco Felsch
2023-05-04 13:46 ` Marco Felsch
2023-05-04 14:08 ` Guenter Roeck
2023-05-04 14:08 ` Guenter Roeck
2023-05-04 14:27 ` Marco Felsch
2023-05-04 14:27 ` Marco Felsch
2023-05-04 15:27 ` Guenter Roeck
2023-05-04 15:27 ` Guenter Roeck
2023-05-04 16:52 ` Marco Felsch
2023-05-04 16:52 ` Marco Felsch
2023-08-16 16:29 ` Fabio Estevam
2023-08-16 16:29 ` Fabio Estevam
2023-08-17 8:00 ` Marco Felsch
2023-08-17 8:00 ` Marco Felsch
2023-05-04 13:46 ` [PATCH v2 4/4] arm64: dts: imx8mp-evk: add dual-role usb port1 support Marco Felsch
2023-05-04 13:46 ` Marco Felsch
2023-05-14 13:21 ` [PATCH v2 0/4] Add i.MX8MP-EVK USB Gadget Support Shawn Guo
2023-05-15 3:48 ` Greg Kroah-Hartman
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=20230504194757.GA145231-robh@kernel.org \
--to=robh@kernel.org \
--cc=andersson@kernel.org \
--cc=andreas@fatal.se \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jun.li@nxp.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=m.felsch@pengutronix.de \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.