Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2228270/?format=api
{ "id": 2228270, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228270/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260425080649.75688-3-lucienzx159@gmail.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": "<20260425080649.75688-3-lucienzx159@gmail.com>", "date": "2026-04-25T08:06:48", "name": "[v4,2/3] net: phy: airoha: air_en8811: use standard rx-polarity/tx-polarity properties", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "76941eafb92d5c9189b9d7bb9c8e6d78ea288a41", "submitter": { "id": 90627, "url": "http://patchwork.ozlabs.org/api/1.1/people/90627/?format=api", "name": "Lucien.Jheng", "email": "lucienzx159@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260425080649.75688-3-lucienzx159@gmail.com/mbox/", "series": [ { "id": 501470, "url": "http://patchwork.ozlabs.org/api/1.1/series/501470/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=501470", "date": "2026-04-25T08:06:49", "name": "phy: add common PHY polarity properties support", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/501470/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2228270/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2228270/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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=h6zCObvt;\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=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b=\"h6zCObvt\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=lucienzx159@gmail.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 4g2yvD4FQLz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 26 Apr 2026 04:26:00 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id F4133844E3;\n\tSat, 25 Apr 2026 20:25:41 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 114488448C; Sat, 25 Apr 2026 20:22:26 +0200 (CEST)", "from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com\n [IPv6:2607:f8b0:4864:20::c36])\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 71F8484480\n for <u-boot@lists.denx.de>; Sat, 25 Apr 2026 20:22:23 +0200 (CEST)", "by mail-oo1-xc36.google.com with SMTP id\n 006d021491bc7-68470763896so4761095eaf.1\n for <u-boot@lists.denx.de>; Sat, 25 Apr 2026 11:22:23 -0700 (PDT)", "from localhost.localdomain (124-218-201-66.cm.dynamic.apol.com.tw.\n [124.218.201.66]) by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b5fab0cbaasm250916935ad.54.2026.04.25.01.08.36\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 25 Apr 2026 01:08:39 -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=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD,\n FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777141342; x=1777746142; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=6bqIXZgDQ/UMUvXqSsKgirnDD5nDcus65tNaiPSkH9s=;\n b=h6zCObvtHf79p3KdmM6Vv6PsSCqazkQM+na8Qnl2rW/7MimmxKNRDW+DLSpbaLF9UC\n akciq3lHaUmQYhBQGFWshfVdMRXPn5h4fMiXi3siKDZOVs/Gs/enntz4LXhoYYEMdYlW\n LQpX05o2A5PO7YXcyJpm87kLYwnUySqd3LEk7NuYqY8dpSDyZ77BnOBsOVYYYjODU6jv\n Z+FH/a9xJ63ttEawYj/PHCzkD/GDJCPC1UYWzengFbcFmQooCPj66640dQuEYFi3iWW0\n drtBan9lQh/eNusmI7VcuuwPKEZQxsO0nTN+09fTLPYcf9XrYLf30N73BaN+jMriJy5K\n qo3Q==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777141342; x=1777746142;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=6bqIXZgDQ/UMUvXqSsKgirnDD5nDcus65tNaiPSkH9s=;\n b=FsqZer3rLTUSL0SOntWc4zNJNRCbEOWDcqY5gx/Cbcs6FF/B7zmFocv15gFABZDj8R\n Eo3r1xw+Kz/SRVFoSHr9zdQf+2L163HeHWcce0ZTOXEao5O1pkRZrs3yaA7pJ82gVya1\n Rb4R//3GoWKG2hIC94ZhdnhayXwKt57hY4f4FJEGTMHZAhvzpjX+1ItFIXPOq7i3hCFb\n 9zd3HV/VWtmeTjA7y+1Me9chiwPKEE4ePKEjLNol6Cu1c6TjGiQdZYUPEvmh1m4XtOsu\n wiS9M4DF52PHwutx4Vt6359jHGXxZodBLL2t0d2DyKePPIGndhEg4DHxCSmEacLA07aK\n CxaA==", "X-Forwarded-Encrypted": "i=1;\n AFNElJ9oZDnIytBaFEPqpjO0DxMlOrLIjomVqlvN8ndyj7upakN2pavD0Ou8Z/2WCToWaBQnbp7dhuw=@lists.denx.de", "X-Gm-Message-State": "AOJu0YxTj1dLnRcwj845WHsSL/JzngBH9G3uedd0GAeeA02XIb+o3WgM\n SuRuH9WIW0+iHNDoOk/NbCujY7hTUuKk0b1VRWVCgTtq6Dpwkc/JLUfdC3Dsww==", "X-Gm-Gg": "AeBDievibZ9fS7e3G3Lu+1PmyGfPNFKgC0Rfj+go4tchsZtFxWFjPqsgQwOvWcC0d6n\n 1R1ACFdTLd03VE/StTc3+cEJcdTHIIZG6gwzibEMt7TX10f8v6FSZoAO9Z+pp9Z1Yhl/chQprjp\n LNkorlaleXIfo43Ufhz52Fu9/hxdgIoKmnCpseKMal5HzVj9RE8I1qJ6pAZeTwzXEg2TFbqWFMy\n 02lXUWZdS5MONObEF7qgmrfTAUGNki7UYJFGLhYj0YYGfr3gRpp8WHaZp2Go9Jb1pb8RCs/1Fiu\n c7uJHxUkYuFfCW3GHBmASqFap4U1V6W5ksEVW29Nh6lx+gLk/OGzCIEcebcmblmcSvxNbtF9AQB\n k7+F1/UKY16Uj12fFAeB3Ca2yZ/PLcW2pQFgBvOy2n21Db5Vncv2m801Y7r9rWj/ZFK4HN/hrMt\n NCn39E0eC0toNPPA2k/xISqDC05ifvGFhkwNj9BYjAuoFk+vG0i65pm3QXyJkxh3BqVDnQDmQSV\n ecQyDooQRGNqoagNR+MOAoBcCDpCNP3", "X-Received": "by 2002:a17:903:2acb:b0:2b4:5b9e:2f51 with SMTP id\n d9443c01a7336-2b5f9fb80demr392994735ad.34.1777104520101;\n Sat, 25 Apr 2026 01:08:40 -0700 (PDT)", "From": "\"Lucien.Jheng\" <lucienzx159@gmail.com>", "To": "trini@konsulko.com, jerome.forissier@arm.com, sumit.garg@kernel.org,\n marek.vasut+renesas@mailbox.org, vladimir.oltean@nxp.com", "Cc": "ericwouds@gmail.com, kabel@kernel.org, frank-w@public-files.de,\n daniel@makrotopia.org, ansuelsmth@gmail.com, mkorpershoek@kernel.org,\n skylake.huang@mediatek.com, lucien.jheng@airoha.com, u-boot@lists.denx.de,\n \"Lucien.Jheng\" <lucienzx159@gmail.com>", "Subject": "[PATCH v4 2/3] net: phy: airoha: air_en8811: use standard\n rx-polarity/tx-polarity properties", "Date": "Sat, 25 Apr 2026 16:06:48 +0800", "Message-Id": "<20260425080649.75688-3-lucienzx159@gmail.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260425080649.75688-1-lucienzx159@gmail.com>", "References": "<20260425080649.75688-1-lucienzx159@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Mailman-Approved-At": "Sat, 25 Apr 2026 20:25:41 +0200", "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": "Replace the proprietary airoha,pnswap-rx / airoha,pnswap-tx boolean\ndevice tree properties with the standard rx-polarity and tx-polarity\nproperties defined in phy-common-props.yaml.\n\nBackward compatibility is maintained by reading the legacy boolean\nproperties first and passing them as the default_pol argument to\nphy_get_rx/tx_polarity(). If the standard properties are absent the\nlegacy values are used transparently, so existing device trees remain\nfunctional without modification.\n\nLink: https://git.kernel.org/linus/66d8a334b57e64e43810623b3d88f0ce9745270b\nSigned-off-by: Lucien.Jheng <lucienzx159@gmail.com>\n---\n``` dts config\nrx-polarity = <PHY_POL_INVERT>;\ntx-polarity = <PHY_POL_NORMAL>;\n\n```en8811h init log with new PHY common props:\nU-Boot 2026.01-rc5--gd1a76e2e4a64-dirty (Apr 25 2026 - 15:37:25 +0800)\n131072 bytes read in 57 ms (2.2 MiB/s)\nmtk-eth ethernet@15100000: MD32 firmware version: 24112802\nofnode_read_bool: airoha,pnswap-rx: false\nphy_get_polarity_for_mode: querying 'rx-polarity' for mode '2500base-x' (supported=0x3, default=0)\nofnode_get_u32_prop_for_name: looking up '2500base-x' in props='rx-polarity' names='rx-polarity-names' default=0\nofnode_read_prop: rx-polarity: ofnode_count_u32_prop: property 'rx-polarity' has 4 bytes (1 elements)\nofnode_get_u32_prop_for_name: 'rx-polarity' has 1 elements, 'rx-polarity-names' has -1 entries\nofnode_get_u32_prop_for_name: '2500base-x' not found in 'rx-polarity-names', trying 'default'\nofnode_get_u32_prop_for_name: 'default' entry not found in 'rx-polarity-names'\nofnode_get_u32_prop_for_name: single-element 'rx-polarity', reading directly\nofnode_read_u32_index: rx-polarity: 0x1 (1)\nofnode_get_u32_prop_for_name: resolved value 1 for name '2500base-x' from 'rx-polarity'\nphy_get_polarity_for_mode: 'rx-polarity' for mode '2500base-x' = 1\nofnode_read_bool: airoha,pnswap-tx: false\nphy_get_polarity_for_mode: querying 'tx-polarity' for mode '2500base-x' (supported=0x3, default=0)\nofnode_get_u32_prop_for_name: looking up '2500base-x' in props='tx-polarity' names='tx-polarity-names' default=0\nofnode_read_prop: tx-polarity: ofnode_count_u32_prop: property 'tx-polarity' has 4 bytes (1 elements)\nofnode_get_u32_prop_for_name: 'tx-polarity' has 1 elements, 'tx-polarity-names' has -1 entries\nofnode_get_u32_prop_for_name: '2500base-x' not found in 'tx-polarity-names', trying 'default'\nofnode_get_u32_prop_for_name: 'default' entry not found in 'tx-polarity-names'\nofnode_get_u32_prop_for_name: single-element 'tx-polarity', reading directly\nofnode_read_u32_index: tx-polarity: 0x0 (0)\nofnode_get_u32_prop_for_name: resolved value 0 for name '2500base-x' from 'tx-polarity'\nphy_get_polarity_for_mode: 'tx-polarity' for mode '2500base-x' = 0\n\n drivers/net/phy/airoha/Kconfig | 1 +\n drivers/net/phy/airoha/air_en8811.c | 60 +++++++++++++++++++++--------\n 2 files changed, 45 insertions(+), 16 deletions(-)\n\n--\n2.34.1", "diff": "diff --git a/drivers/net/phy/airoha/Kconfig b/drivers/net/phy/airoha/Kconfig\nindex da8747939e3..4139df343ad 100644\n--- a/drivers/net/phy/airoha/Kconfig\n+++ b/drivers/net/phy/airoha/Kconfig\n@@ -7,6 +7,7 @@ config PHY_AIROHA_EN8811\n \tdepends on PHY_AIROHA\n \tdepends on SUPPORTS_FW_LOADER\n \tselect FW_LOADER\n+\tselect PHY_COMMON_PROPS\n \thelp\n \t AIROHA EN8811H supported.\n \t AIROHA AN8811HB supported.\ndiff --git a/drivers/net/phy/airoha/air_en8811.c b/drivers/net/phy/airoha/air_en8811.c\nindex 0b974472732..32f06dd6dfa 100644\n--- a/drivers/net/phy/airoha/air_en8811.c\n+++ b/drivers/net/phy/airoha/air_en8811.c\n@@ -23,6 +23,7 @@\n #include <linux/compat.h>\n #include <dm/device_compat.h>\n #include <u-boot/crc.h>\n+#include <linux/phy/phy-common-props.h>\n\n /* MII Registers */\n #define AIR_AUX_CTRL_STATUS\t\t0x1d\n@@ -1046,11 +1047,50 @@ static int air_leds_init(struct phy_device *phydev, int num, u16 dur, int mode)\n \treturn 0;\n }\n\n-static int en8811h_config(struct phy_device *phydev)\n+static int en8811h_config_serdes_polarity(struct phy_device *phydev)\n {\n-\tstruct en8811h_priv *priv = phydev->priv;\n \tofnode node = phy_get_ofnode(phydev);\n+\tunsigned int pol, default_pol;\n \tu32 pbus_value = 0;\n+\tint ret;\n+\n+\tif (!ofnode_valid(node))\n+\t\treturn 0;\n+\n+\tdefault_pol = PHY_POL_NORMAL;\n+\tif (ofnode_read_bool(node, \"airoha,pnswap-rx\"))\n+\t\tdefault_pol = PHY_POL_INVERT;\n+\n+\tret = phy_get_rx_polarity(node,\n+\t\t\t\t phy_string_for_interface(phydev->interface),\n+\t\t\t\t BIT(PHY_POL_NORMAL) | BIT(PHY_POL_INVERT),\n+\t\t\t\t default_pol, &pol);\n+\tif (ret)\n+\t\treturn ret;\n+\tif (pol == PHY_POL_INVERT)\n+\t\tpbus_value |= EN8811H_POLARITY_RX_REVERSE;\n+\n+\tdefault_pol = PHY_POL_NORMAL;\n+\tif (ofnode_read_bool(node, \"airoha,pnswap-tx\"))\n+\t\tdefault_pol = PHY_POL_INVERT;\n+\n+\tret = phy_get_tx_polarity(node,\n+\t\t\t\t phy_string_for_interface(phydev->interface),\n+\t\t\t\t BIT(PHY_POL_NORMAL) | BIT(PHY_POL_INVERT),\n+\t\t\t\t default_pol, &pol);\n+\tif (ret)\n+\t\treturn ret;\n+\tif (pol == PHY_POL_NORMAL)\n+\t\tpbus_value |= EN8811H_POLARITY_TX_NORMAL;\n+\n+\treturn air_buckpbus_reg_modify(phydev, EN8811H_POLARITY,\n+\t\t\t\t EN8811H_POLARITY_RX_REVERSE |\n+\t\t\t\t EN8811H_POLARITY_TX_NORMAL, pbus_value);\n+}\n+\n+static int en8811h_config(struct phy_device *phydev)\n+{\n+\tstruct en8811h_priv *priv = phydev->priv;\n \tint ret = 0;\n\n \t/* If restart happened in .probe(), no need to restart now */\n@@ -1081,20 +1121,8 @@ static int en8811h_config(struct phy_device *phydev)\n \tif (ret < 0)\n \t\treturn ret;\n\n-\t/* Serdes polarity */\n-\tpbus_value = 0;\n-\tif (ofnode_read_bool(node, \"airoha,pnswap-rx\"))\n-\t\tpbus_value |= EN8811H_POLARITY_RX_REVERSE;\n-\telse\n-\t\tpbus_value &= ~EN8811H_POLARITY_RX_REVERSE;\n-\tif (ofnode_read_bool(node, \"airoha,pnswap-tx\"))\n-\t\tpbus_value &= ~EN8811H_POLARITY_TX_NORMAL;\n-\telse\n-\t\tpbus_value |= EN8811H_POLARITY_TX_NORMAL;\n-\tret = air_buckpbus_reg_modify(phydev, EN8811H_POLARITY,\n-\t\t\t\t EN8811H_POLARITY_RX_REVERSE |\n-\t\t\t\t EN8811H_POLARITY_TX_NORMAL,\n-\t\t\t\t pbus_value);\n+\t/* Configure Serdes polarity from device tree */\n+\tret = en8811h_config_serdes_polarity(phydev);\n \tif (ret < 0)\n \t\treturn ret;\n\n", "prefixes": [ "v4", "2/3" ] }