From patchwork Sat Jun 1 14:47:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matwey V. Kornilov" X-Patchwork-Id: 1108789 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="P4hNBYum"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45GPMZ34cZz9sNf for ; Sun, 2 Jun 2019 00:48:42 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id DF207C21D4A; Sat, 1 Jun 2019 14:48:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 30B62C21DB5; Sat, 1 Jun 2019 14:48:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 43130C21C51; Sat, 1 Jun 2019 14:48:19 +0000 (UTC) Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by lists.denx.de (Postfix) with ESMTPS id DBF66C21BE5 for ; Sat, 1 Jun 2019 14:48:18 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id l26so10223586lfh.13 for ; Sat, 01 Jun 2019 07:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PsoIFTi9wnmqOTIWQwOPO6AdEtnOPVVLfjp+UIMrTGI=; b=P4hNBYumjzkNn4ZTq/mdLwjEPhgExo0MmkrJC/OV/Nv9Ggw/NsNUPiURsTDmCzoMwJ 3dLIZkYENvrYS+iSS3Wv4F0JPUi56noIU0fGdLA/D2nZt/uXIAyDS42nCw5YojLG8/Pr 6g+3YuVwUS/c+859aqyZpK7Y/PXEHTPblhgkeMZ/1dc/4+NTFVQAkGsTo4ecbpt595Tu Alazz2qWKXpQzObtyv++1ssKGuwJHm64n5+VVq0Vmh0EpYRkJ3/JiL1M1G6ZFRKtBADk vSS7c8nsBamcR+Box/lBd2PfBog/gw/eNpcA/7H/eZmzBKT8EN6NSp5JQPtDHETktiXp LYQQ== 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:in-reply-to :references; bh=PsoIFTi9wnmqOTIWQwOPO6AdEtnOPVVLfjp+UIMrTGI=; b=ZzsW3GtkVndgXqzvWwU9NWulUgl9EREN869IzCBm6glMSuEVhUgIo24bbfxVUu9URH IG4XeiLZJpzkLeGZRh1vIsF1cKWGG6MtxiNH7ky2Macn7xf4JsaJsYwHNBn8fhhdgYOS BSHg9jWAWHR0r/GIQ6c4mgIvlOK/qws0+6YjcZGU8sRhmQDkizw/BiZEQZp6D4xCp4wX WH2/JLf3AWFFxrhSIiGWX4+bdVFiUQh+vBN+Zbzvh5yj9E8Y5h/x9NzmusgNSks6h1qG a1Vt3q4SWoXRcm5UQ8lNlgsLfwnUznEcVnQRYQmS6yfjyIi5O5ftrTIQg0UXQIY4z49K srhw== X-Gm-Message-State: APjAAAWzGO4284kru1s2Yq9mkLCFLPQXFe0y4EWB7OLZBr2ksdgyIIM0 O3XDOzj4YTkY4wsVDJg/Hb0= X-Google-Smtp-Source: APXvYqyIlaOEoP0VDEY6ypZ0O49RdmJkLmwrPgi0Tdoxdj9Se+ihpqz/XF7Z8k1EKg7ISUyCwX1kOA== X-Received: by 2002:a19:9156:: with SMTP id y22mr3356456lfj.43.1559400498218; Sat, 01 Jun 2019 07:48:18 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id e19sm1843812ljj.62.2019.06.01.07.48.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jun 2019 07:48:17 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sat, 1 Jun 2019 17:47:31 +0300 Message-Id: <20190601144736.8580-2-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190519121020.13866-1-matwey.kornilov@gmail.com> <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V . Kornilov" Subject: [U-Boot] [PATCH v3 1/6] rockchip: rk3328: add SPL board file support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Kever Yang rk3328 SPL is locate at dram, so do not have strict size limit, suppose to enable storage media controller driver, load ATF and U-Boot, then boot into ATF. Signed-off-by: Kever Yang [cherry picked from https://github.com/rockchip-linux/u-boot/commit/4ebe3968b683190cb8e5741aa7227b4fa7497874 with minor modifications] Signed-off-by: Matwey V. Kornilov Reviewed-by: Kever Yang --- arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rk3328-board-spl.c | 59 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 arch/arm/mach-rockchip/rk3328-board-spl.c diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index 846c82d70a..23760a959a 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -18,6 +18,7 @@ obj-spl-$(CONFIG_ROCKCHIP_RK3036) += rk3036-board-spl.o obj-spl-$(CONFIG_ROCKCHIP_RK3188) += rk3188-board-spl.o obj-spl-$(CONFIG_ROCKCHIP_RK322X) += rk322x-board-spl.o spl-boot-order.o obj-spl-$(CONFIG_ROCKCHIP_RK3288) += rk3288-board-spl.o +obj-spl-$(CONFIG_ROCKCHIP_RK3328) += rk3328-board-spl.o obj-spl-$(CONFIG_ROCKCHIP_RK3368) += rk3368-board-spl.o spl-boot-order.o obj-spl-$(CONFIG_ROCKCHIP_RK3399) += rk3399-board-spl.o spl-boot-order.o diff --git a/arch/arm/mach-rockchip/rk3328-board-spl.c b/arch/arm/mach-rockchip/rk3328-board-spl.c new file mode 100644 index 0000000000..7f49d056a0 --- /dev/null +++ b/arch/arm/mach-rockchip/rk3328-board-spl.c @@ -0,0 +1,59 @@ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +void board_debug_uart_init(void) +{ +} + +void board_init_f(ulong dummy) +{ + struct udevice *dev; + int ret; + + ret = spl_early_init(); + if (ret) { + debug("spl_early_init() failed: %d\n", ret); + hang(); + } + + preloader_console_init(); + + ret = uclass_get_device(UCLASS_RAM, 0, &dev); + if (ret) { + debug("DRAM init failed: %d\n", ret); + return; + } +} + +u32 spl_boot_mode(const u32 boot_device) +{ + return MMCSD_MODE_RAW; +} + +u32 spl_boot_device(void) +{ + return BOOT_DEVICE_MMC1; +} + +#ifdef CONFIG_SPL_LOAD_FIT +int board_fit_config_name_match(const char *name) +{ + /* Just empty function now - can't decide what to choose */ + debug("%s: %s\n", __func__, name); + + return 0; +} +#endif From patchwork Sat Jun 1 14:47:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matwey V. Kornilov" X-Patchwork-Id: 1108790 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OYmMAxGw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45GPN06TzVz9sNf for ; Sun, 2 Jun 2019 00:49:04 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8A8FAC21DB3; Sat, 1 Jun 2019 14:48:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B8569C21D8E; Sat, 1 Jun 2019 14:48:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1C09CC21E07; Sat, 1 Jun 2019 14:48:23 +0000 (UTC) Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by lists.denx.de (Postfix) with ESMTPS id DDB69C21CB1 for ; Sat, 1 Jun 2019 14:48:19 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id a9so8832594lff.7 for ; Sat, 01 Jun 2019 07:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1EEtgWfPHVd3+a44/KzfGGeSQ78+viN6oyGjOCRemCI=; b=OYmMAxGweXEPEU8NuvPLeiGI+XGX9R8vu+bMYOST1K8Hp1d1RltnaDeunoUCZC9+Ps 8cNpoNPFTmCp6/1V7I4p0sCNoz2nT/obv/1UTUiOWlts0z1HhvwoxeMHB/+FylYvGLpZ rjvXFde1P9DsJ/vsorrnlMpSi12StGaVF0Ql62R5ntR22r23anoly1YsDWuw+qv5PyfY 6I7RY2lTaG3KGerFe0DNSRtiVRLK0JdvxYdEu5pbCIcaHxCXTKjeGkc4kuVMayaK3g+P kolwX6YV4jE4AKJafYQnEesx3ljy3blE1RFtxvpFRYo2cu1bTIX9D5JghWgiI9BdYiHP KK1Q== 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:in-reply-to :references; bh=1EEtgWfPHVd3+a44/KzfGGeSQ78+viN6oyGjOCRemCI=; b=mC3tHlge+6KqbBN5f1GsF0bzClgOsNGObimjyQjnImXjnc+ngjJa36ATxn+hXvhcAi y+vFCUTrP8kOt3hf5xpvTVXRgXdbWzPF6QYrZ0z1fAsRxeaoj/pZ2nU3VwFGLqdPMA+t z9s34zh2RXU4u4bYnPCXG6whaB5WQNXjOZ9UCiqTwbufh/EHbdce5FQ4GoKbajqbDlsn AbOHSnXxIzkLzftnusLPP0bgfcG4uHYDkeovtaJP4ltKychivhoNPT0mXTdcG6UXQew/ rBKUEkINQj5ViEWabQMq/UqmQRjLT3fHEm5YpYToKqUyWlepvdhA+XRODpINpxQeH7Un v0SQ== X-Gm-Message-State: APjAAAXvZw6Oz9FvqbLUWA7KQimER1GoCEHGEgUml5c37EIz0PZKoiA3 Cj8cuE8CunFCYV9XbJUk4ic= X-Google-Smtp-Source: APXvYqzh90177xTqy87jgMAbOE7OaqD+kSsq2nk8H9gn59R0x0pSazEWcw/FnE5OeXKtIdiA8MbqIw== X-Received: by 2002:ac2:53a5:: with SMTP id j5mr8968318lfh.172.1559400499254; Sat, 01 Jun 2019 07:48:19 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id e19sm1843812ljj.62.2019.06.01.07.48.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jun 2019 07:48:18 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sat, 1 Jun 2019 17:47:32 +0300 Message-Id: <20190601144736.8580-3-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190519121020.13866-1-matwey.kornilov@gmail.com> <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V . Kornilov" Subject: [U-Boot] [PATCH v3 2/6] rockchip: rk3328: add SPL support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Kever Yang Add SPL support for rk3328, default with of-platdata enabled. Signed-off-by: Kever Yang [cherry picked from https://github.com/rockchip-linux/u-boot/commit/cb2b7a1bc75ebb116b1eb9b0ae0223e84d86fc4b with minor modifications] Signed-off-by: Matwey V. Kornilov Reviewed-by: Kever Yang --- include/configs/rk3328_common.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h index 71aad7029a..2a81c803b6 100644 --- a/include/configs/rk3328_common.h +++ b/include/configs/rk3328_common.h @@ -16,6 +16,10 @@ #define CONFIG_SYS_INIT_SP_ADDR 0x00300000 #define CONFIG_SYS_LOAD_ADDR 0x00800800 +#define CONFIG_SPL_STACK 0x00400000 +#define CONFIG_SPL_MAX_SIZE 0x100000 +#define CONFIG_SPL_BSS_START_ADDR 0x2000000 +#define CONFIG_SPL_BSS_MAX_SIZE 0x2000 #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64M */ From patchwork Sat Jun 1 14:47:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matwey V. Kornilov" X-Patchwork-Id: 1108792 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nQ69DoGs"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45GPPt5DJHz9sNf for ; Sun, 2 Jun 2019 00:50:42 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 68768C21DB3; Sat, 1 Jun 2019 14:49:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id CA599C21DFB; Sat, 1 Jun 2019 14:48:31 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0D211C21DDC; Sat, 1 Jun 2019 14:48:25 +0000 (UTC) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by lists.denx.de (Postfix) with ESMTPS id 0FDBBC21DF8 for ; Sat, 1 Jun 2019 14:48:22 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id e13so12264032ljl.11 for ; Sat, 01 Jun 2019 07:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SFi0L/rIJkJmZkKh3eUkOu3VrEHfb91Yegr2sTfLrEc=; b=nQ69DoGsdA3RfzuNt+Dz+COaTdszX13luWHEkhxomcu3wfmfiko0pPe87/Rk2eHeEw OjMGApe3KAvqOq5S4za8vq+3bIFd9I/yREtUsCLi/sSZtuL0CMGzveinTMNj59/4YF50 FjcURk3OOS8LZ85AQW6IJkeb8yCSolDTAm+JtkmfE7e5cn/8kv2PLDSMzPfiJcaKDG5N l7mXDiaT8ZwRHUcrmPbOx9abZBkP8gMK0s04N9LRuiuwT6XpXBzRag2QFcmeGV8K1287 UqnnTwxV95ueBSPXWhMO3gbGGEtrNU6va2IROnXTBXIU5Lb4MXm3uUE99Wzs1EpfjWN/ Zb2w== 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:in-reply-to :references; bh=SFi0L/rIJkJmZkKh3eUkOu3VrEHfb91Yegr2sTfLrEc=; b=Y4EPShbvBDOncRoHvsTeTbYbjco1MM0vu478mrfqmL/C92ZhHnMUINtBTDO9ZLTvEi KY2hupGtUvxIPQKkNdDrmh26tXI6LwB1daRqzJaIbSyvud9GPf+Mr4WQJKncRWaY4vDN k/SVNfHKZVQWrjQ0WftfWQ3vrfxCis2fgxPsnxvk39iQUlIkDcLlxBLSTE7aDW7tuxlM bn/qm77EGaGxyDLHu90zQS9l5SIDHI8xUM8a/m1f0aCzkxGGFi8gJkqAKcjaSgcbXVWl aK/goDaN2dhqLT1hAZrLxPJuRz7QMvP1d0sTeSG8njGUK2gMLKfgsSRhpjKKsdjV48sG mQoQ== X-Gm-Message-State: APjAAAXezz7Ak2S17/LxQ30fFb9ucGH4CyrlF2BIvJINqDhs8rQadEro HjTeOUXMzcrf93BnHMxDeQ0= X-Google-Smtp-Source: APXvYqwRwQyAKu0v8FvkyiHDZN54oQ/+oj8auWTHNQt+fEH/ZZTEJrR2x44G8bBF6ei2dmanlD+BwQ== X-Received: by 2002:a2e:9157:: with SMTP id q23mr9391614ljg.188.1559400500335; Sat, 01 Jun 2019 07:48:20 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id e19sm1843812ljj.62.2019.06.01.07.48.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jun 2019 07:48:19 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sat, 1 Jun 2019 17:47:33 +0300 Message-Id: <20190601144736.8580-4-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190519121020.13866-1-matwey.kornilov@gmail.com> <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V . Kornilov" Subject: [U-Boot] [PATCH v3 3/6] rockchip: Kconfig: enable SPL support for rk3328 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Kever Yang Enable SPL support and some related option in Kconfig. Signed-off-by: Kever Yang [cherry picked from https://github.com/rockchip-linux/u-boot/commit/430b01462bf3f24aaf7920ae2587a6943c39ab5d with minor modifications] Signed-off-by: Matwey V. Kornilov --- arch/arm/mach-rockchip/Kconfig | 7 +++++++ configs/evb-rk3328_defconfig | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index c05e3c3f48..3e38344b50 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -109,6 +109,13 @@ endif config ROCKCHIP_RK3328 bool "Support Rockchip RK3328" select ARM64 + select SUPPORT_SPL + select SPL + imply SPL_SERIAL_SUPPORT + imply SPL_SEPARATE_BSS + select ENABLE_ARM_SOC_BOOT0_HOOK + select DEBUG_UART_BOARD_INIT + select SYS_NS16550 help The Rockchip RK3328 is a ARM-based SoC with a quad-core Cortex-A53. including NEON and GPU, 1MB L2 cache, Mali-T7 graphics, two diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig index aff9c32362..92d6817ad5 100644 --- a/configs/evb-rk3328_defconfig +++ b/configs/evb-rk3328_defconfig @@ -1,7 +1,10 @@ CONFIG_ARM=y CONFIG_ARCH_ROCKCHIP=y +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SYS_TEXT_BASE=0x00200000 CONFIG_ROCKCHIP_RK3328=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y CONFIG_NR_DRAM_BANKS=1 CONFIG_DEBUG_UART_BASE=0xFF130000 CONFIG_DEBUG_UART_CLOCK=24000000 @@ -19,11 +22,15 @@ CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TIME=y CONFIG_DEFAULT_DEVICE_TREE="rk3328-evb" +CONFIG_SPL_OF_CONTROL=y CONFIG_ENV_IS_IN_MMC=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y CONFIG_SYSCON=y +CONFIG_SPL_SYSCON=y CONFIG_CLK=y +CONFIG_SPL_CLK=y CONFIG_FASTBOOT_BUF_ADDR=0x800800 CONFIG_FASTBOOT_FLASH=y CONFIG_FASTBOOT_FLASH_MMC_DEV=1 From patchwork Sat Jun 1 14:47:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matwey V. Kornilov" X-Patchwork-Id: 1108794 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dgoMKu3B"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45GPQg2n3bz9sNf for ; Sun, 2 Jun 2019 00:51:23 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 14312C21E07; Sat, 1 Jun 2019 14:49:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D0DA4C21E2B; Sat, 1 Jun 2019 14:48:37 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3EF07C21DB5; Sat, 1 Jun 2019 14:48:25 +0000 (UTC) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by lists.denx.de (Postfix) with ESMTPS id 10657C21DF9 for ; Sat, 1 Jun 2019 14:48:22 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id v29so1028476ljv.0 for ; Sat, 01 Jun 2019 07:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xmu4DSLAqTDn/P4Xi3txvBvt9wh66tCceIfMLCoY83c=; b=dgoMKu3BJa8A6CztNmFOfqV5Q6/exHpNy6FtSIxtTBOE+H9u+OdDmPd48F9HmPrrRO zB11oh4kZhsvdRknSe3ZVG6LUQOqKfNVrYoyShz89oe8oFJd+d/IFpb8Mpuhwf4nZJeY anonE5eVe1ho9GyE2FJqwf70a7FWGieiWR0oZGVeH8zGtRbnU23EHbEoLVC4LznA8Kcg DRH6IHh8PAX91GnGV9Dp5QAfLf5TwqzBm3OqdRW4+l4WeUB1l3cuMFd+ySqCYPsRCAyh Bt/J/E/WAioyQSwIDQX3LBXvdBFR9gp26XRrmQj8sV6gXjZ8l6nXRICrXGkEo7KQtxwF C6Ig== 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:in-reply-to :references; bh=Xmu4DSLAqTDn/P4Xi3txvBvt9wh66tCceIfMLCoY83c=; b=BPwswR0x1v5RfGWBy5Yz3vtWsBOdG1y9Vm3aFJXyz5WXXAji0gaNOR3KGx6gau6ykp p8U62KiM9277aL9+R6K1/S8Y3SZujDohuKjhLu3TGkcSgS/0rTblQm9THP1GxpWBWFb3 L/w+oO2V/28gLDym3IbtsphPx2jZtNtuj/A5hgK6IbWOSAh5mrjnAyIdEgn36JLx/KmT bu+KlVJ2hJDTU5HVJXRmQzX56k1uJlPe6cIBx5WrWqMghUtec1Kv5Ecl6I2GZecCNHzs ndNAYUsL8EY3xSQxFmfRrpTLneQNzW5uOcQVlxvb79IM3e52iRLWIFJAFh+DT/OgFG5i /20w== X-Gm-Message-State: APjAAAX8QaFxH3IlcRJYDrubfDdpOhZKMiGQa3+09iipwsrvPJqiECzk 7N1n68PXwYeXv2invrJdRUs= X-Google-Smtp-Source: APXvYqzxgX1NL9QoNlwsTtRhJVhqecW4cUtScE7y2JvjNoHKnvT3L6ZGs36IKE4FycvU+dQGSxlVGQ== X-Received: by 2002:a2e:874b:: with SMTP id q11mr9130484ljj.48.1559400501295; Sat, 01 Jun 2019 07:48:21 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id e19sm1843812ljj.62.2019.06.01.07.48.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jun 2019 07:48:20 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sat, 1 Jun 2019 17:47:34 +0300 Message-Id: <20190601144736.8580-5-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190519121020.13866-1-matwey.kornilov@gmail.com> <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V. Kornilov" Subject: [U-Boot] [PATCH v3 4/6] rockchip: dts: rk3328: add rk3328-rock64.dts X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" rk3328-rock64.dts has been taken from Linux kernel commit cff6d1d6f88b ("arm64: dts: rockchip: enable HS200 for eMMC on rock64") with minor modifications (drop nodes not known by rk3328.dtsi). Signed-off-by: Matwey V. Kornilov Reviewed-by: Kever Yang --- arch/arm/dts/Makefile | 3 +- arch/arm/dts/rk3328-rock64-u-boot.dtsi | 34 ++++ arch/arm/dts/rk3328-rock64.dts | 294 +++++++++++++++++++++++++++++++++ 3 files changed, 330 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/rk3328-rock64-u-boot.dtsi create mode 100644 arch/arm/dts/rk3328-rock64.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 31ef2b66a3..f6b5bacfcc 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -93,7 +93,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3288) += \ rk3288-vyasa.dtb dtb-$(CONFIG_ROCKCHIP_RK3328) += \ - rk3328-evb.dtb + rk3328-evb.dtb \ + rk3328-rock64.dtb dtb-$(CONFIG_ROCKCHIP_RK3368) += \ rk3368-lion.dtb \ diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi b/arch/arm/dts/rk3328-rock64-u-boot.dtsi new file mode 100644 index 0000000000..b077436cbc --- /dev/null +++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi @@ -0,0 +1,34 @@ +/* + * (C) Copyright 2018 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/ { + aliases { + mmc0 = &emmc; + mmc1 = &sdmmc; + }; + + chosen { + u-boot,spl-boot-order = &emmc, &sdmmc; + }; +}; + +&cru { + u-boot,dm-pre-reloc; +}; + +&uart2 { + u-boot,dm-pre-reloc; +}; + +&emmc { + u-boot,dm-pre-reloc; + fifo-mode; +}; + +&sdmmc { + u-boot,dm-pre-reloc; + fifo-mode; +}; diff --git a/arch/arm/dts/rk3328-rock64.dts b/arch/arm/dts/rk3328-rock64.dts new file mode 100644 index 0000000000..7bcc53fcce --- /dev/null +++ b/arch/arm/dts/rk3328-rock64.dts @@ -0,0 +1,294 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2017 PINE64 + */ + +/dts-v1/; +#include "rk3328.dtsi" + +/ { + model = "Pine64 Rock64"; + compatible = "pine64,rock64", "rockchip,rk3328"; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + gmac_clkin: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac_clkin"; + #clock-cells = <0>; + }; + + vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_gpio>; + regulator-name = "vcc_sd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_io>; + }; + + vcc_host_5v: vcc-host-5v-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb30_host_drv>; + regulator-name = "vcc_host_5v"; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_sys>; + }; + + vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb20_host_drv>; + regulator-name = "vcc_host1_5v"; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_sys>; + }; + + vcc_sys: vcc-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; +}; + +&cpu0 { + cpu-supply = <&vdd_arm>; +}; + +&cpu1 { + cpu-supply = <&vdd_arm>; +}; + +&cpu2 { + cpu-supply = <&vdd_arm>; +}; + +&cpu3 { + cpu-supply = <&vdd_arm>; +}; + +&emmc { + bus-width = <8>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; + vmmc-supply = <&vcc_io>; + vqmmc-supply = <&vcc18_emmc>; + status = "okay"; +}; + +&gmac2io { + assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; + assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; + clock_in_out = "input"; + phy-supply = <&vcc_io>; + phy-mode = "rgmii"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmiim1_pins>; + snps,force_thresh_dma_mode; + snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 10000 50000>; + tx_delay = <0x24>; + rx_delay = <0x18>; + status = "okay"; +}; + +&i2c1 { + status = "okay"; + + rk805: rk805@18 { + compatible = "rockchip,rk805"; + reg = <0x18>; + interrupt-parent = <&gpio2>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; + #clock-cells = <1>; + clock-output-names = "xin32k", "rk805-clkout2"; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_l>; + rockchip,system-power-controller; + wakeup-source; + + vcc1-supply = <&vcc_sys>; + vcc2-supply = <&vcc_sys>; + vcc3-supply = <&vcc_sys>; + vcc4-supply = <&vcc_sys>; + vcc5-supply = <&vcc_io>; + vcc6-supply = <&vcc_sys>; + + regulators { + vdd_logic: DCDC_REG1 { + regulator-name = "vdd_logic"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1450000>; + regulator-ramp-delay = <12500>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + + vdd_arm: DCDC_REG2 { + regulator-name = "vdd_arm"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1450000>; + regulator-ramp-delay = <12500>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <950000>; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-name = "vcc_ddr"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc_io: DCDC_REG4 { + regulator-name = "vcc_io"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_18: LDO_REG1 { + regulator-name = "vdd_18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc18_emmc: LDO_REG2 { + regulator-name = "vcc_18emmc"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vdd_10: LDO_REG3 { + regulator-name = "vdd_10"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + }; + }; +}; + +&io_domains { + status = "okay"; + + vccio1-supply = <&vcc_io>; + vccio2-supply = <&vcc18_emmc>; + vccio3-supply = <&vcc_io>; + vccio4-supply = <&vcc_18>; + vccio5-supply = <&vcc_io>; + vccio6-supply = <&vcc_io>; + pmuio-supply = <&vcc_io>; +}; + +&pinctrl { + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb2 { + usb20_host_drv: usb20-host-drv { + rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + usb3 { + usb30_host_drv: usb30-host-drv { + rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; + vmmc-supply = <&vcc_sd>; + status = "okay"; +}; + +&spi0 { + status = "okay"; + + spiflash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + + /* maximum speed for Rockchip SPI */ + spi-max-frequency = <50000000>; + }; +}; + +&uart2 { + status = "okay"; +}; + +&usb20_otg { + dr_mode = "host"; + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; From patchwork Sat Jun 1 14:47:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matwey V. Kornilov" X-Patchwork-Id: 1108791 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Eco4qI4e"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45GPNk4X0Rz9sNf for ; Sun, 2 Jun 2019 00:49:42 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 54D07C21DB6; Sat, 1 Jun 2019 14:49:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2,T_DKIM_INVALID,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 44EDDC21E08; Sat, 1 Jun 2019 14:48:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D4879C21DF3; Sat, 1 Jun 2019 14:48:26 +0000 (UTC) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by lists.denx.de (Postfix) with ESMTPS id D7211C21DDC for ; Sat, 1 Jun 2019 14:48:22 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id h11so12347027ljb.2 for ; Sat, 01 Jun 2019 07:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jF8CGLLkKYlw1AUxKGJQsKElXTzTWylclRDKL7F167Y=; b=Eco4qI4e9eDXeVkidnZxg3o8e8tbhSVTx+2PQZZMH51pTNGIR20A0xKPiCGBX8KVgr D8tQHsLeOQtX4dS6wDsbHjzvLbFUXmzM2W6xcp1eWaIU83ppnp3AWuASg0MyZV2BHoKs MwSoqiyN0bd9seAHUoDMzqM7RLDNG46XQyOD64ZKBlfzc0i9KJqqRynQygdULpiq6Aa/ 0LNYZEGLPPxipa9ZMc9Z05FZqhhthfqyS3MBJV4afvo4tp80EaCEDEr6XY9V1keUEChY qs3+M6DKS6U35vyzNq/AEzobGXJawi9/yOPf9UPN7vkQBSWpCY1589qVUC/IIO5UbFpR 45xg== 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:in-reply-to :references; bh=jF8CGLLkKYlw1AUxKGJQsKElXTzTWylclRDKL7F167Y=; b=YX2RgJ4uXv2oK+Cxe7cKuj0i8YfFLh1hhmNCsXjZ0VX23q6z2J8ztFlfQtaw/AsBJo neQPPIofz+SjoxhR7jCOqf/SXC1l/kTtjUFEo4a16nGRm5Fx1xLb8JFrFgxBt5kAiBaS LsQilo3buW/WJk4/N7JJACrMPn8SF2TSIsXu/DlMrzfwauBN/+a2Bt4JBrAlnTrZdFiT QgjcRBmpjcdOZdwCPdAPIWKRaAuNYEre6kHk5xVwdCfMTIk56WJQHQuOcNcb7jvUJHHX eWyHsYRpx85C+0yQC/lP8WtZXYKepHEyQ9lAzNtrM8Qnxu1qAdacrrrW2r4bhzKQCQa1 /BHQ== X-Gm-Message-State: APjAAAX7UEH9x4yHJrkyErRJoP+9+St0iqva8gWDldj0G9LMuj6EgzZI y8YjjMsAKwGDN259LUDRSbs= X-Google-Smtp-Source: APXvYqz9Z5FIZ54i10+2EhnYN2ivArzKyyHUYO/J8BlkGzA1HALakzjsVesWMGbW2epy1WsH9jLn2g== X-Received: by 2002:a2e:9d09:: with SMTP id t9mr2143324lji.151.1559400502245; Sat, 01 Jun 2019 07:48:22 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id e19sm1843812ljj.62.2019.06.01.07.48.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jun 2019 07:48:21 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sat, 1 Jun 2019 17:47:35 +0300 Message-Id: <20190601144736.8580-6-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190519121020.13866-1-matwey.kornilov@gmail.com> <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V. Kornilov" Subject: [U-Boot] [PATCH v3 5/6] rockchip: rk3328: add rock64-rk3328_defconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The ROCK64 is a credit card size SBC based on Rockchip RK3328 Quad-Core ARM Cortex A53. This series allow building u-boot SPL and u-boot.itb for Rock64 board. The proprietary TPL is stil required for deploy: ./tools/mkimage -n rk3328 -T rksd \ -d ./rkbin/bin/rk33/rk3328_ddr_333MHz_v1.16.bin idbloader.img cat ./spl/u-boot-spl.bin >> idbloader.img dd if=idbloader.img of=/dev/sdcard seek=64 conv=notrunc dd if=u-boot.itb of=/dev/sdcard seek=16384 conv=notrunc Signed-off-by: Matwey V. Kornilov Reviewed-by: Kever Yang --- configs/rock64-rk3328_defconfig | 91 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 configs/rock64-rk3328_defconfig diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig new file mode 100644 index 0000000000..6529dedfb6 --- /dev/null +++ b/configs/rock64-rk3328_defconfig @@ -0,0 +1,91 @@ +CONFIG_SMBIOS_MANUFACTURER="pine64" +CONFIG_SMBIOS_PRODUCT_NAME="rock64_rk3328" +CONFIG_ARM=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_TEXT_BASE=0x00200000 +CONFIG_ROCKCHIP_RK3328=y +CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x40000 +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_SPL_STACK_R_ADDR=0x600000 +CONFIG_DEBUG_UART_BASE=0xFF130000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_DEBUG_UART=y +CONFIG_NR_DRAM_BANKS=1 +# CONFIG_ANDROID_BOOT_IMAGE is not set +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py" +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-rock64.dtb" +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SPL_STACK_R=y +CONFIG_SPL_ATF=y +CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y +CONFIG_FASTBOOT_BUF_ADDR=0x800800 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y +CONFIG_CMD_SF=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_TIME=y +CONFIG_DEFAULT_DEVICE_TREE="rk3328-rock64" +CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_ENV_IS_IN_MMC=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y +CONFIG_SYSCON=y +CONFIG_SPL_SYSCON=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_FASTBOOT_CMD_OEM_FORMAT=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_SPI_FLASH=y +CONFIG_SF_DEFAULT_SPEED=20000000 +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_PHY=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y +CONFIG_PINCTRL_ROCKCHIP_RK3328=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_RK8XX=y +CONFIG_REGULATOR_PWM=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_REGULATOR_RK8XX=y +CONFIG_PWM_ROCKCHIP=y +CONFIG_RAM=y +CONFIG_SPL_RAM=y +CONFIG_DM_RESET=y +CONFIG_BAUDRATE=1500000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYSRESET=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_GENERIC=y +CONFIG_USB_DWC2=y +CONFIG_USB_DWC3=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="Rockchip" +CONFIG_USB_GADGET_VENDOR_NUM=0x2207 +CONFIG_USB_GADGET_PRODUCT_NUM=0x330a +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USE_TINY_PRINTF=y +CONFIG_SPL_TINY_MEMSET=y +CONFIG_ERRNO_STR=y From patchwork Sat Jun 1 14:47:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matwey V. Kornilov" X-Patchwork-Id: 1108793 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AUEMojct"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45GPQD4C8Gz9sNf for ; Sun, 2 Jun 2019 00:51:00 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 323A4C21D8E; Sat, 1 Jun 2019 14:49:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4E23EC21DED; Sat, 1 Jun 2019 14:48:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 96CE8C21E02; Sat, 1 Jun 2019 14:48:27 +0000 (UTC) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by lists.denx.de (Postfix) with ESMTPS id 09BB1C21DA6 for ; Sat, 1 Jun 2019 14:48:24 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id z5so12289172lji.10 for ; Sat, 01 Jun 2019 07:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=L4K/omSKhrrAj0kxEIV5tAhNuwktgxtg6ajTQ0Mksbg=; b=AUEMojctuAUBgIy9AkjR1H/wGBPhrwfJ9sger8dGh053s0oAgdJf82ZGubRYrejYo1 +7M0JvIuPi47XklYXBQpz8iQZKBCsEMGHQd+YqtdFp6QHjMyA2yaIji6L4Za77DEQvXw DDGd3cj4bxHp6d5t3eS7wPrhZYXBbccS3TUYnozaRQt6t/++Djl9VfQpthUPnyRfghUZ VaMp4vtTKZ8lZwIZFg7+1YqhJ3m9AFLzd+loiA5PF+Wdfqk7DYKjetPHFk3zDKX4C8XM /RU01+2LxD76UGWv9z+JXJDwGEhZq25sLsV1xNRlzSfR8jW5lqGC3G49Pggp1CNgk+MU e11A== 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:in-reply-to :references; bh=L4K/omSKhrrAj0kxEIV5tAhNuwktgxtg6ajTQ0Mksbg=; b=TFfWZnMEcZB2GBVt/AFSa9hhL663GKGJn6jNBzf8EE43Mky2bU6K71xAladcGb75Td U3FgQ3zqACjHBTczbuqistTRP8gFCwm+yOZLiSFIbEPL2ssXD3VIGZoFZUKBrsXQInzj pqWonFzf7yKObzBWeWzRU2gWsWn1aMx5bMAmz0Sxig5UoTfu0qVoXkhRmUgPVQfljYA8 Y/utp4gqQ81cisf+CyM5bzLcMB+5/d6+dQ5WAcHsGv/5ZsWRypr7JE/Sl2EPS0eQBiUL NDljaNAMe64AITUlsJNr9E8b08FqEm7xejyyW1ipuMtJH5ETgYFr9zyAwpfzsh4YtZYA 5bgA== X-Gm-Message-State: APjAAAXYoxWSqTe/7WcKPqo9UWOfltwKWEzsLaKgoS0mrQgy261mEtYR Qwott3xxojHvlAQAirntfsY= X-Google-Smtp-Source: APXvYqy64vC5ZjEI8cM0r0p8qndFdFMs7Zvc4q5MRtFZmrwSsPgWlAiIgxx29QXaPYKLLKIPCjlbVg== X-Received: by 2002:a2e:9e4c:: with SMTP id g12mr1426146ljk.3.1559400503403; Sat, 01 Jun 2019 07:48:23 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id e19sm1843812ljj.62.2019.06.01.07.48.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jun 2019 07:48:22 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sat, 1 Jun 2019 17:47:36 +0300 Message-Id: <20190601144736.8580-7-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190519121020.13866-1-matwey.kornilov@gmail.com> <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V. Kornilov" Subject: [U-Boot] [PATCH v3 6/6] doc: rockchip: Add note for Pine64 Rock64 board X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add build notes for Pine64 Rock64 board. Signed-off-by: Matwey V. Kornilov Reviewed-by: Kever Yang --- doc/README.rockchip | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/doc/README.rockchip b/doc/README.rockchip index ca4d6473b0..eacedbddf4 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -48,9 +48,10 @@ Two RK3036 boards are supported: - EVB RK3036 - use evb-rk3036 configuration - Kylin - use kylin_rk3036 configuration -One RK3328 board is supported: +Two RK3328 board are supported: - - EVB RK3328 + - EVB RK3328 - use evb-rk3328_defconfig + - Pine64 Rock64 board - use rock64-rk3328_defconfig Size RK3399 boards are supported (aarch64): @@ -307,6 +308,31 @@ tools/mkimage -n rk3188 -T rksd -d spl/u-boot-spl.bin out truncate -s %2048 u-boot.bin cat u-boot.bin | split -b 512 --filter='openssl rc4 -K 7C4E0304550509072D2C7B38170D1711' >> out +Booting from an SD card on Pine64 Rock64 (RK3328) +================================================= + +For Rock64 rk3328 board the following three parts are required: +TPL, SPL, and the u-boot image tree blob. While u-boot-spl.bin and +u-boot.itb are to be compiled as usual, TPL is currently not +implemented in u-boot, so you need to pick one from rkbin: + + - Get the rkbin + + => git clone https://github.com/rockchip-linux/rkbin.git + + - Create TPL/SPL image + + => tools/mkimage -n rk3328 -T rksd -d rkbin/bin/rk33/rk3328_ddr_333MHz_v1.16.bin idbloader.img + => cat spl/u-boot-spl.bin >> idbloader.img + + - Write TPL/SPL image at 64 sector + + => sudo dd if=idbloader.img of=/dev/mmcblk0 seek=64 + + - Write u-boot image tree blob at 16384 sector + + => sudo dd if=u-boot.itb of=/dev/mmcblk0 seek=16384 + Booting from an SD card on RK3399 =================================