From patchwork Mon Sep 20 12:41:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 12505235 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, 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 175E2C433EF for ; Mon, 20 Sep 2021 12:42:09 +0000 (UTC) Received: by mail.kernel.org (Postfix) id EA97661019; Mon, 20 Sep 2021 12:42:08 +0000 (UTC) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE17760FC1 for ; Mon, 20 Sep 2021 12:42:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CE17760FC1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=semihalf.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=semihalf.com Received: by mail-lf1-f51.google.com with SMTP id u8so15951924lff.9 for ; Mon, 20 Sep 2021 05:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Hr7++l5WuIJ3QbTb1muJLIYeQhycvVCwIfK8xwCK0lk=; b=nDLfjWYlYoJdQDKQVkel8PQOrJt2sQoW4MYJA3uqAsNj59p9NbFuwlUokwasgQHucu 7VEjc4T0sqUhLEubj8xk5UHvL+XYRKgmCRaHjAM19BwHP/2fdqokZeTfQwslqKWoUEsV i/J0hdUos3p3PEQ84D2/iJ0VMrK5lm8I3sR66ovnlB6NZTjvch6Thb0K53KbPVEryUbb 85gGt3QdgXVtAaF0e2wtR3HAg0XKdUJsEXkv5Z+JmETfWN1wtWCadYtAtsrqtvHey4BU uHiehJK1sg9Eb1puxisTNfq3wEnNDb7cbWNVUix+Z7RFZRZXwEAJEXEzDITXj/OaINZ/ 4FQQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Hr7++l5WuIJ3QbTb1muJLIYeQhycvVCwIfK8xwCK0lk=; b=1DOaybgLGAiLQhqVSZ/YfpNGMNEXOu4Ukycrpu95sluiy+jgVIn3zKvZch0AdTjjLt VMmIygjaiuMQZh7oFI10+bwKCJT5uKnS6zQAYjnDQAgWmUvbah6DjzXXpM7N7W3l7pw4 cP5gAucJ5OWaQl9+aiAhv9+rlIEahTu8n8HlxiF1RsQGsqFSr/RmafkbzYaS7W7Kwaso vwGMQsPoRoaRd8CwK015qlV7U9vw6Di6qt2nzGk7Yu/HT43LBoatM9eh7rzMULo7NPHW PQzhKnPauCQxaupLMD+6jXPFfaE+9hjvTRChdvXv18hlyU993dLDiJ/qJqBxF2ACWcem AQ/w== X-Gm-Message-State: AOAM531eF1TRO5McqafHdj/4EqWxMMxXqRNXkedQa3koidehApC+E+tU M2kKs4gbBvC4Svj0EedowxXPTngApWGyByRV X-Google-Smtp-Source: ABdhPJwoadCgb7r/qWWgGsAlmHH0LQz9izuJ5mTYhJpd9dpLOLSNCUkppvO6+7N7MNxy+hsNTWCTeQ== X-Received: by 2002:ac2:4e98:: with SMTP id o24mr18180477lfr.295.1632141727145; Mon, 20 Sep 2021 05:42:07 -0700 (PDT) Received: from grasshopper.googchameleon.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id v1sm630944lfo.308.2021.09.20.05.42.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 05:42:06 -0700 (PDT) From: =?utf-8?q?Pawe=C5=82_Anikiel?= List-Id: To: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org, arnd@arndb.de, olof@lixom.net, soc@kernel.org, dinguyen@kernel.org, p.zabel@pengutronix.de Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tn@semihalf.com, ka@semihalf.com, jam@semihalf.com, =?utf-8?q?Pawe=C5=82_An?= =?utf-8?q?ikiel?= Subject: [PATCH 1/3] dt-bindings: mtd: spi-nor: add n25q00 schema Date: Mon, 20 Sep 2021 14:41:39 +0200 Message-Id: <20210920124141.1166544-2-pan@semihalf.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210920124141.1166544-1-pan@semihalf.com> References: <20210920124141.1166544-1-pan@semihalf.com> MIME-Version: 1.0 Add schema for the n25q00 NOR flash memory. Signed-off-by: Paweł Anikiel Acked-by: Rob Herring Nacked-by: Pratyush Yadav --- Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml index ed590d7c6e37..efb3c5e05c5a 100644 --- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml +++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml @@ -18,7 +18,7 @@ properties: - items: - pattern: "^((((micron|spansion|st),)?\ (m25p(40|80|16|32|64|128)|\ - n25q(32b|064|128a11|128a13|256a|512a|164k)))|\ + n25q(00|32b|064|128a11|128a13|256a|512a|164k)))|\ atmel,at25df(321a|641|081a)|\ everspin,mr25h(10|40|128|256)|\ (mxicy|macronix),mx25l(4005a|1606e|6405d|8005|12805d|25635e)|\ From patchwork Mon Sep 20 12:41:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 12505237 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, 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 27CE8C433F5 for ; Mon, 20 Sep 2021 12:42:11 +0000 (UTC) Received: by mail.kernel.org (Postfix) id 08ABF60F43; Mon, 20 Sep 2021 12:42:11 +0000 (UTC) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D441C610A0 for ; Mon, 20 Sep 2021 12:42:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D441C610A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=semihalf.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=semihalf.com Received: by mail-lf1-f52.google.com with SMTP id g41so34097515lfv.1 for ; Mon, 20 Sep 2021 05:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TgkRR7jceSG3sISw9EtlaxuO+Ca79VKVwo29bAvP5fI=; b=s4hLOdYrkJWqU9QfUxcZKehIh/nJu0e950CTAaaT16xIiWxBQdXpw1nrOo5VF4EClz 08QmuTWf6QlU9WYteW5sm3nc6X49dKimoHADfogLU7n5dlP6BZmGrOZjEkrA4qj8PSZo W5zWuO7pqTNTXfj9RTc8jdEfSHWEVnEYRt97xnNUQuseq8Y/t+wh6CR8S5i+zSblV9WQ Lh+5isxoSGLrosnXmPBmUvRcn5LqIdcP8rVUJaUZmOWjwX3+BNFRwWwe/pskgO9HTjOw Ptc0HA7CY5lpRXeNu8FiiT0w5XI/d2I9kzst6o/DCD77Wx2gVRIek2zlzo4dYCbTxe+E 1fdg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=TgkRR7jceSG3sISw9EtlaxuO+Ca79VKVwo29bAvP5fI=; b=cSDfNrVdMaT5TX6HR5yngZRRzMHiCYI+VcBmPEHUsjcjsGC0+3ZiGTPwEdDoCDg5r/ A0Mv3R+8fSnHjhvXlUYfvzubyWl5Rw1fGb8koYHIrbkrWjq5pBmc1HZswNy9Xeyecjpr olcpXctReyeDRu1EGEz9EaVhlcUVUzQuE8MC5mvtZAf4VfJUtJfEfY6L4g20OKuNIpi8 T+C5wNwN3nVTx73OrQlEuWSIK/kyyW3mjvSPUnD3gJT5yIt/5Gd4fkiVuk3RwubfTS+x zfwtUvnWCLyhzJFsGg+VX+4Gu/+ug/nAfe7rUIHlJ93TyA3d+cGxPSYbyD8Vu7kTip/a srXQ== X-Gm-Message-State: AOAM5304dvPyeZBaDlsqoMIphXYUA3k2+ieeiDMxvFNeceAiTPjUNvln vigLUf37JKUjvXrRlkIeUr3uSg== X-Google-Smtp-Source: ABdhPJwSJoLAEAHr8QbQNcp0H34mI/ghiqdYS6h5Nj2nmS8GtTJaaHhL0HdRSzUvFKGHyuLUNnM7fw== X-Received: by 2002:ac2:4318:: with SMTP id l24mr18814386lfh.145.1632141729202; Mon, 20 Sep 2021 05:42:09 -0700 (PDT) Received: from grasshopper.googchameleon.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id v1sm630944lfo.308.2021.09.20.05.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 05:42:08 -0700 (PDT) From: =?utf-8?q?Pawe=C5=82_Anikiel?= List-Id: To: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org, arnd@arndb.de, olof@lixom.net, soc@kernel.org, dinguyen@kernel.org, p.zabel@pengutronix.de Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tn@semihalf.com, ka@semihalf.com, jam@semihalf.com, =?utf-8?q?Pawe=C5=82_An?= =?utf-8?q?ikiel?= , Joanna Brozek , Mariusz Glebocki , Tomasz Gorochowik , Maciej Mikunda Subject: [PATCH 2/3] dts: socfpga: Add Mercury+ AA1 devicetree Date: Mon, 20 Sep 2021 14:41:40 +0200 Message-Id: <20210920124141.1166544-3-pan@semihalf.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210920124141.1166544-1-pan@semihalf.com> References: <20210920124141.1166544-1-pan@semihalf.com> MIME-Version: 1.0 Add support for the Mercury+ AA1 module for Arria 10 SoC FPGA. Signed-off-by: Paweł Anikiel Signed-off-by: Joanna Brozek Signed-off-by: Mariusz Glebocki Signed-off-by: Tomasz Gorochowik Signed-off-by: Maciej Mikunda --- arch/arm/boot/dts/Makefile | 1 + .../boot/dts/socfpga_arria10_mercury_aa1.dts | 127 ++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 arch/arm/boot/dts/socfpga_arria10_mercury_aa1.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 7e0934180724..0a7809eb3795 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1078,6 +1078,7 @@ dtb-$(CONFIG_ARCH_INTEL_SOCFPGA) += \ socfpga_arria10_socdk_nand.dtb \ socfpga_arria10_socdk_qspi.dtb \ socfpga_arria10_socdk_sdmmc.dtb \ + socfpga_arria10_mercury_aa1.dtb \ socfpga_cyclone5_chameleon96.dtb \ socfpga_cyclone5_mcvevk.dtb \ socfpga_cyclone5_socdk.dtb \ diff --git a/arch/arm/boot/dts/socfpga_arria10_mercury_aa1.dts b/arch/arm/boot/dts/socfpga_arria10_mercury_aa1.dts new file mode 100644 index 000000000000..c13f16afa72f --- /dev/null +++ b/arch/arm/boot/dts/socfpga_arria10_mercury_aa1.dts @@ -0,0 +1,127 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "socfpga_arria10.dtsi" + +/ { + + model = "Enclustra Mercury AA1"; + compatible = "altr,socfpga-arria10", "altr,socfpga"; + + aliases { + ethernet0 = &gmac0; + serial1 = &uart1; + }; + + memory { + name = "memory"; + device_type = "memory"; + reg = <0x0 0x80000000>; /* 2GB */ + }; + + chosen { + stdout-path = "serial1:115200n8"; + }; +}; + +&osc1 { + clock-frequency = <33330000>; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +/* Following mappings are taken from arria10 socdk dts */ +&mmc { + status = "okay"; + cap-sd-highspeed; + broken-cd; + bus-width = <4>; +}; + +&eccmgr { + sdmmca-ecc@ff8c2c00 { + compatible = "altr,socfpga-sdmmc-ecc"; + reg = <0xff8c2c00 0x400>; + altr,ecc-parent = <&mmc>; + interrupts = <15 IRQ_TYPE_LEVEL_HIGH>, + <47 IRQ_TYPE_LEVEL_HIGH>, + <16 IRQ_TYPE_LEVEL_HIGH>, + <48 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&gmac0 { + phy-mode = "rgmii"; + phy-addr = <0xffffffff>; /* probe for phy addr */ + + max-frame-size = <3800>; + status = "okay"; + + phy-handle = <&phy3>; + + mdio0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + phy3: ethernet-phy@3 { + txd0-skew-ps = <0>; /* -420ps */ + txd1-skew-ps = <0>; /* -420ps */ + txd2-skew-ps = <0>; /* -420ps */ + txd3-skew-ps = <0>; /* -420ps */ + rxd0-skew-ps = <420>; /* 0ps */ + rxd1-skew-ps = <420>; /* 0ps */ + rxd2-skew-ps = <420>; /* 0ps */ + rxd3-skew-ps = <420>; /* 0ps */ + txen-skew-ps = <0>; /* -420ps */ + txc-skew-ps = <1860>; /* 960ps */ + rxdv-skew-ps = <420>; /* 0ps */ + rxc-skew-ps = <1680>; /* 780ps */ + reg = <3>; + }; + }; +}; + +&i2c1 { + status = "okay"; + isl12022: isl12022@6f { + status = "okay"; + compatible = "isil,isl12022"; + reg = <0x6f>; + }; +}; + +&uart1 { + status = "okay"; +}; + +&qspi { + status = "disabled"; + + flash0: n25q00@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "n25q00"; + reg = <0>; + spi-max-frequency = <50000000>; + cdns,page-size = <256>; + cdns,block-size = <16>; + m25p,fast-read; + cdns,read-delay = <4>; + cdns,tshsl-ns = <200>; + cdns,tsd2d-ns = <255>; + cdns,tchsh-ns = <20>; + cdns,tslch-ns = <20>; + + part0: qspi-boot@0 { + label = "Flash 0 Raw Data"; + reg = <0x0 0x01340000>; + }; + part1: qspi-rootfs@1320000 { + label = "Flash 1 jffs2 Filesystem"; + reg = <0x01340000 0x2cc0000>; + }; + }; +}; From patchwork Mon Sep 20 12:41:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 12505239 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, 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 ECDA2C4332F for ; Mon, 20 Sep 2021 12:42:12 +0000 (UTC) Received: by mail.kernel.org (Postfix) id C87FC61019; Mon, 20 Sep 2021 12:42:12 +0000 (UTC) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ABEF660FA0 for ; Mon, 20 Sep 2021 12:42:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ABEF660FA0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=semihalf.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=semihalf.com Received: by mail-lf1-f54.google.com with SMTP id b20so8605921lfv.3 for ; Mon, 20 Sep 2021 05:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aD0ZimcpDdMwxxDkok8INnwAF4L8JkxKG7hlNjJNuc4=; b=ROkKUP5Wti0ZceJVkqlAW1hw9pw2rtGO+UYdzPbSZg0ZsAEcFmWUy5DNCnc2MIrx4b BYp0RUGvkHwf934xqPgpQ6UUwcdgw6xDoe22pz4EAJzNIkulRo31v++TUs9ymGhu5K5u tFmeYg86tBZ7B0TP8fKKkgwBNWF29JNbAnbvAilubZMvvjqh33+omk3tgv1z+6L1bSvw FCli+M02Sz/IhIHZXabClzluGQtQlRj9xfOIJWpPK6WGTy5EPC3C9NjyvqDaeSeKSJCU Vakycw1Ed8PiorDWqI1+IUXUUnKX7kJZHW55ViIYHRIy6ZFT8OOia60WSN3/sQxWirf6 jpSg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=aD0ZimcpDdMwxxDkok8INnwAF4L8JkxKG7hlNjJNuc4=; b=JDrK+qJmtBG8diQqSgeSTGm/poUkSm/03gNW5wRe9YmYAQeducP1x0SdWvIyRhA9UY 4i8OsGXuWObharxvbERdFKpkqcYZE+WK/HPKIF96r29El5rt1/ypPsLZJqggZ9JwbLD2 f4yPkVjrpeBVV+XdpR/AEHKNIsq5TwRU9sGjUnzQCGGCHbGV0wvCBmqlhmGH6l0EiASi Xrmxs2g5CkZDYyK4vhsEc+hCrDyPrCnIvvEWIDngfWnVg7nMCGQw9vP2fsUMRj9mQbMw cLoyQybWPfGyGrcS/s45DeapC3Z1ZEcgGXPMOxAgUzsojGzxjGXzRAZUKTdYRDT6NdoR jmaw== X-Gm-Message-State: AOAM5332pHu/BHauuF/cmHKwOCcmJRiGkVXEzZuANGXNH2npK2B/iAUI hyr8euOVoU5yEX3XQHe96RQX2Q== X-Google-Smtp-Source: ABdhPJzdjJvEESBsRijWxynJclTM1jLd3jz584eIX1nzT8MgbP4/OcLKY9ulXqJbDoTj+2jHr5+kVA== X-Received: by 2002:a2e:9a07:: with SMTP id o7mr6991825lji.125.1632141730817; Mon, 20 Sep 2021 05:42:10 -0700 (PDT) Received: from grasshopper.googchameleon.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id v1sm630944lfo.308.2021.09.20.05.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 05:42:10 -0700 (PDT) From: =?utf-8?q?Pawe=C5=82_Anikiel?= List-Id: To: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org, arnd@arndb.de, olof@lixom.net, soc@kernel.org, dinguyen@kernel.org, p.zabel@pengutronix.de Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tn@semihalf.com, ka@semihalf.com, jam@semihalf.com, =?utf-8?q?Pawe=C5=82_An?= =?utf-8?q?ikiel?= Subject: [PATCH 3/3] reset: socfpga: add empty driver allowing consumers to probe Date: Mon, 20 Sep 2021 14:41:41 +0200 Message-Id: <20210920124141.1166544-4-pan@semihalf.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210920124141.1166544-1-pan@semihalf.com> References: <20210920124141.1166544-1-pan@semihalf.com> MIME-Version: 1.0 The early reset driver doesn't ever probe, which causes consuming devices to be unable to probe. Add an empty driver to set this device as available, allowing consumers to probe. Signed-off-by: Paweł Anikiel --- drivers/reset/reset-socfpga.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index 2a72f861f798..8c6492e5693c 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -92,3 +92,29 @@ void __init socfpga_reset_init(void) for_each_matching_node(np, socfpga_early_reset_dt_ids) a10_reset_init(np); } + +/* + * The early driver is problematic, because it doesn't register + * itself as a driver. This causes certain device links to prevent + * consumer devices from probing. The hacky solution is to register + * an empty driver, whose only job is to attach itself to the reset + * manager and call probe. + */ +static const struct of_device_id socfpga_reset_dt_ids[] = { + { .compatible = "altr,rst-mgr", }, + { /* sentinel */ }, +}; + +static int reset_simple_probe(struct platform_device *pdev) +{ + return 0; +} + +static struct platform_driver reset_socfpga_driver = { + .probe = reset_simple_probe, + .driver = { + .name = "socfpga-reset", + .of_match_table = socfpga_reset_dt_ids, + }, +}; +builtin_platform_driver(reset_socfpga_driver);