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: 12936611 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 9737EC19F2A for ; Thu, 4 Aug 2022 18:51:43 +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: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:In-Reply-To:References: List-Owner; bh=FS/4PF2J8WxmFh2UrFHgkZt6yD3wz5stVPp6yA41r8g=; b=PKEpqMKyRhSSkv FMdblY9M7EhK3XZJ6c6XDAhvCZ2UPXvVSRS4u48LO1zrDxpHsPNbr4ZOjuoQLpY4nrUpfnyW6z4ii pWFqBtDD5xqG5HJwiroJhi7+Cj4LQMbrwWh+AcEwUd5MWhdfADDWrlLOL9ALHi0e77hYSOUgtrUCL VBfUs7egZHWFg8ozxiyHbFiAPdW+51/6jq6npmRpfECzZKH30/IVowpzOFy4HiPYzdULiMynFIYTj mbrkpsLUa+xkJOEomaknX7/TK2KJhus1lbCI/PeVZcaicnS3Mut7IURXhYl3GFpjzfiUjN7r0kQQL kxpKrlPwdPQbfY6Z1DQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJfva-008LNM-3v; Thu, 04 Aug 2022 18:50:38 +0000 Received: from mail-eopbgr60040.outbound.protection.outlook.com ([40.107.6.40] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJfvO-008LFD-Ny for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2022 18:50:27 +0000 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+q1ZsuuMC24cdP3CcMR3UgyDQa1Li4zs6xPVaatq8pULlKzGhplHKLEWzU5PSPbkjhFTBLGMM1JrJZzStMY6NYvt3QNV27UqtbZvHrTG2IaMnpG0G2r69ArKR8Uq0ND9OW1ctuBad9SWhJ5i/a4wkcmsx6Mfrwa+jhR8hPZLP4msLf/fMNq6mWsu1e/dMMpgF+jxIJzeGRS18N14ua4AJA8mwrOdytpKN4XXGlMQvXCFLbR2/Au9YmSJv/oW30yWrmFSGxJslgsa5fYiwSyGVzZzu8a2BLFt0yZnvDdiorDKMNCaVzg3kDOJ1hypdn5Jw99ctT1zf2HzPvYaigNQCCExnv1lG22pRmRPTQNpLje9NWMhJDbbO+2XNsCH3467H4UdadhqIv8wUIxSRYYR7U4nts+qNmikUok8oUT3Ea+Ii/Xj0Fk3qYscHmKAIA/QGK1d4cb+LH93JKkJw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9iC1WFNqj6Ecf6Sn6Ur5A+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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220804_115026_803046_65BAD6A8 X-CRM114-Status: GOOD ( 12.05 ) 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 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