{"id":2220018,"url":"http://patchwork.ozlabs.org/api/1.2/covers/2220018/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/cover/20260405144944.41074-1-lucienzx159@gmail.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.2/projects/18/?format=json","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,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260405144944.41074-1-lucienzx159@gmail.com>","list_archive_url":null,"date":"2026-04-05T14:49:40","name":"[v3,0/4] phy: add common PHY polarity properties support","submitter":{"id":90627,"url":"http://patchwork.ozlabs.org/api/1.2/people/90627/?format=json","name":"Lucien.Jheng","email":"lucienzx159@gmail.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/cover/20260405144944.41074-1-lucienzx159@gmail.com/mbox/","series":[{"id":498806,"url":"http://patchwork.ozlabs.org/api/1.2/series/498806/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=498806","date":"2026-04-05T14:49:40","name":"phy: add common PHY polarity properties support","version":3,"mbox":"http://patchwork.ozlabs.org/series/498806/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2220018/comments/","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=c7hIJz7D;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; 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=\"c7hIJz7D\";\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 [85.214.62.61])\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 4fpkJy4NPFz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 06 Apr 2026 06:17:22 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 8B0258341A;\n\tSun,  5 Apr 2026 22:17:13 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 5AB348394E; Sun,  5 Apr 2026 16:50:43 +0200 (CEST)","from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com\n [IPv6:2607:f8b0:4864:20::1029])\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 23E168341A\n for <u-boot@lists.denx.de>; Sun,  5 Apr 2026 16:50:41 +0200 (CEST)","by mail-pj1-x1029.google.com with SMTP id\n 98e67ed59e1d1-35c124d2613so1775471a91.2\n for <u-boot@lists.denx.de>; Sun, 05 Apr 2026 07:50:41 -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 98e67ed59e1d1-35dbe959358sm15333261a91.13.2026.04.05.07.50.35\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 05 Apr 2026 07:50: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=1775400639; x=1776005439; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=1O4kxlTNEZdrFi/3Fm7hpl6xZukfsR6ZSyVGicPSyBw=;\n b=c7hIJz7Dv+jkj80sfC0vB4QNkNTBuYTRU+6+VBWLZV52QrAVo5Jl0Vwc2Tln9fM/jx\n CkFBixdubWVYopBkVqK7JCy/PDoYtsS7cjcDBAmahJeR8Nw04848tAAzze63wImnm9WM\n qsDlBA05APm1Irb0bPuEsehaGzAbMOUcdM55J6p4j1o6Ysm8DKttP+z/1rKvqt2LURlq\n 3AAIScvMRYiz1XiD6nQgntBDj1mmQjXwlpCckUbeQTOXC3ZG7PlPXzUDbniTuL1RJ/Dp\n 25ynYt8ZnW/It/PWuf96KvgBon/zkiyNUydaU5YEUO3WXuzgGnp6nxPeGCCj+hpUgk3D\n qI3w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775400639; x=1776005439;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=1O4kxlTNEZdrFi/3Fm7hpl6xZukfsR6ZSyVGicPSyBw=;\n b=nrvAZjpPUAQvxPKeSN2c5fW1W/S3bkv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wC+0p/rRWWh6qNTKNqOYzOJWXFcLPwb1Rv1mp68LS\n CuI3LZHR/0BlWgXVbtLl0FpuFCz8ezM","X-Received":"by 2002:a17:90b:48c6:b0:35d:a22b:80cb with SMTP id\n 98e67ed59e1d1-35de68ec484mr8674493a91.16.1775400639516;\n Sun, 05 Apr 2026 07:50:39 -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 v3 0/4] phy: add common PHY polarity properties support","Date":"Sun,  5 Apr 2026 22:49:40 +0800","Message-Id":"<20260405144944.41074-1-lucienzx159@gmail.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Mailman-Approved-At":"Sun, 05 Apr 2026 22:17:12 +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":"This series ports PHY polarity inversion support via generic device tree\nproperties from Linux kernel, synchronizing with Merge tag 'phy-for-7.0'\nof git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.\n\nPatch 1 introduces a new PHY_COMMON_PROPS library providing helper\nfunctions (phy_get_rx_polarity, phy_get_tx_polarity, and their\n\"manual\" variants) for PHY drivers to read standard polarity properties\nfrom the device tree. The PHY_POL_NORMAL, PHY_POL_INVERT, and\nPHY_POL_AUTO constants are consumed from dts/upstream/include, which is\nalready on the compiler include path.\n\nPatch 2 updates the Airoha EN8811H PHY driver to use the new standard\nrx-polarity and tx-polarity properties, with backward compatibility\nfallback to the now-deprecated airoha,pnswap-rx and airoha,pnswap-tx\nboolean properties.\n\nPatches 3-4 add sandbox DM unit tests for the new library, ported from\nthe Linux KUnit test (linux/drivers/phy/phy-common-props-test.c). Patch 3\nadds the build rule in test/dm/Makefile and 16 unit test cases (8 for rx,\n8 for tx) covering: missing property, single value with no names array,\ncount mismatches, name-based lookup, missing default fallback, default\nfallback, and unsupported polarity value. Patch 4 adds the corresponding\n8 test DT nodes to arch/sandbox/dts/test.dts.\n\nChanges in v3:\n- patch 1: fix ofnode_get_u32_prop_for_name() to apply default_val and\n  return 0 when the polarity property is absent, instead of returning\n  -ENOENT; update @node and @default_val kdoc accordingly — this aligns\n  the \"missing property\" path with the behaviour expected by\n  phy_get_manual_rx/tx_polarity() and is validated by the new unit tests\n- Add unit tests for the PHY_COMMON_PROPS library (patches 3-4), ported\n  from Linux KUnit test linux/drivers/phy/phy-common-props-test.c\n- Add test/dm/Makefile build entry gated on CONFIG_PHY_COMMON_PROPS\n- Add 8 sandbox DT nodes to arch/sandbox/dts/test.dts covering all test\n  scenarios; include <dt-bindings/phy/phy.h> in test.dts\n\nChanges in v2:\n- Drop DT binding patches (v1 patches 1 and 3): already merged via\n  the DTS upstream subtree merge (tag 'v7.0-rc2-dts')\n- Drop creation of include/dt-bindings/phy/phy.h: the header is now\n  provided by dts/upstream/include/dt-bindings/phy/phy.h, which is\n  already in the build's include search path\n\nLucien.Jheng (4):\n  phy: add common PHY properties support\n  net: phy: air_en8811h: use standard rx-polarity/tx-polarity properties\n  test: dm: add PHY common props unit tests\n  sandbox: dts: add PHY common props test nodes\n\n arch/sandbox/dts/test.dts            |  60 +++++\n drivers/net/phy/airoha/Kconfig       |   1 +\n drivers/net/phy/airoha/air_en8811.c  |  58 +++--\n drivers/phy/Kconfig                  |   8 +\n drivers/phy/Makefile                 |   1 +\n drivers/phy/phy-common-props.c       | 286 ++++++++++++++++++++++++\n include/linux/phy/phy-common-props.h |  69 ++++++\n test/dm/Makefile                     |   1 +\n test/dm/phy_common_props.c           | 319 +++++++++++++++++++++++++++\n 9 files changed, 789 insertions(+), 14 deletions(-)\n create mode 100644 drivers/phy/phy-common-props.c\n create mode 100644 include/linux/phy/phy-common-props.h\n create mode 100644 test/dm/phy_common_props.c"}