From patchwork Wed Aug 10 13:30:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 12940585 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 0AE04C00140 for ; Wed, 10 Aug 2022 13:32:50 +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=MJOpJwbJsprdnZPThjHoPM6SyVxZmVaHv5taK+boFVU=; b=hXp5bF3PvSc93M KqKzFyVANbhT/ocoEhovURxzT0s79VeKfRU7phiSMEoRPWEm6vC1PBbwIQVXJQsN/CwSr2D3CM1BE j9KCJ9Pc/erOP8p0Vn9902fz/uFLFR7nnZiaoEiMZ1FdfJUyvdUHOsoABgx2DSs3Xvyi8eCzvqxa+ joe66jln3IYMSH1yQW2S00P/F/XXsyybHGNOK6WnVeQai6Xt7lW0yo7oEiISRl9vXv2Ph4X9BJj/+ f0nvPOj+e5MhUKlPVT1gT8iXpdWKMo3freFWI9T05GoEUq4LN/opsd5kLoCFExFe3uDIrIKh3blDv 6KcYgxTB7O4LN6ZVCJ1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLlnv-00C1b5-MA; Wed, 10 Aug 2022 13:31:23 +0000 Received: from mail-vi1eur05on2064.outbound.protection.outlook.com ([40.107.21.64] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLlns-00C1Zt-KC for linux-arm-kernel@lists.infradead.org; Wed, 10 Aug 2022 13:31:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=La4YIqECGOQYxIqRZV5OGBC39pdJ6MHwsW9cSVEqg5vrxx37odsHLf6NKX1r0/+w6y1syG/J87wmL1TQqQWCJPyUM17qAabTlO2empBWYIZV0XtQDNUy6G7ZmOWIDenBmO9cs2nt14sDaa3oz6vTMMmQUZ5s7hdH2fy1Tni4SHucXnt0SvokNVtPfpjAl6OOEYdeXkyoYm/YeDAvaSgmruvXQQryVeWzdDTfzPpZgfm1a+CJ3lVRbJHhHkWma81XfwQrAXZcCQxBQ6OpCCpTVcY23jmJ8y3ZFzVAavEycts4t4+UGVVzykeyKTwD0QSWP1Mc3PWXdI89KZdxINl3ng== 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=wPoNUUAWJwTQLHmukrcMAojyPelPwaeHF8g7mbBRW8Q=; b=mXq5eCbEiJ2UlH1gcI9d5e719kmVyuHkEceY4gGf2rZ7zmw2LLcgP9dTZ+PhmJZ9SYrmqZfRiJtOs762VkkwK1I8DK0/Wa+svMLTuXRK9DHCHq304PvrkjFJQ0RvcW1zL/om5gBX0qb771nCWUDFmKC23EW5J9loyMsVXyNja60kECmUifPh1xh+g4HZ2UOG+O6vkEGxMIIrVqcvctQ5IssuR3imlAS2FKbvsN72xLtoDzVT8Y4GHZEG2sshID5+9BeJOh6fv8L5P7S3U8q5YyCD5BlY/2taiKcuZnP6PicGqiCUDNU2CK4R1tjW4FzPFe875eFuaxmoJ0QDntm1Sw== 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=wPoNUUAWJwTQLHmukrcMAojyPelPwaeHF8g7mbBRW8Q=; b=Vv4fZ8YuIeQ7i6UHZgJ28F2rTCVdAAC1FToTvi1OS9IDuUH3D5aslrizDMEcyOv+rzVtGZofh1jo45qVleyOYDcGEXSHGfLInkr3CRdM+v2V6MjbFJSDRMb2pstn3b+QKY5wKlgVgiTv3cdBqdLCZg/Ec2R/sygWeuI+RHsPARQ= 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 AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.17; Wed, 10 Aug 2022 13:31:16 +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.5525.010; Wed, 10 Aug 2022 13:31:16 +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, imx@lists.linux.dev, Shenwei Wang Subject: [PATCH v3 0/3] Add IMX8 SCU GPIO support Date: Wed, 10 Aug 2022 08:30:02 -0500 Message-Id: <20220810133005.74653-1-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SJ0PR03CA0355.namprd03.prod.outlook.com (2603:10b6:a03:39c::30) 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: 483b6735-8893-4eeb-383a-08da7ad499dd X-MS-TrafficTypeDiagnostic: AM6PR04MB6630:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ko4JPPFuvszkFdI7nDPa5jZT1S3JNmA+07EP6D9sPAFc4bD6ZITzu9MuU+Zp/kYRmMFfKX7vf8WMpgBD86iYP3fciDjjM2RqqeZDIBCrrLriDUBtxaqBdzmWmerIVsoEKR/xYD+5SNESzJujW0Vwqzt9QXykdSpgPI3sDKWbvNteGqQf4fjU6aTpzUWRnglSFY2q/YOa503e581q7TJmTl1FpwHV3WUcR/9hkblD5ak3Ceuro2L3akCP8r/P/YNUpaJDV4AUaEBLWMM/K5V26THwRyDgH1ObfxtLg2mEr2IlX/9ur5BBg8Ah0Qmj9MxIs2e/PenJbGFtseXwJOt4HMSgs5Bl34s5TsQVzm4kvyZw5ljy4gZ15pycreq5ITp0nPLvbdq/qe4Cv6z/G+856XI1QKHr3dIzaHQ1Q+xcT7PxDeGAQ+1b5maAEjG8ZwQgJ0/3zlFCjDezbpimTFsyakVyDE2/EmlfOep833CLB36WI2PONCLgbgEqUS6kMlgSSUUS+phyLdIzkWZ2fK9fPRVPUUo8ftC1hScOmR3lpb6C4x5mym6A3GjptLJNIWyVokNB5hmaO7lleHIbVB2NI5ZjKqB5VKcKzuN+5b13m2psoknWurfd1Mmktyk51Out66msPXfEfH2Tec2RWBW4ja3shYlRa+jpBMsjjXvAjoc/cVdNeGVdfIbQl/62SEXjGdS6WYlXR1c9DCUhdBTtT//3BT+ByQ9tZGaan2IDVB6AjYTnallW4WColsDkY8P4ZWJ6S025602xHY6GXRXAJKc5g822ZSnRS8bxpKr6o9Q= 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)(396003)(39860400002)(366004)(136003)(376002)(346002)(478600001)(2906002)(186003)(55236004)(36756003)(8936002)(44832011)(6666004)(52116002)(1076003)(6486002)(2616005)(316002)(66476007)(66946007)(6506007)(5660300002)(83380400001)(26005)(38100700002)(6512007)(6636002)(8676002)(66556008)(4326008)(7416002)(38350700002)(41300700001)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vFRuYjXSIiOvr97wZEpge8iFxwCtSsraV0bT345GrSCMF8S4slTDcv1yObFy+5HS9yIuGiZULCqqMr5BnzJKY6578BDp0PC7I5pWhXUTgV12JXZhEedOdOCm2PFB1ZLpNdZl7jE5rl4+t4RdREaebnSv7fW4pzE5kB3ZPMRKZp3RMxx2dTnAslRZLBtxDPpVF+lcUkEaZisX84/5sW96EviWE+G4oac0gnPpkS31GiIc/oUau/Bio0En2NQsjanu00R4zBhkeBb1veqWZqoDoQ/sKWW538DGi0Sigj+q/kqTVxTXEzsGm5tS6utSDoUOyvljj5OjHPR7vVwAsYQGXj73IveyDy6yZmn4Kej/D41U63Sk7Ey5GHE8L1KiOqz16yebd/xx+7Sp0OiYTYPlUBn4ofXCixHfbHZVWDwWrR/B7uo/8CzgLFwX/ymhLrQ0QrI0duQxHpcCvElNlTnjiHzqbNJM53sGC8mAEJdjguAp//4GsttbMKGcTcikui1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u/rXIyVsWV9DWVcVPQD X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 483b6735-8893-4eeb-383a-08da7ad499dd X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8274.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2022 13:31:16.0363 (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: nnVD2kzZnvHfiVpz3nLYVkdnGXpggTpDc7NMzJ5JJFwSkkD0yUSBUS6ikYELuSzrjgkgBixLkQQxrCXSfKO35Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6630 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220810_063120_910740_09884A73 X-CRM114-Status: GOOD ( 14.15 ) 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. Changes in V3: - follow the other imx8 SCU binding rule and rename the compatible string from fsl,imx8-scu-gpio to fsl,imx8qxp-sc-gpio - rename the doc file from fsl,imx8-scu-gpio.yaml to fsl,imx-sc-gpio.yaml Changes in V2: - move the driver into the gpio directory per Krzysztof's feedback - change the subnode description in file fsl,scu.yaml - fix the dt_binding_check error 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,imx-sc-gpio.yaml | 40 +++++ drivers/gpio/Kconfig | 4 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-imx-scu.c | 140 ++++++++++++++++++ 5 files changed, 190 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml create mode 100644 drivers/gpio/gpio-imx-scu.c --- 2.25.1