From patchwork Thu Apr 30 07:04:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1139 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B33843F0D3 for ; Thu, 30 Apr 2020 09:04:56 +0200 (CEST) Received: by mail-pj1-f69.google.com with SMTP id bg6sf753106pjb.2 for ; Thu, 30 Apr 2020 00:04:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1588230295; cv=pass; d=google.com; s=arc-20160816; b=NLXkUThHy9k0UWyvpYjL+FiRmVG7amXUpnvpKuZn7BP5lp4QZ1YO0pdT+roCs+nfev FAPRLLESCAFZhLxNsa17gKwjizFKfrvannvj32TVwFsq+J8/x1Lqisv8yqfEd88hTvK8 Z2zxlu5wcGfmh5YhyGSluc+H+oB5ncZBM+GbsWWNHdH2YgJ6zvDPle7TlQyD4y8lSVuv jVTRj+qwZfjh2Dc2WF8MX9G13RL+zM8/p/I3hlTfXYpbepzR2/2ls9jIOjPJ4W2n9rfE wc6q5DOIV8BZPwIRTjZoKkAuKklrgJFge/QRFJQGjFcyzOZKTyqlkjBC02DwFNGUGW9s 7rJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=3uk7WbFwPnn5bSWx6grzL0bLvF6iawAkWU3My7DRDtM=; b=vKi3dW/pBvWomDajYd5ManN/G5lx6LblUWH8kdKszUM0M76MXAhLkmfwG/CrpHJxzz KU8t28T3LnCly5DYvViKfyatdz25At6FR2L5OLmAi+BKM6/ACJ/GNcfDOksryOA3s3Y6 WdDg8PpCw7NGIyMEfijZGp5oK7RYynlM3X6HcTD1cO9K+L7QWDvIm6G3m32XQUsDrqUu Langcr9KlCNkrP+BXwKp/WLIoYC78EhAMIlmsnCf/dm775YDIDytPIq7nEWskI12/712 2LgEhu03EN9zYj3argCRnhvppA0cOz6+w4ObNKijPErTCqVGDzdpfuQOJQOf81DcQwjK XYKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=S7DQppqD; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=3uk7WbFwPnn5bSWx6grzL0bLvF6iawAkWU3My7DRDtM=; b=W2P09PXeYmORV/bAc3qb53ZZ/17hZ3uqywoNGE0S/23Bmt1E8uPGy3+M8WBOduIoQR Q8EOsCem5kl/7ME3lMwYskkxJ5rMVlD/eZv6TSz6fbVXaC3Nf80zqrNjmpwJ2elj82mc jQluO7ulpXS80xWvuysWbo05QIAADurt6f1sc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=3uk7WbFwPnn5bSWx6grzL0bLvF6iawAkWU3My7DRDtM=; b=Rc3YvHp7pBZW7NtWToRyDKJ5C2BU3+4t4SMkrDUmMpIcH3shu9rv0S5sRr4IHRpcjv nOS8Ctie5FLH1ATBpiyBps3Kr5wBWFvMJUVCeq+tCvugg3kn4phgvEm33KJKMh+sNLFU TBdDdB9Rwgz2KSkONT9UQrumHZ25U9a7T3DCtgP3Xwrb5qA4jBDQfvBrVOpSw2mslL7U ghWXZ+Q/AFAAOq5KBPZncuj8JucH0MBZ2nkxzv5C8FlAHQm29R+oK59gs1jFFITaZEYG 9XFl0Tjy65RLWKRpjRGetMgV9CW2c6G/yJkgnH92K/BbpFFGTpPVHmMuJ/qOwltbeqGM xPtA== X-Gm-Message-State: AGi0PuaGVrhDBidWWSh7YMJvr0e0mWVO2FRMtPPepHQ3wTU0Flq2n4wU EtYco6/qiI1/ID+IMcvFrPVNbZgt X-Google-Smtp-Source: APiQypL9yJgb4slnbhoqnol3hFvp3JzJ1w534f0YLqMQn5c7eRBInwz+R/J4K3qtxofZiWJQKuf8IA== X-Received: by 2002:a17:90a:8a09:: with SMTP id w9mr1333955pjn.95.1588230295502; Thu, 30 Apr 2020 00:04:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b58d:: with SMTP id a13ls3128562pls.0.gmail; Thu, 30 Apr 2020 00:04:55 -0700 (PDT) X-Received: by 2002:a17:90a:bf12:: with SMTP id c18mr1233413pjs.180.1588230295044; Thu, 30 Apr 2020 00:04:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588230295; cv=none; d=google.com; s=arc-20160816; b=PYwgPoyKXcxhC7SK3ErVCxitMxodhnXpiOT/mfPs18Gi5bEIT8Y7Ksv76rc62t4El5 JkDycrfUTzwQWndbduOXH2783ZqSa3GSrqZxH7C4syaibfKZr51+W57mscdi7AR1HSlv DFWC3G6mpSodEhf4AwEcGe8FUno/3xOfAkGXq8XMKWdwNAyf/GP0lc1Dcx+jjbuxm2Vp MIt8hiQ80g2bg9soAhO+c6Tj0s/PlbsmyrpzIDoYgQlcdnrBo1QJTxlaAs592GnrT8Cw u9Aw+I3eFsjxb0jiJqrLqMSeKKtBZvBgFvc8mBsNXfVeyHWR3zUSSWR5DnhZjEN6xGGP vRMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DwfpjIE8nKMsbRS0x/+1oo0yx+ro2f51EemJbqL5udQ=; b=qYgPbU+thD3ULC0IWBBP2AQ+/1GR/S/U162fAy8PtOzy4pjEger+jq4eFDUdB4m19X McmQOxt0u6UIcwT1XHfZMEgRDzkN04bRxz3ile3GnuAY07s9d9a4nJvJcHxOOk3YLqvB jDg1pmv4KflgoGzfqYv1uZeExxeeO9qJ1oHosQWHUmjq+J4evPIiyTMtqKB9IhsxI4w6 parF0B2KK4J7rBVvVtrYSIvPqW18KerDUJqSB1z+IvF+ICm19BXRggkwoxqsNPhhggyq 9B/GGIvtZVx76kECTpZvfSppowxphrnfGAEktfvIlpmUicr9K9KtkvcXS826VNIGRcUh NZDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=S7DQppqD; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y65sor4653546pfg.12.2020.04.30.00.04.55 for (Google Transport Security); Thu, 30 Apr 2020 00:04:55 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:aa7:9d84:: with SMTP id f4mr2089513pfq.290.1588230294757; Thu, 30 Apr 2020 00:04:54 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:6514:3619:d1af:85f6]) by smtp.gmail.com with ESMTPSA id p64sm964143pjp.7.2020.04.30.00.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 00:04:53 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich Cc: patrick@blueri.se, sunil@amarulasolutions.com, u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , Tom Cubie , Manivannan Sadhasivam Subject: [PATCH v2 8/8] rockchip: Enable PCIe/M.2 on rock960 board Date: Thu, 30 Apr 2020 12:34:12 +0530 Message-Id: <20200430070412.12499-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200430070412.12499-1-jagan@amarulasolutions.com> References: <20200430070412.12499-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=S7DQppqD; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Due to some on board limitation rock960 PCIe works only with 1.8V IO domain. So, this patch enables grf io_sel explicitly to make PCIe/M.2 to work. Cc: Tom Cubie Cc: Manivannan Sadhasivam Signed-off-by: Jagan Teki Acked-by: Manivannan Sadhasivam --- Changes for v2: - none board/vamrs/rock960_rk3399/rock960-rk3399.c | 20 ++++++++++++++++++++ configs/rock960-rk3399_defconfig | 5 +++++ 2 files changed, 25 insertions(+) diff --git a/board/vamrs/rock960_rk3399/rock960-rk3399.c b/board/vamrs/rock960_rk3399/rock960-rk3399.c index 68a127b9ac..98d62e89ca 100644 --- a/board/vamrs/rock960_rk3399/rock960-rk3399.c +++ b/board/vamrs/rock960_rk3399/rock960-rk3399.c @@ -2,3 +2,23 @@ /* * Copyright (C) 2018 Manivannan Sadhasivam */ + +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r(void) +{ + struct rk3399_grf_regs *grf = + syscon_get_first_range(ROCKCHIP_SYSCON_GRF); + + /* BT565 is in 1.8v domain */ + rk_setreg(&grf->io_vsel, BIT(0)); + + return 0; +} +#endif diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig index c4e954731a..cb1ec3c26b 100644 --- a/configs/rock960-rk3399_defconfig +++ b/configs/rock960-rk3399_defconfig @@ -9,6 +9,7 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock960.dtb" +CONFIG_MISC_INIT_R=y CONFIG_DISPLAY_BOARDINFO_LATE=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_STACK_R=y @@ -19,6 +20,7 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y +CONFIG_CMD_PCI=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TIME=y CONFIG_CMD_PMIC=y @@ -36,10 +38,13 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_SDMA=y CONFIG_MMC_SDHCI_ROCKCHIP=y CONFIG_DM_ETH=y +CONFIG_NVME=y +CONFIG_PCI=y CONFIG_PMIC_RK8XX=y CONFIG_REGULATOR_PWM=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y +CONFIG_DM_RESET=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y