From patchwork Fri Jul 24 10:38:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luka Kovacic X-Patchwork-Id: 11682937 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 58A75912 for ; Fri, 24 Jul 2020 10:43:05 +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 2A3B120748 for ; Fri, 24 Jul 2020 10:43:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HMOHIsik"; 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="MKTrm8RF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A3B120748 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=9icUhpLz6xU1PN3QkQ1OArKpCI2BSl9OiNKk00moB3E=; b=HMOHIsikX+D2arnVGxqCScvQh 0RbZ/nFgk0yVSejpAXY+/sDuaue43SEaQrEIznog2a6NR5O3Ei4KDWubV4GF4hLr6PCnboUp82Qp5 65d6cq7AeCWMwFc/99ym9v80cTCieg3vbj4/f4l3USQ9Bxu2rKkuu/gdWFBCFvfNW7FDnyHCFgxTL bOm8pRST6Y/tMmdekad6j4gInmiqyPI5HUfMKyrzCkVXxo0f4zLbPX4/9/z9YzYe0N28YpplK6aF+ umgVvuTpIaiILBQ799K1xnqe3NDVAb1neXXfS9nxgxQouUK1MIJIzY83TdkoZuTFX2WsjJwnsLe5g cWCnbgunA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyv8A-0007T1-Qe; Fri, 24 Jul 2020 10:40:46 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyv6R-0006Vv-By for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 10:39:03 +0000 Received: by mail-wm1-x342.google.com with SMTP id 3so894517wmi.1 for ; Fri, 24 Jul 2020 03:38:59 -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=jzuRpAS8/HJXVbVLylAyBQaGzmpX+rFR9BOvfquNy00=; b=MKTrm8RFq3jYoOmAKlCuZn5T4X3dUyv6SahKhXYwy0NIffWYo8Lfht7c59sIvenQzP vjtw6/RsPvnRZU0rkHfJ1iCIDTcsRL8emdSy1PHUEPX676EcI5jTrdhy3TBzhjhKPOtr gqxTTZHhCM4XtJN90RqXybYY65zg8hKdtMMCLw81jfHtMxqbyUWsm0Bwu+Nvxzf+PP/x Cs6wRftrKJ4N3JoNJqKEW8tfFR0RzCk3ZcKY+gYrywvab/+suj7cc/TYEIWr7BekITh2 sf+FS6BDR7oZxpfrxCNRvMBV8CWefguLDr/USZsF2ZACBS7dhNjRhpsZncgQwgGhAff1 fCCA== 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=jzuRpAS8/HJXVbVLylAyBQaGzmpX+rFR9BOvfquNy00=; b=Z8hWFXoUo3FoLnPzsauFs6KKR9SX8uaolFmiuijeow5IIUvNzaqhSALYxoyqiRhfHq zwW1iWy+hZ9qfgPH3ueaG0YqW1KNzPfZmJL8v9sCX2IxW7bwkC9jUm99rNAUuJvNzMvr H3NlkqM+Qxd9T/MYXOvaQzqMsDVjN5g6atapz+zoDxhMWbn08cBfetg4DUIz30mYbmpi F4bnOlWrLABOWM4szb4h8lAlE969E/aeBFWb67qxRkUUsaIgiK2De2xLRjrGua1rWBVt K+1CBS8jrxWlAwqpDtsU8pC01e4FT62K/hYBIr/gj5ubKx10+TIfEeCXW3+TQbvS3BSK xH1Q== X-Gm-Message-State: AOAM530qe9vPs06UNsZWEbI0d4hyW6ITIZshFWS+JIFE4Hyj247cXd8x ub5xCt1GLxcCUVfxXdMfLe4p6D5w1LLozKRTIFXGIiFsZ7iW9psyY2gaLGazT4zbJp5XHjo6BeE 1SPv9SL6jLOIJ7jQCF69rupaStCgf1fascJVATpB1f6yWh+ND58Yy/ihZ0ptaIRJHhuALq6Goph 2/OJcSeKMJdnIB0mDnbQ== X-Google-Smtp-Source: ABdhPJwtYg2leiWigjNBGlHSEpqgwuWkpBIB3GKIA1LeBVEGPNltJUPGNe3lI9nTH1vI6ZuZK0LpVQ== X-Received: by 2002:a1c:ba83:: with SMTP id k125mr8229420wmf.160.1595587137660; Fri, 24 Jul 2020 03:38:57 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 03:38:56 -0700 (PDT) From: Luka Kovacic To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] arm: mvebu: dts: Add CRS305-1G-4S board Date: Fri, 24 Jul 2020 12:38:38 +0200 Message-Id: <20200724103840.18994-3-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_063859_579616_13FB1D95 X-CRM114-Status: GOOD ( 19.00 ) 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:342 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 CRS305-1G-4S 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-crs305-1g-4s-bit.dts | 43 ++++++++ arch/arm/boot/dts/armada-xp-crs305-1g-4s.dts | 17 +++ arch/arm/boot/dts/armada-xp-crs305-1g-4s.dtsi | 104 ++++++++++++++++++ 4 files changed, 166 insertions(+) create mode 100644 arch/arm/boot/dts/armada-xp-crs305-1g-4s-bit.dts create mode 100644 arch/arm/boot/dts/armada-xp-crs305-1g-4s.dts create mode 100644 arch/arm/boot/dts/armada-xp-crs305-1g-4s.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 8627a38c4100..f3ac0fb7f244 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-crs305-1g-4s.dtb \ + armada-xp-crs305-1g-4s-bit.dtb \ armada-xp-crs326-24g-2s.dtb \ armada-xp-crs326-24g-2s-bit.dtb \ armada-xp-db.dtb \ diff --git a/arch/arm/boot/dts/armada-xp-crs305-1g-4s-bit.dts b/arch/arm/boot/dts/armada-xp-crs305-1g-4s-bit.dts new file mode 100644 index 000000000000..a022c68dc943 --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-crs305-1g-4s-bit.dts @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for MikroTik CRS305-1G-4S+ Bit board + * + * Copyright (C) 2020 Sartura Ltd. + * Author: Luka Kovacic + */ + +#include "armada-xp-crs305-1g-4s.dtsi" + +/ { + model = "MikroTik CRS305-1G-4S+ 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-crs305-1g-4s.dts b/arch/arm/boot/dts/armada-xp-crs305-1g-4s.dts new file mode 100644 index 000000000000..010b83b54212 --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-crs305-1g-4s.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for MikroTik CRS305-1G-4S+ board + * + * Copyright (C) 2020 Sartura Ltd. + * Author: Luka Kovacic + */ + +#include "armada-xp-crs305-1g-4s.dtsi" + +/ { + model = "MikroTik CRS305-1G-4S+"; +}; + +&spi0 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/armada-xp-crs305-1g-4s.dtsi b/arch/arm/boot/dts/armada-xp-crs305-1g-4s.dtsi new file mode 100644 index 000000000000..32fb21b2bf6a --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-crs305-1g-4s.dtsi @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for CRS305-1G-4S 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 = "CRS305-1G-4S+"; + compatible = "mikrotik,crs305-1g-4s", "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"; + }; + }; +};