From patchwork Thu Jun 8 06:28:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13271661 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50D58C7EE25 for ; Thu, 8 Jun 2023 06:41:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=807s8HSTnCQmn1KpYfw6b/okAmW7QtEcFxWeEDSbxr0=; b=rqUVf2PIOu+01C uRAmlr4/AELeZf6YOZPCEJ2hZvC6NwhQ18Dy8DuXrgKpcren1ffJIiAJxboK1bjDBjzn+NUMrkJYp TqzWU4ddfZxGFWVHqcrP/UfcpxYm3rHWRzspMm6a6PXmz5vS9J3TgEjL/HGYgTuGsAnoCnGi2w19v 5AxGAkdbBcdS+VCvqJUBE98sNLxQjafMFk2PPx89vkduC91o+uhAGoRLw83EIrXFw1Z4VY7SgoEzW mz22RLHPRU7+dyTjVLPWHJ3CkJepGwijGrzr5gucUFLYZw+SdO7VI5mKwQq3W1YrqtmAzeH6VLjjV HvlC1m8OEcUi7UMlLC9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q79K6-008HOW-06; Thu, 08 Jun 2023 06:40:42 +0000 Received: from mail-he1eur01on0618.outbound.protection.outlook.com ([2a01:111:f400:fe1e::618] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q79K2-008HLx-1M; Thu, 08 Jun 2023 06:40:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A0F8GjtOOw5Imltne56djGrMKrls7givQXFJByePaDrhamBx98/0+CspDwYo4CVsQD3d9Bitc9iWUmNLPQB3jf6l7Pdx0K3Rk5hEMXmo5qqc/KlIhb3bEL0gEBFfszLkwDYA4k1zXtM+SYUSYDTxgAnpd3/zyjzvidyGK5N+8RR48KEsN60F5csWox9Z0Qs7ul9u1mzFWvNuQRlEbWrbfv82W55o+aCxGZ6hzbP/0+XlOxKAzFZNsAIGbzpuCu8VFWUpnzHRy19O/qdeo01zouaGspM+mQN/5tUWH5w00ZLgKAZ6feI7IGlgfS9mbSb/mLk2JZd7Gy/MaMGaiQEv6A== 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=z0pZ2Z3gcmk4HqnzQEpwDRiNWTBvIoL+lKGu/Vf1hiw=; b=Rz3O/5Uhe8CicQ05OQdwkpkciN1I/udyZUu/NBla79fDQfFCvZL3xqVudLY6DqHv+RlJL2wD1uBd4ISkRLgAYz7OWx2bbRsVSl5bUuyytFp344ElJ+fJCXDi/w6L3Up1qJMYzO/WfIlKE5Q74cWVY2lP0+ksp9Ut1bLI/twAqhMQQ0Vz0S2IrTtROSZb2z2mnKIXcUKPYMERJr/hFlc2NqkRR5TOoQSCCffFNZlC/tqvZDwsuQKQGFitNPjz/Aks7kT7RfBdntLr0Fe2pnBZR5MMwJ+gjTGw/hm3ikrhkWc2y5RbCPoMmMibZz9nwNciWGJRuma66oyHJl4hNxcSyg== 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=z0pZ2Z3gcmk4HqnzQEpwDRiNWTBvIoL+lKGu/Vf1hiw=; b=HX25IACMZboLSYxCiiMTBhhXcLDkUIqEAzcmMAxqij7zSyYefLlgmg1OukfNWF4hH8UIQlZIMppRv4lmjzFp5+r3/8QJW+RhrhiRH1W5I0I5uCrCXy9AI1+1V7dFQEIg2J5IbjMOF2XISZSzKMfPoGud7Rb2baYJxMBBgBMzKJo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB7PR04MB4505.eurprd04.prod.outlook.com (2603:10a6:5:39::26) by PAXPR04MB9596.eurprd04.prod.outlook.com (2603:10a6:102:23e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Thu, 8 Jun 2023 06:25:31 +0000 Received: from DB7PR04MB4505.eurprd04.prod.outlook.com ([fe80::f9b0:8c34:e57:92a4]) by DB7PR04MB4505.eurprd04.prod.outlook.com ([fe80::f9b0:8c34:e57:92a4%7]) with mapi id 15.20.6455.030; Thu, 8 Jun 2023 06:25:31 +0000 From: Xu Yang To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, jun.li@nxp.com, xu.yang_2@nxp.com Subject: [PATCH v3 1/2] dt-bindings: phy: mxs-usb-phy: convert to DT schema format Date: Thu, 8 Jun 2023 14:28:41 +0800 Message-Id: <20230608062842.4171157-1-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI1PR02CA0039.apcprd02.prod.outlook.com (2603:1096:4:1f6::9) To DB7PR04MB4505.eurprd04.prod.outlook.com (2603:10a6:5:39::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR04MB4505:EE_|PAXPR04MB9596:EE_ X-MS-Office365-Filtering-Correlation-Id: f30e5161-7681-4189-64db-08db67e928c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BGiFwM5dOFOKvjStJxlK+LvOUQb1qFV5hc6bgQJCAqu4G4hs6Y5aLIj84GWCvkDLQeKgwX4KG2VuY3Zf6nV+wmVFxIBi9Fa8zUddtrEqt1YkTjgv46ttAx73uK90pmOS0alunH98/YZxnGAPMOGXV7CVS2trrukm1/PmVEKGuAQashWKaScKMBVJqF+Q4UurL67uoOl/cpswWjShcaMJktikEpOtqSI18GlZxMffnqq7nhAfaIWjbHElj78HnbxYZyZWrtfTVnpG7PbPOPp8PSjXjhl7jLb1qfTUXoRlLNie9fBcImUSfS+jths60TBpaWyOsFNt57L/nUUovXb/kpb00dppZLVPsFEfMRWRAeQApf3bBusIkHp2blWGaWex4RGFJn03G7MRcM0LT3yicuUm2r2NipiwA5wfxaF9prcEsTsUo/y+0/WbSKA8lP+VxiEZNVTfWbKSymFk3HVthWwf/k4tHqqXgJEBX2hIThnnWJeFhBc0E6Gig5xK7axvbBiL9dEY8K9cRHo27tZhsrqTPa9nnPt666E/b4U6+8Ji0L3mzuAfIu1kEORfxXyB8vagKoQnht/uOwj/9qr6DsGfwV3dHUmg39Lb/pKyFODZoYDDUbEOnck/UjEHlTpmgCjJRStKxekAKsmBPOT2gg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4505.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(366004)(346002)(39860400002)(396003)(451199021)(2616005)(26005)(6512007)(1076003)(6506007)(83380400001)(38100700002)(41300700001)(38350700002)(52116002)(6486002)(6666004)(186003)(966005)(478600001)(66556008)(66946007)(66476007)(4326008)(316002)(7416002)(5660300002)(8936002)(2906002)(86362001)(8676002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: thI1T7MKuWwe/oxS0d74i4e/u8rb1jovu8rSoq8R/tV4aPQI0x8Nz/ra8SGjoQ4sHoAzLQla8bq0sJKKcluqUapV7pGm6uPBEf3nndAqBhiCcw/JiEtUdAzrQaal7GBEaNdUXFlbj+oMfy5K1Mk0dsU4IYLRTz9ToAOUD17eDaL53bUXAmDJBtJP4j4tULXpExVmSCd82Rhy3bjWLYBkSUVJmVmRw9GEeizIA9Nj/4ppBquLcVOpun4hazTNBkiULJnYN476DIGKOJbyc1PUv/nLkG4U19K9Zb5NCf4l2Dz3RufDjI20/sZQj7IJqzgVXiVK2dNWHoipZn/DZqJF5qr02nLZkPQU6TJE6A673CLzOcF4JcpmEt3H9H1ZaWFYJ4frw380DoupBRA86hpXuFwgzl2xCVHx8HTx8Lt3K2Iqz4bbM5WIf8J+MBzwau6wSPCT/p1z6qv1VVnZgvZ7uVgGfMxnQ9EAAeJf9XpBgksrMiuzclHa4pHNuopgLQXrPnLHcLCJVeCTwWfOJ47ABujekrHuFuwh/L6WITwsEwpohtY1a58Frn3HVRzcG73n+ydkNSvnNblxN3d7bphnyKVa/ulUbC8MFN6o8ETqbZlUtpg8iidASgKECrfRz9KZbx85G2I6A/EH9d7QRt1b1PC7e8xu2+KKheKvym4WKmI4qKAntSUtPKMoOrA8xNaUSAmMJvYg1ORJ1WmyN2RZ07TyT43szD3DW9kg1ea9ZiMRPPRED9u8LOeIUJ0opbzwEtaiq39mSzQesc06qQy2HG/GWMMJekd49tA9D+0FeRFUpIa9tg82a4fDuk0nkkZBzFe9Z0EGPVLZk+VY/Vy6PF+MhyfVQTP8CFfuw/mLM1ugsy+dEkn0DCzLWS5Yqq19bubMrnGl6XdMhZHHA4lWKLUgwFRbhLPowMvgkX0VwHQDpdVrQlot17zSdKxoUSNGRkSpJDS7OB8U+Jg9EHKTodQMLOJEeMPeU5M2W6xOsXM/I9S/eAVJZMhpFJ3qXfkzALPPEjziEnOchl+nqVSigFRTaivCFCbRcvg5by9l/y/r+KmCPKLZOn21+67Ga0PDFOw0ZzvauhhHpE+btIOCSxznB7zdxfCoKyxImmf23QIQ+s+shTNoSXgMG234f1Xv51EjriMVwBiluAjNoox94loVvNGToqsjl1oY1SwX1/z/5gUU+WTcQY/WXjSV5dBU/AF9/ymZ3fqQegUbCn8js3DMbI8ME5K8N4Jn/HWqCFh3REfB6uADrXoQO3AelkhTFJ/ypRQ99sNC5lymFIWTWf+HXttDwu3pF/AV3UX3LlHgqq1BuLsImt0is8bepYZVAacRqL1sLYCygeB3YVgg5n74jQnfarp1Jfm1H3MKuzaoiTFj6lFA8IovtTgQIiFjuxVGuUaSnHYD5p43RP9HiR3crH1Z7KTc37WrzJeoktOObmYfw7XcaFKwW1yV+S4dUfmyoTemLaV94x8Y1KIFmBNt26g8DIEZuBd42rFruHK9TdMiAPMyWf7QpAfheEq6Z55+ZWQ+sUTl8z2wMHUh73LEmbd/mtKdTckOXUlaRr1wnrbh23o9oh+fZu6jul8e X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f30e5161-7681-4189-64db-08db67e928c2 X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4505.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2023 06:25:31.3950 (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: VSOZiCqrbqsz/f6MvVu8Hpe4xyZeHUPwpZnk8RNpznz4Ui7SmGyWb9vC7Mz7BQgCm867MLFV2ZvL92cl9qTnow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9596 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230607_234038_461356_53E4AE9F X-CRM114-Status: GOOD ( 16.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file. Signed-off-by: Xu Yang --- Changes in v2: - change filename to fsl,mxs-usbphy.yaml - add other optional properties - narrow fsl,anatop to imx6 - use additionalProperties Changes in v3: - fix indentation - add clocks property to example --- .../bindings/phy/fsl,mxs-usbphy.yaml | 130 ++++++++++++++++++ .../devicetree/bindings/phy/mxs-usb-phy.txt | 33 ----- 2 files changed, 130 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml delete mode 100644 Documentation/devicetree/bindings/phy/mxs-usb-phy.txt diff --git a/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml b/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file mode 100644 index 000000000000..9b89a8891c5b --- /dev/null +++ b/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml @@ -0,0 +1,130 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/fsl,mxs-usbphy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MXS USB Phy Device + +maintainers: + - Xu Yang + +properties: + compatible: + oneOf: + - enum: + - fsl,imx23-usbphy + - fsl,vf610-usbphy + - fsl,imx7ulp-usbphy + - items: + - enum: + - fsl,imx28-usbphy + - fsl,imx6ul-usbphy + - fsl,imx6sl-usbphy + - fsl,imx6sx-usbphy + - fsl,imx6q-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx6sll-usbphy + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx7ulp-usbphy + - const: fsl,imx6ul-usbphy + - items: + - const: fsl,imx8dxl-usbphy + - const: fsl,imx7ulp-usbphy + + reg: + minItems: 1 + maxItems: 2 + + interrupts: + minItems: 1 + maxItems: 2 + + clocks: + maxItems: 1 + + '#phy-cells': + const: 0 + + power-domains: + maxItems: 1 + + fsl,anatop: + description: + phandle for anatop register, it is only for imx6 SoC series. + $ref: /schemas/types.yaml#/definitions/phandle + + phy-3p0-supply: + description: + One of USB PHY's power supply. Can be used to keep a good signal + quality. + + fsl,tx-cal-45-dn-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DN output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-cal-45-dp-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DP output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-d-cal: + description: + Current trimming value (as a percentage) of the 17.78 mA TX + reference current. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 79 + maximum: 119 + default: 100 + +required: + - compatible + - reg + - clocks + +allOf: + - if: + properties: + compatible: + oneOf: + - enum: + - fsl,imx6sl-usbphy + - fsl,imx6sx-usbphy + - fsl,imx6sll-usbphy + - fsl,imx6q-usbphy + - fsl,vf610-usbphy + - items: + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + then: + required: + - fsl,anatop + +additionalProperties: false + +examples: + - | + #include + #include + + usbphy1: usb-phy@20c9000 { + compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; + reg = <0x020c9000 0x1000>; + clocks = <&clks IMX6QDL_CLK_USBPHY1>; + interrupts = ; + fsl,anatop = <&anatop>; + }; + +... diff --git a/Documentation/devicetree/bindings/phy/mxs-usb-phy.txt b/Documentation/devicetree/bindings/phy/mxs-usb-phy.txt deleted file mode 100644 index 70c813b0755f..000000000000 --- a/Documentation/devicetree/bindings/phy/mxs-usb-phy.txt +++ /dev/null @@ -1,33 +0,0 @@ -* Freescale MXS USB Phy Device - -Required properties: -- compatible: should contain: - * "fsl,imx23-usbphy" for imx23 and imx28 - * "fsl,imx6q-usbphy" for imx6dq and imx6dl - * "fsl,imx6sl-usbphy" for imx6sl - * "fsl,vf610-usbphy" for Vybrid vf610 - * "fsl,imx6sx-usbphy" for imx6sx - * "fsl,imx7ulp-usbphy" for imx7ulp - * "fsl,imx8dxl-usbphy" for imx8dxl - "fsl,imx23-usbphy" is still a fallback for other strings -- reg: Should contain registers location and length -- interrupts: Should contain phy interrupt -- fsl,anatop: phandle for anatop register, it is only for imx6 SoC series - -Optional properties: -- fsl,tx-cal-45-dn-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DN output signal. Default: 45 -- fsl,tx-cal-45-dp-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DP output signal. Default: 45 -- fsl,tx-d-cal: Integer [79-119]. Current trimming value (as a percentage) of - the 17.78mA TX reference current. Default: 100 - -Example: -usbphy1: usb-phy@20c9000 { - compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; - reg = <0x020c9000 0x1000>; - interrupts = <0 44 0x04>; - fsl,anatop = <&anatop>; -};