From patchwork Fri Jul 24 10:38:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luka Kovacic X-Patchwork-Id: 11682933 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 EFE1C912 for ; Fri, 24 Jul 2020 10:42:35 +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 C352520748 for ; Fri, 24 Jul 2020 10:42:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JnZBqFUh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sartura-hr.20150623.gappssmtp.com header.i=@sartura-hr.20150623.gappssmtp.com header.b="lMS0hKsT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C352520748 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sartura.hr 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=UO/eLJqixWtXW9nIUnz3LrG0x+CisQlr1ClAcwY/ABA=; b=JnZBqFUhYygOQMY1geTnWitBU NdsrG/jpRozLKvO1aplwgDBGVTGp/bcErDINE/nRd9zTI9I9HmmxjIquGAulZK3R1SLmH6PLSeBfT gENOW+UqKLe8eRWArnScqxovcX5eWxiuEXrLCYDPYzrVBreWyV07EoXlF3twKevicYG22Zr3Jn+FU aJUGAQQg8AyGFwSroKa7Wfy3snVm7cxFFRGfudiQeOO8ukwDud8UlK+WMbFjDBBf13L+JcKvsVvLJ RFEI+Dx4eAkf8GOIi5WwYZOnCxtFDZXQXGBUtnASj5u8gNIyMVoUQVBdSgapnoYZgW85ljYDk0Xqz 66oPdscFw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyv7z-0007IE-9j; Fri, 24 Jul 2020 10:40:35 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyv6P-0006UW-I2 for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 10:39:02 +0000 Received: by mail-wm1-x343.google.com with SMTP id o2so7838534wmh.2 for ; Fri, 24 Jul 2020 03:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=asNVEYk8KfoZ4vg7N/gD3s4rcXG24Tr1/ayUv6ELQDA=; b=lMS0hKsTGuLOzUEs5OuvhgZ8Stjst8miUPMx3B0A9abxrjSNgaKaVtS/0pZQZa3SZf Ye6XwdvuS/WCKoxzEA6SV89RC7Liz0J/lkrgrvwMRfSwS8fc3zFStCQx+yfgR+vWo309 fFb8PXCdeKxJHyOwdmlWtN63viAJXcLaSGyVZ6NxxV9S5vsjjAr3D9CFnzz/2O9OU/2c 5NjxVsW3ifD6SijmQ08F1Fnb9PDoAIUGj7VFD3PvfYZdiAN4+mpgksweKjvd9VOOhr1z +/9tqNXP9hzE7sxVQCJeyRc8ayX5l8EjVU6iCBnu5ezIHwAmRyLjIruHh+H1UvNR5HyU NumA== 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=asNVEYk8KfoZ4vg7N/gD3s4rcXG24Tr1/ayUv6ELQDA=; b=pmMfZcrWoVo+9OL0+TsoxmEmygJ9IYtICPM/hbLqMBJVddy10QZ4q32/+w7PyGeWVX IEyChGWaY7Hlyc7TTQzKFC+wZ+F6CGc4lEMRlAb03iobFjuq2HSv4pGF5eS3AJnZuyaR qd4yseiGEN/P2UqCOp+7S8OAdQjLOikXaDcZ1SwjkzED+6ZaLVHhjaVqshP25jY5IW+3 cJo8e9ZkRKl+GX+m/7GvPAob79JXdhGAPXJlTiTPKWanXnQ1G/zSxWQSgilKgE3889Le q5ZH7e4oyU3IpCtBZYGdlTznp74RF1JyMuKB5BVoZBlcQri3kUX2rPsmLHgcHshdIqTU hc8w== X-Gm-Message-State: AOAM532wtX8J5U2rLvUFshF8/1/6DiJD3ggtu0yjojAl4bdN/4YKDxOH ZGCoqiI0pQz+CNpjPXVsmy9quXdBMqVsAA/qHqDlYPlG4DfGNDzbaxb7Se90YPqpqU7aduz3Hbh 07S6lJRORDStX7N7uj9h/UeVOOm3Sttgzkpm1HB0BwaqS5nYXt5+l94j3N9nB1+aPd496vIqeAE NjfJtjZHhm6igLV9dLgA== X-Google-Smtp-Source: ABdhPJx0ZNqiuuhbIiOHn5PgnM0nwGQ+h7ykoniMkeWT2A7yZtkoVyUDBnTbW5mVNDL0oRvX3iICXQ== X-Received: by 2002:a1c:a181:: with SMTP id k123mr8235759wme.172.1595587135446; Fri, 24 Jul 2020 03:38:55 -0700 (PDT) Received: from lukakovacicapc.local ([2a00:ee2:4b0d:3001:fbc5:498b:ed6d:cfac]) by smtp.gmail.com with ESMTPSA id f186sm6526280wmf.29.2020.07.24.03.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 03:38:54 -0700 (PDT) From: Luka Kovacic To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] arm: mvebu: dts: Add CRS326-24G-2S board Date: Fri, 24 Jul 2020 12:38:37 +0200 Message-Id: <20200724103840.18994-2-luka.kovacic@sartura.hr> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200724103840.18994-1-luka.kovacic@sartura.hr> References: <20200724103840.18994-1-luka.kovacic@sartura.hr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_063858_018298_816621BB X-CRM114-Status: GOOD ( 18.90 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 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:343 listed in] [list.dnswl.org] -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_SIGNED Message has a DKIM or DK signature, not necessarily valid -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: andrew@lunn.ch, Luka Perkov , jason@lakedaemon.net, Jakov Petrina , gregory.clement@bootlin.com, Luka Kovacic , sebastian.hesselbarth@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org MikroTik CRS326-24G-2S board has a switch chip with an integrated Marvell Prestera 98DX3236 CPU. This commit includes two board variants, namely the factory default one and a Bit variant. The Bit variant has a bigger Macronix flash. This device tree includes basic Linux support. Signed-off-by: Luka Kovacic Cc: Luka Perkov Cc: Jakov Petrina Reviewed-by: Andrew Lunn --- arch/arm/boot/dts/Makefile | 2 + .../boot/dts/armada-xp-crs326-24g-2s-bit.dts | 43 ++++++++ arch/arm/boot/dts/armada-xp-crs326-24g-2s.dts | 17 +++ .../arm/boot/dts/armada-xp-crs326-24g-2s.dtsi | 104 ++++++++++++++++++ 4 files changed, 166 insertions(+) create mode 100644 arch/arm/boot/dts/armada-xp-crs326-24g-2s-bit.dts create mode 100644 arch/arm/boot/dts/armada-xp-crs326-24g-2s.dts create mode 100644 arch/arm/boot/dts/armada-xp-crs326-24g-2s.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index e6a1cac0bfc7..8627a38c4100 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1312,6 +1312,8 @@ dtb-$(CONFIG_MACH_ARMADA_39X) += \ armada-398-db.dtb dtb-$(CONFIG_MACH_ARMADA_XP) += \ armada-xp-axpwifiap.dtb \ + armada-xp-crs326-24g-2s.dtb \ + armada-xp-crs326-24g-2s-bit.dtb \ armada-xp-db.dtb \ armada-xp-db-dxbc2.dtb \ armada-xp-db-xc3-24g4xg.dtb \ diff --git a/arch/arm/boot/dts/armada-xp-crs326-24g-2s-bit.dts b/arch/arm/boot/dts/armada-xp-crs326-24g-2s-bit.dts new file mode 100644 index 000000000000..21f442afab1f --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-crs326-24g-2s-bit.dts @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for MikroTik CRS326-24G-2S+ Bit board + * + * Copyright (C) 2020 Sartura Ltd. + * Author: Luka Kovacic + */ + +#include "armada-xp-crs326-24g-2s.dtsi" + +/ { + model = "MikroTik CRS326-24G-2S+ Bit"; +}; + +&spi0 { + status = "okay"; + + spi-flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; /* Chip select 0 */ + spi-max-frequency = <108000000>; + m25p,fast-read; + + partition@u-boot { + reg = <0x00000000 0x001f0000>; + label = "u-boot"; + }; + partition@u-boot-env { + reg = <0x001f0000 0x00010000>; + label = "u-boot-env"; + }; + partition@ubi1 { + reg = <0x00200000 0x03f00000>; + label = "ubi1"; + }; + partition@ubi2 { + reg = <0x04100000 0x03f00000>; + label = "ubi2"; + }; + }; +}; diff --git a/arch/arm/boot/dts/armada-xp-crs326-24g-2s.dts b/arch/arm/boot/dts/armada-xp-crs326-24g-2s.dts new file mode 100644 index 000000000000..83aef43f66d5 --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-crs326-24g-2s.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for MikroTik CRS326-24G-2S+ board + * + * Copyright (C) 2020 Sartura Ltd. + * Author: Luka Kovacic + */ + +#include "armada-xp-crs326-24g-2s.dtsi" + +/ { + model = "MikroTik CRS326-24G-2S+"; +}; + +&spi0 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/armada-xp-crs326-24g-2s.dtsi b/arch/arm/boot/dts/armada-xp-crs326-24g-2s.dtsi new file mode 100644 index 000000000000..f3e1a25ca5f2 --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-crs326-24g-2s.dtsi @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for CRS326-24G-2S board + * + * Copyright (C) 2016 Allied Telesis Labs + * Copyright (C) 2020 Sartura Ltd. + * + * Based on armada-xp-db.dts + * + * Note: this Device Tree assumes that the bootloader has remapped the + * internal registers to 0xf1000000 (instead of the default + * 0xd0000000). The 0xf1000000 is the default used by the recent, + * DT-capable, U-Boot bootloaders provided by Marvell. Some earlier + * boards were delivered with an older version of the bootloader that + * left internal registers mapped at 0xd0000000. If you are in this + * situation, you should either update your bootloader (preferred + * solution) or the below Device Tree should be adjusted. + */ + +/dts-v1/; +#include "armada-xp-98dx3236.dtsi" + +/ { + model = "CRS326-24G-2S+"; + compatible = "mikrotik,crs326-24g-2s", "marvell,armadaxp-98dx3236", "marvell,armada-370-xp"; + + chosen { + bootargs = "console=ttyS0,115200 earlyprintk"; + }; + + memory { + device_type = "memory"; + reg = <0 0x00000000 0 0x20000000>; /* 512 MB */ + }; +}; + +&L2 { + arm,parity-enable; + marvell,ecc-enable; +}; + +&devbus_bootcs { + status = "okay"; + + /* Device Bus parameters are required */ + + /* Read parameters */ + devbus,bus-width = <16>; + devbus,turn-off-ps = <60000>; + devbus,badr-skew-ps = <0>; + devbus,acc-first-ps = <124000>; + devbus,acc-next-ps = <248000>; + devbus,rd-setup-ps = <0>; + devbus,rd-hold-ps = <0>; + + /* Write parameters */ + devbus,sync-enable = <0>; + devbus,wr-high-ps = <60000>; + devbus,wr-low-ps = <60000>; + devbus,ale-wr-ps = <60000>; +}; + +&uart0 { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&i2c0 { + clock-frequency = <100000>; + status = "okay"; +}; + +&usb0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + spi-flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; /* Chip select 0 */ + spi-max-frequency = <108000000>; + m25p,fast-read; + + partition@u-boot { + reg = <0x00000000 0x001f0000>; + label = "u-boot"; + }; + partition@u-boot-env { + reg = <0x001f0000 0x00010000>; + label = "u-boot-env"; + }; + partition@ubi1 { + reg = <0x00200000 0x00e00000>; + label = "ubi1"; + }; + }; +};