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: 13505229 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0EE45C46CD4 for ; Wed, 27 Dec 2023 09:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Mw5kw1QVHS7S20sCxBit5uuIof8bWO3AMsRtbF1kHeU=; b=Gt4qVi9IdhxZWH tS0kcPiZ7e+0504KobME3ohf+Ith3MQKcKl0iZT7qq4vPoiCUoFVyFrVbLgt5EfKGQtRpPB3Hs94f Su4KrAjswbeFWj497OJ90soLOQbS/YTMJmGQTOREtRVZozgkSCGhro1XwL7y8qVFCxCvEiQmqjG0u mcCz9N66oQFPJk1tep7SXkxGDClplG9qtK3tRqb7uvtyu7QNy8I50B4c2WVhYVGktbq7YA7I69z6j 31XUY/2bgrl1/IyyipMCNlcox3K+tvQtQP/dF26lrbpqkd1KmqMsV+MfVOyqVT7Jy0gKT2HYJmbWB 9nnCwSOwUHQm6xTkrejA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rIPoj-00EFMy-0z; Wed, 27 Dec 2023 09:03:09 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rIPog-00EFKn-0S for linux-arm-kernel@lists.infradead.org; Wed, 27 Dec 2023 09:03:07 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40d5a9cb423so12039945e9.2 for ; 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=lists.infradead.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=MwW53a/J6TDqhmxGOCD8o74jvfTnBSjLJZwNnGUuXB2p0vnjE9KoWy6PGN53WzTFhg vrAPA8jj4Zqv+l+NnG3K1EfjQ1AJCHzzWd5B11aECIOgBHF1L9lP07IBXRF4/H5284Cw YqKBu5vhcwRQM8FWGVfwZdk1pkZpAAcFFPwM261rWIVH1KO5RWkC6V/5WbnxhBDjDLy4 iXHbTLhiqIvQi5FXpRoJk8/ftC2LazkLGggFkOyS8yrp6lZfIjFajaBDkwakkdWp0R1C AZHguHS5aUWZBa1zsS7zeWrC0N3ddP9OKLqnHG3DX6+Pcr+iwYlbrduGgXTlSoVo/ucd aCsg== 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=k9uHYOaRmefOI9iAAsuTvw+bA/GReKd8RG/tBUf/tTn3iDfzsyeL0GLnIoBSM4vN0Q ULB71yEl2v3pL1yKd6w+h6zrIfXAGumprDsOxUudaB4u8wje2H3F1IL4fk6iydVkkM0P VaIQh063HiyrjH0020Mtj4jvbQVvbjy+gXa/QaYhTzWKev6KXX/4oaqyc0U8BE6tYTne ftw7MtmbB6CmDr4AVE2aYSgBosrUvlzZTFxMklszjrBbBYBJsGR+MyIoKneW8VVsv0rV 74hUAbjRinfBpT0amw4ol8UiRRK2c62WXsF2nGKn0kTsttXNK6JLzrL27/EJWD3B8G8J sKCg== X-Gm-Message-State: AOJu0Yyokgy/+3gCFxsIvmdLPQCmJ9rGmZuRIHFjxPS41lGHxSMpdXWX DME3RJOKFnavQaHapkXAT6w= X-Google-Smtp-Source: AGHT+IHnuyc35+3QB7TWpnYL1hpXdfnP14Z+QTgo+E3w6csqT773gDAld+ldCoxjApvJfhAQ2a0YiQ== 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 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231227_010306_178283_C4C3A8A4 X-CRM114-Status: GOOD ( 14.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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