Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp7044605rdb; Fri, 15 Dec 2023 16:32:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyNLxzzG2NoRstKUm0z2EcJSaFea/3OPpyuGh7SRoja5Ah1F+eEWvu84ztC2MYmkxMECW5 X-Received: by 2002:a17:906:37d6:b0:a19:a1ba:da46 with SMTP id o22-20020a17090637d600b00a19a1bada46mr5749709ejc.109.1702686765432; Fri, 15 Dec 2023 16:32:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702686765; cv=none; d=google.com; s=arc-20160816; b=pdoZI6ahQPlebmyO4vVq/UBbhg/1llNvO7dWBMTUhqjut25WxXiKhCV/Zro0e/WFyT 3j/J1uTMIRRxMWJjOtAclPMu1J9XDqG6LrGajWeW9yDW/Wcna8Ch8h+aPXlmelVFWNtc PPUUdnzrbZlBZ5iQanb2NJrrWyVFvvgr9RnRHDIZJBLXIUvOyYGX0Yz1hG2nylL1Z4BY kQjejB+tMm7AmFQ69djsY5PloXabAna5xjS9Wr0+ApTxKlPS89pJSFVaScw+2ba4lsLm lhESP89ZKDcMYo9T1k9JW84PRXy7GE8HlkzboLccbyhDhJQGtyrVs/aU1PUlKudB3T2g GfLA== 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=I2cQQHTukUtPE/uR7ah1Fmgn0krkwrRifPUQAFLRAB0=; fh=zMhr/QaHlUGdJIFxViiudBM+C42ITh4H3O1f/VExlVE=; b=rEA22EQsv1nb75TlgnLZJzkiQbtaW5JD8Y1FM4tK8Odg6rM6K5nN92UIzohaNrH3Bh 6Rzx2VedoPNS2MYYAL04Zzcb/xQcy5s3h9gnaHNZX27Zu/4nFFJaWKQC/7e5x7wfze+b cMBQznPAhQqEnbPWo4xoxrBwfmoQPzT3NOEqNA+mq/6MQtiiVNgG9O7tp8+TVNjQRiop /TGL9h0WE/hG4UfUz0/NG1Tl4+/dfJCls4p2G4a+2JmOeTIQkI9HZhv3UKUagLaqu6z1 3hFdXHeyVQSAUI1y1V6zS356kNAzQjBm/7nGzE7/5nWigYY1iopECk62AWVAgDHS5bQ0 ijEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Dor0919s; spf=pass (google.com: domain of linux-kernel+bounces-1902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1902-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e13-20020a1709067e0d00b00a1d5826f9e5si7860670ejr.1052.2023.12.15.16.32.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 16:32:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Dor0919s; spf=pass (google.com: domain of linux-kernel+bounces-1902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1902-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 30C8D1F2588D for ; Sat, 16 Dec 2023 00:32:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB3548831; Sat, 16 Dec 2023 00:23:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Dor0919s" 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 366815675; Sat, 16 Dec 2023 00:23:08 +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-40c2718a768so11796825e9.0; Fri, 15 Dec 2023 16:23:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702686186; x=1703290986; 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=I2cQQHTukUtPE/uR7ah1Fmgn0krkwrRifPUQAFLRAB0=; b=Dor0919sjHLJZ4NqGrIyvh5qAm604y+rPPova9ukVvqF8ot6P3u4/aSWfdxNt6MMrW Qk3hO0Xzzezv/lVwrW7wCVZb7/4SGQ67Yaq9SjpvoQKNmtMKmTbmttSStdxC1ximohl3 S5B3hX+K5ghei03lPaS3V4D6xKxrF87pZqa3j2MmP96pWRENWoZKdL4r4cn+w2Bdqz4t g6c8+Yu0jL2UFCqQ9p4yw57kR8RzSEyVkVFtbfrIEFQNv0ZccibiSYugkD7c0/LOh+R2 Gk9OU8mNsB5vr4x+V4YC7Qb68h+8C5hP3dHbePY4WQljEdbwNu6z3/u5MO31sU1rjqeE IBdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702686186; x=1703290986; 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=I2cQQHTukUtPE/uR7ah1Fmgn0krkwrRifPUQAFLRAB0=; b=u0+7sde2nXevrTax6Y2YiDca6Vz8UZVb8DKEVN3+4gERtLMm8SFyo2ZpYiKk+lUNCu EL+mA0kDaMSoYtQz2JtQ8bHcWnMmr2ImywXDFuTgJy3p6L3Oz+FtNISusdCBAJw2W/bM XDbdvK0pzBQ4qwtBLFWrqIC7qw6e51bJ0D/GGTc3OI5w0DTEV8BpKrNnfTWcFpu+9uYX E0ikI0j0GKCYC8lBFXAUh/2nWWR9JpMpSdV9CAcUK053bE8iCl6z2Xu+FsOcTIa/YexB 4cOSyZOA543X5cVTgxfDxU2BNaoT0TNSvXIjcjxtL21Q93X7JC8GPCjlUEBMQcFvXwC7 jCpA== X-Gm-Message-State: AOJu0YwY1UCs1ipdTjMuk3yyK63AVggP72/61NLE/p7U8x5hMC8aZJsg Q3QN5jE/zwso21Gx4UB99qc= X-Received: by 2002:a7b:c7ca:0:b0:40b:5e1b:54ac with SMTP id z10-20020a7bc7ca000000b0040b5e1b54acmr7682448wmk.56.1702686186209; Fri, 15 Dec 2023 16:23:06 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id a15-20020a5d508f000000b0033330846e76sm1496191wrt.86.2023.12.15.16.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 16:23:05 -0800 (PST) From: Christian Marangi To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Christian Marangi , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Tobias Waldekranz Subject: [net-next PATCH v4 0/4] net: phy: generic polarity + LED support for qca808x Date: Fri, 15 Dec 2023 22:22:40 +0100 Message-Id: <20231215212244.1658-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 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 2 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 (4): dt-bindings: net: phy: Document new LEDs polarity property 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/net/ethernet-phy.yaml | 11 + .../devicetree/bindings/net/qca,qca808x.yaml | 54 +++ drivers/net/phy/at803x.c | 308 ++++++++++++++++++ drivers/net/phy/phy_device.c | 45 +++ include/linux/phy.h | 25 ++ 5 files changed, 443 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/qca,qca808x.yaml -- 2.40.1