From patchwork Wed Sep 26 04:53:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 10615295 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B44E715A6 for ; Wed, 26 Sep 2018 04:56:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A44892A6BD for ; Wed, 26 Sep 2018 04:56:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 971542A6C2; Wed, 26 Sep 2018 04:56:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C597C2A6BD for ; Wed, 26 Sep 2018 04:56:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=Wkpzeg8rPNVcWKTegurwsTZYfkmDpVGVricMgibQZgc=; b=jTNle9uf5ahCTk 9v89ZvkNdULA5PIh8ye2Ob9QoTYI+l7+0X5PTAlVXBcRrWIbRVSpaW8tMN39YBmRhxO8S9hZRBy8y PGDjW9rbbNvyp17TsDThe2Hn+3wU29Nf3unAl6yPOAZ095am1KX4W6jK1Xz+mCBlOUgZ+Bg/6RC6J GheYxkiV7Md0jTBYot5OllBOwfR0y3Uno1wXnun9S5ZWZ/HQHvA9cyE1W7R92L/DKvASC4zEGpqKE mQXKUVbOx7gURv4WJYa8n2OsNpdYwzyS+891x16OvJm5eDKPcM9FLd8QRbuNvUiKBhrKyPw+uzqne 6YeETfFT5P9IjP2e8afA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g51sJ-0003Wb-VJ; Wed, 26 Sep 2018 04:56:35 +0000 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76] helo=wens.csie.org) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g51qQ-0001VY-HF; Wed, 26 Sep 2018 04:54:40 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id E14575FAF3; Wed, 26 Sep 2018 12:53:58 +0800 (CST) From: Chen-Yu Tsai To: Heiko Stuebner Subject: [PATCH] arm64: dts: rockchip: Enable SPI NOR flash on Rock64 Date: Wed, 26 Sep 2018 12:53:57 +0800 Message-Id: <20180926045357.20722-1-wens@csie.org> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180925_215438_791910_0CA7FA1B X-CRM114-Status: GOOD ( 10.26 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-rockchip@lists.infradead.org, Chen-Yu Tsai , Mark Brown , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Pine64 Rock64 board comes with a GigaDevice GD25Q128CSIG or GD25Q127CSIG chip, which is a 128 Mbit SPI NOR flash chip that supports the JEDEC read-ID command. This patch enables the SPI controller and adds a device node for the flash chip using the generic "jedec,spi-nor" comaptible. Signed-off-by: Chen-Yu Tsai --- This was working on linux-next 20180910, but now fails on linux-next 20180925, with the following error messages: m25p80 spi0.0: error -22 reading 9f m25p80: probe of spi0.0 failed with error -2 Reverting the spi/for-next branch makes it work again: m25p80 spi0.0: gd25q128 (16384 Kbytes) Not sure what's up. --- arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts index 9ee4f57557f3..2170cf63845e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts @@ -290,6 +290,18 @@ }; }; +&spi0 { + status = "okay"; + + spiflash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + + /* maximum speed for Rockchip SPI */ + spi-max-frequency = <50000000>; + }; +}; + &tsadc { rockchip,hw-tshut-mode = <0>; rockchip,hw-tshut-polarity = <0>;