From patchwork Tue Sep 26 03:33:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 726552 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34FAE7F for ; Tue, 26 Sep 2023 03:28:59 +0000 (UTC) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2040.outbound.protection.outlook.com [40.107.6.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C496D9; Mon, 25 Sep 2023 20:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OHsBYBPXnYOqeFAxHg3Plztory2FpikWip+pi6Gx1d3qbXu52eGsmXZJp02Rz4WG1U7yHiKF50j4y8C7wvXc0Ovrh+c3t+QQx8vn3kXr8DXWS5W3m4nXqoLd0wfBX1UWuixomukcq86vh+rZXCADkV0NYryFdYxSrWMDmDKeQd0X7tcM7lYOLX6RWRQ6TUhHGntt55VcJeYs44VmSVjc5Hq/H8s6WOzKYT0x6hqj1QiqWmc8yHUch4yjMyPCW1efiOXLfQ0uleIC7xKmqpxKFY6id7yfAuOUaJl5l6fFu1Oml2+aXbDtAOaQlzThwj/CTRe2jBdBbmt0shXruRNUIQ== 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=iooyrluRxDVjQuFNC/Tj7Kvrta68Xomy5qNtRjr9KAM=; b=b18VWQZTIJ6Y9a3lBCxPk14ylIZlwRWVZ3uBGkQXHlclciqSXWkyLMQ0pybIxrnc2nMORX4SvQdiVl+nmHy9h1ThF4t27whdwUiJrOYeXfvIZhwj9a3EtyXGpgLYr1knsRDbU5HPzaKUmdjjisGhEdEN61pdBQdBk+HIg6VcdNGTpQzfptUBC2rca0YSeiYAn5h30cKrwowooj34DnacE7D+FKakpuId66mGGA+A9+0OITHNDZbvFM1Hhf7S5vk9FAr6AwVoy1CgA9HDixIhH2bcX32aT9DjN0U79+2TeUfmIXyVwtkvthuEKmB0HKo8Cn2TJxRS0tLwaR8p7i8h4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iooyrluRxDVjQuFNC/Tj7Kvrta68Xomy5qNtRjr9KAM=; b=lFxzayxUttsPuvkNOq6mSgLXcT6AwQaLCAFCJ5smMh6LYf+/1tAMca+D0Ir+uZzeDQjEzV/SYxtgxyAiX3SOcqt2cEWxpBvezDb0RUT33IfBNKjV7wJfnwq7NjpEm/1kpjc7HuWvp0pZocrSu+7CIGFAjcyuWj1u5x3iVVWuwks= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AS8PR04MB8436.eurprd04.prod.outlook.com (2603:10a6:20b:347::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Tue, 26 Sep 2023 03:28:54 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b%3]) with mapi id 15.20.6813.027; Tue, 26 Sep 2023 03:28:54 +0000 From: "Peng Fan (OSS)" Date: Tue, 26 Sep 2023 11:33:18 +0800 Subject: [PATCH v4 2/7] dt-bindings: gpio: vf610: correct i.MX8ULP and i.MX93 Message-Id: <20230926-vf610-gpio-v4-2-b57b7f6e8368@nxp.com> References: <20230926-vf610-gpio-v4-0-b57b7f6e8368@nxp.com> In-Reply-To: <20230926-vf610-gpio-v4-0-b57b7f6e8368@nxp.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stefan Agner , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Marco Felsch Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1695699209; l=2533; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=NcuQgKZ9VjEAm4CbrSNdX7G24Z9K7oP6QDSwjwWVyeg=; b=Ji+O/diOm9uZpTiC3m2J6yzCTfJ9UyLRfrZCQxqY1v5BLuebn2IoDATJVK9y1cK6OCVOfNkcN blhwkiypM7FC2C/ODnc3DeRZ/mSGfdsUlzgiPtQsCFosI0UXoM2XtTO X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:54::18) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AS8PR04MB8436:EE_ X-MS-Office365-Filtering-Correlation-Id: 17ac91f5-460c-4ee4-08bb-08dbbe40b62c X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Wu1HKJZ7PGG3V9HuB9vgYd/HLULWP5zzcWa7gKHlVPPYyyF5Nc1ac0TfsHzRi8RmsxYzrIK3gZOv5o9lTqkt2e5cJW11hD6toR5+msEXhGa8gbePNyhlYKcuZtT1AIJ59o74KUHT5F1t/T49OfvGsMofaIIdgWCyUHjSx6UhzkQ9IDGNoYIoeYH52YtJFmFbwST23jAg7twm1tfX3f8ef5pojGc7lB6i5KckPKodamLR32jrpp4XY4/m3T9vC7/GQGcJtQZvkqaFNf+cg7kOlxUnmoF/jH23JZK2g4ZnWBRraXuTbSBEc400P3ICTETWarZQlFqbnsbhELHtoTjAI6cpcANSUmtAhg7RaF3PZWKfUnUZcH49UdJeNDVNBHMjuWlSZBY4VJR9n7z6Q5/A/KTUtDSm2zuMv5NPPKN1QFkbtZ4l9YjePHUEblp3EBagr3KSuDRvLbcbNkfPZXkftPYnLbCUGSlNGP/tJxSy9IvloVP7EKJndpwKWG2Uq6TGXsrs/saSwmB/Rs7D2LAqF1SDsUPlTeihBJBUg1J3Cztvzi5Q8aD+t7TJi4yQK1K5BFl+3IyNpWSv3QLeMBE6HAW++1O9lNZGkBKD+4wZ+KZ5rk8Pr1LxGKAJb4lVs9nPlJRt5crXYllJAbXLmDF5bQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(136003)(39860400002)(376002)(366004)(346002)(230922051799003)(1800799009)(451199024)(186009)(41300700001)(8936002)(4326008)(8676002)(7416002)(66476007)(66946007)(66556008)(316002)(26005)(110136005)(86362001)(2906002)(921005)(6486002)(478600001)(38350700002)(83380400001)(36756003)(52116002)(38100700002)(6666004)(6512007)(9686003)(5660300002)(6506007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?n+u/Ao5G4QMhESwH2jM35yxG2zld?= =?utf-8?q?bj02BX9sRun7z/QMe033C4pZ0dcKb0wIF6fiw/AUG5PwSMdRvGhtQ4DKNHtV0quo1?= =?utf-8?q?byr2zu0/Y7JW1cW5tizB/7aRntZ0l3GAoCbj9NVToQoSfIzKRTavLsIeaqvr6UGNN?= =?utf-8?q?Nv1EgF1zVs/+HhnCSjBsnGB8FQLvLFt6q+z93OzC+wjbAWWLbTToQwsoP0zDxp3yF?= =?utf-8?q?6WuByIGd4ophxt60Ke2c5UhJHppFVF2EgkpDgWERCBpigvdxPVi0rkRBbwdgepGEy?= =?utf-8?q?VDfrpjK1Ut0q7GXSY3vIrfhT3YArCReqBcDnIwD2LmLt9OJCfSdup6ABek4j51VTA?= =?utf-8?q?EO4gT/57YeZEqKn4HhvshmjdMw+a16ei5uHxYjIweZsm7j7SEIQI4rFEGe+22ffQL?= =?utf-8?q?+DAE+9vblALE5pLM4FCOQByzjl75XS5MfrPC6/hFkl6DH9qJ4ms4J2klyH1xIijYg?= =?utf-8?q?B63MPuqZs1nXLZl99ILsmCp9KAKTGo5541rjwxc2mRfkni02pL4w4xnCZOFqHK0OO?= =?utf-8?q?nShSgBeWdHjSl285ERL6CTt+vs2o01T/Kn8E/0BmFuCM4u9vQ/4m0+bb8PWCZYWSG?= =?utf-8?q?rCI7Nj2H6EIZ8KphFYTCUh9Nc6RSblzzZbMARVfHO/9QUMAUAXwencsyy31/brTor?= =?utf-8?q?MnP925hHNJ7lPF+WyTh5BM/Qs/LO0yXnKlYGpo9P6vlJV/FgAPFo7fDRNB9ikve9C?= =?utf-8?q?rU6aCagZdhZ9JqyCg1r4ZnDPeh72ERJatn1EWv0SBSiA93M/96PBkTVpof1LuUi7n?= =?utf-8?q?hlcVc+YjBFGfGzykKq3KbylH4R6Yo7CE9icgli9E21mkPwjPAFQ+OKttZsjjPB+vj?= =?utf-8?q?7sdOXESwMn6kHD66A/IU63y2EOEEnqQGbIG1DGJ/1wGctSl+sjtE7BAAflLluDm8Q?= =?utf-8?q?zO1z7k3S/yH5ADDy8uv7aHtG6VIzHstyVOTDgdl+dkwUB3Tub4NYX12u6cUH+9iLT?= =?utf-8?q?AwW+OLSOO+e/RZMKr5mWEoFktsivUThbI4SsH2QEnes5FujR0OtRpRGZE61MdGttk?= =?utf-8?q?rupVXipl9SRLwMriiSEJx8NmhFJvBQS3Ysow1Ik4yonGxn9UT5tiCB5p83UMyiSoO?= =?utf-8?q?UBOEkU+v1TTGxwBT0vz9i3POAsfPNw/nrMSVaLPO01Eedb+nGTpkx3VeT5cNxOtns?= =?utf-8?q?L3cSR2784VXIoxXAYtd3HkrSffO+bDeQP/qreE8w9gUvK6YZDvsMdPBiqdgPgVEu6?= =?utf-8?q?Qx9UvDgkEFOhnnLV28t8qZrhAuShzslHiiasPfKzuyAcXqu9DzAUXcfQjgM1AYghS?= =?utf-8?q?sY0b/nxjGMARYrQnO8iVBJvvtt3916uvpVMvKR/Y0Gw8X4vQoosft+rxufR6zqWxT?= =?utf-8?q?QITUxcFwaDfVJ1/zO+ekriCEAw5B7n2/mcQH1RbMnae9GSHx2dhIZEHKwhr3+qqBB?= =?utf-8?q?FoULezb+2cFuSmCpQfy1qfO7gr5vOC00K8OeYXRsx3fsW7UP+uVMb9r3jlvNNvXVH?= =?utf-8?q?Q+7f/eu3GrzVUo94PnY8/t5aM1J0m6kdg1P+paHYQ8gWy9rDh3NKgd1KfBOAL6dpX?= =?utf-8?q?A3RPU24yLVCP?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17ac91f5-460c-4ee4-08bb-08dbbe40b62c X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2023 03:28:54.7608 (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: SFsSW7nXnMLh10SlFszvmMakPhaiivpusgNqlXHPDwsZMjMRyMY9LYBZ1ob3KAnY4nGQI58HIer49F5RYDgr4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8436 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Peng Fan i.MX8ULP and i.MX93 actually has two interrupts for each gpio controller, one for Trustzone non-secure world, one for secure world. And they has one register based, not two as i.MX7ULP or VF610. Although the Linux Kernel driver gpio-vf610.c could work with fsl,imx7ulp-gpio compatible, it is based on some tricks did in device tree with some offset added to base address. So actually i.MX8ULP/i.MX93 is not compatible with i.MX7ULP. Last, i.MX93 is directly derived from i.MX8ULP, so make i.MX93 GPIO compatible with i.MX8ULP Signed-off-by: Peng Fan Reviewed-by: Rob Herring --- .../devicetree/bindings/gpio/gpio-vf610.yaml | 36 +++++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml index 59427d97adf5..21199bf221ef 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml +++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml @@ -20,6 +20,7 @@ description: | properties: compatible: oneOf: + - const: fsl,imx8ulp-gpio - const: fsl,vf610-gpio - items: - const: fsl,imx7ulp-gpio @@ -27,16 +28,17 @@ properties: - items: - enum: - fsl,imx93-gpio - - fsl,imx8ulp-gpio - - const: fsl,imx7ulp-gpio + - const: fsl,imx8ulp-gpio reg: - description: The first reg tuple represents the PORT module, the second tuple - represents the GPIO module. + minItems: 1 maxItems: 2 interrupts: - maxItems: 1 + items: + - description: GPIO Trustzone non-secure interrupt number + - description: GPIO Trustzone secure interrupt number + minItems: 1 interrupt-controller: true @@ -78,6 +80,30 @@ required: - "#gpio-cells" - gpio-controller +allOf: + - if: + properties: + compatible: + contains: + enum: + - fsl,vf610-gpio + - fsl,imx7ulp-gpio + then: + properties: + interrupts: + maxItems: 1 + reg: + items: + - description: PORT register base address + - description: GPIO register base address + else: + properties: + interrupts: + minItems: 2 + reg: + items: + - description: GPIO register base address + additionalProperties: false examples: