From patchwork Tue Apr 23 19:14:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13640570 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 614D9C4345F for ; Tue, 23 Apr 2024 19:15:25 +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:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=fk0wF5SlNUEGhdLWB2aADVeQVql/72ht0ReOQG0uVU4=; b=vUGjv69pJt/FCO MPlBwSgchbesPRNa3VNDfbwgayLRoPp1p460RYZY0Fr3sm3xGNEgJaGD/OvWhBaGv87Ec/Ao9543q 9KHTEmD51IYpGDhOJYORY8xDxhQGhpnFZnYDJ1qKzstxMprdmLiMEkCvFodXlrmBhqgcrKjSqX831 EAdzDjFGsTUYExY4JN8WX6DhJ8skhF9SpvL42xnasJdPnga8fvgWA71drNnWlPe/FWCBha2FnOUaR f6tt+2C8mHJPutryiV0pLmlV+zYIoidhfBLeKcasdh9uKv6S4F4CaTCOH2oN3AKqbjYgo/R2zkUyW lO51f9AqQXocnAzI5VbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzLbk-00000001FEl-0Vss; Tue, 23 Apr 2024 19:15:12 +0000 Received: from relay.smtp-ext.broadcom.com ([192.19.144.207]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzLbg-00000001FE5-46QG; Tue, 23 Apr 2024 19:15:10 +0000 Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 7C01BC0003DE; Tue, 23 Apr 2024 12:15:07 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 7C01BC0003DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1713899707; bh=R628G8zQMojH79aICvGqCZDzjRLX8Kqkqav9c0XP5PM=; h=From:To:Cc:Subject:Date:From; b=c30lD9MpeqzAc84Bwe+J6/nnPGRqbbkxMZ8xdDdxOJ1+njirzR++TZcvLEoCdigZL yWQpguIszDZ1/0sH68BiUJ5HhElX2cTphMXY1vkliUocww0wuhPuP8Xp88NakMcQ7G 6Ukc464UouNEfxejxOBD5RZoMhr5JmfMNg37dpn8= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 86D6B18041CAC4; Tue, 23 Apr 2024 12:15:05 -0700 (PDT) From: Florian Fainelli To: linux-arm-kernel@lists.infradead.org Cc: andrew@lunn.ch, Florian Fainelli , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Broadcom internal kernel review list , Andre Przywara , Nick Hawkins , Michal Simek , Laurent Pinchart , Linus Walleij , Paul Barker , Stefan Wahren , Geert Uytterhoeven , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3] arm: dts: bcm2711: Describe Ethernet LEDs Date: Tue, 23 Apr 2024 12:14:55 -0700 Message-Id: <20240423191500.1443636-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240423_121509_318468_42622BDA X-CRM114-Status: GOOD ( 13.91 ) 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 Describe the Ethernet LEDs for the Raspberry Pi 4 model B board as well as the Raspberry Pi 4 CM board. The Raspberry Pi 400 board does not include RJ45 connector LEDs so the 'leds' node is deleted accordingly. The Ethernet PHY LEDs are numbered in the PHY package/pin list from LED1 through LED4, however their address within the LED registers function selector is 0-indexed. Signed-off-by: Florian Fainelli Reviewed-by: Stefan Wahren --- Changes in v3: - explain LED numbering and add comments - rename individual LED DT nodes to led@ Changes in v2: - added function = LED_FUNCTION_LAN - rebased against latest tree .../arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts | 22 +++++++++++++++++ .../arm/boot/dts/broadcom/bcm2711-rpi-400.dts | 1 + .../boot/dts/broadcom/bcm2711-rpi-cm4-io.dts | 24 +++++++++++++++++++ 3 files changed, 47 insertions(+) diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts index cfc8cb5e10ba..353bb50ce542 100644 --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts @@ -5,6 +5,7 @@ #include "bcm283x-rpi-led-deprecated.dtsi" #include "bcm283x-rpi-usb-peripheral.dtsi" #include "bcm283x-rpi-wifi-bt.dtsi" +#include / { compatible = "raspberrypi,4-model-b", "brcm,bcm2711"; @@ -204,6 +205,27 @@ &genet_mdio { phy1: ethernet-phy@1 { /* No PHY interrupt */ reg = <0x1>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + /* LED1 */ + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + + /* LED2 */ + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; }; }; diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts index 5a2869a18bd5..ca9be91b4f36 100644 --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts @@ -30,6 +30,7 @@ &expgpio { &genet_mdio { clock-frequency = <1950000>; + /delete-node/ leds; }; &led_pwr { diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts index 7c6a5bdf48aa..6bc77dd48c0d 100644 --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /dts-v1/; +#include #include "bcm2711-rpi-cm4.dtsi" #include "bcm283x-rpi-led-deprecated.dtsi" #include "bcm283x-rpi-usb-host.dtsi" @@ -110,6 +111,29 @@ rtc@51 { }; }; +&phy1 { + leds { + #address-cells = <1>; + #size-cells = <0>; + + /* LED2 */ + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + + /* LED3 */ + led@2 { + reg = <2>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; +}; + &led_act { gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; };