From patchwork Tue Aug 18 16:39:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 11721979 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0998739 for ; Tue, 18 Aug 2020 16:42:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 B647E20658 for ; Tue, 18 Aug 2020 16:42:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="R/6fvFxX"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RSnZmFp4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B647E20658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yPciFdg+94SGYXzHkGC/NzKpXG2axbq40u4siK03aJ0=; b=R/6fvFxXx1IZftdRqcuqKkQz0 S5oLv/5t5cgyRCfGsLSZ1AimZd1fGwrznaUISbpNjz/y02JHP+P29ta3sVwNJpmmrcKycAhFE+Rnr 6K7gZCy5LQzhKkm8Szy0zJy55JMqyz41rSGtYPsNFQIPK0hpXMHSDNnVRQ2S0w5gedLlcJGcURQwN YSjbva04T9abcifxk5zcXrajLGoImYaqjtB7WYTBSOECa2Cphlfji/w4rOKRZA8W6/KSlDQM5T3+i HmWG1gXmMJVrpUQMAab9Xi0mTO6jKlIXFBvjPlxsyQC54RpfilRJQ4MpSJeydef4NEbPT2+pLor6r JHeg4MxZw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k84f0-0006f1-N9; Tue, 18 Aug 2020 16:40:30 +0000 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k84ei-0006aa-DK for linux-arm-kernel@lists.infradead.org; Tue, 18 Aug 2020 16:40:14 +0000 Received: by mail-ed1-x544.google.com with SMTP id bs17so15786129edb.1 for ; Tue, 18 Aug 2020 09:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J1VBjdkXhcibe67Uvb/clIgqRzD9nTf4gmlYDr+3FO8=; b=RSnZmFp4d9RMybWAVQqcvOG8DP6GfMbY1QHOxjXWKMUm1A0oGG8PD+IXMJFDfRsvKw J2Btl/8ABGQ8bbfVxotlfAbdwsGcmulWYZeAI0qX7Jb2oIm9O5fNxMBflh86wDWSEUOh GwpS2NjewRPIfUcSwFyevG5SnTvO+4PfjuRWdOKNX4amXvdJpxDWyVltCXroXIZ6x0qO Qny3Axo2pTAuXzZBCTJRJWLeOUU04MOunG/tGTls282Gg9lII/t6aCV5CAfRn4TqNC4t dI/JprAjCih0YxRLuFIA2QSw+XXe2YUrJNY5PK3zRree3q+0WIJQZh1IDgVtDJkAemaH NGSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J1VBjdkXhcibe67Uvb/clIgqRzD9nTf4gmlYDr+3FO8=; b=IL3L2ClKoLXbm+3EKRuByU8K2FOohOdvLOARffYb0FLs3Cn8uB4YI8ezKIFaF4GdyM 5Tbn2hXZVJgppMKT0j8QWgQggXpfiBmYLd3BpUhwiW7KyQMZSTmMir3PdGJRBDIkf444 FuhAnJw+mxp9vTT32xn01KerLTNIX30z9YGQRf27oEa9ad9o2sZc1kl/I7ZrIdz723R6 FxF0vHuHik6wYxCzir8dd82ar98b/AjU8XaWxLRxi0Ah74gJhFGKd2jPkjlrRjJLw2G+ FbmQkeMlJlXTEq3RGim/62oJFCKYlsO5R2nc7iA1ygLG7W1jC493lV7BUqb6lKik+a2J IUrQ== X-Gm-Message-State: AOAM533RuhVIWUaDaSECK3+YXzRdRt13Wz06r8U++i/+IWqhQdD0iKnC ICO8YgMbjwlDODW690IvfafYaUHyX+8= X-Google-Smtp-Source: ABdhPJwn1wAg+VhA7/NllIiExh3sTvfYMOy1z+pd1h8E9NNv3qJpvExxZ6oAzZxaeqX0hQ7ZJWN2DQ== X-Received: by 2002:a50:9d88:: with SMTP id w8mr19892580ede.122.1597768811060; Tue, 18 Aug 2020 09:40:11 -0700 (PDT) Received: from debian64.daheim (pd9e291c8.dip0.t-ipconnect.de. [217.226.145.200]) by smtp.gmail.com with ESMTPSA id lc18sm16807084ejb.29.2020.08.18.09.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2020 09:40:10 -0700 (PDT) Received: from root by debian64.daheim with local (Exim 4.94) (envelope-from ) id 1k84eb-000AYi-Du; Tue, 18 Aug 2020 18:40:05 +0200 From: Christian Lamparter To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v1 6/6] ARM: BCM5301X: Add DT for Meraki MR32 Date: Tue, 18 Aug 2020 18:39:53 +0200 Message-Id: <5e9435aabe663fecd76ecf7775bbfd2d60021b16.1597768760.git.chunkeey@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <8d2f02c85824df460282a06540cf6c735c8161ac.1597768760.git.chunkeey@gmail.com> References: <90b9f9e7e9a50099c88d4ffbc6868dd0ed436944.1597768760.git.chunkeey@gmail.com> <942144b9b030b0cafd07bb019347f26403734600.1597768760.git.chunkeey@gmail.com> <8d2f02c85824df460282a06540cf6c735c8161ac.1597768760.git.chunkeey@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200818_124012_596061_144E6D87 X-CRM114-Status: GOOD ( 22.86 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:544 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , bcm-kernel-feedback-list@broadcom.com, Chris Blake , Rob Herring Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds support for Cisco Meraki MR32. The unit was donated by Chris Blake. Thank you! SoC: Broadcom BCM53016A1 (1 GHz, 2 cores) RAM: 128 MiB NAND: 128 MiB Spansion S34ML01G2 (~114 MiB useable) ETH: 1GBit Ethernet Port - PoE WIFI1: Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352) WIFI2: Broadcom BCM43520 bgn (2x2:2 - id: 0x4352) WIFI3: Broadcom BCM43428 abgn (1x1:1 - id: 43428) BLE: Broadcom BCM20732 (ttyS1) LEDS: 1 x Programmable RGB Status LED (driven by a PWM) 1 x White LED (GPIO) 1 x Orange LED Fault Indicator (GPIO) 2 x LAN Activity / Speed LEDs (On the RJ45 Port) BUTTON: one Reset button MISC: AT24C64 8KiB EEPROM (i2c - stores Ethernet MAC) ina219 hardware monitor (i2c) Kensington Lock SERIAL: WARNING: The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 115200-8-N-1. The board has a populated right angle 1x4 0.1" pinheader. The pinout is: VCC, RX, TX, GND. Odd stuff: - uart0 clock frequency is 62.5 MHz. - The LEDs are labeled as SYS-LED1 through SYS-LED3 because of the silkscreen on the PCB. - the original u-boot has been compiled with most functions and commands disabled. The u-boot env isn't setup properly either and as a result, the bcm47xxpart probing is not working. Hence, the nand partitions are specified through a "fixed-partition" binding. - The "WICED SMART(TM)" Bluetooth LE 4.0 BCM20732 chip is connected to uart2 of the SoC. The BCM20732 does not provide a HCI. So the linux' bluetooth stack is useless. The mock-up node with the compatible binding and enable-gpios property is provided solely as documentation. Signed-off-by: Christian Lamparter --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 191 +++++++++++++++++++++ 2 files changed, 192 insertions(+) create mode 100644 arch/arm/boot/dts/bcm53016-meraki-mr32.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index e6a1cac0bfc7..b0756d62772b 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -126,6 +126,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm47094-luxul-xwr-3100.dtb \ bcm47094-luxul-xwr-3150-v1.dtb \ bcm47094-netgear-r8500.dtb \ + bcm53016-meraki-mr32.dtb \ bcm47094-phicomm-k3.dtb \ bcm94708.dtb \ bcm94709.dtb \ diff --git a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts new file mode 100644 index 000000000000..816fe8cd492d --- /dev/null +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts @@ -0,0 +1,191 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Broadcom BCM470X / BCM5301X ARM platform code. + * DTS for Meraki MR32 / Codename: Espresso + * + * Copyright (C) 2018-2020 Christian Lamparter + */ + +/dts-v1/; + +#include "bcm4708.dtsi" +#include "bcm5301x-nand-cs0-bch8.dtsi" +#include + +/ { + compatible = "meraki,mr32", "brcm,brcm53016", "brcm,bcm4708"; + model = "Meraki MR32"; + + chosen { + bootargs = " console=ttyS0,115200n8 earlycon"; + }; + + memory { + reg = <0x00000000 0x08000000>; + }; + + aliases { + serial1 = &uart2; + }; + + leds { + compatible = "gpio-leds"; + + sysled3 { + function = LED_FUNCTION_FAULT; + color = ; + gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; + panic-indicator; + }; + sysled2 { + function = LED_FUNCTION_INDICATOR; + color = ; + gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>; + }; + }; + + i2c-gpio { + compatible = "i2c-gpio"; + sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>; + scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>; + i2c-gpio,delay-us = <10>; /* close to 100 kHz */ + #address-cells = <1>; + #size-cells = <0>; + + current_sense: ina219@45 { + compatible = "ti,ina219"; + reg = <0x45>; + shunt-resistor = <60000>; /* = 60 mOhms */ + #address-cells = <1>; + #size-cells = <0>; + }; + + eeprom: eeprom@50 { + compatible = "atmel,24c64"; + reg = <0x50>; + pagesize = <32>; + read-only; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>; + }; + }; + + pwm-leds { + compatible = "pwm-leds"; + + red { + /* SYS-LED 1 - Tricolor */ + function = LED_FUNCTION_INDICATOR; + color = ; + pwms = <&pwm 0 50000 0>; + max-brightness = <255>; + }; + + green { + /* SYS-LED 1 - Tricolor */ + function = LED_FUNCTION_POWER; + color = ; + pwms = <&pwm 1 50000 0>; + max-brightness = <255>; + }; + + blue { + /* SYS-LED 1 - Tricolor */ + function = LED_FUNCTION_INDICATOR; + color = ; + pwms = <&pwm 2 50000 0>; + max-brightness = <255>; + }; + }; + +}; + +&uart0 { + clock-frequency = <62500000>; + /delete-property/ clocks; +}; + +&uart1 { + status = "disabled"; +}; + +&uart2 { + status = "okay"; + /* + * bluetooth-le { + * compatible = "brcm,bcm20732"; + * enable-gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>; + *}; + */ +}; + +&gmac1 { + status = "disabled"; +}; +&gmac2 { + status = "disabled"; +}; +&gmac3 { + status = "disabled"; +}; + +&pwm { + status = "okay"; +}; + +&nandcs { + nand-ecc-algo = "hw"; + + partitions { + /* + * The partition autodetection does not work for this device. + * It will only detect the "nvram" partition with an incorrect size. + * [ 1.721667] 1 bcm47xxpart partitions found on MTD device brcmnand.0 + * [ 1.727962] Creating 1 MTD partitions on "brcmnand.0": + * [ 1.733117] 0x000000400000-0x000008000000 : "nvram" + */ + + compatible = "fixed-partitions"; + #address-cells = <0x1>; + #size-cells = <0x1>; + + partition0@0 { + label = "u-boot"; + reg = <0x0 0x100000>; + read-only; + }; + + partition1@100000 { + label = "bootkernel1"; + reg = <0x100000 0x300000>; + read-only; + }; + + partition2@400000 { + label = "nvram"; + reg = <0x400000 0x100000>; + read-only; + }; + + partition3@500000 { + label = "bootkernel2"; + reg = <0x500000 0x300000>; + read-only; + }; + + partition4@800000 { + label = "ubi"; + reg = <0x800000 0x7780000>; + }; + }; +};