From patchwork Wed Jul 13 07:29:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Ji X-Patchwork-Id: 591335 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39E67C433EF for ; Wed, 13 Jul 2022 07:30:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234495AbiGMHaM (ORCPT ); Wed, 13 Jul 2022 03:30:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbiGMHaL (ORCPT ); Wed, 13 Jul 2022 03:30:11 -0400 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2111.outbound.protection.outlook.com [40.107.101.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8D58638E; Wed, 13 Jul 2022 00:30:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nESftbGQoT/cOsPM1xiJ2gMZzKOqtROPCjV4Arh1eeMsluRCE2Pu7hKAiGndMfgqzaylaPZ+3+jZRK6BQwBSe64Jsu9JBrCoP+4w/8AFm0blIIBAk5uZVaM1FnKx6wqoLFuUaDIllepLH/6b0d5NPMGEl9A5MSjY1dSzeIaHEhT3M5XOWqwZ1553v7TKCNC2VlgFteMh+xku4TlXU8NVq1bbrfh+uKjRnWO78g5j2N3WInUkzH+OtFyGXK4I/lprlwWSYfmSpSm5tvHnLrwgQEp7sJ8A5sf08ZBrRnM0ro6PJVftQ/xuFpy7EeLf5G6KgtOKEcJ26jsN3pkhv4g7tQ== 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=DEDY6psZMLhoFuOdfH0DFNckQDVRkGbWV2OwssAvXQ8=; b=mnN0DFhq2BZI2AeXlEESsj9GcklDaN25BLsQeyU5NFexu1zS4fX2gKLJi59jrB1yGn/7zYqxHjPpSPFLF+s7WTYX4Fxd8A0Jv3wqc6zP2MrNQxB2irkXnGsReeDiKG48DEkuoRTw0m1fhYMZWzmtW5QeKtfKkCjZCbVoLVZhx9bOfjvH5SV9tZJoXFWwhQCZ6JJ7WRaNByXErxJwLmGYmEFNWcJX12jz+rqd4OxBDShw88VDxq9HfjxMnyB8erXobYrchd2+WD7x6zRx7RHiKcVtPXgItOh5jRDdvRqmV9++diyy9JEG7csSbgQumu9HCZI/rcuBdhDkeBjWdEvpyw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=analogixsemi.com; dmarc=pass action=none header.from=analogixsemi.com; dkim=pass header.d=analogixsemi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Analogixsemi.onmicrosoft.com; s=selector2-Analogixsemi-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DEDY6psZMLhoFuOdfH0DFNckQDVRkGbWV2OwssAvXQ8=; b=YAg/OVmjkVdyvRRrHHjpLjFchRAMS0MN3isH+CjTQHU6ljioEa9Ps2oriee36ibWBm5Ch+N5alYifCCve5IJpcXDVCoBOxHqsHZQSqUXw3mCj4Yy7s9jfgbpdqPKV/gV228/7EO8tTtX+6BLJ17QvuVVsBjlX4JLTQGOJdkIkTE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=analogixsemi.com; Received: from CH2PR04MB6741.namprd04.prod.outlook.com (2603:10b6:610:96::19) by PH0PR04MB7445.namprd04.prod.outlook.com (2603:10b6:510:1b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.20; Wed, 13 Jul 2022 07:30:07 +0000 Received: from CH2PR04MB6741.namprd04.prod.outlook.com ([fe80::5400:a1a0:be8f:34bc]) by CH2PR04MB6741.namprd04.prod.outlook.com ([fe80::5400:a1a0:be8f:34bc%7]) with mapi id 15.20.5417.026; Wed, 13 Jul 2022 07:30:07 +0000 From: Xin Ji To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Xin Ji Cc: bliang@analogixsemi.com, qwen@analogixsemi.com, jli@analogixsemi.com, Rob Herring , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v17 1/2] dt-bindings: usb: Add analogix anx7411 PD binding Date: Wed, 13 Jul 2022 15:29:42 +0800 Message-Id: <20220713072943.2789612-1-xji@analogixsemi.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: TYAPR01CA0133.jpnprd01.prod.outlook.com (2603:1096:404:2d::25) To CH2PR04MB6741.namprd04.prod.outlook.com (2603:10b6:610:96::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 00e70acc-d732-437c-a564-08da64a18274 X-MS-TrafficTypeDiagnostic: PH0PR04MB7445:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hZnqIhO7yGJd2OLlAjk/+yKQS5EF76spC4kR+kMDYSKaVQBlAvupyVfnhsGSPvjpIx1+V1QPceD6LFiWBg6c65OxXP8YjAe0N5liJb61bpodzA4JqzslDcKSf0KJK83oWbkgMSLRr1STt+7g9Zez/gDcbr+A0+R/91XoiqMmiio1OTJlLysTaAd3dqHcCcGld7sZCdNs2Fnk/7XETLHiNZQJFFBJb5vONk2i8mhXBVb6fumF7RGvYi9VHbbjeR9mS881hXOl6MK11DteUWCTbANDWTmn98i3bMEa7RXO2/VxmqIvAsZa7U+tJATZCECnM7l2hci7cduG0kGZ3xT/8h6oyLJA05z8rbDYuJKra+Kfgafi5O/ylYL4vcpABoUU51VYirVtS5dzvghcfiQ/s8b4h6N52Dog35IljghRahp3UVEOOMW38B95M4xQFDZqpKU7lQJUlpvGGEIbZJdR76TyN8brACfzssprDGH2468uMZ5oJGND0c590IA0WM4p10S4vxlmBYtTbdCjC5ieFVHcH5Y08efcwqQ4n/c3kGMhIwJ+f3d9lQrcqpex0ILEkvMfwdeVrnYu442YqwGV4xNSUadKovY6h0q2N4gHX8+lKe+0dIyBPWdn7+QmhPGFLms2T5mlxf3HFeSJJ3llX9r6ZOseUsqUacwBC9Vouy7r/8dDxKbEyow67yqSvCaAM6a+aLM4W6eQ8Lfe1gnzCOKhZ/VkgwTkgD64YHpnGk7baLavEOLhyB6j3RJDa8nQO5gfDoXWTnOw3K0orOYfvtBDWHXvU1aYImx9277I/XOIg0Nv1yI66vHLBTJmYRXUFmtC0QWnd9ZZ00+RGg0QnfZ0LsickGJbdraYEKHHVcU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR04MB6741.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(346002)(376002)(136003)(396003)(39840400004)(36756003)(186003)(26005)(41300700001)(55236004)(2616005)(6486002)(2906002)(6666004)(6512007)(966005)(478600001)(1076003)(52116002)(8936002)(6506007)(86362001)(5660300002)(66556008)(4326008)(8676002)(316002)(66476007)(7049001)(66946007)(110136005)(38350700002)(38100700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: S1vlkwsC5VgTTDSgKoukLCQA13RdLUMEVTBE7OryED+zpP+ItlU6jDQ3nSZ/82+uqaA7jY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TSx/P8nlmQcefFl+9D8o5PJSAenCF6QAif5Njzff96l9NVQvF66fg5XeNof3SVswS1LeNFpvyYLE6w5NlZhhgPMmVGZ1zfooreAVEwmOouPYzrqTnJ/NWCoge6Xpnp7qo7o+99z9DUfIuklpa3qhf87mkWsYNqzqb5mpvzoiU/yH/qL0Ih9hBp+BeinOlHiYAuhFnbdSOSEGfBtSbzbA7Kew/m/flNxAG/PY16a9BTNrX1YYpLqsx1BV1UUINNdjFyQ0TNlJBpncdz6s2FOphrJ6GeatexZk1n7NVLyTros5b5EE52SNc174fugD4QnjjUEeQgP4zu5CaRRwQCotjT9lOBZ/anSYcPQX+bR/jI92VJH6dr1LoO7K2E/ZeKHmHMhiqPH6t5rg4he+UtU4scH2rvk67QyUbPKZqgrOrZSDS0JJdjCqLb5zZfMrrFhgOoD X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00e70acc-d732-437c-a564-08da64a18274 X-MS-Exchange-CrossTenant-AuthSource: CH2PR04MB6741.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2022 07:30:07.0665 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b099b0b4-f26c-4cf5-9a0f-d5be9acab205 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0gUtB/neOib4xz9/IlkESV8KSFFjRFBxPq7wzVPDgj1BaqCJaaNA4FPKOpmxepK80bswIfsy3B4uaQGyRK2s/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR04MB7445 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add analogix PD chip anx7411 device binding Reviewed-by: Rob Herring Signed-off-by: Xin Ji --- v16 -> v17 : Add node name "usb_typec" v15 -> v16 : No changes v14 -> v15 : No changes v13 -> v14 : 1. Fix Robot compile error. Fix node name not correct. 2. Change HEX to lowercase. 3. Use "ports" property. v12 -> v13 : 1. Drop the quotes for "$id" and "$schema" 2. Remove "allOf" label 3. Change node name from "i2c1" to "i2c" 4. Change node name from "typec" to "usb-typec" --- .../bindings/usb/analogix,anx7411.yaml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/analogix,anx7411.yaml diff --git a/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml b/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml new file mode 100644 index 000000000000..60aac5765320 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/analogix,anx7411.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analogix ANX7411 Type-C controller bindings + +maintainers: + - Xin Ji + +properties: + compatible: + enum: + - analogix,anx7411 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + connector: + type: object + $ref: ../connector/usb-connector.yaml + description: + Properties for usb c connector. + + properties: + compatible: + const: usb-c-connector + + power-role: true + + data-role: true + + try-power-role: true + + required: + - compatible + +required: + - compatible + - reg + - connector + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + usb_typec: anx7411@2c { + compatible = "analogix,anx7411"; + reg = <0x2c>; + interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpio0>; + + typec_con: connector { + compatible = "usb-c-connector"; + power-role = "dual"; + data-role = "dual"; + try-power-role = "source"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + typec_con_ep: endpoint { + remote-endpoint = <&usbotg_hs_ep>; + }; + }; + }; + }; + }; + }; +...