From patchwork Sat Sep 18 17:29:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 12503929 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EBEBC433EF for ; Sat, 18 Sep 2021 17:31:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D3CF960FED for ; Sat, 18 Sep 2021 17:31:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D3CF960FED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=5Yhoe7vD9ldRwnNOszsy2iixLgKWn5+iORIR2fqC2lQ=; b=B5Qz+W5/6jEREo A2SYIV9yYDuKW9vy79qm5p569EwP11m03zCVjjbQr6a7l4wQxmJs0HMDCREcBymMWVJJTnPsKQV8U eXf9zGX5y7XkA8BKjWRJKar5swuGuCEZkDqyhnVdZC4/bgKYwPO8muurAEDIBSNgnfQGRMCSRu6tD eE+nOlRny0C02+0WNLiwDU3xY4xrjbMwV3fqlsS0s14oFD/fM8qH94U/L4z8nFvGTbn6i9czXDHVB ExhANvDRpn9e60Y6RyddHsuhyL8RDo0xzY1KT5a4EhgIJh53wsAbKANCsodjkUSRSCPAfgfHgXqi0 KW0Di1ptRljR7uQM+mRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRe9s-00GAOr-Dd; Sat, 18 Sep 2021 17:29:48 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRe9e-00GANc-EM for linux-arm-kernel@lists.infradead.org; Sat, 18 Sep 2021 17:29:35 +0000 Received: by mail-wr1-x42e.google.com with SMTP id t18so20697671wrb.0 for ; Sat, 18 Sep 2021 10:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H67l4l9uQdpasFgVlhkrIIPvkDT4o5fQemdXfoLd3rE=; b=TTS7S9wIE7tOrt7xEHvjAWmTPHK9C1sN78ttEU+YfVYR0cbMC7W72BratRK09V7v93 9R6/LXtXwaaD33zqBrWMXdReFWY/V3vJNzAko9ppQty5fjz/GF5ogX3giDXDTP+rvxZ0 usarruvL4eC5s39BJy9xpt5eu7skwCAZ1T6UlP193phFB5t/6NKA4MV+15p8MDextSjg Jmmx5SoyvgPv7rQKNlqnXKubDjvOWRTtBYNDLs0w9RaBmqk0ynHEi7Ytn6fLbMtXAjCA yqJCpMqWUiOq5ha/5+BZM6ws/8lMAKm/r+O0z5yD6nXLYIn5dca9NiaCPTMkxJyURh/n 2KCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H67l4l9uQdpasFgVlhkrIIPvkDT4o5fQemdXfoLd3rE=; b=vsDpOebm7PUtsE8kj1MsHfTdAT85OUeNzfq3PsbkB5qhKhK1r+ozPRVe1jNNJnxO+o gwgsqPKzfWKCbj6dZDf1j9OYgixA11+kT300oxaE2dJhmLHbYhqRgtvWZ9YWHgMqGJfp TrQlaOzpwNyOCLhNcdyKxdxAmpzjzlZV5iETRGL80P2AGBdEUGsrwOI/c5KG2YGEwHa+ kpmNjfKVxY6Fjv4IJGvnLy5rYRmn8fvgSkjKSinZaiFDR5gdC5X59dD9NWYUY3uTX0JC KVgNe77QITCNB2zL9gkNgMxTul92Fo4htWdj0solu8SeFKZCRyfsQN89uW3cYclujuP7 j4Tg== X-Gm-Message-State: AOAM5314vMP4Vvi/wWPb8Vv94IQZO9g2PdXO7/c6OoeI17iJwBPbG+MX 2JAIZuSLM0GSnSn1oOga0kPCCeb169A= X-Google-Smtp-Source: ABdhPJzp3DiJR3jsr8I17yYMlps/ghX4BU5Y1uoUcnEsmy+UNkNAqiLDRXbzT8DuNnsCnx4yA5jz6A== X-Received: by 2002:a5d:6212:: with SMTP id y18mr18922534wru.241.1631986172410; Sat, 18 Sep 2021 10:29:32 -0700 (PDT) Received: from debian64.daheim (p200300d5ff45c400d63d7efffebde96e.dip0.t-ipconnect.de. [2003:d5:ff45:c400:d63d:7eff:febd:e96e]) by smtp.gmail.com with ESMTPSA id t18sm9773974wrp.97.2021.09.18.10.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Sep 2021 10:29:32 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.95-RC2) (envelope-from ) id 1mRe9b-007v2B-II; Sat, 18 Sep 2021 19:29:31 +0200 From: Christian Lamparter To: linux-arm-kernel@lists.infradead.org Cc: bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Hauke Mehrtens , Ray Jui , Rob Herring , Chris Blake Subject: [PATCH v1 1/2] ARM: BCM53016: Specify switch ports for Meraki MR32 Date: Sat, 18 Sep 2021 19:29:30 +0200 Message-Id: <8ea713578278e587d6f0b40d7ab374b653fd7e61.1631986106.git.chunkeey@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210918_102934_533057_FDC91A9F X-CRM114-Status: GOOD ( 11.54 ) 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 the switch identifies itself as a BCM53012 (rev 5)... This patch has been tested & verified on OpenWrt's snapshot with Linux 5.10 (didn't test any older kernels). The MR32 is able to "talk to the network" as before with OpenWrt's SWITCHDEV b53 driver. | b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 5 | libphy: dsa slave smi: probed | b53-srab-switch 18007000.ethernet-switch poe (uninitialized): | PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL) | b53-srab-switch 18007000.ethernet-switch: Using legacy PHYLIB callbacks. | Please migrate to PHYLINK! | DSA: tree 0 setup Reported-by: Rafał Miłecki Signed-off-by: Christian Lamparter --- arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts index 3b978dc8997a..1dbfa05b6501 100644 --- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts @@ -195,3 +195,25 @@ partition4@800000 { }; }; }; + +&srab { + status = "okay"; + + ports { + port@0 { + reg = <0>; + label = "poe"; + }; + + port@5 { + reg = <5>; + label = "cpu"; + ethernet = <&gmac0>; + + fixed-link { + speed = <1000>; + duplex-full; + }; + }; + }; +}; From patchwork Sat Sep 18 17:29:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 12503927 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A8F9C433F5 for ; Sat, 18 Sep 2021 17:31:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 582FE6104F for ; Sat, 18 Sep 2021 17:31:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 582FE6104F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:References:In-Reply-To: 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: List-Owner; bh=tchyW3UWQzafh2sOtig7Y3QQ8jMUeYLdOkSd/rDB/zo=; b=HR2Bi08QwRjPgG KsklbavEQCps671JXHF1JrlKGwONNrOTQ7BVPBCEkrAch9E7GjDhcyqP+EONeyGkErubTb+oR7vVC +0NBRAcUeA4QGs0lCZLukDDd7Zj19RdLzJdKPlPnE8W3ZhdhFzCW+dpOpLJS+R6z7SoyFjjSbhbkt i+YmyyPEUp9zKzVqtozc04sMehmouDSoGh0FL9FOytjUVFADkep/rVtdVygiAEw4ss72geDMsDSiU 1oirMDG/pKnYyglWBs8Q4JjqoAhzllkGwCSVHXJ4ENZLXd21yx0WTKcWPKyhuipTSpPQbHCr1GYiS CGmC8julSBTemuw31MrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRe9i-00GAOa-RS; Sat, 18 Sep 2021 17:29:39 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRe9e-00GANd-Hz for linux-arm-kernel@lists.infradead.org; Sat, 18 Sep 2021 17:29:35 +0000 Received: by mail-wm1-x32c.google.com with SMTP id b21-20020a1c8015000000b003049690d882so12368755wmd.5 for ; Sat, 18 Sep 2021 10:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K4rm/bV9jVUZfrrYSQ4bsfE/QtGeoEe7N8qb5xJD8gQ=; b=I+IPfvp7ltQnWRkzDCatx2spxkwIMzY7apGrtxSP25enDGtM4bymMA8YkdiVyCWI/l y2+koOYni9ToWv2giHoL518eLLv+YLp4PURyU1tzJ2qKcTR9VsVdmalXUArxH5XDK83u 9Zvnjpg2+ScRA5WTEIfNUpKwar+/S9/oPV4Bqed4Lh6TWtixcSe2zCFUVp+8ysS207zb 6FmqsVPVAVd10/bd3uI/Qh98eBLlWOji9xfvKzsapiHumIdh40xOeRhkpevpX9hyfr6r 7Gj8UQROyuQZVTp7njJw1xa3Syv/gGZdvyQptIqitjtGWUR0ITGP4uRkW97yuvnd9hTz Eiew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K4rm/bV9jVUZfrrYSQ4bsfE/QtGeoEe7N8qb5xJD8gQ=; b=iqiNglYYafn/hAJREJ1xca6dsWliM8tGeDrXGTJSJnlKyvWn2Yt1insyklIzh/33dT rgwY5K4OQsAukYmPptRB6u4PD/Q1xbm69HyH4jpKP07FQcLW7oobML7R1B2kRnaIh4hb pCqBEkHbrFVOuuPk9l/vN4gdCrKODMU95dxrQClEYduM8+U5kX8QAA4lRAd/KC5A0yll Hw3Fch16GxMrGmQUwshUPp5HagiSh5JXhB8LzUww3dwqAM10pg9fRyTFqoBMa9hzFvsK hVXATF6UwfSF4xwKWhjD2aW9p3H8rFgy8Rk7FaMlRTc7NJlHQruGiCZy0zkldFjSx57P xeNw== X-Gm-Message-State: AOAM531gZpEdOEklOZVeB4MiQa9bnZc3C29hq6/0ycrkFD3IqQfdx2eX XwVa8e/zPJbhqNtq2FGXi0QmFdqjh5Q= X-Google-Smtp-Source: ABdhPJzZ79sZHzTGJLMnSZfzdSgdGMq/J5yN/qu4FmiDXvvFyTUIBFoqcqe27KXYf0+KbNhhJl6fxA== X-Received: by 2002:a1c:3881:: with SMTP id f123mr16626478wma.185.1631986172512; Sat, 18 Sep 2021 10:29:32 -0700 (PDT) Received: from debian64.daheim (p200300d5ff45c400d63d7efffebde96e.dip0.t-ipconnect.de. [2003:d5:ff45:c400:d63d:7eff:febd:e96e]) by smtp.gmail.com with ESMTPSA id l124sm14352813wml.8.2021.09.18.10.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Sep 2021 10:29:32 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.95-RC2) (envelope-from ) id 1mRe9b-007v2D-J1; Sat, 18 Sep 2021 19:29:31 +0200 From: Christian Lamparter To: linux-arm-kernel@lists.infradead.org Cc: bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Hauke Mehrtens , Ray Jui , Rob Herring , Chris Blake Subject: [PATCH v1 2/2] ARM: BCM53016: MR32: get mac-address from nvmem Date: Sat, 18 Sep 2021 19:29:31 +0200 Message-Id: X-Mailer: git-send-email 2.33.0 In-Reply-To: <8ea713578278e587d6f0b40d7ab374b653fd7e61.1631986106.git.chunkeey@gmail.com> References: <8ea713578278e587d6f0b40d7ab374b653fd7e61.1631986106.git.chunkeey@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210918_102934_635990_299E80F2 X-CRM114-Status: GOOD ( 11.27 ) 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 The MAC-Address of the MR32's sole ethernet port is located in offset 0x66 of the attached AT24C64 eeprom. Signed-off-by: Christian Lamparter --- arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts index 1dbfa05b6501..c58e75dde7b3 100644 --- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts @@ -110,6 +110,12 @@ eeprom: eeprom@50 { reg = <0x50>; pagesize = <32>; read-only; + #address-cells = <1>; + #size-cells = <1>; + + mac_address: mac-address@66 { + reg = <0x66 0x6>; + }; }; }; }; @@ -133,6 +139,11 @@ &uart2 { */ }; +&gmac0 { + nvmem-cell-names = "mac-address"; + nvmem-cells = <&mac_address>; +}; + &gmac1 { status = "disabled"; };