From patchwork Tue Dec 28 00:28:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12700089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 55E38C433F5 for ; Tue, 28 Dec 2021 00:31:58 +0000 (UTC) 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=Ym/ZzbKXYBS5PyXlNgX5BAxwdlGbhrEmE9EDIYTDMn4=; b=qpUZmWOl3DV5qX CqKHN20LW/ssOVMVYQQKdoTjtLeXXNGmTQSuMVsaq8Dmn8TidJ2eoZixmv1eW675CmarVIfxelGCy E5E32noGY325Q8lnq9jwQv5U5A57MuooDgnCLu3b1OZ7KEDkhSYq9VX02OEyvU1EalCVMXJseDztj XZhkqcrDAXmEXnzYn84e5I3gANzSQQ+XYnsK1OaP3oZNsYI5FGZB2nXR3c0MgHOsJXsQ7poHIMhkD tTdQl0VURFNfZ3nxvtH7AMD3Wzdbk+ikupR6UW+K5pWdXOyUazeiCqNPRrYXeZ9cdDNBPU5SC5NCy KicYy8Tt3ULutSegKlag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n20Nr-00015M-Rh; Tue, 28 Dec 2021 00:30:31 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n20Nn-00014x-SY for linux-arm-kernel@lists.infradead.org; Tue, 28 Dec 2021 00:30:29 +0000 Received: by mail-lf1-x12c.google.com with SMTP id p13so1608607lfh.13 for ; Mon, 27 Dec 2021 16:30:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bL5d0BJlprhRUYpSVxkBglMoTJ04mEtgaK5d1ua9JBs=; b=W7QiUN7PCwtLobG+HlueKk5n8BMuDksuTcXxAvhRpvFHvVEXJu9E5hguCNZ40cUTqI +CCU1ktf4eHmsn/5bZ3+ivfISAfht/D3ncNZ5LSKgGEb2eDwLCXBbTTry+YLoRNih16d LcO6Q835rJuB0r2z5+Hi8aVwBHs7UDBv6BkcJwUsXfzu31DTIhgdJovt4ApX5RI7Cpmd Nnn/UP13lM2CRVMCghx2hDH1dGCuAvPYSGye93d96UJ1/fCn0tjTgnpt5E54Aypea8Kl EoWLD4ShdKln6F57Pas3j1jfZTjkl5LJm1kFGF6nHwxf4u4FpScJjeu6BF//qJb+D6Df CdIw== 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=bL5d0BJlprhRUYpSVxkBglMoTJ04mEtgaK5d1ua9JBs=; b=P7TTq0fruDbN3ZAPEXiDNFJo6IuCYeGSJBteIjuXjbvfy2NVIgfqV+Wf9grwoTBHf9 +pyRF2JBSCQSvfxwT4EzDSLxWyPFY2js6BXIkJcaaJJnVFBevqqCjsMM0cDlo27KnZcf oAeMkjM6IVEZCHVfMqEzhrtgdLnxms145P3hJ9OfpSNC9QlenIznBCvgc92qL0vpeAYy 25AJP7aRvlzBS0DJm732cHks/nbot5W5RDuq9LX1jdjNWEunE9UH8HTQB5PbaiN9THHi W5jX1Cr8Qvdf24a7xP52S+YRCbdm4jFiTTsyUVJqVyLUUjKi7+1vuA0jBKF7ivK2bgyr v3zg== X-Gm-Message-State: AOAM531YfutB21sU/IekMNrb546heXXOXvLjbq8kYa1zWqZh1y4ti8Ol UCFeuBNj3knzr650/erYjEyklp2AXHjmgw== X-Google-Smtp-Source: ABdhPJw1Dzf8yhvnoHif3MGZXHAU1j8ne3tcTkgIcbIyIL1EVLT99v21uQWewKAx5WJ2cKpTsazsWg== X-Received: by 2002:a05:6512:3093:: with SMTP id z19mr9248178lfd.670.1640651424633; Mon, 27 Dec 2021 16:30:24 -0800 (PST) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id b18sm976419ljf.93.2021.12.27.16.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 16:30:23 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Imre Kaloz , Krzysztof Halasa Cc: Linus Walleij , Zoltan HERPAI Subject: [PATCH] ARM: dts: ixp4xx: Fix up the Netgear WG302 device tree Date: Tue, 28 Dec 2021 01:28:18 +0100 Message-Id: <20211228002818.302910-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211227_163028_006356_49E4A325 X-CRM114-Status: GOOD ( 15.64 ) 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 version we can support (because of access to the hardware) is WG302v1, so rename the file and make the following modifications: - We have 32MB memory not 16MB - The default console speed is 9600 baud so use this - The device has no ATA disk nor USB so drop the /dev/sda1 default mount, this needs to mount ramdisk or NFS - Both serial0 and serial1 cannot be assigned with aliases, just assign serial0 - The Flash is just 8MB so augment the size - The Flash FIS index is at eraseblock 0x3f - The PHY is at MDIO address 30 Tested by bringing the Netgear WG302v1 up to userspace using initramfs appended to the kernel and downloaded over TFTP, then ifconfig to bring up eth0 and pinging the host. All works fine including SSH into the device from the host. Cc: Zoltan HERPAI Signed-off-by: Linus Walleij --- Zoltan: please check if some of these changes makes GW7001 come up as well. --- arch/arm/boot/dts/Makefile | 2 +- ...2.dts => intel-ixp42x-netgear-wg302v1.dts} | 29 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) rename arch/arm/boot/dts/{intel-ixp42x-netgear-wg302v2.dts => intel-ixp42x-netgear-wg302v1.dts} (77%) diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 7dfda6be2916..4b1f47a60a84 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -268,7 +268,7 @@ dtb-$(CONFIG_ARCH_IXP4XX) += \ intel-ixp42x-dlink-dsm-g600.dtb \ intel-ixp42x-gateworks-gw2348.dtb \ intel-ixp43x-gateworks-gw2358.dtb \ - intel-ixp42x-netgear-wg302v2.dtb \ + intel-ixp42x-netgear-wg302v1.dtb \ intel-ixp42x-arcom-vulcan.dtb \ intel-ixp42x-gateway-7001.dtb dtb-$(CONFIG_ARCH_KEYSTONE) += \ diff --git a/arch/arm/boot/dts/intel-ixp42x-netgear-wg302v2.dts b/arch/arm/boot/dts/intel-ixp42x-netgear-wg302v1.dts similarity index 77% rename from arch/arm/boot/dts/intel-ixp42x-netgear-wg302v2.dts rename to arch/arm/boot/dts/intel-ixp42x-netgear-wg302v1.dts index a57009436ed8..df2ca6d95ee5 100644 --- a/arch/arm/boot/dts/intel-ixp42x-netgear-wg302v2.dts +++ b/arch/arm/boot/dts/intel-ixp42x-netgear-wg302v1.dts @@ -10,26 +10,26 @@ #include / { - model = "Netgear WG302 v2"; - compatible = "netgear,wg302v2", "intel,ixp42x"; + model = "Netgear WG302 v1"; + compatible = "netgear,wg302v1", "intel,ixp42x"; #address-cells = <1>; #size-cells = <1>; memory@0 { - /* 16 MB SDRAM according to OpenWrt database */ + /* 32 MB SDRAM according to boot arguments */ device_type = "memory"; - reg = <0x00000000 0x01000000>; + reg = <0x00000000 0x02000000>; }; chosen { - bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait"; - stdout-path = "uart1:115200n8"; + /* The RedBoot comes up in 9600 baud so let's keep this */ + bootargs = "console=ttyS0,9600n8"; + stdout-path = "uart1:9600n8"; }; aliases { /* These are switched around */ serial0 = &uart1; - serial1 = &uart0; }; soc { @@ -38,18 +38,17 @@ flash@0,0 { compatible = "intel,ixp4xx-flash", "cfi-flash"; bank-width = <2>; /* - * 32 MB of Flash in 128 0x20000 sized blocks - * mapped in at CS0 and CS1 + * 8 MB of Flash in 64 0x20000 sized blocks + * mapped in at CS0. */ - reg = <0 0x00000000 0x2000000>; + reg = <0 0x00000000 0x800000>; /* Configure expansion bus to allow writes */ intel,ixp4xx-eb-write-enable = <1>; partitions { compatible = "redboot-fis"; - /* CHECKME: guess this is Redboot FIS */ - fis-index-block = <0xff>; + fis-index-block = <0x3f>; }; }; }; @@ -82,14 +81,14 @@ ethernet@c8009000 { queue-rx = <&qmgr 3>; queue-txready = <&qmgr 20>; phy-mode = "rgmii"; - phy-handle = <&phy8>; + phy-handle = <&phy30>; mdio { #address-cells = <1>; #size-cells = <0>; - phy8: ethernet-phy@8 { - reg = <8>; + phy30: ethernet-phy@30 { + reg = <30>; }; }; };