Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp174210rdb; Fri, 5 Jan 2024 06:27:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGawW0Qlp3/Y/eV+rrpImS8C5mUmYIaMSc4lZeZYRx01I55IykygD2hQDeM58vD63sBhZsD X-Received: by 2002:a05:620a:3633:b0:781:4321:bff5 with SMTP id da51-20020a05620a363300b007814321bff5mr1641750qkb.146.1704464865183; Fri, 05 Jan 2024 06:27:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704464865; cv=none; d=google.com; s=arc-20160816; b=jIIGmxm4rwD2nfobSsU22mVuBnHWubj5as1RguWNCKG2374szg3p9dQ4JifJETpNjq Z9zYWv4OsErTcChVIgb57nYS9Hq1rMz4KmTP3xudwLURsyHsQYL5UE0oO+aj2ELn77N6 IMn5OiBiHjpwwrxAycjRfZoPXkaVtt12ec3B7oeGPnof123GaqqlxnI58qRYCTp2gk9S s0D5nZpAyXN9tQhfkTYp5g3HbHcr//vlM1p6MmTnykG8WRZs3z9RWsUqXxxfOl57YAgB hQIh2W3Rf8QQITDvIHL+aAopyhSa3/0qaaOKp5EKEToF5xxCSjAYJPeHm2iOpo0+woXY LTqA== 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=APs6M2apAcMc7l4gyNVGbiDS8kiXtv8paG4oTVl8I+M=; fh=t/rEUYZBrjIVtJtvItkK7O2t2zLyO6TH9UCXgO6Lsag=; b=eSnxHxtPVJFkgI1+gandRtodfwO0gUtKXvnkYN4d6M8Wp9dMaWB9rkiwTViTIrr/Zh aUgHyurrJoFlerKD6v6bX27ol6ylyvuhth3o+KaggMJydRegRWasOrqQByhxx7T/ZZoA D5IXE6KBsvYxDZrGmw3jwmYuo1yjJE+qaCKG99qzZ3oKk5rezugpNDoBbwQWNLszdOm3 8cREPxbPwqRaVBJUwt9nF0A0RrGH7SPVfr8TgoJ1zG/a9Rg+7fiy3au1FiZMb4FjQL5/ NmgsOY131FGLX3jk76NdHECIfColpSif9/tGCpxJVN4pJHcxQY/iyBi9D2l8MpVAzr4l sXEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EmWVi5xn; spf=pass (google.com: domain of linux-kernel+bounces-17922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17922-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s15-20020a05620a29cf00b007813eebc6b2si1916709qkp.611.2024.01.05.06.27.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 06:27:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EmWVi5xn; spf=pass (google.com: domain of linux-kernel+bounces-17922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17922-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B44461C22EF6 for ; Fri, 5 Jan 2024 14:27:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 483CD2D7BB; Fri, 5 Jan 2024 14:27:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EmWVi5xn" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 00524249E4; Fri, 5 Jan 2024 14:27:31 +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-f43.google.com with SMTP id 5b1f17b1804b1-40e3712d259so9463105e9.3; Fri, 05 Jan 2024 06:27:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704464850; x=1705069650; 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=APs6M2apAcMc7l4gyNVGbiDS8kiXtv8paG4oTVl8I+M=; b=EmWVi5xnxcxZZ1XXRNIERX3OCp9zflu6KisHrOmviY58TiVMUSZMcco1e8EtJC6MK7 d9IAjs2vnZhI9Rn3kOAW1Z7yC7JH8LFulJ2OYs8GulJnXpoNJFknqLLZiYmoXCWbw7Vs r1cPt1PoFq1NLjsXBBc5NSRtWtA7DWu7TTYM9GghnsilLlFUXn8PmmdoRnIIjd6nFNoy buH1GGrUxCrBanbqYMZgBBgSC/Tg5dw2udn/10hE5ptXBy/+EhJTnwjHbj91Giu/1nXc 0fjSc1cILQGPKCxp8U+MHGw5biqNdXnZHdBKNaGc4FKUzCYKNPSP1eX04G1qSBrQWumd BCog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704464850; x=1705069650; 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=APs6M2apAcMc7l4gyNVGbiDS8kiXtv8paG4oTVl8I+M=; b=ME154JN+MZq4qWVg/JOUY4ha1L1xHSt2PAPva/ZNI+CKRuMsl0KI0aYZiAQdBrz7NL GhTLyhMj5tgebWTtsLXHSgfR0IIngkncoku1CiPKubHXfs7/PGM1PyaRcfBhjPFprGpW IrwDlgnZDt6fqHb6ERvto+0XsKQ1jWX2ODI7B0n5jVPszWP97ofDa+4MuwgoSP0/Z3jo P+EXNH5HqGEBoyaEN2+hC0dLCKRyR8rYlujyBDqSJqvFDbRGLqNKE05TaWVyYyGOP59Y tbmx7x3cq/OtdGntF1yjTkhUff7tcigfHifR8btlJGUVKao2t/6Linh01Gieu9lPSYbb NAfw== X-Gm-Message-State: AOJu0YwPzM+wwUrZMMFtQx9fp4wcWqhxC38LgXRu8Y61RBmTLMMDrdCy KZ+C6RiuqiRzgQtzzL0SD3A= X-Received: by 2002:a05:600c:3ac7:b0:40e:3ae4:84ef with SMTP id d7-20020a05600c3ac700b0040e3ae484efmr112839wms.73.1704464849826; Fri, 05 Jan 2024 06:27:29 -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 j10-20020a05600c190a00b0040d87100733sm1721901wmq.39.2024.01.05.06.27.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 06:27:29 -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?q?Rafa=C5=82=20Mi=C5=82ecki?= , 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=20Rojas?= , 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 v9 0/5] net: phy: generic polarity + LED support for qca808x Date: Fri, 5 Jan 2024 15:27:12 +0100 Message-ID: <20240105142719.11042-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 | 325 ++++++++++++++++++ drivers/net/phy/phy_device.c | 16 + include/linux/phy.h | 22 ++ 10 files changed, 429 insertions(+), 19 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/qca,qca808x.yaml -- 2.43.0