From patchwork Wed Feb 21 08:02:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13565078 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 35C96C48BF6 for ; Wed, 21 Feb 2024 08:03:33 +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=kNV4GfiMoWR1Ow awEQWL8eORmgM1E5ekOsK0FvmgDnJQDWsf90TmIWOkmBJJRT+J6xGC1QJDC8aGpxQJ9gSobNE4e26 /hdtSCqptqNiZ5VBTkPhbTH5VO5adkTvQJSM8QrYp5lnsUl8ZmTyF8+ezJeV+IIbQ997+QTVQDGiH UYb6uOPJcNIMuOlMmJjJsuK86ajiAZc6/p2EKO2SWI4TqovAi8fA6NnnrI9Bpdpyfkp+TzF6x6sk1 PZAZE+VpvAj53OAPAV22Qc5065f+B/rnxqn31uCTFlhA9YgFqcZ/gmklce28EbYWAsJWmjgGyGmGO 2AWPpG6h0bHFJ13Tzl6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rchZV-0000000Haj0-3irq; Wed, 21 Feb 2024 08:03:17 +0000 Received: from mail-vi1eur04on20601.outbound.protection.outlook.com ([2a01:111:f403:2611::601] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rchZO-0000000HaZv-1mkH for linux-arm-kernel@lists.infradead.org; Wed, 21 Feb 2024 08:03:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G0l30IB4GJaPiQalQGvcrzJF3h6vHj+G+MJ/w4g1X6ux8zOlXsYkS42wFZ+SbptlBUpnHYlJPkhqHAekKlUix5BIjl4/NuKtK64RfE8s4hBswy0sOiAxbwlOzs3Vth4h1clhlTIjgtVAQJ+djOBIYmh731jkOWhyskAHt971Y9WWk1wH+GJ9Y2QB2actfW2uzvQ2+2C4YwJpwKaDPAfnVi/QyCyO/eBT2xPcCKY4+n3H+LdtZYt1plk9K3oG8k3MinFPVmgy8D/oZOfgzDWaahWtSsVmaK/CSOxwHriZa4+KSdGXV++mNeZvruLz4xvfYJyzjAmRhhqixYbYnRJE1g== 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=UStgvY8wsUut33VpAOI7tPIVHL21RoaHKqtxUbKzGhi2FnE+X4MH2yj/FDVVeMhAhOJ61YSJXvUaZ9kZ5ZeC8G37+E30tvWdO6fLaExHy3H8UDuhJVHxbgzfrEtZLWkUyHMNitBDJD59DogsFPIY3eQyjo/+3z06+vtfqzzYZ6Cd5qU29Gwqt3PTdPwP0yTtPM67ddjsQ80shnpZnkmiBVn/SadiGJXirhcTHB6HWArnsNqqcIJ+FjG2jMTChSmwVltqpYawc5svvK6l6snt1sDbV8rSoo7DYda0tjpduIIPzWLD1rgEvsuN5/u+nW5ovciw6otkOD4LYA33d6Lzkw== 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=s8qKaBXjrQxMKcHx0U/wSLtjF7aUR1AB5e9uVIrkKHuafRpJzN8Q9sdC96tWHPYRgr04RCZ+4vPRLu1HeVHm4Fkp/qf6Op9iE+jbTa8fwfowWqiZVU1h0/zJYBeM3a43d7CgModaiEau9rqsNrO0RbeZr7nqBEw6GXCmGvmlueE= 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 AS5PR04MB9770.eurprd04.prod.outlook.com (2603:10a6:20b:654::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.21; Wed, 21 Feb 2024 08:03:03 +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 08:03:03 +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: [RESEND 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 16:02:34 +0800 Message-Id: <20240221080238.1615536-5-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240221080238.1615536-1-xu.yang_2@nxp.com> References: <20240221080238.1615536-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR04CA0017.apcprd04.prod.outlook.com (2603:1096:4:197::15) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AS5PR04MB9770:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ddc5d6f-e85f-45e9-0646-08dc32b38730 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Emaiu/LYiP68Fl+Z7Gwu3TwULSq68qI15EEzCGL31cxpvg73LSYU23kxH+jcd/Go5bL84V4TqAP3zovSWzIYs9w2BE+uyx3fkJh3mtXb8M4/WnmL0Ip4i2opG234C+5eI1Z0kH1k9GKnw5ZhReHuyCiL/ah/+Z9nPGNAE1a8qtoSu87bEksIzORsen1WrSwBCD8YIoMP/9sBgHenjQPwFEle4VKk/HMztOb0cGv/d62OyX4Scbg97IV2FM/S6Ahl3cxQZKsfffO5BGJKm6xgXQVGSZmX49bW6WABQnHgq/ybBWS2VusqEHXIznF2uRNuya1+3OvoFV2ELnjb5ASLL3S/DC8mjM5jz1xMTm8hRDaoATN27EiTJlnSmePwVcW1Wy01CgcMUmf8QK4araZNbiIXz1bQjzM3nAbs4h94WJ3mkIiueV5aGI8EgQzKj4+PJI2zmoSk8yO79Q/PAUsgH8B0lLJZ6zUGlAMNjke8fGbSY/OgNEI4UtvqacKYCK7IIHTryIA6lJveF7fCY5+8obYRo1qS4LWnOsPTKfwmQuISA1uj4c8rk5anflK4GNvDhzg3G+ITYxi4oiaBTXjwnWU2+wQrH2IkFk8+iVkkklY8hE4Rw1u58lAz/ze6EEx7 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: hzAgKPadv3xBLk3xDT1FLcC3NgVPAq+ZHup8Z/KCrIt3b7inN/MEUBQ0Gc0eomwaWtgNdnXXOFoNr2nwZ8g8tY+QCJ+gQYisdrTmYKf4fFmF/4JbPBqNqbSHdDfzTJiuBhA47UXjs47ufY+IAprB4IA0s50mzcBz3UST6hoLIvkkyAbGjhL/XiUGgHW3/D1YkvSoWBTg/+bwlHfovl/2CwvdQ3kHkxdraUtCXh8tVJNNVNIXhuDaufyksi8HJakzrA38slBV3zOcaFukhjOJ9xLD7pl9dWCCIZ0kDWzvVT61ASaPOs9qxN6NZSV03a/1hpTVMWi35RQedIbU602C3hgI51kYSoZU0V8KJMa63BP6Rx9+3Cbhn7wYyb3XmmNAIDSNF+eyNetA4KsJnm8gV8Up0k8OeEn+CEaUgGyj08JyBpILQ7R3ZGxbjD7CaYYxRzSsExc7WYlWMELknvZQkEvadIFRnMbAkYQh+24z1SJz9FwhEIXG9dz7/IHBdWerN/ZEjhTyrmbuJIYV+d7aRkOnFX3rYUdjjfVuds/flmh/YLjko+81TL///3dkvmscDv6W1NqLKO9uzNnhLe36KzZRKq6VpkFUt43o27inlqx0xYQYGolJdWSA9UUrkF1lBgVq5LJx5qVMaB28bZ63ImHmkQhtUVy6NGMd9j1fFEb80UfQtFoWxOkj1+YWlAdF+2cJRB1Z8klUBOrq3DzDRW2gDkUmJSiFIVx+SomxqkaTLLlBHiYpMtkcv4a9HU+6wWZgmGB8Bnh124uVmZ4h1EG1SXs593t3ai6uLDMdptXg9Izt75KbRKJvACxqY1tPzQCR5ba5R/XSCZ+FtVmITD3wO4WzxMalu4RI0dHSRtlsY/VGePsBhbeJmx/Gj4if5dQ8emDNuF/Emjz73MAtmtgdmCqjXj4FS8/XYT8JYI2rLa2VlsYpxbr9tkyoj5Iz6iLehOzQ0xKvGeFVmgwpr6QSLmM8AoMUCZROY1Istr53TsRMDEqVTNWECapileW4g2HyNZFVZyTLHPJsOGSQOj6H3p88MwqyYluYq0E3UbhNVu4fD67lGOAHC+KrptLBuG7A516MWMsDA3GmL+cVM7Z5VabIA18kRlXa2CwVgErXiM20l9xSL7d1q6hum3DjTkjXc84clTB0Vi0ePkzCnXtMSKM6P2bpkSonVi7n4jU32WkR8Sps2K1VQErbB6lKaOKeXXdWc+aob4DMBtnxhq3eevm2WH/9w7srXEIYwfNT/ayw83VQR+5eabp2k1KAcywr8ARgbM0r0+o0PAulSZwgHyiM5uYtzKEDIcPwQ09gINkRhws+PSfbXdLFC58wJXLtySrCYRk77GPUVVqwvtMR+Wma4ezUOkTPR1ccrkLWu0nKWOzG4xPBIHXixlYaE8UxvBJzefO+OvEi4tBPFCny4rg/f/UQcnIsz7ZJ4Yy8TYA9ytS/8OXMIDojU7PNhHu+iEG0c/jh8qNl5WlrjHZchzodcoPLp5+tYIReeiiiKOEuAWmIOU62sH7Y3S6g56XuhLjxwx9RCaS+ywJD6Jjqa0th/sbQ0lNkgm2BIC1zxP9nKlz/JEhA6AK1jYcS X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ddc5d6f-e85f-45e9-0646-08dc32b38730 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2024 08:03:03.1212 (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: OoOpTj9MFsxJX7mwzpZYwh/VUaoVNuq3Kxvx/f/mj4Esr3WSOyb/OhkDHlQ5xwFpJWS/a/E7MxnMRIMemf+SEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS5PR04MB9770 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240221_000310_478964_609F9E45 X-CRM114-Status: GOOD ( 10.40 ) 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