From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAC1AC433EF for ; Fri, 8 Oct 2021 17:33:23 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D0AC60C4B for ; Fri, 8 Oct 2021 17:33:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8D0AC60C4B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3FFE483598; Fri, 8 Oct 2021 19:33:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=vrull-eu.20210112.gappssmtp.com header.i=@vrull-eu.20210112.gappssmtp.com header.b="66Zj1rQ3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 28283833F0; Fri, 8 Oct 2021 19:33:18 +0200 (CEST) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 863E6833D4 for ; Fri, 8 Oct 2021 19:33:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=philipp.tomsich@vrull.eu Received: by mail-wr1-x431.google.com with SMTP id t8so32171065wri.1 for ; Fri, 08 Oct 2021 10:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull-eu.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d34wbzr8AKAQ5rTOpB0RwIWUjfjWgyXeHm0hR8DHImc=; b=66Zj1rQ34q77cglWmlV4t/eSH0QbkznjCtiaLWmja4pwAnbb34fNk3+TSsftwiNuIL WkWn+rh+UDlrlctcVd+RPAkGYKqykRRGtLEDjwuTh/exQfjlQGHQnpLaxcG4pYesk5rx 7teiSZA/IUihjbKuQ3bNapfPEAaqDvS1IP1T9G+GcI2LVtlmeF1rwqARNumrmUtI//f7 WWyW4xgw+FQFjeM23jKvjJDy64LVU0hvLZ1wBAODt29h4EuLOdCU16KXZtiRwoYzVXjM vM9n1ebjjNpdTppa3gRc+FS8Dv0+p8BbJlBWSARQRcAiHHjTcT48oFZZjsXVTOvFrI/Y V07Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d34wbzr8AKAQ5rTOpB0RwIWUjfjWgyXeHm0hR8DHImc=; b=ho1FkrIC97Bzzoy0Asu7EYDR2hdoF9TfpN7IrFaoV+Be3Io3RABqgVwyzhcYqEDNB/ Th5toOlVy+qNHVJNxNPHDuFdjkd57Mh0EVOzK3xVfbVUhzS1s51S7dWpu+d1TTfoyGJp RMi7ayLP6yw+BEdPZ06kiA5CGZ/ap3PYvCsVHuoc19UOkjlP9mf+1DNal7yp6dpLSmad oYdCx68x5jYRWXtybKlC4xQD5zqL5wOv1fF6VtWuf0VvYJ7SbuBcOUWD3BXH57LgfOoP kz0LbcUumMVWuEgpm+ryleTtKESSSfXG4sSOGB72lom4NujC84PuGX/DZNk8gOhZdYX1 oMzQ== X-Gm-Message-State: AOAM531GZ1aFVTZC52xNalLxQKpBydx5gditNQA6hd7LSigiIBJUtkgw Uoe72HFob5knY81sV74n6oy9beboKGY5X/on2gK8+g== X-Google-Smtp-Source: ABdhPJwOd4bGm2W0tK+sugk2GUMkvxaQhj5jP9sRcZZ9aEuK3H0U7kTCCgGTfTLvmzCtDUjSYGvLZA4Z/ccz9+aC6G8= X-Received: by 2002:adf:e3c6:: with SMTP id k6mr3665381wrm.90.1633714394006; Fri, 08 Oct 2021 10:33:14 -0700 (PDT) MIME-Version: 1.0 References: <20211008020046.17446-1-nico.cheng@rock-chips.com> <20210930112616.v1.3.Ib0d964f78ba35e91a4bef91d322101768d9fcfbf@changeid> In-Reply-To: <20210930112616.v1.3.Ib0d964f78ba35e91a4bef91d322101768d9fcfbf@changeid> From: Philipp Tomsich Date: Fri, 8 Oct 2021 19:33:03 +0200 Message-ID: Subject: Re: [PATCH v1 3/3] rockchip: rk3568: add arch_cpu_init() To: Nico Cheng Cc: Simon Glass , Kever Yang , yamada.masahiro@socionext.com, chenjh@rock-chips.com, jason.zhu@rock-chips.com, trini@konsulko.com, Yifeng Zhao , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Fri, 8 Oct 2021 at 04:01, Nico Cheng wrote: > > We configured the drive strength and security of EMMC in > arch_cpu_init(). Could you point me to a public version of the TRM (and ideally also of the datasheet), so I can review this series? Thanks, Philipp. > > Signed-off-by: Nico Cheng > --- > > arch/arm/mach-rockchip/rk3568/rk3568.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/arch/arm/mach-rockchip/rk3568/rk3568.c b/arch/arm/mach-rockchip/rk3568/rk3568.c > index 973b4f9dcb..3f9a435c3c 100644 > --- a/arch/arm/mach-rockchip/rk3568/rk3568.c > +++ b/arch/arm/mach-rockchip/rk3568/rk3568.c > @@ -13,6 +13,14 @@ > > #define PMUGRF_BASE 0xfdc20000 > #define GRF_BASE 0xfdc60000 > +#define GRF_GPIO1B_DS_2 0x218 > +#define GRF_GPIO1B_DS_3 0x21c > +#define GRF_GPIO1C_DS_0 0x220 > +#define GRF_GPIO1C_DS_1 0x224 > +#define GRF_GPIO1C_DS_2 0x228 > +#define GRF_GPIO1C_DS_3 0x22c > +#define SGRF_BASE 0xFDD18000 > +#define SGRF_SOC_CON4 0x10 > > /* PMU_GRF_GPIO0D_IOMUX_L */ > enum { > @@ -81,5 +89,16 @@ void board_debug_uart_init(void) > > int arch_cpu_init(void) > { > +#ifdef CONFIG_SPL_BUILD > + /* Set the emmc sdmmc0 to secure */ > + writel(((0x3 << 11 | 0x1 << 4) << 16), SGRF_BASE + SGRF_SOC_CON4); > + /* set the emmc ds to level 2 */ > + writel(0x3f3f0707, GRF_BASE + GRF_GPIO1B_DS_2); > + writel(0x3f3f0707, GRF_BASE + GRF_GPIO1B_DS_3); > + writel(0x3f3f0707, GRF_BASE + GRF_GPIO1C_DS_0); > + writel(0x3f3f0707, GRF_BASE + GRF_GPIO1C_DS_1); > + writel(0x3f3f0707, GRF_BASE + GRF_GPIO1C_DS_2); > + writel(0x3f3f0707, GRF_BASE + GRF_GPIO1C_DS_3); > +#endif > return 0; > } > -- > 2.17.1 >