Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6712825rdb; Tue, 2 Jan 2024 10:39:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUyDE4B4b/6qHmy3T/EgWr3WdoKEvVwlS/ImehFte5Y8Pem/rQ8Gi8sFv+I6Bw1Qm/okSG X-Received: by 2002:a5b:b81:0:b0:dbd:f01:7b94 with SMTP id l1-20020a5b0b81000000b00dbd0f017b94mr8981119ybq.5.1704220743046; Tue, 02 Jan 2024 10:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704220743; cv=none; d=google.com; s=arc-20160816; b=mjy76BvYsBYXgmYe2M/tVhktBJIH7A26OQwmoD6oZexG18ug2ayV+/5fQe+zw2ZiXH vLdSvshfhUuPUXe6RCJlA3ILYzN7SHVVJX7q6fSGwNAH6RAjhQ3wbjRxM90ao2ax7v8R +SynTnwhInkfaxd71b4vR3RrdLX9IfdQMvHaZNNxeWmNLHrwEHB6hfRzymCjKt/rM3cb pWXOoKqFg3EE9cCJ0UIaQNl2j5ThLlaj86AblVyaNl8sv5yMPe7rElGAk5v5ianQVlPQ vK4L3gGuTbSzs519NcVuNoj+PjlSkll8OJSsFEdKnay1QGrq7l0CSK2xp6TI/C34+VuR oLQA== 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=TSbX98OpsIFhknrkPUlnLd/Gb/xC0302JuUUTWaUNQQ=; fh=t/rEUYZBrjIVtJtvItkK7O2t2zLyO6TH9UCXgO6Lsag=; b=mZx+WStWCOOLEKXeg+3AWHMw9lccXhi2wwkHzV9EyJbfxJtmLyj7rT/K0MRC3IUd+H hXTMzRyniuZQwf8p/RsKOZ7+WIVi8+N3SLtWHyA56hjxvIi9F5lSWbT/u8aUoGM6n8kr ql4A2gEjy1AwJaltJVksC9VrqytiMSAiTIkg+eXv7d0v8Ti3babUmZLieEV94xy8HKoR tJJsoKCRy7RsR0Lr7HsKq4n/vXDpI+PnpKvMibk74yY3kVC0xnHsID/weMpE8Gk5jTbA Ana7/Fl59pufSXQ5ApXBs1OEE2NH0gaEGAZgC7D9k/hfse3nztz5SiwDEZhpSAllF9wM SDHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="F/diWnij"; spf=pass (google.com: domain of linux-kernel+bounces-14717-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14717-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 o6-20020ac85a46000000b004281a9d4a05si5885870qta.276.2024.01.02.10.39.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 10:39:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14717-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="F/diWnij"; spf=pass (google.com: domain of linux-kernel+bounces-14717-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14717-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 C8DF21C2299D for ; Tue, 2 Jan 2024 18:39:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F70415ACC; Tue, 2 Jan 2024 18:38:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F/diWnij" 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 0F307156EF; Tue, 2 Jan 2024 18:38:50 +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-40d2e56f3a6so55564005e9.1; Tue, 02 Jan 2024 10:38:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704220729; x=1704825529; 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=TSbX98OpsIFhknrkPUlnLd/Gb/xC0302JuUUTWaUNQQ=; b=F/diWnijXehkaytk6d6bz516XLsD6t29KKBQLoUd9wiI7FxEgYSe1HuQrXWq4SzNUf uoZIjjBKFspPIjfTbaZIrSCmcQ4kbALgQoy1cE7/DHCZWEB29KmHt8zU+gzA36tolp21 vQVeQOYbpELVh4o63Qy4U2MEz/G8Ozg1j2d+gJwe68EElPcEmQV61hQ/Sro7VAGjFkkH 9lKUQ5v/UK9uNPtKwD4ITMP7GVkAG/t4S3xgezWauUvqg5lsgLpHEHEl9xA5KYMRIZzu 34QOo9BUNn4iJc3iFbCyzY9zmqcZr4k1kPTzBndTdX2IKwJ1XwJbk+l7OXPBr9gY6WdX P00Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704220729; x=1704825529; 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=TSbX98OpsIFhknrkPUlnLd/Gb/xC0302JuUUTWaUNQQ=; b=ARZkmpptTy0FjyZiZjYFwPoij8nfJanwf07BzVOa33IZDrUdLlerX4MoLq16fYPDaX DA9ZQYb2krKk+NtUtXz2zpCIYF4ooO+fbikb4rkzxkTnDEefL3Moqv/w7QuoNYXufcyP KJsPh8zRGNChmD7t/WNSJepukyqbdBdu9+Z0PWpQEWr6XNRxt76l6kvb2lfNJ9U6VV79 Tc78CxFUC3R3eNeLDDPelMTduZa3XQkMXp0IVh9k8IsJVUcnLOwfOHFe3fZ0JeWxP2+F ya9lOz/W3fg4L0HWzCNIwsuE4NA0LXe5KmETMETYXG8y3PYInzjUqf5WR9N/aT+z1tOI Rhsw== X-Gm-Message-State: AOJu0Yx/mJpbspeFnbM3dzr+Z8pLFFcel5q22zuTal+Z6v6Bdh9Hgn+z J6hB7kJuH5t7e7V7l2okJv4= X-Received: by 2002:a05:600c:3542:b0:40d:5a6f:fb72 with SMTP id i2-20020a05600c354200b0040d5a6ffb72mr5752891wmq.57.1704220728913; Tue, 02 Jan 2024 10:38:48 -0800 (PST) Received: from localhost.localdomain (host-87-10-250-100.retail.telecomitalia.it. [87.10.250.100]) by smtp.googlemail.com with ESMTPSA id p15-20020a05600c468f00b0040d4e1393dcsm37963071wmo.20.2024.01.02.10.38.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 10:38:48 -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 v6 0/5] net: phy: generic polarity + LED support for qca808x Date: Tue, 2 Jan 2024 19:38:29 +0100 Message-ID: <20240102183835.5332-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 | 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 -- 2.43.0