From patchwork Tue May 11 07:48:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12250773 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83290C433ED for ; Tue, 11 May 2021 11:54:04 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 E218061007 for ; Tue, 11 May 2021 11:54:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E218061007 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=g765uKjvjkKfjO8LWNg1gK7jQ+Y0LmUhsLXiilecQF4=; b=XFxF/p+DHRwFseqlT1wJaRidsM f4a5BU8CnoywivvY17CSSmiWZRp6oAtd4v42MsDSwVT+692hJZOv6/oUl+tUNCosVBtRXC25sUM6Z iS61j0hrR7rrSU5HreqYL4l1dcPKhh4kT0kqjRSdhZZshIt3xUdjQmlFyq2fH2nvg/EI5E9iHyqJ7 aGmWT2XhOdVnQkjdKI9qPSNGdRrYpG/zm+6fTpU9WG6k+NwH0f7ylvWxhcbZTNE1Lz7izvcLkPyhn TlhBcx0hn78pO9Hx3xrgihJ/jfPDQtqsWbeAPJB7Zcx5ptKsfRebxX7gICkw6Rd2sglO9c9JBhue6 KwwT+raA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgQwb-00HEDP-4v; Tue, 11 May 2021 11:52:57 +0000 Received: from [2607:7c80:54:e::133] (helo=bombadil.infradead.org) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgN7t-00GXaU-R2 for linux-arm-kernel@desiato.infradead.org; Tue, 11 May 2021 07:48:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=uiKzkDkAIIB8aIVLUtCNC9v++yEKPQ+huL0oPtIoFiU=; b=dwx5eJ0BZXvKN9g3IpVuFgQ/nQ o1QaPLkK2NQFtSOI5gAj1l7NBfhsZT5vJ/Q3q/vnAkd9uoR6hsXScZtcdA/sgwjRxyyl9VugJ4C/v UCNRgE39O6d0Cz6RRzP/JI/9q9ai/wBASnXe0PvJoZHRWI3gil1XNw8pzuvRboOXJoDhCC6ruJiUb aYCvJpvnZNGvt0VdypUXdse/+cLxHYlgxxxMxHXQZEjEwbrVcF5rNspCVs2Pjiq7n9zzRbElqSQXx Y7Wnv7OuPln14kfsVxIxrF7f6MJukj9mBBxTa+Od1/oLZbYJqmXHsHEQW4pCvBrX6G30kIwNUI2QZ 0k5LDTcw==; Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgN7q-009N6i-Pm for linux-arm-kernel@lists.infradead.org; Tue, 11 May 2021 07:48:20 +0000 Received: by mail-lf1-x12c.google.com with SMTP id x19so27302622lfa.2 for ; Tue, 11 May 2021 00:48:17 -0700 (PDT) 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=uiKzkDkAIIB8aIVLUtCNC9v++yEKPQ+huL0oPtIoFiU=; b=xd8lQqOgF4BPgdJAxHeAbrYTihLfDqyzCy9Np2NfWhXII/t6VxYMfYfPih6gWmfyfR 2lk70h32l2/6mbbJzjyvCQWRDnH9ALoer3FuAtICFBI1fCsePkm9H1A1HxnnWFaAy9AE zswFD0qAabrpQK+JfKYLtCJip/e5x9rwvhDxWRtq0DfyegIRR5ORBa5Nsz61Hv3vAZOh 3bOtsrNR2Z8gXfDn3o+Js4TMhTsqIOxSXk0D4FMtCasWSC03nCOdglImOgbGVRqiL6Lh 6ylzRSO4BB7biy+fdlVS97M/YLEu9u4nt/va7miIU+KRzwa8iJ9an9g/1CDgivmbMJSb CH6Q== 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:mime-version :content-transfer-encoding; bh=uiKzkDkAIIB8aIVLUtCNC9v++yEKPQ+huL0oPtIoFiU=; b=Ey4BwXhoVLPCRrElbGu6o2HhFA0EsLLCE0BNz7PFCeWzqSVWEY0dFOLKSAV5XO3td/ HviV8trdIdoHzG1dLZ/yOC6qjOGU+fmD1UGJSHhnj/DjJTvZGNP88hKsbnRTkkzDFey8 9cRL1YP9YGsB6kINWwEYyHh5S6HIVAMDAzlIthrM/pLbg6QVOY+1oOIL5A6XA8a+grRQ kTSRbTbsAA7xRtqM7X7ASQCjgU/8jhOaBDFAEtaRid0Z6/r667CwewBJ9LMaO6TTxIoO mQM4MT+PiMv2FAWfIoKcPbFtAGjbFv//T9Mlp+HehTuuuOr6uB060mcqi/uSiWIwzMxM wj1w== X-Gm-Message-State: AOAM531AvP4reKClqBnIfiG8Cmx/KVXOhqMIHahz/SSDCW5rAbbCex74 y9++aUkXP3RycT0pMBXFtIotR1NoFhdfvQ== X-Google-Smtp-Source: ABdhPJwgnsNg6Zb73boGFz0PGlPUFmfUifBg+Wdn9u5M0TPtC8ZIoy0cYi4mauxGYAqYTeOmtb/sBg== X-Received: by 2002:a05:6512:3619:: with SMTP id f25mr17425959lfs.399.1620719296375; Tue, 11 May 2021 00:48:16 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id e8sm3609866ljk.7.2021.05.11.00.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 00:48:16 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Imre Kaloz , Krzysztof Halasa Cc: Linus Walleij , Zoltan HERPAI , Raylynn Knight Subject: [PATCH] ARM: dts: ixp4xx: Create a proper expansion bus Date: Tue, 11 May 2021 09:48:12 +0200 Message-Id: <20210511074812.686159-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_004818_880101_953A10A6 X-CRM114-Status: GOOD ( 15.01 ) /bin/ln: failed to access 'reaver_cache/texts/20210511_004818_880101_953A10A6': No such file or directory X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_004818_880101_953A10A6 X-CRM114-Status: GOOD ( 11.49 ) 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 IXP4xx expansion bus is 24 bits (256 MB) that is memory mapped between 0x50000000-0x5fffffff usin a set of chip selects. The size of the windows is 16 or 32MB defined by the boot loader system configuration at runtime. Create a rudimentary simple-bus and move the flash memories to the expansion bus, inside the SoC. Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Linus Walleij --- .../boot/dts/intel-ixp42x-linksys-nslu2.dts | 34 +++++++++++-------- .../dts/intel-ixp43x-gateworks-gw2358.dts | 30 ++++++++-------- arch/arm/boot/dts/intel-ixp4xx.dtsi | 13 +++++++ 3 files changed, 49 insertions(+), 28 deletions(-) diff --git a/arch/arm/boot/dts/intel-ixp42x-linksys-nslu2.dts b/arch/arm/boot/dts/intel-ixp42x-linksys-nslu2.dts index 8cacf035dc32..c978a47b74e5 100644 --- a/arch/arm/boot/dts/intel-ixp42x-linksys-nslu2.dts +++ b/arch/arm/boot/dts/intel-ixp42x-linksys-nslu2.dts @@ -90,24 +90,30 @@ gpio-poweroff { timeout-ms = <5000>; }; - /* The first 16MB region on the expansion bus */ + flash@50000000 { - compatible = "intel,ixp4xx-flash", "cfi-flash"; - bank-width = <2>; - /* - * 8 MB of Flash in 0x20000 byte blocks - * mapped in at 0x50000000 - */ - reg = <0x50000000 0x800000>; - - partitions { - compatible = "redboot-fis"; - /* Eraseblock at 0x7e0000 */ - fis-index-block = <0x3f>; - }; }; soc { + bus@50000000 { + /* The first 16MB region at CS0 on the expansion bus */ + flash@0 { + compatible = "intel,ixp4xx-flash", "cfi-flash"; + bank-width = <2>; + /* + * 8 MB of Flash in 0x20000 byte blocks + * mapped in at CS0. + */ + reg = <0x00000000 0x800000>; + + partitions { + compatible = "redboot-fis"; + /* Eraseblock at 0x7e0000 */ + fis-index-block = <0x3f>; + }; + }; + }; + ethernet@c8009000 { status = "ok"; queue-rx = <&qmgr 3>; diff --git a/arch/arm/boot/dts/intel-ixp43x-gateworks-gw2358.dts b/arch/arm/boot/dts/intel-ixp43x-gateworks-gw2358.dts index 051478eb9aa0..a059fe581a97 100644 --- a/arch/arm/boot/dts/intel-ixp43x-gateworks-gw2358.dts +++ b/arch/arm/boot/dts/intel-ixp43x-gateworks-gw2358.dts @@ -76,23 +76,25 @@ pld1: pld@57 { }; }; - flash@50000000 { - compatible = "intel,ixp4xx-flash", "cfi-flash"; - bank-width = <2>; - /* - * 32 MB of Flash in 0x20000 byte blocks - * mapped in at 0x50000000 - */ - reg = <0x50000000 0x2000000>; + soc { + bus@50000000 { + flash@0 { + compatible = "intel,ixp4xx-flash", "cfi-flash"; + bank-width = <2>; + /* + * 32 MB of Flash in 0x20000 byte blocks + * mapped in at CS0. + */ + reg = <0x00000000 0x2000000>; - partitions { - compatible = "redboot-fis"; - /* Eraseblock at 0x1fe0000 */ - fis-index-block = <0xff>; + partitions { + compatible = "redboot-fis"; + /* Eraseblock at 0x1fe0000 */ + fis-index-block = <0xff>; + }; + }; }; - }; - soc { ethernet@c800a000 { status = "ok"; queue-rx = <&qmgr 4>; diff --git a/arch/arm/boot/dts/intel-ixp4xx.dtsi b/arch/arm/boot/dts/intel-ixp4xx.dtsi index 17a712e9d582..2848f8c543af 100644 --- a/arch/arm/boot/dts/intel-ixp4xx.dtsi +++ b/arch/arm/boot/dts/intel-ixp4xx.dtsi @@ -14,6 +14,19 @@ soc { compatible = "simple-bus"; interrupt-parent = <&intcon>; + /* + * The IXP4xx expansion bus is a set of 16 or 32MB + * windows in the 256MB space from 0x50000000 to + * 0x5fffffff. + */ + bus@50000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x00000000 0x50000000 0x10000000>; + dma-ranges = <0x00000000 0x50000000 0x10000000>; + }; + qmgr: queue-manager@60000000 { compatible = "intel,ixp4xx-ahb-queue-manager"; reg = <0x60000000 0x4000>;