From patchwork Thu Aug 1 06:49:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13749881 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 A6897C3DA64 for ; Thu, 1 Aug 2024 06:50:10 +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=85WtmWXygpY1Ih2kxJ+mMaFCcimv54LMoRZLqTQvFmE=; b=CuvemwrzeDH/YHzY7c9nWOFX1D 9OsbEhtNKhETUu8VBPiJQ7yxrYX3toITEOeFHLzyAEe0RExhSUmYT6cw2cu9pZpDKnmtmXhABWoYE 2N5ugte1bgUpAqXDjcOfsGEZyTYl6nJzcJjCoWM/iLzBHqxLhdBII99PzpTV92hqKjfY3KxiGyzbw wWoRk1keg6GHcJMuIqkbT/a1MIP0FwMzYQbYT0x4LGNql+RGPIcyxx5fTN5IGMxfBhEKMYLbdbcPY g43NwsVt/bOuF89sHT1ZEAcRSMPz+Sm5l7UOd3EY3P6+MwmEL9E89YysVfEAQsi+d96Bn0MvRKvqW T2Mq7ObA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZPdL-000000043q2-0KBn; Thu, 01 Aug 2024 06:49:55 +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 1sZPcS-000000043c4-1GlL for linux-arm-kernel@lists.infradead.org; Thu, 01 Aug 2024 06:49:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=O/6hiisXLGGPnOp5TbqSKCO5FWOXX1bKrMxIVbih3BSv0ez3plIxzVkJibOTAy7KIaoqfBKBre7lkoU+rTVF0sBizrScVVfl2tQ2JowbHXeeghSwn59xPIuAbbS4mRI7Vj4rlOvgmgsMY+Re4z+Zfs4HyhdWFiprZhTIAR3KzjcmZLsfgFT7KPqWe1pJQ7fOyV5ZGZh33QBth8qmIuXCDlsady2gBa7HxwHUllRGw+no8SLmBXw6udFiNeq2Q08o2Lm6xVG75XCzDSk5A+x1If/x2oEMZBNMOKOpMlrmiXp3uBKRl6p3/dNfVMjogGYTk01Ai+dZ3m+7OwiP6as13A== 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=85WtmWXygpY1Ih2kxJ+mMaFCcimv54LMoRZLqTQvFmE=; b=uvp7zKC90IQePeM39PuP6v8IMdUlmXwa+GLn7wcbjgzhFWVYTklFS0Qoaf47lGw2Zedx4iY7YaHNliCoIjeU/+OuHZEYHW9/rt8dl32oQ1rL7Tsaj0y7aEU1qidXIQ34XO8mtL0ZwpaI5wLSrQXgk1BZl+OF8Oswrk7TMU3QNfwmxuTgd1e+vBtAwyfkCXhAZ9TtCNWplHQw/1xS6xPb3e/zfm5hw3KmNO5vO005ZW2AHibhvfRjAEEpNVj4KmdtVo4twxjMbvljg0QU+U9NMIH0YOa7A0X1zs6jiHTYrsKMprWRrGJTt27Bt+wj0TU0GXCcG168inIdhSdL/IZ5jQ== 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=85WtmWXygpY1Ih2kxJ+mMaFCcimv54LMoRZLqTQvFmE=; b=D+sUSVmmBPcw/XifFL9kvKQDUfRdvVU3a2isC3Bm1OuHfJ4wJ6omIr5elfKJH1mz9WlnoUqy2V24UBUY1txjBYve5U3Tb6NyaY/9EPV/lwa7I5RC8W1c+XUeVBGKVEL1LT+k/sIYQKZ6O8U8DdFR82ZtSGW+g05z/xSQHCuITZ5jnToa+/PvmabUefaUwjHEZ2bj3jSS3XYPe2Rf0C3uLMlmysjj75t+SS5X0iCWY7UnVzE3yU9phDV9CchSDu1TgvFUKuYvpGZqjoa9V83wedBVLugQmrELiK0IVNLMAjzYF2i+FxApl3dTHZgQ9dueMoF/zZwHHVgQmk8kIkfpuQ== 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 AM9PR04MB8732.eurprd04.prod.outlook.com (2603:10a6:20b:43f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.28; Thu, 1 Aug 2024 06:48:51 +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; Thu, 1 Aug 2024 06:48:51 +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 v2 2/3] arm64: dts: imx8mp-evk: add typec node Date: Thu, 1 Aug 2024 14:49:06 +0800 Message-Id: <20240801064907.3818939-2-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801064907.3818939-1-xu.yang_2@nxp.com> References: <20240801064907.3818939-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2P153CA0011.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::14) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM9PR04MB8732:EE_ X-MS-Office365-Filtering-Correlation-Id: 82c5b271-6678-4edc-cb27-08dcb1f600b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|7416014|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: jbP7CzR0y7PybpOEc6d1dgr327qHclCMEM6tiB0YEtOqnKOi0b/qG1cgXedJ8Qp3gMVmMFu2eTVXDoowM/IRBOchtHFAARNGTFsiz3YcQ+Dpai6o7fusKuGKEsQ1dKCAq8INw6ZvPD9GPO6IFzbs72PXKyk/ZVbMNO5OUjQb9sthLPRCckP7jz69ANb2b/D9dztfCeOqXoHlfRr3QM57ibp7clu6fYpgg6tyVLlZeR57d+VCc2dbuXf7mZdYh/NoaecjHoPHnkS7Ol8b71fcVw4Z1FhIc75a4QzsCCs35cgSd9+gURBh/7fGTZ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hPg8/d5GJwYclNZCEVP0pTor8w8Gd0qjGDPhEAE45U8LTY96EA== 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)(376014)(366016)(7416014)(1800799024)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kIWJSqjalVio++m/O94osq3Waj6GSOPYj/1/MAfbi3XX+Mn1mc8YMZ4TRsw3f2/S1l2qlMPsc+RtTDOMPxmw0luzFJ4ctFHTzOBpbIJsY4+76WsVQuEBUzcuFr4dOV/SukDGA+JNTLEB81/djLLL3iq7FcwSS7r7fa2+IMjOz/viSic7zlSsIfvxSkEbSAuq5/CU/aWiJT8EOnlGYPTW7ZsxuIOKt3v207GKjU7O9XQ4rvUxnFD6lSoMoPn+4SpZYZ+31DGFflWtgZbzTJReevqTCwcSPvIAhfb0tvBJZ02q5+K5WWWgYNwyHWj/NNewnc1SX5bKojBK+5Wz/6YLMkzuiPF7VWCwn+HjKPY4jFwjCPiFrkSStSCVbkTENZxnAaKRmF9yG3X4wrwo9NK1JV5S8rb32a3Kt39mkeo5CvFlyNtFNLFmcj+u+kygX5yhES5wEqHYeUoeHh31QQG24x2WQvHO6W6C5RZY9AcZIxQ6/oXZHl/zdbJcGoRx/dXtvq2UdpWouW0XLsgDmlxwjUTMhFyFIovqUb3+63rDmkakyezzWMnJZkdqWfuJpDGxKacMHecxM6+fgrmikAJLnE/IN+BuSu6KfOEfHsLipornbh56clSpVPTfuzZUSKPLeNt2wjh7gq2hUMwE1Y0CTKV0OH/Ew1tDGg/0YDzZp6jBMDx5ulbAnt0ryE4VvAJbpOIF7yxA/cibg9B7nPwCKJLY2sScjg7x55jNSLLfjej73+1qLEKzNIasRh/cyayorwSuJ8QsskailAgMJrPAC/fgMwubbsII+6aHXJoldSricHxTQVkMuwmOVHVEFalP/u02Wr+or2EOO7dBooVFVmrj7//iZGwatI3AQY81qgLGhX18EEeKVn7z59Z+mSbYf5o3YgkxY4Rtq9L3ZbNSbBzb3slxdTei+DmThjm31pX7pLO6IT7D3UFLdThcrroUoD4kbTtb99Fy1vREsoohAXUUnOUm5bH6HQs3v3Z2uPWo3xhSTBRYWAXw4sWHiD/kaLXNl+uDdXVCmr3TNq3dihxiocNis+oPs0i0cTOshCi4TahMobpE+Cn9I4dYyRbC4x1vVwniK84kgQVzS2gL6kloEqnPddjK7lkppIsPfAa7iw0zQIuVsLVETqHOSuv/eTx73/JaLfR1EeNM92GHc8WJC5P4Q0p2p1zyU6JySrvRisExXwUROS5VYXutBqWyJrG6DWmNt/E5ElHGyKnBcJ5uNel4ZF4OVtNDGAD2YVetyrVoKBVEFAgLiUH73cFcMVXZ8opd/WeHFqz0u4YoD4hzOYaSfFumDLlToHzAs5LQZN1i3n22uQbhHQ19GmlLzIfToFWjkindQO+b5XvoH3yc/mrWSee2K/SYH539k9po94t4Mp/EDywY5Bfo2k6C5WC2q4y3qcU1Er+X8vzy6mfVC/bic/48f6YtO9OJ3672eEIPyEVDc7xwtxVqeav7x7IMdhxnZIxia0g0v/mkstoyEqbvRSyosgs1kvM/zuGhR3yEHz0Em0Cu9PIi5uqHFxyZSQShaY0Mo3UHEBB7/oFCVDceD6juRUAsi7v7j+/nY4RXl5sd8F5OvmvakTNF X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82c5b271-6678-4edc-cb27-08dcb1f600b7 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:48:51.4597 (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: 8bBJmSR+y8wOaDbBlGtbv0LHSFRYRNngVVzDqXbG1LGIZR7dP+ZKNHrhJbXygdcnLjBRC4UEiWj3FsCj8j2DiQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8732 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240731_234900_368785_64319D8C X-CRM114-Status: GOOD ( 11.50 ) 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 --- Changes in v2: - modify endpoint label - fix usb phy tunning property dtbinding warning --- arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 104 +++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index 938347704136..ef9b821a0ae2 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -6,6 +6,7 @@ /dts-v1/; #include +#include #include "imx8mp.dtsi" / { @@ -26,6 +27,20 @@ backlight_lvds: backlight-lvds { status = "disabled"; }; + cbdtu02043: typec-mux { + compatible = "nxp,cbdtu02043", "gpio-sbu-mux"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec_mux>; + select-gpios =<&gpio4 20 GPIO_ACTIVE_HIGH>; + orientation-switch; + + port { + usb3_data_ss: endpoint { + remote-endpoint = <&typec_con_ss>; + }; + }; + }; + hdmi-connector { compatible = "hdmi-connector"; label = "hdmi"; @@ -535,6 +550,49 @@ adv7535_out: endpoint { }; }; + + ptn5110: tcpc@50 { + compatible = "nxp,ptn5110", "tcpci"; + reg = <0x50>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec>; + interrupt-parent = <&gpio4>; + interrupts = <19 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_con_hs: endpoint { + remote-endpoint = <&usb3_data_hs>; + }; + }; + + port@1 { + reg = <1>; + + typec_con_ss: endpoint { + remote-endpoint = <&usb3_data_ss>; + }; + }; + }; + }; + }; }; &i2c3 { @@ -704,7 +762,41 @@ &uart2 { status = "okay"; }; +&usb3_phy0 { + fsl,phy-tx-vref-tune-percent = <122>; + fsl,phy-tx-preemp-amp-tune-microamp = <1800>; + fsl,phy-tx-vboost-level-microvolt = <1120>; + fsl,phy-comp-dis-tune-percent = <115>; + fsl,phy-pcs-tx-deemph-3p5db-attenuation-db = <33>; + fsl,phy-pcs-tx-swing-full-percent = <100>; + status = "okay"; +}; + +&usb3_0 { + status = "okay"; +}; + +&usb_dwc3_0 { + dr_mode = "otg"; + hnp-disable; + srp-disable; + adp-disable; + usb-role-switch; + role-switch-default-mode = "peripheral"; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; + status = "okay"; + + port { + usb3_data_hs: endpoint { + remote-endpoint = <&typec_con_hs>; + }; + }; +}; + &usb3_phy1 { + fsl,phy-tx-preemp-amp-tune-microamp = <1800>; + fsl,phy-tx-vref-tune-percent = <116>; status = "okay"; }; @@ -986,6 +1078,18 @@ MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX 0x140 >; }; + pinctrl_typec: typecgrp { + fsl,pins = < + MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x1c4 + >; + }; + + pinctrl_typec_mux: typecmuxgrp { + fsl,pins = < + MX8MP_IOMUXC_SAI1_MCLK__GPIO4_IO20 0x16 + >; + }; + pinctrl_usb1_vbus: usb1grp { fsl,pins = < MX8MP_IOMUXC_GPIO1_IO14__USB2_OTG_PWR 0x10