From patchwork Tue Mar 12 09:16:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13589696 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 A17EEC54E67 for ; Tue, 12 Mar 2024 09:17:50 +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=AU4xoXp6jmOKI06bZvu+ixqThNuKcwnR/KyqClICkMk=; b=HOvIW2TDdndC58 AsnUXuk3GEiPaSGCfSbHLaVH0VdCgJtxI4qqInO7Jy2suTFjIj0ojsvT/7KbRIe3cpDjn1ktPQ9YI YJKSSQL87G1oxjtV6LqVkSmVy0taTZpI1+Vz/xE39Ae8AKalJTqrE2tKIW+7GAfV3Nlmm9LA/685t 8TGakVfkWIoKXgo5K7XIZr1F2sFUUuyDrriCZKDigPit/0f0z0MKtz5ENFl0/N7F06WrLPBdD/5kk 6TSquA9CuscZfAkdNpaDE6KvkjQGCEOrcFBcoScDOXRmgizAvQD6MyAsrkkEagIi6JvsBy37+fFcY fjmCCBlPgXwKwGJC4j6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjyGJ-000000053vb-1vGm; Tue, 12 Mar 2024 09:17:31 +0000 Received: from mail-db3eur04on0628.outbound.protection.outlook.com ([2a01:111:f400:fe0c::628] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjyGD-000000053o2-46Sd for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2024 09:17:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j9gSkX6SwLvTEVst0nvhpf37ZcQiE83u6amtv32rsQ81SK9Gq0hnDbTnV5dc11DaLojnNAYGcZgrnPKQDGCDke+jHmS7pXsHB7fsZidlbMtizxECX765/J4BMnv3j8M0cj7Sst0kMOWSpCowY9Ax/SHB+YM4E+hyAwI5pEFMxS/mNga0+mdWAvWZoGtrAKnVERP/l9+gzDshbucvsZorGrhkLptMn3Fo69D1yRXPHbKDS/28ZZSOkT9cT9OPJntTcE4MYfstB/wLs5AqFfjRQWHpo51xC3swH+yB/6yAhsXZP9Zp42+mvpgoATPH+ehmZOF2rYhoByq62xhPecJTEw== 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=I3zfXPfVk0Khrw22CDgtg9XBBe+Foy/4SHkbnYZQDu0=; b=FJPutCYmTaYQjqSHKJWNxQEimRmB5FoFSCMTwwsIxsESHPfWIN1Jnun5jpuOaM76nOJO1BSA36TpHk5aIumlH1j4XA8aTgYtWwQjKT+FlmQ2pSKIZjOtbjphJPG0vGKdhpO3dcdDAgm93vOs+74vbbX0gQAv4l6E9T+ApfcbwSRZZVC1miWYw4tTKTxbMMRWk3rV8oEsJWYUEKagOSh1vXsI4eLzB06yQvQh0TVoCrwvHH+x99oE40XS11LPqjwnOq2/Ul7cf7sEZdOMO0dNsEinsEEWLP5dv7J/C34qHvo8q6VTWlXVt0+s8ein2dnM4yuP8VVZ0DKpnwooIdjnLA== 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=I3zfXPfVk0Khrw22CDgtg9XBBe+Foy/4SHkbnYZQDu0=; b=HZjc6U4GzzMUB23FwYua2VGrPiZsy4e+yI/c+BBdhwjSL+s0u+JiZ/XcvWSkdHpsA6TL7l2HHGX4xjyot9h27Z6/5Y1stUIXcbf/QNmXHVDnUQ3hnyd5HsGY30HrDNsyKDqs5lvBbRly011g/YdmbyedV1DvIsAniMZQcsodx3Q= 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 AM8PR04MB7876.eurprd04.prod.outlook.com (2603:10a6:20b:240::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.18; Tue, 12 Mar 2024 09:17:16 +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.7362.035; Tue, 12 Mar 2024 09:17:16 +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, imx@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v8 05/10] dt-bindings: usb: ci-hdrc-usb2-imx: add restrictions for reg, interrupts, clock and clock-names properties Date: Tue, 12 Mar 2024 17:16:58 +0800 Message-Id: <20240312091703.1220649-5-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312091703.1220649-1-xu.yang_2@nxp.com> References: <20240312091703.1220649-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0026.apcprd02.prod.outlook.com (2603:1096:4:195::19) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7876:EE_ X-MS-Office365-Filtering-Correlation-Id: febb59af-774c-4d09-5109-08dc427535b1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qbr+kiFUwVdOb7tVf1eibCqT1jS7PbiOTx3eYmOvabptferKAtAYp0SLzDl9hrUxgjDVjvzKs/3XdxU1TkSkOcc1gYNwCDWSUweULTaW9brZib66U75CogVagCvgpuMGsLe3gwuPkD9UkBkmIO1SMMRS4QnAZPPbp5eeAHZk2ysK/3L7v8eAHsKdoqGB9atRCMAdNUw2Da+Ze62FfjZDtgNM9nBkvDpW+xrsW639++oyIXWAWNaKpjW0kwnu+vcWcli5IQcoMIzqRON5NL1/p09sW4hFvLVELOCtRl9IgufPw8fGqwpJ+p01L6yVIVPD1SYMFgCmVhuJCIgvjyf4qVLofi/CWwhdiq9nCiQYxKYbS7vx7j6H1tgLKODS/terKzhRSwMFEF6SRT3DWGm3+aarqnZQUQrFdhqV4TdFfis9kmXDCCI8ubzgCEtWnO9RAQVT3O40isZOmfiz9B7D6Ze4A4ZebmBWRDWs6a8L6PqLKiY2+tO+7RPhfVaRKe1+CP/baay29O74jZotRkpbr0nkhjJZl8+uT4nmoJKuK8u7o7uCfno4r9oYDpdDmd7J8SPEbNjOTv4Z+jcvETMLqOm2iwo778qlFTPtBg9CbgOlxLzWb4v05viAkQ10Vx9IiC4REKq3wRRkSnZnO9Sb0xd0C5uN6O1ouH1GiXVC9wJV1xmAMh4g3GNwRxr1+M/q3oqE+qeSvleNMxHuoxCcD1hPs0fc6/pqVQoceWFXDik= 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)(1800799015)(52116005)(7416005)(376005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yT+S7dCaPv3gHZqus+trDBZipTtf7sCEerPFW6+g9+7vk2CUyIh572QUlLf0lEbrYN7xybph+3H+0b0llfl/AXDUMDM03nzDkbFM+jVquIWJjZOxYl2X0y/xWOLKVExnyUZ9uFs9ORx/F5g/kG6+pZQJYWCtxV9Rw7+VNugWocymlpV+1a7zLNw7M6Z5CKNsHCmWQoU7bgujGc4wH+O1VLuEy6vihVYnZzvfdHj7j+UP3frUIE1vo5L3zvcZQENQ/29e/9HJ3z5E6jsSTfaaL1P/E3cTTnCyBygQbqX6QmFQAGzBB2pPVwcMG6GhAKsTyac/uM28MUzoMIoyEFjtJKpthSLzuopkqkBJqw5WjJBaMamoau2GrEk4dldDeUHnQngYFigKxzYfJdozwQH1ze/JFSgtCHqXxNAQYCNSwoPUKLJFiaqDkjfwglHV2NPw6xaFFaUOkCkHhCEo24DH2YwsW+vESAx9Lowwh+WTOknP6H+uz3ULoM2kf/NmP8kOqyj0zMicSn7yF4/Zl+DiA2uilfLWTgiOB3t/Mpyhy07ubmnRotk6HORWgCP6W4+iNUpkvh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5109-08dc427535b1 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2024 09:17:16.0875 (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: 7U0UW4b/Js3HMeSsI5tNQQpyJP6vI8nKYV7Euo5EZRG2m2Lkd/1A2sw2VS7lJB/em8PVnwLkNLZP8zLhcGdAsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7876 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240312_021726_070977_8276E2D8 X-CRM114-Status: GOOD ( 10.54 ) 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 Changes in v7: - no changes Changes in v8: - remove if:else:if:else:if:else block --- .../bindings/usb/chipidea,usb2-imx.yaml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml b/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml index cdbb224e9f68..fb1c378dfe88 100644 --- a/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml +++ b/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml @@ -49,6 +49,12 @@ properties: - const: fsl,imx6ul-usb - const: fsl,imx27-usb + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + clocks: minItems: 1 maxItems: 3 @@ -144,6 +150,80 @@ allOf: - const: idle - const: active + # 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 + + # 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 + + # imx7d Soc need one clock + - if: + properties: + compatible: + items: + - const: fsl,imx7d-usb + - const: fsl,imx27-usb + then: + properties: + clocks: + maxItems: 1 + clock-names: + maxItems: 1 + + # other Soc need one clock + - if: + properties: + compatible: + contains: + enum: + - fsl,imx23-usb + - fsl,imx28-usb + - fsl,imx50-usb + - fsl,imx51-usb + - fsl,imx53-usb + - fsl,imx6q-usb + - fsl,imx6sl-usb + - fsl,imx6sx-usb + - fsl,imx6ul-usb + - fsl,imx8mm-usb + - fsl,imx8mn-usb + - fsl,vf610-usb + then: + properties: + clocks: + maxItems: 1 + clock-names: + maxItems: 1 + unevaluatedProperties: false examples: