Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7176909rwl; Wed, 22 Mar 2023 23:55:07 -0700 (PDT) X-Google-Smtp-Source: AK7set96C1NMWdSH838efLY0Iy9NkFU4lscAchdCJyANLFwwS9INL9uYZPSRzYfvsQxl/WbLIopi X-Received: by 2002:a17:90b:4b10:b0:23a:177b:5bfa with SMTP id lx16-20020a17090b4b1000b0023a177b5bfamr6854795pjb.22.1679554506779; Wed, 22 Mar 2023 23:55:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679554506; cv=pass; d=google.com; s=arc-20160816; b=cDX48hrzP/PtyxOQ4gwMwe/6SU3DjLTxCo1j+sf6yJ4NFcPZC/aX8QCFUVtvT97epV tY0kWpSZ2hAvH5o58f3gtAE1GzZkJBzOn8PzurRFygNJWWS+LQmB8HLjqgPbTDzZlHWI dl7aYbJO3Cua2HZ8ErsTFYQmDOWQMJxqE6P61BijrHXUutPdq11x8sxTqX1DqRBQffbH JiifK47JfmbXIjxMN8aCAH8HRylj9K4ljqlTYY14yVRaGihtHIXkQ/La3B5kNbwh88DG ZEE78K2ynD2E8EujI8Ty5WGREoOa/jl6CByQfN3k2m7IgW2HxCOOIqWVB4S8p2o+n76N ntzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=lsy85gB/xyFNmV2gnMmtIlbpYFhB5b8PuV+NZ2RJKgM=; b=jTv92RNYeeKbjm4vBnJA487zLX77iOEWqxeJWliKBHYYLgRooElk/DVmbepy36IBkY 6bwPM0lWHqgSfosfB3b1C9hfRNKB87xRAPGi39LXNXDSS/7VEuW9GgVUpGUZYwT549MF 0W0TAucxFh9TVf3L3Cz1+ZEcEKaWczM85LvaGM5RaA4COZCP8SseeQrw8oWK2iyfqFIW e9JBfWSUfLXFqH9JhnHwCLFxMylqDRzDlCAg7SsS4yB5ey7q+w2Wi4N6Ldx3eH28aaVa 3052Ww97+8Z9ZUm5i3YopmTvUtjpBKdnC/yYHC473RdLSaPamiaYuQVRboEQQaw7Ceki I0Nw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=O+763+wt; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d16-20020a631d50000000b004e658a3b1b0si16485732pgm.183.2023.03.22.23.54.55; Wed, 22 Mar 2023 23:55:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=O+763+wt; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230052AbjCWGx2 (ORCPT + 99 others); Thu, 23 Mar 2023 02:53:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbjCWGxZ (ORCPT ); Thu, 23 Mar 2023 02:53:25 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2074.outbound.protection.outlook.com [40.107.22.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EF702D162; Wed, 22 Mar 2023 23:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IOxE+YMIWggYg85ZOof55vBVVynb26jY03/eQtgSFMatVpLG0fccYxdYN4jPPUpCNWiL0fTQUx5gUiXuekM1WBNZxCRzH5eU4JA92a6JpkujrtxcYK56OvoHzlTQ6gwGaW6or+GQPk2GNr8TtAl8XW2hTahvUrWdNwDdXNfW0jbNsAowVYHDrZUSMGEaAwGjtiET/PyMd2LAfPC9cVgTcSeY+xr7U3IvHOIgLPZ6PZe+U1teJZNumvQ+QDxpR91ugs1KER78cJNaGQii2xNVPfD/A4o3OdGcBLFbtTfPFJHYN1V2EX8f62pwmijNxX3ywhT42XJJh/azj/TKYzIhcg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lsy85gB/xyFNmV2gnMmtIlbpYFhB5b8PuV+NZ2RJKgM=; b=O0Z+IE3JYMdCIYQZ5Eu3QMJU/0vnxN9xX+ycW4END6wEn3QhZKAdFL0t8xXepZ2Lw2qZsbpYo7uub8HqOFQljtQeLGbat/Iy4vPBjw+2yuBN5AIjwFOKUxLSCsP8KWZfeCgcdzRzBhAAalV0zJxILK3tTKFsHzlTA9uYJbKnLAyqzybxJ2zn+CbUrvzVhvMcLm9/PDgVGl/M1JsFZFlNabnbWGNpWbniBc7CGxHDSMTPxpauQIYyxqwGz9HkI26NdbOU3zteCZfq4PxPTYxqZhkNPqNYp1YZMxj7trqrNqdiJ2Oqj4oPd/+XUbBMnYfWd3F+zAYC629OjJbNEftd9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lsy85gB/xyFNmV2gnMmtIlbpYFhB5b8PuV+NZ2RJKgM=; b=O+763+wtMJLPym9j7AVj8eWJcAxemv+BGnyNNfgR31FVs1SZZyz0lMEtaZ+6FZ9krI5Jahp1KP/GrDYlYL6zK461axdlz6hn2PvnHQimDl05pmqbbMPS4Hv3acq53M0hqBFxrXbSaKDOFjTkaES5tgzJe1buepwoBMn1fXvfE6c= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AS8PR04MB9094.eurprd04.prod.outlook.com (2603:10a6:20b:445::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 23 Mar 2023 06:53:19 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::f55a:cf12:da08:6d2a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::f55a:cf12:da08:6d2a%9]) with mapi id 15.20.6178.038; Thu, 23 Mar 2023 06:53:19 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, gregkh@linuxfoundation.org, jun.li@nxp.com Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Fan Subject: [PATCH] dt-bindings: usb: typec-tcpci: convert to DT schema format Date: Thu, 23 Mar 2023 14:58:24 +0800 Message-Id: <20230323065824.3857573-1-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0004.apcprd02.prod.outlook.com (2603:1096:3:17::16) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AS8PR04MB9094:EE_ X-MS-Office365-Filtering-Correlation-Id: 29204a4d-d41f-4e38-6d8e-08db2b6b494f X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MDORhCRaCubtQSEEvkKsOQbQWJ5OmfEVEvaPOSU6dtPvfQ0V/uGwHttvq7GwE8uQmDd+GNJErDPnlKOAzCq/trE1567fWTlVQ45bijwsoBz3YFU7rPAp2i7TkBKMmgFg+KeP9afRbsQvW+hKCzKW8hDs1Kau/PFFMJ1YVscCLgrU+townbUxGzuqpl+/+5RPWlYeAt+YBytM++QUXOBm8gFrGdkw3+xLfUSdG+xQnbfdeU+pvduKBqPqQill2IMX9H0muKIdpSQYn+0MCCCJEI1Yz5gi77sRovSwOQ6vJfAvEmxQbO06GCijUrKdkiuz9EzTs6eQX/QjFSPtdPvUcKHx/cpLxG9MMYrW98bRYXYR9UaoMgJwOH2MAN0Pz0eL2ycTeaHsvXddtdLOR7T2a1WBdDoa2aw2SNG2iYTLLxDa5NUysaA39uxmgRq+ZI7GSmoWsZ1nCL3vYe8Cibmyrx+iGXQANdHv+dmCqRrIdgpBtbNCft98aOVEIpIdNQJENKpu4voWYw4b/7ymxMpkY2J4JOGAbkuPB0B7+VyFyvnPYaHrk/BiJ6UOXwQvWBmKHtUxiVCpJxCBo32ETgHaqmyLi1WN9GVy+xUYKUs4BafQdzkfwfJumKoszICyDc4EuGN/7RdwUxC3rbi9THafNBLBbJLn3T+12buuQZnzNWZGvdmBx7GGlt2Z+zf3R+WBmrjGktFGwJMKwmz3o2BuTFcdrujM0KzewnZ7QNc8VqQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(136003)(39860400002)(346002)(396003)(376002)(366004)(451199018)(316002)(83380400001)(38350700002)(38100700002)(2906002)(26005)(1076003)(6506007)(6512007)(478600001)(6666004)(186003)(5660300002)(966005)(6486002)(52116002)(41300700001)(8936002)(86362001)(8676002)(2616005)(4326008)(66556008)(66946007)(66476007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?iUKUKhzYs+jogOt5QvQwj4jCOkGvOpU1dn0Wv379BbjmFy8mkwEMgZ/MerSa?= =?us-ascii?Q?qtuT/7mgEEsYQgnVHVWyc1CtVxUzOYdVWBeY7gG9v85MyYF0NJcsJ29ztJ69?= =?us-ascii?Q?sAYZ+8Cz/uykp3pLLhkTjYyrDWCBLGVQ4WOkVMPcbheJwTZT35dV0eJNeOGJ?= =?us-ascii?Q?tZGD6JC3e2yBZDBKoZAwQ0fShP8wpuqtRiLhML1Bc/5V1uv+jCsAPe9axacB?= =?us-ascii?Q?WMo4uCQ3pppOSNS62U/hdzcVA0TezDh/SXrVHOWTJTcptemLe9Wi17/LnFVK?= =?us-ascii?Q?8tYXoy+wOePjFDTjQbRnXRfO+uxXWWbQJNqSCrV6sLl9Ol+IQbYBZKLHY1hM?= =?us-ascii?Q?wui1t5AHbLS2xB7mcCqxlaY+O75T2P7Q97jyRx5y0/gFGei3m/PBldQnpMlG?= =?us-ascii?Q?ycQZqnD0qFqCWSTpCZZy8GJ4QpBa1zauSBH5LBzjuqzm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cwhVXSoOHj4RNqxHZIYf3Z+FhEV1uPboycGb+63f+lkVPJEEuy/?= =?us-ascii?Q?FGG3AH9lCVnJTvfwWB5PLTvbN9zxINC1BwYH7m2/8Kz+UP2+CCS7sKCwtf2d?= =?us-ascii?Q?5mDXOopFSkBBhnnDsqy7unLw0kcL7Th5dSXQWDVqkI+DEa4qIckZDdKr5X7D?= =?us-ascii?Q?VqrpGx6nes46m61c2vx/c5ejO5SMr7afQ7wyI4PNTc6tSgYCxztbrX1Bcwdj?= =?us-ascii?Q?0F9MjuG/vtBCaWDkFbFiylbyK1IWjiD2rx0luGzC?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29204a4d-d41f-4e38-6d8e-08db2b6b494f X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2023 06:53:19.7618 (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: /zrJWA04CIFIsxzRdQu4j0AKCvmp5moeZWWO7ppec+cQZniMxqdrSUYVtfnN/uyQRDRCTJH6ckrPJkQxMPhCQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9094 X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan Convert the binding to DT schema format. The default speed is HS, so add a dummy port@0 in the example. Signed-off-by: Peng Fan --- V1: The default speed is HS, so port@0 is not added for some device tree, however the usb-c-connector requires port@0. Not sure we should drop the required port@0 from usb-c-connector schema or add a dummy port@0 for tcpci as what this patch does. .../devicetree/bindings/usb/typec-tcpci.txt | 49 ------------ .../devicetree/bindings/usb/typec-tcpci.yaml | 80 +++++++++++++++++++ 2 files changed, 80 insertions(+), 49 deletions(-) delete mode 100644 Documentation/devicetree/bindings/usb/typec-tcpci.txt create mode 100644 Documentation/devicetree/bindings/usb/typec-tcpci.yaml diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt b/Documentation/devicetree/bindings/usb/typec-tcpci.txt deleted file mode 100644 index 2082522b1c32..000000000000 --- a/Documentation/devicetree/bindings/usb/typec-tcpci.txt +++ /dev/null @@ -1,49 +0,0 @@ -TCPCI(Typec port cotroller interface) binding ---------------------------------------------- - -Required properties: -- compatible: should be set one of following: - - "nxp,ptn5110" for NXP USB PD TCPC PHY IC ptn5110. - -- reg: the i2c slave address of typec port controller device. -- interrupt-parent: the phandle to the interrupt controller which provides - the interrupt. -- interrupts: interrupt specification for tcpci alert. - -Required sub-node: -- connector: The "usb-c-connector" attached to the tcpci chip, the bindings - of connector node are specified in - Documentation/devicetree/bindings/connector/usb-connector.yaml - -Example: - -ptn5110@50 { - compatible = "nxp,ptn5110"; - reg = <0x50>; - interrupt-parent = <&gpio3>; - interrupts = <3 IRQ_TYPE_LEVEL_LOW>; - - usb_con: connector { - compatible = "usb-c-connector"; - label = "USB-C"; - data-role = "dual"; - power-role = "dual"; - try-power-role = "sink"; - source-pdos = ; - sink-pdos = ; - op-sink-microwatt = <10000000>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@1 { - reg = <1>; - usb_con_ss: endpoint { - remote-endpoint = <&usb3_data_ss>; - }; - }; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.yaml b/Documentation/devicetree/bindings/usb/typec-tcpci.yaml new file mode 100644 index 000000000000..067d3b032e3d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/typec-tcpci.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/typec-tcpci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TCPCI(Typec port cotroller interface) + +maintainers: + - Li Jun + +properties: + compatible: + const: nxp,ptn5110 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + port: + description: This port is used for usb role switch. + $ref: /schemas/graph.yaml#/properties/port + + connector: + type: object + $ref: /schemas/connector/usb-connector.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + - connector + +additionalProperties: false + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + ptn5110@50 { + compatible = "nxp,ptn5110"; + reg = <0x50>; + interrupt-parent = <&gpio3>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; + + usb_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + power-role = "dual"; + try-power-role = "sink"; + source-pdos = ; + sink-pdos = ; + op-sink-microwatt = <10000000>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + }; + + port@1 { + reg = <1>; + usb_con_ss: endpoint { + remote-endpoint = <&usb3_data_ss>; + }; + }; + }; + }; + }; + }; -- 2.37.1