From patchwork Wed Dec 27 09:02:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 183439 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1319806dyb; Wed, 27 Dec 2023 01:03:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLTtpN55Uvmrq+R+u9DvXOFJ+GUHLY1rTXRVOvL+6jvmUbzaRiCRliklyjuziNSUvAEkJ0 X-Received: by 2002:a05:6358:99a0:b0:16b:fe18:27fc with SMTP id j32-20020a05635899a000b0016bfe1827fcmr10243209rwb.31.1703667831746; Wed, 27 Dec 2023 01:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703667831; cv=none; d=google.com; s=arc-20160816; b=07sgUcLrOkKSIJ4GetddkoDm8Ly+km6FZj6BCezdxiRfEBdGSvrjmNrdZFq+a2UnaV OGuXs470qlmfCQbNsn/nYaqClkYp6czulR6J33dZ8+qMNCHN9W6xK1you82v06orrrbh maPht52uwSFT787j6C7tDSWqLIzbf6ozgEsbAMviWPjEWMuvoL8fbjco+GsK00fM9Ps6 eIWkTiOs7RCy2BJ1xq0qmRZedMXJt3fS/XKfqdVKWFkyRKUc3TP3Mzr75tAuAFQUcwdj 4LZ4MoU5a/35CKFQzMIgBCwkSnSNMQ7euf4VP6eQtwIeUKL419U8nndehsvAhIwnF/tn LUhA== 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:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=HEHmC5iKOCQu4l12DtoKmZcnhnrMLLjw+Ox9XPLFhKQ=; fh=t/rEUYZBrjIVtJtvItkK7O2t2zLyO6TH9UCXgO6Lsag=; b=sGHtGIPHVWIYtj52eTcMVwu9ivJv0bek4e935ccTAk0lcwUFwq994qcB+VprdMDzXu e0rD8iaubbzSKV9oxCnRRWHsDVk7O/8niQmjHz2VNUy3qz/oT7vlvX6X5atX2bhhkRcX 4WEHAdkdrkVSJBMJeKJUptBpwLg1mgjzaxkNfJF8zepvQbuHnkJOx4NlPSEDuCnADGli mEvbArS+I3CDWsvAiEtgUsPXaaaW+gUXrODT5FGXSLo+wiO3WEoWZtrbZvFxQ15HJNR3 pZCzobwF2X7O6P9qfp4IpsklnSZSpU290BPpueWbyAY7ZMeS1whHigkOk3m60sHQmvW6 HdHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TuuNf1il; spf=pass (google.com: domain of linux-kernel+bounces-11916-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11916-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k13-20020a63560d000000b005c6251da182si10918000pgb.226.2023.12.27.01.03.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:03:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11916-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TuuNf1il; spf=pass (google.com: domain of linux-kernel+bounces-11916-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11916-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7BAA028362C for ; Wed, 27 Dec 2023 09:03:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 663FB2D791; Wed, 27 Dec 2023 09:03:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TuuNf1il" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 2CFDF250F9; Wed, 27 Dec 2023 09:03:07 +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-wr1-f49.google.com with SMTP id ffacd0b85a97d-336c5b5c163so934709f8f.1; Wed, 27 Dec 2023 01:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703667786; x=1704272586; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=HEHmC5iKOCQu4l12DtoKmZcnhnrMLLjw+Ox9XPLFhKQ=; b=TuuNf1il+1qZAXeeO4Rle/pYVzw01gNKNlnVsSEdLKJ0BCP0ofgOYFGA+xf0RP6PJp +muZ1vpGHS7Rb/r4aXct0ak5pqRuH110UKyMWfzVI2PgmX6REU0m6cHHVH9XyMFpGbPt EklsOmRAsLhj1Rup8Y8ECW3XQcxf259Q5F/kYA/xq9S9t551/OvByxSkokku53DFbQW7 O3IpSSv8EBFZBYJQH/R7ND7D9iF6T2OafLDyIp5xtspImD8GV1fuBlsJs2yYGLPGSPUi CxKgObPuI1XB2b9XFSrQaHYqX783DyT7hcGzQVwhCJOKBZErDewZueAMwmjhBHkn/mx0 mVXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703667786; x=1704272586; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HEHmC5iKOCQu4l12DtoKmZcnhnrMLLjw+Ox9XPLFhKQ=; b=uU0lvo1za5vuq/oymAfFLZJ4KS+Xm/Gp9YQS+WY3+qh/OBb2NRkAM5/lB14QOZ/804 Wr0UkO0HTCKSkFQAAvhriK+UIBizt8/ndW7HEwpUMlA5lXovKCxKzwd5mXUG7OTxo2f/ Unn7tKBhI6MZkCaMoM61gSqlmAdnpHBOUtXiSoXEpR+EqdCdy46pyM6R9LwU/TuQzaz6 lbasVuLAB2OQFPNgDOowLR18DRfRwGE5aF8zFC0wOrTgm+muKLPreSRwnM77M1oIEvgq qpH3w89h0q05IBW934FGdrAJMV+G43L4FrtYTyHnav5Np4AknSHkwXv4qZgj7EROL3zw /neQ== X-Gm-Message-State: AOJu0Yw5e+6Q6qRUEDkqFl8fG2XlWQ4X92I01foEZhGUJyY0x1tHXYJu krNW76ozJ2EvpSaIfZOBjHY= X-Received: by 2002:adf:9bcc:0:b0:336:5499:47dd with SMTP id e12-20020adf9bcc000000b00336549947ddmr4499910wrc.6.1703667786095; Wed, 27 Dec 2023 01:03:06 -0800 (PST) Received: from localhost.localdomain (host-95-250-248-68.retail.telecomitalia.it. [95.250.248.68]) by smtp.googlemail.com with ESMTPSA id c9-20020a056000104900b003368849129dsm13616525wrx.15.2023.12.27.01.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:03:05 -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 v5 1/5] dt-bindings: net: phy: Make LED active-low property common Date: Wed, 27 Dec 2023 10:02:27 +0100 Message-Id: <20231227090231.4246-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231227090231.4246-1-ansuelsmth@gmail.com> References: <20231227090231.4246-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786425199894436147 X-GMAIL-MSGID: 1786425199894436147 Move LED active-low property to common.yaml. This property is currently defined multiple times by bcm LEDs. This property will now be supported in a generic way for PHY LEDs with the use of a generic function. With active-low bool property not defined, active-high is always assumed. Signed-off-by: Christian Marangi --- Changes v5: - Make active-low generic Changes v4: - Drop support for global active-low - Rework to polarity option (for marvell10g series support) Changes v3: - Out of RFC Changes v2: - Add this patch Documentation/devicetree/bindings/leds/common.yaml | 6 ++++++ Documentation/devicetree/bindings/leds/leds-bcm63138.yaml | 4 ---- Documentation/devicetree/bindings/leds/leds-bcm6328.yaml | 4 ---- Documentation/devicetree/bindings/leds/leds-bcm6358.txt | 2 -- .../devicetree/bindings/leds/leds-pwm-multicolor.yaml | 4 ---- Documentation/devicetree/bindings/leds/leds-pwm.yaml | 5 ----- 6 files changed, 6 insertions(+), 19 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index c8d0ba5f2327..f5b40df6b421 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -200,6 +200,12 @@ properties: #trigger-source-cells property in the source node. $ref: /schemas/types.yaml#/definitions/phandle-array + active-low: + type: boolean + description: + Makes LED active low. To turn the LED ON, line needs to be + set to low voltage instead of high. + # Required properties for flash LED child nodes: flash-max-microamp: description: diff --git a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml index 52252fb6bb32..bb20394fca5c 100644 --- a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml +++ b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml @@ -52,10 +52,6 @@ patternProperties: maxItems: 1 description: LED pin number - active-low: - type: boolean - description: Makes LED active low - required: - reg diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml b/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml index 51cc0d82c12e..f3a3ef992929 100644 --- a/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml +++ b/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml @@ -78,10 +78,6 @@ patternProperties: - maximum: 23 description: LED pin number (only LEDs 0 to 23 are valid). - active-low: - type: boolean - description: Makes LED active low. - brcm,hardware-controlled: type: boolean description: Makes this LED hardware controlled. diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6358.txt b/Documentation/devicetree/bindings/leds/leds-bcm6358.txt index 6e51c6b91ee5..211ffc3c4a20 100644 --- a/Documentation/devicetree/bindings/leds/leds-bcm6358.txt +++ b/Documentation/devicetree/bindings/leds/leds-bcm6358.txt @@ -25,8 +25,6 @@ LED sub-node required properties: LED sub-node optional properties: - label : see Documentation/devicetree/bindings/leds/common.txt - - active-low : Boolean, makes LED active low. - Default : false - default-state : see Documentation/devicetree/bindings/leds/common.txt - linux,default-trigger : see diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml index bd6ec04a8727..5edfbe347341 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml +++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml @@ -41,10 +41,6 @@ properties: pwm-names: true - active-low: - description: For PWMs where the LED is wired to supply rather than ground. - type: boolean - color: true required: diff --git a/Documentation/devicetree/bindings/leds/leds-pwm.yaml b/Documentation/devicetree/bindings/leds/leds-pwm.yaml index 7de6da58be3c..113b7c218303 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm.yaml +++ b/Documentation/devicetree/bindings/leds/leds-pwm.yaml @@ -34,11 +34,6 @@ patternProperties: Maximum brightness possible for the LED $ref: /schemas/types.yaml#/definitions/uint32 - active-low: - description: - For PWMs where the LED is wired to supply rather than ground. - type: boolean - required: - pwms - max-brightness From patchwork Wed Dec 27 09:02:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 183440 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1319946dyb; Wed, 27 Dec 2023 01:04:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHlxKRUqeCWNTCIdtMF8dgJJlhvrahz+kjuoE/aQHG0dVbM3ATZ7eLya0YfENsbwdaesWPP X-Received: by 2002:a05:6402:35cb:b0:554:9e2d:1f47 with SMTP id z11-20020a05640235cb00b005549e2d1f47mr4274448edc.57.1703667848359; Wed, 27 Dec 2023 01:04:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703667848; cv=none; d=google.com; s=arc-20160816; b=TYzqU60LeZQs8n+sQAeKLoozlMXfoxgAnzcg+u8qEWAuYxbDMcNqyIlqkatzcfp5tg ss+H7XMLqBwpqG/vBqgustIsaGZX5emwPGsrRb0ZZMl6NoVUeHRXo23/t6FRDVyMnAKJ LQZY9kbI+UJnSd3b3OlQx5EKFjxGeRdriK1fEWMG6ZnBcFUvXPS5DfteP792aRSlPvO9 H04mRFKWJFYvdt8GaOJ+rQPVhVOcHMnOCR3v4MoBC2g/dJqusRUg8b3pEKSOJKCK2tjb Li8guwYVHoi/nUle9zZ1OkOMTm/PLbXD3js8p/5JJvl1nDQQVIOFm2NIuex7wFdpYkU2 16Vg== 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:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=Cmsj+MoZd6CCP0Gk1jswJO8zXGhPor2mMopnaqDXKNM=; fh=t/rEUYZBrjIVtJtvItkK7O2t2zLyO6TH9UCXgO6Lsag=; b=UKrMrTxuy7ZaFX7VmcYA4ZVO9P8j1OfQM5l+xEidfdESQzqIYGPn35O5sZjS1iaOrh SvQk2RFcAdpPfWV1eYL4W5FUmQulB5hWCnykvV57o2IYRmGj44jpxjCWFW7GiUjcSLjA 9ZzqFJjiSyVjwErwTLqqXi/fxY/jAg3Cp+sLZOnQ/lrNBVtr4qOzNB8LCM44WLtpbhAj 1zvYqikXVbG69hwU1L6XxBVrpvCV2ZlqBXG8DSkkhmQH3Mx6/vC7rE32TIO2Jleeq/2s a8DX/VgSwKlrezy0eXmaNGRGbrUQ2XMIwdST6VeOpO0GcZAtuP2G8AIkHIvJXSb52v0b lqZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YjH+9fVK; spf=pass (google.com: domain of linux-kernel+bounces-11917-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11917-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v14-20020a056402174e00b0054d16bc8e7asi6127610edx.499.2023.12.27.01.04.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:04:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11917-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YjH+9fVK; spf=pass (google.com: domain of linux-kernel+bounces-11917-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11917-ouuuleilei=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 F35E51F2184D for ; Wed, 27 Dec 2023 09:04:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8BA262C6AC; Wed, 27 Dec 2023 09:03:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YjH+9fVK" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 7CCEC2CCDC; Wed, 27 Dec 2023 09:03:10 +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-wr1-f50.google.com with SMTP id ffacd0b85a97d-33666fb9318so4831092f8f.2; Wed, 27 Dec 2023 01:03:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703667789; x=1704272589; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Cmsj+MoZd6CCP0Gk1jswJO8zXGhPor2mMopnaqDXKNM=; b=YjH+9fVKdUOukVscAmESs9ja0wqCtPBjpXJse2CT8r61btQoKu6/bmz6ByqplB42OQ VSj9VFBIvk0Bhlq449m3mVgJwP5NRGgVZ3TzlANwQB0WgVOe+bimVlunvRdHF6AILQCV utk0u6KXEVV76BNG3eYfZkndp/mEQ0OIWt2FBVx2ZTTayt69pxi50r6mA7/dsroKHAV/ nQWz/kpChQZunOquMXoC+ebt3SadI4XEhjz2zOfdqPve3Ivy6/B6dYzvuRF80+ZaugsW RacyWiwtAgK9igbM62tN+yBvLnlhBr9TXp7zbOtC+ghhpo5Syrs0mF9QiRxZ3UTUBnHB U3HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703667789; x=1704272589; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cmsj+MoZd6CCP0Gk1jswJO8zXGhPor2mMopnaqDXKNM=; b=BIEzq5dRv8rPhaaT/LfU8MijsbbHMt6Ny/Umnc8XskzzK9U+pgyspW5tQjPoSzAvpt jc8sngV9LJIwUR+OIbOPWVGJQ9dpQ0ft92W6dJZRldFwnQ0TafmUCtzt3Ktj17AbLj2w YKp2SIbI0HO1eaxcR4PxS2dUlX57/of4MkYe/5PpaHBBhbwt5qvBCHekgKJOM3Bof48U vsHR0DkIfJuvl9Wy3OtxkybprUnT6+Ju9cv/bwcUNM1dWN78bSV5HUkg/GbVTKaUz/ZH B8e0pLIm3xlusb0S1d5AeN76HpN/yTusbkx+yscglNc0m79OpkQDy416/83cGhjByBrZ l0iw== X-Gm-Message-State: AOJu0YwlqPK/CvnoHuBa5LXIB6ee7vIRgAQ72SKe+PBxtGrOyetyXuP9 lqpmvXnNZzbMin0AKQE+d/k= X-Received: by 2002:a5d:65cc:0:b0:336:7bf2:89da with SMTP id e12-20020a5d65cc000000b003367bf289damr4865220wrw.95.1703667788502; Wed, 27 Dec 2023 01:03:08 -0800 (PST) Received: from localhost.localdomain (host-95-250-248-68.retail.telecomitalia.it. [95.250.248.68]) by smtp.googlemail.com with ESMTPSA id c9-20020a056000104900b003368849129dsm13616525wrx.15.2023.12.27.01.03.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:03:08 -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 v5 2/5] dt-bindings: net: phy: Document LED inactive high impedance mode Date: Wed, 27 Dec 2023 10:02:28 +0100 Message-Id: <20231227090231.4246-3-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231227090231.4246-1-ansuelsmth@gmail.com> References: <20231227090231.4246-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786425217934101637 X-GMAIL-MSGID: 1786425217934101637 Document LED inactive high impedance mode to set the LED to require high impedance configuration to be turned OFF. Signed-off-by: Christian Marangi --- Changes v5: - Add this patch Documentation/devicetree/bindings/leds/common.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index f5b40df6b421..9e7b4aabe0bb 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -206,6 +206,12 @@ properties: Makes LED active low. To turn the LED ON, line needs to be set to low voltage instead of high. + inactive-high-impedance: + type: boolean + description: + Set LED to high-impedance mode to turn the LED OFF. LED might also + describe this mode as tristate. + # Required properties for flash LED child nodes: flash-max-microamp: description: From patchwork Wed Dec 27 09:02:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 183441 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1320085dyb; Wed, 27 Dec 2023 01:04:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxvly+QAv33pDTwJUuzyQaobiwCbcQ63Ds6DPGx4LRHNrvoG2fii1wLK1eQ9eIJNYkT45t X-Received: by 2002:a05:6a00:2354:b0:6d9:c204:51cf with SMTP id j20-20020a056a00235400b006d9c20451cfmr1445699pfj.12.1703667865572; Wed, 27 Dec 2023 01:04:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703667865; cv=none; d=google.com; s=arc-20160816; b=J9FUQyDlrLjnhOEhru/cuJzv7ctseN2LJ32jV8opZW2v54uS15ZhKW49QUzeVtjsiY WRfvZnKbXfdCi5vK0KtW5hLs3DeWXHKLRpQnrEvwDnZJDdHVhdIdIg7y8DDoRlqkK652 x1tWCRPDVRDVid16wvMlMoWXm1OqyXX0jol+qXmx4/d6IPyPjxD6STeqxYYFx+ozK0wt I3SMf9iYMaOgBU6OuBD7jRn1HSjtTOopBZ2FcvHFmWGOzC42/1vy544Yeoa05LpVr2lm +qcVINlMiKD0vh6MQvPyNAK9jCRyRZowmc/XdZwPaSXSnup9V8yppUQvIuFoerh6SqRr Baqw== 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:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=RraVKdn/3CtUzdc/GUkx4wIWX/WntChO7vtqlU3szKo=; fh=t/rEUYZBrjIVtJtvItkK7O2t2zLyO6TH9UCXgO6Lsag=; b=gOu9g5lMpw3BY0q29m8tVZg9Rhg9y/q9fnduC7RURkoKrEjlMaMdJgiyCvnZzbs72j CbUPel2rt71qOTyIHt0i1gQ85i3TlBtE3c5jmizHzaYsXJ+fehu4md18fQY43EJjj4yU 7dJABzYXgO5oDWD1F6wxYTvHYWLWLW8Y0tqlC+jP/YDxfgf8m00xMJYCLF1PK96ngTug hChHjV7PRlVdYcL2MvmkK01Ey3aXCMPa13ecvclI5dlwj0Gdl4SiOk3VYUjztXaYz3IJ jQ9d2Bg3VOD83ZjvbmlsRhXMPhSsFkJJAt1pK6w0PGdGm3uThh/PSAr+DRmFgCYFjzWk 1cVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CSKj3xPo; spf=pass (google.com: domain of linux-kernel+bounces-11918-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11918-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l62-20020a632541000000b005cdb0622c89si7733411pgl.16.2023.12.27.01.04.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:04:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11918-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CSKj3xPo; spf=pass (google.com: domain of linux-kernel+bounces-11918-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11918-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E32B0283823 for ; Wed, 27 Dec 2023 09:04:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 068522E627; Wed, 27 Dec 2023 09:03:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CSKj3xPo" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.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 D3BE22DF65; Wed, 27 Dec 2023 09:03:12 +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-wr1-f43.google.com with SMTP id ffacd0b85a97d-3369ccb539aso3152890f8f.3; Wed, 27 Dec 2023 01:03:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703667791; x=1704272591; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RraVKdn/3CtUzdc/GUkx4wIWX/WntChO7vtqlU3szKo=; b=CSKj3xPoe0b81auFzX5J5r8+gHDtSQ8bTLHyuTSByN5ubgk4ShJnW0WabScu/PWsoO GIk3e8M6h8tqtSwzHT5DkMWLqb7v9GuGAluLL5l2PNxuaGDmeqil1mJ00JKwRJCbBIGZ OR+5SXX+NRoES0dpjTKeUehHdrMTAKHvC0KK3Qq9DOnbVTEwuSaA+J1Ftj14XiW80b0A tgCb1bz++/sdlFb5Av23VYzsyDTElaOP8wFcaHZWfW7iQYlSe5cxgfGVjgM9aWlHNTFT 4TIkzUJaThEh2f1ZQ8ZdX3FbltMnUH6fdmgyxiNiYguE0XU6YkyCOHcrHXnELhBBZp/C sdwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703667791; x=1704272591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RraVKdn/3CtUzdc/GUkx4wIWX/WntChO7vtqlU3szKo=; b=Utekqe3RvOZRy4FiOZ021MFtCa8PqQavCkRm0r6I0K9mFt0Ss1697CKj59sVA6UR3R bFsxF3EIHuf083Bb0oinvkQxTndhtqyHqqthoOj0h5bwTOzBqIu4+3uCqVMhDeHD+ntr FpK8w1r95gF9jjtfzmvQPCaoPJ8Pmx1WCw/krOCeJh4MSTENJbAPRoyhLQ7Isy/cLTa6 lK+0v3GcXlB1/rzakB2ZWO00GW+XpSctFmV4PoBUwHA3L18KbYZacMIDa4sRG8fTF3Wq s/Fi9iK6GhjzuEMVJ3UAUoqSJgEe0RtcVutl3eboY0nct1teXH0jom81X5rItjWXxfkL auug== X-Gm-Message-State: AOJu0Yxgtqs1jrnvd57Y/+0b+O8ZeUJ0kYDUCyby5lHURF8bzwkTNA4Z UsNg0pmlma1uzwoUzIgQb48= X-Received: by 2002:a05:6000:1042:b0:336:73d6:b42b with SMTP id c2-20020a056000104200b0033673d6b42bmr4549978wrx.117.1703667791035; Wed, 27 Dec 2023 01:03:11 -0800 (PST) Received: from localhost.localdomain (host-95-250-248-68.retail.telecomitalia.it. [95.250.248.68]) by smtp.googlemail.com with ESMTPSA id c9-20020a056000104900b003368849129dsm13616525wrx.15.2023.12.27.01.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:03:10 -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 v5 3/5] net: phy: add support for PHY LEDs polarity modes Date: Wed, 27 Dec 2023 10:02:29 +0100 Message-Id: <20231227090231.4246-4-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231227090231.4246-1-ansuelsmth@gmail.com> References: <20231227090231.4246-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786425235671451488 X-GMAIL-MSGID: 1786425235671451488 Add support for PHY LEDs polarity modes. Some PHY require LED to be set to active low to be turned ON. Adds support for this by declaring active-low property in DT. PHY driver needs to declare .led_polarity_set() to configure LED polarity modes. Function will pass the index with the LED index and a bitmap with all the required modes to set. Current supported modes are: - active-low with the flag PHY_LED_ACTIVE_LOW. LED is set to active-low to turn it ON. - inactive-high-impedance with the flag PHY_LED_INACTIVE_HIGH_IMPEDANCE. LED is set to high impedance to turn it OFF. Signed-off-by: Christian Marangi --- Changes v5: - Rework to LED modes bitmap Changes v4: - Drop for global active-low - Rework to polarity option (for marvell10g series support) Changes v3: - Out of RFC Changes v2: - Add this patch drivers/net/phy/phy_device.c | 12 ++++++++++++ include/linux/phy.h | 22 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 3611ea64875e..b99c7579d9c4 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -3097,6 +3097,7 @@ static int of_phy_led(struct phy_device *phydev, struct device *dev = &phydev->mdio.dev; struct led_init_data init_data = {}; struct led_classdev *cdev; + unsigned long modes = 0; struct phy_led *phyled; u32 index; int err; @@ -3114,6 +3115,17 @@ static int of_phy_led(struct phy_device *phydev, if (index > U8_MAX) return -EINVAL; + if (phydev->drv->led_polarity_set) { + if (of_property_read_bool(led, "active-low")) + set_bit(PHY_LED_ACTIVE_LOW, &modes); + if (of_property_read_bool(led, "inactive-high-impedance")) + set_bit(PHY_LED_INACTIVE_HIGH_IMPEDANCE, &modes); + + err = phydev->drv->led_polarity_set(phydev, index, modes); + if (err) + return err; + } + phyled->index = index; if (phydev->drv->led_brightness_set) cdev->brightness_set_blocking = phy_led_set_brightness; diff --git a/include/linux/phy.h b/include/linux/phy.h index e9e85d347587..5ac54f9eee82 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -853,6 +853,15 @@ struct phy_plca_status { bool pst; }; +/* Modes for PHY LED configuration */ +enum phy_led_modes { + PHY_LED_ACTIVE_LOW = 0, + PHY_LED_INACTIVE_HIGH_IMPEDANCE = 1, + + /* keep it last */ + __PHY_LED_MODES_NUM, +}; + /** * struct phy_led: An LED driven by the PHY * @@ -1146,6 +1155,19 @@ struct phy_driver { int (*led_hw_control_get)(struct phy_device *dev, u8 index, unsigned long *rules); + /** + * @led_polarity_set: Set the LED polarity if active low + * @dev: PHY device which has the LED + * @index: Which LED of the PHY device or -1 + * @modes: bitmap of LED polarity modes + * + * Configure LED with all the required polarity modes in @modes + * to make it correctly turn ON or OFF. + * + * Returns 0, or an error code. + */ + int (*led_polarity_set)(struct phy_device *dev, int index, + unsigned long modes); }; #define to_phy_driver(d) container_of(to_mdio_common_driver(d), \ struct phy_driver, mdiodrv) From patchwork Wed Dec 27 09:02:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 183442 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1320244dyb; Wed, 27 Dec 2023 01:04:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IG88/WXmhZxs3CGSJxp7UqaLoJr5aLafmTey+7CqFXi9887WP8qqCiLwHkuHGSwlV6MGaS5 X-Received: by 2002:a05:622a:386:b0:425:96ce:e7d7 with SMTP id j6-20020a05622a038600b0042596cee7d7mr11095467qtx.66.1703667884296; Wed, 27 Dec 2023 01:04:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703667884; cv=none; d=google.com; s=arc-20160816; b=ItzBilqWlKGP8uMBIrn3uhpKNwcb76zENhabv+6DNPDlD1ZN0z8y896TyGqHFHNkSh knyIumD51JW0xrT/Hz/Ij/bn1aKlImxbwEuOOz8w+9+VVytu8x3bchNb6kInbGgkmkQJ LT8YkljwGsW8tQvTTog1DT+sYDySbF+NqWpjHqstBShhVVJIEkduYKyfRwXnd6OMIV1h FnKmBEEIBkIDzik0ZcioigeXKcsWkG8QSXobQ3B3bsiX7BWrPFr9WYxUELOHRbi18yRI qaAQ+m6kvMOxim9wn8Y9YPALxvUzTff3qOdo7mheSuf0PsG4fAJZ6XzNLUgEu7uOjm3V GvAg== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=o6LKt+ontTXHu1XtoIYFtpLE+AnFf2w4c9A2s2xTblA=; fh=j0L8y0dZVS02WChc7Vt2DURt1HbUN50bnOhhpNDzNJY=; b=nQBM3hBgEfgi89cCRK7G7J1m/pkT+5+30nyk5IE8BD4vGqspOHjkStaIiQSvbcBUz4 sZzZQC9tFDh/NPX2/4jueEeylwXN9TqGlrp6nlQvGgFG17rBeD85KYyq7qj0J1/u1S2O AbW3qr7i6IzECY3/MZDOX56Knkr4oiGT7r2oIUSqFwpGctDpLni/3c64WCQoqY4KgSp1 E3Ui220NKvCUf6E7injxbC2TaPUFFKgfnOPs+yrDRM+5ouXedttgcFdXUFYmOL8oiyPm gAn/MsY8qqa3ci/+el8Nzv9wgmF3K4uW66Ilt7zCmY/L2BEcBXzEnhpxOD3aFrKUf5m1 yfFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=P8GhsFJr; spf=pass (google.com: domain of linux-kernel+bounces-11919-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11919-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j15-20020ac85f8f000000b0042771241178si14247704qta.510.2023.12.27.01.04.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:04:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11919-ouuuleilei=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=P8GhsFJr; spf=pass (google.com: domain of linux-kernel+bounces-11919-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11919-ouuuleilei=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 00F061C210E9 for ; Wed, 27 Dec 2023 09:04:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DB602E642; Wed, 27 Dec 2023 09:03:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="P8GhsFJr" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 6A8F02E407; Wed, 27 Dec 2023 09:03:15 +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-f45.google.com with SMTP id 5b1f17b1804b1-40d3352b525so58334585e9.1; Wed, 27 Dec 2023 01:03:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703667793; x=1704272593; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o6LKt+ontTXHu1XtoIYFtpLE+AnFf2w4c9A2s2xTblA=; b=P8GhsFJrg3KnxF4TjqMeADZtTChnf7D2qUx3FcRlb8LUoChinSsCvo6z9YgvytqehG o9J+VdoZolrFowD12HKlXPtTmcal7ojQyddltcjA9aCCly89L6MFwEpB3AKHfMQVAf6g FhZhnqM22ST4sExTdILcRQZbY2qrhkVqqfHcIhZrYM3a+7oApKRlFVFwzPHQsSxb1tK4 GRV6SFTQm3LClZY/lXQxl1drETccUUKeeNEzGrKag0r5oFqVlmtpE66KV8EAHH62ssvS 1fP43K8us0069y0MT24ARFqMG1QZdI8Q4zRwhrOeNuGJxMkVBFz9N18YUinxnX0cXVFp 22kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703667793; x=1704272593; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o6LKt+ontTXHu1XtoIYFtpLE+AnFf2w4c9A2s2xTblA=; b=wEao2nRqwouaWTEN+B1+UcA6uSMVe1qek6aNAsoZcMy/2euAEoNsEj2LTdiLqGwNXD eaEMqSDvcl4mXBTjwIiecJ7TFMApmG15ZsSWDFCewejVRN9tHL+I8+Xh85O1mpwVtBfS pFTwm8rGEEhan24FytOqck0STQ5kVND8qfUN/wci6/4C7GZuyYL+OVRyYJoZCDuK2Jy8 i4YNAl6dV/QsCm/BMCrIe9wt39bA3e6K1OWg5FLU/CNiuJ+SWcSTOffJC4yiysvt8biF +g4k69iKlqIQCzfKYBTtiIWQWc6APjCI9Md0OyxdCrCm9QEmgEu76gDhSMvAoW9tpTRb KQ0g== X-Gm-Message-State: AOJu0Yz1yyUA6fGVDv+1oBQSvrQUMOBUXVAqVwOOM05pvDlE/azQgOoQ 0j9GdxwMa2GhGTTL4iAso7o= X-Received: by 2002:a05:600c:3c90:b0:40c:2d78:c766 with SMTP id bg16-20020a05600c3c9000b0040c2d78c766mr4563795wmb.134.1703667793645; Wed, 27 Dec 2023 01:03:13 -0800 (PST) Received: from localhost.localdomain (host-95-250-248-68.retail.telecomitalia.it. [95.250.248.68]) by smtp.googlemail.com with ESMTPSA id c9-20020a056000104900b003368849129dsm13616525wrx.15.2023.12.27.01.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 01:03:13 -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 Cc: Rob Herring Subject: [net-next PATCH v5 4/5] dt-bindings: net: Document QCA808x PHYs Date: Wed, 27 Dec 2023 10:02:30 +0100 Message-Id: <20231227090231.4246-5-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231227090231.4246-1-ansuelsmth@gmail.com> References: <20231227090231.4246-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786425255463323612 X-GMAIL-MSGID: 1786425255463323612 Add Documentation for QCA808x PHYs for the additional LED configuration for this PHY. Signed-off-by: Christian Marangi Reviewed-by: Rob Herring --- Changes v4: - Add Reviewed-by tag Changes v3: - Use compatible instead of select - Out of RFC Changes v2: - Fix License warning from checkpatch - Drop redundant Description phrase - Improve commit tile - Drop special property (generalized) .../devicetree/bindings/net/qca,qca808x.yaml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/qca,qca808x.yaml diff --git a/Documentation/devicetree/bindings/net/qca,qca808x.yaml b/Documentation/devicetree/bindings/net/qca,qca808x.yaml new file mode 100644 index 000000000000..e2552655902a --- /dev/null +++ b/Documentation/devicetree/bindings/net/qca,qca808x.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/qca,qca808x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Atheros QCA808X PHY + +maintainers: + - Christian Marangi + +description: + QCA808X PHYs can have up to 3 LEDs attached. + All 3 LEDs are disabled by default. + 2 LEDs have dedicated pins with the 3rd LED having the + double function of Interrupt LEDs/GPIO or additional LED. + + By default this special PIN is set to LED function. + +allOf: + - $ref: ethernet-phy.yaml# + +properties: + compatible: + enum: + - ethernet-phy-id004d.d101 + +unevaluatedProperties: false + +examples: + - | + #include + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethernet-phy@0 { + compatible = "ethernet-phy-id004d.d101"; + reg = <0>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_WAN; + default-state = "keep"; + }; + }; + }; + };