From patchwork Tue Sep 17 15:10:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= X-Patchwork-Id: 13806257 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3C6C3CAC588 for ; Tue, 17 Sep 2024 15:16:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Q5o/w+Og7Zq+gJWW+L+++plpsvu1kWMuvJvgOLXM2v4=; b=aI3BjcCGEix0qYAA85fa5H2Vty GEw87/7a8vLIkafqsRGXgpQSbXae5Ew0jH7HoMaTAz0yjF25frtOWjZtQj2HdGIczKiDv1u4L53Z9 9dkwIqwK/rh2KHiTGnteczF9dYFimRBWAu5nPcucy7e2PYSYNrVUeg6CEy/ARZR6H92QM7HMD1pCw pdhSXiQcymKhKnKJBDQOHBCZ5Z+PvyirAKtpRCrABTDBxXQkKVospvGoPohPlA+MRB+VT3tUuOzrS iDQHsDsjk1kbXykHdeCZo7ALbuFlqPXgHxsLtUDKiIfWZfK4TPUs8PTRah9gVXKSVIcCaTt58/WWq eFMeHCVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sqZwW-00000006N3p-1Ucv; Tue, 17 Sep 2024 15:16:40 +0000 Received: from uho.ysoft.cz ([81.19.3.130]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sqZrl-00000006Mcd-2k9R for linux-arm-kernel@lists.infradead.org; Tue, 17 Sep 2024 15:11:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1726585904; bh=Q5o/w+Og7Zq+gJWW+L+++plpsvu1kWMuvJvgOLXM2v4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RTiHy/cg/ZtZ4yV/fl4CzCC/jj8WfCku1VoFH7TLTR3lbM4jjQ6+xBhwbxBr1mwtX vv8NPJ7DRdWgFYoOwW8Z0hlTXwIUCOFFWofTWk+HG8m6UoimVG13dlkws8Y2caK4Lw xdzJ4vs+Ygqg6+1OnWj69BKtJFpUA5agElLS21B8= Received: from vokac-nb.ysoft.local (unknown [10.1.8.111]) by uho.ysoft.cz (Postfix) with ESMTP id 16E18A25FB; Tue, 17 Sep 2024 17:11:44 +0200 (CEST) From: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Shawn Guo , Petr Benes Cc: Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Herburger , Hiago De Franco , Hugo Villeneuve , Joao Paulo Goncalves , Michael Walle , Alexander Stein , Mathieu Othacehe , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, =?utf-8?b?TWljaGFsIFZva8OhxI0=?= Subject: [PATCH 4/4] arm64: dts: imx8mp-iota2: Enable the USB Type-C port Date: Tue, 17 Sep 2024 17:10:01 +0200 Message-ID: <20240917151001.1289399-5-michal.vokac@ysoft.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240917151001.1289399-1-michal.vokac@ysoft.com> References: <20240917151001.1289399-1-michal.vokac@ysoft.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240917_081145_867789_7BDF1AAD X-CRM114-Status: GOOD ( 10.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Petr Benes Enable the USB Type-C port with the Diodes PI5USB30213A port controller. The port supports dual role data but can operate only in source power role and PD is not supported. Signed-off-by: Petr Benes Signed-off-by: Michal Vokáč --- .../boot/dts/freescale/imx8mp-iota2-lumpy.dts | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-iota2-lumpy.dts b/arch/arm64/boot/dts/freescale/imx8mp-iota2-lumpy.dts index 21d0899cabd5..b15d211e8667 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-iota2-lumpy.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-iota2-lumpy.dts @@ -38,6 +38,17 @@ memory@40000000 { <0x1 0x00000000 0 0x80000000>; }; + reg_typec: regulator-typec { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbc_vbus>; + regulator-max-microvolt = <5000000>; + regulator-min-microvolt = <5000000>; + regulator-name = "typec"; + }; + reg_usb_host: regulator-usb-host { compatible = "regulator-fixed"; enable-active-high; @@ -218,6 +229,47 @@ &i2c2 { pinctrl-0 = <&pinctrl_i2c2>; status = "okay"; + tcpc@d { + compatible = "diodes,pi5usb30213a"; + reg = <0xd>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec>; + interrupts-extended = <&gpio1 5 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + vbus-supply = <®_typec>; + power-role = "source"; + data-role = "dual"; + typec-power-opmode = "default"; + self-powered; + pd-disable; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb_con_hs: endpoint { + remote-endpoint = <&typec_hs>; + }; + }; + + port@1 { + reg = <1>; + + usb_con_ss: endpoint { + remote-endpoint = <&typec_ss>; + }; + }; + }; + }; + }; + rtc: rtc@68 { compatible = "dallas,ds1341"; reg = <0x68>; @@ -237,6 +289,38 @@ &uart2 { status = "okay"; }; +&usb3_phy0 { + status = "okay"; +}; + +&usb3_0 { + status = "okay"; +}; + +&usb_dwc3_0 { + #address-cells = <1>; + #size-cells = <0>; + dr_mode = "otg"; + usb-role-switch; + status = "okay"; + + port@0 { + reg = <0>; + + typec_hs: endpoint { + remote-endpoint = <&usb_con_hs>; + }; + }; + + port@1 { + reg = <1>; + + typec_ss: endpoint { + remote-endpoint = <&usb_con_ss>; + }; + }; +}; + &usb3_phy1 { vbus-supply = <®_usb_host>; status = "okay"; @@ -356,6 +440,12 @@ MX8MP_IOMUXC_SAI3_MCLK__PWM4_OUT 0x102 >; }; + pinctrl_typec: typecgrp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO05__GPIO1_IO05 0x1c0 + >; + }; + pinctrl_uart2: uart2grp { fsl,pins = < MX8MP_IOMUXC_UART2_RXD__UART2_DCE_RX 0x0 @@ -363,6 +453,12 @@ MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX 0x0 >; }; + pinctrl_usbc_vbus: usbcgrp { + fsl,pins = + ; + }; + pinctrl_usb_host_vbus: usb1grp { fsl,pins = < MX8MP_IOMUXC_GPIO1_IO14__USB2_OTG_PWR 0x0