get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2227856/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2227856,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2227856/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260424111330.702272-19-changhuang.liang@starfivetech.com/",
    "project": {
        "id": 42,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/42/?format=api",
        "name": "Linux GPIO development",
        "link_name": "linux-gpio",
        "list_id": "linux-gpio.vger.kernel.org",
        "list_email": "linux-gpio@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260424111330.702272-19-changhuang.liang@starfivetech.com>",
    "date": "2026-04-24T11:13:28",
    "name": "[v1,18/20] pinctrl: starfive: Add StarFive JHB100 per3 controller driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5aa296c508db68ede7fd441cff07b6683f07219b",
    "submitter": {
        "id": 85771,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/85771/?format=api",
        "name": "Changhuang Liang",
        "email": "changhuang.liang@starfivetech.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260424111330.702272-19-changhuang.liang@starfivetech.com/mbox/",
    "series": [
        {
            "id": 501347,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501347/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=501347",
            "date": "2026-04-24T11:13:16",
            "name": "Add basic pinctrl drivers for JHB100 SoC",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501347/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2227856/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227856/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-35487-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-gpio@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-gpio+bounces-35487-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=139.219.17.139",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=starfivetech.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=starfivetech.com",
            "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=starfivetech.com;"
        ],
        "Received": [
            "from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g29pz0LQkz1yDD\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 21:34:35 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id C65E6300440B\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 11:34:33 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 905D83BADAB;\n\tFri, 24 Apr 2026 11:34:30 +0000 (UTC)",
            "from CHN02-BJS-obe.outbound.protection.partner.outlook.cn\n (mail-bjschn02on2139.outbound.protection.partner.outlook.cn [139.219.17.139])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id F01B83947B0;\n\tFri, 24 Apr 2026 11:34:21 +0000 (UTC)",
            "from ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn\n (2406:e500:c550:17::6) by ZQ4PR01MB1156.CHNPR01.prod.partner.outlook.cn\n (2406:e500:c550:14::9) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.22; Fri, 24 Apr\n 2026 11:14:02 +0000",
            "from ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn\n ([fe80::e7d4:256c:b066:850d]) by\n ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn ([fe80::e7d4:256c:b066:850d%5])\n with mapi id 15.20.9846.021; Fri, 24 Apr 2026 11:14:02 +0000"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777030466; cv=fail;\n b=QYhCYrXMT7XvaP7cll6nZ9V8eS9AFsVsWjcP0g0WYPjb8P4KGhjM8qVCU+dGvlEx9YeQ2b2LmItvzc0GAC2CrXkAMyZyk+/E7w3GUTtHtfqXoPnhYGmBJKR/UTncq7croRmr8tRsCYARGIljLJtCiUQd+xCSve/q53127UXb1g0=",
            "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=LXYSpcuDWv4v+3ZWAJWdjFUWiR/5Fqa36qUTa0PH5SLMaTnnMFbkqxFwwoJYJOlo8NBzfN+Hnsv7VJAIqvX/cizWKOAB5uSId+kMtb4pjWlL8ZRQmGBiXUmANPn1BaxQpH1rf1g8sIX9GOsxSN8TZAwyu4Kjpzuey0KexBv5tBSrql3fcOCcQJ7VuWQ0//DkTbTyBR09NNJmdRPVzBn506wr/j79xKBMSMI29dfEb0RIAhLJg1lOLitLcTpXBryorXz8yzklArP/7U3sdvgGHSMdZ7Hlbq0jZF1p6oWRRXT5LFO8alX1FWL3tcgtm72vBZMEFxrOQcuNXjypXULIrQ=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777030466; c=relaxed/simple;\n\tbh=PXKv+1tZ/zGZl9Hdl9ZQ3QPtXAb5Zl+yRJcfAOFxoDE=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=IifVILqrmxupLXQ/64CcbWaN2RxJBBGuHPE+ao9XxGwto7Q0rO+5WUX/T0zIq69CsCSlPvDOUiaGvXkoQFD8TNomgcQJhMI8T8qWbaXE/TxxHdrTtx6j3lfTjkNNkTxtfJJWcvUWBGmA86PBZRO5T42HpcfqiiSe4mctjRNTx9c=",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n 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;\n bh=UBwkIOq6B2reee1LevWUV3iwNpJfXnG62D5DZL8F3s4=;\n b=gJKNXoyjLD+XN/AMqTWugWVcD1AdMDmB1HkHE5uqpYdyrbsI7ncexFybPFnz4x3B0DLL/3ZA1nChiK+8+X1VyfLbah6Ho7/r/rYBaDHWopuhOxJE1WPVml4Wgmxa+EnjXjuo7Eo0SRRWeL3GRTiQbwL+kCAUoHwZZKjVYjaYC7p2q1n3YqAOasbWrN79nBoeHXiYsac5Iq4CO3C+p+nwcwsrW9yVmn5bkimje1CqJ+oDdv7pyqwkjjQlSHRMLjaL7c5C2vfv0pd4YyEowoMbpkZUs5Y2IXuC4228AkpsrRp5W8/Kfzo+T6F4kF3iQrDeXp18lg+qioK9W1ie8X+gsg=="
        ],
        "ARC-Authentication-Results": [
            "i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=starfivetech.com;\n spf=pass smtp.mailfrom=starfivetech.com;\n arc=fail smtp.client-ip=139.219.17.139",
            "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=starfivetech.com; dmarc=pass action=none\n header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none"
        ],
        "From": "Changhuang Liang <changhuang.liang@starfivetech.com>",
        "To": "Linus Walleij <linusw@kernel.org>,\n\tRob Herring <robh@kernel.org>,\n\tKrzysztof Kozlowski <krzk+dt@kernel.org>,\n\tConor Dooley <conor+dt@kernel.org>,\n\tEmil Renner Berthing <kernel@esmil.dk>,\n\tPaul Walmsley <pjw@kernel.org>,\n\tAlbert Ou <aou@eecs.berkeley.edu>,\n\tPalmer Dabbelt <palmer@dabbelt.com>,\n\tAlexandre Ghiti <alex@ghiti.fr>,\n\tPhilipp Zabel <p.zabel@pengutronix.de>,\n\tBartosz Golaszewski <brgl@kernel.org>",
        "Cc": "linux-gpio@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-riscv@lists.infradead.org,\n\tLianfeng Ouyang <lianfeng.ouyang@starfivetech.com>,\n\tChanghuang Liang <changhuang.liang@starfivetech.com>",
        "Subject": "[PATCH v1 18/20] pinctrl: starfive: Add StarFive JHB100 per3\n controller driver",
        "Date": "Fri, 24 Apr 2026 04:13:28 -0700",
        "Message-Id": "<20260424111330.702272-19-changhuang.liang@starfivetech.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20260424111330.702272-1-changhuang.liang@starfivetech.com>",
        "References": "<20260424111330.702272-1-changhuang.liang@starfivetech.com>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "SHXPR01CA0025.CHNPR01.prod.partner.outlook.cn\n (2406:e500:c311:1b::34) To ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn\n (2406:e500:c550:17::6)",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-gpio@vger.kernel.org",
        "List-Id": "<linux-gpio.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-gpio+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-gpio+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "ZQ4PR01MB1202:EE_|ZQ4PR01MB1156:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "0054a019-f448-436c-ed1a-08dea1f29748",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|7416014|52116014|376014|366016|1800799024|38350700014|921020|56012099003|18002099003|22082099003;",
        "X-Microsoft-Antispam-Message-Info": "\n\tXcZCJI/MlsmykaCMQCJiULam5SR1dFXuVmS5XOernOifKLVhKeSFdQorbeqmSPzLdDObKzjnzvWaz4fc18u6oUVO9VWmmOf7Hb0qvblvCoFARwRQwitbB+KD9dacBLwkKp9RFAzkZSawtbvmUGHoL5MhbzdXzqihA0aYjy8QsyHEjHg1IDJPntL8RHomp1KQeyhq6xYqlJF1bVeBMRpu0iru6BvCcdZMh+KaeX4shGVsls7iXltNAky3fKfdcS5OZEkeLv/AJsXzLM1ENqdqAf3t38VKJxLwUJTX2OmcyNpTXXsaTR+E8Xj4qPzQ3WObl7qxxoDsbVR3tTQzHriaYqwe9aEXjZJmXHMeHMs6gmuKOJLMaRNX/LWhK73PjAybA4+HVkNCBBlNULwbHlwfpS3q/yneycxD653fOgvKgRgbtD+Ekt9Iwi9p38BHJoW/KUK3+urNpcF2vX3j+p3WpMqELHEc09jx7+CAzcw8qHWQ1dKdHRtM0v65k15TA7yzfiOpopsnfyWovwY3b0g+KUtHvOBCwVRcF3KfejHJzfOa0IKSPpWWgsXCvAztaAfyEdoGPK6NFdIaPjWp/kwPOYfykawoLRfa+Mgu7uFE20c=",
        "X-Forefront-Antispam-Report": "\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230040)(7416014)(52116014)(376014)(366016)(1800799024)(38350700014)(921020)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n svVcVa9iovRMM+nnvyaGhhyhf52s+KXo0puJ2q+t010DUHdZtTzkBjx22ZBAE1bIXu7atHjeJQaZlWHYa+QGXqYkl9G3gnYq8vblMHTfMi57x9sSke6eWwZ79ZJrWANV/Wa437MpYR6+unc5bxQiDXor2vLWWu5gP5KFuSJAx8KNc+mP4+3OLUOUT1HUEEKDadhO4aMjplXyfmWEGT5Pb0c5L3HwdI5cfStIm+lEhm0rP0RhuGk8Jgvd/UmPyoMIS4hrymCPZruhPtBgv3tP8axMX3daK86zitePjAh+Oa8xTU4i21VRluTPDVxBwwG0V4mWorrgF/XMlC0AbUPMM87rZLcXLf3ArVWfOPwu5HbhdCDWRfto9vtNNFhrqqI7jnvq4V3lY2oYiqaF7oyufiw1BLb/61I76YNc22JDHJ5uBnJGmanNaj0ZvsbpnkjaI14D8zE0zdeXs6LvxFtp4EccJmmM2SaL1uAI2WxIuZEYdxN2qsFNuMt/28mZ9/+W3WHU/OgGeuo5hl/3UyHYRK2iaDWuCOO8/zwAJkUJ8i54W592WWBCzwth/GQjnasu3ibbxIpT17l4z169HdjjDjqvn3gcYKkiVwW2nqj0HUqSN4nXDdZCLpjSYDIl4bT2nNpRom/7L3IGto200lYg3/JgOFQj+eX6VNpratnB7V6ssgQF9SzmA19Dz9VJCNGzFTLgUuaJV9eb3nFaebLt+kV+yBrxRQGWKzbSYW8j1fLelaqH+vardfFieX4ON5YdlnQg49poYFD9e1htPkQRrsqrk90w0BMc76fasOHAYiiEO+kPaaG+oRS2+7EBFPSjKfir5SjeaBpKUm5F3aVngRKz3Jn+2vgAei7ZqPIKk+pHNgu4qKj44kowXRw3JJb+T1tbM0w49uK8QJ6yOfiX0A+lIMa6ddTqnyhilaa8qaKsl1fVeuwKJkkYSN/oYyO2xcb5vge9i7uYLSzkmfH2u4ftHq6fFUKmnyke+SseIIvZo80FQnUU3xdc0qJc+6ZckdwIEtvPEkNjNb2n2bWlGB+a72/B1ewUL71Qirn9q1y0uhLsq8F6zZEqoczKKzjsIdBa/6XMYATji9XpWCM8WyhK1mYIo4yYmqDEeXrZAb7ZTv/BCPW8uG/wW896hMVYeig3GLwM4+GJhmQlPwtG6Og+kRH9YGJ3sA8pbzD8MY/91/F4YU4Mvll+1shUH6kD3vNg6dYKtsxDbS5zoaNlBF3LwjUJv2k86i63+nflk0Kda6VkQuJR5j60T2JOD+zSrIB3kuRHXOLEFnLjciSKXDeNe40kkMcE61+fCD798zqZ6tDKgOWBUqf30GG1CZ4vL8N3TylejqsdMuJUUdhOyM3+skQYau3H7CtuPK71Go1lDcXWPlUPRJSmh0zHLbLy/Th/mpzK+1xxQYHuAphTLs0epRl4tkAhEQMFH2GHpvdXcwNmaCBHnRnjWdnNigWxp/C6hK51qQGByA/wf3hwkb5HtqRbwHoJkhw8jDCTCpAfWw337UtQ8xrTne80SXYhAq3epOqUXvcn2gnhPCpXOKr+ZoE+mK61pEErH/gj7vtUbrB56btS4x2P0tbNADLSsrUw4EHmjaGm9x4u6t37lyEYShFuLPFqR1uE0pC5xDlXfZQMpdVVNdJtAVJUV+Ra0nR+TeL6NTwcn9obbJ4sl8cCzEkzhR2QrZBxg014h8/KAYChCmiUAgHlPThpK79x2ccz3cvhEGmGiqTDbK9/SS53NO2apav2hCf8hs4I+wuWWMFZ5tF3vSrnxI7L+599",
        "X-OriginatorOrg": "starfivetech.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 0054a019-f448-436c-ed1a-08dea1f29748",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "24 Apr 2026 11:14:02.6569\n (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "06fe3fa3-1221-43d3-861b-5a4ee687a85c",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n M5tBXSfnwWHUPql67h/EgvhrZSuRUttzvxswtRoh8BiyeOGwp5NzZ66vf0dpIxLpTYQd7rqLFSbfX6RUmXiWaUGT9raVlg3QZCd8NoIqowjfqY3qwaxS2+ad2abIjeUP",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "ZQ4PR01MB1156"
    },
    "content": "Add pinctrl driver for StarFive JHB100 SoC Peripheral-3(per3) pinctrl\ncontroller.\n\nSigned-off-by: Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>\nSigned-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>\n---\n drivers/pinctrl/starfive/Kconfig              |  12 +++\n drivers/pinctrl/starfive/Makefile             |   1 +\n .../starfive/pinctrl-starfive-jhb100-per3.c   | 101 ++++++++++++++++++\n 3 files changed, 114 insertions(+)\n create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per3.c",
    "diff": "diff --git a/drivers/pinctrl/starfive/Kconfig b/drivers/pinctrl/starfive/Kconfig\nindex ed29f87e9d7a..07cef96f8e90 100644\n--- a/drivers/pinctrl/starfive/Kconfig\n+++ b/drivers/pinctrl/starfive/Kconfig\n@@ -107,6 +107,18 @@ config PINCTRL_STARFIVE_JHB100_PER2POK\n \t  peripherals supporting inputs, outputs, configuring pull-up/pull-down\n \t  and interrupts on input changes.\n \n+config PINCTRL_STARFIVE_JHB100_PER3\n+\ttristate \"StarFive JHB100 SoC Peripheral-3 pinctrl and GPIO driver\"\n+\tdepends on ARCH_STARFIVE || COMPILE_TEST\n+\tdepends on OF\n+\tselect PINCTRL_STARFIVE_JHB100\n+\tdefault ARCH_STARFIVE\n+\thelp\n+\t  Say yes here to support Peripheral-3 pin control on the StarFive JHB100 SoC.\n+\t  This also provides an interface to the GPIO pins not used by other\n+\t  peripherals supporting inputs, outputs, configuring pull-up/pull-down\n+\t  and interrupts on input changes.\n+\n config PINCTRL_STARFIVE_JHB100_SYS0\n \ttristate \"StarFive JHB100 SoC System-0 pinctrl and GPIO driver\"\n \tdepends on ARCH_STARFIVE || COMPILE_TEST\ndiff --git a/drivers/pinctrl/starfive/Makefile b/drivers/pinctrl/starfive/Makefile\nindex 213002da9cdd..351fce524fec 100644\n--- a/drivers/pinctrl/starfive/Makefile\n+++ b/drivers/pinctrl/starfive/Makefile\n@@ -11,6 +11,7 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER0)\t+= pinctrl-starfive-jhb100-per0.o\n obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER1)\t+= pinctrl-starfive-jhb100-per1.o\n obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER2)\t+= pinctrl-starfive-jhb100-per2.o\n obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER2POK)\t+= pinctrl-starfive-jhb100-per2pok.o\n+obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER3)\t+= pinctrl-starfive-jhb100-per3.o\n obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0)\t+= pinctrl-starfive-jhb100-sys0.o\n obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0H)\t+= pinctrl-starfive-jhb100-sys0h.o\n obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS1)\t+= pinctrl-starfive-jhb100-sys1.o\ndiff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per3.c b/drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per3.c\nnew file mode 100644\nindex 000000000000..a2e6ea4097a5\n--- /dev/null\n+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per3.c\n@@ -0,0 +1,101 @@\n+// SPDX-License-Identifier: GPL-2.0-or-later\n+/*\n+ * Pinctrl / GPIO driver for StarFive JHB100 SoC Peripheral-3 domain\n+ *\n+ * Copyright (C) 2024 StarFive Technology Co., Ltd.\n+ * Author: Alex Soo <yuklin.soo@starfivetech.com>\n+ *\n+ */\n+\n+#include <linux/mod_devicetable.h>\n+#include <linux/platform_device.h>\n+\n+#include \"pinctrl-starfive-jhb100.h\"\n+\n+static const struct jhb100_pin_layout_desc jhb100_per3_pl_desc[] = {\n+\t{ .pin_start = 0, .pin_cnt = 11, .name = \"gpio\", .gpio_func_sel = 0 },\n+\t{ .pin_start = 11, .pin_cnt = 1, .name = \"peci1_out\", .gpio_func_sel = -1 },\n+\t{ .pin_start = 12, .pin_cnt = 1, .name = \"peci2_out\", .gpio_func_sel = -1 },\n+\t{ 0xff },\n+};\n+\n+static struct config_reg_layout_desc jhb100_per3_pinctrl_rl_desc[] = {\n+\t{\n+\t\t.pin_start\t\t\t= 0,\n+\t\t.pin_cnt\t\t\t= 2,\n+\t\t.drive_strength_2bit\t\t= { .shift = 0, .width = 2 },\n+\t\t.input_enable\t\t\t= { .shift = 2, .width = 1 },\n+\t\t.pull_down\t\t\t= { .shift = 3, .width = 1 },\n+\t\t.pull_up\t\t\t= { .shift = 4, .width = 1 },\n+\t\t.slew_rate\t\t\t= { .shift = 5, .width = 1 },\n+\t\t.schmitt_trigger_select\t\t= { .shift = 6, .width = 1 },\n+\t\t.reserved\t\t\t= { .shift = 7, .width = 8 },\n+\t\t.debounce_width\t\t\t= { .shift = 15, .width = 17 },\n+\t},\n+\t{\n+\t\t.pin_start\t\t\t= 2,\n+\t\t.pin_cnt\t\t\t= 9,\n+\t\t.input_enable\t\t\t= { .shift = 0, .width = 1 },\n+\t\t.slew_rate\t\t\t= { .shift = 1, .width = 1 },\n+\t\t.vsel\t\t\t\t= { .shift = 2, .width = 2,\n+\t\t\t\t\t\t    .func = BIT(PER3_GMAC_RMII_FUNC) },\n+\t\t.reserved\t\t\t= { .shift = 4, .width = 11 },\n+\t\t.debounce_width\t\t\t= { .shift = 15, .width = 17 },\n+\t},\n+\t{ 0xff },\n+};\n+\n+static const struct pinvref_desc pinvref_desc_per3[] = {\n+\t{\n+\t\t.name = \"gpios\",\n+\t\t.range = BIT(JHB100_PINVREF_1_8V) | BIT(JHB100_PINVREF_2_5V) |\n+\t\t\t BIT(JHB100_PINVREF_3_3V)\n+\t},\n+\t{ NULL },\n+};\n+\n+struct starfive_pinctrl_regs jhb100_per3_pinctrl_regs = {\n+\t.vref\t\t\t= { .reg = 0x00, .pv_desc = pinvref_desc_per3 },\n+\t.config\t\t\t= { .reg = 0x04, .width_per_pin = 1 },\n+\t.output\t\t\t= { .reg = 0x30, .width_per_pin = 1 },\n+\t.output_en\t\t= { .reg = 0x34, .width_per_pin = 1 },\n+\t.gpio_status\t\t= { .reg = 0x38, .width_per_pin = 1 },\n+\t.func_sel\t\t= { .reg = 0x3c, .width_per_pin = 2 },\n+\t.irq_en\t\t\t= { .reg = 0x40, .width_per_pin = 1 },\n+\t.irq_status\t\t= { .reg = 0x44, .width_per_pin = 1 },\n+\t.irq_clr\t\t= { .reg = 0x48, .width_per_pin = 1 },\n+\t.irq_trigger\t\t= { .reg = 0x4c, .width_per_pin = 1 },\n+\t.irq_level\t\t= { .reg = 0x50, .width_per_pin = 1 },\n+\t.irq_both_edge\t\t= { .reg = 0x54, .width_per_pin = 1 },\n+\t.irq_edge\t\t= { .reg = 0x58, .width_per_pin = 1 },\n+};\n+\n+static const struct jhb100_pinctrl_domain_info jhb100_per3_pinctrl_info = {\n+\t.name\t\t\t= \"jhb100-per3\",\n+\t.gc_base\t\t= -1,\n+\t.pl_desc\t\t= jhb100_per3_pl_desc,\n+\t.crl_desc\t\t= jhb100_per3_pinctrl_rl_desc,\n+\t.regs\t\t\t= &jhb100_per3_pinctrl_regs,\n+};\n+\n+static const struct of_device_id jhb100_per3_pinctrl_of_match[] = {\n+\t{\n+\t\t.compatible = \"starfive,jhb100-per3-pinctrl\",\n+\t\t.data = &jhb100_per3_pinctrl_info,\n+\t},\n+\t{ /* sentinel */ }\n+};\n+MODULE_DEVICE_TABLE(of, jhb100_per3_pinctrl_of_match);\n+\n+static struct platform_driver jhb100_per3_pinctrl_driver = {\n+\t.probe = jhb100_pinctrl_probe,\n+\t.driver = {\n+\t\t.name = \"starfive-jhb100-per3-pinctrl\",\n+\t\t.of_match_table = jhb100_per3_pinctrl_of_match,\n+\t},\n+};\n+module_platform_driver(jhb100_per3_pinctrl_driver);\n+\n+MODULE_DESCRIPTION(\"Pinctrl driver for StarFive JHB100 SoC Peripheral-3 domain\");\n+MODULE_AUTHOR(\"Alex Soo <yuklin.soo@starfivetech.com>\");\n+MODULE_LICENSE(\"GPL\");\n",
    "prefixes": [
        "v1",
        "18/20"
    ]
}