From patchwork Sat Dec 21 07:54:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 938 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 85CC43F08E for ; Sat, 21 Dec 2019 08:54:55 +0100 (CET) Received: by mail-pf1-f199.google.com with SMTP id j7sf7707589pfh.23 for ; Fri, 20 Dec 2019 23:54:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914893; cv=pass; d=google.com; s=arc-20160816; b=dnIUGDm3SRgVuwOQ2n7bgqIN0e0BMvUZwyFSqne746qKZgilx9QtGPBxhnOLlw2B0m sSD0vuiIrth5ejWCqfvdURNHSn3Mm44lcbSv9hy0S5eymfN6KDa1ou225oz959F5yZyM b9WwCbQ0RiSZOupSKmPBW8EsOGD8qJvlSYwbtEzBFu0ZUEkgytyHYumDdSzOkThRjz6v oLeE1KfujxInAt3oAbSIfq4ARgG9ou8ON3PyOIra/DKgslX+70rYjppMJxvTEVfN4/pQ bvtHTtgtapeJFyve0ljzvf2p4LdH6FwhaiAVgWNNazF6sXLY11gOxS1A6BUIrKGKsUOK vocA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=hvYAJyBayZhQS+lkuWj+9ynyGezPag6uCR762TqX25M=; b=xJsODbRPWfAJ+ygKSkaXnJY5HWSz0tPHUU0DMsviqS7CW2ajyBzke5WhR9aQ04Rw9m Qut3p6Gckv5391T6Hgg7bID2FbhYzxoqD4Uu3PKBjl36Pn5UpmcQjyEJ/f0wjO0eC0Xk y1ITvdBlyYScftgWM1zq9IL6naSvRc5Eb6aOzhzj1wWB0/CvoZg4oc7fo99IShYcmqj3 0t8+ET2DATMN+GqpPFwv/+O6ypJO5pRRkrID7j4vFhULYg+XU2iN3K6rfYvjjSbZ+ica 5EevVj+1Xm6reRHM+7CvW/JVw1l+eilvdJGnEWu2VSkWohDV+vk9bzbW+E3l7F9bs9gx qDZQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FySr5cuq; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=hvYAJyBayZhQS+lkuWj+9ynyGezPag6uCR762TqX25M=; b=KJawpjkD7YRrVc2WdcelJKuDJuaug3vZb9gKfjS46dn7OyPK7/b9s/a/gu0kzAqtXm rv/yWeEhhvgWwCTeCHZ322VwZAkiUuMuzMoBzKRBcD/VR2KypBdfIeHfOkeBP/c4YR3H XZbNHgrKqxyuMPeTNTccjRFKEpgfDcggSLilQ= 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 :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=hvYAJyBayZhQS+lkuWj+9ynyGezPag6uCR762TqX25M=; b=IS4S9L9gyW7rK2s1EOSBlSE7hSH9MmG2RmRp6wkazuVE4Y2CHidmKeUWV94gAeARfb tAj5r8O5pBdu8+3Cqkp23wCESHvyOTNV/Qa3+iGqheOr0VUBfO1RozzWVz8vPRFAexwd hdr/V9aZzv6F3c2HiZre15sQYZ96VKnBVPTEtHQLAMEI5XPWb91ai/LNwrN0MRws1eJs BREFMUqtGWawVx+NDEybk66pqo5Yao/FpcBF2/2B8iWjyyXnC4841xlVmekyDCqm2B5b Rtn/2S2kIyXH4snsukPP9RC5uEDsnTygrwaupi7kFGD9dKFv/nkWn8iqm6AFDU3r7jBO eiPw== X-Gm-Message-State: APjAAAWJFSpMe9aBeWvlSpk8nW2JtmBjuclqngi3TwfmPaUNB0QSGtvu hd1DrpemrR9Vq/UYjWbNH6JkJYHR X-Google-Smtp-Source: APXvYqwoNyVRkWcRNllRDWPAGk2MW3WWNygfexi/xbFoH+ssb8vaJIVIKMNj+BtnrzvMEGAWF4wCRA== X-Received: by 2002:a63:f901:: with SMTP id h1mr19458653pgi.445.1576914893184; Fri, 20 Dec 2019 23:54:53 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:ad46:: with SMTP id w6ls3072985pjv.4.gmail; Fri, 20 Dec 2019 23:54:52 -0800 (PST) X-Received: by 2002:a17:902:bb8d:: with SMTP id m13mr10032926pls.143.1576914892639; Fri, 20 Dec 2019 23:54:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914892; cv=none; d=google.com; s=arc-20160816; b=y1QzngAElqb8M0DyJP2fKd++T8SdyjyPYXMtpn0Jst/wBmm6WmVNn3qztZVpoHHf9Y 19kistaMMs1WIQeXqHuvoRRXVSvN1CamqSzau7m10AiHLUSaB6OBgbtKqa8mbnglrWAL f6pbqo22StHcJEnbiyB7DTX0/UCjed+olqNUiua5MgxS03lFzpBM2llmQ4LIh/h2Inh8 imRLNJmEOgUiZVtf2hX99CiR3hFS72rsqgfjObAYRF8+gE2Je4l8sqta+DSq28AcK8bJ SXcDxJmlN3BsDv9xeG8LuFVPgxsBBaS9KeCeaa3DscDsP2mwiCbTYXpUmto2O5mz3kne +w+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=jYRNtcOfYSekvf8pKkssv0d2L549YvN3K52kbu1rGH0=; b=y38XUigvVqg4ccT1FvCQy1UBxB9pkO/5B2/5QMrStyrwWi0TChEk7/N/3aVsuteEsT n1pkVJCb5fCJ+BN97mOXad6B4bOl54dEfTx0EBPcx7Fa45KYlay0njZmhMHpAebld5tV Q+dg7eUUFXW9AAkxErehunprje5dXSeSss6lvDI1ScrOgGrXHw6iScjVpkpF2GXMa+BV uYh8zIvyNfC3FaOgfEbkw/aGCKiq5/U4Z3P23irRuZDU4ijrYB4zabuDq9mXFx5pBXGB HiW0fKlOyrDv58PZi/1LkdIE9Q3G3Fz84mlIhUIu5FricqYAsbEt8DafZMnMQt4k6i+P GSPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FySr5cuq; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id h67sor13401389pfg.51.2019.12.20.23.54.52 for (Google Transport Security); Fri, 20 Dec 2019 23:54:52 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:aa7:874c:: with SMTP id g12mr20061248pfo.78.1576914891641; Fri, 20 Dec 2019 23:54:51 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:54:51 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 00/11] rk3399: SPI boot support (fixes, updates) Date: Sat, 21 Dec 2019 13:24:29 +0530 Message-Id: <20191221075440.6944-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FySr5cuq; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This series support SPI boot on rk3399 in ROC-PC-RK3399 as an example board. Series introduces rk_spi fixes, sf distroboot, SPI boot support on ROC-PC-RK3399 board. SPI Boot log: ------------ Channel 0: LPDDR4, 50MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB Channel 1: LPDDR4, 50MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB 256B stride 256B stride lpddr4_set_rate: change freq to 400000000 mhz 0, 1 lpddr4_set_rate: change freq to 800000000 mhz 1, 0 U-Boot SPL 2020.01-rc4-00241-g9c3e7e925f (Dec 18 2019 - 19:54:46 +0530) Trying to boot from SPI U-Boot 2020.01-rc4-00241-g9c3e7e925f (Dec 18 2019 - 19:54:46 +0530) Model: Firefly ROC-RK3399-PC Board DRAM: 3.9 GiB PMIC: RK808 MMC: dwmmc@fe320000: 1, sdhci@fe330000: 0 Loading Environment from SPI Flash... SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB *** Warning - bad CRC, using default environment In: serial@ff1a0000 Out: serial@ff1a0000 Err: serial@ff1a0000 Model: Firefly ROC-RK3399-PC Board rockchip_dnl_key_pressed: adc_channel_single_shot fail! Net: Error: ethernet@fe300000 address not set. No ethernet found. Hit any key to stop autoboot: 0 => Any inputs? Jagan. Jagan Teki (11): spi: rk: Limit transfers to (64K - 1) bytes distro_bootcmd: Add SF support rockchip: Include SF on distrocmd devices rk3399: Add boot flash script offet, size rk3399: Check MMC env while defining it env: kconfig: Restrict rockchip env for MMC env: Enable SPI flash env for rockchip rockchip: dts: Sync ROC-RK3399-PC changes from Linux roc-pc-rk3399: Enable SPI Flash rockpro-rk3399: Enable SPI Flash roc-rk3399-pc: Add SPI boot support arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 16 +- arch/arm/dts/rk3399-roc-pc.dts | 673 +----------------- arch/arm/dts/rk3399-roc-pc.dtsi | 813 ++++++++++++++++++++++ arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 + board/rockchip/evb_rk3399/MAINTAINERS | 2 + configs/roc-pc-rk3399-spi_defconfig | 62 ++ configs/roc-pc-rk3399_defconfig | 2 + configs/rockpro64-rk3399_defconfig | 2 + drivers/spi/rk_spi.c | 10 +- env/Kconfig | 8 +- include/config_distro_bootcmd.h | 35 + include/configs/evb_rk3399.h | 4 +- include/configs/rk3399_common.h | 2 + include/configs/rockchip-common.h | 7 + 14 files changed, 964 insertions(+), 676 deletions(-) create mode 100644 arch/arm/dts/rk3399-roc-pc.dtsi create mode 100644 configs/roc-pc-rk3399-spi_defconfig