From patchwork Wed Feb 21 14:58:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13565009 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 1A857C48BC3 for ; Wed, 21 Feb 2024 06:52:42 +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:References:In-Reply-To: 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: List-Owner; bh=awIqBriJXOURxOAsJAkhX1UYIkd2M64JlFvbrFYPljc=; b=t6FPq7YGBXMOWo l8ZtZrb8MyD1iy1WV80QvoNowHaSnQXwj7C5UO3IgsXA+yhUxm9z5KeJpMMjnxQOm17tpcoHY5+Vl Wv0nGox5dSKRkDTeOHcbPpNr+qPdvRZf5hqf3aAJc4ZHqz9IMdKh+TlvO+14C0z+PZGR2SErPnbsZ zFlKOLQECd3R4jTfNQr27+1Hr3tqHj75+uHJNR6Rs7OnYZgOBZIihrFGslT/dA5FKaR3SqMFPLk94 mLzPL2+NHJy0sj4htkJ50tYoqsO7SPZeoNnsZzNhyQ5ou4z/6Xu/QLjqfDioG/A6ye460Breni2O7 7TfjD8vg7cYeSi5aIQCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcgSz-0000000HNpd-18Sw; Wed, 21 Feb 2024 06:52:29 +0000 Received: from mail-db3eur04on0626.outbound.protection.outlook.com ([2a01:111:f400:fe0c::626] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcgSb-0000000HNal-2J8O for linux-arm-kernel@lists.infradead.org; Wed, 21 Feb 2024 06:52:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IKx4fFWWgzjOEy/rtUSwtX4VHj8Re6T+A3yL7Y1VzBpLmIrlo1qqrGZw27JciKY3CRma3x60yxVyPr8xeCokcF+G0Lx8yBEIl565c9f7h5iUj4hXho3UMbPGJm3kdjGO/tp7Cy97zbRyOyKo4KFlfWmDv6+LjD52TLcqtjkuKV3v++FyrQD/xKKVj5G+bmmuAUakB8Jn6TfCChaVvX09DHXbCza0m3md8voP+YAjd6K3Q/FOTZekU1w9/3D9ovXb96mIk6mtbDdnH5VOndq1M0KbNsAnUVC22mDMaOko54MuSjBIa9XoxesPXddlVfTrnSrpYFkVQQhvotdhzD4o1Q== 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=pkKIFr7sFhI248q5m3aGpcxjKLrVv25prkH9EcL/3Fc=; b=AmPTh0Q6th8L56OEL4yFKvIQe2pvynktU+EuQxldEBwjvGOvUVsYQ8GI96OOiL7g9tuXRHaHaai7aCe5zi5Zi/xywa5LBaKfhcapWUJIOaFIbTTuwv02iG/OCsDd90H4hlh3StdXFCJdo8GHgxvS5EivhOBVF98dkLG78PwuBM9bQXEiXNt7fGEtxltdREEFTploHNBD9EC2tEJDkltRNnAmU/Ss2QEI6plks7NRNWifCMmbSaNbhmYv/RGAM8h7kYL1CZ9N4e1WJDBTqohzDoMgz3cYx/ip/L8ivfbZoidWkpm3VcEGIiSOZpCInaqY61pOOrdw9FI/vkOSJgDH/g== 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=pkKIFr7sFhI248q5m3aGpcxjKLrVv25prkH9EcL/3Fc=; b=G61f3/3y0yrOshkxW9LllQGsiqiW/0MeLWcILgk+EqZNVDukPtMwCNN0AUjfH/L/mGMfCpzcYrtz6fiV29GIW3lccK8j4C1XNJZWUG0CuUthRThs162YdXSpZwnP+GVzHlYJ/64S+tTCkd1C49CIYdMVqJbRNxpern7u0bVZxUw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by PAXPR04MB9304.eurprd04.prod.outlook.com (2603:10a6:102:2b6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39; Wed, 21 Feb 2024 06:51:55 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7292.029; Wed, 21 Feb 2024 06:51:55 +0000 From: Xu Yang To: gregkh@linuxfoundation.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, conor+dt@kernel.org Cc: s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, peter.chen@kernel.org, xu.yang_2@nxp.com, jun.li@nxp.com, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 5/9] dt-bindings: usb: ci-hdrc-usb2-imx: add restrictions for reg, interrupts, clock and clock-names properties Date: Wed, 21 Feb 2024 22:58:42 +0800 Message-Id: <20240221145846.1611627-5-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240221145846.1611627-1-xu.yang_2@nxp.com> References: <20240221145846.1611627-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::6) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|PAXPR04MB9304:EE_ X-MS-Office365-Filtering-Correlation-Id: 21b3dbfb-8c25-456e-61e8-08dc32a99716 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vV7xNuueqDLYwwhR27jVQXtfTgwj14cVExKRT5umlkfS/uWil6x37RWmFIRC9Z7a9iT7RSq92pCrdbmX9oJu4hOzUMJP2Xp6frJiMnr2tpxtvfyihTG3TRtjiULTGCPVSsr7ilMZhwR0GPqxA8T1zkVWpos0EL1r/m9NJ0QaILWg+a3ZVvEcOULxmCM/jxF1/oJT1EGK6Fi+IQZkh2sa7ZNDJ8F/vuqa4R2E9oTlD+SOWAuxBZQbf02rmoKvqEhUflhFQzZz0pLLe33w+nEQ/vQdvl15Vrx6K3gMJBGMZruSBu5zusul3ZkeYwNQ1QAj8jBznVs04EzrFeVT7SFzCCTTGW7Xzvx/k8f/RGXoH+bDDiAjDCi5JHIlHZ2CTC7uXpz6GPguyXt9gwVmxKiMat1q7m6IihmR35ztBYu3bQ5E8aJwPh+wJzQ6OhMxlBCV158dkxhpNMR9tLEuX44JvyvqdZyUPKYMw1yMyBcZfAtuEovEc7wJ62+2gB1QQ7qiToxlXvGfapaR+k4H1Uf4xTbqzH5yR1Y9XUSJIer/6CRiAaILVqgJQ4aXSe38gOntR8Rk1xHmEk1nXjjAOukHy0TxMpOUz1Jvpyyh5LBvx/41wQ8HqT7RZMlH/ARrJdOv X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0AiKq7PoW24y+FC/3D1u/fVvFTxUzlH95PCyRqKwScn5Ahk/af4KstGyLQshIa+WsLJ6hecWQ67BoqwYXJFSAFY4Ros/f33aNin14tLrxort1ptzqNz3AIKi1oONlV2T2pAfLPEmRjtlVZ2GIRuln+h4LF5VyvI/n9V6m7HKG0wfBjA43zEZer0HFWQI+0HCC505gNuo3I3/THrmlv6nBramYmqxI1BE4srFf3dgoHFzNSlfyJ/BC6Me3CtfTvatRWALt8O+pwDb07itgRh5Dfi/XDYOX5RzzllZSVxnjYj4+atba9TJ9uhaCe4vJzBOW1+Fig1B3fdmyKI9fEmJUuvWOlm6os+jFOmq4Pr9RLhYNBeN3K8mckIgYqIGI4beroPMRzQtwrhE+reMzEBTc5guIDy/5o1fXL53L3QugmrsUdtrZ+wb4e6dXpExsh3pEK/zUpWbRk1VRIqEm1NAcm2YfkwqEHP6motIBS9fhI7tFQneXv4Vq1K0XuHac10t5d6vPEQaT32z1IkCGt7cjGX8tYPlIVrgz+CPWwOxw6HTiOXtfYEygjTqBZG6YzySzGByK47X2b1CY1fV+wez9J1nWQI5AEEcl1vOjNQ3Bdqwunnuc6szfPLdwt3e+DtURkWOpalsWih/79uptfKkVGO3KvVsFNfOb1WkHDXCCoUlj66IeU2P+kegWb+nfTfb/8L/H1V1vNpEbi5qhjoOxX6H5KsJyoR8sxEWcHtRrq6oBapFxV7Q3iIJpH2gZU5fI8Yy6Qt0iIyT3nudbGDmYrTZn8Z+W6TeFUW7ANHRLac0pYK0AOJr7UfSOWePEQBXChRIOoy6qVtI80WU/FTgM2uwHq82uBxrPcHAUiFGviC/Ht3I45HlkcnmlaP3AAaseL7ryN5aMcYd1BK8U5baRrw70ofse+26pXDRSMgGwoq3JzMskmhVruTq4V9m6cyU1eyo+UnXTs2pBIjdLEB6/RKiaIUoFANwaDrrZdegiM56vjtvcyjB1hpHXDAQ3fQKvb0Y0hFrMaBw+raBZVQxPCG2G0BKWNoPddLl7VXMTvZ8kd1l8KvHAAFDeW0LQNwG0wdnaJZfrQe1rkhZoFLQ5i6VzrQPYWjcS2hZLwucQOSIS+XqXqQeiWZTRVxMjHxq4/XBFy7p5hmREHtkS3oOpPGtSOWEdz5RGwJ8bFjRGcAxmj1TN1z4jKcYCB8fEeFdIG0iyrZ99REPhpgH17xaK2s4idElNFbmN+8m0ngWWiyPJuIlDN5LqLNPTD4hBa2M1LcgZMY2lhyi0/Kas1oEupd/xDqKPBkgpMUTn3W0JFHlwJDmYnW/D16nFl7WTtI66Q2JwVhVc3Epm/N3Hrw/RwV3UNhQaUGO2PjifGhBdYNmbyVVknYeJ9R9WTUZ4U1Rghxbawyyt0b0O5yK3kOKluk/FH6X0rFpqYU/ydbC0nLwEg1/v1TsYi4WGLFJEKZIJXpFTVwu1mOD5ZnGT93FoO50mbWhx3AIxYIv3Q1gOEaJ4U9ezG27qWaK1B9zY5+CHvNamgaH0W570WiLRDxu/AF9fBO8YybcMh/Ox7v68/1l7rU5KIbUw4+E05atewD+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21b3dbfb-8c25-456e-61e8-08dc32a99716 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2024 06:51:54.7891 (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: fpU0G7UEY6wp6Anwq2kqUidAxaNQoZ9UOSUq/H0f8HzshTRrtETrPJblN4bDAlxIYowqbLWUb1AasL0VAzELrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9304 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240220_225205_792867_063EE55C X-CRM114-Status: GOOD ( 10.72 ) 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 Add restrictions for reg, interrupts, clock and clock-names properties for imx Socs. Signed-off-by: Xu Yang --- Changes in v4: - new patch since v3's discussion - split the reg, interrupts, clock and clock-names properties into common part and device-specific Changes in v5: - keep common property unchanged - make if-then more readable - remove non imx part Changes in v6: - new patch based on ci-hdrc-usb2-imx.yaml --- .../bindings/usb/ci-hdrc-usb2-imx.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml index 2ec62f564bf5..20bb048938ff 100644 --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml @@ -49,11 +49,63 @@ properties: - const: fsl,imx6ul-usb - const: fsl,imx27-usb + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + allOf: - $ref: ci-hdrc-usb2.yaml# + # imx27 Soc needs three clocks + - if: + properties: + compatible: + const: fsl,imx27-usb + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: ipg + - const: ahb + - const: per + else: + # imx25 and imx35 Soc need three clocks + if: + properties: + compatible: + contains: + enum: + - fsl,imx25-usb + - fsl,imx35-usb + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: ipg + - const: ahb + - const: per + else: + # other imx Socs only need one clock + properties: + clocks: + minItems: 1 + maxItems: 1 + clock-names: + minItems: 1 + maxItems: 1 + required: - compatible + - reg + - interrupts unevaluatedProperties: false