From patchwork Tue Jul 12 06:41:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Ji X-Patchwork-Id: 12914543 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 4F1F3C433EF for ; Tue, 12 Jul 2022 06:41:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231790AbiGLGli (ORCPT ); Tue, 12 Jul 2022 02:41:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231474AbiGLGlg (ORCPT ); Tue, 12 Jul 2022 02:41:36 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2115.outbound.protection.outlook.com [40.107.220.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A2C959253; Mon, 11 Jul 2022 23:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vy+h2sx5wIM/X62FxyayQKI5Agqs4EAeNjXZGpd6ZiPqEckhCiYrvFUoISg4JEjHcgOt7fw/m91PH22II2NaNFJrCFW+qFo59Ng4F4mHtHuI6AI+Jr/RJqjFxTuHVoA7KgD0YYENyfnK2mtBApHm5fCtEPFSDE439hnO08oMFNEjG53N1X1L2I8RxSQsFae6VSU4zQ0/popDXCa0+8MRuZnNt+LrrEOTVBQTeceAuQN/i2kNnsaVRVR99y1oaA9y5aCvZHZG9FYi/w4qBHnwYUMAo85DiSbFgBjWWquWsXBh97DghufWkPcMLSyatAU4gprUANw7JXTQs3BSn1wYeg== 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=cNt7iIU9Y/Ty25n/uAU1tIwBPqXeI5YIvYg+W7IPePY=; b=SjO19Emr4hamuVnBimu4qyupRQAtyH7jAlG1+nId6UvRHIPlGMBetwpe9F4WpUXRITNAXchmz5BT2IF4x/fL12H6wiHABUs5bzlzQupX+vBkVR/A1YBEveNq0x0hTFchTpb36W7x4NKJNnb9xmbuIyBAQ8002q8O739VsN6aTQOI8qmZnqk6RVv3R9JLA9+PKrJP3EsJ4QStzLrHw0G7ZXPgdqiaStzAtiTvaUn4W7wHz4+gMXaXwEiWHN+tNTXC7Ql+sJXv3Y7W+Z3WfvNpK+t75awM/AiCEbSd0HNwQpUQIMFxUU2rVMiDHECHYeIyRp55BmxwQUC8TrrKayCCUg== 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=cNt7iIU9Y/Ty25n/uAU1tIwBPqXeI5YIvYg+W7IPePY=; b=f24G+Whc2qqhdcrPGDNWb4YlrrZKvseDqgxQGnHPXwaSEcntXzVpECQL1luDKlJ9KbFWgMxrr5/wgTwthJHqpoUcoPBcFUJ7i2Pi6ObDYfRvMl2MNLgfvKD9Yv5/1AHcCGvMzckhMzwlSlWxFwf9YBZVHWUz5sGZ9/JAKPOmcNE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=analogixsemi.com; Received: from BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) by CH2PR04MB7095.namprd04.prod.outlook.com (2603:10b6:610:9e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.16; Tue, 12 Jul 2022 06:41:33 +0000 Received: from BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::f02d:f2e:cba9:223b]) by BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::f02d:f2e:cba9:223b%5]) with mapi id 15.20.5417.026; Tue, 12 Jul 2022 06:41:33 +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 v15 2/3] dt-bindings: usb: Add analogix anx7411 PD binding Date: Tue, 12 Jul 2022 14:41:10 +0800 Message-Id: <20220712064111.2782861-2-xji@analogixsemi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220712064111.2782861-1-xji@analogixsemi.com> References: <20220712064111.2782861-1-xji@analogixsemi.com> X-ClientProxiedBy: TY2PR02CA0031.apcprd02.prod.outlook.com (2603:1096:404:a6::19) To BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d555cc7c-69ff-4211-9911-08da63d18f84 X-MS-TrafficTypeDiagnostic: CH2PR04MB7095:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MBLhqRy7OVgjM8fqFXrpUdBtfN25W69WDufEMocPDJPBXgdd7Xsmn4sOzWhqHYryBnL5hZ6CLY/N2rXEcbOiIWduZwDbiODmTHbsOB/CBmPXHCGPingtLgW7IY7Zc4vAhTDtjr+GiZFb5lhh38UsfQhh6qXVUfPQm7SJT4FC5/cFRvYsA6nA2k5kePdXDQEUPpmzwhPgXUmz6ujUfgVP/jclqzWV/um7nIzc8qP/ykiv6996PZscobqQjq30IkXUGMq8QxizMA2ZwMHRkjbPOFLdsPEsc9NXniYVqlsuLSv1ZbBAMZopUYD5kb8Njtgd4lZWWwVinxG/faUkWFvH6uCydagFnAxD9HHShN/tpNYir1/rjOYNz5DgZFcEmT9UoQ7psGdmJVzerjdvwkVMcMV0na7R01vvLBZoNaydU0vdb3R8Y5SzXRRhC0rd5WtwJEFKODHUgWSYkG2Mlu7UhGt4slLcSHMcFrWMoN1Zp2x+UCDefy2+FiGTPSgIism7zUyJdrt6+Po1ZXp32eLUyIPijUTaJJuOMRZpiYsrzZ5uZ5R7HzKKDUf8HIenzrJBsTZ9YjY5EybhWMQiEJydakNeMlGzW9W83OEu2fKBdl/Dv+b6MtoIjzbtrY1/X6C/IKsqt8Hkqs9ZIrcV+sZJUm9qPQJFD2/EkOPuKwtDVXz24CqTTlzdHia+tlXBsKdXRk0b/xLdJW7Dqinj8QNF55mxTGi4B9geikOs8eQL7Yf4riO0gjVZjwHpDN81GdEZ3odCBB7ZWSzDPqObtnEA05yHk+EVV7pq2GRzakRxqZegxfqec5HrIwOBMTiEAaOddq1+KziukbAi2JHChTNlCuFPtw/CUo/eaxoB7gLYda4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR04MB6739.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(346002)(366004)(39850400004)(396003)(376002)(136003)(186003)(1076003)(6512007)(52116002)(55236004)(2616005)(2906002)(36756003)(6666004)(38100700002)(38350700002)(6506007)(110136005)(478600001)(8936002)(5660300002)(4326008)(6486002)(966005)(8676002)(26005)(66556008)(66946007)(66476007)(41300700001)(316002)(86362001)(7049001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiS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BQbNZa2RMaAUldWsyce0AMfEI52TpPKKYt/lRrnnwKNdPR+liBFNxHbUIZAXAofLkfQorsF9DjstX1f3RkkBvtfGHZ+fWFZJa1uQvF1wYlnNXvJP9KbCCb+SNi6csRlnP22s1BC6+br3tKugV0aaAQCyG46EIx7ZX3rp6Df9+3pUBJYDv050WUaIXErAN8pJaOs01tizNfYqv2CQXXe/4K6dGXI59gWedsnH9wu6pzba351paNUCVA6mFTgMtCZqVQyXmIHXnEztFsawLN7yVtfOqpo6/RHAeS1NBSUkV5oHdKvHO6Nc8awh2X1lAvfx4EW0DrOcc83xDNpsjGTkPDV/aU+iRyooWmGBUSNQIIYb32J9GBgIB0DPW75ygdctfGfyOwyMOmiAx1WEZSDUYfAOfAya7ArWCB891mLtORjveTB9u3sZdf8dGcokN7MZIU+hw1lrjVWVNNTeRUufc+n5R5yXZJWbCbrnSOzsJ3kLw6UHBjCtP9iIKftTTHNO2CBGOM7jxpUIT2XSXEh89C X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: d555cc7c-69ff-4211-9911-08da63d18f84 X-MS-Exchange-CrossTenant-AuthSource: BY5PR04MB6739.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2022 06:41:33.6005 (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: puivPk+9LPAZhPM0SHqUKrIaJxoGCoAFpxeQCKFeQzdVgSuaFyU+P90TiTFKjJBRGKtgNsTeodN3VdDnIyCkKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR04MB7095 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 --- 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" Signed-off-by: Xin Ji --- .../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..bbd071ba338f --- /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>; + + 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>; + }; + }; + }; + }; + }; + }; +...