From patchwork Wed Jan 3 14:12:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 13510652 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 222CDC47073 for ; Wed, 3 Jan 2024 23:05:23 +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=Qzy3IPqGIlFZqKNUx+cyjFPRhQAPnK7uE3Pi86HPeCA=; b=FC5jVmGwWJlZjp QNFgJKCEPbUlDrSQl4HqvVfXifl8IX/CRhqJrt0BK/enTgCRb+bFIOtXz6W/0N972AnMB19FPkggL AHrUbqyH8IAb/Gek6AAwFXvE8hk7Ke/cy5NX7jGvgl4v7nsV2YsIQqU0PQjAwO9kc81cybHR6lZeH YQT1U+oibEieClLY5cxQIUAEnyzusslV/fsI1LznU2RSB/T/RpQqTlpNXwWDwAnLjJe/AeYu1VHOr tCOTkoo/6g142j0GOVNgp0uZre6Fir7Udx73+joM3povS9UzChEdIkDpzes9S/WJIkxW+I/fm5GXl bnCoOG8PzRqOgaSaj2gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLAIF-00CMNG-0O; Wed, 03 Jan 2024 23:04:59 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLAIB-00CMKH-30 for linux-arm-kernel@lists.infradead.org; Wed, 03 Jan 2024 23:04:57 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40d88f9e602so27985125e9.3 for ; Wed, 03 Jan 2024 15:04:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704323091; x=1704927891; 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=EKP/S6XSZaDGcudVaS0h8PY9BVZmPCIH7/appJgF/zE=; b=AnHXATfHuEWGj1bz8Adln+nLqxJMYcdN9gDT0W0yteUKrlYGeRR1u8lRJ47t5Q0Cvo Z29f7yIN8vHICKltKXwsKiNeWu78FJi2u5aBIVWmuUZF+G+MUan9a4GQ3gjK+BB5S53D Kd/iCVffmCY8gCG3MOh2PkcZNtF9m6eYEMl6dl6/vJJpTT2mA8/b1rIPHm0x5+w60Iuk EFh9YG6bbWxor+HZiG4pAxr4+PZd3VCpCg98uAGR6PSSrys+ngq8fjxoOr/MvXaRGm/i D/Azspmr8ozBsFYiuizyk0gTE5oo9UfbCCgxTIGkme57vjkyZuup64K1T/AcE8gPmpPy +MTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704323091; x=1704927891; 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=EKP/S6XSZaDGcudVaS0h8PY9BVZmPCIH7/appJgF/zE=; b=EWCXYnHnU8MLGbL8Q8dSwrUN2hET9JIbV6Bf0a17ypLdTTSC5n6EwEJSIHI7Q7dy5M zqox8yRPDfhh7y8SGN+djhzj1Eg+YRoFbdc+qXX74FJu35iSPOgOnY1f4CeyE8kmDjqT P9Y0DUCmqzglAyB9czhpzNOr7yIkWs7ZaWSJdvw8XmAUo8SXdEzrn9fabEPHY2sB/u5l HtaOzODGZTfWE1/5wa36voVRWBr6NB+Kpx4kWEeYv8afsrGR+cYhJe25ZejmBhPT/Rez 5gCFMTkv8CKt5HM/f27bbhGHQY10ZV7eJJwELNgPhGYh6A3r3k19jWU7HNErdofjWZUC qqMg== X-Gm-Message-State: AOJu0Yzq6HrXfHg+sGxTiMavgJrgCF4zCU/8x73duw/bPRpnISDL0Lm1 a0/uGJKY47oPnIxofll4P1U= X-Google-Smtp-Source: AGHT+IG1+90FL/z53soE2V8+HrXb98ZdAJ4W4hmXkScdkrI8R6H31ryA90iwZMBeRr9IjlI2AKzZ5g== X-Received: by 2002:a05:600c:2116:b0:40d:5fd4:ce2c with SMTP id u22-20020a05600c211600b0040d5fd4ce2cmr5275517wml.53.1704323091218; Wed, 03 Jan 2024 15:04:51 -0800 (PST) Received: from localhost.localdomain (host-80-116-159-187.retail.telecomitalia.it. [80.116.159.187]) by smtp.googlemail.com with ESMTPSA id w13-20020a05600c474d00b0040c46719966sm3740969wmo.25.2024.01.03.15.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 15:04:50 -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 v7 0/5] net: phy: generic polarity + LED support for qca808x Date: Wed, 3 Jan 2024 15:12:33 +0100 Message-ID: <20240103141251.23446-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-20240103_150455_969336_C73578D5 X-CRM114-Status: GOOD ( 15.16 ) 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 | 326 ++++++++++++++++++ drivers/net/phy/phy_device.c | 12 + include/linux/phy.h | 22 ++ 10 files changed, 426 insertions(+), 19 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/qca,qca808x.yaml