From patchwork Mon Jul 29 08:10:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13744538 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 0BA1FC3DA4A for ; Mon, 29 Jul 2024 08:12:00 +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:MIME-Version:Content-Type: Content-Transfer-Encoding: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=uP7NzfByutMIQxzbVIMX1HnJeO30iF8QTUodHTmR32s=; b=bwEPFjENf4bOTDQSOJtoyjsrp3 KuZ/0sla/ECea7xy/iQ5zLktCTCYT7SEmUailJDiTW72lgIUzh2eqMEm0qaSVDDBI8qUTf7H6IE2F vlR4QlM3Ij8vLtadlRi/tMPW5tcSUj/CK/TqzUjg0iiwfUIl+X4MGBbZTewBVKFe1Elzo8Xs9EGr0 nu8QbB6c6zvxNgPa7iDQJqhLH5jN9a1NIbA0pyEBkTXgFAIFRrKK5lvjLiHPMMGnYLxuiEixZ1mSY 7lQSsAo5Kh5BZBzdhHkoU1PKKRDRkyhB4OK5fW3WpT9BmX/APbG+mWkOQCUgTycAOTADzphTdVMxD LJYCmrBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYLTs-0000000AUtH-3RFf; Mon, 29 Jul 2024 08:11:44 +0000 Received: from mail-westeuropeazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c201::] helo=AM0PR83CU005.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYLSi-0000000AUZZ-1QiZ for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 08:10:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ByzShBj56ZzwKa4hSHInOdEnx/qyNMAiwlbzf3HeMqzgfy3+GJc8UpnmNCQLxxzJ6I2YYYt3+YrnqrsyxBUuuw5/mrmnvlHbYo6ppjkPk2NOWv3UEsAqXV+vldgzCbJpHrs2LexhpbSlGjm+1cm4dkFlBej0CLWRpRSRovXQkfszD8WqVUDNcTI+j51uG3f5+pc3kl05gYThDRJp1ENMVx16grbnGUHcNtJffYJf9mpzIZS1ThYxU/f41fGNHComnMTCugtbasHIKgLtH1PyJ/rTH6Z3M9zzvK06lOEBYwUfDP3pnjk34+hhInjMm1CrePZaZ7Pf0Xya5dAUgsIFDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uP7NzfByutMIQxzbVIMX1HnJeO30iF8QTUodHTmR32s=; b=g10D5+zP0tyY6K+drA8KW+I5yy/EU+dTAdgjWP+mdUdafMLzEQ9gt9Gf8ACHoSeSnBQBb2Xws0PGfTZfNonTzLJ7xKUr88k8PTWmNDXvKRPyIRwW7vsB3NtmYfJAUB8tudeNCCGNHOwKxckOOrksKmqCpyLhtT7ruGcIjMw1FezznKzQo/ZEH4qQjP2ql589d59zbR9IWgAlCtvgRmd+bfU7QfS88oAX5hp2ntReaQLBPMcQm3lVl7s3XWvj5Vr21s33qGbz3WudR3asmXQAc3e5kGpmOmGrKUexzgHsGQ1X8IW+oUvHh9SncR3Gp3+7R3+nz73ZAIu21PDqP7bq5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uP7NzfByutMIQxzbVIMX1HnJeO30iF8QTUodHTmR32s=; b=CEfrBMtNwEuJ5QspV1isbKTqdt5twPCB3hiMy3GQGdLBvr8IkE6K6el8q9mWyVzsjDYQPzNgTvOH53arbeRDSRnQp9uAxU5NmZcnBzO2vx89uxBiajI8rdDY8n+N3/sttVYpZBb/+jjsm/K1o/sc70bAakIUABHWJo6jGZ3IU3YQ4p+E8PAdOKBbpG74eefIzIbrLXMA5BAf4bxFigPhCZp1Z0iYjN7Ich5dEGTzlDwS7KdhZBrM8Iya+9JGblsDHj/V+9QPCPXZHDz1KuBu+U+SWt9h9Av4AFwXXsu1NzoWy89DQHpYA7bNZzJcEIuJFAAhIOc/0NXWFdYZ4chOAQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by GVXPR04MB10302.eurprd04.prod.outlook.com (2603:10a6:150:1e7::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.27; Mon, 29 Jul 2024 08:10:28 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%5]) with mapi id 15.20.7784.016; Mon, 29 Jul 2024 08:10:28 +0000 From: Xu Yang To: gregkh@linuxfoundation.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: andersson@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, jun.li@nxp.com Subject: [PATCH 3/3] arm64: dts: imx8mq-evk: add typec node Date: Mon, 29 Jul 2024 16:10:39 +0800 Message-Id: <20240729081039.3904797-3-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240729081039.3904797-1-xu.yang_2@nxp.com> References: <20240729081039.3904797-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI1PR02CA0003.apcprd02.prod.outlook.com (2603:1096:4:1f7::20) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|GVXPR04MB10302:EE_ X-MS-Office365-Filtering-Correlation-Id: c3c33800-f5d9-46ea-d188-08dcafa5e80e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|1800799024|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: xlHpR4od1I4sE4ajET7JCU8INeveONlRXvmwtpPUqqh/bSD1GPtQJemil7UA/EaY8o3o55b/N+lFDo40X7jUNf3GWD33kHoMpOJjmV2o/2PtigyJuVJXNdZs1/peWGn28DwTeKBBdjvnRbjHvpLcqrwZZ7fvcrU9XwKKh1tox4wOy1Z6Z/8dt/Bk6nH9QiNDh9Kgbxt58ME4kKml/j5uhSQnyP1/HteIgpMx+p1dcoVzUMG5Rh33ZcX8BGMMSnnHNk7h6mXNHDmFHVBcbS/aC7Nrxx0Rw8tKyT00SabD5bRGSuq9d41FWk8Avoym+c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/miKBsE52juQL+TNsk4FWUQQUv/7eIp16/QR3Mb3nA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(376014)(1800799024)(7416014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /7Xb9CTExPA4fCzZIhwqVFhxNQzaztu3WLEJdmo93dZc3BxhXMt07i4A79wxp7Sc+BIvET4C2YQbv1wZBYnhOamwXTRVbWovqG5lIOGwMfTeV/agesOcE+UIChDQCe2zOErXTnAGCMFo+Y1GoRFLUpgQzafnZvZH/HVgu1D+NqtrHaTzOFTszyG7BTEExQQite0sfzzQcDhzclnU3eBhpQb2HOuQdp6Pgm8q5o6W8pLhUmVdJGCiqwevWKEc9ZGVfAKcTWdrKiJigtK+l/1njgH1JXxTVlWLXuCbGdvCLBX1CxGDcSWG4VIGVFlxdwYjmyAC7uWdX6ek5DBy5ZTRUqeNf6fjeB3Bq1NWheDROCf6Z8fZtzZyhheC6KPSphROmytDsUtU143NR0pLoKnkTbk4sKry6Lu5LyqwzOWz5ZM4B74T/er+JDjbBDARFEJSZGuhRMucSfjW9FP5jjZ94tH35DBGTcrV/TOvUAmlBp3929dNayMvrHjo8CkOrA9bB4HLll6txtkG4PYuRUB1HXLeINDYslFfP1L3hPg7GJ4tzU7KOTS3jYB8S4H5tsnOeYQkbWdl7Ra8tZ+/12WgvBSVNN91NdcpuKJEI6q54ZngOu3J2jVmRXGtuJZ/esmfb9yoF4euTm5ZFRGKeQ6irp2RL8zH2YL7doPwDxOQ8qP80MzDgJJQlXkaprawvyoiIMBufjhj0Pqv8hTGZCpHFveMNwaiDEunpViuQnaFktywltGsiswVDxds8BNKTO0Oc1TTmJtrgasobvMuhPCmIIK4GvCIBnOXw9z3WqHd4zm4Op+RxqUcupoO4k+TfbUSegJB9bgUwsvy+WwPrhG+WUzmP7Um3zNCJJJHYuGs627hMbwqIJasnyOyX9NkfGKF1m5UYcObcJmcRhQMn7qEX7PHIkLvBY9wc9bI2wLZcwBH4vvp90B1O4965Rw+tBi3LiYK4SCniCa7+ZDuKlDPNAIiLNlo4H5C8OBq6DY5Zer3ah5JgRUtdH4U1Id+HACT9hX8QY5wfTrmXykAT8hLzJzRaecn/KwGhXgEQjb+cpYecD1Ms/HKU7WKebxinhDblzTQn3x+ioFMp/6kFOXKOpkaXlzsJhz6lH4tklALQpZL/1knGbJuhB7GjLWE52XmxFZT0UnnOcPifOICzNgCPwbNSlQCt/GVCGjggSSULNwJF3kOFXiACMClt5Hz8nqpKXwNN+1rURhTikG9+c6NXxQpxOXqDF+3Z0HscF7ltEntvSw7AFM1SP/9K/lrnHYjCgVHK2d6LZ7rXeIC9kShKrbBBPvm7Piu6oKCqT/PHy8AhlwxdE8rF53aeRR3mm+iIDDnEaSZUtXQ7dapbOH1WELCC4fUJAi7HhtoSkw3m7rtdiZ9qTZY9F2CPndNMNbEF6wOrlfhffLgBhcNJpTNZRi3qZrG3eMThxvBgnAwKeoCRyCICt8EGHARSzoxISJ9Sn/ULmxs3LMgZ0rHZY+/Ff5j+0TxgOJqsINX5qzFa5ZZSirk2kt1eNSFCVhO4ATmxCQhUmOw2zt1P7FlPAVLjwjo5i8BWbuNjEGe1fb8uq1ZAWiX3Ksm/gSmVCihKcCp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3c33800-f5d9-46ea-d188-08dcafa5e80e X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2024 08:10:28.0044 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: smgDBqTl5y9iiFK3/WdOjnmhdXnfLOJBtsL58nXqCmcagRZsFZVmS7NyqeBvZISS593pGd6sCfl6VFRClanCCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10302 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_011032_409945_9678E3FC X-CRM114-Status: GOOD ( 10.46 ) 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 The first port of USB with type-C connector, which has dual data role and dual power role. Signed-off-by: Xu Yang --- arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 93 ++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts index 7507548cdb16..008e8c37c76b 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts @@ -6,6 +6,7 @@ /dts-v1/; +#include #include "imx8mq.dtsi" / { @@ -27,6 +28,20 @@ pcie0_refclk: pcie0-refclk { clock-frequency = <100000000>; }; + ptn36043: typec-mux { + compatible = "nxp,ptn36043", "gpio-sbu-mux"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec_mux>; + select-gpios =<&gpio3 15 GPIO_ACTIVE_LOW>; + orientation-switch; + + port { + usb3_data_ss: endpoint { + remote-endpoint = <&typec_con_ss>; + }; + }; + }; + reg_pcie1: regulator-pcie { compatible = "regulator-fixed"; pinctrl-names = "default"; @@ -315,6 +330,50 @@ vgen6_reg: vgen6 { }; }; }; + + ptn5110: tcpc@50 { + compatible = "nxp,ptn5110", "tcpci"; + reg = <0x50>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec>; + interrupt-parent = <&gpio3>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; + + usb_con: 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; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + typec_dr_sw: endpoint { + remote-endpoint = <&usb3_drd_sw>; + }; + }; + + + port@1 { + reg = <1>; + + typec_con_ss: endpoint { + remote-endpoint = <&usb3_data_ss>; + }; + }; + }; + }; + }; }; &lcdif { @@ -445,6 +504,28 @@ &uart1 { status = "okay"; }; +&usb3_phy0 { + status = "okay"; +}; + +&usb_dwc3_0 { + dr_mode = "otg"; + hnp-disable; + srp-disable; + adp-disable; + usb-role-switch; + role-switch-default-mode = "none"; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; + status = "okay"; + + port { + usb3_drd_sw: endpoint { + remote-endpoint = <&typec_dr_sw>; + }; + }; +}; + &usb3_phy1 { status = "okay"; }; @@ -597,6 +678,18 @@ MX8MQ_IOMUXC_SPDIF_RX_SPDIF1_IN 0xd6 >; }; + pinctrl_typec: typecgrp { + fsl,pins = < + MX8MQ_IOMUXC_NAND_CE2_B_GPIO3_IO3 0x17059 + >; + }; + + pinctrl_typec_mux: typecmuxgrp { + fsl,pins = < + MX8MQ_IOMUXC_NAND_RE_B_GPIO3_IO15 0x16 + >; + }; + pinctrl_uart1: uart1grp { fsl,pins = < MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX 0x49