From patchwork Wed Dec 27 09:02:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 18546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1319632dyb; Wed, 27 Dec 2023 01:03:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGC92xcUr5KpNr8CtI0I2henM0q6BoVaJLn+9AnD9h+N3/DSLcVzxSsWYCc1ajZNnZPrylk X-Received: by 2002:a05:6358:7f07:b0:174:e7e7:c16a with SMTP id p7-20020a0563587f0700b00174e7e7c16amr3151098rwn.17.1703667808897; Wed, 27 Dec 2023 01:03:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703667808; cv=none; d=google.com; s=arc-20160816; b=Db6mxT320iCGC5c6o1B/6Cvsb54pNbJkFxPquB723G+EliWYcVChKDmO+KAv8ruBRL 3GzmgKc+QIofYHvOs/KyXU51oHAPx9AI0Ni/rVBZhhCK3ZLVXeBfajUE8aaoS58/hVfD EMYaCIK+3zH1zhoUN5W8X/y13N19AMpWDQrXxhJK0tecHSox6NWZE7kpp7oSqTM66Xup Dns2LOVx7hWtSyldPFTVWIy8O+h/g9N2hn9RSf2R/LjkTpy4bhVpl0qJD37S7WkD0hmu uQSO3Y3pwEDQDrmksSH0P7g3oBfVM7/a70t4VJ25Z3Q4w9wsMtXbuAis1Dq81odHJfHm K6kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=z63r7pTq+SRGl9GETybyvgqCF34V04xy6H98jsuZPZI=; fh=t/rEUYZBrjIVtJtvItkK7O2t2zLyO6TH9UCXgO6Lsag=; b=sYb5SjScPvVmIfs8fV8CYL8o7MrGNILIWLgURaRotz1xwJqqPTe4fGI2pEA+OyU5DY p+6uqN7erfYggd98UBQcSSNI2tAoRpJREg1cKlknk5/mQau6hWZbbsm3ymXt7ZSGixmF WWUFWwXhfsVlFNN85rA0W7hnjgZSXntZOvMxyxuwrfjuppawHyDCzfVLK61GgRZt8+hI GhfR0rEv4oxJF32i/XkjqnDXaldBRqBnSfVYi75LlBplmcHmb5Qm7KUM1zcYXgODXyuA B01rHiBOqIYogElhR8cK5IowK0gAZdZmD4iRYxT1xw83qGfxd6FUDuAff71pC+kDbgTs 0lRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WjyB78eV; spf=pass (google.com: domain of linux-kernel+bounces-11915-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11915-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id g14-20020a056a00078e00b006cdeb7e9f6dsi5866366pfu.234.2023.12.27.01.03.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:03:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11915-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WjyB78eV; spf=pass (google.com: domain of linux-kernel+bounces-11915-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11915-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E6702B222F5 for ; Wed, 27 Dec 2023 09:03:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6BE22C684; Wed, 27 Dec 2023 09:03:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WjyB78eV" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBA3C24B2A; Wed, 27 Dec 2023 09:03:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40d514cbba3so36347925e9.1; Wed, 27 Dec 2023 01:03:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703667784; x=1704272584; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=z63r7pTq+SRGl9GETybyvgqCF34V04xy6H98jsuZPZI=; b=WjyB78eVUW0jNKrhcEjddivwhRngwIyVYc6jwaxeW9rdgBgNBtB2dhrdDT9LSON4jX xA58WHUVehWFkxBlmIcjm12vPKm81ZxgwjbchCxUlEn4LB+ygsnZV5qzia9RfQaJk38i yA9zSQ5z1QOEup6HZrMwIxtU2Rf37nmTv34+vGn1UMiz0tByVi2/ILpHjzNwYRBGoq7l IhnECBkjHSxMHu06AHRilRPYyeTwdoPvwReBbHn1VVzIk9h0NyXZrjwrMJ+8BURr+xIE bsCffrak7AS3jbsU0qbrYqxTloC608ldgC/TccibaHMBaFhtkyUildxSn+T96UUXuc/v +HdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703667784; x=1704272584; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=z63r7pTq+SRGl9GETybyvgqCF34V04xy6H98jsuZPZI=; b=dmP5TswD1PS5K/v10pC25DuQPMQtVfGjqdi2aO47a+ghcTaJ4Yw+5/uRPtz4r7rW16 E/M/j0wcsXX4hUPutxRnvXe7AqOq49kMw2ehPySZaV1CjRwp6qkD5ieA6WH4DeaFWWoM UBbSUup1t4N1Gh8grcni0plQWlb0y8ETRXmLLqanBgBLdEHWmHsoJDWTLWLUnAKYzUeJ 2CTR2vOUME8AuMiBpx4VdJcVKUmX1Mhxgv96FtaJIeeBgroVX/GHLgf5BM2mCvnaej0A 2q43BtQyVXXijaWXISyeoeVPSi52B5Trync+0YuVg9YCmg+Ie4rYoZNkXY07GulhFMeq LR/w== X-Gm-Message-State: AOJu0YwdVaS17cJ/2xsCEYRg4RqdBV4s1TQV7FyWqPPMAiJni4cuxLRq 4EKjNQGZNAaP4v4g8CNmhYo= X-Received: by 2002:a05:600c:538a:b0:40d:2cdb:c99d with SMTP id hg10-20020a05600c538a00b0040d2cdbc99dmr4595418wmb.46.1703667783651; Wed, 27 Dec 2023 01:03:03 -0800 (PST) Received: from localhost.localdomain (host-95-250-248-68.retail.telecomitalia.it. [95.250.248.68]) by smtp.googlemail.com with ESMTPSA id c9-20020a056000104900b003368849129dsm13616525wrx.15.2023.12.27.01.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:03:03 -0800 (PST) From: Christian Marangi To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , William Zhang , Anand Gore , Kursad Oney , Florian Fainelli , =?utf-8?b?UmFmYcWCIE1p?= =?utf-8?b?xYJlY2tp?= , Broadcom internal kernel review list , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , Russell King , Jacek Anaszewski , =?utf-8?q?Fern=C3=A1ndez_Roj?= =?utf-8?q?as?= , Sven Schwermer , Christian Marangi , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Subject: [net-next PATCH v5 0/5] net: phy: generic polarity + LED support for qca808x Date: Wed, 27 Dec 2023 10:02:26 +0100 Message-Id: <20231227090231.4246-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786425176557969690 X-GMAIL-MSGID: 1786425176557969690 This small series add LEDs support for qca808x. QCA808x apply on PHY reset a strange polarity settings and require some tweak to apply a more common configuration found on devices. On adding support for it, it was pointed out that a similar feature is also being implemented for a marvell PHY where LED polarity is set per LED (and not global) and also have a special mode where the LED is tristated. The first 3 patch are to generalize this as we expect more PHY in the future to have a similar configuration. The implementation is extensible to support additional special mode in the future with minimal changes and don't create regression on already implemented PHY drivers. (changelog present in single patch) Christian Marangi (5): dt-bindings: net: phy: Make LED active-low property common dt-bindings: net: phy: Document LED inactive high impedance mode net: phy: add support for PHY LEDs polarity modes dt-bindings: net: Document QCA808x PHYs net: phy: at803x: add LED support for qca808x .../devicetree/bindings/leds/common.yaml | 12 + .../bindings/leds/leds-bcm63138.yaml | 4 - .../bindings/leds/leds-bcm6328.yaml | 4 - .../devicetree/bindings/leds/leds-bcm6358.txt | 2 - .../bindings/leds/leds-pwm-multicolor.yaml | 4 - .../devicetree/bindings/leds/leds-pwm.yaml | 5 - .../devicetree/bindings/net/qca,qca808x.yaml | 54 +++ drivers/net/phy/at803x.c | 333 ++++++++++++++++++ drivers/net/phy/phy_device.c | 12 + include/linux/phy.h | 22 ++ 10 files changed, 433 insertions(+), 19 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/qca,qca808x.yaml