From patchwork Mon Jul 29 08:10:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 815239 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012041.outbound.protection.outlook.com [52.101.66.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48F5C1384B9; Mon, 29 Jul 2024 08:10:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240629; cv=fail; b=tk/TttEGlCJ1/QifpKK2hnYQn06uVodnXXomXduPUaa43jIIPJrStWQ0xxLgevoSSxW3fYC89Kh/6DzokJNKTfbmG5QKb4/K3wExVlUwDCS8IV7KsC6oOP4ojrdSLX0U0bHfSD8qDsKHcL55ogqUbZIILWO4cDKP+kmvOct5smI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240629; c=relaxed/simple; bh=eITdotS8t5C3ZSv4KVIogf36r2ws5yEYoH/qGFpGGRE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=U5ROB5RFuL7lSDNummoYsTQ0Oz6881C9dFHnOdZmnGTQfQG4UkN9jWCwK5mUAMk21hQ9JNHNnvt06iv99MvKiVwkbyPMb4KkNmYuqjw9wnYxDmNlGp1WWzSB2pXwDBWvm+apHbqDXAE1uoao0PADaqU2YhwH28rEmq73P0aT2bE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=agsDQB1B; arc=fail smtp.client-ip=52.101.66.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="agsDQB1B" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vabHbbOtwxPB33483jPNt3uSYJDLu1haKZMeqASYu5zgcovjHU3dr93C/3ZAmaY1L54iuKR3QMy6Llr0R0KEHLtkHC//LqisnYbuIYpbGc/6n0EyQ9RVDTru10YAmJBdrpOpBVviJd2wH9N1tJAaCzBWi3LXq/w+fPJIW4V197QgF1iYbgsIpZdqgS+CkjrqqzjQyOM4qVeQyKLLlKPzBQ78L9nqNGAMcyU0xtmx1VxYpsk5A64ZAeg6dcOrI3KRs9v+T2LgLmVI7rLMo5KzJEd8hLEYzTY/oDInPAsSowFk6+Hu1pw0H0BIl7P64o3QxwSXUwR0fuRN2x476Cu+yw== 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=aICEZUcPThMvO8M4yZM6VgNq278FBQYvhHtIlnwwsHI=; b=rAvawPg3SOfXbrzR0tgOlhSSttGXhjv0AJS9wKt4W8Wt/o6EEY69yRuDlJX8g3hI0mLrCwMU4YugXytQocCyFkLFAFvDuXZGGcGuSuCHAR/H15ZLGHElsP/rNRUjO8ibStdv8Us4Zq3D0aBHg0kUTcwAsr6hb1wkCRnQp5N19dyMIxL18RWxag+H3nNUeSvmT7YZQzrYYvzePqlUl8/ae1eh+gn/gQ3ee+lrFAJInxnGPbw8Z9GCdSa3zXBCpxbFnbXcWMiYrIjb2aqUovxVIUscMko5Xh3P8aTVVSn5BAesOwEE/ZYUv+V7+d4UvBdC1QBa/qRh33e6W8yBFcU38A== 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=aICEZUcPThMvO8M4yZM6VgNq278FBQYvhHtIlnwwsHI=; b=agsDQB1B1l79OV+RyIhE3jWqfmoFw2qyJF//2kbMyMwbAsBX2cLC0BP2WXmEdvgDOl2jY2wRoR02SZD+I/6FoqXNjmjy3tdX/oWpCkTMCGzvqOjdQfdAhGNFFruLnPItlBvL/OvtKgWrQsXBO7bns4v1eS6oUghgvvvRyF4OUe4n2w5FMx1OGBxczKLhZO+GFSrCLmWPrVaZTmzbCFz021k7fwri42q8mugZYVu2Ku6/ZJuMJKXxVSUUM2XUXJwtuehVc9pEojogvCeDB/oSdkQW5PLM1mi57JPmByBdbmqPRRztBasuAD7RMWhzK8628OHc9IRWfqeheY7oTGMI2g== 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:23 +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:23 +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 2/3] arm64: dts: imx8mp-evk: add typec node Date: Mon, 29 Jul 2024 16:10:38 +0800 Message-Id: <20240729081039.3904797-2-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) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|GVXPR04MB10302:EE_ X-MS-Office365-Filtering-Correlation-Id: 40ac5fef-2d87-4ed0-ceda-08dcafa5e560 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: JHuKyYs+dHGJ/wp8F+N4iauBSPGRlQ6EN/cVvG6FlKmP2fwfWbZFPJYO8dr1nwtudUl8r9CZ/fSMzkIwPh5CdQWYZ69bKyYA293u7iBG9RJLBdadoUElZucFfWqpLofwlWAQoDhMAd7bl6KshM8+YxzwnJjMgYZr4AhjTBUgjkyqmdq/R64V2M6oPcyPd+3H5cLIOIVa3lX4yWtREcKK4HaTgEXySrlkqPVUbsf63i5/QziQX0gu9KGbjX9f2kXVXHQ6l3Ey7vXMn1UY8h3Rh5mUDGgYSP3SXpRS7KfoAm7r3l6ziWjXxvR1Mm23Qd99MUzLup4lcoqo1A00S+hN2/UR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VTfZEu/p9+Pg== 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: ZJN6ENe0xS3Mt2FQXIefQLeOQs13x0WPLVyK6cmEp2/Ev+Y1ap3p5jrdHvQ/hMjyHTKdPl39aWnH8NhEX9Jl9SCrc0NNsLR5vsEFICnHfB0A2pjTTjUTKvY7HkH3MvRRXS48NUplfpTviQJ88oa5gtnERqGJyXbCzAgtMVGXA2Mik/UEztRmw23FBAnpLk9VwD+EEm8LZrZgOcc+0OallAs/vxiakrV/1Rucari6CzrqSUhERzx0CCn5itLdSwd7TyNL+j8FY5la/oubhlvxWD3HmnWhgQ8ZoUJOemOR64ixxELoQWW5DfYkNT+3LINflLqqFMH55GRd0w4/n3aPtmZiz9R/RZdI5MP4aOiTMxwvGC1uIUUdCPSXjSSXgpjGc+L7TMGeVeuaQPJ99CrFLPGUf+nbxpoz/K75siN/XUB/T45VTJxdCz+hCAReccCydLW5H0ayEknJrYNoNZMKBagB7Is5QX9qWLhlzZdh3DydPEHdvqz35DrAPYdspiCC/dk4KgPl8WG6KlneYbSgWADJ0nr22PRDok9Wd7/EXLKc/3wU38xt0EwvHUG/ttr3QKzHH/AQ0CKp3SEl7o93AGJ8IAtA8NIKhWfd2L0oCEtZuRq2Z3YB1YGEV42YgMsI2pOJoC24N9icNqcS3lp2OpsaAQhRn/4Roiw94atOQO9fSJpsqhcr3OfIHvSz+F9p7r64VXqH7Iy7nl0X3hCnfbMLqErreGasORTLMzJFT51tlJG9T3d3H9GjBhpVZRpDepig9pvsvUx3niH56dZlFSdsGgAyRpOHCoUwF2iudYSNE+Lxq4xYF6AL43ndAZbJLlITgU6NBr91zduh3dQVFX0VXnLqMcYYgEZnFrwEwGGFhXKe4sQ4GQd7ozDZvVzuhwmgvercu0Y3VkdAoozss2W3UB/JpGYbXUT7KB4nphTav1jkoxMyIcvcSN46EEwLuRtqbhr4QehGmZU0T+4ZcC2MEKDGTEE3l3don6xxt4NhVVEHjcSl4k+CgH+ZwrHKJVlclJPPKRGQjcI5fxAI+2IvqF8gGQ8t4TqDybbDeYLFyG6vmMdkvxOa1AmnKO4xPh/QxAuQ5i3NXi3x9IARP1bZS7RETYlb8p9PY21AyPoHGa5PBCYlg1fuMasOI/FhZyzmgRFcknVdjPwoAvxYGYtaN+W4K0Op1cS4vR4homxk6ygaNhQ4zUZTdtUs8G1mTm3ws47p6HcKIGcCrodzFBK5cJ27mSuzpJIK+B6FWtrPErPypWjlL0reFlgDBtz8/uFqWviXIY/GUV1fRGIfsrA5YD2ObrgvM2F+RhGwtrGX+OZTUM5r2OXJT3Y1Jhy1R1sRCiUosfbNo9hW2vTxjK2mMVXbf1YWnyGUScZLcQhKF4WpgaN5YbcDdsERRS9ya30yZn4tCpRVQWZVnZRrQfAmM0rm6dgyg9vKbv9V7lsYDfcBwOLY35U3H2gl3wuP8e6YItie3Hr0KR3H6zq4gV/FouFEn2gIlTVketO6nm/q70je7OuW6thBdq3iXENu+ZY1Po42S0YNm87nisxBjryXYD8lwTAyHQe8i/Cwea9e8DHr0quzHqL+ufdOcZZh X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40ac5fef-2d87-4ed0-ceda-08dcafa5e560 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:23.5525 (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: GkAW1Ff4fuii7R9PFiflKaN6X8uaTR3hssmj9McE53jcVQprSMmjXrgFGWwwuuwy92TdyveWBe8MgofGeoS9NQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10302 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/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..e38b59af5f33 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_dr_sw: endpoint { + remote-endpoint = <&usb3_drd_sw>; + }; + }; + + 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 = <0xe>; + fsl,phy-tx-preemp-amp-tune = <3>; + fsl,phy-tx-vboost-level = <5>; + fsl,phy-comp-dis-tune = <7>; + fsl,pcs-tx-deemph-3p5db = <0x21>; + fsl,phy-pcs-tx-swing-full = <0x7f>; + 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 = "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 { + fsl,phy-tx-preemp-amp-tune = <3>; + fsl,phy-tx-vref-tune = <0xb>; 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