From patchwork Wed Feb 28 11:29: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: 13575279 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 3F298C5478C for ; Wed, 28 Feb 2024 11:34:04 +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=Wa5mnoXSMqCe3Xp4paIVr00AQSedj1If152dfdM6do0=; b=MPmv/OPIdMBiv8 tkWgu2fx6d+WQcT7MNTYDSZoKlpV/uWCu0/BFvIiqHJCYFGNUxvQg+7jKQQgjpetgD0hVe2Sqi9Hi dWEDF1BkOAPuzhI764g/0CGJAdJ3yq+QwZDRBzX9UKBU+K8+3UQmCuLczkZNnY3l/DzEnRO3cOM/W 8fsdb87CkGg9d9gpcymgbqfPtO7HZ7gbsOEY6z1gVrbNxS6hiDzpyV+pXO+YDiCdZgXP+l4iqWNsV ozEc+yhTdbbJ4p7p87wFPFPBUGMheN4vSJWHGmDgF4VPQJw2ROLEjsxXgVjhBbhunaZr5sIMiTkkB mg09IpkG/rnTs5DiXxNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfIC5-0000000919j-03bU; Wed, 28 Feb 2024 11:33:49 +0000 Received: from mail-ve1eur01on0626.outbound.protection.outlook.com ([2a01:111:f400:fe1f::626] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfI92-00000008zfn-098n for linux-arm-kernel@lists.infradead.org; Wed, 28 Feb 2024 11:30:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AsjVfCgLUEU9K83ynuCBK/9o0kXQs6TKIZVzuNNnxOKQgp7MhMo9DQVOMFIWeUrEqWJLgHMzpR6PHECj5nJ0QuG00kj0VAHvy2AswJinmI78eJFSt7U7sOIn8eglK76CRo2HrdpB9nSD5+h7LkVW8p40NRQnTdoW9ECAatZNdzv8sm4yrG18qXXzo014HkbN9EuPZgHLIdHEYkiAZo++WZrsISAnlsxngF/wYml2ydy20ZPvfbdRyhgirRXkxBqpHD5qpI0on3YTi0tDvnR7epZn1aPNcTcUTpy3rMBZYYxIeG6kYu0Fq99vkdqQDkVow177oXpvCASsjnmA+eGyMw== 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=sxYc5zCmVVzdem2J6287e7PIDGHcqtlIg6NDNRpbl4o=; b=mLdeAz0TwZJCKoG6LukjnPcITS5jPvCI6GpwYVm3QqyrUe3PYg6OOcMI4HDpE4oHJJjJ6dFN0G1FaPgr03hmGlLZAnLtbfVdaas+piC9aLnFLuQ2agVg62GAK/lEzw0GcfFx6yp9HjBVNF+mpwQhxq+3H1BxPuVjIZ7tDZkcA1nnSSUvjyHrdqlCkXz7jP1zI++utrCgrG7PxT54Bx4YgnfseFCG02DLtOxlJ00zmFVSSeAVkNmnL0C/Vc3aeP/PmVdwlMhwF4CZwTCB7cuBJx+tScfeZcmJUDknaOEvGDIpfs7V90XjMkthRquToL359AV8u3a+4VkpAa7O+eLpMQ== 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=sxYc5zCmVVzdem2J6287e7PIDGHcqtlIg6NDNRpbl4o=; b=evjudKE3otwjlQhtZLm9YeVtruD8G5/d4+VFtm83YxwKXXw8zHBfbs/1BAAMxfbjbTjtck/3yjtoaM9Yan16Vtrv0sEi6ui2YuQoqjYadnh2l/sNbjE4VAKV0sICzkr/Ov7BKW2hE+tafNbgvHZOn+uITfj/X9LYtdHJFWD3mGQ= 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 AS8PR04MB8466.eurprd04.prod.outlook.com (2603:10a6:20b:349::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.39; Wed, 28 Feb 2024 11:30:24 +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.7316.034; Wed, 28 Feb 2024 11:30:24 +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 v7 05/11] dt-bindings: usb: ci-hdrc-usb2-imx: add restrictions for reg, interrupts, clock and clock-names properties Date: Wed, 28 Feb 2024 19:29:58 +0800 Message-Id: <20240228113004.918205-5-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240228113004.918205-1-xu.yang_2@nxp.com> References: <20240228113004.918205-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SG2PR06CA0185.apcprd06.prod.outlook.com (2603:1096:4:1::17) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AS8PR04MB8466:EE_ X-MS-Office365-Filtering-Correlation-Id: 043d5f47-04ad-4bc5-cb0c-08dc3850a7d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RP/Z0ksTqiZJg23rxm9Z1IdHEMRbWMoig2mcsYDVkl1J4napLfhDtrN9pYMhd87TvkSaoBmwi/YywJRg3zZCi+3+SnPTq4gR6yE7PTxW1mUsQ9MicCzHCNdMEL9IpAhTrw3xqf8NItDnRVBM9xGBVrZEs9xDfc+y7V4j5X9XNBdmxBu5cT+iXHlOdTne7Oa4HbsC7u/MHO5JZNIj5c/yl7/BnAO8VxL3YYakCRxvyMsyB+PC7fAaHsBLVe1pW7lYyJBG0XhhDXq4SyFkTms9ILYynXWKtRh0+vG1yg7cVi7oQPrncsbLXW+ntssgH/AvsTjIZU2X6jplEO63ZP0t47a5rWOrxV8HurvcdYCbjUklTZ4O4mmkJJ5/en/gSp3QIMLiibdy1ZIoxsaTQ8YzG0nY6F4d7ZS6uDXpboZCcbS8mskacfcBWBbS9RKp2sjABo45kS0zt/g1/j1xJ70fS1Urz8onf4w33/IwVy0uEcJGeq2pBBz2GzoCLM5U99p2WUTLKHutWtyvzj04al/uMQELcLmUg0defkP0uMbPYAaUf4xYgMGEtlT0RLpJZkJvhEM6fAEt7fP6DaP6PkjRHWf2AEI7g1sNg/C7VNcRQTfZQeb2CGpQJTrQ/LW0Wh+09gaG3pcV0Y9NZubxTWSD6Wplz6GSXCtMfwt1vRzGGWUKY9K9VNq7tWaG+kdC7y+g2Cee390mbEVTdOVw7lTY4JlOHaUx/C0ngPFSZmupKqo= 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: /kXwmRjtBc513pLDPfqqpqt1IlLIGkqGra8u6dgOmUY1P+IJBY1feFidFZ8ovKXJTAoWTYr9LYZS/FPY+jZf2V/XLtU+0gC9YBFWTI7DR3kTljffRtM5a5OeNG+78kwLCNwZTHXAQjec5rjrUT85M1CN/jt2+vSFVu5/4m2BowotV3AeXBgh8K/wKzjo7ZfD1XW19E4nNm5zbTl8LFg8EBHx+FKyRmPRgme0M6ylMa3DaFMWQlvlXvIj9vbShs9hm+DLtC78gCGIRzsziNS5uIz8qBVlUHOjKhcQF9ozNVlg5mYPHVC16lMrFlQCyJR6oMN6cDI/+wyvPN/1wwpWysyMaGHrsFfSP9JF9ARzMnEK+Itz+vtSDVx2VRF8qU8eq4/rLPTpYFV7zXSqcr9T++RsJQpS8cgakP0SVaWxyHiiz6JkWYnn07e/PWvn64N67u9VT9zBD/65X3ZfJtvQyFHqzgMdjW9x0DKfWHbWSM5qMhbCqI388ht1Ve+zGd39cpWz5bKpzLYN/MDnlyE68oVFaQpirwsUugdESaSyB/D4CvCJ/j6cD8A7/porBZ6P9aTAKQnqPkUBdemDCDiv7Ixvk0Q0R14lbAPxykSZ97CVOKuIzkvhw9rqs19a66wj/Tdmobss63n7ydBufi6ZYA6MfJKplW0aNqNPwlACVe+tj1Iiy9ke629U5XgP+OzqQl+J7foexexpG8ISEysh+9AvWfNeoijk3MAA4hG2pvkic4R3nvNHfr+vf8k0US5QzXUO3QvZoSCsZ8TWBVziArVufRDukGvNL6KoEHU0ZVbVq8zAUI5m41QwiHRu5XQHZYJoCthGMIAGrmvaLIkYKqmI3e+WqYwRZZglFrddnL4lRvjKw4fEn52jmgmackDPVuN0pNwia/EcKauI2pkvipwUXBI/Hd6DxBDVI9wIRyCLTzKnr2GHvcH95+2Cpf0ZhLO+Yg01kFVBA+XthEyA5CyvloWPQxWWlN0Ais8Tmd51RfSnI5xBQRdX737+OWbpzBGuoAchHaswOqZajP2ewzenBWQV+yRNfY26m7X9oVM1m04yuRI+byA1HrXaRTfbERaSok0H5YluGM2kQDhs8fBomDPZ0iq7GB27IbI/f14IJttUrJEEzYJDKwJPett6SRqx9I4kb6gHSootdq4uHnHufL5RGOr0kFtpZoUsxbatkn6u00VSR83D0ZVB2dumfdwcHGu6RnGcSc7RACNIaN3bEB0PRFmk82hi72vxxqi1PJNSIW5F7btQJBmmq1B/F2GaSPdxgkzDS03cprQn3vqPabsTnwZiFAgwiCYkdjUo3JEJdhB7N/65uJOKpr0p3eF/bqyi6/nzgMoYa+gK3U4ecv1XL5hZTvW6jkX3WYApOLxdVSX8QNrutV+/i4e2F18w0snzPl5C8ESVqtfvgtU3X5otFBjo6ixJAPvuOo/08NA3YDhMBIkzHLWW2PjmTmjt9F6MDnLgEv+TMi7rMDpDpEkIjooHagyT7zoV7aNs3393HHDw8Dbdu9T5GR3DOSakeTHRdWFWTL36uI/hspem8ztiJz8yoFCDiA4s9/DwTeTshukqtpEwalxj0M8X X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 043d5f47-04ad-4bc5-cb0c-08dc3850a7d9 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2024 11:30:24.6026 (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: NGxslKlfEXg+qUeJCxUjnyDy1FMnJyN1jhKkvWOUw+x+5MuuRrSRQOUULvaTLEXz13JMyufF7yqo7e9nKIhN5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8466 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240228_033040_257342_E378DF5A X-CRM114-Status: GOOD ( 10.45 ) 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 --- .../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 50494ce06d07..a4730a2393e6 100644 --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-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 @@ -145,8 +151,54 @@ 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 + 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