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: 10615293 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 3468B112B for ; Wed, 26 Sep 2018 04:55:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 172D62A6C0 for ; Wed, 26 Sep 2018 04:55:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 080FF2A6C2; Wed, 26 Sep 2018 04:55:13 +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 DE48C2A6C1 for ; Wed, 26 Sep 2018 04:55:08 +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=HA7snWXfZzWkDadGboajdivDz1aD+B1iExi43+WnLS4=; b=kLUqxw93optpyz zunS7qsbly9t/5NA9jFdPiVIOtt4CePq8gw0cej8japbErCmkLgA7FMyBkU8IFHw50ZdVslwemMKT temo9BxZKEIPRkESkGku+VXKAqNtcG1o2aACtGUfczzpjukCqCkVjVqIMiDUHK9h9LhePoF7teSqg r7xZG8MsxPKgmABY+UI4my1l+PZWnuAG1eml8OhAkgFL8t0Zs8kktltHbmQtEBQe4wuGW4bHU7MDO Yr0nGhkwm7RL40ciwVdaUMwa2IH6CzG3qlVf0abUZla+TjiEzijqE7nwV2+G3wvW0retU8OxnUoeh qsULzTQbkMn3BFxuPNSA==; 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 1g51qo-0001Y1-Bu; Wed, 26 Sep 2018 04:55:02 +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-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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>;