Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7938843rwp; Wed, 19 Jul 2023 02:43:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlE2Gv7LVi765roddcZNA9AHR3gjf7Qcb6oc1LbGXDa2CjPkLmk0DUWxIiBKbvKNDBGzTthn X-Received: by 2002:a05:6a20:6a0b:b0:134:4248:14e3 with SMTP id p11-20020a056a206a0b00b00134424814e3mr1794025pzk.15.1689759811957; Wed, 19 Jul 2023 02:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689759811; cv=none; d=google.com; s=arc-20160816; b=wX1MAiIlJ9PSFIPuC70P10DawRDn6fFc7uDIh9V4Xmd4/a7FIemof6xXRdLCwMrcQc 7vZgyGgUC7KhcgFry2gizwSwToj/bKKFHWolb2o8XRTZTZ9Sc5UryDNJpAnqlTrHw52N anIMo+oTF9aQF+H7NnmdjhVT1Id3PUzm4lGm8VZULVA4SLYF0J0Fvb6sGb2v3TL+I262 od6Lg4s7YFjh3dKszLjhhVUU7LX8ABqTY3gVuytaiKmtiRbO2NPRS2StL/cHo/mi2xW2 N9M+oV7VbDALp841ddkgo7g0dp8F7R2wJ9hcCDCr/FJBELWUhpcxz1THVt150K4Kme+Y eyFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XLFHSIRr6QHP1FeCyz9Q6A/TCi6N7PflnXEiFroLWjs=; fh=WCphHDjGHb2n6ExUxc8S0xlUZruKuzZWzdl57wRIMGI=; b=UZ0buj88k/fwGzyHiJlEpQGmrNFl7pRw5MLgQ/MYhQ2OsuCwOISZhhr87fk3X4gKRt BxHrYBPrEfEU3mlGLtIqQI256hI60Cwf/i5OwDPPKVGuo9NqEQGMXKj3qtnmQHtcOjJW z8U6xRBQd1M/lT+E5Nd4HXSZih/GbWp4JdHJfWPS3upHAjf3wxni98JGGLQrNgy+dh27 o6bhkXbKR7/JKqnubU7K7AkSyqdn0FytiyT6ISAdZJ9aHo8+vLzmhOKMLgzOldkerEjJ 5RwAegDL0a+4I8JTnKSeYlhHbud62Xoqq8RYordE9d6lBmzaEIvOp4sU5GvJzhkrNqQA puGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a9-20020a637f09000000b005440b9f013csi3110861pgd.899.2023.07.19.02.43.19; Wed, 19 Jul 2023 02:43:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231290AbjGSJ0W convert rfc822-to-8bit (ORCPT + 99 others); Wed, 19 Jul 2023 05:26:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231337AbjGSJ0I (ORCPT ); Wed, 19 Jul 2023 05:26:08 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49C7A1BFD; Wed, 19 Jul 2023 02:25:55 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id C567D80DF; Wed, 19 Jul 2023 17:25:48 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 19 Jul 2023 17:25:48 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 19 Jul 2023 17:25:47 +0800 From: William Qiu To: , , , CC: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Ziv Xu , William Qiu Subject: [PATCH v5 3/3] riscv: dts: starfive: Add QSPI controller node for StarFive JH7110 SoC Date: Wed, 19 Jul 2023 17:25:45 +0800 Message-ID: <20230719092545.1961401-4-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230719092545.1961401-1-william.qiu@starfivetech.com> References: <20230719092545.1961401-1-william.qiu@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the quad spi controller node for the StarFive JH7110 SoC. Co-developed-by: Ziv Xu Signed-off-by: Ziv Xu Signed-off-by: William Qiu Reviewed-by: Hal Feng --- .../jh7110-starfive-visionfive-2.dtsi | 36 +++++++++++++++++++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 19 ++++++++++ 2 files changed, 55 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi index fa0061eb33a7..7f2d41ccc52d 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -143,6 +143,42 @@ &i2c6 { status = "okay"; }; +&qspi { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + nor_flash: flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + cdns,read-delay = <5>; + spi-max-frequency = <12000000>; + cdns,tshsl-ns = <1>; + cdns,tsd2d-ns = <1>; + cdns,tchsh-ns = <1>; + cdns,tslch-ns = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + spl@0 { + reg = <0x0 0x80000>; + }; + uboot-env@f0000 { + reg = <0xf0000 0x10000>; + }; + uboot@100000 { + reg = <0x100000 0x400000>; + }; + reserved-data@600000 { + reg = <0x600000 0x1000000>; + }; + }; + }; +}; + &sysgpio { i2c0_pins: i2c0-0 { i2c-pins { diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index ec2e70011a73..9740adc9df4e 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -473,6 +473,25 @@ i2c6: i2c@12060000 { status = "disabled"; }; + qspi: spi@13010000 { + compatible = "starfive,jh7110-qspi", "cdns,qspi-nor"; + reg = <0x0 0x13010000 0x0 0x10000>, + <0x0 0x21000000 0x0 0x400000>; + interrupts = <25>; + clocks = <&syscrg JH7110_SYSCLK_QSPI_REF>, + <&syscrg JH7110_SYSCLK_QSPI_AHB>, + <&syscrg JH7110_SYSCLK_QSPI_APB>; + clock-names = "ref", "ahb", "apb"; + resets = <&syscrg JH7110_SYSRST_QSPI_APB>, + <&syscrg JH7110_SYSRST_QSPI_AHB>, + <&syscrg JH7110_SYSRST_QSPI_REF>; + reset-names = "qspi", "qspi-ocp", "rstc_ref"; + cdns,fifo-depth = <256>; + cdns,fifo-width = <4>; + cdns,trigger-address = <0x0>; + status = "disabled"; + }; + syscrg: clock-controller@13020000 { compatible = "starfive,jh7110-syscrg"; reg = <0x0 0x13020000 0x0 0x10000>; -- 2.34.1