From patchwork Thu Jan 25 20:36:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 13531689 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 1284DC47258 for ; Thu, 25 Jan 2024 20:37:35 +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=gbGf0v5Rlf6Q23C3HVzf8DlQZAjQPhO1b9vkN1JrKVA=; b=k5sjrCQLI3y24H D3uoP00rUDQ8F8jJFfurQuAfj3wvfDI8TnEtzMbiu9MJOQ6tKvAUn6/xMw/q//YHhKKT2B0S8d5bD ga7lb06EJgRkQaI/LzjlAaWbDXT4H5lL68LFl7vdLMB4YF+35/d4Nmo2CxXQCcWpXD3nHCnF2saVa eoQ3TS58gcyEyTcPdm2QB1ql23+37a9+8Ctc+2NIXR1UtCCw+FesKi48uT7DqiBO/bx2xROqOcUGl Ud7whpI2aR0+20UK507tTYW+fGyCXnWzbl5v/RXYyAeZnLrrxYuOL3oonSyo88Tg+/ydHx3RaVt75 GOuOcGE8pGD00ivD5HdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rT6TU-00000001oCp-2KQf; Thu, 25 Jan 2024 20:37:24 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rT6TS-00000001oBp-2c7k for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 20:37:23 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40e800461baso85226855e9.3 for ; Thu, 25 Jan 2024 12:37:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706215039; x=1706819839; 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=usoxiC3FDcTPSibyEkVXiYsO2Tz+iJfHrI4jPy9mSt0=; b=eWQhxfvI0UOxyKVvZe+FqL4VKY8LpnJYKa3w353XHH+CeIP4CZr3MsoVQ6jxmYtotF kHs/Zb/B5aHFDR0diZtC4pbXL5HTorGy4cgs5YNqAve610k5TkVA2B9jf9n/Uo7J2Cn+ /2xSF4aY6J4WKgU65DKt82vYsPSrRK3O0f/L+cwAUhlEpBUKjXhvV8NjUYBQOS3ViPcI lQLxBUBEPPyHaF8UuhZcggzdtuQNbB+VnLyt6BtELosw18UL/MTNika+qP98p/9YSKFC hgkPbivb0C2xnq9qEqEc5Owlfhw4iXeymSpgVRJzBbe3AVaeeWdIxPdPU6o90FEkwuBK 1fCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706215039; x=1706819839; 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=usoxiC3FDcTPSibyEkVXiYsO2Tz+iJfHrI4jPy9mSt0=; b=smRgGaj9yfk0n1EgW3oMA2gteQcsOoU+E0ki7o7qWRShpFV5f3tFZ9z2AFt4klIEtA ky4GtZIjbbk2zqBOLmSn3XFieZf+YLzAgDZKsF9cZPeGICp7XkxhipwOHW02HJjXqT4d Mx/hrslAxYZ+NcmbgUM7r9HGffIry4llCFm0xHnXV8uSw1EfD+txcGAyEdPUm+u15cEd 0RH3L5WbB/aPlbS1SBGwHwFy4VfctJ4Z6lcDvZ8Zstt/Wci5t1pZhOR0/aHTeznN3Ep2 qH+EEisxJ3z/N13WWIeI6dZbY3a6REsoBubaduOwOeh5UjJqKxtc4C6Fxgs4D0V1qias N4Zg== X-Gm-Message-State: AOJu0YwJu4oEhXXyipQ/O7Lgfa1k2WWVunSe0SQm5GBSDbLQ12MufMGJ 6eMaMnX3jvWt4x+ORNSje1xkbDBBICQ9cpnco9+9CV2VIMOwXPG2 X-Google-Smtp-Source: AGHT+IGQqGQu3vY9rJ2Gp7SnjSyos2lXwwvM5FpsVkTmbrG4S5+mPRRKo4ksKFkuuCTkYfWdDYeTjw== X-Received: by 2002:a05:600c:16d3:b0:40e:ccf5:b647 with SMTP id l19-20020a05600c16d300b0040eccf5b647mr95609wmn.370.1706215038444; Thu, 25 Jan 2024 12:37:18 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id j32-20020a05600c1c2000b0040e813f1f31sm3817700wms.25.2024.01.25.12.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 12:37:17 -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 v10 0/5] net: phy: generic polarity + LED support for qca808x Date: Thu, 25 Jan 2024 21:36:56 +0100 Message-ID: <20240125203702.4552-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240125_123722_708755_9F6FC727 X-CRM114-Status: GOOD ( 15.32 ) 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 | 327 ++++++++++++++++++ drivers/net/phy/phy_device.c | 16 + include/linux/phy.h | 22 ++ 10 files changed, 431 insertions(+), 19 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/qca,qca808x.yaml