From patchwork Tue Jan 2 18:38:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 13509266 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 B9B96C46CD2 for ; Tue, 2 Jan 2024 18:39:36 +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=2zt6k6XbBi7ia+bVxIe8SgBaWHDVUMM7HhLcf4Pl2D0=; b=NpK+iGGe2Ij2TQ OlKZ25FgNmKdnvLdWmdicU/fKnCAOc67kr8bQgaEJFs75h2PGJ0B+7JdhF4GjILSOmkUHR01mlPhe 0FPqEOcz/Z01C5/8sjyW6uADCfsEAW8W5tkpjvnTOhygFUx3zLVdhcQz4wAil9PAeUNKeE3j67IHo MEp7dQx+/ID9/dMxHBBFV4IEByuRUzlPQNN3qfl2kdZsztnSdwZ2wRNneS31EldwOdYbnepq/PKt7 4Y6TYkQMoscVM3Xpiy3JIju4cHPnK8jlQfJ6f7ZPq3GQ3t7nkNTEM4itv26t2izQihb4gVUsc0QI7 IWA6O8MJq5+5DHtBSPzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rKjfL-008jZI-38; Tue, 02 Jan 2024 18:39:04 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rKjfG-008jW8-28 for linux-arm-kernel@lists.infradead.org; Tue, 02 Jan 2024 18:39:01 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40d4a222818so46209565e9.0 for ; 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=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=TSbX98OpsIFhknrkPUlnLd/Gb/xC0302JuUUTWaUNQQ=; b=hhVLd3EvRTs8p42SUusG+7onyn8jJHetsFrQt/YvesnKMh2Ijc0YsNGoCfk+LrQSP2 zoj4ENhWqXDKfcGuvtv4gZzH17w1Yj6Ku6lOaacpl0GhjfRJlWvwI2zVlXAmaH3XXT8S MqVrrWpQwNCXvCUlCmyzqbpXISlz03JlbrThRcoRFTM9l0FjrdmEpQQMS2607DcNGbQf KFAvQn12ifb8Q7vkZTP/lSWv0AnGOfXZYm9aoSVvRm2Qej4w+Du/YUiAVlmnFNZ58gv3 fQFglZmI/rvMiv5LrdD+LZkm93/v+wOvncgr45RH+zDclro523bYJCJELDuF2RwsIUYY 2TXA== 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=sARAZKvVxKd4Jcy1mJzE+mjHidOs4dKLGPOoy0ITgCTYsQj8up7912dRlMV3HJcyxA G5B6o7id7tJhxThmdmrGr/3Pu0Vo6Mc1vM9Ls3Pxj/+Qe0XmBuTcJEX3B51imgr8lFxL XXWXgW50DqDL8jeOcjMD09Fv6zPe+4CWQU/+g96vBA+2AWJhn2ZOE5Zzwld2XDbDYUHa Fxrud2JYsYZ+mjvY55+HKwa9+KMMP813L/0IwWNV6O56h9OH0g1XgFOI5EuLKB7SA4Fc d7Ne3nczHoUGdjY3+coJecMKiKvLRBgg9mTr3iIlH0pOKoaI0GZHr+xR0tXYP2Metia6 wujg== X-Gm-Message-State: AOJu0YxT+mmpr9hpwLlce6/O97eGMmsm+3/uW2JnEVyCArveO3gpssGc BRfEiGCdNc7yygEdj/aw29w= X-Google-Smtp-Source: AGHT+IHS1rXQmYTNGbOeFEUNy2APVbixEkLwy9K4cxhk/vuhAL2D1ayBVg6w75D32M9xrGQChzIoaw== 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?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 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 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240102_103858_732681_90E429D4 X-CRM114-Status: GOOD ( 15.92 ) 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 | 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