From patchwork Sat Aug 22 16:19:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 11731233 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 7AC1614F6 for ; Sat, 22 Aug 2020 16:20:24 +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 46CE62072D for ; Sat, 22 Aug 2020 16:20:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YBSvNn1B"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aC+V0gdc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46CE62072D 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=IZltdf4LCL4KKFDJvlp5rhEv8i3tGFJyCEmOsQ+ax/4=; b=YBSvNn1BdNXX30Cf5LJuc7r1F 90UFZJycdrEXUigBMUHn2vK7bJpNwcdY0JIahHdCc997GfD7Qnl5Tn2FKRpx+UrdMCOHNp5PTuVLO 8LuYef2vol5R37zXMAXjGbRMt/dqkK9r4xgYp0akDGCzfAZv3KWmiVcKcjAPrExClH/g1LTi4HX3V dL8Nqyy9pTMbvGpmoAG5hyqYmTDsOHUKF7JeMvyn1F0iB3RUVH+hbM67f5qDJOpjKF1XzMWzliFxO 7NKttfr881Pm1n0P3B76AREO/Yu7qzYuNUQzJJQq01U4+Jgo1HkxNw4em0HqRIUfdqijlp/RV/Yct YwhGweCTA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k9WFY-0005Ak-5v; Sat, 22 Aug 2020 16:20:13 +0000 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k9WF9-00053G-I4 for linux-arm-kernel@lists.infradead.org; Sat, 22 Aug 2020 16:19:49 +0000 Received: by mail-ej1-x643.google.com with SMTP id bo3so6167056ejb.11 for ; Sat, 22 Aug 2020 09:19:43 -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=clutqyMrofPlWjoqQurqo0TfHJmwsxKb7qlkHAXq324=; b=aC+V0gdc4Hi5oknU1agUTcsE3FZsIQYYt57OhqVlQCESyqZj0zhIsUI+oppbufbkpY SHsAewK/ofZCQ8AEFlRSiL5jXxbSQFE2JxOVqUgMZHxnUjaCe+pYbB1idNpGbBaVGhEo ElMNA8PP2Zm0a4IGC4ZCtDXZn0V/7/9U+/QMxfH2QCGeXgYOS5HlCQw2TaYAWRb3+JI/ 1N+qA8MZB2HLghaEfBAB6pspbC3bYocXiTcUoQgj+xT6Ab4Ts/n8/HFNIf8iTyvesUto /CTiIhgQn/ekWQNH7Ypau5R/obVGLj7DyVNa37Iqjmc+NmGU8cq5avkpZiAHFtLfdXvN skIw== 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=clutqyMrofPlWjoqQurqo0TfHJmwsxKb7qlkHAXq324=; b=NUpvIGkpfwU/6YnKenZkAhVjhC9kculLqw+UGpcWMGpnrxcnitC2iSzssFDzNQyY+7 yZ5BPpN68LTcI8QnJ+U7+qNRHhyL7vAgOpUfe+YrE9GNmGynZvq7vME0fOw92uW3p6zB u9Pw9stL9Em+QFZpJpUKYg8eWbBibIcjgbb5mrV/I9pi1YDClRdUIeXkZPotOBmTCSKl FJv6wZq8kTvIxDaCRz5BlGhtkN9eSxmKHGfYbqpPpO5Z+b1P+rJ/O2tYuAa62mzZ3JZ3 dDeXmifiKhdvgJ7U00n8iclI03t1X1DUm2Rj7s/yPdqWXqEV9P1vDZigWzaohHnt+pPm 1NWw== X-Gm-Message-State: AOAM531LptqrOl2Xc5M6m2m3VEAE8e0DE4YEUcYzi4gzEMDrIy91otRh YIy4RY2OIbLpBz+ba9HfaMSbaMkqnWo= X-Google-Smtp-Source: ABdhPJztWSq7XXzJajcjKaUTw0g+h0RXtfO8T5WJuIqqrNn1TYSgc/WR+bWq/aSLjxmxqF4uVGr/YQ== X-Received: by 2002:a17:906:b248:: with SMTP id ce8mr7659610ejb.85.1598113182620; Sat, 22 Aug 2020 09:19:42 -0700 (PDT) Received: from debian64.daheim (p4fd09171.dip0.t-ipconnect.de. [79.208.145.113]) by smtp.gmail.com with ESMTPSA id j1sm3255811edq.58.2020.08.22.09.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Aug 2020 09:19:41 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.94) (envelope-from ) id 1k9WEw-0005Fy-L0; Sat, 22 Aug 2020 18:19:34 +0200 From: Christian Lamparter To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 6/6] ARM: BCM5301X: Add DT for Meraki MR32 Date: Sat, 22 Aug 2020 18:19:23 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200822_121947_772129_CBADD02F X-CRM114-Status: GOOD ( 23.90 ) 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:643 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: Florian Fainelli , Scott Branden , Hauke Mehrtens , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Chris Blake , Rob Herring , Ray Jui , bcm-kernel-feedback-list@broadcom.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org add support for the Cisco Meraki MR32. This is a dual-band enterprise class 802.11ac access point. 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 --- v1 -> v2: - fixed order of boards in Makefile. (Scott Branden) - added device_type to memory node. (Florian Fainelli) - added hw i2c, although doesn't work. (Florian Fainelli) - renamed gpio-keys to just keys. - included pinmux configurations for i2c and pwm. --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 219 +++++++++++++++++++++ 2 files changed, 220 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 4572db3fa5ae..d254ca2a942d 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -127,6 +127,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm47094-luxul-xwr-3150-v1.dtb \ bcm47094-netgear-r8500.dtb \ bcm47094-phicomm-k3.dtb \ + bcm53016-meraki-mr32.dtb \ bcm94708.dtb \ bcm94709.dtb \ bcm953012er.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..7306df7ff704 --- /dev/null +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts @@ -0,0 +1,219 @@ +// 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>; + device_type = "memory"; + }; + + 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>; + }; + }; + + 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>; + }; + }; + + i2c { + /* + * The platform provided I2C does not budge. + * This is a replacement until I can figure + * out what are the missing bits... + */ + + 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 */ + }; + + eeprom: eeprom@50 { + compatible = "atmel,24c64"; + reg = <0x50>; + pagesize = <32>; + read-only; + }; + }; +}; + +&i2c0 { + /* status = "okay"; - can be enabled once it works. */ + + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_i2c>; + + clock-frequency = <100000>; + + current_sense: ina219@45 { + compatible = "ti,ina219"; + reg = <0x45>; + shunt-resistor = <60000>; /* = 60 mOhms */ + }; + + eeprom: eeprom@50 { + compatible = "atmel,24c64"; + reg = <0x50>; + pagesize = <32>; + read-only; + }; +}; + +&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"; + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_pwm>; +}; + +&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>; + }; + }; +};