Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7413088rwl; Thu, 23 Mar 2023 04:07:13 -0700 (PDT) X-Google-Smtp-Source: AK7set9R2pQfWo2pH5Ls1GF/P3ZfmcxCAeOpU3tdovOuoFZ0Vwtksf0ccQw7D63fyJ3wgomPW7Ar X-Received: by 2002:a17:907:2169:b0:933:4ca3:9678 with SMTP id rl9-20020a170907216900b009334ca39678mr10660874ejb.24.1679569633074; Thu, 23 Mar 2023 04:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679569633; cv=none; d=google.com; s=arc-20160816; b=nvHX2WOl3eJY4qLq8AuQs2WynQtiNznczs2m/hioeZWeXjlJBYjUio8MJFtrljTOyr rgWMGR0xJGc2z0pe+igelbMAgHHSvC0zUJUMh43m00BnHnYjQ0gPkcKjkPFgxUq58/Ji PQtVjdVIy6F6znfuzpqnFzWKbuty3GWmBbjmcymkZnO5wg0RUHspRgSQka9bje1Pq5A4 SDmu3uKjgJ5nnSs1sEqhdvXfr53LqJCn2G+cfgbUnt5LrjbYarfw/qjB1HunSYPsMGAE 0WHqLv2jTWr/b64R9RjU86LV0L88+72lEFVfgKQ9jHIzvrctQRL48oG1RLzM3hvraBfl 5R3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=0HMHU0Kb+M1xdpOR28wI7DuXaxtA/Vo4OtFAfBJa4Wo=; b=Tlw2HiOYT+XcehYQE0cRum/CvlXHqdoZQ5L6z01pP80/kkSnXCkgM9BbZD7z1Ml2cv nF3EfHWGEU2YbI1UjuMA/63sZYfJwtUzl39eV/FMPM1vSyN+7U2+NnqOt26tXRyXArMo QAdxlDD8HU1MZjgUbH4RWxcoTRzsdNGzKjz5NrSWboBfv/qbSAR2XLID2+8XUKfgdvxH g1VEQgtLLAEmLNvYFD8nuQ/cz3uXtdWTA1bvZUgRXpWxmXdrnCG7CzzNen8wBMJqEQM3 hZ53BfNv+8cDvrbromBweugV2EWNy0YYEMItCmD2Aa4DaI35QDXUWRgnfsROJaupi1j3 XSbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020a170906815400b0093448e806d3si11489767ejw.85.2023.03.23.04.06.49; Thu, 23 Mar 2023 04:07:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229563AbjCWLAG (ORCPT + 99 others); Thu, 23 Mar 2023 07:00:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231168AbjCWK7c (ORCPT ); Thu, 23 Mar 2023 06:59:32 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF271EBDC for ; Thu, 23 Mar 2023 03:58:39 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfIeN-0000lT-A1; Thu, 23 Mar 2023 11:58:31 +0100 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pfIeM-00682G-5J; Thu, 23 Mar 2023 11:58:30 +0100 Received: from mfe by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pfIeL-008gli-41; Thu, 23 Mar 2023 11:58:29 +0100 From: Marco Felsch To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, linux-imx@nxp.com, festevam@gmail.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH] arm64: dts: imx8mp-evk: add dual-role usb port1 support Date: Thu, 23 Mar 2023 11:58:26 +0100 Message-Id: <20230323105826.2058003-1-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The i.MX8MP-EVK has a dual-role usb-type-c port marked as PORT1. By this commit the dual-role support is added which allows the user-space to assign usb-gadget functions to it via the configFS. Signed-off-by: Marco Felsch --- arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 59 ++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index f2d93437084be..982fe35f09a7e 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -5,7 +5,9 @@ /dts-v1/; +#include #include +#include #include "imx8mp.dtsi" / { @@ -336,6 +338,34 @@ &i2c2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c2>; status = "okay"; + + tcpc@50 { + compatible = "nxp,ptn5110"; + reg = <0x50>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_tcpc>; + interrupt-parent = <&gpio4>; + interrupts = <19 IRQ_TYPE_LEVEL_LOW>; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + power-role = "dual"; + data-role = "dual"; + try-power-role = "sink"; + source-pdos = ; + sink-pdos = ; + op-sink-microwatt = <15000000>; + self-powered; + }; + + port { + usb_con_ss: endpoint { + remote-endpoint = <&usb_dwc3_0_drd>; + }; + }; + }; }; &i2c3 { @@ -449,14 +479,37 @@ &uart2 { status = "okay"; }; +&usb3_phy0 { + status = "okay"; +}; + &usb3_phy1 { status = "okay"; }; +&usb3_0 { + status = "okay"; +}; + &usb3_1 { status = "okay"; }; +&usb_dwc3_0 { + dr_mode = "otg"; + hnp-disable; + srp-disable; + adp-disable; + usb-role-switch; + status = "okay"; + + port { + usb_dwc3_0_drd: endpoint { + remote-endpoint = <&usb_con_ss>; + }; + }; +}; + &usb_dwc3_1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1_vbus>; @@ -666,6 +719,12 @@ MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x40 >; }; + pinctrl_tcpc: tcpcgrp { + fsl,pins = < + MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x159 + >; + }; + pinctrl_uart1: uart1grp { fsl,pins = < MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x140 -- 2.30.2