From patchwork Tue Jun 15 23:14:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12323321 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=-16.9 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,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 58E04C48BDF for ; Tue, 15 Jun 2021 23:36:05 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1DD3E6137D for ; Tue, 15 Jun 2021 23:36:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DD3E6137D 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=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=dtUzJds7ZQ1/V8xGyBYWC/fr5fIYJ1CNQ6v3iW5/XJo=; b=aJ3X5gYCuM7B7x uzVEqHZqMkI6/uoam2MSH1usgSaVkVSDT59K3TbEHG5v4Gh1N6SO4sfoj1ZDc39wbjDkat92l4ZwZ CCsSDe3+KgAgZoDlNd1rl7Cx8FihU5EIkdo7TlvmdQ6KFfdI1vCWejZsMcrYtLxznkWxMY7y0wCuB 3C53NDt0qHFCoUU04BeCH2M72xPW2+qwRbLeQE/btuthAUq8WfrcTbb+DdyuE5hL1jY1JD2L3UWK7 p7aen7dElO9P9/7+0SloIfA/Ly4hIpfRwcnUp2N6GZcK7qElfzO3DTCjL1+k7y9lIYfj6X6PE8AyK b8s1A2N81UqHN9AzwYog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltIYh-003tIz-GW; Tue, 15 Jun 2021 23:33:29 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltIIb-003oAg-Uk for linux-arm-kernel@lists.infradead.org; Tue, 15 Jun 2021 23:16:54 +0000 Received: by mail-lj1-x22e.google.com with SMTP id e25so1045726ljj.1 for ; Tue, 15 Jun 2021 16:16:48 -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=lpfCccnzAy7ZcbsL9dfwVUTx2Uh8F+nYADgM72bTq1I=; b=F5SureNyQkaCmJhzFvQC6Iu4UENqLdJfvDs0PT683e7e0fIokfWXOQikoMnGVS+lf1 ViU/ABRpcHeC9MO6F8VmZPGV22rx9b+szQGEcjRA15AjvBYgQ7nLqJ5kgNhDwtk0fnPY lODeGEohibu7qY90zhigo+AV3u2g0sfJ106HBZL4qnxqMrKg5Zt6WHCjpuxXwuToi9yV +5ly8QFZwSf/WYCBr9ApVuVXTcSNaaSToNP87NNBAbaXe5bGHc90MxAX1S8tJ7UODMW2 h/NyLF8b6h5uIK+lt9/UhvWajuApn2SA9VEwzos72TNwIoUM2sIZjn0L8jqJVTyHxTVL O0xQ== 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=lpfCccnzAy7ZcbsL9dfwVUTx2Uh8F+nYADgM72bTq1I=; b=olgh7Fq60hVES2OlTcNyw6kzww9Ee6ZSqhC1jUZOV5xDNYhMOSaL9LINXI7bTHbXHS eDevPOTZU6TSYB5rewRW1j4dLMKzWjbLLroQLsEM7hRYMTwwqXCFBMPT9hbO3rQWaqJB wTD/p6z0D0AvwwznOVmR6tAI09COt+FKHsu5DnePQZ1EkQAaJiIaYk4k86JvAT+r4Q58 rBumYT3FDnBtZKG8naiP8nsUUrvFBudrLdnTAq1OmPvfpnPDBwd6/wtxsJnSxh22EeRj cZ5/31r9UyMRytVtDLx9I76XpQPEdu+72pZzJEPq3xsTfmm9gG2zFfwCxajMhdEHps5y jsbQ== X-Gm-Message-State: AOAM530stbG4cVfUdihOU+/UbZgjSJMEp46o5ZrYkazO68hqkiBEkOos IlcrMXzrK2KFdt/4JOtM4kThWmeGaGDPCQ== X-Google-Smtp-Source: ABdhPJyEdJzcgnEolo2yqMA66a9DAYOq0JjJCEOVlcPZE2GHL2dRD1bdUCPjeF58ASZXDh4lSJomZw== X-Received: by 2002:a05:651c:2115:: with SMTP id a21mr1847055ljq.310.1623799006924; Tue, 15 Jun 2021 16:16:46 -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 m16sm50489lfl.300.2021.06.15.16.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jun 2021 16:16:46 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Imre Kaloz , Krzysztof Halasa Cc: Linus Walleij , Rod Whitby , Alessandro Zummo Subject: [PATCH] ARM: dts: ixp4xx: Add devicetree for Iomega NAS 100D Date: Wed, 16 Jun 2021 01:14:36 +0200 Message-Id: <20210615231436.1252375-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-20210615_161650_087453_E8FA851B X-CRM114-Status: GOOD ( 17.93 ) 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 This creates a more or less fully featured device tree for the IXP42x-based Iomega NAS 100D. We can't read out the raw flash contents for ethernet MAC, and we cannot handle a power-off-button inside the kernel like the boardfile does. These two things are normally done in userspace. This conversion is part of moving all of the IXP4xx board files over to device tree to modernize the IXP4xx kernel. Cc: Rod Whitby Cc: Alessandro Zummo Signed-off-by: Linus Walleij --- arch/arm/boot/dts/Makefile | 1 + .../boot/dts/intel-ixp42x-iomega-nas100d.dts | 146 ++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 arch/arm/boot/dts/intel-ixp42x-iomega-nas100d.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index f8f09c5066e7..c34fb146a5a0 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -240,6 +240,7 @@ dtb-$(CONFIG_ARCH_INTEGRATOR) += \ integratorcp.dtb dtb-$(CONFIG_ARCH_IXP4XX) += \ intel-ixp42x-linksys-nslu2.dtb \ + intel-ixp42x-iomega-nas100d.dtb \ intel-ixp43x-gateworks-gw2358.dtb dtb-$(CONFIG_ARCH_KEYSTONE) += \ keystone-k2hk-evm.dtb \ diff --git a/arch/arm/boot/dts/intel-ixp42x-iomega-nas100d.dts b/arch/arm/boot/dts/intel-ixp42x-iomega-nas100d.dts new file mode 100644 index 000000000000..16114eb29e6e --- /dev/null +++ b/arch/arm/boot/dts/intel-ixp42x-iomega-nas100d.dts @@ -0,0 +1,146 @@ +// SPDX-License-Identifier: ISC +/* + * Device Tree file for Iomega NAS 100D + */ + +/dts-v1/; + +#include "intel-ixp42x.dtsi" +#include + +/ { + model = "Iomega NAS 100D"; + compatible = "iom,nas-100d", "intel,ixp42x"; + #address-cells = <1>; + #size-cells = <1>; + + memory@0 { + /* 64 MB SDRAM */ + device_type = "memory"; + reg = <0x00000000 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait"; + stdout-path = "uart0:115200n8"; + }; + + aliases { + serial0 = &uart0; + }; + + leds { + compatible = "gpio-leds"; + led-wlan { + label = "nas100d:red:wlan"; + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; + default-state = "on"; + /* We don't have WLAN trigger in the kernel (yet) */ + linux,default-trigger = "netdev"; + }; + led-disk { + label = "nas100d:red:disk"; + gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; + default-state = "on"; + linux,default-trigger = "disk-activity"; + }; + led-power { + label = "nas100d:red:power"; + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; + default-state = "on"; + linux,default-trigger = "heartbeat"; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + + button-power { + wakeup-source; + linux,code = ; + label = "power"; + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + }; + button-reset { + wakeup-source; + linux,code = ; + label = "reset"; + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; + }; + }; + + i2c { + compatible = "i2c-gpio"; + sda-gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + #address-cells = <1>; + #size-cells = <0>; + + rtc@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + }; + }; + + gpio-poweroff { + compatible = "gpio-poweroff"; + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + timeout-ms = <5000>; + }; + + 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>; + }; + }; + }; + + pci@c0000000 { + status = "ok"; + + /* + * Taken from NAS 100D PCI boardfile (nas100d-pci.c) + * We have slots (IDSEL) 1, 2 and 3 and pins 1, 2 and 3. + */ + interrupt-map = + /* IDSEL 1 */ + <0x0800 0 0 1 &gpio0 11 3>, /* INT A on slot 1 is irq 11 */ + /* IDSEL 2 */ + <0x1000 0 0 1 &gpio0 10 3>, /* INT A on slot 2 is irq 10 */ + /* IDSEL 3 */ + <0x1800 0 0 1 &gpio0 9 3>, /* INT A on slot 3 is irq 9 */ + <0x1800 0 0 2 &gpio0 8 3>, /* INT B on slot 3 is irq 8 */ + <0x1800 0 0 3 &gpio0 7 3>; /* INT C on slot 3 is irq 7 */ + }; + + ethernet@c8009000 { + status = "ok"; + queue-rx = <&qmgr 3>; + queue-txready = <&qmgr 20>; + phy-mode = "rgmii"; + phy-handle = <&phy0>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; + }; + }; +};