From patchwork Wed May 19 07:14:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 442713 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82362C43461 for ; Wed, 19 May 2021 07:32:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 649286108D for ; Wed, 19 May 2021 07:32:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240225AbhESHdS (ORCPT ); Wed, 19 May 2021 03:33:18 -0400 Received: from mail-eopbgr140081.outbound.protection.outlook.com ([40.107.14.81]:32741 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239548AbhESHdQ (ORCPT ); Wed, 19 May 2021 03:33:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jSmeyw27Uw2eQ8o+dTeJGWEwUcR0riKdCvm69Ui8Uqxd3Dhzy/1me1/QlMulriTZfpZOk08R1kBQpsQ3CZz6MqKVvjGyjN6IE2bTOJ3aHS9Ygo8YbbpvXMj9jrh3OQquSbrqpVObndsZBXk2xWY5qdlOD6GmVxGTOx/TgK4UnyaSAVW+5i4ud7aVZACn5im3YCrvD46SRO9RC7V4pfMXeGBoBH3hcdbxqVYpOLbLSj7ZkfdFKpRPiO0sOQYCf0gZ5tIm/Btlyy8/Dul/hgRtxcCjcEoZhKTBBNnfjtRE3kkisn53538Pfozgzmq2HpYdcNz2lMOdsQQ7/5SYDMNiRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zBxjHPcoTm9JKCP6/X3QEVKNd8/3+Qqr9Qbi/CtJuhM=; b=A9XRxbmRSelalSbsbRfQsIqWBut/JBSM8PlRpco4h7tEDdamtjDxbBd+UkgQNW/1HhMWFbGPGDvnKYCGwXYaFDDMETadsVJ9Fhsqf2G3w8wk/7+s+TU5AT866z628TEBbzu2Gs1VsKpFHYzKnr7kMMQv3kefGLzZnlGNNoq/DR/ZX081NR+9z6i6BqRxZC6qYiqIRlJYc1DcjQWa012SHYFLZzGNhhbHd78469kz6xg3Y53ZOHuOZsDfS17U523kbGijk5a8t4Tjzq6zk7vOhmaNtyfzUj1zNDPIPBwCo4J3OxDrzaVoJO0g3Iy20T4jS8SZ6ousT7pRryWJNBZURA== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zBxjHPcoTm9JKCP6/X3QEVKNd8/3+Qqr9Qbi/CtJuhM=; b=GzzQKW1mNV5PkMYlePKKSfRpzPv7Ay1i/bop9MyZvXIImH6MnAKL1q4MAWN5ZuHx8ObBTeRz7A2nfNYlYcKXZtCXXu/5P6g9YfRhOmQ/uvAY4BpUwO5dQYtE7ZN3rRA8dfVG3+irvtnDKVJL/zysMYoor52pdfhFBMaPkR7Q688= Authentication-Results: linux.intel.com; dkim=none (message not signed) header.d=none; linux.intel.com; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5935.eurprd04.prod.outlook.com (2603:10a6:803:e9::17) by VI1PR04MB6237.eurprd04.prod.outlook.com (2603:10a6:803:f1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.28; Wed, 19 May 2021 07:31:50 +0000 Received: from VI1PR04MB5935.eurprd04.prod.outlook.com ([fe80::ddf7:8cd0:3132:7dbe]) by VI1PR04MB5935.eurprd04.prod.outlook.com ([fe80::ddf7:8cd0:3132:7dbe%7]) with mapi id 15.20.4129.032; Wed, 19 May 2021 07:31:50 +0000 From: Li Jun To: heikki.krogerus@linux.intel.com, robh+dt@kernel.org, shawnguo@kernel.org Cc: gregkh@linuxfoundation.org, linux@roeck-us.net, linux-usb@vger.kernel.org, linux-imx@nxp.com, jun.li@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/4] usb: typec: use typec cap fwnode's of_node for typec port Date: Wed, 19 May 2021 15:14:48 +0800 Message-Id: <1621408490-23811-3-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1621408490-23811-1-git-send-email-jun.li@nxp.com> References: <1621408490-23811-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) To VI1PR04MB5935.eurprd04.prod.outlook.com (2603:10a6:803:e9::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4129.32 via Frontend Transport; Wed, 19 May 2021 07:31:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ccf085c-36bb-44c8-0780-08d91a982a3e X-MS-TrafficTypeDiagnostic: VI1PR04MB6237: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:350; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WgfFiCGm3EyAkVwyIX6tILXZwsmw0Slgp+bH5Qp32aacYFhHlIa7dSEhSwYFoyExTsgElM9J0ndIOF050ZIofmshclHRkMLxR/sW6prLh5mfdVZiDTyL/vkvlIoy6G+aOSb8tSqUZQ/ms3+scsdEQ7pFJC7Y4W7kCVpUG/Bm+IzAhXNrxs5NTWAngjMH4nsllJhjDhxs34PDbShDebyKPYMYEYTZuqemUgSfVTp0JeT4wLZikg/XVKWluC3NkuLmAkp5uoBkgRG/KAo8NA26BragcFYgUGBRwMK3L6Dfcmc/NrLeP5NMaifX81HHVIzoXJ0+PgX67eqPwrteRxijF47IXSjGKwcmKHSCSotMkwJ3pJT6VFiF0q041gQyov9I+UclIhc0UZNuR1mIw1CRUqtYKIYYFWQDDoSDzpSivSmvbOQthnlOWosSOt5Nu51iNOu+K6qp+VDbJzNvioS1mDVO2Ek5Ba0QOx1NmsKnuGNQNTPlg8l2vtC8XfJmcs0yPug52omGB1W08JxsTczGOME+VvrCfgpMdfnf5L1BZMb320rPNMnJGirLzQYJWVecdcENwaljUcnx4vzmyU0/6eQfxNUfPqamDaIAJVZ6Hn1iW7S4UMP66TGkdmeN9w1OZ+EAC11SPMtuSsTN7QPpWc+4wV5/cKhhzBqZQoPipi/R+CYFyb2qMpM8p8Rux26g X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5935.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(346002)(376002)(396003)(136003)(86362001)(478600001)(36756003)(4326008)(2906002)(52116002)(6486002)(26005)(38350700002)(6506007)(38100700002)(16526019)(186003)(4744005)(8936002)(316002)(66946007)(66476007)(5660300002)(66556008)(6512007)(2616005)(8676002)(956004)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: sPmgo/iySW4mlw9mYERpQVRfw1Q/zpDsBSmAp4z0+uc3GLzRa75utjuT7Csms1ZGQR4/iV5BGvB8wHD+pvv/ZlludTPcbULyArYMhw5bHItv1qqenrtPxucRVpwcouN15aT4BGcnrIu0YyUd5kW1uMPqpwrLkzH4qflKiGRXOI+kwII8oIFJUh9Vb9BnJ/9kE7IpI6OadB7I0LTKp9Qu+apIUtPAPWQwj9lH5eaV07hgItFZVnF37p4keHEi2cRMGlpZKFheEiykVgKpweb1A9GJQ6lAvLwcJ7rv0jgmzhfLZsYZuumpTuPQURQF80/3bMw5BqD6qyEp0GpQHxNPHX6d56t3FALOhe9RIqa5xl3R6CqVuGcSUukGPEN2GcqgSMKEgKcwy+dYmiagFtI9QRduHjfeDFZgY/aV2CfEcopyeHSZCClPpZ+ctiwUoGctZFdj33yGt39J3nd2M2aHTO/2+tgcihxDw/0QfTE5cyYWfjuUh+6h5+yGh2nwnplT1O1wTh9UY8/CDdB9mROegm8yYJBNXVqzXgYkYeGi4DNp2kp9TvEO/2FLCwWOx35UCWluy7PFdL02qPEW0GjE8q19Sn1eAITYRo24kRtyUdtbDaJoUK5Ezl3C+8kRykybmRKEL4dayX3zGb4dMx6Wz1ylMGc9/dBB4KPkzLvDnP5NwEHU5H48wHHVjL/oRnNdpk0W6xIRW/IP3hiCF/NjH2Bc+qUv4bWBCLgu+BFRDaHWeHiST5zLAwmK8vNz9NCrQrSwAdf+UYuerNd6ivoE1JJTKprxu5HsZi8+8boIiSsfvafr3fSKi4fO85hmkXr6KuDQKXNWSL/7s+5mOGY5LJoz6bl/T62BKpgEX5texrQtobXP9qxMY+QpSCiPl/urBdTUvToIweK2QiQ+E2Wbonv39KXLjdtObJmeQzrBJL1tbcN4jEaxtshrpZQfaJBAFJRgyCDor8UlXZAbumQWABKiGMx4IwDUouCWA4SyG47QmN5wio9bev0tW0wPnNXm75qSXqPccpaMeKcUENcGuA/dwMNt/BUubVja6XY0HX5mCY+9Ze3W+C4jicP287I7eE9vqw8kSAQ1lwzDIxD+IHs7lF29i1BlPbkY4J6NT35tX26Kn4UbNdILVuioPXFry8LspLUXA5KzxOVT5iEaUbllA1DBy09TPcL2yKgR5/ZvxEm9KK/7gzSUtizjhIxi1vCID8GbVJR7RJP/PsmJG4Xm2ArIWu5543lNJm1uCU0zvL7ZY07kX33YLzUhd+Kr9Jm7ajQgRw1C3dssAkVZlPU5JtgyuQ7DpXGI4eUhU3PsEY4Na2kPKVp9jTi0UF29 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ccf085c-36bb-44c8-0780-08d91a982a3e X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5935.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2021 07:31:49.9593 (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: 2g21yhlHPnd32+t5AJ3vFl0xSqftcT/TLJog/U7PlaM1fp2cydjqqgwKhwbY/yqb X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6237 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Asssign typec cap fwnode's of_node to typec port, then we can use typec port device to get properties from its OF. Signed-off-by: Li Jun --- drivers/usb/typec/class.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c index b9429c9f65f6..a29bf2c32233 100644 --- a/drivers/usb/typec/class.c +++ b/drivers/usb/typec/class.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -2049,6 +2050,7 @@ struct typec_port *typec_register_port(struct device *parent, port->dev.class = &typec_class; port->dev.parent = parent; port->dev.fwnode = cap->fwnode; + port->dev.of_node = to_of_node(cap->fwnode); port->dev.type = &typec_port_dev_type; dev_set_name(&port->dev, "port%d", id); dev_set_drvdata(&port->dev, cap->driver_data); From patchwork Wed May 19 07:14:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 442712 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48411C43460 for ; Wed, 19 May 2021 07:32:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 318C861353 for ; Wed, 19 May 2021 07:32:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240294AbhESHdV (ORCPT ); Wed, 19 May 2021 03:33:21 -0400 Received: from mail-db8eur05on2062.outbound.protection.outlook.com ([40.107.20.62]:44513 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240317AbhESHdU (ORCPT ); Wed, 19 May 2021 03:33:20 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ntZV8UWcHiJvzd3h21zezb3Eln1aDVcIrRtsV8T/eUNUBgRQDyI7NUJdszE5gKcKNTOls896yqzJp3MdJzZBFYdW/JARJ5YPvDWde+Y2N2XBHZwmcvnaSrUr9snwLgD5XYXdaYFOdztHigfRRQIu5rzcjYtiE+l7gZji2iQYu8OS5ZvPDMB1JSG1m5WKfDer50R4KBsGxL6GZVmTG99X+55FSU4axnzTjJJ59/Bt8YJfheOT/edewS4LfMQidJZ60Lit34qJn+kgcSgo6FXES0RSetdaXDQlAQ+JBTCWXLn0H1EkNbGx/12qlJSlFvmVrYjXvewQIX6zzWpMF32QlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZB5AYziqxXaSieD11d32gB6lRYt/RK4z/qTAjFdxHl4=; b=Vmlc1rb9rbCGOT5jsFSjqVoLCHIR3vYtq1/JA6sgKxIlGDgpDMsJ3RwBCWXDrB4atJgPDVEOnK/iDrgLpDhlanD097DnKyAMhzYKztD7VV50K8KroabS3M6vTTBdxQ2kf7Qq2BDr8jpJBxPgbOAMlzUA/jFGfO8a1l2fH9qxg/+SAMuy+q2u9Lyh6ZLMQj5jUWxZbjKpwKQ6L4pbgOl46PAtys2EkxGOkF907no8/VFVsAa3qvE6RLBKkKxninSwaJjGVEG9FkHEzASsWJD0uF3Md0XZ7GDRFFFIrPF2T03C0mnN0apEttAV7uBIiXjUz/fxzb1i1ouCl4x+pbDRIA== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZB5AYziqxXaSieD11d32gB6lRYt/RK4z/qTAjFdxHl4=; b=hiFYjSbW+KptSIGeOphvKB9Llix8dSb2pkLH5nTMr10HF9kJootpJ5r/4Ft4xnc9ZOrwOge8Ea6FVe1yAJ7Bwf896WeFXqCRaH0Aj72qyF5QyMLksP5fsWqfDF976MwXGIZr+BsOR/XBSnbq0yhDF7l1m7o7mJVWW1GcISRbY40= Authentication-Results: linux.intel.com; dkim=none (message not signed) header.d=none; linux.intel.com; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5935.eurprd04.prod.outlook.com (2603:10a6:803:e9::17) by VI1PR04MB4783.eurprd04.prod.outlook.com (2603:10a6:803:5e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Wed, 19 May 2021 07:31:57 +0000 Received: from VI1PR04MB5935.eurprd04.prod.outlook.com ([fe80::ddf7:8cd0:3132:7dbe]) by VI1PR04MB5935.eurprd04.prod.outlook.com ([fe80::ddf7:8cd0:3132:7dbe%7]) with mapi id 15.20.4129.032; Wed, 19 May 2021 07:31:57 +0000 From: Li Jun To: heikki.krogerus@linux.intel.com, robh+dt@kernel.org, shawnguo@kernel.org Cc: gregkh@linuxfoundation.org, linux@roeck-us.net, linux-usb@vger.kernel.org, linux-imx@nxp.com, jun.li@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/4] arm64: dts: imx8mp-evk: enable usb0 with typec connector Date: Wed, 19 May 2021 15:14:50 +0800 Message-Id: <1621408490-23811-5-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1621408490-23811-1-git-send-email-jun.li@nxp.com> References: <1621408490-23811-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) To VI1PR04MB5935.eurprd04.prod.outlook.com (2603:10a6:803:e9::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4129.32 via Frontend Transport; Wed, 19 May 2021 07:31:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98f4c95d-856a-4126-baed-08d91a982edf X-MS-TrafficTypeDiagnostic: VI1PR04MB4783: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:619; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /EZAYesQZ4kGz6cXJ7UaZPiLKnsp9JSihtze1pRX5T+/Dwy8+mAytdQNM5JxsiUTbRQk/uzXlaKnk4Ipresk14kMDq6IFf8ksUtfBqTy74zh9+b4zOwuSmg+ZM2BOd/SRHXTgpcIK+XdpodPSfjLZocTdRVyfM0uVXoaTaXXP4aFIGp43xJ/zoT6Gw+fsx8gEyC7Wpc9Ls+rs/+Z2lFTsWlodrdc8YPMJK+4LbcsO+H/lVNFMKXAdtwAKbD3tiyB+WKX0k3EqJTGhXD2Z5TQW+6/b/c+HatPsSFI2FgOHl8hYQG0g2sN66aEgcSVy1uxDAD0ZfDsYamQAL4EsjJpFTo+4HJxouyPhiKa+7jGg5Ac92oIFQG1eboLyU9X6y6fJjpk2WmIkMmm0pNvjVylnGwid178XwdJJ03Z41/yjS6BXyMpNlPgr1S0oCydZDslJcD242Ygk51VZEVHfLrOLNnW0kVTdy6u0CrPX4zClmE9MQWrk3iVf7qXkYAVQPwmjsyp0h4cpX+b0+o4bvyG9RCd2V+yAFGzobfCXXtON/vU750E8nyS8vwx/Jy13Q3/4THnZn295xOHk1w/kEbsAONqno/OMqsa70+nu5ps5vnvBqzYD/en0ZOkEBpJZiv9cxZFTM1UOoPrV3uDeZfY+usHmKpZ+XtsrEK0+iDSBU4WaHKYDeznjsMfZrsNVUqv3lM1imj81TSVqCC9uMlWKKZhHRhcbd6nkOkoF+cc/+NW6VjsMjkb1WDqkmDjon7W X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5935.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(376002)(39860400002)(396003)(346002)(6506007)(16526019)(38100700002)(66556008)(36756003)(66476007)(186003)(66946007)(38350700002)(26005)(478600001)(6486002)(6512007)(52116002)(956004)(86362001)(8676002)(316002)(2906002)(83380400001)(4326008)(8936002)(5660300002)(2616005)(69590400013)(32563001)(473944003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: QzkQwL61kHN7cO5XIJAI+moI46ndbbUymC3NT3eka3aTwpTM1LdwxmxS0oZSHmgyxEtd8JdupK4BFxUe3bxjgAZto4r37v3yF2G1Zd5/frGDDGAweFUU1eHBi+jSBhuuMniaopJ2FK+Q/Nw3TmYMAgyTEhGSwcRAUDHMMoth2CLl6H+6YF6kIYYapcdR3G1c0GLv/NDp3ZnVo4I9KKjqh9hwcGG+NDOlgUdJfS6o30Qf/bm96aBglu7UjeFxOle19jk5NTyX6xlrpTDhzBh2Ydf6ocxgzknvQWmyA08hJVC/QuIF/bL1eYdfxs00EEbUiuhb/gsicSWKtLzxGavTA1zYMQsn+qvdH362HAVkfwUYMykMQYX17GdzeWCDo/iySyzSHQfXkJqFAIwtx4UQqIzYYPXTM+D2TLKbA2R43qDgXcwUdm9xv2ow9HQVt5qqgMXcHuF34q/48tlrJbYA3gI21MZFa5mX7ZULMA/J4Uy4fZpIxCYppuCcesd4utRcAN+S9MNgwFkhHTy3UBxYkKUFDYek41YxrvtM0bWSzfntdoYs9AmfVMm0BOX4dkF4HV/GM07UoBKQeb0mQgez13Ol21sXmWZh466JDMJ6L35+n9Z4UEAWqpkd2L9bzK0cr/y/vm8j1nAc3wLKmLkwqnpiTjd65WkyUDaCmyIHPmU4pUEna7lgSFQL0fA40YBfrfvKzwNFETVuOt5Wn6eOnba0HQDvmTu9SJJB5+G1PpljqfDfmcZkE7SXvEQrozspb0mZPQc1jTe2vcMt7WFjgZfhnwZzYgIbSVxUsth/amx1UfonQOmNGmYV0SB4zQeCVhf8EA4QHEJFkabc/C3KPAE0UsXWuaWIxFQtV1NL/Ggl5Hk2EGuyylCYIL2JBtjLUU9WxqtzxImn2Hi5Wrknm3tL8R+tGD4GPEtJkwVmz2LumbkX5Rxs2mhIWDTjvBx1Mrz/kNP6WsM3Q3AKrQATxHbwwr+F5ni2WR9kvvSn3eFD8FEhz4GIBV4sene5Qav2jfxZahf00YEv6OuDuf9kM+wDrqrYNd4OVx4D2mZ/+0mMG3JV5DQ/58844VBlAksNWPzkvtg/LiTrHLegRCYWK8UqlC7JkenOMwfyKX00HHSRf64FxlVDJ71KDs8yMh4UcQj+Fo9JqFLDVGwcfwR5Hryx7Ma9P6JJxj/GiU5Uxenk2Tj+uVrR99yIEHndzz/R+T3tFBvwwGWqQBaSX1oKJ0NBvqRAmbySo68iA6Z1jMZQKiV4sNIG8vh2T0iCl/CwgTXudfyqh4vGnkeccGdg0Dx/ytmwvABMzVPNGMdLHSKGgwy1UxV7gTd6szb3LckV X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98f4c95d-856a-4126-baed-08d91a982edf X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5935.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2021 07:31:57.7379 (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: rrX8XEM6dVENfmYuEe7oaSPILm/k5j93FZE8ntafhA/cequxQv1yjwJGrNLSfFQL X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4783 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The first usb port on imx8mp evk board has typec connector, it has dual data role and dual power role with power delivery support. Signed-off-by: Li Jun --- arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 110 +++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index 2c28e589677e..c69514910eb9 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -5,6 +5,7 @@ /dts-v1/; +#include #include "imx8mp.dtsi" / { @@ -65,6 +66,22 @@ reg_usdhc2_vmmc: regulator-usdhc2 { gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>; enable-active-high; }; + + mux: mux-controller { + compatible = "gpio-mux"; + #mux-control-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec_mux>; + mux-gpios = <&gpio4 20 GPIO_ACTIVE_HIGH>, + <&gpio2 20 GPIO_ACTIVE_HIGH>; + idle-state = <2>; + + port { + usb3_data_ss: endpoint { + remote-endpoint = <&typec_con_ss>; + }; + }; + }; }; &flexcan1 { @@ -104,6 +121,56 @@ ethphy1: ethernet-phy@1 { }; }; +&i2c2 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; + status = "okay"; + + ptn5110: tcpc@50 { + compatible = "nxp,ptn5110"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec>; + reg = <0x50>; + interrupt-parent = <&gpio4>; + interrupts = <19 8>; + + port { + typec_dr_sw: endpoint { + remote-endpoint = <&usb3_drd_sw>; + }; + }; + + 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; + mux-controls = <&mux>; + mux-control-names = "typec-orientation-switch"; + mux-control-switch-states = <2>, <0>, <1>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + typec_con_ss: endpoint { + remote-endpoint = <&usb3_data_ss>; + }; + }; + }; + }; + }; +}; + &i2c3 { clock-frequency = <400000>; pinctrl-names = "default"; @@ -137,6 +204,29 @@ &usb3_1 { status = "okay"; }; +&usb3_phy0 { + status = "okay"; +}; + +&usb3_0 { + status = "okay"; +}; + +&usb_dwc3_0 { + dr_mode = "otg"; + hnp-disable; + srp-disable; + adp-disable; + usb-role-switch; + status = "okay"; + + port { + usb3_drd_sw: endpoint { + remote-endpoint = <&typec_dr_sw>; + }; + }; +}; + &usb_dwc3_1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1_vbus>; @@ -229,6 +319,13 @@ MX8MP_IOMUXC_NAND_READY_B__GPIO3_IO16 0x19 >; }; + pinctrl_i2c2: i2c2grp { + fsl,pins = < + MX8MP_IOMUXC_I2C2_SCL__I2C2_SCL 0x400001c3 + MX8MP_IOMUXC_I2C2_SDA__I2C2_SDA 0x400001c3 + >; + }; + pinctrl_i2c3: i2c3grp { fsl,pins = < MX8MP_IOMUXC_I2C3_SCL__I2C3_SCL 0x400001c3 @@ -242,6 +339,19 @@ MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x41 >; }; + pinctrl_typec: typec1grp { + fsl,pins = < + MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x1c4 + >; + }; + + pinctrl_typec_mux: typec1muxgrp { + fsl,pins = < + MX8MP_IOMUXC_SAI1_MCLK__GPIO4_IO20 0x16 + MX8MP_IOMUXC_SD2_WP__GPIO2_IO20 0x16 + >; + }; + pinctrl_uart2: uart2grp { fsl,pins = < MX8MP_IOMUXC_UART2_RXD__UART2_DCE_RX 0x49