From patchwork Tue Apr 23 09:33:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13639669 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 CE449C04FF8 for ; Tue, 23 Apr 2024 09:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=PABSjAUi+NFs8R3WiuCAKhJzE1iDOtmL59HkGgkYXeQ=; b=txgcPqZmBM2Qpf yC2UpcOF56QQGJDGi5aVVnFNdcIlubWLelaQ6FbCjZVmH/o7g+4OazFVWKpLCImtNsm5357lWrGIG o3cLZcGMilatz4hLctw+w35D5NEBeFj7DlKwzh8o4bFTHA5hhwD44bOVIbJZBpc2D7qhSzuVXhwj5 PXRZ8fq4LUODZgSF0Ag6RAzseoFlRbX3XoddOpBLEfccVzdJ2DoqGon6u1ylG/1tHg97Azq5NNg8C RANJYtawVXyY3m/QwrBvdf/6JN3cuKB8+9F1X3FcXUHtoKMY4RIW9kPQF7XqvUX/1fSVotFE0NB/W kGJxZDJcURP+XGh1jvUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzCXK-0000000GgPn-484V; Tue, 23 Apr 2024 09:34:02 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzCXH-0000000GgOX-1BLf for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2024 09:34:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1713864839; x=1745400839; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=1k42/CWadvw0r+CYtNZdyyObiEgdUN60PPaTnqNvua4=; b=YDuiSfpL9m6o7YRT+RBUbz+1tqee0SSUEpi+zXsGMvoqKwcITq1SGONc juM52hAqLoftlltBIC+FDmFhOmW7AgRFOI0qbKqsRO72rWBCJCSsSUUZE 624Qa+0wp5LAYtedemca+Vekbrwq9VxT3jAaJ/JBlX1WS/XLGif9kvDZo LwMt42DsOzJQivZAYCcIyValAcomWZRy/QwwDTGTmE1VhNjMYBJXwFLBy cWCXoQu97+0fPX7Wo0lQcwa5zpBWflfUuLD5ol/BikJQdyXvT3wLCvYFq wbtn/ihDy61NCWrOu+RNLP+7QuyqR/YOp1MqslkjRItDJew6T9juN5RiR g==; X-IronPort-AV: E=Sophos;i="6.07,222,1708383600"; d="scan'208";a="36562127" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 23 Apr 2024 11:33:53 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8E46B173F7F; Tue, 23 Apr 2024 11:33:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1713864829; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=1k42/CWadvw0r+CYtNZdyyObiEgdUN60PPaTnqNvua4=; b=opqgTN07Hlk8ImEG4B6XUDOCMXhsTRMAoLn06g3eEqsHanScDULX+CtT0rOeP/T4IgxwfW 9h+KXprD/nhMOAn3hB9DuQ0pxpPP0rFq/DA2hSM3yan9KlPtwXz7ek7AgN3jF+0lOoaEDs R82Ak43LU2NfzUfd9/VjeOII+0UiRBdMCm/4D0aKVNCYTzNhS/Xmunywb2AFr1mEhIiJRO y/kyKnDcGIx+gve8tCaxnHFe9UwiSZhy/KrET+uKq2v80hhrNOEwyUGOETQ0d37VrgV3MS Bbq/Kz+vC/aclFoY3NA+unIQVV/GbcMX3LxLXlfGSS3zQyAWGUrFvxS0EOCQgg== From: Alexander Stein To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Alexander Stein , linux@ew.tq-group.com, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: mba93xxla: Add USB support Date: Tue, 23 Apr 2024 11:33:40 +0200 Message-Id: <20240423093341.1927592-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240423_023359_845927_AB2A2DE6 X-CRM114-Status: UNSURE ( 8.90 ) X-CRM114-Notice: Please train this message. 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 This adds support for both USB host and USB Type-C ports. This includes the on-board USB hub. Signed-off-by: Alexander Stein --- .../freescale/imx93-tqma9352-mba93xxla.dts | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts index eb3f4cfb69863..da8f19a646a98 100644 --- a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts +++ b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts @@ -252,6 +252,32 @@ temperature-sensor@1c { reg = <0x1c>; }; + ptn5110: usb-typec@50 { + compatible = "nxp,ptn5110", "tcpci"; + reg = <0x50>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec>; + interrupt-parent = <&gpio1>; + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; + + connector { + compatible = "usb-c-connector"; + label = "X17"; + power-role = "dual"; + data-role = "dual"; + try-power-role = "sink"; + typec-power-opmode = "default"; + pd-disable; + self-powered; + + port { + typec_con_hs: endpoint { + remote-endpoint = <&typec_hs>; + }; + }; + }; + }; + eeprom2: eeprom@54 { compatible = "nxp,se97b", "atmel,24c02"; reg = <0x54>; @@ -433,6 +459,41 @@ &tpm5 { pinctrl-0 = <&pinctrl_tpm5>; }; +&usbotg1 { + dr_mode = "otg"; + hnp-disable; + srp-disable; + adp-disable; + usb-role-switch; + disable-over-current; + samsung,picophy-pre-emp-curr-control = <3>; + samsung,picophy-dc-vol-level-adjust = <7>; + status = "okay"; + + port { + typec_hs: endpoint { + remote-endpoint = <&typec_con_hs>; + }; + }; +}; + +&usbotg2 { + dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + disable-over-current; + samsung,picophy-pre-emp-curr-control = <3>; + samsung,picophy-dc-vol-level-adjust = <7>; + status = "okay"; + + hub_2_0: hub@1 { + compatible = "usb424,2517"; + reg = <1>; + reset-gpios = <&expander1 2 GPIO_ACTIVE_LOW>; + vdd-supply = <®_3v3>; + }; +}; + &usdhc2 { pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc2_hs>, <&pinctrl_usdhc2_gpio>; From patchwork Tue Apr 23 09:33:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13639670 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 A5157C4345F for ; Tue, 23 Apr 2024 09:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=xR4Gx94nDTAxut9VzSmNzIIftxoigcwqzCb6/9kRxcw=; b=RAy/HdMGD2ERsN JSgNpUIs0DAvlzSOCeXvojNJm89OEXLgLM9FjgklCO1m72BkAH3Kmlmri54m0lsyQ1D8jHRa3Lp21 JI2orZ+6Yr3AqZ9TMgEjYfQw70tmtAiRimdlXbyP2iWwHRBQn+NZ/EFrqHeMNacoeZjVmTqu98U3k +6eotWxvjF9igM4zVmzoftCGeroHA6+M90mfU2K21pxOnkaOQ4ZZXZTEPZ0AWI4noWeIwPKs88oUw 11g2RyyvztEIlKeP/y2iymzfnaFJXqTQSiLKJrz81A0c3VwRx9A6i8rDl/s3pO1PuhWdyr1OttWNx QcGAhoS3VLeC1LdzpQVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzCXL-0000000GgPx-2KMS; Tue, 23 Apr 2024 09:34:03 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzCXI-0000000GgOm-2cI8 for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2024 09:34:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1713864840; x=1745400840; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=C8ObYiQbVBMAjGykb0ue88J5nuKE1CbAPzk6NZyXx7I=; b=Y8/FbRHLBKUl6Af3ujxLBwOHrUKZ50bTOxHAH31DSse29F0IjMpFcVbF T02opAwKqd25Chw8fukYWEKeDAlaoxqW4znmed6IzSODsuus0xOWcLtNN HqOoXCmgGXvHhX9KYBXRpYU7e93I9jSSvyZr4P+kg/5MTEBt2RyZ+kmEX rffyErH04OJi3HkASa9A/K3RIzG1OWyCgzqnb2KipF/FN1RnElPaJ02U9 RhwQePOXQPkaczGFtJ1PLaNPxOCZmQGokodVSE+OLAI5TtdfzvEGBJUu3 DOW/B+U+bwDj2YoYNglr6d7hR9w2EmjcEX1GW8fAwPs/zH36UdZdWxIJ4 A==; X-IronPort-AV: E=Sophos;i="6.07,222,1708383600"; d="scan'208";a="36562133" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 23 Apr 2024 11:33:58 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 41CEF175371; Tue, 23 Apr 2024 11:33:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1713864834; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=C8ObYiQbVBMAjGykb0ue88J5nuKE1CbAPzk6NZyXx7I=; b=A6zsYeBoYspOEHGVHkxHB6fDcjbfmktDpF433HD1eYWI0NqpYKIQSDn75ybb6/6dVwHAzP cDnQUOhHG9BZyPxs+p+Pk0c7PtaIVtmQDLtfWaCqDyNGcdff1A5xZOLnWkcRvdnEBdNDnz k619P+tP/OQsg6YaXNoxMzUmfDEi1CLBW8n7R2enN8KzwgftXcwvHCdEAnrkmK4k7p4esb sii+j+YudT8fCu/kmWTliuZd9uXmnqUvWzcPDMAHQqvOoPBsC0c7jv5FkIow/2rNjjPxqC 7rfXUB5xO2i9ZOYQf72tmSkZ7gAjjJNrGrfbNRUD8/FSLT1lkPSYwWwlKAs2uA== From: Alexander Stein To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Alexander Stein , linux@ew.tq-group.com, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] arm64: dts: mba93xxca: Add USB support Date: Tue, 23 Apr 2024 11:33:41 +0200 Message-Id: <20240423093341.1927592-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423093341.1927592-1-alexander.stein@ew.tq-group.com> References: <20240423093341.1927592-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240423_023401_022980_AA064588 X-CRM114-Status: GOOD ( 12.16 ) 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 This adds support for both USB host and USB Type-C ports. This includes the on-board USB hub. Remove the gpio-hog for USB_RESET# as well. Signed-off-by: Alexander Stein --- .../freescale/imx93-tqma9352-mba93xxca.dts | 73 ++++++++++++++++--- 1 file changed, 61 insertions(+), 12 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxca.dts b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxca.dts index af795ecf678b7..852dd3d2eac74 100644 --- a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxca.dts +++ b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxca.dts @@ -303,6 +303,32 @@ temperature-sensor@1c { reg = <0x1c>; }; + ptn5110: usb-typec@50 { + compatible = "nxp,ptn5110", "tcpci"; + reg = <0x50>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec>; + interrupt-parent = <&gpio1>; + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; + + connector { + compatible = "usb-c-connector"; + label = "X17"; + power-role = "dual"; + data-role = "dual"; + try-power-role = "sink"; + typec-power-opmode = "default"; + pd-disable; + self-powered; + + port { + typec_con_hs: endpoint { + remote-endpoint = <&typec_hs>; + }; + }; + }; + }; + eeprom2: eeprom@54 { compatible = "nxp,se97b", "atmel,24c02"; reg = <0x54>; @@ -370,18 +396,6 @@ expander1: gpio@71 { "WLAN_PD#", "WLAN_W_DISABLE#", "WLAN_PERST#", "12V_EN"; - /* - * Controls the on board USB Hub reset which is low - * active as reset signal. The output-low states, the - * signal is inactive, e.g. no reset - */ - usb-reset-hog { - gpio-hog; - gpios = <2 GPIO_ACTIVE_LOW>; - output-low; - line-name = "USB_RESET#"; - }; - /* * Controls the WiFi card PD pin which is low active * as power down signal. The output-high states, the signal @@ -492,6 +506,41 @@ &tpm6 { status = "okay"; }; +&usbotg1 { + dr_mode = "otg"; + hnp-disable; + srp-disable; + adp-disable; + usb-role-switch; + disable-over-current; + samsung,picophy-pre-emp-curr-control = <3>; + samsung,picophy-dc-vol-level-adjust = <7>; + status = "okay"; + + port { + typec_hs: endpoint { + remote-endpoint = <&typec_con_hs>; + }; + }; +}; + +&usbotg2 { + dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + disable-over-current; + samsung,picophy-pre-emp-curr-control = <3>; + samsung,picophy-dc-vol-level-adjust = <7>; + status = "okay"; + + hub_2_0: hub@1 { + compatible = "usb424,2517"; + reg = <1>; + reset-gpios = <&expander1 2 GPIO_ACTIVE_LOW>; + vdd-supply = <®_3v3>; + }; +}; + &usdhc2 { pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc2_hs>, <&pinctrl_usdhc2_gpio>;