get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2220286,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2220286/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260406-mtk-spi-nor-improvements-v1-6-66f675cbbd3e@baylibre.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260406-mtk-spi-nor-improvements-v1-6-66f675cbbd3e@baylibre.com>",
    "date": "2026-04-06T20:13:32",
    "name": "[6/8] spi: mtk_snor: support newer SOCs",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b12fe17eb05f430ac177c33740f93705ed384537",
    "submitter": {
        "id": 87228,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/87228/?format=api",
        "name": "David Lechner",
        "email": "dlechner@baylibre.com"
    },
    "delegate": {
        "id": 161331,
        "url": "http://patchwork.ozlabs.org/api/1.1/users/161331/?format=api",
        "username": "dlech",
        "first_name": "David",
        "last_name": "Lechner",
        "email": "dlechner@baylibre.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260406-mtk-spi-nor-improvements-v1-6-66f675cbbd3e@baylibre.com/mbox/",
    "series": [
        {
            "id": 498893,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/498893/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=498893",
            "date": "2026-04-06T20:13:26",
            "name": "spi: mtk_snor: various fixes and improvements",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498893/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2220286/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2220286/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=ByXLDTfA;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=baylibre.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.b=\"ByXLDTfA\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=baylibre.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=dlechner@baylibre.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\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 4fqLCz3876z1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 07 Apr 2026 06:15:11 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 3A46184144;\n\tMon,  6 Apr 2026 22:14:49 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id F1E1E83FA3; Mon,  6 Apr 2026 22:14:45 +0200 (CEST)",
            "from mail-oi1-x231.google.com (mail-oi1-x231.google.com\n [IPv6:2607:f8b0:4864:20::231])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id D0AC483C2B\n for <u-boot@lists.denx.de>; Mon,  6 Apr 2026 22:14:38 +0200 (CEST)",
            "by mail-oi1-x231.google.com with SMTP id\n 5614622812f47-4645dde00a7so3759137b6e.1\n for <u-boot@lists.denx.de>; Mon, 06 Apr 2026 13:14:38 -0700 (PDT)",
            "from [127.0.1.1] ([2600:8803:e7e4:500:90d7:b13f:c53:8ca3])\n by smtp.gmail.com with ESMTPSA id\n 006d021491bc7-68597f6c7bdsm2642044eaf.3.2026.04.06.13.14.36\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 06 Apr 2026 13:14:36 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1775506477;\n x=1776111277;\n darn=lists.denx.de;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=Ov1k7UleLYHPsqnarXmyon1CVt+YbMs1CUITccQjHM4=;\n b=ByXLDTfA9CNh2Fkz/guAjB60Y9p2xbVY3v1K5RoFvOD74bGIrbhDtrgQpxpQafIzfQ\n 6Jn1zdkpa/r5WesiBqSH43NZkxmF5fBrhJHi0vOfYZQT8cNlE2hrW1BDaX7GGTiDRzbq\n V9oJJaBKs5VNmppYMvpljEURblmJiSjW+Jh3Amk8/jtP5oAqci+xt+mU8W8KgLzWiTe4\n S9bwTQQ8U5ANDzQaXg+ZTEy5ftC+Yqsb804DEAySfUKLmVVtoLF4YsTonJqTngCj6YdE\n Bv9/JgWCbblAcfNRDBI3aiYbzN4Yx14OlrUaCuYmLAZiCtESXpkj3foN1qQsR+ipqwSg\n LbKg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775506477; x=1776111277;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=Ov1k7UleLYHPsqnarXmyon1CVt+YbMs1CUITccQjHM4=;\n b=MeoC2T6AOSGJ98gPPrgj1WkiiGha0OmCSeaML7jT1GEozLOKzrJqDeFEUT27tALPTI\n NTz3FRhSbWLtpWql/8Xu/HUeWrD3s63kcymNND8l1VUUtpzRjCiBVsuYtni58OK32FgI\n cxaH3dJkwcdwX7aQePGFbwCivrfRspIVuh0ieKTbrwb2vQZEwEUEChqV9YyqHT+8+k+u\n RneU8iIzhT/W5wGzmIUl84zPVQvJchSF3GMGrdCfMbTaZrdF07mydyGVhagGtCym4rru\n XUOhfmuzbj8zNoPdp71Vd5bQiTDZP0kXPAQe/PcdGR6LXj/uA7mues150/ER2ECvuChQ\n QXcg==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCUj1gU0wSefqBy7DalxRbWLPLrxSZ8QDO4aJ24Q/Nj4+kyeZgTsAZZDXrvHGU5JLbF/C3yrbp8=@lists.denx.de",
        "X-Gm-Message-State": "AOJu0YxQ/7DXvctrBqJ/1wTZNRVZRMAZST3tNo4egn8L8Sw99i+tcu1q\n tTKcVRD1dpqOLvV9SWQ8jh259RWjzKIguy40yF6lFuvLMBCOLGFvfAabkNoDlAOJRw83+MBxgJp\n RO9Gx",
        "X-Gm-Gg": "AeBDietp/MMx+XXphlluCjLTn56nlFV0/depSPjzj/yp3lKwb8j1xZLtZyqSdCq7lOY\n jGnebhPwU2oiusJ/VGM2kQFw9sHzSI7kWWo4N6mxHNHbE0yE2VfeJ5fsCIAUAD26EENmNvooXOO\n 3C4xyUxVO6UAjBlieNWbrSkcHJtyp9RsErBXHJJngwcbE6oePdQtL2bRZqikGZq+Vi4kLrp8BnX\n gEk5l0vaKnSdvSr8IWHcdYX4pPKOWFuM2vazDGvXrqO6eJGcIgeNS9swbFhbOjSZHQNNX4JAbFQ\n aNLgsPrGa1ojNCCAx92K6u/gKHLJd5duPL0CThc8h5ms2kpzL2J5DTz0ckVS7nqgiPX4iJqx1oM\n YZlcZpfB9IMDosB1S5pV5ppVMyZrS46ifZhUv8twqTGeLy7gHO8/CQD7JG23A81g9XuYsEdUCFc\n sroSKI1NrLqVOPRipIwW2RYLqFbPU=",
        "X-Received": "by 2002:a05:6820:1a07:b0:67c:28d6:430e with SMTP id\n 006d021491bc7-68220c420bcmr6876492eaf.28.1775506477339;\n Mon, 06 Apr 2026 13:14:37 -0700 (PDT)",
        "From": "David Lechner <dlechner@baylibre.com>",
        "Date": "Mon, 06 Apr 2026 15:13:32 -0500",
        "Subject": "[PATCH 6/8] spi: mtk_snor: support newer SOCs",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260406-mtk-spi-nor-improvements-v1-6-66f675cbbd3e@baylibre.com>",
        "References": "<20260406-mtk-spi-nor-improvements-v1-0-66f675cbbd3e@baylibre.com>",
        "In-Reply-To": "\n <20260406-mtk-spi-nor-improvements-v1-0-66f675cbbd3e@baylibre.com>",
        "To": "Ryder Lee <ryder.lee@mediatek.com>, Weijie Gao <weijie.gao@mediatek.com>,\n Chunfeng Yun <chunfeng.yun@mediatek.com>,\n Igor Belwon <igor.belwon@mentallysanemainliners.org>,\n GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,\n Tom Rini <trini@konsulko.com>",
        "Cc": "Julien Stephan <jstephan@baylibre.com>, u-boot@lists.denx.de,\n David Lechner <dlechner@baylibre.com>, \"Noah.Shen\" <noah.shen@mediatek.com>,\n \"Noah.Shen\" <noah.shen@mediatek.com>",
        "X-Mailer": "b4 0.16-dev",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=2557; i=dlechner@baylibre.com;\n h=from:subject:message-id;\n bh=Uatn2Ihu8+Rogw43lASyi1h7dj4jj3pC7De8ieQvKF8=;\n b=owEBhAF7/pANAwAKAcLMIAH/AY/AAcsmYgBp1BQTNvbEc/5VGAqCclVMBjdaHJxZxzxWfBjOV\n xX+nbQr8UKJAUoEAAEKADQWIQTsGNmeYg6D1pzYaJjCzCAB/wGPwAUCadQUExYcZGxlY2huZXJA\n YmF5bGlicmUuY29tAAoJEMLMIAH/AY/ABBsH/2a7qtUK35rLdFSu2g/hI/AXs+EC33xm5HzosyY\n cffP+Z3XEo4GL3hnDhuNY2wfMdtNWDFF7dhX/FUsvaJvm9eK5pQgEbJkMGt+xAaDMNMD/vgYhfM\n nPP+F/sR0QQl/kJ1Lrpe2rDbJba38zXOIGxxcCXpw4Hr6zExI5YXZdUF3wN1y3++sYiG4EJzZSB\n IoPVb4/kIdhswLMdWQfd5eEm3MoODCpT+flQsM+kmSvP+o0iaZFIti5u3ASJz4moY26uyBW3sz7\n a0XMMfaXYtghnTLhlDTdWXGS32Y+fz1nWriFZb6VgPtvac5hTaMyuPgVK4iB7f+ZJbgVP/UrwEz\n k+cE=",
        "X-Developer-Key": "i=dlechner@baylibre.com; a=openpgp;\n fpr=8A73D82A6A1F509907F373881F8AF88C82F77C03",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "From: \"Noah.Shen\" <noah.shen@mediatek.com>\n\nAdd support for some newer SOCs. New compatible strings are added to the\nlookup table. Some SOCs also need a extra bit clocked out as a hardware\nquirk, so a new capability structure and code is added to support that.\n\nSigned-off-by: Noah.Shen <noah.shen@mediatek.com>\nSigned-off-by: David Lechner <dlechner@baylibre.com>\n---\n drivers/spi/mtk_snor.c | 31 +++++++++++++++++++++++++++++--\n 1 file changed, 29 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/spi/mtk_snor.c b/drivers/spi/mtk_snor.c\nindex 77f94827568..649bca5716c 100644\n--- a/drivers/spi/mtk_snor.c\n+++ b/drivers/spi/mtk_snor.c\n@@ -104,9 +104,19 @@\n \n #define MTK_NOR_UNLOCK_ALL 0x0\n \n+struct mtk_snor_caps {\n+\t/*\n+\t * Some new SoCs modify the timing of fetching registers' values and IDs\n+\t * of NOR flash, they need a extra_bit which can add more clock cycles\n+\t * for fetching data.\n+\t */\n+\tu8 extra_bit;\n+};\n+\n struct mtk_snor_priv {\n \tstruct device *dev;\n \tvoid __iomem *base;\n+\tconst struct mtk_snor_caps *caps;\n \tu8 *buffer;\n \tstruct clk spi_clk;\n \tstruct clk ctlr_clk;\n@@ -448,7 +458,11 @@ static int mtk_snor_cmd_program(struct mtk_snor_priv *priv,\n \t}\n \n \t/* trigger op */\n-\twritel(prg_len * BITS_PER_BYTE, priv->base + MTK_NOR_REG_PRG_CNT);\n+\tif (rx_len)\n+\t\twritel(prg_len * BITS_PER_BYTE + priv->caps->extra_bit,\n+\t\t       priv->base + MTK_NOR_REG_PRG_CNT);\n+\telse\n+\t\twritel(prg_len * BITS_PER_BYTE, priv->base + MTK_NOR_REG_PRG_CNT);\n \n \tret = mtk_snor_cmd_exec(priv, MTK_NOR_CMD_PROGRAM, prg_len * BITS_PER_BYTE);\n \tif (ret)\n@@ -508,6 +522,8 @@ static int mtk_snor_probe(struct udevice *bus)\n \tif (!priv->base)\n \t\treturn -EINVAL;\n \n+\tpriv->caps = (const void *)dev_get_driver_data(bus);\n+\n \tret = clk_get_by_name(bus, \"spi\", &priv->spi_clk);\n \tif (ret < 0)\n \t\treturn ret;\n@@ -584,8 +600,19 @@ static const struct dm_spi_ops mtk_snor_ops = {\n \t.set_mode = mtk_snor_set_mode,\n };\n \n+static const struct mtk_snor_caps mtk_snor_caps_default = {\n+\t.extra_bit = 0,\n+};\n+\n+static const struct mtk_snor_caps mtk_snor_caps_extra_bit = {\n+\t.extra_bit = 1,\n+};\n+\n static const struct udevice_id mtk_snor_ids[] = {\n-\t{ .compatible = \"mediatek,mtk-snor\" },\n+\t{ .compatible = \"mediatek,mtk-snor\", .data = (ulong)&mtk_snor_caps_default },\n+\t{ .compatible = \"mediatek,mt8188-nor\", .data = (ulong)&mtk_snor_caps_extra_bit },\n+\t{ .compatible = \"mediatek,mt8189-nor\", .data = (ulong)&mtk_snor_caps_extra_bit },\n+\t{ .compatible = \"mediatek,mt8195-nor\", .data = (ulong)&mtk_snor_caps_default },\n \t{}\n };\n \n",
    "prefixes": [
        "6/8"
    ]
}