get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2227849,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2227849/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260424111330.702272-13-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-13-changhuang.liang@starfivetech.com>",
    "date": "2026-04-24T11:13:22",
    "name": "[v1,12/20] pinctrl: starfive: Add StarFive JHB100 per1 controller driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "edf0d3ad905120b0724a35054c5f9cae8a5c8aa5",
    "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-13-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/2227849/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227849/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-35482-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:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-gpio+bounces-35482-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.111",
            "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 sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g29kf3Dr9z1yDD\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 21:30:50 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 03A9D30041D9\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 11:30:47 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id CBCBB3B95E4;\n\tFri, 24 Apr 2026 11:30:43 +0000 (UTC)",
            "from CHN02-BJS-obe.outbound.protection.partner.outlook.cn\n (mail-bjschn02on2111.outbound.protection.partner.outlook.cn [139.219.17.111])\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 067383B7760;\n\tFri, 24 Apr 2026 11:30:41 +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:13:54 +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:13:54 +0000"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777030243; cv=fail;\n b=QUydcyj+uOkS6xI7DEaKNzEUO5giG619nV467vf5+2biIZWj2LdPFOQTQt1wR2yLECO9HfY7vNKXyZfqHrZTOFIDOksvclqCaWXbl3xe4d1OAkCv1/TkWhc3vOS3vovviyjrIGI6YPPj8zdlbpbzlAkoVtIXfosHMyhXlIDWIkw=",
            "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=iR3wXiS3UobvLhXXICMdFPAEZFyVIHA0aQYKrcl16oBWzkdZIQfnF+nDr+jTTw+4RXpu1Bo2imD5JxczSKYVBHsIKb/pA2M9GUDgAomhDUVe9c4Nf8R09zs89CvNltIcgm9264bcY6q/NKKXTazCp5VRnADsmIMbaePw9XoShWnYkVMfoE72yPNUd4ilN7IVa3KnbV70T2/MRsr640OVLc3cQxg/6rJc20wQqDnnxPiFZflNsdgNjrlkRxluJdJ6EnQyh2m5Ae5HBmaHQXtPnC7AHAjBJTJQyGy21/YD0SzjRd6EcEmM7yGuwRP7mYFG0NPk7CyY02WJD94m7+HwUg=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777030243; c=relaxed/simple;\n\tbh=zEJLJiHYyoqPpjDU5i/dGNPjL3lppC1I/CkaP4qe8Ac=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=oNHl6o1bQXiDj0wka9+HC1/0iWG7nm/9fGqKpKguF60JHTxCeu682kC5uI+qpK7r7GTahSiCdJEUc9LzurWmKQUlLy5+Lbjm49x/6FlToDpf1r4EfcFTu26yKl0ukGTfT/wOhtj9/SyzQjSUZooHo124mRClCicoBuKVxdjTTU4=",
            "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=ACUaAYRGlq536mJLMkSGeliFkDuQFA7ive8BX0d35TU=;\n b=SLREnZb9Z8cKCwh8Gi/9bu2XnbWW2ACNmfaGocXTe2Zx+QzO5tggVMTQwL4OnSdEXwZF3PWCZSbYu/M2/OnGPLn/UqwoX1jJ4N/JT9MaZZbV4aQnNgQPBU35Xl75W8aYOh8SEWDdZK3H9NLL7WnXzEosU8jSvZunjyBuNYsKnJuxrycuq1EMNqvhd78bpn4mIErsaWWx3AkmVR3FXE0G+RxRTsWtjl5P/ckPIn0ZeQq+JsdbHOvCt5Won1G5/Rj/eyoW+t/MfHZSjzlvGke/F/yp0uaGRzOfwclClz9UdA3v+Q20DvqvSMizggex1Ca8UC8/B6xmPgD+GISGIMDeNQ=="
        ],
        "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.111",
            "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 12/20] pinctrl: starfive: Add StarFive JHB100 per1\n controller driver",
        "Date": "Fri, 24 Apr 2026 04:13:22 -0700",
        "Message-Id": "<20260424111330.702272-13-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": "7127f9db-57a4-4f51-d89a-08dea1f29276",
        "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\tQwBCmmaC4A6bcIU2i5jZ6XimkUSLIIgJUaNSE22DJ85R4WTTmUxUVxYCycMTON6O+4k2q8DnPQ2+YTzQOFlUHECXlWhBVgIeIrq6IK8aOS1X2AdUWcKRxKyBy9gZ5jI02eB73RgZ86ts9ChXpA+wP3EQkXpeE7I3JNuZG9PENjCIrzJMTv9aWuaeWcd3Lqd0/MMFvs58sgBNX/h42aTNtXHzdLz8uf1JRE7Yy/OuCsw3LvFIapS3Jomjd/FasrgBktjiubZakFCzfMRaMECW+8IXTKkgiVxAc5E1DMN4CoOCEXNj3xSYSPppvHxsnx+xzAnhKYJOaY69V8oe1q6bNpr9kQ3Mf9ztl4Gew6Jb4iFLgDIeXKX07+nubgzAGXsVF/ZjFfVVD14DRehKWSl5FC12Gx8R3w50z5y7Com7otFNBRQ4A0IFSPh4jlC204wIB7OwIwplMg9AV92lsFGrDgL431keETL1RobV+S4Aa6tpiwgH1rytr5+FLqCGD1EBwRkc5hX0sVFirWFlG7onWFx1OCRFF2DMQIhJgMAq8tZxIvUCcxmI1mIswjrFYqQKuyMdv1MC0oIFvZhoqMI3dLc7DoXoetXshfEKiFasIb8=",
        "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 1sxwb3b+LUBGCCikFX2a+MR6P2HpNYJShM6oiKUQrp2O7RnikYVYETeQDt0xSvdMBAYNv/1jPewCGdTj64GSemDTApK7kIuMdXq0eyYGRlDExabDEgl++3cxtUTSTSBsAFu3tj7r2bd5eQUTE4zTjMSO8b2jtc5L09VnsIsVZ7fV4d/b6Cgmx5veYiDuifzlnBBM38SU2ozIkq2DrPVMottlC1QCVIeXC01VhA+ji6mcL762bSmlgsNgbDkhNdMjgmMuO9qvkwZr8xuKchlDc0YFS5+JPMTw1BDXi86ZSCEDi+7tAziiBYMMJOkXHCiwKsJf0XVs9Kx09bGhGnAREO+fTIX7CUhIui7+ac5j+ZXXnIykAEXtLHKSRHBydeKSTTP5q9cbgHti0aIq9LsYhbzNCzZM2Pc+MowntAHujNNRu6waPww0nUoydJgBDpc6lbw0JlEE4jMZSA4U+LSg1FhLYBeBKk/5MdEFR1fAEb2TSm1Mr0hgOnQGKLfRGvVKO5cPIkOOs3W+owIUPNK7cKQasGglJ5PLIj1lvE4Xfg551oaibqRgxLvdHxCnwo0725/ee8+4Z+94FxoKBPGYCsr8wMnD8Q67Zfroe3R5tp++d4yWpztpFF4v5uWkswEWX+RVV6HPavT2JtSKbxBNudj2THEk84xfJkA2alGwppAG2jQdGWSTNymK+RvOgj0nSh5lfbXGpRYvBMpgE1psGSLP5P1eWnOaEg64VCYESyMDBwJL7BjtAsSOA9UzU/rwrDNX3xIcUqNOmq93l9vE5tvpWLTKkxk9HAy6HsFjGGgcBcWZa4xhel+gFqnYHAG6ZxBcQBPQhsOEtNiLk08WP7FuFQaxKQAj4ZtChpLS+mWehl6P8w9kCZGQFRWcZAiTvSnZUoAboBTuAbXSpDie5mfXESiGesBRR7Hvu1V5aV0PodoM6XQcHIbXz42aBb1ngmekCcAq1lLxxituzj73vIsk1kGnQ34bHkCJy64U8FuxWLWzis7sTYO8mi5V4YOJiuVHI7DdAnVZoHp5FXxzJAjQPOQNP2RD/+89JVwxeXJgrbAw7ZPuKSaZoHHcQayLixOci53/6bfp5YrufgslBMaofQ+9kVSh6m5/f+k4MhwkGfMrl8uBCw7Z2AzGAEe38HooutfNAk7u6dXqg4Up6KDOa3M9erUZRd795AZAb0zrAJ1JkBdNZUQtqqQStst70GTnE8FEnXO9u4Rbw4jgTRgstGTHY+yF5QbHcuBuWxobCwOnNoDSJwt68Y/EMM/zk7pd0j9fkyUgJ3H2spS+6QHL851IrMnxPP1VzFwB4N3RavFhSJUf+uBsV8u3D0EZsetyzL1IvnQDHLLUyRvKdSQMoAUop3ey1Bo5AdIeWzHfH++0lVKchmAgyJf7t94Na1ftVa3inR2KToFjBHgBSczricXVTz/RX8l59lJ6aOaJQc4Mz8bE/XGC3V1UTAMZDCDgxWqSq+7zjpINy561K3EqVf9dvuyDk83n8w8ah6nYqz85KJiI1p6W/ZkjWSwHXa0xgW22VdJJiNuYnUMEJUTh96FLiW8lUGfcTT/MaeCx7/2MjuJeNa8xg8l1Joa2y1ONNy2FSO33hM+NdoO6hWuZjNfFtJ0l4Qkw8LBrkOO9w55LEodu1CtuxHNoWk42aAt8UqgatZZcOVDOjLBsP8B8I7nAtqDEE9g5MwzNLBUf83oQepp/nvEByD+O/OrSIVyXC8veixZDbhv4PSRCwGLCkvRQWUc2xGR4GFU8nBvKHRRxSGg0+zN1XBFuHQ/C",
        "X-OriginatorOrg": "starfivetech.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 7127f9db-57a4-4f51-d89a-08dea1f29276",
        "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:13:54.5599\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 E4f5H4OYZaiMlSGbxpdFu3U4Aw8eGUKTuPe7+h3PfVE9WhtrmMEF98CSNws+4rNr1hk9/ZUFp2PIu+fhgRMdrHZyOF+s8Wli4hxs3JMUeY1zOTU82TeDmGNdM4n7KGPi",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "ZQ4PR01MB1156"
    },
    "content": "Add pinctrl driver for StarFive JHB100 SoC Peripheral-1(per1) 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-per1.c   | 112 ++++++++++++++++++\n 3 files changed, 125 insertions(+)\n create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per1.c",
    "diff": "diff --git a/drivers/pinctrl/starfive/Kconfig b/drivers/pinctrl/starfive/Kconfig\nindex e5afd937c4a1..c5937207b2d3 100644\n--- a/drivers/pinctrl/starfive/Kconfig\n+++ b/drivers/pinctrl/starfive/Kconfig\n@@ -71,6 +71,18 @@ config PINCTRL_STARFIVE_JHB100_PER0\n \t  peripherals supporting inputs, outputs, configuring pull-up/pull-down\n \t  and interrupts on input changes.\n \n+config PINCTRL_STARFIVE_JHB100_PER1\n+\ttristate \"StarFive JHB100 SoC Peripheral-1 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-1 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 f2bb0c35a2a0..6beef7e313ef 100644\n--- a/drivers/pinctrl/starfive/Makefile\n+++ b/drivers/pinctrl/starfive/Makefile\n@@ -8,6 +8,7 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JH7110_AON)\t+= pinctrl-starfive-jh7110-aon.o\n \n obj-$(CONFIG_PINCTRL_STARFIVE_JHB100)\t\t+= pinctrl-starfive-jhb100.o\n 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_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-per1.c b/drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per1.c\nnew file mode 100644\nindex 000000000000..fcdc326ac50f\n--- /dev/null\n+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per1.c\n@@ -0,0 +1,112 @@\n+// SPDX-License-Identifier: GPL-2.0-or-later\n+/*\n+ * Pinctrl / GPIO driver for StarFive JHB100 SoC Peripheral-1 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_per1_pl_desc[] = {\n+\t{ .pin_start = 0, .pin_cnt = 36, .name = \"gpio\", .gpio_func_sel = 0 },\n+\t{ 0xff },\n+};\n+\n+static struct config_reg_layout_desc jhb100_per1_pinctr_rldesc[] = {\n+\t{\n+\t\t.pin_start\t\t\t= 0,\n+\t\t.pin_cnt\t\t\t= 32,\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= 32,\n+\t\t.pin_cnt\t\t\t= 4,\n+\t\t.input_enable\t\t\t= { .shift = 0, .width = 1 },\n+\t\t.mode_select\t\t\t= { .shift = 1, .width = 2 },\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.open_drain_pull_up_sel\t\t= { .shift = 5, .width = 2 },\n+\t\t.schmitt_trigger_select\t\t= { .shift = 7, .width = 1 },\n+\t\t.reserved\t\t\t= { .shift = 8, .width = 7 },\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_per0[] = {\n+\t{\n+\t\t.name = \"gpioe-spi\",\n+\t\t.range = BIT(JHB100_PINVREF_1_8V) | BIT(JHB100_PINVREF_3_3V)\n+\t},\n+\t{\n+\t\t.name = \"gpioe-qspi0\",\n+\t\t.range = BIT(JHB100_PINVREF_1_8V) | BIT(JHB100_PINVREF_3_3V)\n+\t},\n+\t{\n+\t\t.name = \"gpioe-qspi1\",\n+\t\t.range = BIT(JHB100_PINVREF_1_8V) | BIT(JHB100_PINVREF_3_3V)\n+\t},\n+\t{\n+\t\t.name = \"gpioe-qspi2\",\n+\t\t.range = BIT(JHB100_PINVREF_1_8V) | BIT(JHB100_PINVREF_3_3V)\n+\t},\n+\t{ NULL },\n+};\n+\n+struct starfive_pinctrl_regs jhb100_per1_pinctrl_regs = {\n+\t.vref\t\t\t= { .reg = 0x00, .pv_desc = pinvref_desc_per0 },\n+\t.config\t\t\t= { .reg = 0x14, .width_per_pin = 32 },\n+\t.output\t\t\t= { .reg = 0xa4, .width_per_pin = 1 },\n+\t.output_en\t\t= { .reg = 0xac, .width_per_pin = 1 },\n+\t.gpio_status\t\t= { .reg = 0xb4, .width_per_pin = 1 },\n+\t.func_sel\t\t= { .reg = 0xbc, .width_per_pin = 2 },\n+\t.irq_en\t\t\t= { .reg = 0xc8, .width_per_pin = 1 },\n+\t.irq_status\t\t= { .reg = 0xd0, .width_per_pin = 1 },\n+\t.irq_clr\t\t= { .reg = 0xd8, .width_per_pin = 1 },\n+\t.irq_trigger\t\t= { .reg = 0xe0, .width_per_pin = 1 },\n+\t.irq_level\t\t= { .reg = 0xe8, .width_per_pin = 1 },\n+\t.irq_both_edge\t\t= { .reg = 0xf0, .width_per_pin = 1 },\n+\t.irq_edge\t\t= { .reg = 0xf8, .width_per_pin = 1 },\n+};\n+\n+static const struct jhb100_pinctrl_domain_info jhb100_per1_pinctrl_info = {\n+\t.name\t\t\t= \"jhb100-per1\",\n+\t.gc_base\t\t= -1,\n+\t.pl_desc\t\t= jhb100_per1_pl_desc,\n+\t.crl_desc\t\t= jhb100_per1_pinctr_rldesc,\n+\t.regs\t\t\t= &jhb100_per1_pinctrl_regs,\n+};\n+\n+static const struct of_device_id jhb100_per1_pinctrl_of_match[] = {\n+\t{\n+\t\t.compatible = \"starfive,jhb100-per1-pinctrl\",\n+\t\t.data = &jhb100_per1_pinctrl_info,\n+\t},\n+\t{ /* sentinel */ }\n+};\n+MODULE_DEVICE_TABLE(of, jhb100_per1_pinctrl_of_match);\n+\n+static struct platform_driver jhb100_per1_pinctrl_driver = {\n+\t.probe = jhb100_pinctrl_probe,\n+\t.driver = {\n+\t\t.name = \"starfive-jhb100-per1-pinctrl\",\n+\t\t.of_match_table = jhb100_per1_pinctrl_of_match,\n+\t},\n+};\n+module_platform_driver(jhb100_per1_pinctrl_driver);\n+\n+MODULE_DESCRIPTION(\"Pinctrl driver for StarFive JHB100 SoC Peripheral-1 domain\");\n+MODULE_AUTHOR(\"Alex Soo <yuklin.soo@starfivetech.com>\");\n+MODULE_LICENSE(\"GPL\");\n",
    "prefixes": [
        "v1",
        "12/20"
    ]
}