From patchwork Mon May 15 08:33:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13240958 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 11D74C77B7D for ; Mon, 15 May 2023 08:33:54 +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=6ft5oDCp/+c9Qqy38I3pB8jt44mzUQVWBXC5ftgc3+4=; b=2tC7L356uCywHc +l/DxKKmmjXNFud23PxhIbENwF6zoLBPKGyUB5UyflKkvB2zk04PTme4KcA4dxw8vUtSF3dhFm/LZ Udc9YQUYpd8c93lANv5KwRuI16OnokcQ0ApNb5E2zXrAHtD03HnKfO7lKwV0FMlv2hdTWEncMeLik HYjC/VKfCuBVsaXp/volQG2BS+zKBoVzLraozWdyDIn/4rqFNOiBStisqJq2K1fjXQJ9FVtuqzPDs 7Btv4nB8llc9q7G/L3e280Aj1hR1nu7aFG2setE6QS0K5rR8BBiPvgclVErJCDLDUX+oXh0ZANrQq dpZZ/m1vX1O//tlzsIhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pyTe1-001QPI-2j; Mon, 15 May 2023 08:33:25 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pyTdx-001QNa-2o for linux-arm-kernel@lists.infradead.org; Mon, 15 May 2023 08:33:24 +0000 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2ac8c0fbb16so120413871fa.2 for ; Mon, 15 May 2023 01:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684139598; x=1686731598; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hRRentaSeR2AdtvuXHv1bfygQdAEcNZfrmAEm/Kcgb0=; b=g7q9CG7g/XvOgAoSIfYglV/ckHWZ1TANp57NyYQYwWtlVbsrKSiVfz4+HUA9xaPAVZ qBl69N6E+Mk+QVmb3iI3A2E3qggiEqP8TZjZJHjJ6IE8KUhTYeCnSUY5HUVT5aEC72cW qJUQ29tQXJMwxwJ5RRJIX+Bqeny2ZzU9PRuFAkfW1YkrJvpmMkerqzsCqfOG/K2OYO+C 0uwK/U7Fd4xvtWioWxAnzn7hlnxPhWLqkEU8nNeB3T9pxlD+XcadZHs5ViZwCJpErc8o 8cdwAW/3XSXMaiUp48Z4UEYkYD5nL1cXJ0w89OopjDtP5Y1WRhrF9/CKRzEnSt/Wb6sQ GKrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684139598; x=1686731598; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hRRentaSeR2AdtvuXHv1bfygQdAEcNZfrmAEm/Kcgb0=; b=O93FVKn6byi/4iz+xsQFdjHDSwWTlJhGGHfKN3r3K+kBdquhiM7JjvnIrOPGzOK04Y 5ctA/ioIZc2Qsyfsc/rwtBQiR4Uh+Bqdc0KdODJylgHwrS2d1I8ihuF8SJYrddX/lDCE WnfHgphVdgS6hvoH0m/c/ve9NbFhiaKUiq7N3CN+8KlQKBd/XjABUYmqwWu4NihkiPQv HbS1sO1uo/wLPUW+7US8qH5B/jJyYAmXFl9JGiJe5X0Ro8/rdWPhK7IrRgskwXHFrJLB BT94LuOA9x9SqcLRdiFhMFO0owpKmT2uyNNotk92QkIOI+CVHAuwrIh6HOZ5/7HY6H07 lg1A== X-Gm-Message-State: AC+VfDyOpSGNG1wP2+y901VCz5OI/SbydMscQ8eHc6rthNHo7VmCGA+A UaYqF8mjLaZaYGNynmgNcsA= X-Google-Smtp-Source: ACHHUZ6hIx2waVTMd7P4xU8BhLanKZgiI2m4CDKNq0A94CJmnTgn1IITypaZDTELZjtBG5GE5I8qZw== X-Received: by 2002:ac2:4f8e:0:b0:4f1:3eea:eaf9 with SMTP id z14-20020ac24f8e000000b004f13eeaeaf9mr6398532lfs.24.1684139597843; Mon, 15 May 2023 01:33:17 -0700 (PDT) Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id p3-20020a05651238c300b004f251e73fc5sm2510638lft.30.2023.05.15.01.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 01:33:17 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Florian Fainelli Cc: Hauke Mehrtens , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH] ARM: dts: BCM5301X: Specify MAC addresses on Luxul devices Date: Mon, 15 May 2023 10:33:08 +0200 Message-Id: <20230515083308.7612-1-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230515_013321_909131_0F9AFCDA X-CRM114-Status: GOOD ( 13.81 ) 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 From: Rafał Miłecki Use NRAM (NVMEM device) and its "et0macaddr" variable (NVMEM cell) to point Ethernet devices to their MAC addresses. Signed-off-by: Rafał Miłecki --- This is based on top of the accepted: dt-bindings: nvmem: brcm,nvram: add #nvmem-cell-cells for MACs https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230421084312.27932-1-zajec5@gmail.com/ --- arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 13 +++++++++++++ arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 13 +++++++++++++ arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 13 +++++++++++++ arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 11 +++++++++++ arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 11 +++++++++++ arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts | 13 +++++++++++++ arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 11 +++++++++++ arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 13 +++++++++++++ arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 11 +++++++++++ arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 5 ++++- 10 files changed, 113 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts index 6de7fe204b0c..9b98a0179f05 100644 --- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts +++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts @@ -20,6 +20,14 @@ memory@0 { reg = <0x00000000 0x08000000>; }; + nvram@1eff0000 { + compatible = "brcm,nvram"; + reg = <0x1eff0000 0x10000>; + + et0macaddr: et0macaddr { + }; + }; + leds { compatible = "gpio-leds"; @@ -53,6 +61,11 @@ button-restart { }; }; +&gmac0 { + nvmem-cells = <&et0macaddr>; + nvmem-cell-names = "mac-address"; +}; + &spi_nor { status = "okay"; }; diff --git a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts index f5b75ba93512..4ca348c06b51 100644 --- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts +++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts @@ -24,6 +24,14 @@ memory@0 { reg = <0x00000000 0x08000000>; }; + nvram@1eff0000 { + compatible = "brcm,nvram"; + reg = <0x1eff0000 0x10000>; + + et0macaddr: et0macaddr { + }; + }; + nand_controller: nand-controller@18028000 { nand@0 { partitions { @@ -60,6 +68,11 @@ button-restart { }; }; +&gmac0 { + nvmem-cells = <&et0macaddr>; + nvmem-cell-names = "mac-address"; +}; + &spi_nor { status = "okay"; }; diff --git a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts index 76c9b30b868d..edc194085995 100644 --- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts +++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts @@ -20,6 +20,14 @@ memory@0 { reg = <0x00000000 0x08000000>; }; + nvram@1eff0000 { + compatible = "brcm,nvram"; + reg = <0x1eff0000 0x10000>; + + et0macaddr: et0macaddr { + }; + }; + leds { compatible = "gpio-leds"; @@ -53,6 +61,11 @@ button-restart { }; }; +&gmac0 { + nvmem-cells = <&et0macaddr>; + nvmem-cell-names = "mac-address"; +}; + &spi_nor { status = "okay"; }; diff --git a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts index 6ef0c0788e62..97b61d9d4be9 100644 --- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts +++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts @@ -24,6 +24,10 @@ memory@0 { nvram@1eff0000 { compatible = "brcm,nvram"; reg = <0x1eff0000 0x10000>; + + et0macaddr: et0macaddr { + #nvmem-cell-cells = <1>; + }; }; leds { @@ -106,6 +110,11 @@ &usb2 { vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; }; +&gmac0 { + nvmem-cells = <&et0macaddr 0>; + nvmem-cell-names = "mac-address"; +}; + &spi_nor { status = "okay"; }; @@ -137,6 +146,8 @@ port@3 { port@4 { reg = <4>; label = "wan"; + nvmem-cells = <&et0macaddr 5>; + nvmem-cell-names = "mac-address"; }; port@5 { diff --git a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts index 41a0722fa64a..ae5523870854 100644 --- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts +++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts @@ -25,6 +25,10 @@ memory@0 { nvram@1eff0000 { compatible = "brcm,nvram"; reg = <0x1eff0000 0x10000>; + + et0macaddr: et0macaddr { + #nvmem-cell-cells = <1>; + }; }; leds { @@ -61,6 +65,11 @@ &usb3 { vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>; }; +&gmac0 { + nvmem-cells = <&et0macaddr 0>; + nvmem-cell-names = "mac-address"; +}; + &spi_nor { status = "okay"; }; @@ -76,6 +85,8 @@ ports { port@0 { reg = <0>; label = "wan"; + nvmem-cells = <&et0macaddr 1>; + nvmem-cell-names = "mac-address"; }; port@1 { diff --git a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts index c56c7e366848..9220f193499e 100644 --- a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts +++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts @@ -20,6 +20,14 @@ memory@0 { reg = <0x00000000 0x08000000>; }; + nvram@1eff0000 { + compatible = "brcm,nvram"; + reg = <0x1eff0000 0x10000>; + + et0macaddr: et0macaddr { + }; + }; + leds { compatible = "gpio-leds"; @@ -51,6 +59,11 @@ button-restart { }; }; +&gmac0 { + nvmem-cells = <&et0macaddr>; + nvmem-cell-names = "mac-address"; +}; + &spi_nor { status = "okay"; }; diff --git a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts index 1b5c91a524ac..2bd64dcd4353 100644 --- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts +++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts @@ -25,6 +25,10 @@ memory@0 { nvram@1eff0000 { compatible = "brcm,nvram"; reg = <0x1eff0000 0x10000>; + + et0macaddr: et0macaddr { + #nvmem-cell-cells = <1>; + }; }; leds { @@ -61,6 +65,11 @@ &usb3 { vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>; }; +&gmac0 { + nvmem-cells = <&et0macaddr 0>; + nvmem-cell-names = "mac-address"; +}; + &spi_nor { status = "okay"; }; @@ -76,6 +85,8 @@ ports { port@0 { reg = <0>; label = "wan"; + nvmem-cells = <&et0macaddr 1>; + nvmem-cell-names = "mac-address"; }; port@1 { diff --git a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts index 739063b77b1f..8a6d19f985c1 100644 --- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts +++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts @@ -22,6 +22,14 @@ memory@0 { <0x88000000 0x18000000>; }; + nvram@1eff0000 { + compatible = "brcm,nvram"; + reg = <0x1eff0000 0x10000>; + + et0macaddr: et0macaddr { + }; + }; + leds { compatible = "gpio-leds"; @@ -47,6 +55,11 @@ &uart1 { status = "okay"; }; +&gmac0 { + nvmem-cells = <&et0macaddr>; + nvmem-cell-names = "mac-address"; +}; + &spi_nor { status = "okay"; }; diff --git a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts index 7afc68d5d2c2..ebea188bd2d7 100644 --- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts +++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts @@ -25,6 +25,10 @@ memory@0 { nvram@1eff0000 { compatible = "brcm,nvram"; reg = <0x1eff0000 0x10000>; + + et0macaddr: et0macaddr { + #nvmem-cell-cells = <1>; + }; }; leds { @@ -101,6 +105,11 @@ &usb3 { vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>; }; +&gmac0 { + nvmem-cells = <&et0macaddr 0>; + nvmem-cell-names = "mac-address"; +}; + &spi_nor { status = "okay"; }; @@ -136,6 +145,8 @@ port@3 { port@4 { reg = <4>; label = "wan"; + nvmem-cells = <&et0macaddr 5>; + nvmem-cell-names = "mac-address"; }; port@5 { diff --git a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts index 60a2c441d5bd..2dd05f4dce92 100644 --- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts +++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts @@ -27,6 +27,7 @@ nvram@1eff0000 { reg = <0x1eff0000 0x10000>; et0macaddr: et0macaddr { + #nvmem-cell-cells = <1>; }; }; @@ -76,7 +77,7 @@ button-restart { }; &gmac0 { - nvmem-cells = <&et0macaddr>; + nvmem-cells = <&et0macaddr 0>; nvmem-cell-names = "mac-address"; }; @@ -119,6 +120,8 @@ port@3 { port@4 { reg = <4>; label = "wan"; + nvmem-cells = <&et0macaddr 5>; + nvmem-cell-names = "mac-address"; }; port@5 {