From patchwork Fri Sep 13 08:29:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 828351 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2059.outbound.protection.outlook.com [40.107.21.59]) (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 462BF1D6DC1; Fri, 13 Sep 2024 08:30:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726216238; cv=fail; b=qdxyDLlA+LSJFxL7atBvr5p7YRI9tgMC+qdBWNtj8Pn/Kt29fU1rsUc55bKONTW8KtUEICwwB2vqwkfk+3auVvicsQqBqC+Yg0CMXg2HSz6honzgV07QstN2Nr+RD2sblsHHJlbduDWotx27GsJ4sZrS8PL2fSuiuelslhryTH0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726216238; c=relaxed/simple; bh=kSZbA7uMWBEeDulkjRznLbdriWTNsdm+9K6cjyHo6/o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=AtCC9KGAQmc9YRYdg1WMVvK+6BMj6JRRTaMtfJ6SlG1i41FOpt/KKWUSf3Z4WFyju1huWZ4Yy/5XZK7/zEuXgCWRwhHUxe+Atfxw7llySdqx/qRMONb1k6PhaeCVaRSl2MvomKddbI1RzXYfSBmDphqvPMC32voYyB6uIwTT31Q= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=ROGp2xCb; arc=fail smtp.client-ip=40.107.21.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="ROGp2xCb" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TKX/A4LddseDVyIVnRMjVII3dzLb8bz5LyB0mxVUvtdkZo8E7QDAM1nfaplagtEeEADW6/tdf4dpQOO0gesh5smZPxIRsrhRqcy0jxOq+svHWCiS+ck8BcduYBxRRrCBBxzHxBumM1RtiILOudsH6AnOVKQPoQ1Ux/Q76Xa6qrxd5OQHC09SM/hE0O9J8/iNP878B5ko6D7n8MShDcoBNi1zTgMfsUs+uDSBIw9oUk7BNetGgEEWekN4GAU5TnhocyHviDFDhS2aocoNaPZ2VWI7R5B708Lr3N4FfLJIdsgYvpvXUQLEjhGugnBFhkFK9erYcH+C9dWcyYg4DmSu4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=X5dDRoWfvkCG13zFwyXpkOObBGZ1HJIYXLS5QmuFios=; b=MC1TDIL4L8OtEtIL4Ugesd8G4/1D1kNM4OdBWHXGWCEfSEFg7sD+Geq3UoYaVPtSVgzZtFMLzSC38e9HcBx9k6ZjXXC3qZsKRL2ZAV45HD/0x8CASValn5TBHlpMZSCoaNWK/fV8BeIqFRjj4+U+6OuF0TFjSllNvtuhhRZ8/P2fmEJOZnoiMJSFwhNhjZnoxDkA1vvK6DzAk7KbJV49TgH2rK3ynBuryn9Xyn44KLQneRetpbjLlmnCxNC4n3vLpZEjTG+Za8ptH4AS3HrtuRC8l3aqB01SPWn5o3UP5DiGM2x+9p4vC6ZYAsPvhmaRmblkH3xBlg5f2ymqLjTyqA== 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=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X5dDRoWfvkCG13zFwyXpkOObBGZ1HJIYXLS5QmuFios=; b=ROGp2xCbva8ELc3yp85evt8Ekf5Cxm9KS6blJj2ojrCF3MFUCr1pSiA2DRcmv1IuVZXeYzogfiks0W6hCTE9NhV86G6I6zgkl5zGqNzNwyzHlnaGlxDGWMkCcSpHd/eSIvMwNVCrh+a4A7CPjX+QKE15w7XJOb4ChQb1N8nkYNdNIDvEjySqw0m2ZVFKl25KPTYa4TKc456OGoi2oOCd8kan5xnX1RWIj8SU7b4/bwJeGhRlICFzhP/fu4+xFKP+sohvPHX/LP1zje850whahW9vXx9fTrstOmZ1I3Kir7zWBljfcEHbmlPdCcY8ZkfWHuJYdaz8TaBFlHz6z3NtWA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) by AS8PR04MB8403.eurprd04.prod.outlook.com (2603:10a6:20b:3f7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Fri, 13 Sep 2024 08:30:32 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%5]) with mapi id 15.20.7962.018; Fri, 13 Sep 2024 08:30:32 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP S32 Linux Team , Andrei Stefanescu Subject: [PATCH v2 2/4] dt-bindings: gpio: add support for NXP S32G2/S32G3 SoCs Date: Fri, 13 Sep 2024 11:29:33 +0300 Message-ID: <20240913082937.444367-3-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> References: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0134.eurprd02.prod.outlook.com (2603:10a6:20b:28c::31) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) Precedence: bulk X-Mailing-List: linux-gpio@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: AM9PR04MB8487:EE_|AS8PR04MB8403:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c4466c5-0f8c-4d98-789c-08dcd3ce552a X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|7416014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?mV3c0pXIv91S1oHCYKVBVyr3vOZis+u?= =?utf-8?q?QaB2hN3lSIRceAjLdBTd8BSbetlQx345UGC6LDPHg8jU9lufZML8fjfZjXkwS52RL?= =?utf-8?q?SMO3NdvrQsGwdQ/awmae6N+Q2il+3MWJ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tkSVcynGtNdh4tc504LUfkvAD4c5VYf?= =?utf-8?q?zIrrcAvzyCgK6n3OnxUcq880DCDJBiAWqP8hLbHVDHD8R8YY0HUSQ3JKkfdrWS78w?= =?utf-8?q?bYFxYGhMwy9uTRnakFR/u6dVW+YNGw5/W8jTf5JFLADY9u5KBFcrfIC+LHWOJ/Lfp?= =?utf-8?q?7VJx9kZ4qpOjyOJUAo1zk3bsikEuTXyumcbe3hB4YmOGVHTVXC7rsOPNSq/w0HS9G?= =?utf-8?q?RLhp5Hco5kWdvli2hDUtkShxes1+4/unyc8Lx/oYzYKRrRiAj4Wnif7M26kOW/4ht?= =?utf-8?q?urq8SqlDUYKOQM8AVDGIpWJqUcez+AlOc0EEz2fWtdtprwa0zRGyC5h8=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR04MB8487.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(7416014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FhTH5Nm/ggq7oDEgP5JITViZjvbx?= =?utf-8?q?0i4gDr79afYdbATe/Z8PLNDu1k9iVbGKFnpp/atwPuwYWVWFqnbQ3JXgYmZNP7fLX?= =?utf-8?q?RY2vkwv5PkkLfBgsOqDtv66HJtx7IXeJYY+gZZosJffHhvEEimnP8CTBr/78TUDks?= =?utf-8?q?8Owsz9SH4S/pg3d39m5MO3bscuz3/uzQ1WKmUZPAiryqmoL6N+5RLJj96M7MDnfiM?= =?utf-8?q?l2cPZ9UIl1CqB+ouvBjG0/+pCVduYMM8MljU3LotgTybq5DEZgHDJBbq1nAFGerxQ?= =?utf-8?q?j1QakTHlid9XWsXSmygb9CVDa7XhB0Pd0TTcy6pZmK4z65VIT3q2GBLQzZQ0eqdbi?= =?utf-8?q?I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Or2hMKD+zrsSSg1sqV8dRUzEc0nPjVHyqsbrd0TQYpXl0k1vp?= =?utf-8?q?sX7GunLP8X24MaJReUkhnMjsj+a70BhMqE9QL8zpL8cCTMCAwP9/wnrxEKGMqSUZ0?= =?utf-8?q?UGcaekXEeq0Zn+IsbG7WMtlGQnokU9n8JcqPdB1xhXwG9UyfgXkcpGWoZjT8SjuX9?= =?utf-8?q?kpDtD4AoT4poJYeHXeiJ1FD/oE3rRwVxjk0dt2F+ZjIRUzGmPTpXr9ubZtwrauBIE?= =?utf-8?q?6aJIsad7YQYPrOEWpzPm96ekL1KBBcrokw8LhTJ69v67Lklls51vZh+lrZlCmAsmD?= =?utf-8?q?LEQdCTx6fYYAI0Q42lh0DBxlwujqI6sGcQ=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c4466c5-0f8c-4d98-789c-08dcd3ce552a X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2024 08:30:32.6834 (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: zCkoLu3OvC4vq9agKAjPVvwmSbrQLm4IdCw+oWMfFVkhlk6UFnCqqn3UUNjHr3sZ6KfL908nyJ0DYsS6lz1b7u0RJEtRMXVZ7Fuo5wfghXQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8403 Add support for the GPIO driver of the NXP S32G2/S32G3 SoCs. Signed-off-by: Phu Luu An Signed-off-by: Larisa Grigore Signed-off-by: Ghennadi Procopciuc Signed-off-by: Andrei Stefanescu --- .../bindings/gpio/nxp,s32g2-siul2-gpio.yaml | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml diff --git a/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml b/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml new file mode 100644 index 000000000000..8be8eb3a971d --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml @@ -0,0 +1,106 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +# Copyright 2024 NXP +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/nxp,gpio-siul2-s32g2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP S32G2 SIUL2 GPIO controller + +maintainers: + - Ghennadi Procopciuc + - Larisa Grigore + - Andrei Stefanescu + +description: + Support for the SIUL2 GPIOs found on the S32G2 and S32G3 + chips. It includes an IRQ controller for all pins which have + an EIRQ associated. + +properties: + compatible: + items: + - const: nxp,s32g2-siul2-gpio + + reg: + items: + - description: PGPDO (output value) registers for SIUL2_0 + - description: PGPDO (output value) registers for SIUL2_1 + - description: PGPDI (input value) registers for SIUL2_0 + - description: PGPDI (input value) registers for SIUL2_1 + - description: EIRQ (interrupt) configuration registers from SIUL2_1 + - description: EIRQ IMCR registers for interrupt muxing between pads + + reg-names: + items: + - const: opads0 + - const: opads1 + - const: ipads0 + - const: ipads1 + - const: eirqs + - const: eirq-imcrs + + gpio-controller: true + + '#gpio-cells': + const: 2 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + gpio-ranges: + minItems: 2 + + gpio-reserved-ranges: + minItems: 2 + +patternProperties: + "-hog(-[0-9]+)?$": + required: + - gpio-hog + +required: + - compatible + - reg + - reg-names + - gpio-controller + - "#gpio-cells" + - gpio-ranges + - gpio-reserved-ranges + - interrupts + - interrupt-controller + - "#interrupt-cells" + +additionalProperties: false + +examples: + - | + #include + #include + + gpio: siul2-gpio@4009d700 { + compatible = "nxp,s32g2-siul2-gpio"; + reg = <0x4009d700 0x10>, + <0x44011700 0x18>, + <0x4009d740 0x10>, + <0x44011740 0x18>, + <0x44010010 0xb4>, + <0x44011078 0x80>; + reg-names = "opads0", "opads1", "ipads0", + "ipads1", "eirqs", "eirq-imcrs"; + gpio-controller; + #gpio-cells = <2>; + /* GPIO 0-101 */ + gpio-ranges = <&pinctrl 0 0 102>, + /* GPIO 112-190 */ + <&pinctrl 112 112 79>; + gpio-reserved-ranges = <102 10>, <123 21>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <2>; + };