From patchwork Thu Aug 4 18:49:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 595923 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5A7EC25B06 for ; Thu, 4 Aug 2022 18:50:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239968AbiHDSuZ (ORCPT ); Thu, 4 Aug 2022 14:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239742AbiHDSuY (ORCPT ); Thu, 4 Aug 2022 14:50:24 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60045.outbound.protection.outlook.com [40.107.6.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 622CE140AC; Thu, 4 Aug 2022 11:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J3Eu2hY1CQmS/3W1sFQWC6tIsjjspiTjkNogdEupgji5EWEtp3GdUwdx+z5cdubPDWz+sR7PDBK8Hj0lXFSNVRR8ver/x/02EdVk/Q/D1iGMv9aMYxZ7ipQuuVgkXdSHDBg97PGAYRxPn+9XcW0wevvC/8cZNuCpqcRa2T3OJOQVpPP28AS3tVJ97hwN5Bk103kGijtpF7J2wyc0xNPAVSZOy/aX+4A/X72tvHfvPFc2bZkeSL8t++eUWmjEldYxOQrD3hg2Ra6uAZwmiC4Q93/T1d7ZztJPJ7HrscABX34HKmF2fNHZwRu+6vniR7N39FJFlsU/gNLsy4kDBruTNA== 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=8m9ahOf+UEw5rIF5UfTdjyZuRFhKVV+ngALzJ0Ou6hs=; b=h7Afzl5rFaIjZ4mYckEGfKoHIcJENJD4BAt13znXZa/wBH/EPDQEsxNaJFxrmz1M2OBZgtxrNTwTBeceZUw8+36dbZrpj3Catyx5Y/kgFP9M5BU4cXTGNAPgSxXUOluAd7pvTpUPcwH+71cLFZ8EbHgnW3W5VNin23otytuBT4nUNPY78n3jXnhYd5UeZBxHeCv9YGIbCmCBWJVmggyccvVvJFKy2nR6LNhgO/NqKgJbl2OF11Ce1JdKiwR9lKwamu9itpjYe8j5onJNH+KeW/ZqtsSDN42wmOdBu0I+mtQHM57aB1o6mL+/5zkA6DgNXEaTqIkPWQkQVeDeBVI0+w== 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=8m9ahOf+UEw5rIF5UfTdjyZuRFhKVV+ngALzJ0Ou6hs=; b=YBUB+l15njP/h4ptaMSJef2682ZhGTUi4n/zfvTchHVPEXhVkQJj+xL+Nj5b6mW4jXHYZk+w+aG2BC+M+TB8xF5eC4ClVvdr34KPxvKtqLRb+7oRtwj+/QXeI/VIrcea1P3Ll2N1eBn4LFsD2F1DjfytJlCv0OY3Pfh8XJHyk1A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB8274.eurprd04.prod.outlook.com (2603:10a6:20b:3e8::23) by AM6PR04MB3992.eurprd04.prod.outlook.com (2603:10a6:209:50::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.16; Thu, 4 Aug 2022 18:50:18 +0000 Received: from AM9PR04MB8274.eurprd04.prod.outlook.com ([fe80::747c:397f:a003:dbca]) by AM9PR04MB8274.eurprd04.prod.outlook.com ([fe80::747c:397f:a003:dbca%5]) with mapi id 15.20.5504.015; Thu, 4 Aug 2022 18:50:17 +0000 From: Shenwei Wang To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, brgl@bgdev.pl, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Shenwei Wang Subject: [PATCH v1 0/3] Add IMX8 SCU GPIO support Date: Thu, 4 Aug 2022 13:49:05 -0500 Message-Id: <20220804184908.470216-1-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: BLAPR05CA0026.namprd05.prod.outlook.com (2603:10b6:208:335::8) To AM9PR04MB8274.eurprd04.prod.outlook.com (2603:10a6:20b:3e8::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b2375a47-7ac8-4cbe-6fb3-08da764a2cbc X-MS-TrafficTypeDiagnostic: AM6PR04MB3992:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QH3m0cJH0OXIjsjaJ2ftzCS4zuk/yvh2FO/VmlnyykLBLnSapD7FwyM+4W/bALh5tNKOOQGmGXPwgh1dvGbSTpoUN7WW+93hRhwio1sgJXmcc3veM9cj0PCucnvJjxAfUZD0jWiMK1MyNSfCxxJNtxsL0ilJouMaxpRom93KOsiie2/Rf5tAA5KKEWgJx9yCILNijr/0HniBwypZAnywfCCnhpR3O+xMmseb1VcC85ybNPjAD9JzTi0RmWkBrpJ2viuvM3BiaL943Ya/y5mnc27xMOGGFk2js81v9fArn2o9F+y8X3P/YFo2m/A7yfmWWhB1+wJGwGlu8BDq55tWo/EsIPWkBV6gtgJalY3tDiX7WumG+4vVLKjfMe4gfUzXI4gQ8xAugLvw9ewTPt/qSR9lF1fFyt9lTIUMU8EjN5g3CYPXiUqEHSDCwHVr+UjcQXYSFagcOWL4RxqMTN43oJ5UAgDBj0j8zcm/SR/cIbHGHJUaKki8Ybsq/mBlj310Bcu2jAwPr3rZmlyESy0eXdAT5EcRcbI1mxpU5+mREATVe+FMB/eRb3l1CiYLmGxneAl0nypWf0mcn8L+XxcS8AEn9/vS6bbh2YQgLdw+pkPBB2ZEVNKGJo7EYo1Ci80pqnSOGFNeQpYK+aAkL6tIJihmiKRmMlYpRA8D7h5cBaqu/6BU3nW+nXaEGDJ0taddbk8M3E4wA6UtkjwsYB5/JcpbSLiu2x/S0DTyiNOR6m+naOqtAf18DLB3YYxUbzNf20dUwV8SucCIfoNgUf29uzC90j3WqDYZkFZS0BgfFO4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR04MB8274.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(136003)(346002)(366004)(396003)(376002)(2906002)(6636002)(36756003)(4326008)(8676002)(66946007)(38100700002)(66556008)(8936002)(316002)(66476007)(6486002)(38350700002)(6666004)(86362001)(52116002)(478600001)(6506007)(55236004)(26005)(6512007)(41300700001)(7416002)(5660300002)(44832011)(4744005)(2616005)(186003)(1076003)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JA9GHAU9Be71mZfdkZX8eT1+304+q1ZsuuMC24cdP3CcMR3UgyDQa1Li4zs6xPV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NhoIAZTYOXAq6HULS1gAXcoSkG7d2m0N+D7SigV+nNWRWo4/287o2MklHhIhzz1zdxvcFJf5yMLFFYSKebNqIUHnbhQm5To6qYWZEgUg7lCvZLRvNdKfsuc1jxtiZuP4Ml7fipc0rGVrRMwwYTW7EGj4Afm3PJjCmCKvVyKmWYntYSR5H87yLPa5aZtwS3EH7WFX7Kpi0WzJd8OdxR7odHxZInYUgPKVmWWxzPBZ9xN2LAP8u5pwsrVOVw2Fq3LHnQUDB93dYXti0YrZYDVHQnHOnfmSkAjbAQ5MN6KR07dOAQ+aWwCRubBuuxr9hnTU6Ozp9PWNVBf/Mk+VGNsIbYO5BNOfnmrVoCiZd0bnNSrd9WsD8ByAkEI8Pm0PxIQ37IAWEPc98dbR8+Do5eNkw7RCuYd4NIvkJ9iC1WFNqj6Ecf6Sn6Ur5A+GXtP0CLH9W9V/0Hi3NqGucTl X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2375a47-7ac8-4cbe-6fb3-08da764a2cbc X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8274.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2022 18:50:17.7956 (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: AqP8YQKesZd1+MDcRxWVAT2DSSV8La2ekNBpUZtRzsCuU6kUTIwUxVhgcLbRi9U/o8PdFRK8kqk1earQjPBtKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB3992 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The system controller (SCU) is the central unit to manage the resources on i.MX8 platforms. The SCU firmware provides a set of APIs to access the GPIO PINs on the SCU domain. This patch series implements the standard GPIO driver over the SCU firmware APIs, so that the GPIOs on the SCU domain could be accessed like a local GPIO PINs. Shenwei Wang (3): dt-bindings: gpio: Add imx-scu gpio driver bindings dt-bindings: firmware: imx: Add imx-scu gpio node firmware: imx: add imx-scu GPIO driver .../devicetree/bindings/firmware/fsl,scu.yaml | 5 + .../bindings/gpio/fsl,imx8-scu-gpio.yaml | 39 +++++ drivers/firmware/imx/Kconfig | 6 + drivers/firmware/imx/Makefile | 1 + drivers/firmware/imx/imx-scu-gpio.c | 139 ++++++++++++++++++ 5 files changed, 190 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/fsl,imx8-scu-gpio.yaml create mode 100644 drivers/firmware/imx/imx-scu-gpio.c --- 2.25.1