From patchwork Sat Jun 8 21:27:13 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: 1112552 X-Patchwork-Delegate: ykai007@gmail.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="j5Hxa2nt"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45LswC5tDcz9s6w for ; Sun, 9 Jun 2019 07:28:59 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 61FC3C21F7A; Sat, 8 Jun 2019 21:28:02 +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 17A04C21F20; Sat, 8 Jun 2019 21:27:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3EE97C21E9F; Sat, 8 Jun 2019 21:27:46 +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 AF96EC21EC9 for ; Sat, 8 Jun 2019 21:27:45 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id b11so4081319lfa.5 for ; Sat, 08 Jun 2019 14:27:45 -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 :in-reply-to:references; bh=PsoIFTi9wnmqOTIWQwOPO6AdEtnOPVVLfjp+UIMrTGI=; b=j5Hxa2ntmqMYP8ofmqi+3+4+IU4eMfO3VqA/WtgHkTEeWel1cJOHyQqTolvFSMYXwQ 37Tk2zeoO1FpWFiVtVlXYjAm1DTNjtpgKBTlkKwf2qVo6YIy97d3xhARWf0P1CRfk8Pm XNnpClca+M+mSCYxw3crSfNoRgOkresEYV0BvoE+LSYftG33S/ZG0jy3jPKFbbJhRuny Zf6syCdJydmH5no3qLJfgEv4ybV0CnVlVJjDw8a1scojWQ6rioHVwId6hSlTqmFEJI7I zAE3NfxsBckJBy9PLkLgkbc9cor6OvqazTZLzi9iOouYiy06vz0nkmPUlp3kQsAffox+ 2mqQ== 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:in-reply-to:references; bh=PsoIFTi9wnmqOTIWQwOPO6AdEtnOPVVLfjp+UIMrTGI=; b=IRQz5fxvfkwX42PaG/mIwhWYZOt/cGuZVIljQZIJkgy2RVlYHJBz8fqS62h66KA54K 1vPiZhdYMHePF/9Ox7sAZkx0AqF10cfz9weRilVHhuBkRslLiGAzV5KofzQawZzVGZCi 8uzmCaT7Z7h+Sm8b7kb094FkJH12+Agx5rfyHv13Z+2YCZFLcmAG+Dd8PSsPMLiuBzjj XI7JM4cLqP1cQC40zzaNDtF3AAuj6fABd0GyawKOstmc/pYTr0tiH0QLQJtDnDN/8CjB Pqm0FUlaQEbalAJf2UCTG2LLiyVktXiiVd8vHEm+pnRz1/3qCi7tA813FdMiAytVpL// PYKA== X-Gm-Message-State: APjAAAXnWassNZYOqh3cjk1JO0EBAIal/JQ5JjyyFYv3XY8HRmiYPKmr g66tqMWHdtDkK22Y0sy4yb4= X-Google-Smtp-Source: APXvYqypA/lwKKt8rk3G03YdifUBbP+x0aFT1iS0fB+Z4Aw3OXJBpaSy+KRdSOBtckEuZEFX1ZgMgg== X-Received: by 2002:a19:9e4b:: with SMTP id h72mr4261255lfe.21.1560029264967; Sat, 08 Jun 2019 14:27:44 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id l29sm1125236lfp.83.2019.06.08.14.27.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jun 2019 14:27:44 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sun, 9 Jun 2019 00:27:13 +0300 Message-Id: <20190608212718.9168-2-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190608212718.9168-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> <20190608212718.9168-1-matwey.kornilov@gmail.com> In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V . Kornilov" Subject: [U-Boot] [PATCH v4 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 8 21:27:14 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: 1112553 X-Patchwork-Delegate: ykai007@gmail.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="NvaeEX1O"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45LswQ08Znz9s6w for ; Sun, 9 Jun 2019 07:29:09 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8D466C21F9E; Sat, 8 Jun 2019 21:28:16 +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 824D1C21F1A; Sat, 8 Jun 2019 21:27:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 20D7FC21EC9; Sat, 8 Jun 2019 21:27:47 +0000 (UTC) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by lists.denx.de (Postfix) with ESMTPS id B7446C21E9F for ; Sat, 8 Jun 2019 21:27:46 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id m23so4640525lje.12 for ; Sat, 08 Jun 2019 14:27:46 -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 :in-reply-to:references; bh=1EEtgWfPHVd3+a44/KzfGGeSQ78+viN6oyGjOCRemCI=; b=NvaeEX1Oqz28wHFOVEbeofUASQDAm8JTfWvqZVT0ZOqgrl78dZIEMp5C+bXTdARke4 puzgBdy6DvCMJnICXGAGMR2zX6zSft0fL8F7JHzipYwNPOtykue/YQMj6O/J/8AYDuEi jIBEZ6IJTTSaovY893qlKH2W3tDIwZjZ6Qq1wQirkS6IzSSVdCbRMwjQcPPsCbNBWncJ MRbzT/mErrrGYxAghZ4slAAV9+yS4L/AqHiIFRimKmgux1J+RCAMk46CaQ2DsdB+ES6W Ie7bxcWZXTKCdZuFWJZYMqL766+ggHAkcbtYS12tO+TJGozmhQDhsfnmWE1jtose+WP+ ff9w== 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:in-reply-to:references; bh=1EEtgWfPHVd3+a44/KzfGGeSQ78+viN6oyGjOCRemCI=; b=hgsXZYowYi4h9vLRh1p8SSLBdVqy2Ny4e5Jf9BZqZPzVYgPwTCWlxznHh/5rxKi+6o 1wjOADgdmaf0UG9cNNvwSOMFpE+spP7nCz4XdU6gYWu/uoKcrzoh261VzqMORwjUe9B2 FFGCDXwDytCEu0U9CGc9mZO40jJj2iWR3I90d9aLwiOrfJM5f4kjae5+w2QgD66KYVNq qgkuiUlOSNFDdroUFNIboy8+0DK36Td7Pmmr1zdyBk4v/ZwgYMAxqMor1O21K1R68k6w 6T45C3kgbkjnTDDyS+qonv6GuaNlvce55KrT5XuVIKH94M42gZ1Zq2HHeD5Fbvc9FqeP gkEw== X-Gm-Message-State: APjAAAW8TNqModcHqeqEjwQFlbo8UwnROc4CmWI4U8ByqBlV46XtHXQH QZ45b8euYWoZsdBYF7FTxc+dowbTbSY= X-Google-Smtp-Source: APXvYqzhNQ7eoHys03Mc11DGonDiO/uQrCbQb/CS5VSdx0jLp3KF18fZ64IHm9Q/guygGJxKqG64tg== X-Received: by 2002:a2e:8802:: with SMTP id x2mr20668802ljh.200.1560029266036; Sat, 08 Jun 2019 14:27:46 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id l29sm1125236lfp.83.2019.06.08.14.27.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jun 2019 14:27:45 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sun, 9 Jun 2019 00:27:14 +0300 Message-Id: <20190608212718.9168-3-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190608212718.9168-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> <20190608212718.9168-1-matwey.kornilov@gmail.com> In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V . Kornilov" Subject: [U-Boot] [PATCH v4 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 8 21:27:15 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: 1112555 X-Patchwork-Delegate: ykai007@gmail.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="hh5WqkZX"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45Lsx826Y8z9s9y for ; Sun, 9 Jun 2019 07:29:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 085D1C21F8E; Sat, 8 Jun 2019 21:28:47 +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 9EE46C21F9B; Sat, 8 Jun 2019 21:28:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 063CCC21F8A; Sat, 8 Jun 2019 21:27:50 +0000 (UTC) Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by lists.denx.de (Postfix) with ESMTPS id B6D6DC21ED6 for ; Sat, 8 Jun 2019 21:27:47 +0000 (UTC) Received: by mail-lf1-f68.google.com with SMTP id y13so4067395lfh.9 for ; Sat, 08 Jun 2019 14:27:47 -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 :in-reply-to:references; bh=SFi0L/rIJkJmZkKh3eUkOu3VrEHfb91Yegr2sTfLrEc=; b=hh5WqkZX7vcI+Qnid1fOAX5/SVaYAR8Fk7KqftjooG8v/j6gvFcIMnNaLuMR0X5Dbs q2/2r+v3z79snCvwXAQP1YctKf36K3RD3kDiqZqpu5gfRcDHJwanvAJvNmIqHTZNOb6X KaDsLzS7+ouNHg4uJCB1DjfCQSc4sMXYT05rKmGBnbyyYDzJas5SXChOxGioEYVvIO19 yI9nFEHPfuQk0793tZ73AcaUvsBRuUS6yRmjfGHIStJfXqt/EuaO9/J7qVWroISfYIra +ShncCD0XDilvqz8CYyyq/+qugOPGRUiYZJVR0xX/jEbytfr9OvnPOJfmGf0VZFWglmI Ww6g== 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:in-reply-to:references; bh=SFi0L/rIJkJmZkKh3eUkOu3VrEHfb91Yegr2sTfLrEc=; b=cDjD71CFQY17nN1HXDxZyTxqjldng3jh0AiUo3HDb7fWr4gZjk4pz90czsBqasg4Hr CvRbZIN9IPGiUiQLjhJhumJ2lZ3kDDGAxk0Lb80ijsPIkQcx/RtgDIxgR/H3LqrQakUs htwJw8+dd77+aGKwXG4OOPMz0l3dAJdT9jJRUSJYO81Fol6iwJvPzpqz3+YJaF7pT+7D zFKllKN9WL5XfdE4KUmO6kasCb5oYfzI1ZbJtbAAL5G3w8lSJdvm0CBpsoxdXGtt3omV fk8aeoJL+ug/wnT7THuIZIghQgPrFC/dPV1DpPMZuPR5JIoFFJuBrrX5FUKgC6bPKnvi bFUA== X-Gm-Message-State: APjAAAUmysKRJEQfdHYou3Lsjres02D6zfHY/KWe5qab5+ayvylDzbMt Pe6xZcVciHpvVmDM/zxs86A= X-Google-Smtp-Source: APXvYqxbHdvT4DDia1tytKgLhWezTRf4KadQbfYLt3OnOPJJuuINW4LBQfBoK5ZYU1zSjycYIUD5oQ== X-Received: by 2002:a19:5044:: with SMTP id z4mr29227991lfj.80.1560029267048; Sat, 08 Jun 2019 14:27:47 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id l29sm1125236lfp.83.2019.06.08.14.27.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jun 2019 14:27:46 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sun, 9 Jun 2019 00:27:15 +0300 Message-Id: <20190608212718.9168-4-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190608212718.9168-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> <20190608212718.9168-1-matwey.kornilov@gmail.com> In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V . Kornilov" Subject: [U-Boot] [PATCH v4 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 8 21:27:16 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: 1112557 X-Patchwork-Delegate: ykai007@gmail.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="hDEPWIV1"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45Lsxx6HZTz9s6w for ; Sun, 9 Jun 2019 07:30:29 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6E5C6C21F75; Sat, 8 Jun 2019 21:28:31 +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 E864BC21F84; Sat, 8 Jun 2019 21:27:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0774CC21F82; Sat, 8 Jun 2019 21:27:52 +0000 (UTC) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by lists.denx.de (Postfix) with ESMTPS id BEC6DC21F67 for ; Sat, 8 Jun 2019 21:27:48 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id o13so4666318lji.5 for ; Sat, 08 Jun 2019 14:27:48 -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 :in-reply-to:references; bh=NPTQvbJ2hYUgHNCAmd/dz8cGjHT0hLBUSF8TYZQdTI8=; b=hDEPWIV1ppB3eQRx8AYHJpo6yDYSkM4HUpmQHMq8MsrVnL20yQmAOVIPsNLPh+iR18 U4a0Nv0/6wR7CAJ26tobkrSrBeLoYBFg3TuML2myfka03IoWb0SWhAWkG7OS51a6kiDu tvD9IL9ecg4B8+rWAt0zgqcaFQZZIGLOItOyrie4jVrXSeDS0g6k/892b2HE0AbpmgOm Bl/One5ogpAqfy3HsXjjnioKgZcmO1aN398MXAAITEZs7jnVlbxUw5TBYRJVW1ioUEMk iwn2G7N1J8VEEa2YJprREtGw1t7ClYewQyMYqv7wTfpIh9EKMgHPnPhio7OxoU1tfjxZ h6Yg== 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:in-reply-to:references; bh=NPTQvbJ2hYUgHNCAmd/dz8cGjHT0hLBUSF8TYZQdTI8=; b=n0GyH4HURWTyZpBvWxbLKk/izImMfnsUkPjvphPax1hZhAG0yoImcHETSxtaJeSplw AvB0SlTRGb5pLdBab5jT2chlODcdTxguVRvRyI4vBcIGIzr4W58cEQFQ2T25e+64+zp2 RqtL0Bbv8qopuH1JxGZNv6TsePlRBng/MFAJjOVxb9tr2KQRw2fV8n2f05Ye92+w2Xib 2E9o/UaEyAFBcOjeX8Lrtz9REwEyGItRJthQWQLmcWTe/IcenKbGWfZsOlAw2W0uFPMl pwbvsWJLO66tHXuczb4FwItx99K85AgT406q19NJZmrujIlWd0oBINpQwNm6Ce5Fyyez ElCg== X-Gm-Message-State: APjAAAXG/8deNacHvNL+pLSICNZfSj/XVNvoOfS/CFm9bZLjRz3DiEDf MgQmyoueHoOxB8523yRE3z8= X-Google-Smtp-Source: APXvYqy49hb7MBrTVN3IaZNrmZXlY5L/BDbP4xFpZQfZG9+6uqVkY4WHSAxZ9ANwdH9Aj4aEIZiduw== X-Received: by 2002:a2e:8793:: with SMTP id n19mr7642440lji.174.1560029268108; Sat, 08 Jun 2019 14:27:48 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id l29sm1125236lfp.83.2019.06.08.14.27.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jun 2019 14:27:47 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sun, 9 Jun 2019 00:27:16 +0300 Message-Id: <20190608212718.9168-5-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190608212718.9168-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> <20190608212718.9168-1-matwey.kornilov@gmail.com> In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V. Kornilov" Subject: [U-Boot] [PATCH v4 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 e0c54bfa76..19499ddfc6 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 8 21:27:17 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: 1112556 X-Patchwork-Delegate: ykai007@gmail.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="JiadN7sV"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45Lsxv0clcz9s6w for ; Sun, 9 Jun 2019 07:30:27 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C3108C21F63; Sat, 8 Jun 2019 21:29:14 +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 D1029C21F8A; Sat, 8 Jun 2019 21:28:23 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9B1DCC21F0C; Sat, 8 Jun 2019 21:27:53 +0000 (UTC) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by lists.denx.de (Postfix) with ESMTPS id BD149C21F5B for ; Sat, 8 Jun 2019 21:27:49 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id a25so4098223lfg.2 for ; Sat, 08 Jun 2019 14:27:49 -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 :in-reply-to:references; bh=lomLYyKCvf5wC053NzGcRA39NUPKHkdZlABoCiPQewM=; b=JiadN7sVDMay2i77I45cRIkLXiQ8+7ZXv6Y1PKhZkx/moXU5sufhYLwjRNqPPqoNE9 cK8hjQno/QqayKDGDMj8aeyJbbzAkDjQIKIVmdLW8U42YVPdlUp0AY1sEpPi9+Ltxtbu BRIFtXQcz3w+2haShG6t8PL3mAtymUSdhYjiiF1PpA2XQQsC2Mn6Y0cXZuCoVJZMgkJ1 +nhfPwZxd3faxAynRi9nSYOVtHCmbmNgTVwu1GC1Q98Xpw+DgcVIFJDm4dfNUN+FBny1 gRIbRuiNgqwXFLwaLllKxWA7wCv5dmEB0V7z0pH1CI0bmAejIrdnXSkevL7A+p2u9FTN q4WA== 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:in-reply-to:references; bh=lomLYyKCvf5wC053NzGcRA39NUPKHkdZlABoCiPQewM=; b=DdprdibhBlsDEAR+G4K7lwMhC2DAAkkFgwnTIpPtUYWpLCLZ2CRepc8YhSSJ4rBvGu boyc6VqonVphix4rVfVuzsu6N4pVbjUBwkssjhGqSVcbang1RlBtyzjiBr0Tw6VTopQA LPPnS33dJDqGrQEOMQZyEirR4NKZzc2oKVMcsXn5Bes/DFKAxbUrZzV6v/Sq0y1SuKRL S2Qu0DdY240txhdg0zT7zahuGmWioQUSW2a9KngQfZ1ca54eZj0onYZoPnlHc0HqYsoR PmFZr2rxDFsH6YDezqMpQJ6z7MXplMDRPBvSjkDFBlSopzCW2W7aPkAHJmZMEgaAVIVD N29g== X-Gm-Message-State: APjAAAXqG8EQTNaqAP0npt0YpmV7ZmCD0stoE+NTeLzyGPsgPBzkTvDx wTiLW8kJK+vyfNKUEm2LehU= X-Google-Smtp-Source: APXvYqy7gQ/thYQNHcz4ANdSxREvaXPEjPGaS73ZKyMr9g0LlRqGBfHN2aL0xxKZeg4Xpg/30lNJtA== X-Received: by 2002:ac2:528e:: with SMTP id q14mr3740660lfm.17.1560029269076; Sat, 08 Jun 2019 14:27:49 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id l29sm1125236lfp.83.2019.06.08.14.27.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jun 2019 14:27:48 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sun, 9 Jun 2019 00:27:17 +0300 Message-Id: <20190608212718.9168-6-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190608212718.9168-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> <20190608212718.9168-1-matwey.kornilov@gmail.com> In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V. Kornilov" Subject: [U-Boot] [PATCH v4 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 --- board/rockchip/evb_rk3328/MAINTAINERS | 6 +++ configs/rock64-rk3328_defconfig | 91 +++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 configs/rock64-rk3328_defconfig diff --git a/board/rockchip/evb_rk3328/MAINTAINERS b/board/rockchip/evb_rk3328/MAINTAINERS index 2ee6e462a6..c661d2e06a 100644 --- a/board/rockchip/evb_rk3328/MAINTAINERS +++ b/board/rockchip/evb_rk3328/MAINTAINERS @@ -4,3 +4,9 @@ S: Maintained F: board/rockchip/evb_rk3328 F: include/configs/evb_rk3328.h F: configs/evb-rk3328_defconfig + +ROCK64-RK3328 +M: Matwey V. Kornilov +S: Maintained +F: configs/rock64-rk3328_defconfig +F: arch/arm/dts/rk3328-rock64-u-boot.dtsi 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 8 21:27:18 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: 1112554 X-Patchwork-Delegate: ykai007@gmail.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="E3i0+AHj"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45Lsx64T0wz9s6w for ; Sun, 9 Jun 2019 07:29:46 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 21542C21F8A; Sat, 8 Jun 2019 21:29: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.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 19501C21F9A; Sat, 8 Jun 2019 21:28:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 062D6C21F0C; Sat, 8 Jun 2019 21:27:54 +0000 (UTC) Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by lists.denx.de (Postfix) with ESMTPS id AB4FCC21ED6 for ; Sat, 8 Jun 2019 21:27:50 +0000 (UTC) Received: by mail-lf1-f68.google.com with SMTP id a25so4098233lfg.2 for ; Sat, 08 Jun 2019 14:27:50 -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 :in-reply-to:references; bh=ENQmvPvLfMcHZnpJ3+nPZ8rylwjJ5d9Du76layBnzdI=; b=E3i0+AHjk2aChteb/ATSQ78g1UkwEypdqxVD8w25T0dYXQSkOSh4LeSBY2WunbJhB8 XXYPq8bkqBUhQAzJj2n24uon1dwODw6a3hN7Tt95no+CF1hM1bAiHp6JwpowRUUO0Rn6 mV2B9MkX+BvhZvpdQELtcAAgVcX/wIzPEv8uIx4Oi+oCXaDg3YIDqp83Oy6r/4U90qyV PmzTuFwBSx660tsBi9BI1Wi5TEkVxX7ztW1+kgM45aNVfcshGeUS/UEYD5wFvqGaYBTF nM/RU/mZ6K9cGHjOU6u6Mjbwy48Y7i/ecgkdtT7sTchyhwYze8/qKWMTDAtnuo1/XYpX fl3A== 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:in-reply-to:references; bh=ENQmvPvLfMcHZnpJ3+nPZ8rylwjJ5d9Du76layBnzdI=; b=jCADuSpMo5mvflIYBjWYj7/2iMNHTfFEKWVHsY/Ai1qPPniOX9Oo6fB/Wpis6+T4yP xu3ES3xd0QM0OERFw0rbeZJf3BO946KZ7XFH0XuzswAxvc5H9mOerByR2GUsWpZYmaaO UF9GOnLNygWy0t2SThFudxvxlu+KhhWy5MgT8mgwwiJZgQk6S0BQaQizKz2A90RYMeoN DRzeLutws1Ds4mqgJemXk4MqkbWbo7df4K9wAu/kxFPTUvgXGkERXGgYuO3mxF6ofVQ0 rgC9s3L4rb8RONELT8kSpqPCwYc9mhOJMpREqdXEqwLSkFHQdBwRSN6gf33VUd68l87h zcpg== X-Gm-Message-State: APjAAAWvoR+2oz2OtQG6kfVUELKL8jzIXnDwrevZ4zIJ41KebQ96TLvV X/xl1pLUkJYQX98zj7+clTs= X-Google-Smtp-Source: APXvYqyZyFro773pMvtmH74lmp0Ao/lM++CUjEvQQvpFRI5eJOVjj5zddfKM7UItJwQljAdK2KJrKQ== X-Received: by 2002:a19:22d8:: with SMTP id i207mr28312081lfi.97.1560029270064; Sat, 08 Jun 2019 14:27:50 -0700 (PDT) Received: from oak.local ([92.243.181.209]) by smtp.gmail.com with ESMTPSA id l29sm1125236lfp.83.2019.06.08.14.27.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jun 2019 14:27:49 -0700 (PDT) From: "Matwey V. Kornilov" To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, kever.yang@rock-chips.com Date: Sun, 9 Jun 2019 00:27:18 +0300 Message-Id: <20190608212718.9168-7-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190608212718.9168-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> <20190608212718.9168-1-matwey.kornilov@gmail.com> In-Reply-To: <20190601144736.8580-1-matwey.kornilov@gmail.com> References: <20190601144736.8580-1-matwey.kornilov@gmail.com> Cc: vagrant@debian.org, u-boot@lists.denx.de, "Matwey V. Kornilov" Subject: [U-Boot] [PATCH v4 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 264f7e4994..11ab74a103 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): @@ -310,6 +311,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 =================================