From patchwork Tue Jun 11 14:50:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 452 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 628B03F08F for ; Tue, 11 Jun 2019 16:51:58 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id e7sf2053752plt.13 for ; Tue, 11 Jun 2019 07:51:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264716; cv=pass; d=google.com; s=arc-20160816; b=la4XtrCpkSkJj1BYEFnX4Dwv4uPgzduhHt5arJ/GqcnPTFPJ7e9h6Izyz4ednQdYX5 VR9mLJ4QyLWc1LYpbQ15aE17tbrxVpZpZgmzwK0FqBrXc5B66N2iUwmuJg/NRenPMj49 R5G5GCUx0oFwBY7ILYnTAvLBT9FZ01aDlylIj3qSGrWCD8gyeMNSaNKr+5s2JE8FkGv5 cmnzC7yIcSGyA+yJZbsyiGACQnzRdketk0GDGlcF6RoVJikNKCamagcYJX3ksPFRIPme B8X8PBWFE12YaSddCyAQlysSkwVA7EjRyXqLIpuI0cal+NA0CvFEIOWvziMappaC4/rz tT+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=fbIOjBncaxjUy1ozd74sJdK4VqYBy8fhm0C/20q+hyY=; b=pLKPl5nikqLsgVSAfteCrSaLI/GA9McyNCZQbhQ8t+xVFFPMfOibMQc8rVno1u8HBV JFMjkohFPTpURtpYSwefjuqHuNHMsYBhPUDfQPKuGj4HKBnaB5wuq1+QwpdsYDkrxanp m6ZZzAMnQRCsB3CgAF+SSU8jA3KBBjimk65uPgJqWxkF37YkXzahZqj6iN7ifrsdbibZ euBYfKwIrHYoWN8f+3bVCs3pagBwZDSTU6Ge6cMP4kPtP5Sw5p7TH7DxBrRxVT4HoKzy 1AVpXTQOKAiMiJFOqwriVlS0OQLu0KTW4xLfRkzt8LhEyVxFuYZJEu7IImHhRY1mAPeq H5cQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=L+gvNvRU; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=fbIOjBncaxjUy1ozd74sJdK4VqYBy8fhm0C/20q+hyY=; b=PUDz+TeLD1vzpmOkEoxQccBKCDX5JjsfHCEfYuobEbyItgAM0+zmJM/9rHzkc4ulQS pxCFturqBjy+uJLqfh1GdfU3AHKoaXy2s/u7q1bYu0Chml8xJ/ni2yz5GJKCmaALE2ql owSFmFGkIxVBt2OfWPxVBP7UG59SJx3BmatB8= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=fbIOjBncaxjUy1ozd74sJdK4VqYBy8fhm0C/20q+hyY=; b=HkrAoqZLA2arLY2xvgihYimO/VlVSxROkUAG8RLAzFNn9HlSN/NcWhvqYyOPZ4vY4b mOMIjNV9hcHQMAHa2daybo5Gx5wAPE/LBVO+z1emqqHZphreVdIkzrnhfdjvQ3J/iV2W wz/+VSsNo/CgK0QN/yMFi/wz0xLhrtARa6O78ny0aiV8BxrdKEVM6wQ6Q//fv1AC/+Z9 cH180Dl+1/fhOo7KY/D4nx/l2LrwLotvZ4TaLe0VoWH7i9TPQnvibGS7pANF0dEdHQAB FS6itvd+OXHY6DkQR0iUXFL6QYsPMouA63UnsoBRsz3DS3+MI9AnwKm1ca+IDxct+pA6 +4zQ== X-Gm-Message-State: APjAAAVMoE0d0WeYGTdcxV5rImQokwIZhKyhIR7TRGtH6Kyp31I8YJou P/IJ7wWDS3QgPuQVyacOMZKp/mz2 X-Google-Smtp-Source: APXvYqyY3SsAnlIykx3620kkwE6rPKURREU/YxoILcFlf8c+MJd8MIR90tn1jD3ZEzqd38p3qCeNNw== X-Received: by 2002:a62:7994:: with SMTP id u142mr37443721pfc.39.1560264716331; Tue, 11 Jun 2019 07:51:56 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:28ca:: with SMTP id o193ls4494665pfo.10.gmail; Tue, 11 Jun 2019 07:51:56 -0700 (PDT) X-Received: by 2002:aa7:9834:: with SMTP id q20mr38460121pfl.196.1560264715872; Tue, 11 Jun 2019 07:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264715; cv=none; d=google.com; s=arc-20160816; b=tOp0kHHLYO7m0hTX+8vJs0jId1iQovFadhLGxDoRdVFuxh+FpL0Cb90IXZgNvfiti/ YW0we/UHyMYgkFhLu5g/rucsn57dxo9DDEKKo9lPVrspYwKSn5PsF7JrxGiDBY5gJfXq jrgOAooyplpakt+ZO5xE4ZMqDBRLstIyUBZ4zKgWNSOlNujrqjrSx9cBfTv8MWTlzTxl 3jxENcpXa8bQ7fZxBeT0+eJLsyJG/y9bwhrFnFueVcB4HCXiLPZ+i8hpZK1bV2mNhgDU TV/VwVHOgnZSkJ8l2+33ch87Ym785Q8YZEAXvKQ7d/X3Mi/s5XVx1vAfBMej4mJFa7Aj 5h6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=2PZmOlDxLIZ3hi1XK1/L5fS7ODHlI/voHjGPAwKMURw=; b=Dle7WOJWqkT5ptUMVVrJjCQi23VTo9xSr3iZ5S1YhMFXxb5r1I9aHxAOL/l5/7aODU 3cxJBD8MVSAElueNiMKfUgqNPbpnH7ee5evBQf9KnhdApG0QghyFoti+ckUxC+ntwwr1 0u/Fc8teYq0fdEtFqNbv7NaWF/V8Ejm68vUt7O9yw99V2wUh4jcj5uBMlsxGl4kc7iIL UD2AYVwvtgyr3BULuOBvuQZu5mPd6aku2+SnBa77yUr4T8OYlxVOANIqNzqPfx1+xMXr on3gSz6wgbIVmRqGou2NkVT8poYvCVwL/jD9sbdn1gXeKHQDNrCw1+cpdn3b3EboFscR sPvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=L+gvNvRU; 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 x10sor2902599pjn.26.2019.06.11.07.51.55 for (Google Transport Security); Tue, 11 Jun 2019 07:51: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:a17:90a:2486:: with SMTP id i6mr4806784pje.125.1560264715407; Tue, 11 Jun 2019 07:51:55 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.51.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:51:55 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 01/92] ram: rk3399: Fix code warnings Date: Tue, 11 Jun 2019 20:20:04 +0530 Message-Id: <20190611145135.21399-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=L+gvNvRU; 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: , Fix checkpatch warninigs on sdram_rk3399.c like - Avoid CamelCase - Unnecessary parentheses - Alignment should match open parenthesis - multiple blank lines - misspelled - spaces preferred around that '>>' Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 48 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 52518656c4..541e4a4b1e 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -47,7 +47,7 @@ struct dram_info { #define PRESET_GPIO0_HOLD(n) ((0x1 << (7 + 16)) | ((n) << 7)) #define PRESET_GPIO1_HOLD(n) ((0x1 << (8 + 16)) | ((n) << 8)) -#define PHY_DRV_ODT_Hi_Z 0x0 +#define PHY_DRV_ODT_HI_Z 0x0 #define PHY_DRV_ODT_240 0x1 #define PHY_DRV_ODT_120 0x8 #define PHY_DRV_ODT_80 0x9 @@ -150,7 +150,7 @@ static void set_memory_map(const struct chan_info *chan, u32 channel, ((16 - row) << 24)); /* PI_41 PI_CS_MAP:RW:24:4 */ clrsetbits_le32(&denali_pi[41], 0xf << 24, cs_map << 24); - if ((sdram_ch->rank == 1) && (sdram_params->base.dramtype == DDR3)) + if (sdram_ch->rank == 1 && sdram_params->base.dramtype == DDR3) writel(0x2EC7FFFF, &denali_pi[34]); } @@ -166,10 +166,10 @@ static void set_ds_odt(const struct chan_info *chan, u32 reg_value; if (sdram_params->base.dramtype == LPDDR4) { - tsel_rd_select_p = PHY_DRV_ODT_Hi_Z; + tsel_rd_select_p = PHY_DRV_ODT_HI_Z; tsel_wr_select_p = PHY_DRV_ODT_40; ca_tsel_wr_select_p = PHY_DRV_ODT_40; - tsel_idle_select_p = PHY_DRV_ODT_Hi_Z; + tsel_idle_select_p = PHY_DRV_ODT_HI_Z; tsel_rd_select_n = PHY_DRV_ODT_240; tsel_wr_select_n = PHY_DRV_ODT_40; @@ -181,10 +181,10 @@ static void set_ds_odt(const struct chan_info *chan, ca_tsel_wr_select_p = PHY_DRV_ODT_48; tsel_idle_select_p = PHY_DRV_ODT_240; - tsel_rd_select_n = PHY_DRV_ODT_Hi_Z; + tsel_rd_select_n = PHY_DRV_ODT_HI_Z; tsel_wr_select_n = PHY_DRV_ODT_34_3; ca_tsel_wr_select_n = PHY_DRV_ODT_48; - tsel_idle_select_n = PHY_DRV_ODT_Hi_Z; + tsel_idle_select_n = PHY_DRV_ODT_HI_Z; } else { tsel_rd_select_p = PHY_DRV_ODT_240; tsel_wr_select_p = PHY_DRV_ODT_34_3; @@ -294,7 +294,7 @@ static void set_ds_odt(const struct chan_info *chan, } static int phy_io_config(const struct chan_info *chan, - const struct rk3399_sdram_params *sdram_params) + const struct rk3399_sdram_params *sdram_params) { u32 *denali_phy = chan->publ->denali_phy; u32 vref_mode_dq, vref_value_dq, vref_mode_ac, vref_value_ac; @@ -423,7 +423,6 @@ static int phy_io_config(const struct chan_info *chan, /* PHY_939 PHY_PAD_CS_DRIVE */ clrsetbits_le32(&denali_phy[939], 0x7 << 14, mode_sel << 14); - /* speed setting */ if (sdram_params->base.ddr_freq < 400) speed = 0x0; @@ -492,7 +491,7 @@ static int pctl_cfg(const struct chan_info *chan, u32 channel, setbits_le32(&denali_pi[0], START); setbits_le32(&denali_ctl[0], START); - /* Wating for phy DLL lock */ + /* Waiting for phy DLL lock */ while (1) { tmp = readl(&denali_phy[920]); tmp1 = readl(&denali_phy[921]); @@ -547,12 +546,12 @@ static int pctl_cfg(const struct chan_info *chan, u32 channel, /* PHY_DLL_RST_EN */ clrsetbits_le32(&denali_phy[957], 0x3 << 24, 0x2 << 24); - /* Wating for PHY and DRAM init complete */ + /* Waiting for PHY and DRAM init complete */ tmp = get_timer(0); do { if (get_timer(tmp) > timeout_ms) { pr_err("DRAM (%s): phy failed to lock within %ld ms\n", - __func__, timeout_ms); + __func__, timeout_ms); return -ETIME; } } while (!(readl(&denali_ctl[203]) & (1 << 3))); @@ -569,7 +568,7 @@ static void select_per_cs_training_index(const struct chan_info *chan, u32 *denali_phy = chan->publ->denali_phy; /* PHY_84 PHY_PER_CS_TRAINING_EN_0 1bit offset_16 */ - if ((readl(&denali_phy[84])>>16) & 1) { + if ((readl(&denali_phy[84]) >> 16) & 1) { /* * PHY_8/136/264/392 * phy_per_cs_training_index_X 1bit offset_24 @@ -646,7 +645,7 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, if ((((tmp >> 11) & 0x1) == 0x1) && (((tmp >> 13) & 0x1) == 0x1) && (((tmp >> 5) & 0x1) == 0x0) && - (obs_err == 0)) + obs_err == 0) break; else if ((((tmp >> 5) & 0x1) == 0x1) || (obs_err == 1)) @@ -700,7 +699,7 @@ static int data_training_wl(const struct chan_info *chan, u32 channel, if ((((tmp >> 10) & 0x1) == 0x1) && (((tmp >> 13) & 0x1) == 0x1) && (((tmp >> 4) & 0x1) == 0x0) && - (obs_err == 0)) + obs_err == 0) break; else if ((((tmp >> 4) & 0x1) == 0x1) || (obs_err == 1)) @@ -759,7 +758,7 @@ static int data_training_rg(const struct chan_info *chan, u32 channel, if ((((tmp >> 9) & 0x1) == 0x1) && (((tmp >> 13) & 0x1) == 0x1) && (((tmp >> 3) & 0x1) == 0x0) && - (obs_err == 0)) + obs_err == 0) break; else if ((((tmp >> 3) & 0x1) == 0x1) || (obs_err == 1)) @@ -955,8 +954,10 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= (info->rank - 1) << SYS_REG_RANK_SHIFT(channel); sys_reg |= (info->col - 9) << SYS_REG_COL_SHIFT(channel); sys_reg |= info->bk == 3 ? 0 : 1 << SYS_REG_BK_SHIFT(channel); - sys_reg |= (info->cs0_row - 13) << SYS_REG_CS0_ROW_SHIFT(channel); - sys_reg |= (info->cs1_row - 13) << SYS_REG_CS1_ROW_SHIFT(channel); + sys_reg |= (info->cs0_row - 13) << + SYS_REG_CS0_ROW_SHIFT(channel); + sys_reg |= (info->cs1_row - 13) << + SYS_REG_CS1_ROW_SHIFT(channel); sys_reg |= (2 >> info->bw) << SYS_REG_BW_SHIFT(channel); sys_reg |= (2 >> info->dbw) << SYS_REG_DBW_SHIFT(channel); @@ -991,7 +992,7 @@ static void dram_all_config(struct dram_info *dram, } static int switch_to_phy_index1(struct dram_info *dram, - const struct rk3399_sdram_params *sdram_params) + const struct rk3399_sdram_params *sdram_params) { u32 channel; u32 *denali_phy; @@ -1026,7 +1027,7 @@ static int switch_to_phy_index1(struct dram_info *dram, denali_phy = dram->chan[channel].publ->denali_phy; clrsetbits_le32(&denali_phy[896], (0x3 << 8) | 1, 1 << 8); ret = data_training(&dram->chan[channel], channel, - sdram_params, PI_FULL_TRAINING); + sdram_params, PI_FULL_TRAINING); if (ret) { debug("index1 training failed\n"); return ret; @@ -1116,8 +1117,8 @@ static int conv_of_platdata(struct udevice *dev) int ret; ret = regmap_init_mem_platdata(dev, dtplat->reg, - ARRAY_SIZE(dtplat->reg) / 2, - &plat->map); + ARRAY_SIZE(dtplat->reg) / 2, + &plat->map); if (ret) return ret; @@ -1199,8 +1200,8 @@ static int rk3399_dmc_probe(struct udevice *dev) priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); debug("%s: pmugrf=%p\n", __func__, priv->pmugrf); priv->info.base = CONFIG_SYS_SDRAM_BASE; - priv->info.size = rockchip_sdram_size( - (phys_addr_t)&priv->pmugrf->os_reg2); + priv->info.size = + rockchip_sdram_size((phys_addr_t)&priv->pmugrf->os_reg2); #endif return 0; } @@ -1218,7 +1219,6 @@ static struct ram_ops rk3399_dmc_ops = { .get_info = rk3399_dmc_get_info, }; - static const struct udevice_id rk3399_dmc_ids[] = { { .compatible = "rockchip,rk3399-dmc" }, { } From patchwork Tue Jun 11 14:50:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 453 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CE5773F08F for ; Tue, 11 Jun 2019 16:52:01 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id 91sf7894899pla.7 for ; Tue, 11 Jun 2019 07:52:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264720; cv=pass; d=google.com; s=arc-20160816; b=Z3sJ/b2mM5GaMZMpC/O6NLlyjzCv3hdNu1dUVp016xHS/77qqlYHorQ+yLJj73VnT/ QoISXgEH50++TSl810Yww7SJZJUKjYTRBz3soI6SQsd9HZx/IoTTStRlkdntlW+KOUsy Deg/Kvrv2L5IBBtZr9X7fTGxHFgLWa3GbLI8C9hPEONxuPIBjHAkSEvfda4JJDe6JHI3 9AaNH7dCTdNdo6eQ7Sl9TXEy8H0h6sUvwprUWektf3LVUa3SR8GmcY0Zc8+mYNlCohTX z38cX3yNPxO9uTLM4doD2jQjybYBgD0Ri3hpWgZg/NAdl7IK9smicWldFfhYemv6pv3Z SJmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=c5feP0BTo6d08Q3F9Cd6a/XpsOp/G+uGq1D/UFpi5a0=; b=FO80zIF91JdDbdeqVDEzsOLFX8ua1ZbaVMGAgRuk5AKIjZJon00X7uU2bQ6xeuImqt 2DVZ49PdtSv008UWUffuKXwf+sdC3BIpgPPgF3gczuYtCr0vfSapCV7evmbyg5+7VyMC r/UBUIqzaH6lDF3y1vMnJCivtP/wgs9Rnm0vKN0BBwOBrFZEXs3FUPDee26DH4P9PHpU huiFDh3244KhnxiSGFwJUzWYnaq7GKy7F6nwn7M3sNdsYHOSE+9PMioewhNhBfbOIrhm puIjQ0javkXSxFIhZ7O2NJR9SokmJR3inWwq92L/k6ZsYxaf13HmURU7P2ORp+Q3auGE oyHA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hRcyNLu2; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=c5feP0BTo6d08Q3F9Cd6a/XpsOp/G+uGq1D/UFpi5a0=; b=H2OPtFT207thUf6YGp3aIbeMhNOPcoYA3ZdGNy55ajEhgHAFfKgqR82zRSiXztfJ1A Z1RyT8vAe36KRePQEADunGYxsQJ6f5DjncTafyCnu5hA1qNl96ePf6VK6Oj1WHyhkMA/ dOP3gChzCh90LW+LRBbZwAMil/n4IqKH27tJI= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=c5feP0BTo6d08Q3F9Cd6a/XpsOp/G+uGq1D/UFpi5a0=; b=bXOP4e30xP+FIQ9JS5QihoMei7kz93VZDOBcHJiKm+JmvtugJe+oBo6kFthBdGc+pa uP2p54A2fBVBpmFgez4haPfVZkUK7SpPurmyNpFPROO+N9OV4gpJ2w28nmoazPdJxbc1 8//9+24mUg4MU1YIq4JsjzSJd2YJBSJ8Ldrw+O/8E40KKs45iOv0T2rytGcAOSZuiKr0 0IPIztkuOAdOPgKMpn2jx90wK9pHASBwfzWtDSAz7Xqwc+8TFXITYMTN041QhzBFoFYL iZMJR2PnE+BKT4AIntEKr0Lnd/IBcw/k7Tc3IqDWhqw2JzbagrPwPNzf1tMn3bFk5s5E dheg== X-Gm-Message-State: APjAAAXZCtApD4yJxV9wfzi1U9CvAoJwWuWx4NR+Ijb4jwtqUY7AH3Ev sP91GpUfa+tSzIUojsZ0gTEcsI/2 X-Google-Smtp-Source: APXvYqynKFBds9m8NAwzhhT3pgCzp7hb8stAygVHvydYRznsXKp1Dsm+ZI8UB46BTDtB+isYgVDRlg== X-Received: by 2002:a17:90a:3ac2:: with SMTP id b60mr27628469pjc.74.1560264720303; Tue, 11 Jun 2019 07:52:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:de4d:: with SMTP id y13ls4509628pgi.12.gmail; Tue, 11 Jun 2019 07:51:59 -0700 (PDT) X-Received: by 2002:a62:2506:: with SMTP id l6mr80318903pfl.250.1560264719834; Tue, 11 Jun 2019 07:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264719; cv=none; d=google.com; s=arc-20160816; b=IZXnkqc62pizqvOovt7JhQf59AQP75OGuGjjpKxGfRSdRruhBnElBU1N4FEsjWAU34 Zy+ODScBvVfBuwjDR6cdpehLmx+RWAOHMTb40mAgztlpEzrbOWDwqnu6s7xlZSeGwlgW D8y3nw9PVfTzG7w0bbMj2ONFQEA1TxUbAhPUX94S+diCVncIdCyW51ThwMs2DOuVC1Io X/1g8FY7reiArIRotX4bpKagTLMSQURd4dHqscyKIUHKPHaabZIIFN1C5NvTHnb9dcC4 Cdm4/q4L5qAgWCysVI/MeR0tJPb11y0vo1Aj6GDPil1LwReO2AknWSyOoFRsJwB9hB3A D2aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=kUf6hry55EpeltHbc57IsStxotQiI0hZiJt888uW2bg=; b=EZzeDp5NOZgn+En7RQMipyDgolQQol5kv2pK6jTY4CX+XENFJc3sAAKtOnzRAJ0Fil soX6ZQtx8aS4y4w1BEWrCLGM6ZoVD562ki0rTHv1YegvYYxIrap6uyuuq0/uOoVhC7zN DhrPfwi/j995SNnAdxsFe8+QT0I8WJ7c+Yn6NyUSghXgrWthxWCt5yEuSqTwJP5CuGtE 3TB4+iDh1dhjO8kz42KBGf5R1VViLijHCcP9Km1pnWNcfHGcgVExscOylMYkyMYIet3T lHl8OEdsxgkfEluWOC/wlNNAmDpv4XHR1eA8iIz54Mdecj4mC1wSLn8XyiKFQc+5rYzq H/fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hRcyNLu2; 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 m32sor15404852pld.47.2019.06.11.07.51.59 for (Google Transport Security); Tue, 11 Jun 2019 07:51:59 -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:a17:902:be10:: with SMTP id r16mr14753578pls.294.1560264719523; Tue, 11 Jun 2019 07:51:59 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.51.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:51:58 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 02/92] ram: rk3399: Add space between string with format specifier Date: Tue, 11 Jun 2019 20:20:05 +0530 Message-Id: <20190611145135.21399-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hRcyNLu2; 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: , Add space between string with format specifier on missing print and debug calls. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 541e4a4b1e..8191ab6176 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1180,7 +1180,7 @@ static int rk3399_dmc_init(struct udevice *dev) } ret = sdram_init(priv, params); if (ret < 0) { - printf("%s DRAM init failed%d\n", __func__, ret); + printf("%s DRAM init failed %d\n", __func__, ret); return ret; } @@ -1198,7 +1198,7 @@ static int rk3399_dmc_probe(struct udevice *dev) struct dram_info *priv = dev_get_priv(dev); priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); - debug("%s: pmugrf=%p\n", __func__, priv->pmugrf); + debug("%s: pmugrf = %p\n", __func__, priv->pmugrf); priv->info.base = CONFIG_SYS_SDRAM_BASE; priv->info.size = rockchip_sdram_size((phys_addr_t)&priv->pmugrf->os_reg2); From patchwork Tue Jun 11 14:50:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 454 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0BD073F08F for ; Tue, 11 Jun 2019 16:52:07 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id bc12sf7907266plb.0 for ; Tue, 11 Jun 2019 07:52:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264725; cv=pass; d=google.com; s=arc-20160816; b=AfLlFDlx8jWdwJ9c+hun1nny4UADkdcLv+cYZkbrFmnWQoBQxbnH8x+7e/u1rjJfEw mNduBwiB53QxX2pnH2hxDF+/qPKSttCWal9Wfn2Qfsvbeu2vlAJ0t3oXdFcjXSpYsSPT mOgRS/K/xQpnN5ryLpUvi+ZBF3fIb6m00bmlju3nvPqFStkL9up4Lt24OvqkcOofin8i 9MiK4mrh5+Ob+Ckss2KiHQnUMyqNtvPRWIofxh6+Sev5uFlB1fvq5wqIU3reKQfhofvp aIeZgWkcWLj4OSVwL6B/i0J3HaBUtCwJqJqnGMbRVN78A+oyBLobJ4V5ZMWO7PjP+1Tk 0qZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pNCLqFqvR1utyzlR4/p21+CwUReBJRYJ31ZtnOkKn/A=; b=YSEosTvSWX5JqLiumlHMkiX8WJakD53qEFJVZMVgOnK8hlZV9kQffjpR81NYXYlC2S XxhVo495QxeuigxGp+QiAKAAER1bJ8xmxK7yNvl+vW01ggQoYVA7822rrTEyG5fTh6fk 3PCB+0u64M49sMS5LdWgc8RIroFIVSlTjLUUEe2RfTjf0uIdc/qc8Ha/pHWjpAFjd7ol uOBYCTEPXeQoEKdgRYGF1RlAoOs5t6EpPACG6escpO5bkIP0mawUDtWhz8a83Ui0iYuo E/wQdsPz46Vp6dDNpvYp9rA1yQX9kXEKE7asuWsWJetdP9PTdBxqiD7IUeCWVE8PsC92 4xOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=enuhfKBC; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=pNCLqFqvR1utyzlR4/p21+CwUReBJRYJ31ZtnOkKn/A=; b=jsDZHS/B5d2Kip7PH3v2mHEkaI79Xelfcw2I+Ew/Xa2fn9JB8rv27AOGvkYOvjLM+d n4P3Korm0WYsLi+355RRidOTEe2RymCI3Ba5X1TZgdmIKjt1iFsAxNd6H2Cqy+PDh8cR Z/dV4K2Q/N2lgW2LE59YqL7uec6A6Wn4xT26Y= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=pNCLqFqvR1utyzlR4/p21+CwUReBJRYJ31ZtnOkKn/A=; b=PvQgW6M5wIHSPJGe3883XbnV1Hwe4hU5W/uNwNgfo4K//tQl/MSsa9P+rfneCOLuGx jiQbLntYu+sGx/pUUamo0gPtbCxYBHKQzFw6PhBELBQ6xU58zdk82wu3jqnoyaPL2c6i js+arKh+qJQXDHfqN0DQzMzhFj91/7LYIMaiRMyd7UQJRBmYj7yn00tgyuaA7a17FsEi I7B7Z3/onN3DhLsZVck8HdcFn/UY6RGpD7LhoqS6Uby8FU2Qkp+dIBJV4FHgFetJo51S HSmtHldI7wH5IClJtizB44rZQoVskqt+TT5zk6owAEsngxp7z2Vggxk4YqLYK4PINPxN WqUA== X-Gm-Message-State: APjAAAU7vR7oyXjIzcUfSrF/z7tWeDnuxkCzGacgVnZXTnbyIFdcTPsA 6OD7eMfajaTNH4m1TCCD+ikiAkVW X-Google-Smtp-Source: APXvYqyk0ADYPHo3mbsuMPlvJRWd8PuHXs7ZEd/Z//tYvfXFLCfHTn5Ok41gK+uLXP8VzwmbbxXB1g== X-Received: by 2002:a62:b609:: with SMTP id j9mr65939597pff.145.1560264725829; Tue, 11 Jun 2019 07:52:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a986:: with SMTP id bh6ls4896706plb.8.gmail; Tue, 11 Jun 2019 07:52:04 -0700 (PDT) X-Received: by 2002:a17:90a:8985:: with SMTP id v5mr26828813pjn.136.1560264723960; Tue, 11 Jun 2019 07:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264723; cv=none; d=google.com; s=arc-20160816; b=bLQHZxdd2CuVnrHNaPz51Qto2xAmrsOL73JSBJRLjooZdK0Mu3pGqcI+45pVwWAuju RM3Em5vV4PDHqFzPp5Y8vTcHE9RgqkMLQNcsn/fjXcOvezUJ2jxRjsENqXQrH/BWbqOh lTeK3rpGriCe/yy/NneLrAMLNFHkmFbd2pDCsFhKoK0kGBECawdcTfYpj16SE/TIZz8i s1DfxDMJSF05AgUO8lRYnhDuihY0McYN4C9K7f7PncIfbSZPZCgGDlJJfO/MkvxjmyAr A71Ss2vxdSoV9u5jfmDmQxVGHEKoyK1Kj8pgL1gbscwE3auEj4u5BQOC76kaLmc3lQ6b foHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=HMxONh/KgJVsT04KApNrzG3DAJ+oZ016DpNMV5h196I=; b=we5Z9Cthm3+gT4Bx+G7F5NEXe2Wbb2ftuAEO3jjsexlQmRxdiKpYrOjBNc/aggdFX3 H1BrNcsJu47JA3UoaUDZT3DtXcHDtqKR1mUXTsbUT3atmqBfysd20Sw+POXdOYF0H2dL TP8qUwwASID3whBCRPWGhoaB3acuOtxzaEr9mcxJ3eDeECS3S+1MkgzVW9YeY7/kcD9/ OTGUSFGj9f0knAdjvpXEu/6aXrqEvTj/ek9/oSMjKFnjhcw0eN1gwFFIKIKyx5A7aWlP w29O7iToHnBDeT2ZitBQNr3ybsgN4zaTNGCUxvogRfBaFPHXTjwwbqjUAvnGd0uQi4CL UkDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=enuhfKBC; 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 35sor11862721pgn.16.2019.06.11.07.52.03 for (Google Transport Security); Tue, 11 Jun 2019 07:52:03 -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:a65:42c3:: with SMTP id l3mr20774745pgp.372.1560264723534; Tue, 11 Jun 2019 07:52:03 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.51.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:02 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 03/92] ram: rk3399: Add proper spaces in data training Date: Tue, 11 Jun 2019 20:20:06 +0530 Message-Id: <20190611145135.21399-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=enuhfKBC; 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: , Add proper spaces in the code of data training functions. No functionality change. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 8191ab6176..b0850a88a0 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -620,8 +620,10 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); + /* PI_100 PI_CALVL_EN:RW:8:2 */ clrsetbits_le32(&denali_pi[100], 0x3 << 8, 0x2 << 8); + /* PI_92 PI_CALVL_REQ:WR:16:1,PI_CALVL_CS:RW:24:2 */ clrsetbits_le32(&denali_pi[92], (0x1 << 16) | (0x3 << 24), @@ -651,9 +653,11 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, (obs_err == 1)) return -EIO; } + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); } + clrbits_le32(&denali_pi[100], 0x3 << 8); return 0; @@ -670,8 +674,10 @@ static int data_training_wl(const struct chan_info *chan, u32 channel, for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); + /* PI_60 PI_WRLVL_EN:RW:8:2 */ clrsetbits_le32(&denali_pi[60], 0x3 << 8, 0x2 << 8); + /* PI_59 PI_WRLVL_REQ:WR:8:1,PI_WRLVL_CS:RW:16:2 */ clrsetbits_le32(&denali_pi[59], (0x1 << 8) | (0x3 << 16), @@ -705,6 +711,7 @@ static int data_training_wl(const struct chan_info *chan, u32 channel, (obs_err == 1)) return -EIO; } + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); } @@ -726,8 +733,10 @@ static int data_training_rg(const struct chan_info *chan, u32 channel, for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); + /* PI_80 PI_RDLVL_GATE_EN:RW:24:2 */ clrsetbits_le32(&denali_pi[80], 0x3 << 24, 0x2 << 24); + /* * PI_74 PI_RDLVL_GATE_REQ:WR:16:1 * PI_RDLVL_CS:RW:24:2 @@ -764,9 +773,11 @@ static int data_training_rg(const struct chan_info *chan, u32 channel, (obs_err == 1)) return -EIO; } + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); } + clrbits_le32(&denali_pi[80], 0x3 << 24); return 0; @@ -781,8 +792,10 @@ static int data_training_rl(const struct chan_info *chan, u32 channel, for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); + /* PI_80 PI_RDLVL_EN:RW:16:2 */ clrsetbits_le32(&denali_pi[80], 0x3 << 16, 0x2 << 16); + /* PI_74 PI_RDLVL_REQ:WR:8:1,PI_RDLVL_CS:RW:24:2 */ clrsetbits_le32(&denali_pi[74], (0x1 << 8) | (0x3 << 24), @@ -805,9 +818,11 @@ static int data_training_rl(const struct chan_info *chan, u32 channel, else if (((tmp >> 2) & 0x1) == 0x1) return -EIO; } + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); } + clrbits_le32(&denali_pi[80], 0x3 << 16); return 0; @@ -822,13 +837,16 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); + /* * disable PI_WDQLVL_VREF_EN before wdq leveling? * PI_181 PI_WDQLVL_VREF_EN:RW:8:1 */ clrbits_le32(&denali_pi[181], 0x1 << 8); + /* PI_124 PI_WDQLVL_EN:RW:16:2 */ clrsetbits_le32(&denali_pi[124], 0x3 << 16, 0x2 << 16); + /* PI_121 PI_WDQLVL_REQ:WR:8:1,PI_WDQLVL_CS:RW:16:2 */ clrsetbits_le32(&denali_pi[121], (0x1 << 8) | (0x3 << 16), @@ -845,9 +863,11 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, else if (((tmp >> 6) & 0x1) == 0x1) return -EIO; } + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); } + clrbits_le32(&denali_pi[124], 0x3 << 16); return 0; From patchwork Tue Jun 11 14:50:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 455 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id EF12C3F08F for ; Tue, 11 Jun 2019 16:52:08 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id r142sf8476987pfc.2 for ; Tue, 11 Jun 2019 07:52:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264727; cv=pass; d=google.com; s=arc-20160816; b=zdY1NiD5wyLxBIdZM0g6HhKD8mwVlFpWGGaYSwKMEZEWF7ZQpQwwMpXGjY0xLN1gP7 uO2RpX4tNJYEgftKbunBr0v3lWVNaH2JFyXCMfmR8UQR18rAJ88pn12BhH0QFOqL8CYC bdRe+GXDRzmPsK8+KRoL0nSS8qNce0XP+sdYOCSld92ogqo7OTcyEmc9IwhHk/fYkLJa UG23W4/31dfvrBJsi+XzMbgwI1J4R4erZ4boToN1PIwU8dVXkNqv9bg9S3qixdQgT0XF +30jsH36Ye1oR0pobGndGXqPLR6bMafEUXwwvo4h48J2FLsMHZw9+MOMwTUpUhriPjZE mBKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=EQV5z0VNSwoldd4WmtLzc8rWozgx7ckKdWDGBckG068=; b=sd1LkIH7e2cS8GCNXOZjlBPoxW6ch1mzfaUQdCSVA/tiahOKV05FTB6AV7/P7w2Qtq OMJ1IOabR70eBI/WRllKSX2gnf5xHnmqmjkZx5Ejt+abj987GeNc10jV+vjzjJrGynav 0MagoIbM9NcBe0P1CjFGXAREdJJRQ6XdzsRg1Bm0FwjEonPqnifRwZsXVAEjW6fK0HFS 0QSKbJ6YsBSCvW1JEN95S/uDktHmANXa2quiNzmh1CjRndYl5pVnZEj1QOJqOmQLWaGE 8FuK+7FbiKoGncoj8FXlPGlFrtw0HqwBCbm4mshJkcDoWROzCpVa2n03LHG+3Sbru27Z sPLQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CQOq0WLR; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=EQV5z0VNSwoldd4WmtLzc8rWozgx7ckKdWDGBckG068=; b=XykjU5UYUIDt5m06pZj2v/jLcYQOefwfP2uU57sQh2iAasV85MjTXmdT54fOzjB242 xv5o3SarUIhlfXEPEx3xxNeJKAvU//pYAFieZTRbl3I9MgQ1aQ4H+rF7C2BABscxYZ7F OJvnIRMrzTmy7FlQxX+iCYJzAot0C29mNrOGI= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=EQV5z0VNSwoldd4WmtLzc8rWozgx7ckKdWDGBckG068=; b=IOOJYlHUHQP0GIdRdKy2lgxDLtISUurhMx/K/u38gk6bLtKmKvmVGfSkcZ98pg2mc8 yNqcq2YEXs6v/XGGVKhQmYvabmlkSrtyGDUa1KONUtZOey6AgaHQsmmJ2oMqb4VA0Vxg 5hMdDtfvDTf0bsxl/m+vxtp+u+2N05FY30I/nJb5PRtgrdGH+dc/71sbcv/I+W2m+G5g FM1Z112odKlwxNcHhu0ADSiJc4JaBEYcvzKMYR1g4iqkScyPjbLLIHNa6MsuUyM11qTJ hahf+fm7DquFWp/G9W8NViOe626jVurDB3aW7oQ/Q+aH5IZZk68CAZEeb9OfQSlT7mzT wwhQ== X-Gm-Message-State: APjAAAVDHGM2Puw9fB9Exy3M1HjZtlD4RVS27kXb9oi1Z2FLP1AxeVRY TuElcncxSoNMl8oRitzGSn5HFTG7 X-Google-Smtp-Source: APXvYqxCZk56rlL9peKtPams09JAPxDW/XfzD6bg6xf+VnjpdDkPDjaV86wFw/Y76r4aq4jxqT9tiQ== X-Received: by 2002:a62:58c4:: with SMTP id m187mr23170457pfb.147.1560264727803; Tue, 11 Jun 2019 07:52:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:22cd:: with SMTP id s71ls862243pjc.1.gmail; Tue, 11 Jun 2019 07:52:07 -0700 (PDT) X-Received: by 2002:a17:90a:ff03:: with SMTP id ce3mr27025326pjb.81.1560264727405; Tue, 11 Jun 2019 07:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264727; cv=none; d=google.com; s=arc-20160816; b=0ar9W2ZFuyksyonVa2r4NKY8YExwObMGz2vk4rmxexS4ltRoKe8GP4Rfuwv+RpvYz4 obU8q9EKIAEvRjbcJrBAFJ1orvwtNwkd+xx34It1gflug9L2iqzOzTSetoODIzCkQs7J q9YfOM4lVmXuYsZNBYFRSwbt2atWJWFbs0VjppbR9RvYsVympEqO0WZ2IwSUvMRe9fTS IjH0b3X2Jfos5wiuJg9mtpNvP22N2h5UfvZV9Nxr1UmL1T/6oANl0SI76g1j2mBT5ug3 DGJ2xr1Xmu8uuFP9eLF9JwP8wnI217rA3Z+zWGzA+QMjOehTJ2AZKuY6UAbn5Ypdp8D/ PHpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=WeG8VUoLmUE+nNNbNtlE+5aIWXzGf93n9z29VHP2zqo=; b=WKTuKpFhpauWCO90Ov/IRacMHx20J/+HU038IzlxTzHCzH2jBtjnPoq5aREgp62Wab yq4oSdE3KXdi/l9J7M1TQrLwHA/eikxM2NZ7eblU2DvENPqsCgMOa9yDOgwhS7in16nX 7UJWqJcw6p7wuxZQQDy62IS7btFTqRkgeCBM0eGrVYSNC+ADOcn7K8BzbtB51SFysWwY q20raLoduB9HNAVz+mO/N9vUjIkSK4uVC2GgP14YOHTyTVPLcEY0haeQmgPQUpWVptTj wbNYUm2q9EztkesCYLNGCcBhQM9D0UmV0IxY+HTFIhmMmFykaYkNcda1QmFSl3WMPpJz NTGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CQOq0WLR; 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 x27sor6358120pfo.43.2019.06.11.07.52.07 for (Google Transport Security); Tue, 11 Jun 2019 07:52:07 -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:a62:fb0a:: with SMTP id x10mr58130760pfm.224.1560264727114; Tue, 11 Jun 2019 07:52:07 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:06 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 04/92] ram: rk3399: Handle data training return types Date: Tue, 11 Jun 2019 20:20:07 +0530 Message-Id: <20190611145135.21399-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CQOq0WLR; 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: , data trainings calls like ca, wl, rg, rl, wdql have proper return types with -EIO and the return type missed to handle in data_training function. This patch, add proper return type checks along with useful debug statement on each data training calls. Incidentally this would help to prevent the sdram initialization hang for single channel dram and when the code is trying to initialize second channel with proper return type of relevant data training call might failed. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 50 ++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index b0850a88a0..73732e0767 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -878,6 +878,7 @@ static int data_training(const struct chan_info *chan, u32 channel, u32 training_flag) { u32 *denali_phy = chan->publ->denali_phy; + int ret; /* PHY_927 PHY_PAD_DQS_DRIVE RPULL offset_22 */ setbits_le32(&denali_phy[927], (1 << 22)); @@ -898,24 +899,49 @@ static int data_training(const struct chan_info *chan, u32 channel, } /* ca training(LPDDR4,LPDDR3 support) */ - if ((training_flag & PI_CA_TRAINING) == PI_CA_TRAINING) - data_training_ca(chan, channel, sdram_params); + if ((training_flag & PI_CA_TRAINING) == PI_CA_TRAINING) { + ret = data_training_ca(chan, channel, sdram_params); + if (ret < 0) { + debug("%s: data training ca failed\n", __func__); + return ret; + } + } /* write leveling(LPDDR4,LPDDR3,DDR3 support) */ - if ((training_flag & PI_WRITE_LEVELING) == PI_WRITE_LEVELING) - data_training_wl(chan, channel, sdram_params); + if ((training_flag & PI_WRITE_LEVELING) == PI_WRITE_LEVELING) { + ret = data_training_wl(chan, channel, sdram_params); + if (ret < 0) { + debug("%s: data training wl failed\n", __func__); + return ret; + } + } /* read gate training(LPDDR4,LPDDR3,DDR3 support) */ - if ((training_flag & PI_READ_GATE_TRAINING) == PI_READ_GATE_TRAINING) - data_training_rg(chan, channel, sdram_params); + if ((training_flag & PI_READ_GATE_TRAINING) == PI_READ_GATE_TRAINING) { + ret = data_training_rg(chan, channel, sdram_params); + if (ret < 0) { + debug("%s: data training rg failed\n", __func__); + return ret; + } + } /* read leveling(LPDDR4,LPDDR3,DDR3 support) */ - if ((training_flag & PI_READ_LEVELING) == PI_READ_LEVELING) - data_training_rl(chan, channel, sdram_params); + if ((training_flag & PI_READ_LEVELING) == PI_READ_LEVELING) { + ret = data_training_rl(chan, channel, sdram_params); + if (ret < 0) { + debug("%s: data training rl failed\n", __func__); + return ret; + } + } /* wdq leveling(LPDDR4 support) */ - if ((training_flag & PI_WDQ_LEVELING) == PI_WDQ_LEVELING) - data_training_wdql(chan, channel, sdram_params); + if ((training_flag & PI_WDQ_LEVELING) == PI_WDQ_LEVELING) { + ret = data_training_wdql(chan, channel, sdram_params); + if (ret < 0) { + debug("%s: data training wdql failed\n", __func__); + return ret; + } + } /* PHY_927 PHY_PAD_DQS_DRIVE RPULL offset_22 */ clrbits_le32(&denali_phy[927], (1 << 22)); @@ -1048,7 +1074,7 @@ static int switch_to_phy_index1(struct dram_info *dram, clrsetbits_le32(&denali_phy[896], (0x3 << 8) | 1, 1 << 8); ret = data_training(&dram->chan[channel], channel, sdram_params, PI_FULL_TRAINING); - if (ret) { + if (ret < 0) { debug("index1 training failed\n"); return ret; } @@ -1093,7 +1119,7 @@ static int sdram_init(struct dram_info *dram, if (data_training(chan, channel, sdram_params, PI_FULL_TRAINING)) { - printf("SDRAM initialization failed, reset\n"); + printf("%s: data training failed\n", __func__); return -EIO; } From patchwork Tue Jun 11 14:50:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 456 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5935C3F08F for ; Tue, 11 Jun 2019 16:52:13 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id e7sf2054021plt.13 for ; Tue, 11 Jun 2019 07:52:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264732; cv=pass; d=google.com; s=arc-20160816; b=Hx9qH7ENphMtjcpmYhMr7EJ+xBPCnQSuRIbLF/qqAWj173OYDzlZI+P48lOa29N3Q6 LNTRxuDPvJIR+nh/JkeHrPr/sQdiN+7CTtxG12RN9aA+sx2QWlTzi7bC2fjG6bMsYa3R vHIREQMpIPXmTi81JgrhhwF8HYwb3Z7s2W6juMCenp9DnqtnHHHs66ZnL3UuXKPpjkA5 t3zEVjr1Caab5YgBGzxA1n7UM0IL/+4Fm9svAWyTnyJv2cT49UKYwT0DyRUYjY1EeL29 KvgJagjCSLzAjhNkPfP71nGKZYVwLmMDqQtMBvFxvRkV9tGnUCfk8xVMN8OoxyUKzH1F FbkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=iKRHmYJbzW2/GGK75KnQhI2TbPiVsAUFqgvqCxqRg1Y=; b=mIkCx0o8oMDIOp1/Dyx/A+YkbO9ZUkHMFtqlkCLgdFMR9udX0J3bvTT1TJZqPDaoA7 OJMIrAwisH9Jovt4pyxPxxeyFdRxDg/Ty1HnISseM7WGiQBmjn5s3hLHCoaPEpicTWoF u6AVajOcB2tMd4o6uXMZ56jND5z/C7gqxEao496Yur2nu7K8tOUQRq461Td0KQbNzLgt lM+BJfjySfs6qf78LdX4/UWSys34tw0A2Zzd/7Uqko7+szZqalymtgZxXd7S+qqtcFYn 5ZEYZud1w9bhB0ou2I/j2Q0oe9cGzz+xG0BdJ76x3xYn/n3e3xVT4nldbeMsWvApy5Kq hpwA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="mcgwa/md"; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=iKRHmYJbzW2/GGK75KnQhI2TbPiVsAUFqgvqCxqRg1Y=; b=Cne4o5bgS9ARnB98krdYBmGAIA1dT2DAdAcIDQjm6UuoTaT3qboHzp2aYC6OMiL9cl Ote4bHo1U3VWdrpJVsG0u446AJ2B/AwFhC9AYL6/il6ZEeKKEPhLGjB8QDcJ3X4Gb6/e GqA4mM5+hkzHTrHL3kXj5aeNqoceF4Tc4yfIw= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=iKRHmYJbzW2/GGK75KnQhI2TbPiVsAUFqgvqCxqRg1Y=; b=TIwJGd2I3vOygVfV1laTK29mCehPsZr1lupKpC7v+gwkzAKgmsy0AEE1nyOQRPEOFb D84ld+tZm4dRtAJjyDBj1a8rD2sQuzfeRHA6Y5LT0YMRy1jmwx/A0zMctm2aYmjPt4EG yw1hX3w5neNG+gU26W3Q7w0Gon32YkRc5dgVuNGlVfBnlYOZpf941tFgPpi15EfYXR7a JCuuIuXREdorPI4FE2csmU/M+VozCzgJxU+KSj+P4csuJW7Ki27zg9H8Pe/FqiVdr63r CJ4uFDP9BXfGPRuCS9o6gKuVIskBNSDW2PqueIinOOXaITCk8wngynM7kIz6vcHRiD8h tquA== X-Gm-Message-State: APjAAAVKnvdETqW2H5d4G2/eBxrd+sE9bRhMiJiJfmSpp11SslcI7t1W P7l4JTmrsLudN7aEjwxciviai2OS X-Google-Smtp-Source: APXvYqxE7Vtd52uO4b4FwxSBHF7ELqz2qasuv15uv6h+OKBx/5BUbR01dlAq1pgDKeE6lrH6ssYHKA== X-Received: by 2002:a17:90a:5d15:: with SMTP id s21mr26502798pji.126.1560264732160; Tue, 11 Jun 2019 07:52:12 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:e509:: with SMTP id n9ls4503311pff.2.gmail; Tue, 11 Jun 2019 07:52:11 -0700 (PDT) X-Received: by 2002:a62:1885:: with SMTP id 127mr82253587pfy.48.1560264731772; Tue, 11 Jun 2019 07:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264731; cv=none; d=google.com; s=arc-20160816; b=PnFIiX2YxbdzItZDoprLeQp6QtwHQl8j6Zj4YrErryXfDvazfNZUQ6aK6viaHo90m0 S4C1oQ/UkeAo4BgS5z9uEqdOsSNlv/q1C8p3o1RHLBK597Z0zgZyYrPdMIlz+RNprB1Z 2789sBMmKFuw7bY8tq3LZwD2zaEJ1zRdBCuJJV+h8XQNsp2E4fiweoqa2YVD9hUOUMNY zRvlZC3XZcaUT4rOWre4HFDFMJ4rGOcm0hK9tJi3mT8s20hGjeYKSHYnbUDR7RGBi8ob zcgTL5YnJeTokyTXTjS1qgGT+QZ4Z2HpFfMUedJHYx3rD96f91M8BUx0denh3QUp7sIW vqGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=czJWX9GBf8BriQWQcaowm1sDfoEirrjQRVaLL0C5LnQ=; b=FhS+B51wfVPiloUrGLy6Xo6VohZyKCx4KfpGcrnWFIlSg0eaxFXFSpy3BwocnOmMe/ Zh/n5PKCNB5F3bym2FtLWaqpLww7mE8f2qz0t3G4L2dYIX08TiOjfAII0b0XKKyIGG2S VKOIYRJ/nOIKLQUmfPeHacrHeEBgv69PE2yNt9625gQxRUwETiw3XIVZUc1zvqEcbqiT nxe+oIMkblYPjqSWJ5gKjSDlPVRZkWfaaKW5aRs0qzvyRJC9MsSgnx7SxqDMXQ3vGssV UxzE+glswx+dabyBnVEe8Yqh81JFCzJfA52xmyVS0nn9lRwpeXtXx3o+03rUPBbnkM10 ZW5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="mcgwa/md"; 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 a16sor7721344pff.11.2019.06.11.07.52.11 for (Google Transport Security); Tue, 11 Jun 2019 07:52:11 -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:a62:e815:: with SMTP id c21mr38790520pfi.244.1560264731482; Tue, 11 Jun 2019 07:52:11 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:10 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 05/92] ram: rk3399: Order include files Date: Tue, 11 Jun 2019 20:20:08 +0530 Message-Id: <20190611145135.21399-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="mcgwa/md"; 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: , Order include files in ascending order, which would avoid conflicting function definitions/prototypes if any and also for better code readability. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 73732e0767..da04b11922 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -14,11 +14,11 @@ #include #include #include -#include -#include #include #include #include +#include +#include #include #include From patchwork Tue Jun 11 14:50:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 457 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 54F563F08F for ; Tue, 11 Jun 2019 16:52:17 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id x18sf9765985pfj.4 for ; Tue, 11 Jun 2019 07:52:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264736; cv=pass; d=google.com; s=arc-20160816; b=FJ7Hh0axch9LBtXNU7bjNCGmCk8uKm9zJmaID2F88ZHc4/7pC3hiKyh5LvbaGvQabX GScQrT/m9G/ytE8OeIj1/DpFRQBIxAlLpx/GvJW+lyWeZSIcuF+yHI4OrhRyKPULUTWz ibbV9J4buLi/309bJB1JjxrPOAC+yWIDiLE2XpXXbBG/Ghx95RoyXnQPb0DShahE1NsJ X+3TwlnyxSLR5VDf+RPCukKJprwdmZ2y1mhyJM0TOq99DsuzQJ7lNpqZeEtJO5G6vmp5 3HdYxzexrqZpJEuMJP6t4cpMQSF/Yu+SnF6noMXiDqQ3VIl0UiWHlUwPXOhDswvZNRpw jdew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=XtIgd0eoWKt7VikYS+PwfJXTTgtbEzgBqDGFKq/Ean4=; b=EQ2h1jMkmC2rxoZUXM2RqNUyMVZV+KypkGEMz61m5yZ4k7Nxw88W8XE31FsegO9sqX FPMvTd21J4SNM99cxAldxS8EFRLchilq4WswNYyqUJu/JUgOJ9PmEl7FS/DPepjL3oxS C0b7upilr6p3NMtbkIkVXBgfkBqc1+2v7w7Y6KCfjwIAXqu2NuayfWDMHtca8xT2e/jv XzWlM734VtF4cIoePqyLLFyrmHry78NpX3uDGkMooXnNz95mwttuY0SWw8A6Ht8WGlWA 9qEVBEBPA5Qo/VoVnYpr9cCwrn70nQLbvcJRD6U+FDeYn2Fjx7bv8MOsITHiQ3G3EnJm 5bnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=K4W2f0HH; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=XtIgd0eoWKt7VikYS+PwfJXTTgtbEzgBqDGFKq/Ean4=; b=lQBjVCvNP8XwwIffUnYLRj3KN42xnTWlCkXJLZnIthQJR6ipMomZSujAnra24rUS66 23x1T0WHzcSydr/qIncvRDFRGnatET7BW7i+OAjV6WNiiFWRgQ3pFvIGqsWkVNq6RuAE 22PeLf5JPps4owi6FsiwVHukKZyc0tHAdQEro= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=XtIgd0eoWKt7VikYS+PwfJXTTgtbEzgBqDGFKq/Ean4=; b=WdPO7ZS3Za5a8U+EVyIgYetIMWO34Jx99oBeH03dSjagiNEesn5JSLTZa3oHHLE9a3 hk9ZDD3n5OhGjv0oIFXghCFCiRbNl7somrkZfJFGaAsWs/ONVnIBL1v+Lo0Y08CHpMJ7 TI275kCmBKay+qxGvd+X+mqt0cTycXQ6ASd194SQUM0XSRBIAGCHOAF26rQZZd8wdxpS tAM+RISgpylUVjHLP0ce48UQeMWuWSUdfI/y5hSdLWkqrrV04gyNP6bZQ0q55QHJB3bV pY2z45h0UGLySq8ntrehaW5dVPNksHDtW38rpeLLfMWMJc6OSIx1jXfNKLn/I3FbI9dB ERYA== X-Gm-Message-State: APjAAAWaGQb0vmY+XektwtH4SocKb3vad21ALZ1pS1O4j8c673hMKsKs /Zwsa35VcFxRPL+zAJOSNqbtmI7w X-Google-Smtp-Source: APXvYqyZa2UVW9eBNz6k2ub6TOXhKMR1HiMKrXCGy0s7TcpU4Uub41YhqaGUrrL3AZMgBhB4ESBMow== X-Received: by 2002:a63:2d0:: with SMTP id 199mr20445091pgc.188.1560264735964; Tue, 11 Jun 2019 07:52:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bd8b:: with SMTP id q11ls2687345pls.4.gmail; Tue, 11 Jun 2019 07:52:15 -0700 (PDT) X-Received: by 2002:a17:902:1e9:: with SMTP id b96mr29838821plb.277.1560264735585; Tue, 11 Jun 2019 07:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264735; cv=none; d=google.com; s=arc-20160816; b=hSRJqaZ6XSKLGPBkfQsZBlgkUp2rntowyvQ2MTL+v2UPGSqVBCszhcAU9QvsdgnzQL T8AsDFExogC8X1kj7Iq7Llp4646HBw+fHRcGhc9OLZ5QfC63+7oYLsXNAA2e3XrKSdSR EZJ9PSc1I0CquOYTxZyx9jHTaU5WG/YO3kS0M1gJlczVzu0e8Ox8jHyQOZisLA7QLa6m unkzvQz6SsXg/A4nb6FWcNI2FT0O+i4M5tAVqOJEELhifjT0tSXlZORkMNGNUOujn2Ox dMdQ110IdEeoV46gKIQY5LUGHtamzQIP5Apk+9AhLE4IH4k65VCaxSy1mDScxeT8ssp4 DpjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=416UtQ09ISedrXNdgRAuAno3xaTmzQf/73rYHpXBdI8=; b=MK+MDNeLiYJ/LHYg+rQ7uke3GfR2nwxSzu9Ywy1WZNsYwfPB4OqzRqwQ+5WwaG+Ahp x42B6+n7DMSOJOEx0RFq0JhsW8EfzpPJpN+jSY/XFx9JLJ7vK/tOp54GwmGH5b0cvF5S wyVxrYvtwbG3Uq5lEYXXLapCRedQ0FVUvHWv0KhKHfV/GOGel/+HdDNA6NwqRX1KsSVH xAG2smpdUyxdkq6wWzNNc0Om7UC791f0PDgUdPvjKDpVDcxxcPQz2ugMtWgA7dukDRH1 3JngG9SxDn1BlWfy5hNo8XpXjblXwVujD4oCcrWuiuJZlSYyiaCpUgEEKe/wd7Shvqzb o95A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=K4W2f0HH; 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 h3sor1824275plr.54.2019.06.11.07.52.15 for (Google Transport Security); Tue, 11 Jun 2019 07:52:15 -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:a17:902:341:: with SMTP id 59mr22818264pld.20.1560264735270; Tue, 11 Jun 2019 07:52:15 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:14 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 06/92] ram: rk3399: Move macro after include files Date: Tue, 11 Jun 2019 20:20:09 +0530 Message-Id: <20190611145135.21399-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=K4W2f0HH; 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: , Move the macro definitions after include files for better code readability and to satisfy coding style. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index da04b11922..52633166c1 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -22,6 +22,19 @@ #include #include +#define PRESET_SGRF_HOLD(n) ((0x1 << (6 + 16)) | ((n) << 6)) +#define PRESET_GPIO0_HOLD(n) ((0x1 << (7 + 16)) | ((n) << 7)) +#define PRESET_GPIO1_HOLD(n) ((0x1 << (8 + 16)) | ((n) << 8)) + +#define PHY_DRV_ODT_HI_Z 0x0 +#define PHY_DRV_ODT_240 0x1 +#define PHY_DRV_ODT_120 0x8 +#define PHY_DRV_ODT_80 0x9 +#define PHY_DRV_ODT_60 0xc +#define PHY_DRV_ODT_48 0xd +#define PHY_DRV_ODT_40 0xe +#define PHY_DRV_ODT_34_3 0xf + struct chan_info { struct rk3399_ddr_pctl_regs *pctl; struct rk3399_ddr_pi_regs *pi; @@ -43,19 +56,6 @@ struct dram_info { struct rk3399_pmugrf_regs *pmugrf; }; -#define PRESET_SGRF_HOLD(n) ((0x1 << (6 + 16)) | ((n) << 6)) -#define PRESET_GPIO0_HOLD(n) ((0x1 << (7 + 16)) | ((n) << 7)) -#define PRESET_GPIO1_HOLD(n) ((0x1 << (8 + 16)) | ((n) << 8)) - -#define PHY_DRV_ODT_HI_Z 0x0 -#define PHY_DRV_ODT_240 0x1 -#define PHY_DRV_ODT_120 0x8 -#define PHY_DRV_ODT_80 0x9 -#define PHY_DRV_ODT_60 0xc -#define PHY_DRV_ODT_48 0xd -#define PHY_DRV_ODT_40 0xe -#define PHY_DRV_ODT_34_3 0xf - #if defined(CONFIG_TPL_BUILD) || \ (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) From patchwork Tue Jun 11 14:50:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 458 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 322F83F08F for ; Tue, 11 Jun 2019 16:52:21 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id u21sf6642383pfn.15 for ; Tue, 11 Jun 2019 07:52:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264740; cv=pass; d=google.com; s=arc-20160816; b=B4mIgs1H84o3zGk1lihk/p7sr79L2CVyGMp0qIOi1ItsLGXKfIq24ROV4Inu5Qo9go DKuTOmCnGJHK0Tz8x1jMTvztt8UXx4DQMXuYegGCs2N+0nfydF6pHLJJCUUz8OIF2q05 3gqJFAxDRgwteLliFGJ/nHN3GB9cC9grIIcOA2OPFHuV9he4AE9s7aBtaUfUwNA1K6wo yuuY74MQaCYB4X96dFtyp0aHkIpbnvmt6knW5TNzYGQJ4w8sqr11X/h0DJ2DhKfuW8E+ ntyHXF8HP3FQkPXgvJaWnddOhK+5q00mLml2gR28vvll+Ps5XJ/6DIpFVm6lk3z4r4A/ BGfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=E5t7AQ2NRVU0AWERSJWuGnXdSUcIUqqSpLp3obQ9Oz0=; b=EP7L+AYvLyxsGHMGfGAwBwu/s3cAg6clyIH6QqjOTWNoD6XB7psn+7y7oGT03j4S5V z1GsxjnMPyurlb56v4CRlV8+kpmimPrrIzdy5SCiClY0Yy8jnRzGjLArSmpifNCwiuYR iwIAlxjb8PShNd886fX3CDZ/ugCE7EI+Q+NP51gFlgrWjNbdAOGjGaxJ6YKdDH5HZ7jp 1RTn/YqpEcQP/1dOOlF/VTFm2P4+KjI2ejH64tOHYZSk2ntdVaaXoQrhPWFL20G5OBHd f4UhEMx7FL8EgTkvWWUuIYMXws900FTbwg2U5KfoTKZGvJXZqTwqzHLyj0vDG7ssMT1l bzqw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XGF8MAVq; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=E5t7AQ2NRVU0AWERSJWuGnXdSUcIUqqSpLp3obQ9Oz0=; b=NHnRiAppvizrYZ/H4rlTGlqOgUD+XZHOSF14jZUTlsVSXfQm+jJ2OS/k/20WTEF+VZ S+eFQzqYtAk6HlM3JHyXuwnvBLtsItT6vt2V6dbhhPwlDLW04J0LQPC6kmYUUPSkOyzO 0lzpeAGB9Q/phuTpK6LgnrARHRKFIRrLH2gBs= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=E5t7AQ2NRVU0AWERSJWuGnXdSUcIUqqSpLp3obQ9Oz0=; b=dVcrgZvtsjujesz4UX/Iv0krbCtkEWSDvlv4vNQtAe3kE7gCQDnd0s63IFGtr++5fT JlZ7+90gXLCg2BAc9UysWJ7xCQCFzKwvDPL7PkVdQcypzTo/RYQxhMiMDnWrX6Dq9KkB R/0VV0ZnzNHr1fRvS9oSaFPto4cRcF88pZjZ+Sw+MhV8CWICsjMIEwKL1gatDta91yPh V4A+iahFBGJ12X0fWrFlSJVUeot8ozNGh5axNUa3XO3P3u4i5Nh8HvXyH1hKRLxW8562 4AwOjNchrRUmGMTDcIkFuCF1P/eM/W+i29vOc9KOLJpg9GafrVjSluADk11Li0LMh/z/ 6kZA== X-Gm-Message-State: APjAAAUlDUK4vWDKdajbDwPrg5NeFuVklcqNDWcfY41IH8OeX/x97Va3 hZdbd+qqCE9C0E3lonqKvoRy17iY X-Google-Smtp-Source: APXvYqzNLo3QHiLcFO1TMVAZvM3ByWAz1ZVROuZDP1JxeUTKgEdnmMriBwDWev2I0giqv8rt0aPQ3w== X-Received: by 2002:a63:5b5c:: with SMTP id l28mr20227746pgm.158.1560264739942; Tue, 11 Jun 2019 07:52:19 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8c8d:: with SMTP id t13ls4894814plo.13.gmail; Tue, 11 Jun 2019 07:52:19 -0700 (PDT) X-Received: by 2002:a17:902:8b88:: with SMTP id ay8mr11290140plb.139.1560264739560; Tue, 11 Jun 2019 07:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264739; cv=none; d=google.com; s=arc-20160816; b=kPA3DLGOj2Ze1u0Av3zlp6l2QrIyE0InYdlDVEMDp71w9LS9Ehl+QkURjggTrWa6od 9N+pCnMpaf6RSfnMn+HJpGvOZk8800fGFzEm/+6Kovplow/hQhJdzEz3NS8CMa8xhD/o eHmp/pPFji4D7i528Lu3cEDoIc4qDFqPF15M9OvdIHOJDl9WuNa1yDRVGyDJPlaTz0YO n+ml9pz3jZriHXVQ49oZ5gqwCLCrC00cDfsCm3BHaUBqlORQGlsLQQrsQk372SvEn237 Mr28rCPQNeKjtMrZqyVXlQPr5n5pvb4KzhqtJGdrHhHjV1jUMi9i6aTce/k4h+Mz94yw 3Dhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=31IyQhlzrF72eorr3kRy/tlLonilIZgN/KedcGGyBqk=; b=cMHmaCejej5pqXve0HDLowSgGv9FlPrGlDxoWKNGhU4mmF73YOryt6TArkDX3DNFOA SxFLGRPbq5itSJrCUV9oEgXWEKoB01mH4enl9aRYyYNgC5y7M+mvOI8MeYxtuyM+1Jnj 6bqWb55dDH2VquBWC/fuVyCYhruqy5xsFRiGuFPgn8kUv3uIKN4eRDgRioG+sJU5mwaG ldfmpeHXs2vZxqZCTD9EfdWXs/o3KQB+gOF92Fou1LHKDVQNw1e2cnTptklvZpCOIJRU HGBJMsNovq7XN8cdMGnq5wSdO82o4KiTa09z2qRTTz8GiD88TXmWhOnOnQUfPfTZJOGk U79Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XGF8MAVq; 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 n20sor13157146pff.10.2019.06.11.07.52.19 for (Google Transport Security); Tue, 11 Jun 2019 07:52:19 -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:a63:5c15:: with SMTP id q21mr6539608pgb.248.1560264739235; Tue, 11 Jun 2019 07:52:19 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:18 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 07/92] ram: rk3399: Clear PI_175 interrupts in data training Date: Tue, 11 Jun 2019 20:20:10 +0530 Message-Id: <20190611145135.21399-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XGF8MAVq; 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: , Clear the PI_175 interrupts before processing actual data training in all relevant calls. This would help to clear interrupt from previous training. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 52633166c1..74392076f0 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -618,6 +618,9 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, u32 obs_0, obs_1, obs_2, obs_err = 0; u32 rank = sdram_params->ch[channel].rank; + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ + writel(0x00003f7c, (&denali_pi[175])); + for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); @@ -672,6 +675,9 @@ static int data_training_wl(const struct chan_info *chan, u32 channel, u32 obs_0, obs_1, obs_2, obs_3, obs_err = 0; u32 rank = sdram_params->ch[channel].rank; + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ + writel(0x00003f7c, (&denali_pi[175])); + for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); @@ -731,6 +737,9 @@ static int data_training_rg(const struct chan_info *chan, u32 channel, u32 obs_0, obs_1, obs_2, obs_3, obs_err = 0; u32 rank = sdram_params->ch[channel].rank; + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ + writel(0x00003f7c, (&denali_pi[175])); + for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); @@ -790,6 +799,9 @@ static int data_training_rl(const struct chan_info *chan, u32 channel, u32 i, tmp; u32 rank = sdram_params->ch[channel].rank; + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ + writel(0x00003f7c, (&denali_pi[175])); + for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); @@ -835,6 +847,9 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, u32 i, tmp; u32 rank = sdram_params->ch[channel].rank; + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ + writel(0x00003f7c, (&denali_pi[175])); + for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); From patchwork Tue Jun 11 14:50:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 459 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5774D3F08F for ; Tue, 11 Jun 2019 16:52:25 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id j26sf9273085pgj.6 for ; Tue, 11 Jun 2019 07:52:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264743; cv=pass; d=google.com; s=arc-20160816; b=ZPr4w2s5Z0k9nPaoacvYSO05P/rTIwAS44RjsIrBNg4gsmiteC1YhuFXVMmkMF78fD 1sSlGXH4za8LImsx9MPWYATYxNMssYzHiornF/YZPZEWQP51y6h7Dv6FIrvhdXhRNulR ANBb3aCv2bJuT9efXnsSee+GCaKdV/t1YScSQ8qw+hpwt/xHQ1NaRoocM1wV8auTvRAm sHcaE9LoVZitWSfMUmvdCfhj05PwWq4Gx0Iz8GXMm5FxD6Qr3AVuJaJsusEVn8nrWZr5 81jPK//8e9ZZMIXpuW13OChfEeTWqXrUOTuYau2htQF+/Cv0Fm0BzYWkvabtBJwRAiSZ e+yA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=c4ZXg3qBwoBx2uUsFpmemSRzpxFjgxVoB3eIhx3Mfec=; b=ztCXXj22k/Uh1tt6nPDybAwHhMHyfUbQwnlU+Yuxg8te+iCkuZPlBqEMnsc6A79Odo KNrC0BhghnQY3BraEuBWGxcXfQKxTXh8MXRP58KrAxyRcUjE24xMz/WCGE9fiVk6+zDZ Agp62QmjEir/GVTdWBkt1X1/QCMzE+aaFPQ1fwZwLekF6uQhZddugAkFGWzu0RzdIbEh 3KlLxBzBRS7x7NRvCduwvGufJu/2V4drf+XHnTufdyFCgzeWqLHaeYIrMlriLz7JxMov LQfzRVbL4ir+vwhIP2a2FH2D5v7boaCPuzeeuDpgZgiQWytP+fe7LnfAmU1jSBd7xIO/ PyMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QfOlqpTu; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=c4ZXg3qBwoBx2uUsFpmemSRzpxFjgxVoB3eIhx3Mfec=; b=IvN2St5yTCOXbzNpxRM1VxAt22xbOXhKuR4Gerz/Apvq/txonStsryE29mXfiSBZ5w Fg2R7ah+lYQ4Zvo0AEdO532Iuc++ukXFzkDx49EFtgbndqyPPIwA7wyhLMnQAlSMQ998 Y4fyS42vP6pVJ3h3DUNTdR/2UYqMmmY9mJpqc= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=c4ZXg3qBwoBx2uUsFpmemSRzpxFjgxVoB3eIhx3Mfec=; b=f/9hc9Z8z+Ip01iUDrJ3SqhseUFLdBqUjnipbSzKJju3rZf+/23RepQsiojKghZbhm zJ+RZUDE21RqrwUbgH9uHxra4eT3n9ZxL2/10dUuAlxFZiTTRHbOc7CyDqx19sH5GH+A F06EabWIdJ+NGDGGBpywhE7BJ9V09gya0UHivz9+UQPqMeWN4xy4gBRAlZncAB/uZc0D k+wN0+KQEK8hfjf3zCQf41tTzIOKetRCwjzKL38xLIwqm6nuYJ5rwzf9x9ab60ArsF0u 5j++iBY+FjN0Yg8mXbGTmy0YLELK4J0oF0jcr5UyBxs2v2vTawYSvYS5MB2uzepB9qNF wWLA== X-Gm-Message-State: APjAAAXDpiPAIYsj1xqAFu+evL9//n1fhREFeKdW0rRO+DkX/x462+V+ 8C66tzroNvtfAVN5k1v8uFpn+aR2 X-Google-Smtp-Source: APXvYqxCA1Rk5eYkUX+/iIX/ZaO4Z5RyrLkUlFhZt3PzIKPqwPw8QL8Y0GgjpY8cXnecBFFwwU8ukg== X-Received: by 2002:a17:90b:d8b:: with SMTP id bg11mr27267871pjb.30.1560264743828; Tue, 11 Jun 2019 07:52:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a986:: with SMTP id bh6ls4896860plb.8.gmail; Tue, 11 Jun 2019 07:52:23 -0700 (PDT) X-Received: by 2002:a17:90a:9b88:: with SMTP id g8mr1407755pjp.100.1560264743514; Tue, 11 Jun 2019 07:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264743; cv=none; d=google.com; s=arc-20160816; b=eBBx26wRCOkmR51MmroK8fp9x9jeFdBNwRp6RBO71ekD/ahgblSYIGr9yT/Xous/oU /rlJls3NnpP3zlwYdrkjF5cpvzp6aLpp6FIdfG3XFE8ZvS7KZFu6jHjSd5gErJnOX1xE t0oLNAUfQyifOaoup1eMx7JYjaa9SSdVuwziRY4Z/jNszntZk+9iDdQUup2FlXCxZChr fkRDepqhAKRnuOuLMtKNIqfZpghrpiyNEAOZPNWVd85NDmzpaL6ilOcsEKq2URdIey99 f73idPDYue3hhUf0QXC3YHp9J66ybdAO7ruPdy9rKQSzOjMxz0laDWRrB/46BYXqMaqS 2Vkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=sngFIrXhys8b3WKcTJYD5YX0xO4WB0Npd+TKfw+qcNA=; b=gSqbTNCzRocggx9X8+XXUK91xAt9LwwnaQtRJJRT1hzeHVZFJmAhYgpq+jfg5dEMmc d9nv9wZpsAhWTg388AHwNWAEc4i+mhfLhRI0PbrZeP+QF/OVKErTMa8S64HNq/laS0DC ihYvqrFvTw/pvLYdtErJII1znlLTYn/XBgjdwjoPP5kwfPmnuoupe7EnTBKXUL95Rqrs 685r1qyAe7pymIQoGsgL0UvUJoavaBWiOOl2f/4wMx0+8eDYjasn51W/zyXNNyradEmU 50tbRhjco8w+ZZsNm33QBppdwgAKZ0/VkMB9ZItB3CC8mnBbzl6OfkT/e3bU5+qZA1V+ nr+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QfOlqpTu; 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 s10sor3188971pji.2.2019.06.11.07.52.23 for (Google Transport Security); Tue, 11 Jun 2019 07:52:23 -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:a17:90a:9a8d:: with SMTP id e13mr27627279pjp.77.1560264743166; Tue, 11 Jun 2019 07:52:23 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:22 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 08/92] ram: rk3399: Use rank mask in ca data training Date: Tue, 11 Jun 2019 20:20:11 +0530 Message-Id: <20190611145135.21399-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QfOlqpTu; 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: , Add rank_mask based on the rank number, this would keep the ca data training loop based on the desired rank mask value instead of looping for all values. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 74392076f0..312d19f95f 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -617,11 +617,17 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, u32 i, tmp; u32 obs_0, obs_1, obs_2, obs_err = 0; u32 rank = sdram_params->ch[channel].rank; + u32 rank_mask; /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); - for (i = 0; i < rank; i++) { + rank_mask = (rank == 1) ? 0x1 : 0x3; + + for (i = 0; i < 4; i++) { + if (!(rank_mask & (1 << i))) + continue; + select_per_cs_training_index(chan, i); /* PI_100 PI_CALVL_EN:RW:8:2 */ From patchwork Tue Jun 11 14:50:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 460 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E56743F08F for ; Tue, 11 Jun 2019 16:52:28 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id 91sf7895376pla.7 for ; Tue, 11 Jun 2019 07:52:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264747; cv=pass; d=google.com; s=arc-20160816; b=FsmBzf35b+Km9RS8SMDKxp1L5Sc5g1NPRvGy/WyddahdEBhTN17pD23ZJxNsXEVF76 2AwytWhwAXRRWram4LCWiZNvi7DeUpWEstIcV+miOszImhFgoZfF6HIcX+cEWNPvImj3 V5LSZYJ34bFCEKJzqQyFVi9c5IobUrBMdXlr8bBgtqk0fDjkKxPNxM7S0qavr3Stiwno +y5yUaZR5eirYkFWxfG3KGzK99Lvv3puF1yE3otvhmShcsEzT3XabNPjQ/2q4kcCxpKu EvQnRWeP/GFQUATsl2MHBZ94CHqsJSgxoIxUQRfHh67OOoOEo677xYC5mMuzCvC05FKp SIuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Uc9t7akX2cDSbZqyqFlgyYoSx3ubtUpj9n/sxXzuVKU=; b=wujIS3QYTy5D67dmqhd8PXuaodzbunkPPXF/vmcHZFLBsdNj1bCjk1dbR+QbGROuIm KH0DH6XTlyElaMXsLc2O/Reh1Fepi4RdpMxWNFWSE/X/mlsC0KdhVpIeJrL/ylXXpMPR yujMK8H90NT9xnNOIhyYE/4/uaHYsE1a8IDCcJqb7deS1VEQ9DfEhinomF3uQrxEP1Sf 3PAKUGj8pyHTetMsAeeJrMxRlL40rp81D3i15GFqyekFyadkmk9m/1qfO7825HPzTbT+ bR+JQ86LGPW2QGflxYlcrY6aJWZi9aFoZVh+LWTczROZrWtlUNeafcisofPlJx9vOS/p 0HOA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mAlzsXU1; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Uc9t7akX2cDSbZqyqFlgyYoSx3ubtUpj9n/sxXzuVKU=; b=RFH8aG06ZuP07DdGTSsX6SX6lZFKcJ4Pt2wq9fryIYMkX7veTeKqf9Mi+2VhUcgTrM 1tZiBqxSJ0yxuF2NK/4EierPetAimcugRR/7ho5jWycZ2VhqO3GBI58OYFe5Oq3sKl8j qKSIhFTYjnUVzxwT8H6DA2LMb+zgAWDW5yuPY= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Uc9t7akX2cDSbZqyqFlgyYoSx3ubtUpj9n/sxXzuVKU=; b=B+8oyIiw7Vvj0EE+e2kXrQkJrChx3/ryBCCMLidRqjLqIplKUV5rFsqfAIiOhLDyVZ ncQyIW7WPEghryyKh0F40mMk9oHKfBYPvFkMElhur0cWD6mM6xJlrIlyhJMQyDMypP6v ol5FJyoc8KoaosLksCLrtOo+v1ml0kXplpDUZFEROhNzrAc/mGcUts7sqcU1teQTvqI5 /hkQUG/6xeM37F32gzXGVhOW27N8f79W90p2MhAW3PnbzGStz1dU+02ZtrgT1hXifqiM 6jyuTyzIK4F4qWFzYIkbXJnQ8pMBqdn0JVnrK6/d2WKIRHDEVdy8CXSQJNZbM47K44eW MM8g== X-Gm-Message-State: APjAAAUAKhmHm+7qF5x+pcYKxTqBXzLtGGZ/vk3dZJMovqsx7oJEgUTS ZIJlIzHXjJJhEof97XVvFcAWNIKE X-Google-Smtp-Source: APXvYqxkzTQV5LeDQqjmNWiaVEMOltyifr2NuUJhjahLydztldVNCUiwAS7YDhZNQZOYxYeE4nHjdg== X-Received: by 2002:a65:530d:: with SMTP id m13mr21073551pgq.68.1560264747619; Tue, 11 Jun 2019 07:52:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8211:: with SMTP id k17ls4498704pfi.5.gmail; Tue, 11 Jun 2019 07:52:27 -0700 (PDT) X-Received: by 2002:a62:2cc2:: with SMTP id s185mr79390200pfs.106.1560264747282; Tue, 11 Jun 2019 07:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264747; cv=none; d=google.com; s=arc-20160816; b=E/Oa1SLW0RmLX6wN5UprCsxoo3bVBuRQqwT4WcWleG+sM5O70Rs6cDN7wdvNUfmj6d 3t7HU+I6jLikEjVEhXEvlLLrp8bq1gfU4ivG35sRVvE/81NfkFvGIyDQnoIal6OKrEX6 fmOVUM+6BT8R0mHtAw/ZUTsFs7k8VzZjrbXac0pqkSVIfKwlWHzYx2G7SyvkDab5HKoa 7hNRv3EQNvPzZseWwZR6ICvYFgTx6tnbgAhslKjwyHQoaeGZUpaiLLCgI7mgntdFf20e MKvTWQc5Cm5CH4R6XcodA6ggUcIEgMSVDksfrqDUTHFzhLIAfsmJ4BcIk6DospNxKXle T8JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=X2Tg3fSi1tlmN05lpvTCv2jc3ixEGMinJbElbSaFifU=; b=n6efV2DIn2Bi6yob5cxrLkSzoNpN4VOHG4+BoyOFRiVhiaQfIe9slbQP0dYP8QRuD5 VEFxn56An868QlRA4g0p3QZuto9OuF8Rg4+pUKzM2sFZNc4mlFvC1hbmNerQZEx6sIxb 6DOENdUFqS/GmFK4cNAidsnB9hjwrEMrGDpNvH/5fNA/X9j6CtsdzStPs7m6ONTV45K6 moKyZOpzxpKWyDDW0v4RNNYAMlX70gPfZrCY0myc3zloNSYUMxY1N0mr35GlYSOTz/qE BMOIydZ2KZKWKZGKbAYmSd0QrTovaZ1m61SAamGfKDRcgKtjnFQb7NfvdoDyqgqVQ27/ l4uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mAlzsXU1; 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 q17sor5277010pff.71.2019.06.11.07.52.27 for (Google Transport Security); Tue, 11 Jun 2019 07:52:27 -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:a62:5587:: with SMTP id j129mr80331322pfb.45.1560264747011; Tue, 11 Jun 2019 07:52:27 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:26 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 09/92] ram: rk3399: Use rank mask in wdql data training Date: Tue, 11 Jun 2019 20:20:12 +0530 Message-Id: <20190611145135.21399-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mAlzsXU1; 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: , Add rank_mask based on the rank number, this would keep the wdql data training loop based on the desired rank mask value instead of looping for all values. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 312d19f95f..1541b34a7d 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -852,11 +852,17 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, u32 *denali_pi = chan->pi->denali_pi; u32 i, tmp; u32 rank = sdram_params->ch[channel].rank; + u32 rank_mask; /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); - for (i = 0; i < rank; i++) { + rank_mask = (rank == 1) ? 0x1 : 0x3; + + for (i = 0; i < 4; i++) { + if (!(rank_mask & (1 << i))) + continue; + select_per_cs_training_index(chan, i); /* From patchwork Tue Jun 11 14:50:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 461 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2484B3F08F for ; Tue, 11 Jun 2019 16:52:33 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id j21sf9757633pff.12 for ; Tue, 11 Jun 2019 07:52:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264752; cv=pass; d=google.com; s=arc-20160816; b=ZOf9vMEYq56xux9Sa0xeB9DoldjudZyeQgxUdiYwbypPKaeb3b4nz+HXgYjefdL6f4 IN4wh+LMyn6wz93qvVvZVbSdbP69Njb6Y6zbtR+LyZ22Rn47tFfswGO4p+mnjlqYtVJr blZLtczxTnGK/9c+T6jCENJoBVKVPxS2MYz3scUXfq9RjB6Cr0YkFU69h+fKQejL9mNR zpOe8wPFG4//Izwqw640iArlrjSEHX+QT/MC4QwjRciEHl/rfOu82u73ymCsdeph7KLa Fv79xtKN43ICdtt/b38zer8Z4vcKnt2ihLoG5BR1uIWTUt7qXq/ZLvgqpPN90KRG3giF zlvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=lTqvwXNfrxdNGu7KmFEhHj1KPG5iBy2qpcO8vyUENkk=; b=hcedQNHs+oL9TyfFDBZT5yWrhdzOAe5k+iupI1MX96n6ijTvohlvgbCTK7fW4CEX9S FqH8PGjJI5+b6EvTYVZOTrFJDpB+U3YLG3HF0it8e3mcD1dxn/jj7yiAaCkGQa3kL3pn u87jP09cuLu0tKkcFtdqpdMhlun8aXksNo9iMUXM7xXMVopoqw38Clu9kVmLfCB+AaiF bFGuUedPaG4MSO7zJ6pakJ1gB5jmfBiUx+mmbzILMYGiHvG0RpGUOPpqGo8bAHnv3xgm 7pRJ/BH/aSGGxDTQ2jWkM+cRALiV0brNqDgmgKPWdhiuWUU8RSgmfWvRFkEN4XfbFM6j Sb6A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="IM/IqXBv"; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=lTqvwXNfrxdNGu7KmFEhHj1KPG5iBy2qpcO8vyUENkk=; b=YT3SwwBRFhU+wv6kAZoe0sN65HcE9CfGDodtRVMrHocw464xzrYzR0uRyoZ2PCfkFc nI/H9wFnGpjf3Trv2FLzEAGUdxh9I9i0S+tXSECq2AsGWxYANNnK3BhhpXRBe4HxfrzR jkaO/Hf0M299fSnIi18ews90g6+KFi5P4krGE= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=lTqvwXNfrxdNGu7KmFEhHj1KPG5iBy2qpcO8vyUENkk=; b=jrYhLIoyMF+dBfQXVm/USMhl03q/ddUozsOrBvxROY4sqrYKhFLB1hvinoSqc2lGNZ zD+f2raO+NkSZbOrjuZ8oQbX2l11bZWkyn2ZSt9iwzqska4xAKLPJpdtGzqe0dR1IXtq IIrfszZ8mUy3UvOqBwwystBKCEjrhjh+3Ii/s3nTrRQZLCmZ2AoMRk0Fha4I5fVBFuyS IqRh8uMTcZxcFu5Plrak+iIkO7xlyGWhY0pDtiOubXHREHZnBQOpiK3EK6obeELcaPfx GYQG6zhM8x3vF0Ee3wia1c4lK5tlEB9iqgZI1gXUqOBwJvwkBszqVe8jCsZuYz+aETXe TBqg== X-Gm-Message-State: APjAAAXcTscfpfCOWwBYcTG/UpeMlLr9G/bQG0PH9XD2is1zxUdAoO8w HuE1mlLCYQhBxgzVcGlHdvTxRWnF X-Google-Smtp-Source: APXvYqxA1Kf68w3GbEBdSKFdS3TDVJ0EzR4H2ijeInQiATU4m5FD8ylho1bBJQIBsMS6PrFV341mfA== X-Received: by 2002:a17:90a:b78b:: with SMTP id m11mr27663788pjr.106.1560264751932; Tue, 11 Jun 2019 07:52:31 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:a584:: with SMTP id b4ls863219pjq.0.canary-gmail; Tue, 11 Jun 2019 07:52:31 -0700 (PDT) X-Received: by 2002:a17:902:868f:: with SMTP id g15mr75925322plo.67.1560264751555; Tue, 11 Jun 2019 07:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264751; cv=none; d=google.com; s=arc-20160816; b=0lZ2oOOhdzsi7ecq8rmnsSNSXf4fqxioI5JiS+fKX+s5bjVP2CIW+rcNc1kOjS62Ph CK9hLajAi5pNwnWqFchQze7PjHGZoigzdIaOayizfVabsisix98gcAMulP9UporuFzCR KWGsaqwa7v7D2fcMxNtJdjkbqhURWhUsUlEmU+sRCa4HDMovcIrTTx0zGjwdQ4tFNjFp yyLOZqrvhCTc12qO28yEWPL9h4r5wQrqFTByO4348bAKy72E+a3PTF31VzlHzH98GfBP +9kLSUjVru3riCBzYs4/T8gBb4YiWXd6c8jwYhTm9y13e79YyqwJFP7SS84YZHUBhySc L6Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=G8BU7jn9Nzu+haHvyO3dpJamq/Bm20SU6tSZMgZffqo=; b=LBuKZcyVdGG7B0pC2xZi3B+cVea1z9KIvF/F3sFBf7g59DqqevMXKsIGALZj65z7zv N9O7sEufoLUSK9YG6Z17+fW0EVKvDzeb1jbj4DMQEw0JkLG6pWRxpKPhla+oX2LDo9IX iVvJr/b8Kr0IDj/QE22Q82ilOQcE1vrWWM6fV1sMtGCzEu5TVhJtQnAWiwNmGPo/sAzl IXOpICy7fmZIVl5Hx7uGc6TUliCz7d7oybooZ7i24W+JQw3gKUlRLCb8i1SjzD/wfEEo bpyCFhqGnVTHABR6BjmHX4sZEB0xeQvsFdWUFy7LqzsJkVPfrRyx9OwCIWCJ9IBPw8rA wFJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="IM/IqXBv"; 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 l20sor11720392pgk.4.2019.06.11.07.52.31 for (Google Transport Security); Tue, 11 Jun 2019 07:52:31 -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:a63:e304:: with SMTP id f4mr20513657pgh.187.1560264751146; Tue, 11 Jun 2019 07:52:31 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:30 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 10/92] ram: rk3399: Add ddrtype enc macro Date: Tue, 11 Jun 2019 20:20:13 +0530 Message-Id: <20190611145135.21399-11-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="IM/IqXBv"; 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: , Add simplified and meaningful macro for ddrtype macro. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 + drivers/ram/rockchip/sdram_rk3399.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 671c318d50..83936d3679 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -34,6 +34,7 @@ #define SYS_REG_ROW_3_4_SHIFT(ch) (30 + (ch)) #define SYS_REG_ROW_3_4_MASK 1 #define SYS_REG_CHINFO_SHIFT(ch) (28 + (ch)) +#define SYS_REG_ENC_DDRTYPE(n) ((n) << 13) #define SYS_REG_RANK_SHIFT(ch) (11 + (ch) * 16) #define SYS_REG_RANK_MASK 1 #define SYS_REG_COL_SHIFT(ch) (9 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 1541b34a7d..69c8d53314 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1008,7 +1008,7 @@ static void dram_all_config(struct dram_info *dram, u32 sys_reg = 0; unsigned int channel, idx; - sys_reg |= sdram_params->base.dramtype << SYS_REG_DDRTYPE_SHIFT; + sys_reg |= SYS_REG_ENC_DDRTYPE(sdram_params->base.dramtype); sys_reg |= (sdram_params->base.num_channels - 1) << SYS_REG_NUM_CH_SHIFT; for (channel = 0, idx = 0; From patchwork Tue Jun 11 14:50:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 462 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 720463F08F for ; Tue, 11 Jun 2019 16:52:37 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id a21sf9254823pgh.11 for ; Tue, 11 Jun 2019 07:52:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264756; cv=pass; d=google.com; s=arc-20160816; b=Ujv1L7xtZNDVTo1v4OXcnbdiIEhKHZ4h5sOhWCVQXt+AuuzWZiZnoBvybeF2nKJBrX sk4f8+Nd2dLrMbz/bZGp9ekoa5cF+mYus+Lwx3DvstvlWXIlGiUfHBSlhUvHbR+Pey+a K4vAPbmWfN/yFNtaH8slBcwQW9wKXuyr2QdGy1jbActqb45F4lxkiH3WsCiY8g9Dp2Ov ZZox/UqDIMR68UCjWNU5XEvsPZryGvR9f98AP8L0hKqsNTBnskl9sxx1gWomx9IGF2q+ hdhsKjKk22bZTVRQAB6uJ4SMnbtp43pLPE/8YyQfPR6jPJ7ZBvoOqK3C8JIRHcEcwSln kDOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/eBT5vpW/POMKkFlFJhMV83j//BLA7j6g+6bAYDmwqA=; b=qit2Su7FhxHPJapPRBQkzMhx6+XNF1/zlAc97v0DLdh4l+0z9QZxFiuSpscohlL6rG dDbPv8oeFcvHATnuc55oYaVuLjOnAUK/o2GUptg5ZvAbza3UUMP4y3nofvn+q0yVudOc T5jeN2aT1bOS2DUChbgpBJVrM832DAYOjOKIRh2Y67SaxDC/6y3OxB01ntuh1cxeFe9q xIQnp6PlokOPALSwTmQI9gHxDXw+B6EIhDkGqrOKByEiZFVMQP7mIUdaXAGAeF67+TpH Vl/izI9wXQ5+f97/ZCZg+26wLUCGTMlXtVjkNk5b2LUDOAueAxaZQCSIApC360nScN3u mGOA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j7GcbOlC; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=/eBT5vpW/POMKkFlFJhMV83j//BLA7j6g+6bAYDmwqA=; b=X4ZE8rsKvP3E4pK6FaZSpsbKrDEU3YIVsRHCUVgDLAlFsnS2IK2+6tEZvL6uIlVcS7 3yOhxaak6pMDNJaN8s1+4+2dv09W48GuiAl12HCgZOyz4hXILZ/H1ycwgN0ZGSiZe5dh iG6aut/lBkl1Z0KnFy34YJi0/rCCK/xJZWvbY= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=/eBT5vpW/POMKkFlFJhMV83j//BLA7j6g+6bAYDmwqA=; b=Oh1Er6PGGwiEbT7Bv0JX4u6hOIzfBsHu3S8GHgzYkGfKKa0VVZ8/W3L9sj/FNVxpHX 3WlRcY1sxmd0lXFlcLntM7CCTGQeM4JICYHJZU3wCYv04Ib5NvBpjj51ptn7oExh9RL0 vXJtmCE8AXl7jyxYrW05H/z1A5KN90iHDrV011p2AiEJ10msUoQYymWOC/SJBN5xMmRS kjAIEWR1QHclT9wjLVotaKhJPkrM73RsxcJSxWn4HJZvGlhizt4lj80+wV57TF4GDs05 D+UjVqAgbz4pGuvVAEaxGMSINmi3usia2Yb3IkTVxPnnbNFXzK5hiOql+af5z2VTyU1/ tUgw== X-Gm-Message-State: APjAAAXZ0+zngEaZ6MA4ovKpqjlbwT9yhx4r7Qw2aXAYGXuwDQwJxG9B 4azBMECqQP3znin1jlGiQH2YGefB X-Google-Smtp-Source: APXvYqxHH9Rh5HSwKjVOVlpyglazxnBDnBMaIlwulKoKL/Kg+qWRiVaYI3uwf9bYUMgu3KY3a74THw== X-Received: by 2002:a17:90a:9385:: with SMTP id q5mr26787953pjo.126.1560264756255; Tue, 11 Jun 2019 07:52:36 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:35c5:: with SMTP id r63ls864067pjb.0.gmail; Tue, 11 Jun 2019 07:52:35 -0700 (PDT) X-Received: by 2002:a17:90a:23ce:: with SMTP id g72mr27461579pje.77.1560264755792; Tue, 11 Jun 2019 07:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264755; cv=none; d=google.com; s=arc-20160816; b=JtANYKaXhUQdqPTn5ho7CIxBzDs6MxmufT5d1QypVC0bgweK/g0Ikp8zWvHB40X1FE WhLd+zWeS62muLI8zPxOakTly/LitbS430oxovGSMkrRarDfnAox+tCBXYm4heSHX9xu bgR9Nv0vUU9X4PWIVgjmbPVWjGPbLkF2xBCoU4Bfgv3tFA81pTSttwJcswd1HxepswEh cB+03jH56wNwbkbIyuFq4oSpE+ux+ADcUc4LOYNDoJ/V4Nem4DDYW8AL7V9hJr8/rGsD 8jTQAdE2c/i6rz0ufX9JLoU5+tfeDUg3iSdSuTHXUFpudX0uzjXzSvcha7Guz39j5S9b NrUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=k8hPse+eLaJV7/L49iRCuWgFHm8RJPmX47usVOlkDFw=; b=zARs9CLMSWa4xK2PGj4amA0S0DbQUsdNQaJ1LF0nzGWLVpP2RWUIY7g+4wHZVovm63 +TXtMLi6b+9OM4s64VSaHSf5aBmVCagh8bSN9SB919CqT9aC0ybskdam42Xbqo6Mn4jL yLO2diX6uYN5rdul8cWWPbA1CPd4OVs0zlsoCskqHKhpphzFziK8KOpZaIZr3Gs2Al/l WHvoAqHeShJKM1Ma0MJcYYPR+qxRoyjn3xJDz0hlC5wklTwLM/duf1y0d2zKLYpTwrgt 5yIiNVdkDBKVRuHyk1EQ0HDPjPhhlBGLgG00RWGB3PF2JOB9ocsTwoOCZSUUHT8RWz5z 7ONQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j7GcbOlC; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id c138sor13386381pfc.38.2019.06.11.07.52.35 for (Google Transport Security); Tue, 11 Jun 2019 07:52:35 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:aa7:90d3:: with SMTP id k19mr78440161pfk.1.1560264755423; Tue, 11 Jun 2019 07:52:35 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:34 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 11/92] ram: rk3399: Add channel number encoder macro Date: Tue, 11 Jun 2019 20:20:14 +0530 Message-Id: <20190611145135.21399-12-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j7GcbOlC; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add simplified and meaningful macro for channel number. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 + drivers/ram/rockchip/sdram_rk3399.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 83936d3679..38a8bb8642 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -35,6 +35,7 @@ #define SYS_REG_ROW_3_4_MASK 1 #define SYS_REG_CHINFO_SHIFT(ch) (28 + (ch)) #define SYS_REG_ENC_DDRTYPE(n) ((n) << 13) +#define SYS_REG_ENC_NUM_CH(n) (((n) - 1) << 12) #define SYS_REG_RANK_SHIFT(ch) (11 + (ch) * 16) #define SYS_REG_RANK_MASK 1 #define SYS_REG_COL_SHIFT(ch) (9 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 69c8d53314..3d2447a24e 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1009,8 +1009,7 @@ static void dram_all_config(struct dram_info *dram, unsigned int channel, idx; sys_reg |= SYS_REG_ENC_DDRTYPE(sdram_params->base.dramtype); - sys_reg |= (sdram_params->base.num_channels - 1) - << SYS_REG_NUM_CH_SHIFT; + sys_reg |= SYS_REG_ENC_NUM_CH(sdram_params->base.num_channels); for (channel = 0, idx = 0; (idx < sdram_params->base.num_channels) && (channel < 2); channel++) { From patchwork Tue Jun 11 14:50:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 463 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 922CB3F08F for ; Tue, 11 Jun 2019 16:52:41 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id r142sf8477746pfc.2 for ; Tue, 11 Jun 2019 07:52:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264760; cv=pass; d=google.com; s=arc-20160816; b=DfvGOCu5Ahxjw8O4XDw9lQdhi/cr6b3pj7QJUdVvSpAKFJa/nryfZDC26k0x4b508T nzPs603nvwVVz8KOAa4A0GYVwtLV9/59FYitu9edf4E1ARpVcdvKgHg3Wvg/Ro8n5Kzd k8Pe2N7T2Ay+eJKmphkyWC2YGgNhXGAJvNXtJj8U/8llGmyMaALoB5f1GcUXMhkvQGYr h4Vr9mUFb8KQes2UahX83jNrqJ239qz5+5idYgwhdWTWF67HLKeDXXFK18BFPwDFHsa/ ySlC/zx97xGW9+BoU7MSNv6i2IenE/dOhgEc5bQ76Qp9iwGzfpAfVW9/bB7SNhe85Efi DQ2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=L8SgEGlwmuWcsn43eCemGPLQxqIxpYMJ2ycRhx/ciZE=; b=PqJtf1ZfUJfjHJt7v9QlDYM4UT5zsAc014OHZJ7O9pTnbf6VD1CYBbgFaWdKVLi7tO qvDmuagfw+Daw27DRnXAPUNXagGFDooa4LTYlZmFH0rxS/EI15DmGbmxp6KYEn5d4gzp cpQmxN2r9ydcT/sFs9ixCC1pQKeVi1VNgxzvGqqKVTmFBqanMqyv8D0z/Tz/GLD2yegN r32wDJoE35tj9geF9dlILivtj0yD3BQLqhxJZx/LP+V8OHZecySPC0E/7TA+FZ0un9KE YnzLJB5LwSqkPXri03WsYPNc7nD/H36Rs+EWgxcksYUx2h6zhbgvD/t89zUp6ezkqgo1 go9Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mncECj6C; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=L8SgEGlwmuWcsn43eCemGPLQxqIxpYMJ2ycRhx/ciZE=; b=Hy062Jyd+Syqi/CuA03PF25v5oDp1E2GSLqzjgRvF7Orq5aEdoYMuIL5x+Uas/RmxO XhES00g8P11TEXFWZ55OI72AF6+xQGSEL4PoJLa1h5TxihrmVVzQHriUMoMd+9MrsZPr Y4zL8Syoz7UJtbensfJULDZxn4qAacGXfmcJg= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=L8SgEGlwmuWcsn43eCemGPLQxqIxpYMJ2ycRhx/ciZE=; b=NtiFwMC3RYDUk7BZovhIhyIzJy21mk2c6Vzl5lfzd8I/ejNOmIeUWO7rnk/lq2cSvs 6ncO0qaGVptPqNhgPdUxyxmL7OyPAmoZ4MqlQVR8mGUmt7ChuMq8LR0XkT3kMAskip6i ELhpWG+4LwSZQ1pJvUMesPduc9KEkIvTadYhcF4DsVFVM1WJLI5MObML3oBJzldd3Pqb Pag187L6cFyr+xYiZjf//tcVH9z1WNl771zcLYSLvrtSP0phLuAwSoxZJjpTGXV0lyw2 wryenP6WXe8u2smfQIyLYmgROKa7elHmB/WQ/tspk7KpXWAYkA2lr5RVBaZ3ShsoSpnI 65sw== X-Gm-Message-State: APjAAAWuGTIQQVPNnrEDWpS0TroegFAH4NDy3JxDOyppW5b9QQFT0nq8 vEPF15E/9s3n5ebHSx0H7g9P0r2E X-Google-Smtp-Source: APXvYqxOb3ZnLpCAuazwIQlhcWnkozrzhGTVV5HVg85E5MVHIXm7XjfRjiufYzTlbkhkmf1D/Vv/zg== X-Received: by 2002:a63:234c:: with SMTP id u12mr20887342pgm.264.1560264760362; Tue, 11 Jun 2019 07:52:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:8593:: with SMTP id m19ls859938pjn.2.canary-gmail; Tue, 11 Jun 2019 07:52:40 -0700 (PDT) X-Received: by 2002:a17:902:2ec5:: with SMTP id r63mr272981plb.21.1560264760013; Tue, 11 Jun 2019 07:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264760; cv=none; d=google.com; s=arc-20160816; b=sQ0Kh0Cgb05042Zr+qtE9ct/d9cOZ2RoXgx4NXaYFUiNuEnkxyYQ/UwmpThEBZjclM xf0B8p3yEhJNuq+1c3yQkR7LGvFQyDJRc0eeZ6JafXrpz1oyUGCezohvLsRlh05g2dqM jUoNZfCTjJPZGFPCdoSoHtLrPnt1m5gSu83lESWIqFHtO1cS72IFrqSFaakrgrCRkLNB VzGcUgkC/I36Sa3Ff1SX6CBzI2Whh8g5GkJtp5cbWLxY3GIy/YLcaNqr5DRKmA4wxFbz dkUAxJuaCaf/WnyGvZsinAGnPKeMvqmm29vdhGsLh5JFW9FbJNuPuaxRcK4TO9gUwNV9 sw+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=lRP180Ipi3gVE2/vJfC3zMZ5wLFrHYhOkBITeXZ444Y=; b=cRb3IPlMaQVNZ6+ZNJWKW2e6Sb1CyIoZRCXFoNroOKnq+Z6WoIpMRPK19xSVWB5rNi 3bSxewNI+rYwA89eN3LLzsEVlmrpo4E00iBOV/AHvO8txWxugRtPdTm8kH8K77W4DVFl G2Jcwpxx5YYb522WS1ZdtyPvBHoVsWnm/87rXIO/60iNinuW6gSWHAXtNq6+PddlcP1s jsy9Wk86sTwmirDk9p7Iz2LENBNglzhNWYVVbgA7yRvuzeXmwyQiZAgnbMKGrGk8zGhy wMH/H1hR2SlqwwdU9PzjuAX0HORz48skZffsTASsmf3HzZBW6uCfIMhZgYdhikpMYr83 FyBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mncECj6C; 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 q30sor3144203pjc.13.2019.06.11.07.52.39 for (Google Transport Security); Tue, 11 Jun 2019 07:52:40 -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:a17:90a:bc08:: with SMTP id w8mr27864299pjr.45.1560264759657; Tue, 11 Jun 2019 07:52:39 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:38 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 12/92] ram: rk3399: Add row_3_4 enc macro Date: Tue, 11 Jun 2019 20:20:15 +0530 Message-Id: <20190611145135.21399-13-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mncECj6C; 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: , Add simplified and meaningful macro for row_3_4. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 + drivers/ram/rockchip/sdram_rk3399.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 38a8bb8642..49a5d14821 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -33,6 +33,7 @@ #define SYS_REG_NUM_CH_MASK 1 #define SYS_REG_ROW_3_4_SHIFT(ch) (30 + (ch)) #define SYS_REG_ROW_3_4_MASK 1 +#define SYS_REG_ENC_ROW_3_4(n, ch) ((n) << (30 + (ch))) #define SYS_REG_CHINFO_SHIFT(ch) (28 + (ch)) #define SYS_REG_ENC_DDRTYPE(n) ((n) << 13) #define SYS_REG_ENC_NUM_CH(n) (((n) - 1) << 12) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 3d2447a24e..0a7137784e 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1021,7 +1021,7 @@ static void dram_all_config(struct dram_info *dram, if (sdram_params->ch[channel].col == 0) continue; idx++; - sys_reg |= info->row_3_4 << SYS_REG_ROW_3_4_SHIFT(channel); + sys_reg |= SYS_REG_ENC_ROW_3_4(info->row_3_4, channel); sys_reg |= 1 << SYS_REG_CHINFO_SHIFT(channel); sys_reg |= (info->rank - 1) << SYS_REG_RANK_SHIFT(channel); sys_reg |= (info->col - 9) << SYS_REG_COL_SHIFT(channel); From patchwork Tue Jun 11 14:50:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 464 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3479B3F08F for ; Tue, 11 Jun 2019 16:52:46 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id f1sf9775759pfb.0 for ; Tue, 11 Jun 2019 07:52:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264765; cv=pass; d=google.com; s=arc-20160816; b=zeAH12h7sUQGvnFLI1/XAY5QdouWNXFsun9Fb2jen+dqgOaPwzWJv7gvvWjiGJNt63 rRmkGSOQdlhLRJEzLh04czzZHb7z6jOu5iIdFJjv9y7JgovXQ9D/o2dBM0n16jCLePq6 +MEioZeU3qnzi4bQUFzQtIuR0vlj3TsQG7AlZM8H90iXgy7pC3O2z4j5tEH8IlKhOwAr K48BKOUQr7/qFM/eQgYGJ9CXjdNdbrt+kZ/4eYLV6TCAOiUCHvMlMP2qCg58zWMi2zyI Q5SpjPczxmxyHnqJzjb+oQrnsLu6ssVNLWPHehu/3kik/5gBHnsKCb3YiUqVHiQp9U4b 2GvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TE39HXilHAqr4VXxNOk6Oz9IW8feLbHxFQa9Ht64Rd4=; b=c6+14ej1f4h/urLugfVpZuvDigyel5b25bn1+FmXI/flRvXUDmD6ryJ3frlRSvqmk/ RRYW7IBdQY53qCikDSCzUqORiTCNDCbpVyMYdM48ovSR6hJoX4G4s+cHuRO7ZzjHj9o2 e8zPiB6jfVgTSS1HvGdXOUpUnBpVXcoF2KmLEAbmmf9Ffq+quE0KhGe04POaHNbuQMlc caGNdlRlMrlGjPC/fKP1wlrYN/Mo8eH2zWFFhriLN5gECEsldW0lC8DmoAbNYtvshCfQ glCSt6dGEradSuj7upDEgCNNHQo2iBr7Y28KWi1Qcytv6q9siC3rvkMj0Lxt+oKnzSIv ZOeQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ASLb+1BI; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=TE39HXilHAqr4VXxNOk6Oz9IW8feLbHxFQa9Ht64Rd4=; b=JUe2V0yWSc1HD6wDZ5WotzP8raWNi4D07vMJG3qB3ikJKozXkADp2E+dgd4Ks2P2xq T7ntgr9bTI4duj8nlZKEg2KCDJtQjdh7vhNmvBE3CviiWMS+33EAyZeYAfaoEdpLhcuU AE4+DRIdHj6yqO0z3b2UJ00eZZSjWGBAkpUY0= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=TE39HXilHAqr4VXxNOk6Oz9IW8feLbHxFQa9Ht64Rd4=; b=bD5GRaYY/uwGv92w+nrPUfPmh2go4sZ81I174H72sOsbYIaw+Of/XNdzhbXJxqECmO YcGky1Y81OqfO9FrvImx5tdWyEjOby4v22i3VhOJq8FVpuOVaAzhpXXzKY1wlyKcM364 Mle/kN1eF3vU5RQ8qaBFzZNaxGP7+hNE7S+W7UPePM30Rl7F9FE4/kqaeeasaDcodrbq IHmZA4CDtoKvfVZXQbzzhMuY9JxwEPX7Dcg4j+p8Y28jr1TEvwB96YA/xauG6vF/XbVG jyJt0nQH/wU35SX9CcvIf5NldwFnnhdSEsZu4r/5GwTPcKB8o/0i/9mqLhhpAB5GK6Jx xuww== X-Gm-Message-State: APjAAAUk64l+NxrpEXJ3Od/s7w+raIkYw0+B+75wXcJGQOBeI5aZzxoQ ETz26fBLurIO+UqMEwxqGH7MXnkY X-Google-Smtp-Source: APXvYqy30tu6qxZFQJyh/aeuehO89wmgBFYV1f65E4sT7E3ehMgDugnXxj9pG05hUuEXi1v5beceDg== X-Received: by 2002:a63:2b92:: with SMTP id r140mr20926060pgr.363.1560264764341; Tue, 11 Jun 2019 07:52:44 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:2a57:: with SMTP id q84ls4512082pgq.15.gmail; Tue, 11 Jun 2019 07:52:44 -0700 (PDT) X-Received: by 2002:a62:198e:: with SMTP id 136mr77823823pfz.180.1560264763979; Tue, 11 Jun 2019 07:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264763; cv=none; d=google.com; s=arc-20160816; b=O9fBi+Z+gfd7KoKxDVzJXoX/woY1F9XZbHkRssqJvOfvIihYeurdoQyI2OnadkngFy ss0hVjF4ZgNVG4yEBR91NSIIYsqH8CCDVb6n9Tua+3opSnz7pZ8zTUuSQ9OTKh1Nginm pny+MiqQjmJII5d1U4QxZ3LCSP/cmP4TpqBk3wwZgELIMXGeoeXAsifsfl3Jg4MmqFFy JqttiXCzw/RIMaISex8fpmYphH/HA3GQxz0YtG+0QJEsTgFS7rP/BNLREbTjjTlrsbGE n6HBBUDanid3CesNTBNLgyd/h59N7c4vv8jmhvBmyneuU5sz4wR3PBUtzC+y2NJzW8Ih Wrnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=IHluQoWa4h42xR+txLhRcp64NWWrhw7tiyZPWbXNKb0=; b=IbnVmO35T06z+NjGzhcyAGO5NefY+iYQxqmm0AMJBimI+lO6XtTFaPNeV5yWeWBVDJ kLRdaHATx3m6kQ6WtTnKLcaS5jwtP8YIjStqzwm1u1LgIBPcUqRQkTgT9VZIE3FQoXnc SAEJYcXjfXE1v6nC3A5K8FonenDpS9iABKDROFFDCWlF1edh0ZBwaDNP8fJ3O/BqBHyM n3/LU5ctfql5CdEe6NeHtEOsdfeNRpn2SiqPI8bAVPrTj2wU8gMSJl6QGU1MFjhS12D0 txzKrsB28l8EPgV+lp9zyR39qY+TLd75AvKEK5I7TPsyTdwJMzYW0PX58YSPtca7JLti 1G5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ASLb+1BI; 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 61sor8411854plb.56.2019.06.11.07.52.43 for (Google Transport Security); Tue, 11 Jun 2019 07:52:43 -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:a17:902:a98b:: with SMTP id bh11mr50050749plb.8.1560264763691; Tue, 11 Jun 2019 07:52:43 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:43 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 13/92] ram: rk3399: Add chipinfo macro Date: Tue, 11 Jun 2019 20:20:16 +0530 Message-Id: <20190611145135.21399-14-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ASLb+1BI; 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: , Add simplified and meaningful macro for chip info. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 + drivers/ram/rockchip/sdram_rk3399.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 49a5d14821..68ae8e8371 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -35,6 +35,7 @@ #define SYS_REG_ROW_3_4_MASK 1 #define SYS_REG_ENC_ROW_3_4(n, ch) ((n) << (30 + (ch))) #define SYS_REG_CHINFO_SHIFT(ch) (28 + (ch)) +#define SYS_REG_ENC_CHINFO(ch) (1 << SYS_REG_CHINFO_SHIFT(ch)) #define SYS_REG_ENC_DDRTYPE(n) ((n) << 13) #define SYS_REG_ENC_NUM_CH(n) (((n) - 1) << 12) #define SYS_REG_RANK_SHIFT(ch) (11 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 0a7137784e..0feb5d1e10 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1022,7 +1022,7 @@ static void dram_all_config(struct dram_info *dram, continue; idx++; sys_reg |= SYS_REG_ENC_ROW_3_4(info->row_3_4, channel); - sys_reg |= 1 << SYS_REG_CHINFO_SHIFT(channel); + sys_reg |= SYS_REG_ENC_CHINFO(channel); sys_reg |= (info->rank - 1) << SYS_REG_RANK_SHIFT(channel); sys_reg |= (info->col - 9) << SYS_REG_COL_SHIFT(channel); sys_reg |= info->bk == 3 ? 0 : 1 << SYS_REG_BK_SHIFT(channel); From patchwork Tue Jun 11 14:50:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 465 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 665B03F08F for ; Tue, 11 Jun 2019 16:52:49 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id 5sf9754468pff.11 for ; Tue, 11 Jun 2019 07:52:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264768; cv=pass; d=google.com; s=arc-20160816; b=Rg6rSP+06tFivHVyz2ufVPcP8vofG0AXKC9DdF4yu4fTki7JVayctb4h0ia1FfTRuN SKY5tQ1ILqs4KCDi2+NYLdQ3/4qVLUw2xsR5Ev/R4rc+ZRIo8hAT3qMthMUY72wLpWl6 /rxsobiU+j2uQ4G3w+SNAZop84JhG1cmqMxtUCv7XfejkHJNTaEVy7XLtV1mojNGEPxm eL8qEpSug5v7AtWZleRHwcBHTsjsWvc9J7pxjgsBX5TgNJpwwA87HrO70EnYWmK0Qp7V Ftev4P80/RDVDIXEL7h+p18ArUbxsAfNOM57sh3wxXn3iN4VlNiGlKWnWGD+7T5TBO5G w10w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jEtYh+2Ikuy/HLQJOzLQm/h02NqEne0DNQHeuFhkQls=; b=zo7TCYprleuWKEpaUjoEZyQH23ze65xQY9nGRZMptpsdf248DM7MNwsYbEr4G/8cVQ SsdWPE7+vDG3xhknsm/8r0tTxuouaWZfDIpa/irpkvugm/ecuTOGr4X8S8Cj0xQ5jJXF PmcgFS02oZTGIDKz1GQ9lh5UG+MX80g4fGrF+em1KKeTuFEyBW+q7pB4vzl8osfHfB0e vqXsabhjlztf1M1D6+yPyy9RvTGw/Tv4dRP/HcvskVa4DsdP/N3nU7IEEPhqcEXFf9xD 6iIbcSg79zH/hlVQFHkdntS5LSOKyh1wNaR1CAGfBxnW0yrPi/dAV3bwtaWT+QqekMom eYHQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WOqYtO7p; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=jEtYh+2Ikuy/HLQJOzLQm/h02NqEne0DNQHeuFhkQls=; b=Pd1ltpyoVzqChXwRs+8wPhLV6kc5VeAF2nNaueMiUFfpoHAUcAMfjCevK93AOmlbNQ JOsEFlVVpPi11wrsOf+fLL2HWCm5FHhfr2Kvscc4L4nZgD0AS0pgSZTdhQ9RkikzNDzV MvI/U5XIQ85YRUa/7nj1P1cMdSaBVNJcdWrGc= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=jEtYh+2Ikuy/HLQJOzLQm/h02NqEne0DNQHeuFhkQls=; b=BqA0pxtU1GbshI5WcHa7KTN1+/z5d8jlC1D4oRwdWs9CxdU/cgSuy0o10B/vymlvo1 HjB6rViwt/DYvJq7eNqdf1n/nZisG7ZJ9MbCJXeKS+uwDUduyMcebvJzBebcs9q9mpR9 fU2oknHgJqJI1D2hnZtR4OwW5R8CKgplRyCfDrL6wwyw7vGLDrESQZ6mOYr/l2uEH2m5 xKlzfN6bSml+w6hY2gxP7kmANPe+sdZX118iJIkrTa+bYjFu5D7yd9ge+39gvKcAm4hL CQSxSe22ezY0AuwsjWG7KSsX1L6dihMqUS39+eGY8KmpbfcdBDXPR4XcxrFUEPzsRXHA tOJQ== X-Gm-Message-State: APjAAAVG4hoWIFcxQR40nLUp89FyYUjj2fNmGv8VqYVUEHQjDjT08F3k kPhULCQQr1xLOPJKhJLNgxfV8A8H X-Google-Smtp-Source: APXvYqzvqBYVKxuZ1LjEjXBigGogtcvh2AD+K23k7H+EW3zaZ5nKshTNaX7D6aSc4scijP4ysv6krQ== X-Received: by 2002:a17:90a:ad86:: with SMTP id s6mr2695467pjq.42.1560264768212; Tue, 11 Jun 2019 07:52:48 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8a8f:: with SMTP id p15ls4699058plo.2.gmail; Tue, 11 Jun 2019 07:52:47 -0700 (PDT) X-Received: by 2002:a17:902:bb97:: with SMTP id m23mr11942760pls.141.1560264767842; Tue, 11 Jun 2019 07:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264767; cv=none; d=google.com; s=arc-20160816; b=d2XJgwFbkuAaVMaiMJrQ0IdeNGgnMnFO7WJLFAyGDeMOde0AyT5CPN9cEgwi67ozHh Az4114L6OPXtqlkpeMYDb0xWPqBSjJyojgNCEXBKBuFEtfxGfRI1M6Qbo8Vxnig7mc1l FPblUqQip9yUYbBuxrwIAo2urce20O3CGwbtX4YCuerZpnUfTac9yleuoYKCHL79vlvM xbsweiDNBfpou1DGhcOretNJKu6DwHXAWtjq7Z0hK+0UWtc+iJQhitdJET05L034zFE8 Bd9+MPvCfU6k9fueuholID0fTW6qgdbgc+00feniLVGKdI8Atu+0nzZA1A/TH/g7vEDl o+pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zIjqoFzVPVjK6wSUMlYVGkBeRuPJRs8ssaeE+J5e+do=; b=WJ5coE0HdoN1xWzDUYo0JxGn/tmrVIiECpbeVHHJfZ2gx4zYfGWfvsjyx3KTaCmQpD 6bI91ly/eS8+m3oCW2yz07kJPfMocSYHPZf+03qEAN67QziBWSvlLpODb5ACC4Wisxkr AVGrN8xDkTqG5kogClkbTn2VLBNjk2NcU7EM0UP97M3w4AegFciortlHuWBCduk3iwHo 7PSH2lElnaXw/C5YTfLtqdjQDrv+JHTfWHIDEbDNgFdfIeyN+mufUbwpBkg4gph6Qzm2 Fo0uw0JMrKohzJlVxM905OWEqkx+8Emy1kyurpN43tkl9PtvZ6HI3PapSPqqnGcKo9EF kptA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WOqYtO7p; 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 bc5sor15046549plb.1.2019.06.11.07.52.47 for (Google Transport Security); Tue, 11 Jun 2019 07:52:47 -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:a17:902:988a:: with SMTP id s10mr76925747plp.304.1560264767536; Tue, 11 Jun 2019 07:52:47 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:47 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 14/92] ram: rk3399: Add rank enc macro Date: Tue, 11 Jun 2019 20:20:17 +0530 Message-Id: <20190611145135.21399-15-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WOqYtO7p; 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: , Add simplified and meaningful macro for rank. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++ drivers/ram/rockchip/sdram_rk3399.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 68ae8e8371..2dfbc75bb7 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -40,6 +40,8 @@ #define SYS_REG_ENC_NUM_CH(n) (((n) - 1) << 12) #define SYS_REG_RANK_SHIFT(ch) (11 + (ch) * 16) #define SYS_REG_RANK_MASK 1 +#define SYS_REG_ENC_RANK(n, ch) (((n) - SYS_REG_RANK_MASK) << \ + SYS_REG_RANK_SHIFT(ch)) #define SYS_REG_COL_SHIFT(ch) (9 + (ch) * 16) #define SYS_REG_COL_MASK 3 #define SYS_REG_BK_SHIFT(ch) (8 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 0feb5d1e10..d801ee691c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1023,7 +1023,7 @@ static void dram_all_config(struct dram_info *dram, idx++; sys_reg |= SYS_REG_ENC_ROW_3_4(info->row_3_4, channel); sys_reg |= SYS_REG_ENC_CHINFO(channel); - sys_reg |= (info->rank - 1) << SYS_REG_RANK_SHIFT(channel); + sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); sys_reg |= (info->col - 9) << SYS_REG_COL_SHIFT(channel); sys_reg |= info->bk == 3 ? 0 : 1 << SYS_REG_BK_SHIFT(channel); sys_reg |= (info->cs0_row - 13) << From patchwork Tue Jun 11 14:50:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 466 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 877CA3F08F for ; Tue, 11 Jun 2019 16:52:53 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id c3sf7890437plr.16 for ; Tue, 11 Jun 2019 07:52:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264772; cv=pass; d=google.com; s=arc-20160816; b=pZXXDw4XIQfX1z15AgcNxlQqQMuVn84/9LyUKdLRnO7LzVThp0dK+SLmKeQ/vFdkgs r0DkhtRozRdQm0hAHLbKgt+7+MmUEXHrUcn/LH3Kf7YYQzvH5XGlkN8v8uu77OJH/mZO +m4/e9AGIW9aL4f4bLr87MsZs8rVudDssAiItWm+AHzDGxXRJm+YgDlyEI6Jcoq0Is2R wlhgL9pyZPn1VKmusTq3t4BJVGG684sOTIAN2Ubxzan/gxg1yZzv02sMSKFFFn0KA0B9 52GfcfeJJAr39Ozlds0TZdd/biJ4GgTj1zeFFNipBB421+oMgrznHC2sD08aOFXImVBY GcuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=5S2/ejDKRLJqdU9KkER6jpRtWoG1kgF3rJMJyfFW43U=; b=wHGCAUCiqUwGoTsElugAuT31Qboh1OuEXs7HHi0CD7l3kod3dOf9PnOwwYfotPJPBk jyqi3NeY7Jk4gAF+BzkTmC8E7njIvCvZyIGj0xEjhbNt2a7OdeiHJ7Z3Oi9sFbfEfJ1f 6YrWg1wGJR8wBGYbrIIj44Jhcts6+lWBpOVoc8Aa83GKX8TE3B0KXDQD7EAVT43tuWGI Lg9g+9g1xVj8R4y4MWcXAToBarcJQSrseBwYPxZ4Tezr2qJq342MT6JgQbegyckXyPDb dyaISUadWDYb6AyI2u3jD/E5hlmsvC/5B8nI0FbFzXGLKw+r2d+rI2bYSUHscRc58sWa 5/jQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gIs775IM; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=5S2/ejDKRLJqdU9KkER6jpRtWoG1kgF3rJMJyfFW43U=; b=N85m0cGCqsmdWC5YMMF6oRcUQtrpBy/HH5aR27gpSl/85xMTy4tJXGkCprFlqm2lVc YJltNXi7Sk5RmGASp+GbE2XwWbLoz6QljBtVBHJ9T1LExX+oqxxQJBjXCoi/wTqR79+P QAqQXl823OP+CGW2Sxd396Y90GUF/J2mpgOwQ= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=5S2/ejDKRLJqdU9KkER6jpRtWoG1kgF3rJMJyfFW43U=; b=dCWxMpv5w22kgLVC7KyygKC6SnfAo5CEs8HLm/oS3e0QjoRL0TdyJv7sV2X59e2grh AqwofjSsSsiH1Gmgx372sQ7CsPTjtfiAelQiDOHC79clOT7WMmfwX8HLVPKx8dWRtJwe dJjs1/jKM4NRDaMA1rui9AZDxeE1lhOqF6ZDN9iw+NWc9sruOpjpgdLqOXOv5iIjrOH3 8ckUxiuZsPWC4CW5bskOtnu0YNchONGnyjUj77OCjd0Nl9GETCNPh2GGX8ccxos1wTmT pjuvHlsYhG+qJOkUAyq4JjP1ubrJ/OejpmJbfI1c9alMdPxZEYoFU33XSvZAzHlfriGp guYA== X-Gm-Message-State: APjAAAVuu91aKmgO2RL2Yv3/OtJRmMjSQd4S9l7CJZsbkfu+pM3meLhk tDD6qOfo5HyeycyH9MzOD3HjZci1 X-Google-Smtp-Source: APXvYqxVST4JduPAgYCL1pwulGMi61hDGDfwgOXGz4q0ElJgovCEnIY53bj7UaT8EOf/E72vvoi/VA== X-Received: by 2002:a05:6a00:6:: with SMTP id h6mr16346529pfk.237.1560264772367; Tue, 11 Jun 2019 07:52:52 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:c015:: with SMTP id h21ls4513180pgg.3.gmail; Tue, 11 Jun 2019 07:52:52 -0700 (PDT) X-Received: by 2002:a63:5656:: with SMTP id g22mr5360994pgm.280.1560264771916; Tue, 11 Jun 2019 07:52:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264771; cv=none; d=google.com; s=arc-20160816; b=yqN5VdaoT4m8KRpwwR4vHbSdTP8X1gRy08vDAk0m2FDx8QWj1x9qDUpFbOqUKtQSzz 4mNymwFWo5JuL64j6wyKfUUoIWuoj4DYMJvBlbRbJ9z4VTLcc5vZjKhqtrqeZ4BuERPn Aoud5L7/p6+UcH76aJnuSbhhg+iYFu6DcqTlengMN9AQp7y2Rxg3lDx7cBmAC5zF605h MQ8t14GvmAw9VQafizJdQnnjSOFoeVi6rRRZBdogB+ZJ/8KHYdwkdb07bba7oCLBElN5 tQvyV0sp8M13rTUZdBTM9dvTp2h7B8hUco2QEK44ZvEhrEmw3irrlBHTLs+e9XAgoLlJ YFVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mdI9PCaGo4TDtVipfZ1bMvIbsyS7+2mosHhrJOFIAC4=; b=EysKMfb0gfi/wv/9g7WcKsuwtrLTMgdPj4in/5kbN5cWPwf7zswUrdJUtbXz469QGq WKxJbJ2kq4XQtdRbQm8BDePNoSV7pq/joisZriYcqNC5Edj02NFJFUN2Z3fIGb53BcBm jPnO+Cpcb6uc/HP22Vb+d58K6Itt2xqaBml1VPD1oKMntFl+kD3TF4KM3jZOoaQ6itJ3 C2dFlRlH6nUK1l7eo+/3Q5y5+4eiTBAYfSogz90TYEIQjSFr6Ach0ak1WmI0YqM68+5I e5BGuskG+jgyWbakpk3XEbQI7drvBoew07SWDyW29nDi4kHO3E0DTP4JywUPtzKGKxix K16A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gIs775IM; 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 x27sor6359346pfo.43.2019.06.11.07.52.51 for (Google Transport Security); Tue, 11 Jun 2019 07:52:51 -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:9a92:: with SMTP id w18mr51117563pfi.167.1560264771564; Tue, 11 Jun 2019 07:52:51 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:51 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 15/92] ram: rk3399: Add column enc macro Date: Tue, 11 Jun 2019 20:20:18 +0530 Message-Id: <20190611145135.21399-16-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gIs775IM; 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: , Add simplified and meaningful macro for column. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 + drivers/ram/rockchip/sdram_rk3399.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 2dfbc75bb7..8e809e8dd6 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -44,6 +44,7 @@ SYS_REG_RANK_SHIFT(ch)) #define SYS_REG_COL_SHIFT(ch) (9 + (ch) * 16) #define SYS_REG_COL_MASK 3 +#define SYS_REG_ENC_COL(n, ch) (((n) - 9) << SYS_REG_COL_SHIFT(ch)) #define SYS_REG_BK_SHIFT(ch) (8 + (ch) * 16) #define SYS_REG_BK_MASK 1 #define SYS_REG_CS0_ROW_SHIFT(ch) (6 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index d801ee691c..ad6c74374a 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1024,7 +1024,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_ROW_3_4(info->row_3_4, channel); sys_reg |= SYS_REG_ENC_CHINFO(channel); sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); - sys_reg |= (info->col - 9) << SYS_REG_COL_SHIFT(channel); + sys_reg |= SYS_REG_ENC_COL(info->col, channel); sys_reg |= info->bk == 3 ? 0 : 1 << SYS_REG_BK_SHIFT(channel); sys_reg |= (info->cs0_row - 13) << SYS_REG_CS0_ROW_SHIFT(channel); From patchwork Tue Jun 11 14:50:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 467 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 97D533F08F for ; Tue, 11 Jun 2019 16:52:57 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id t64sf7529574pgt.8 for ; Tue, 11 Jun 2019 07:52:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264776; cv=pass; d=google.com; s=arc-20160816; b=RIcAKl4A4Nyb8xrQfxXTcz6IPh5AomSRxdU392/GaFXL0XfkmKcS//JuMohvDUO+6g jQW1iNnxB4HlY4D82Vh/bORAJ/VFcpkTAnp/WrG21wtF66633mtA7GWkYxN1Nb5Nip+f YljOvw/7ui5H7Lu+KqsILIC/lygevB8lNXyWpPtpmIFLc69O4/SqonE0yFbS6IQHFAJ2 0WtE77Ri4+sQ7BkN/m1GjubC1yTs1ts9mD5pUXYbecnm/3ghjunCoWWO+/0vfKejXm8k fl8ku0FRXcafGikt7T6gUPZJW3wlh6QZytumzd6LPKkFZkKm2wFiMe1H/YORm1wnpLuT 5Seg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=NH+4RCvJgLLzfQ3tZeAFVNO4iUDFnqu68fDbUkAYqSM=; b=dWHVKlRYDc50qK1v8m2Z4Vo2M8yl4uNm3e9LAtRyFRHbmvIhLLNm5XRmhXHgCiNcru zrAyXgqpenRGLzvMI2tVUealdRq4fFYkYQYtlfOs9c3mp9cXF6hLDGVD5/J/r+Jn17ZB sImEdVAsfPNbRNV77PVxgpcUwngISKwoxKYMjIEcyM4KJPwIIAwaDx8LS7ieKuP402xH uBT5nR0ufqCcqrA22n1DnH4O4GQ1d/ugcLcS2wmI1L1aTrx1xHr5lQmEn57fGixtQRt1 Hk0xTvbRy9BXrX//9n/mqQF81vQJF3U/Q9NA5c9RBTG34LOLdiNcwzCwUqNut0KRINy9 qq7Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LO0Q6OJm; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=NH+4RCvJgLLzfQ3tZeAFVNO4iUDFnqu68fDbUkAYqSM=; b=AVGY/Jr093oY0IuUs9LKzBCKv7tBdQzA2kE/5roDeb8ZIwNhNdLDlwACThSOY2QGmR ekKVniltii4lwojhSe71l/7rOPbAOIVBrbE9G9alBYS656fqmK+6XtJk23tObNCOKo77 HzUYvCk4U5VsS7f4ZTyqqECohlLkvma/rzxtA= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=NH+4RCvJgLLzfQ3tZeAFVNO4iUDFnqu68fDbUkAYqSM=; b=rToVNzgbTQ6jjsGASGkUcZAfmpDRv4e2lmkgIbPTsdeZharwNFbhHvuz0+HWPaHY6F rTn/stH9s6b1BtwrFxYBS8+0BoGpe+xzSiaBsqtoFSXPZ6Kcfu8pgo8GLmdIG8bjf573 8rOO4oRaIumYPGkwm7uWQLqfHbmOVJeE7+/hviMetmH3AOSW5ESy++LHFNdLaNWILj4J CPqpH10j1zoVKuPAieHhwwpaKdgkDjoCGQsy5sYLAEKaSXHUEvRh+Udy+MtlSNgsJ9kt lLIfmSWOhzEFRmbYlP0BBSc9XPdRIbPpvl5ruXTQ4pDGl0UbuWZlkML5PSkKOyxLHPhF setg== X-Gm-Message-State: APjAAAUR5Hj1SfyFV+utystMTCfcfeIocEwI1vipHBCg1kw9iD+c/bPB uFW3Knt+nkKSezP+36dtZGEG/6kr X-Google-Smtp-Source: APXvYqzqnLXQnoxnVuau35JAXbprAxigbzPW0jteJPOmZuzngOA0cNRGEz7th9VRj+NwQf7U4QT+Ow== X-Received: by 2002:a17:902:1e9:: with SMTP id b96mr29841271plb.277.1560264776235; Tue, 11 Jun 2019 07:52:56 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:760d:: with SMTP id k13ls4888630pll.14.gmail; Tue, 11 Jun 2019 07:52:55 -0700 (PDT) X-Received: by 2002:a17:90a:de14:: with SMTP id m20mr26792816pjv.36.1560264775843; Tue, 11 Jun 2019 07:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264775; cv=none; d=google.com; s=arc-20160816; b=FoogpwpCahhgV6IkslmVqLBbp/hCauvr/w+FkoO8fLv8pX37AwbWbKwZA96KJ4Fgr9 J+wrFxPDsDMF+oPF6nWwN2+2LIjKLHsYNyG3x1JYs+alhJi0u8eKXDhBdvCFLOcSnUot wMh9gaU/kTHk1ay6aqs9BEhXoVDZR0MAwNlROO8kGIyi1kRMhEVyh/ghRszN92912akJ SAojEtNEjw/Q3Px1xWrswCQXd1ykm5COORQamN5/ssu7n31p5FQhGs/zcjr0H6PWQZxl v8NNF+O5eTkMXKYiUwsaaDNVTxj20QQVdqaHwvjFlw9MbqKT8puhawJHaX+Rg/fz16uX Wgxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=HRSwurai7D05BObAUlQE3Iz1vMMyKc3TU8vO7TNNVG4=; b=MHTtytzz+ZhKI47GCAFNtMdPstdjwwv1K+qIbl5AY3veS6hCuhRxGt2LQHeh7dmMgB Iyfigix0niUahShEPm0gygCDasVrAnBI4K4agkMMozkQNkaO+UO4Jjbt6Ef6u3A1nxn6 GxpTY2g2MH6xPvqFWAuDWOhme4OS9Dt9I+3BjHz39I36UEgJ4JL23+YEbWK+vLcDjbv1 DUalXlCY8Oxb3fKFS+mt8pxupkFGMvmJPG+gA6jWpCZbjr6ecBV631/DGzapoZVF4KtO riyMlWCjQUMqOuo49rDiDKLz1Y/55FPwmh+nn3v9+JwFdLC9bZx2EnBTOWqLoBHsAiWy Rkow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LO0Q6OJm; 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 v75sor3152685pjb.26.2019.06.11.07.52.55 for (Google Transport Security); Tue, 11 Jun 2019 07:52: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:a17:90a:fa07:: with SMTP id cm7mr6440701pjb.138.1560264775502; Tue, 11 Jun 2019 07:52:55 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:55 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 16/92] ram: rk3399: Add bk enc macro Date: Tue, 11 Jun 2019 20:20:19 +0530 Message-Id: <20190611145135.21399-17-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LO0Q6OJm; 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: , Add simplified and meaningful macro for bk. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++ drivers/ram/rockchip/sdram_rk3399.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 8e809e8dd6..8a71e8ad87 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -47,6 +47,8 @@ #define SYS_REG_ENC_COL(n, ch) (((n) - 9) << SYS_REG_COL_SHIFT(ch)) #define SYS_REG_BK_SHIFT(ch) (8 + (ch) * 16) #define SYS_REG_BK_MASK 1 +#define SYS_REG_ENC_BK(n, ch) (((n) == 3 ? 0 : 1) << \ + SYS_REG_BK_SHIFT(ch)) #define SYS_REG_CS0_ROW_SHIFT(ch) (6 + (ch) * 16) #define SYS_REG_CS0_ROW_MASK 3 #define SYS_REG_CS1_ROW_SHIFT(ch) (4 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index ad6c74374a..2614fef407 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1025,7 +1025,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_CHINFO(channel); sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); sys_reg |= SYS_REG_ENC_COL(info->col, channel); - sys_reg |= info->bk == 3 ? 0 : 1 << SYS_REG_BK_SHIFT(channel); + sys_reg |= SYS_REG_ENC_BK(info->bk, channel); sys_reg |= (info->cs0_row - 13) << SYS_REG_CS0_ROW_SHIFT(channel); sys_reg |= (info->cs1_row - 13) << From patchwork Tue Jun 11 14:50:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 468 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 75AE83F08F for ; Tue, 11 Jun 2019 16:53:01 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id a13sf9259755pgw.19 for ; Tue, 11 Jun 2019 07:53:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264780; cv=pass; d=google.com; s=arc-20160816; b=EaKuorEoNUiduTTxdSLVOwJhguRWukpa9mhK7t0awgQLvgomDUHhyzODmvDfY7efbp VhZKYzXl0+wCHCzx0iyTO5Lfm9O0oNfkRABdNI4xBg/WMX+6Ygo12BC23j3mRptCg/Ue T8rPVaGGNDyTWY2MyyLISNMsP9oqxy9+bBU0wp/7FlxnddDjBwCFof+ip37pbjZuG12v JBhZld6AjKTxFFvZWM9KLUpa8H1JISO6VeEq7ooZq9lOBhRqNwxepfmGYBBT8l6yRXaU eEmXxNUCZgQwsm0Yt5RHgCopG43lPJdLC39RceDqfW77Hfi+lGfrSvKJhTt7T1OZlimT TneQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wuQwjVA18kLC0ZiUNXzCZWw2hkGUUklBgsioBWsp7Kk=; b=EGMlE7VtRR5JmucOOleQV0QGuYRilS74pxQlmAQTTPS/Vxvn9q/ui8/eOyiPNoojw+ jUEUFT/GUGYpMN4PceZHxJw82bzLUj2ItqZO856TGd08s/BcjQUHcfM/OXPTqHD79CXl aXg4HR9TmPb/oNdsnAxlKvA7Xwg8Hpp4358zkBY0iKvwD45s1cvEPIGa6pTxasSpNbsj KAjJj+a+4vRE9EDtxry82Id3By0MOqX5yC6Y7NkUTeFa9RGhyWDErAbnpU9PLCa0hWb9 kI5zUZ7IsPHEnq/H/wgU5/ruh9T1915pSr9NtErlO72r3vDeh83YIJ6hzGQAZq+WwmBT VvBg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jvVjp8hb; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=wuQwjVA18kLC0ZiUNXzCZWw2hkGUUklBgsioBWsp7Kk=; b=EMZ4uSoCegAjEP1unireRMlYUqxQ69QpxcQjHjPElvh+m3cfPmQuTB9KYLMWNpFqzW EO2I61rfb7T/dkfvIvXOxRsz6gjzLt38/MCruHsT6ZQms11T37roPPlMiY+Oxtav0MxN 3EGr0rz3pPzwPBvZBkgyhGLjfmV9pcmcv9+y0= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=wuQwjVA18kLC0ZiUNXzCZWw2hkGUUklBgsioBWsp7Kk=; b=BpmFdqPIHexxykQcOYUZ/7TUQrKSSJu/RU/QMjCGoPGLLLvTogM/h5fJVH6Pr3QUi8 nHbWir1YoZjRwAAtGD/Bcjg9ra7kPga4PF8jjqYAdDDtW9rX3onsQ33k1XqVMwmGNfVM v82DJ1wh5oFAPUCjrjym1SFxwoZfIqF0qAnxhXX9KkgG3yU/6TbqGKNYYW7mwZ+OFm4m YyUT1sT1JcsKIBrAsKb/ed2VjdvGQPMmdyhtm7UJW028tC9jxnUHWYt3jq/i5s2XOME0 nM7DCgy5omRtbwsTr1DdlCaQy93nC1jWW485AXjgTcq67qOgOjvohObF4wNuNhUrnVF0 mSUA== X-Gm-Message-State: APjAAAXSDJu28Gl5+nuuiRJxJRdOmKeazyhS4ao/d12qIhBBX3R9VZT3 6C0+W9bIvpVPiHpD0xj+hRm2QOvZ X-Google-Smtp-Source: APXvYqxPWSAqbErgQzfDxjtzB5wvqgJPUAQSWQdmxV2Sk9i32FwCzCKeUGqtki2xBpnNjCA9Mlaydg== X-Received: by 2002:a63:ee0a:: with SMTP id e10mr20400305pgi.28.1560264780154; Tue, 11 Jun 2019 07:53:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:868b:: with SMTP id g11ls4890440plo.15.gmail; Tue, 11 Jun 2019 07:52:59 -0700 (PDT) X-Received: by 2002:a17:902:bb8f:: with SMTP id m15mr11127048pls.84.1560264779803; Tue, 11 Jun 2019 07:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264779; cv=none; d=google.com; s=arc-20160816; b=QfsTeNbLx6c1n9HvrpZEm7oqgxgBJfYzQ/mtqGEvwXG0G8c3pbvXZ0NeR3Uv/mOI48 LVMez+nHKgeKE4Pf8F7nuHwoxwIkBgQCgN8HJWhuldKXGOvk7erZdYy7r7XDxu8rJEjJ hJRMEujzFOiYJQhaPtOOATdf1gwsVMbtRhKIRSvpXU577D7tnjRfUk1/+/mVgbix7x4b TNVti4JGwXNkKKz/z5B623p/Xmh28oJJXP5i/I2jFA5+Hblgl6rqzx/Twz6z9AedksAO vDhCEcILHgXRnXUmDs+n1FFx5zE7ELj8h2tg5nY8BV/RunDITtqT/N9GzrM5tZ6KHnnf BsXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=R+1CMpZiNEH+ushANNr2dTBii85xIEL+0FGwdkiznWY=; b=Sw4gHIK+9TpIxO2X4Ynk9xx1rv1G6oAZjRCFH2eLmRjLN83ayEpXjj+EAyTUHOVoLm uf91LL4YmZOtA6dmQ5bA/DSIZ/f/mNH2LPmwmJzjGqqmSMs3J6qlGU+B3X/aWvB350Bl hfGQt9xPOU2UDH07T7S4tZSO8vfuEWKBhZrgzqXmmxb7GF0wk0cdNFhamxzFqiFirk2j 81Sjh0uRtyA30WSM0bpT7no7wyauuaryImshupWwsqd2d1XUZmC9VAhlyX2YlxM+PH7H LptRRxeLwqjxqtNvJA0idtzzT2tdBT5wyJa5V4Jbo9FzitaKF0rsNO5YimA11Dhih+az jojQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jvVjp8hb; 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 36sor15300775pla.71.2019.06.11.07.52.59 for (Google Transport Security); Tue, 11 Jun 2019 07:52:59 -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:a17:902:934b:: with SMTP id g11mr63998336plp.245.1560264779500; Tue, 11 Jun 2019 07:52:59 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:59 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 17/92] ram: rk3399: Add dbw enc macro Date: Tue, 11 Jun 2019 20:20:20 +0530 Message-Id: <20190611145135.21399-18-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jvVjp8hb; 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: , Add simplified and meaningful macro for dbw. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 + drivers/ram/rockchip/sdram_rk3399.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 8a71e8ad87..3b0557cb6d 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -57,6 +57,7 @@ #define SYS_REG_BW_MASK 3 #define SYS_REG_DBW_SHIFT(ch) ((ch) * 16) #define SYS_REG_DBW_MASK 3 +#define SYS_REG_ENC_DBW(n, ch) ((2 >> (n)) << SYS_REG_DBW_SHIFT(ch)) /* Get sdram size decode from reg */ size_t rockchip_sdram_size(phys_addr_t reg); diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 2614fef407..4047b4b7e3 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1031,7 +1031,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= (info->cs1_row - 13) << SYS_REG_CS1_ROW_SHIFT(channel); sys_reg |= (2 >> info->bw) << SYS_REG_BW_SHIFT(channel); - sys_reg |= (2 >> info->dbw) << SYS_REG_DBW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_DBW(info->dbw, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = &sdram_params->ch[channel].noc_timings; From patchwork Tue Jun 11 14:50:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 469 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 429C13F08F for ; Tue, 11 Jun 2019 16:53:05 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id g9sf9248732pgd.17 for ; Tue, 11 Jun 2019 07:53:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264784; cv=pass; d=google.com; s=arc-20160816; b=E6z5MohtQiV+mFWHYgS053IZue5Zy+ui+vq3Ms+tUdm5ZLyTN7rn0HEYWojSmlnDCi AwYhPtO/4sBui25b4pHVBXMlCkel4DbhnJRTzEgWO7Q1N+EI+sq1SJkH8YZ27fkfKwG+ ZT+321+8vKLu7tE69Nik+9W7j0PVDdDIXIenEWAY4tuA/8iSMfdDFd5q9zxuDhgARDoo 0cOt2Qz+aYG5C0zBrFGPb4ewVrP0jhRqjzE+gasGs/wWXiT58HmM4dsZ1WvzrGxeBrcJ FZ1jCGxcoxWpuYdv3no53ylQ5T43xRQnqVMynTKl/xNEZ5uO9BJtu9RBcx9GzP/vx+xc v2pw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=HngKkcgjNFz2bS672QHjG+HBbHw5dyNC4uK0Aaxl8oM=; b=J45m6nk/h2lkNKFBf4PJHv+SY4gJ2JubdE24Ldi63ae/3hAFjMvVo0Mkf7NGAwF5fT LVHTKb7kekMfqoKOmP9OTEoMRKRIvoC9XIj+ePn1AA8Qvx1J0CqaWyoxV+bkOBKHkaVg /BT0/954oarECC1nLdaayoQuIfA/rYfmEAwCGfIVo6exKtsy2rKjHls2nvGOh6/iokPz v5xPfmecW1j3jgQkTDcMxphIDbqKWkP1mm4/kDFO3TuPrJ2yM3oUc0/DFG9R1OOCZBqm ebG2wB1teOSb6PEChy2IW4W1G2HAt3TKiYRPCwHh4gfUIk5jt2aE3MDKuVbM01pIrork cKfg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=T0WdShfc; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=HngKkcgjNFz2bS672QHjG+HBbHw5dyNC4uK0Aaxl8oM=; b=Ki5kWRRMKLEf3YCPYvVeN0FpHcILzaVqf5AMRSmQvWwK23OWiF1MlUZLRoWWHvu2Hg 4SKgdnLigOco+6kdXD+sURQJw7lZtz0/1d+74X3qkT1FiES5t4PiXnHVWjUQMb1Tdxg0 GPBDhkoT+pmA2HuzGqNq6mW0jTW7b9U4F53R0= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=HngKkcgjNFz2bS672QHjG+HBbHw5dyNC4uK0Aaxl8oM=; b=OxRJPqMIl6ZIIbxf37brxRaXTpGjujMB3FsT7AHECfxE2C0A6v9NiV/lVK3VX05F6Q vuHvNirZX98bU+dpUG6o+7OephHZXfJALrKhKZSKO92C4FGftI67JF9x2orhCgHo5pkm I6erIIp5mp+ct+QCbZmFxKjAZdD+htmJmgo7D4rzLoCeddB3TTSwLkmdxGYsMRn6KyOS kThe6Xz+bd7kZotWdrunn6QvKcThW5qF8gJOhYeHM3Rq6eqw+wSKCGAzAqLJOYs+9UjW EtE0i78yPbazQvm1I6yKaSEkSE5LL2ybXUEl7XVa0UQJHdHk9SXjlHL+SOARxcq3de9z J4yg== X-Gm-Message-State: APjAAAX4M0Pnd46HjSpmGlDjysODcD8Ro5NFYpwVIvFvb4gAn0nucU+8 KVYz09leHYWBxxjPBC88qns2g+zm X-Google-Smtp-Source: APXvYqwjyNuRdpmFsQmkNM2UHg3ZFrQbzECGJsyPshv/MMcGbEg2yYg1U7V4nZ5whskGLP0IEMsl6w== X-Received: by 2002:a17:90a:ff03:: with SMTP id ce3mr27028838pjb.81.1560264784103; Tue, 11 Jun 2019 07:53:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:1c1e:: with SMTP id c30ls4511347pgc.14.gmail; Tue, 11 Jun 2019 07:53:03 -0700 (PDT) X-Received: by 2002:a62:160b:: with SMTP id 11mr80603154pfw.30.1560264783779; Tue, 11 Jun 2019 07:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264783; cv=none; d=google.com; s=arc-20160816; b=lonPNV5ub//RQ/u9PBW/nQixJ1AMYmUmKqb9j0MSx4RIB9FciC+JJfunTELuWVzPBK /YS4J1M8WPyJXmXG6mSyL011kHEY64KZqP4co+kc+Ug8DsWPbOuFN14U/a6CM5nj61+o 7qYduj77t9Vk+kLPPdlaQxoyqNdrN/FrjUiS602hWr/jlQlQDpCb4f5+DTlrtzMYLAtb 54/+3B4F19EAvpdTVrrXanLpEHd5VUUb3IgL1eDRD006FKcWLCqevnumQQbK5CTZD9yA 2aDntszTQvxFfuGXq5/T/IcyWJre7oceb6acX+DmW4Zckpu9Z5hc+kDvUytFGXl2nvnP eJQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=o+DRTYHelsXkRTvkcjv8LykYwXl9zXvDsP/xd3l/rlQ=; b=WA2AB+X5R9tFpFyciAyWbOtCmx7CQGG7XnfoY/WQ80IX9vnSEQORE1C+xfuWChe69H sKVKacOZv+PVkPk0sJ9quIWAXuifod/r+GlYyl4eDsK4vvhiV74j6VzkeUhk5CugEb7k 44gkHIEptdB7OlDEGTnDeov420z99/X7BZZ+VcsDEjoUNyELleoRuBYVFhoCB0J9GAG4 6ty0Fhi1l6ZAA4SXxlGv5SsiRUk1sIYRdDj4Kf2VaBHtfQDCS7YJCD5rk8+hdZh1P7KD UWWTjTfp44kZgvCqpzOAoeKRz5ieJI6I6uGvgbCeN+YfG8hkXWK8FqBcAZxe0ljSf32G H42A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=T0WdShfc; 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 a8sor3151606pjs.19.2019.06.11.07.53.03 for (Google Transport Security); Tue, 11 Jun 2019 07:53:03 -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:a17:90a:338b:: with SMTP id n11mr14237563pjb.21.1560264783437; Tue, 11 Jun 2019 07:53:03 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:03 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 18/92] ram: rk3399: Add cs0_rw macro Date: Tue, 11 Jun 2019 20:20:21 +0530 Message-Id: <20190611145135.21399-19-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=T0WdShfc; 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: , Add simplified and meaningful macro for cs0_rw. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++ drivers/ram/rockchip/sdram_rk3399.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 3b0557cb6d..5c94dba39e 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -51,6 +51,8 @@ SYS_REG_BK_SHIFT(ch)) #define SYS_REG_CS0_ROW_SHIFT(ch) (6 + (ch) * 16) #define SYS_REG_CS0_ROW_MASK 3 +#define SYS_REG_ENC_CS0_ROW(n, ch) (((n) - 13) << \ + SYS_REG_CS0_ROW_SHIFT(ch)) #define SYS_REG_CS1_ROW_SHIFT(ch) (4 + (ch) * 16) #define SYS_REG_CS1_ROW_MASK 3 #define SYS_REG_BW_SHIFT(ch) (2 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 4047b4b7e3..e3555504b0 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1026,8 +1026,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); sys_reg |= SYS_REG_ENC_COL(info->col, channel); sys_reg |= SYS_REG_ENC_BK(info->bk, channel); - sys_reg |= (info->cs0_row - 13) << - SYS_REG_CS0_ROW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_CS0_ROW(info->cs0_row, channel); sys_reg |= (info->cs1_row - 13) << SYS_REG_CS1_ROW_SHIFT(channel); sys_reg |= (2 >> info->bw) << SYS_REG_BW_SHIFT(channel); From patchwork Tue Jun 11 14:50:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 470 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id EDFD83F08F for ; Tue, 11 Jun 2019 16:53:08 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id i26sf9740887pfo.22 for ; Tue, 11 Jun 2019 07:53:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264787; cv=pass; d=google.com; s=arc-20160816; b=mAjAB1PEj7dPyCKwIXPZ/aCZaPy71qp86aDe/VQwi7SvNlEqiFWqMVQdpYqHwWCOGZ 7a/KtAyk/qZdfvRwc8hzCkyd544/YoTGnMfxuiDEGwbP/SOeW6IjAnMWX6ubdBbYFLJ2 DuoolBvtLfK0ElRfLTdIaQAPAAef2+zDi4JgO7Uanza/aV+CFytdmBxsjfINXogYuxug fyTO8OlasYHnZm3DnJvGvg+fDDIznRrZXIqXFN5+lOYmvUvX9jq8/N38fLFDfNK6QRDe pmLpnBQOT/tPHQYbm//7PhzMd6cMcTm9FxqfMpKsg/QQZ6050pYA5iQfkkgZPPDlh1H8 jlLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=5WjvWUZr0p4DsRsUogHD/6X+FiMh1NhuID+bpbpLQ5E=; b=kxw65XtO6TfxYfAqnN+hEblzvLfFhylxmQFiE7ulntb4y9u9z31nKEPIa/b3IN2J1P 1xJRRZZ8nXMn0POlntrW22xuMUi5LoqqCY86W1cGbDpwPQdwM4F9AvJNzDaX3KkfVnOg avU7NFxnfQKkTsTUUKLyu7gn/FQDGF68Lh89krc1UWhbf8HvhwT6oy86ri93HUommeJF +CYXZhT4IPOGqN88TLaglHzqzI2eAxI9DVHOcBWz7KWBmVXIBW26wenw+oR+MRCpgSHy BT9J3MEyCUyOHT7Pmh4dVGtd45xjnedM+obHQxBlyQOkeYmlGtrtVDFk2ZZ2LEI/1EuN aCyg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="a/eJ/2kS"; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=5WjvWUZr0p4DsRsUogHD/6X+FiMh1NhuID+bpbpLQ5E=; b=YEn/TPnW8c4AlL4t3JZgpKZWwjvNLmSLKI2loiATxUx3VBiE0U+ljNuEHhf2m0W3ZL NB4VsYXpPDm26aam99HcFBdTl/qq1F+uCakCOTSN4GzM6MjwHCCy0hzdejfoxMqMCcNq b+IIzOfHlFifT+88NNCRqovK9Z1SHI2CNXvGM= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=5WjvWUZr0p4DsRsUogHD/6X+FiMh1NhuID+bpbpLQ5E=; b=H4ZKkXaWJwG1JUy0WKdZr+1Xu7arKeOlMC3C677AB2y10JHJASxptKgiL1fYXhZr24 HY+memXXWrM5pBYeiLAz9nR24nvtNzWk6BLROYWtWceMi6lgofrTX5LuwQa32AfK1AIa ylfRd32SaMFwg6D6mMYO3is4xFGrPNTMzCPhknZ6zNAUMYvPVl0pWH28CwFH68Bq46Ac VQa3xTXJuyhcdfqMqg4Xdg9kq08n8OO88Pv61ss77AybJltUqxbrFSo0NJNpK9IbIg8r 1EbAhTVCA7X2Cboazi+zso7abZcdUryVl0XZ4ryzGIWZ8PD6bltLB7fHZ4JsEDDDE+OZ EiJQ== X-Gm-Message-State: APjAAAWN9HzQBIKzAbEn6iEUlp8ycDz1wIeMJ+FepBrSTT8xz+kipXO1 B/sP66IR5Pe1DevY2RcxWWugvqWF X-Google-Smtp-Source: APXvYqwEhsMtYD+QrDj5aSWy9MqAQK+X3aEo08bHZoXZM9Myi9ZU6CB0glb34xibUr1skKWgqrN28A== X-Received: by 2002:a65:51cb:: with SMTP id i11mr20090222pgq.390.1560264787715; Tue, 11 Jun 2019 07:53:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5f87:: with SMTP id t129ls1382468pfb.8.gmail; Tue, 11 Jun 2019 07:53:07 -0700 (PDT) X-Received: by 2002:a62:5e42:: with SMTP id s63mr78006260pfb.78.1560264787292; Tue, 11 Jun 2019 07:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264787; cv=none; d=google.com; s=arc-20160816; b=mw2syTN1uVNRxlOKQpDSL0JHdATwG9pDVIKID0YN66rtJyWexJhyfbcFxRNrR57NY5 QOMqA/Znuch+CTdxHBSn9fTc7tdvTg2LdXtvjjgg5i83Hb9UMz4f4GUAaoGdviWCNw79 7lwG7LffsTMTNbXAOiHJ0cG484CN0tUdpCTJsks91qcZ5jGy1oZwg/+NL9BhC3dd/mwM gGoeCawFV3LDCSAlpgXYnKsk2c6zx9e8U5S2s//OUz1R98avTdkJgRU96HLLJfr6EmZt ZMNqgtO/8UKpmHRKYn14uwnK+cdO8IMNIASyUGBJBLkkM22CCH6hQrEHhGhYjg01PUeA 1EPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=59prPU8wNA7H+Ep8x38GhAOTW8bSdYKxRxuLXaLFotU=; b=p3x/UoMEqR+4GuzPpebF2ZitPEbbLZ5n+xpgjcPLdGzfylCDzwAnCwgRwYsxWE66zM QN6wslFBsyEjQoF/H4Ry3xONbgJuU3AcOefhdtvwMSjr8KVs3/47MlqDJqzvXWlVctzR A4pZ/xkbrzaMB3coUxOKSe2hC9S8M2F1cd3mTScKJg6jVZiiemVfH3V7IpcPadbdwXVL 3YezsTbnn6R4tL8HMyQ4BYyldXoWdANk7OdyZ7uy3o4/RfZkpbPt5dilAWNW/X27MXdv IuH5dHesF8d8LhAVaBR+0qlrva5SkTtkCr82RjD3rZx4nJzfCWyB8fKbRagoetm0Y4pN bQjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="a/eJ/2kS"; 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 b18sor12004942pgi.7.2019.06.11.07.53.07 for (Google Transport Security); Tue, 11 Jun 2019 07:53:07 -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:a63:9548:: with SMTP id t8mr20561291pgn.256.1560264786926; Tue, 11 Jun 2019 07:53:06 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:06 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 19/92] ram: rk3399: Add cs1_rw macro Date: Tue, 11 Jun 2019 20:20:22 +0530 Message-Id: <20190611145135.21399-20-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="a/eJ/2kS"; 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: , Add simplified and meaningful macro for cs1_rw. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++ drivers/ram/rockchip/sdram_rk3399.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 5c94dba39e..a4b1742438 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -55,6 +55,8 @@ SYS_REG_CS0_ROW_SHIFT(ch)) #define SYS_REG_CS1_ROW_SHIFT(ch) (4 + (ch) * 16) #define SYS_REG_CS1_ROW_MASK 3 +#define SYS_REG_ENC_CS1_ROW(n, ch) (((n) - 13) << \ + SYS_REG_CS1_ROW_SHIFT(ch)) #define SYS_REG_BW_SHIFT(ch) (2 + (ch) * 16) #define SYS_REG_BW_MASK 3 #define SYS_REG_DBW_SHIFT(ch) ((ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index e3555504b0..f69194f29b 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1027,8 +1027,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_COL(info->col, channel); sys_reg |= SYS_REG_ENC_BK(info->bk, channel); sys_reg |= SYS_REG_ENC_CS0_ROW(info->cs0_row, channel); - sys_reg |= (info->cs1_row - 13) << - SYS_REG_CS1_ROW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_CS1_ROW(info->cs1_row, channel); sys_reg |= (2 >> info->bw) << SYS_REG_BW_SHIFT(channel); sys_reg |= SYS_REG_ENC_DBW(info->dbw, channel); From patchwork Tue Jun 11 14:50:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 471 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DDAEC3F08F for ; Tue, 11 Jun 2019 16:53:12 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id v62sf9282153pgb.0 for ; Tue, 11 Jun 2019 07:53:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264791; cv=pass; d=google.com; s=arc-20160816; b=bIzGIXV+W7pe6nyoAP+w+7238ioOUFwghNoiCNOFcsPgkl3yDdQRKaLKJP19melwv8 x2IzUrqZcsXQCIIK4uZaDRbn8IxW168zHguXcQxEs0sM1rRCxV+pyMsf9W69uyFYiWQA 8rJMmnzRyhIos/6a+0v5aBWLSv07nt6wuYX8dvsj3nTUGScbrsamex2b7DXms0u6GH4p 2KOHt78ognmN0KR+q0erCIWU5lInRdbW7fqqe8Yr0+HTM6MrX1tY2ByFDqH4Tm++X8eB LUHMaZ6wkvXTRnSmDmsyF1r1A0SZ7yo7XtUrc/usV1r6xoQQxY+OdTi3lxWToLq9wtud t5/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=INu6R+FpcMVq9mGhpAfffwgbm7NFvKVyXLdYgIAdTKg=; b=zXhA7kV3uB5VufEQF2+lr0NwA2JOoKIvavEtZNL95/NOnsxobihBqgQm1WGBrgHS7H hf5Q8Mwy79+UsBeQQJB812ABa/yk0S9QqcW9KWioHM8/FS2DaxVhwh01tYOXDwidHenU 1/qemn69m5i2/PdTANfWQdH2gTiv8GwDEHKml4Fu1vAfH+RfxhBJTkQ4gal/X8t2m4he qNETQNdG6T+EBuoOJUuKjo6wJVmygumGAW3WnFKCEvo8tzhzAH/034L5B3lZS4Q5TNg7 JHPHL1brngWrHfwytYXOIn+qyM3YKTWs/a7Ed9OPFaporLMkUP440EQ8C7buw69mjgV5 +6Zg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RNjtSAvQ; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=INu6R+FpcMVq9mGhpAfffwgbm7NFvKVyXLdYgIAdTKg=; b=dONI27YqxSSpoHhO1CgYO+3zdUf4k5zrC4sRVKJqGCjFALLPqPHHRsd/k1RV7bytAj LeW1tCz4q1ZJF2MwIX6kVEdMBvZjS1X6ykgo/I1qFUBZZlwMd27SB8ZWrzFmIDkNb/lb N5dlw7iCTbB/tWj/aRO1eWYklgiJF0lfDMzuc= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=INu6R+FpcMVq9mGhpAfffwgbm7NFvKVyXLdYgIAdTKg=; b=CaY2A3k5jHWNJpgBS/72c7d4DrE25DX7u8r+AruwHiJBCnH9k7oF22JeSa+lqbc6mg e1Sp3F6m5h3eQ1cCCfnf9IVXtE3XNA1EX7ZVJlpp2Be9sCcYDbe8XHZprJfh2e6Nckrk OTwwkif1duYedAoR22DGKRG/uxGxhAZ6Ee0uszd08NBOQ5O6RCjaS8ElGWFAOYkesL4G OW5Wnr3O3MNXDShZmTjSDTs4eR9uqyO/7wQkH0wQPo23mGoE6EAlJzsbiu+eX4yyRaoZ V1KNHIetrv0H3QZGaLRzbj7mjWW5znwwROAgDBdJvIL2nKBvO/xu16ArESsGifB7Raqx M0Pw== X-Gm-Message-State: APjAAAXycHlPFCrEotJ3eyO6Dd+iYLo4Fa9KmQ0w/NZkboebKv2u09pr p4C2AvQaiLNM6iM8ztdf4pQ/a28s X-Google-Smtp-Source: APXvYqztpNK4vMdHStS3NWy7Z/aqJjM18MrD5+KnkToDZc00baC/OujYs+6AEgLdgzzdl5GjpdRFDg== X-Received: by 2002:a17:902:2869:: with SMTP id e96mr73578352plb.203.1560264791741; Tue, 11 Jun 2019 07:53:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5f87:: with SMTP id t129ls1382509pfb.8.gmail; Tue, 11 Jun 2019 07:53:11 -0700 (PDT) X-Received: by 2002:a62:4c5:: with SMTP id 188mr80381156pfe.19.1560264791317; Tue, 11 Jun 2019 07:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264791; cv=none; d=google.com; s=arc-20160816; b=drDJbTAXFt1gAjJjmsnareYnS2tqxNKyVdhR3tPRF0kQobx3hCsqYlCqltskJJDBq8 rLaHepep0o02BJRj4ZJGAlZq4iGmWvhBI/sRbwrqy06a0HVGJ1jNpxmfkP6Sz89L9GBZ C2rZdrvVp6/i52SOa25hQ0INBdg6Ds50xv1kWQmkLwP2wq3ne2OYfEnR09YeIYaCn5ZW GYRkH04DJHH+AZWr8vtXkNZqCkfWqvSDaXRVq7nJvpyxcQniJl9BVL6zd+KDgvBdaRH1 QBmnYvcYUZZeYPrz2tn8XYblj2OQ0vgd1XVT9STqAKhSiCZHJt08Hn/Bo1xyn4OPlRfo DlPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=MNm3PZEpx9MW6pAdvXTKuCFsUheDm0X3VhqqiRiS8iA=; b=LHLgeLW3xK2Tjx+7EZ7L7n926auHi1j6YDZ1DWrWKQqiBxtVlus4eVw+EK+ocrN3E7 EfbkyGD3KzWWDGrVfWEZWj5QF4uRaPV7tdn9qQKOuLkZrtpdIUJIXAJnMnfC0Vq+963m ZG99dWmN1yOoQiRqqrTICLr2e9uQQCitzvnZ7MD59UtRRrcRDhlzLjLBwZoRzrCbkU2h iMDB0YeTvYc/Ae8obWqfYau9z1mwGM0DbQf7UaNO/erXOxknan33vnw+mcZpxm8cjvjk 6pEOw4eo5ARemXP0vQYxv+NwNZLN54YeFL65+2CJQYXFsSGPvfdA9yTry4G5VDscmLwn LrIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RNjtSAvQ; 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 z3sor1810487pln.53.2019.06.11.07.53.11 for (Google Transport Security); Tue, 11 Jun 2019 07:53:11 -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:a17:902:31a4:: with SMTP id x33mr47571153plb.331.1560264790880; Tue, 11 Jun 2019 07:53:10 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:10 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 20/92] ram: rk3399: Add bw enc macro Date: Tue, 11 Jun 2019 20:20:23 +0530 Message-Id: <20190611145135.21399-21-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RNjtSAvQ; 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: , Add simplified and meaningful macro for bw. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 + drivers/ram/rockchip/sdram_rk3399.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index a4b1742438..7e0b491859 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -59,6 +59,7 @@ SYS_REG_CS1_ROW_SHIFT(ch)) #define SYS_REG_BW_SHIFT(ch) (2 + (ch) * 16) #define SYS_REG_BW_MASK 3 +#define SYS_REG_ENC_BW(n, ch) ((2 >> (n)) << SYS_REG_BW_SHIFT(ch)) #define SYS_REG_DBW_SHIFT(ch) ((ch) * 16) #define SYS_REG_DBW_MASK 3 #define SYS_REG_ENC_DBW(n, ch) ((2 >> (n)) << SYS_REG_DBW_SHIFT(ch)) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index f69194f29b..3241bc285e 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1028,7 +1028,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_BK(info->bk, channel); sys_reg |= SYS_REG_ENC_CS0_ROW(info->cs0_row, channel); sys_reg |= SYS_REG_ENC_CS1_ROW(info->cs1_row, channel); - sys_reg |= (2 >> info->bw) << SYS_REG_BW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_BW(info->bw, channel); sys_reg |= SYS_REG_ENC_DBW(info->dbw, channel); ddr_msch_regs = dram->chan[channel].msch; From patchwork Tue Jun 11 14:50:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 472 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A352D3F08F for ; Tue, 11 Jun 2019 16:53:16 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id j7sf9768399pfn.10 for ; Tue, 11 Jun 2019 07:53:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264795; cv=pass; d=google.com; s=arc-20160816; b=gccjrMwyZQdAUFAqnrvar4VK8DqhB7TMkl6SNP0tAL+SnqeYDzhND5M8mh9pJZBTvS Q7t0i4EOIQExWX+JYxh9uNpXYN/7D4zmSEZyUIcoFPgszSJtveANuZHf0wFuBlwSDbfp iCSgc0TqBtiSUwKzeKbiZnTzeDhYa8RN8Gc6HuBz/losb2jG9DYY3FHkPHiKjcoSUxL6 Oukm3BgHLSiYFB+/9eI0G7bJ0MEZfhCzdDRBWQ8/SXoTl+4Ua23gmdWrwI/6iRslUTmD 4THPL+Q7LnOu05od2etk0tOzfxZ19EkPFQUhGxrbxVA7iSY0Sv6W9yd5b3NrfGdk70vy kwHA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=krkUpsnertrTOwJGQM7r3wOB2plL4q2KbsfgEW6qD6A=; b=ES2bHo3NgJ3y7l5hf4dGzW96TOZtp4c22bEbmCCc2Ztp7AJEB0fzRBlTDCNJRtqgZT mIF86N5c5iYuA9IXzkP+rFxA6tQ+oqzxS6hUiNGDTAOe0rBv+J7SfV47lVsrpKKbdpcc oKkT6ZPCbeCi816lnNzQ7tnu9FY1dJLR32uSX967u0AlD7wF0tYqQ0Ln3066JunrKbvq T45TDrt/bhWX2hC9cqzz6jVlJSY+boMFLsemvCpwnJMX8SP/MYDOwOlRIJuI8gOix2YZ MvqPs94XI81CqLzjX95sy80I8eX4gKVIWXHa62ags2kelB4bZXUSK5t6n3PGsJyDCZGh ozKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SwxAipMn; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=krkUpsnertrTOwJGQM7r3wOB2plL4q2KbsfgEW6qD6A=; b=QFC0YLAioxUjgGeda+WD4J2nOpiyPyw069OeiVBJKs8soyydDGaBzFPCF8jL9284eo m5dzuouMhjl8L2ldli6KG5FQz32kPbaPa/EjJenYLOXz0HVurhrIFs8dG02zrB8Wwm9a oiFlAYuaLO93qtKZbV1v/RGWLTsyZae5mWvbA= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=krkUpsnertrTOwJGQM7r3wOB2plL4q2KbsfgEW6qD6A=; b=dkKm4mfp/LvbScwPfuKW2GXNLAx6i3MaFE5tIFMyxBUPGCrmzWBjBASusLCW/3Wuux O3VHzEQD9dreQGqusD/GkYvV9Z6BzAWiuusFvbIw9tu4G0v/k3k7PAz2rz5FX84vfcoY uZ2JpZ4pO5hAD5spHYw4WFzGw/eylGD7Y+yvb+wAkyJII5P+bEFgnEO8o3ziT2B5WN/d KfZu1ic0zstohIACZZDXPvL0RXH7EkNGw2nkoLSOBp2sSjwbk8ftXmqJKMHwkv5TJ3Ya lU59cjQjDT/Ize/7nV0SXn4MiNS+43XYVaJ7yg176zlzcQmvoZEkP2Ap7h6nlvUXiSGQ eMpA== X-Gm-Message-State: APjAAAXU7UkjsxaU3HXZGbBPi4gL6H4pI10CqpzVM8Gd2Zk6z3YgQFbJ 27k+hQBRMEO+CWQoSz5TNshHRGgb X-Google-Smtp-Source: APXvYqw/X9nljDcFtPZh+2gdtsM4ZR2xG73DIzXu/WJgTr7uyRMXRfCeJarUQ/IMO+KcD9MZLTHgMQ== X-Received: by 2002:a17:90a:1951:: with SMTP id 17mr27292811pjh.79.1560264795453; Tue, 11 Jun 2019 07:53:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:32d:: with SMTP id 42ls4890810pld.11.gmail; Tue, 11 Jun 2019 07:53:15 -0700 (PDT) X-Received: by 2002:a17:902:988a:: with SMTP id s10mr76927567plp.304.1560264795075; Tue, 11 Jun 2019 07:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264795; cv=none; d=google.com; s=arc-20160816; b=maWmefk44UW9prhPR8JHUW5FmVLBLyIlKHtitmHBf24ZMuW0wK52EB0s+wq+m8hB0b T6q2kgZsfZFlOkrnH0KEua6LQPutqfgSCWPx+2zHfYDwx38ZtMJRBNmlt1KpHi3e63le EmP8lPUX/qz75J21O4HtUMqmJkNGvtZEhq0pYOuyEV6V7cTYlq0Tu+iduMdOdS0RLYEP PIBUovuH5YoE6pMigMDV3inWRxBCCMp1mOoYZtcRU6W8mmQEYZBC2q4BaSTDUy+mPAFm eIG02rlldE8VgA+/G0OLixRuFtyZVc+jGGD/MuUsesHY4IpYvOfEL1tChqVsuYAtny76 zk/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=z5MNzPrJxUWALW+EgA6kZwKHJnbEGPJgsOoanu5Efa8=; b=qs7wpqzruCZf5UujQnIVTZ+yaCbr+AaEhtVhjhJ4E3NyjsUZNYEYxSaG18qGs3Yw19 PwePDioahs1yrf3ldcEUaVNis+YG/2+YyviiH9jccSSm2h7i/jp9s/jIRl7g1r0JqHaC oFt8zad3FT9eDn9Sic5uIZvyp72ZKsI0zDPxqTuWkiCT1o3DXIp4EY1U+YZrNdqQ4m9J Dkk5KeGzfObSqRqPIM2ATgu8iyyxNHXKJPRA9a5FbjNKyBo11aeVMj/+wa6mggeG68zy U/TDV3/JtSL9Q/ZFnwq7FEQIR67BsQ/d+2Txj6PwOi2EJrq3mYfIR4t1HNwm7VU+qHc3 MlZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SwxAipMn; 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 t10sor3161187pjv.1.2019.06.11.07.53.15 for (Google Transport Security); Tue, 11 Jun 2019 07:53:15 -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:a17:90a:9a8d:: with SMTP id e13mr27630657pjp.77.1560264794707; Tue, 11 Jun 2019 07:53:14 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:14 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 21/92] ram: rk3399: Rename sys_reg with sys_reg2 Date: Tue, 11 Jun 2019 20:20:24 +0530 Message-Id: <20190611145135.21399-22-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SwxAipMn; 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: , Use dram config variable name as sys_reg2 instead of sys_reg since the final variable value is to written into a pmugrf register named as sys_reg2. This reflect the both variable and associated register names are same and also help to add next sys_reg's to add it in future. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 3241bc285e..4463fc84c8 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1005,11 +1005,11 @@ static void set_ddrconfig(const struct chan_info *chan, static void dram_all_config(struct dram_info *dram, const struct rk3399_sdram_params *sdram_params) { - u32 sys_reg = 0; + u32 sys_reg2 = 0; unsigned int channel, idx; - sys_reg |= SYS_REG_ENC_DDRTYPE(sdram_params->base.dramtype); - sys_reg |= SYS_REG_ENC_NUM_CH(sdram_params->base.num_channels); + sys_reg2 |= SYS_REG_ENC_DDRTYPE(sdram_params->base.dramtype); + sys_reg2 |= SYS_REG_ENC_NUM_CH(sdram_params->base.num_channels); for (channel = 0, idx = 0; (idx < sdram_params->base.num_channels) && (channel < 2); channel++) { @@ -1021,15 +1021,15 @@ static void dram_all_config(struct dram_info *dram, if (sdram_params->ch[channel].col == 0) continue; idx++; - sys_reg |= SYS_REG_ENC_ROW_3_4(info->row_3_4, channel); - sys_reg |= SYS_REG_ENC_CHINFO(channel); - sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); - sys_reg |= SYS_REG_ENC_COL(info->col, channel); - sys_reg |= SYS_REG_ENC_BK(info->bk, channel); - sys_reg |= SYS_REG_ENC_CS0_ROW(info->cs0_row, channel); - sys_reg |= SYS_REG_ENC_CS1_ROW(info->cs1_row, channel); - sys_reg |= SYS_REG_ENC_BW(info->bw, channel); - sys_reg |= SYS_REG_ENC_DBW(info->dbw, channel); + sys_reg2 |= SYS_REG_ENC_ROW_3_4(info->row_3_4, channel); + sys_reg2 |= SYS_REG_ENC_CHINFO(channel); + sys_reg2 |= SYS_REG_ENC_RANK(info->rank, channel); + sys_reg2 |= SYS_REG_ENC_COL(info->col, channel); + sys_reg2 |= SYS_REG_ENC_BK(info->bk, channel); + sys_reg2 |= SYS_REG_ENC_CS0_ROW(info->cs0_row, channel); + sys_reg2 |= SYS_REG_ENC_CS1_ROW(info->cs1_row, channel); + sys_reg2 |= SYS_REG_ENC_BW(info->bw, channel); + sys_reg2 |= SYS_REG_ENC_DBW(info->dbw, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = &sdram_params->ch[channel].noc_timings; @@ -1050,7 +1050,7 @@ static void dram_all_config(struct dram_info *dram, 1 << 17); } - writel(sys_reg, &dram->pmugrf->os_reg2); + writel(sys_reg2, &dram->pmugrf->os_reg2); rk_clrsetreg(&dram->pmusgrf->soc_con4, 0x1f << 10, sdram_params->base.stride << 10); From patchwork Tue Jun 11 14:50:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 473 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D9D6C3F08F for ; Tue, 11 Jun 2019 16:53:20 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id bc12sf7908533plb.0 for ; Tue, 11 Jun 2019 07:53:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264799; cv=pass; d=google.com; s=arc-20160816; b=pgNj2H9+jT00C+QYqYoKnb8Km2LS0tJjRS7+OkzIij1seGnxnmz2bfgUxoyfWME1OZ JWfccSV/l8vHMCstHDKqdpzIiefYpr8U+eX/EEwCFRNOQauKH24sGJKIjOeTuvFhNiKc 4aJLwFXKgT1P8uOnnbEOnCyB8EJsOi2LsHeRK8UOvJpTdsaL3BBuG9eMYxVZUajcTu+I fjVS0fTh0y+xyaTT7P9PM+qr3OVPT3dct1Z/0ctayqR+02jSasTSFwAVfechgBxTsDkI Fr11PM4hZCyAJUOebJ7B5IG72HhpzK4VF8JORjCcBUmn7gRI2w19RVMNhiObaFL/8VoP rUFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ki+GQ0xV9h/qjl0M3m+2pb1v4PDI8NuUzYtzkYdgvMw=; b=KfXt8qcKsFIkUuYR0Gy5yYN4X5AccDDeHkjDKzlDff1n2IddDnSYrW3E+syTh6VukF UotIzhyI11OCouwQ8TYIu3IkGf4PVUvzkoapJ2F1C45P1YLyCen2i5m1bRi7xEtdCCXh LO74kfbbZahj32GxBdE043xNwNdwlawcKiVfKUoq/dFmJuSuveANLKPQGaaME9GSk4O3 pULQVM1uIoWSSwhT6apYRwZgmsF3A3+r/LFbgALW5EtFVcd/D6JZaaNqZ7MOt06S7woq 9kzznEXjI+LgBx2abXI5PD69YEaNjxcshhFTotz5PSzWh7nQyUu7p/5K8yo6UF9FaNmA aLJw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XxaHj+zD; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ki+GQ0xV9h/qjl0M3m+2pb1v4PDI8NuUzYtzkYdgvMw=; b=VuqlGN2FpaSRXHZ6FBcg1AEz+R3RKkDBbkyhI+3UkYvk3gD5Z79uPwXFMV5R7HUs6H j5+CNGq69g66CHWv/By9xBY9s0eeEpvOSJ/SdHVvJS8NIBAmkNQ2zrxmvrHESSlBpEDT zs7XQrpE9rngCDLynMZKTjoroed1hlXETyGPU= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=ki+GQ0xV9h/qjl0M3m+2pb1v4PDI8NuUzYtzkYdgvMw=; b=IL5Q9gLco2fHpJhCOPyJLZEePuBN5i8kBfjOjizWcGSZe23QYmda1oTxTNtsFdsqgd C/14R/S29tE4vee1uvoNyiS26eQ1XWPBXHHmCJEjBti74vVtjF0maUtpUXCaQMxLh05V XbJBGHK+5V+owDak55cVvbW4Jzdw/ba29k4807qnFAJ9PTOmGXOvP8msFhy7iafY8T1q HwuA8gkJve1jzSS6P+nTm/9fdeTMhfTGITIxjF6u6uDvoQ4skzJtP4/JeNPZtQbgugNT DaPUE/dLrL4gR7X5udCPv2JMuP2xN83zn8wBjT3NKrVwuyqJJoel9LPzd0D3wbGY/i9G eFtQ== X-Gm-Message-State: APjAAAUSsUvCguY2k6A2P+hOeKst9kfsQMiE8JQF/BYk5L9R5xVmvIoR XF0mr3mdoJQyjzE8ztwm8MzPMajy X-Google-Smtp-Source: APXvYqw0da4scrvfwnbDdukH6iRDjjpxoOu6TpmRN57LP6aOuIyXoWGae7Zlgfg7FPWqbgv7phL7bg== X-Received: by 2002:a65:6495:: with SMTP id e21mr6539541pgv.383.1560264799581; Tue, 11 Jun 2019 07:53:19 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:d0c2:: with SMTP id y2ls858117pjw.5.gmail; Tue, 11 Jun 2019 07:53:19 -0700 (PDT) X-Received: by 2002:a17:90a:ad86:: with SMTP id s6mr2697599pjq.42.1560264799211; Tue, 11 Jun 2019 07:53:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264799; cv=none; d=google.com; s=arc-20160816; b=vrQtV+O1SUuYhhsLrIsDRVi/jDebhrr4WnfBlLT55/TS/0Dnaz/INrK8TVSTKkgZqO kk0QIu92jw6jJX9vcFL2p360pMueR3TrnR3aBxETR9XATPhLbb3yGlF81uWPNebSadA7 SoszLJULH6Kxgn4RTnNhRYb4kL9XEmpg8dQYQY19H+H0+4GjrJqV07KJvZ8Wyv0E/lVX ccjIzKP0HllOaBYGLRPyj32KPSe2hJPSeB1B+G9WLWwqZqBTxvikzqWbJVAEMMbBiZcj qtgq3ZWovqGCruPH7EYcQwNiniKYWawiiwzQZ6qSLsCzaSUIA7Eb9xMlQu3gcNHC1N3a KBwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=blUjXzdLmw8GcUgJeI2ZJaLvV6/uY4Q7JuRFDVODbMY=; b=drGRUWX56tg5HxHdmvgKfpEJrF72C9gSqROEX9EBiEbccGw4b/v3Z6jPuEmmU2QbrH fh0YQ4JBqmEWTtd44v/1TVI062FtryEm6nS5942JiN0elsJNVYKRSRUKKTUDUipOzp53 XUDCebvBISFs7eU6KrZUjlg7gq5UZ2nT6v9YcCFUJpt1gzOiR+Z/KsRewNgjSyNKsqvQ HlzNbZGV5YzrnZlHKubJswlJ4muqCntoDeLKXc5fV+6uBLF9pOwYSCYucg9VxyH4UcwC x+6JU9a7rKvrXKJBzZXXi8J8LWfNs3XI59zrmHtm/LjGEUyvElgnPV0nK/WLfQqbMo9B oxdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XxaHj+zD; 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 e8sor15272438plb.48.2019.06.11.07.53.19 for (Google Transport Security); Tue, 11 Jun 2019 07:53:19 -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:a17:902:da4:: with SMTP id 33mr17850928plv.209.1560264798868; Tue, 11 Jun 2019 07:53:18 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:18 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 22/92] ram: rk3399: Update cs0_row to use sys_reg3 Date: Tue, 11 Jun 2019 20:20:25 +0530 Message-Id: <20190611145135.21399-23-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XxaHj+zD; 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: , cs0_row can handle the pmu via sys_reg2 and sys_reg3 while configuring the dram instead of just sys_reg2. So, update cs0_row macro to make use of both sys_reg2, sys_reg3. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 8 ++++++-- drivers/ram/rockchip/sdram_rk3399.c | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 7e0b491859..3d1d5badb4 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -51,8 +51,6 @@ SYS_REG_BK_SHIFT(ch)) #define SYS_REG_CS0_ROW_SHIFT(ch) (6 + (ch) * 16) #define SYS_REG_CS0_ROW_MASK 3 -#define SYS_REG_ENC_CS0_ROW(n, ch) (((n) - 13) << \ - SYS_REG_CS0_ROW_SHIFT(ch)) #define SYS_REG_CS1_ROW_SHIFT(ch) (4 + (ch) * 16) #define SYS_REG_CS1_ROW_MASK 3 #define SYS_REG_ENC_CS1_ROW(n, ch) (((n) - 13) << \ @@ -64,6 +62,12 @@ #define SYS_REG_DBW_MASK 3 #define SYS_REG_ENC_DBW(n, ch) ((2 >> (n)) << SYS_REG_DBW_SHIFT(ch)) +#define SYS_REG_ENC_CS0_ROW(n, os_reg2, os_reg3, ch) do { \ + (os_reg2) |= (((n) - 13) & 0x3) << (6 + 16 * (ch)); \ + (os_reg3) |= ((((n) - 13) & 0x4) >> 2) << \ + (5 + 2 * (ch)); \ + } while (0) + /* Get sdram size decode from reg */ size_t rockchip_sdram_size(phys_addr_t reg); diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 4463fc84c8..2408246d0d 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1006,6 +1006,7 @@ static void dram_all_config(struct dram_info *dram, const struct rk3399_sdram_params *sdram_params) { u32 sys_reg2 = 0; + u32 sys_reg3 = 0; unsigned int channel, idx; sys_reg2 |= SYS_REG_ENC_DDRTYPE(sdram_params->base.dramtype); @@ -1026,10 +1027,10 @@ static void dram_all_config(struct dram_info *dram, sys_reg2 |= SYS_REG_ENC_RANK(info->rank, channel); sys_reg2 |= SYS_REG_ENC_COL(info->col, channel); sys_reg2 |= SYS_REG_ENC_BK(info->bk, channel); - sys_reg2 |= SYS_REG_ENC_CS0_ROW(info->cs0_row, channel); sys_reg2 |= SYS_REG_ENC_CS1_ROW(info->cs1_row, channel); sys_reg2 |= SYS_REG_ENC_BW(info->bw, channel); sys_reg2 |= SYS_REG_ENC_DBW(info->dbw, channel); + SYS_REG_ENC_CS0_ROW(info->cs0_row, sys_reg2, sys_reg3, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = &sdram_params->ch[channel].noc_timings; @@ -1051,6 +1052,7 @@ static void dram_all_config(struct dram_info *dram, } writel(sys_reg2, &dram->pmugrf->os_reg2); + writel(sys_reg3, &dram->pmugrf->os_reg3); rk_clrsetreg(&dram->pmusgrf->soc_con4, 0x1f << 10, sdram_params->base.stride << 10); From patchwork Tue Jun 11 14:50:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 474 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id ECE013F08F for ; Tue, 11 Jun 2019 16:53:24 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id d2sf7882254pla.18 for ; Tue, 11 Jun 2019 07:53:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264803; cv=pass; d=google.com; s=arc-20160816; b=0LNVWWu5cHTRpEGX+MVfKlZDLtvA/6HrKvyNV4R0WNqIFSA6qmAtZrVd8pSbkHWiVk ZoTrfFfxMO2737upJRejgj6NNzKcBsqvohmXR48oppV1ipKUjYEQ2ZlDZhI33ooUWRMP uGdO2L6uJ18YkARfJVEAQ6BV4K5WVf7T0CWHYOYU5DJRPe9/psODppIpBYBiNixkk5gI 476+nr3a28S2HRvyLwrxCdSbhMqWk/XLV6sfQvgUqnS/uUK32edp2H+BoQQf1FLM/9H2 223/xnqfF2i/BZXZlUIcIHtJtTYAyDorqUJXc2JIMXytalp3d2G9c9eQ95jJpdgoM/nh iF6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TukY46kCU1naBUTkbim+cYewULfIiQrLutXBmvPC6lA=; b=Lpfh0cJeZZjsJaf8NUtTVkICeC9rqDHVYsrHoZEXT0YcWLjK8KTjcU/IohHjDDz2eT ucJ9XzhvbaHYzO93JdSAaWZttcKQt/uxyGCyE1wh0RuuL2XgpVrD6EiPl8z/+eSrHSXv QUO3ZKfAZlbpPNwhtQvOW6u9pHpKRyQOmGuSmQWdDSKch1emsJhB9Reh9hs66G1Aw3NI IeMZ+vXeUZrIkVcFr4s7D5IxSSyh7ajrmv32Dypwnbxq00hu+C+fetPKGdASfIVvpNbt nEL+jSoNvPIeH0cvIKTpMUFKmUb3xMFXyRg2gRiVwLJMkbgl2osd7/gZj3jSEy65Sksf Y5Lw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="gNai4f/l"; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=TukY46kCU1naBUTkbim+cYewULfIiQrLutXBmvPC6lA=; b=P9qVhCT6Tss2C+2s3WzhA6v86Aq5KPdBCgVbsoJ1stBMIiA0S8hGutkPFnaWk/bn2T +mR5oSWaRMjihtnHL72Eft47R9zGT34Pro474QlCvaWU8i81xMbO5codD+UwMkicMnH1 ACJ73cB2l/+3ZYXz0s+ed0BldK6eJ7GDarEsA= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=TukY46kCU1naBUTkbim+cYewULfIiQrLutXBmvPC6lA=; b=UyiFZgmJLfUtIvwDnXWGM3KigSMRjnlNCrQaH1YppCM4PIUIN8+58GhQLqx2IEB3dT K+FJrRT5K+OprW7ml5Va3KCE8fTk3UFYvKiqUP/7qDl+Ug+ekFqpYE4Ai6BPFJjpjZfr +Zpiusd7SctjNzJ+vc5K6ridsY9+xQJ2Tg1wGU8dZlIY3LXRG02/6+j9QZrg86slWgHq E5GrNpAcC/PanwKxuWYr1F+TpWaAgYjsZQM/BGuVs3CD0BQ4CouLkoD2HWSvU0wjVMNC qo/n5Q2P3Kg/oL04lUlf6/pXwPbVRzIqB+HqtFDbutlzN1Wi2Bn0kg7nFuRxPUxh6Hpp hZ6A== X-Gm-Message-State: APjAAAXMJy0MkffpjzWt2O8s20e96lgHNGN3Bp78b0Ih3xqQ+ik8FddD IG+0a+2kLGX7zI22nDLMNUzoIS0v X-Google-Smtp-Source: APXvYqyL1ok5ltZ/cpISqEZGM86QviRXHOT9QKgsjpao3p3xiE7JbyxpZtOjmM0W/DTvYlulzXxvsw== X-Received: by 2002:a17:902:9a06:: with SMTP id v6mr58869558plp.71.1560264803747; Tue, 11 Jun 2019 07:53:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:2ec6:: with SMTP id u189ls4508855pgu.11.gmail; Tue, 11 Jun 2019 07:53:23 -0700 (PDT) X-Received: by 2002:a62:585:: with SMTP id 127mr78667197pff.231.1560264803410; Tue, 11 Jun 2019 07:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264803; cv=none; d=google.com; s=arc-20160816; b=eOAZW6iC7uR0VeAKEpofp8BgjSnri2Y8ojrVOLVVRmMg0EY+JEVhntrOUspQRvTJkf FQkfgx5zlLvR7o2TPb4lw6OXZajRZo+y5H/VRu8PM8Z+73Aun1dM95OhMwmCfclacizK n54iXUD/cNuS4GadmO692ZWXzXJNaatLoFq3p6TYGMi+quFuWZQK9NFSHB9bPxf6Ighi Ghm3OPwLnYwQAvzk84/tGub6xSnKFyIGGzZLzdQ6z6pAaFgetg2oM8xbSs1L/Uhcr7yb sRzMPZ+sGoIjfdAQJhPooGnjn8GE9ARae9mPU3GIEicDQnXaTeTXWBwEsk2yOMW5M8Lm pV0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0Etejk+5Q0mwhnZIra8dhkmYg9eLKyz9+3kQ98m+KvY=; b=TQVIwkVEY/VoK/FtFl2QCZuYodr5UDt71RH2C5lH9wESEB3FB8H/9pMUqlym0oFAGy Si5QTZyRrjH2qXK5YgsO8olkiYFdTGLaZtKw1CifdYgfu1GCOBA9cHix2569HDITNnhY kFzh1nla9D8vyO9ETj1SCwgcsbhkbVNELcd24XPGUXg+k6Hiuy5+o+Sx38UeCF8dXH1D Z1pBv2SuMhk2sEjCBlBTOk+vS+NZMP840AT5FXBXFK7oB4JCsq0nfvEzGQOZXYM3dREc IsWjQwk+YUKKuyXNTzUmF37smci6/y/9l1dEiwoVVfxSPbfcMRtLeZbHuT/DCOAiuGBs hP4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="gNai4f/l"; 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 e1sor864980pgo.57.2019.06.11.07.53.23 for (Google Transport Security); Tue, 11 Jun 2019 07:53:23 -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:a65:450b:: with SMTP id n11mr20075968pgq.174.1560264802960; Tue, 11 Jun 2019 07:53:22 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:22 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 23/92] ram: rk3399: Update cs1_row to use sys_reg3 Date: Tue, 11 Jun 2019 20:20:26 +0530 Message-Id: <20190611145135.21399-24-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="gNai4f/l"; 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: , cs1_row can handle the pmu via sys_reg2 and sys_reg3 while configuring the dram instead of just sys_reg2. So, update cs1_row macro to make use of both sys_reg2, sys_reg3. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 10 ++++++++-- drivers/ram/rockchip/sdram_rk3399.c | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 3d1d5badb4..dc7275656e 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -53,8 +53,6 @@ #define SYS_REG_CS0_ROW_MASK 3 #define SYS_REG_CS1_ROW_SHIFT(ch) (4 + (ch) * 16) #define SYS_REG_CS1_ROW_MASK 3 -#define SYS_REG_ENC_CS1_ROW(n, ch) (((n) - 13) << \ - SYS_REG_CS1_ROW_SHIFT(ch)) #define SYS_REG_BW_SHIFT(ch) (2 + (ch) * 16) #define SYS_REG_BW_MASK 3 #define SYS_REG_ENC_BW(n, ch) ((2 >> (n)) << SYS_REG_BW_SHIFT(ch)) @@ -68,6 +66,14 @@ (5 + 2 * (ch)); \ } while (0) +#define SYS_REG_ENC_CS1_ROW(n, os_reg2, os_reg3, ch) do { \ + (os_reg2) &= (~(0x3 << (4 + 16 * (ch)))); \ + (os_reg3) &= (~(0x1 << (4 + 2 * (ch)))); \ + (os_reg2) |= (((n) - 13) & 0x3) << (4 + 16 * (ch)); \ + (os_reg3) |= ((((n) - 13) & 0x4) >> 2) << \ + (4 + 2 * (ch)); \ + } while (0) + /* Get sdram size decode from reg */ size_t rockchip_sdram_size(phys_addr_t reg); diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 2408246d0d..772fde9732 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1027,10 +1027,12 @@ static void dram_all_config(struct dram_info *dram, sys_reg2 |= SYS_REG_ENC_RANK(info->rank, channel); sys_reg2 |= SYS_REG_ENC_COL(info->col, channel); sys_reg2 |= SYS_REG_ENC_BK(info->bk, channel); - sys_reg2 |= SYS_REG_ENC_CS1_ROW(info->cs1_row, channel); sys_reg2 |= SYS_REG_ENC_BW(info->bw, channel); sys_reg2 |= SYS_REG_ENC_DBW(info->dbw, channel); SYS_REG_ENC_CS0_ROW(info->cs0_row, sys_reg2, sys_reg3, channel); + if (info->cs1_row) + SYS_REG_ENC_CS1_ROW(info->cs1_row, sys_reg2, + sys_reg3, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = &sdram_params->ch[channel].noc_timings; From patchwork Tue Jun 11 14:50:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 475 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 238053F08F for ; Tue, 11 Jun 2019 16:53:29 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id i26sf9741403pfo.22 for ; Tue, 11 Jun 2019 07:53:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264808; cv=pass; d=google.com; s=arc-20160816; b=QPc7RlyU1KsjKZdzmRFV1eOkWvxSCI+gWoe9I5GDqxeCoYqiKZadH9UAMdps2FnPSN xepmOJgqTGkLk4fRv+KXm++rj4N30mY91AlqSOFI1h/nu7pd4M9C3r2ZLGfsPYta4dAP /rJRRwrTtufWe3ev5F+Z70KVG3nDifqXJS31ccXZfM85XcB5TXoDA10ZeQfiCMxOHg/H yYSRCyocl48FtDu5VXRAjzwCo7LNNj7bvSvs86UhFKRlWTwtYAiBVhqmQFD5gZjN9MEN 875AQomHX+lWmj6Rx8MizIoqpDGSXgr0LXaxR0EctNvvS391c8h8x5dyF4gBE+DrctvK Ss0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=VK/QjI9pLNbIzUkrfCXC5ZSwultqttkl4TeJRPiBvaQ=; b=Qtam/s2yNE0ca53dqlsJbLiudJ8WXMJUBtE+NGs6rRWpe2ueuHdq0xu3w18+J55lWB OWheA8H9TdTMArdQt/XE+9LHIV94xra1qV493vltw48EYyhqNsdmB7EFxYBkxqzq9Cyc Wn6Aa8fEAgm9HxpMXZfF15/BVnwQDQ52bvOcMVhtoadNSxVdxTP/7SPtJ6VMiOHHHBsi 6OirylrNrdXIEr02ofiiBQLATTj5LxnZaff1VJwByKfdXE31bWNYvj/kxfmclfjD2sc5 u0kpFSs6l6YfAiLDMyycTYzXbJBXUq44d3HJ1xkvKhC6Q8UNewOakjFA/KGB989yFLaf y/YA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=X2zvOdfc; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=VK/QjI9pLNbIzUkrfCXC5ZSwultqttkl4TeJRPiBvaQ=; b=qURNmMv1J3Cyd62aZ0O7B5laOoV+2kyY8FmPU7M6NEGwXKPgEA2qkivkc2LPSU5I9T f7Gj8levHn3/YMqCgliazlQvZy/A6+hStrCkLYjA4WZ9cQszq3/HMJ2POr8bDIolIwUn 7TR8uzSnFpYOr1gdF2R1Pk0B8v4Vc9XQIIGy8= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=VK/QjI9pLNbIzUkrfCXC5ZSwultqttkl4TeJRPiBvaQ=; b=Fgyn6LwMPG0a+Vk2P+MN5i7aeQkiTRbLGUmPcONZcW9hDgEK4XZnpGeVXu1BzNrlj4 1qpLnTcgO9JfrLGihxD8IyXtb6BMy0ci3g0Cey2oPkOquHqs75oFDhlwlAw2Mn0APmk6 sHN+11b2MoF7MAyapY5/1m5Lh1YNXz//YGV4r5WgOjGpkTT2a/ByGQwOekSv8sGwTrvC DN02WDGISVj/qjkrkrJqTSBZBOyrua5S2uyrKe6UDTO9TVj25p1eTulEanZt7iiy1ZGr 2g3Woj7DT6+4NdNthq8oFPBKkG5KhZuEhEYMXdNAdISJqD/k7EOnf9JxNWbCsSWdLSUk HXUQ== X-Gm-Message-State: APjAAAVwTFXwPEtI4p7+WWeFELyqvXsERC2uwbxRL6bFU0ZO18HEwM1G krU5IHYtgmtTqAUUz41i0TLplTbt X-Google-Smtp-Source: APXvYqx7+Q8BH1QRPi+8JEX0TTmtL0Rm4Rv2bwSYgXxRhZTW29cxDrF4dqXoDIGNZkC3Dkko3YCDeQ== X-Received: by 2002:a17:90a:d814:: with SMTP id a20mr17363565pjv.48.1560264807898; Tue, 11 Jun 2019 07:53:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8a8f:: with SMTP id p15ls4699396plo.2.gmail; Tue, 11 Jun 2019 07:53:27 -0700 (PDT) X-Received: by 2002:a17:90a:3787:: with SMTP id v7mr17805454pjb.33.1560264807514; Tue, 11 Jun 2019 07:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264807; cv=none; d=google.com; s=arc-20160816; b=zVgCEqMcEv8pE41ZdN7tyGw4MIkVvKU4m/AwgR9+0aTxmXKBF5WGSUSbq+r4Kyr7fJ x3kcJ6dBnIjM8Xml3OS6AXWn7ykCZiMB9zOmk58/Kk6ZZBMBNXeIGBwGo2YBfxdK0nk3 utEULmgm+X50bdoPDHCeG4hZD6hgAQopOLl75aZd7AGSUvnOjme0TV/OUYZHDHhVMaQu GclhIRBpltcdhCgheTmGuVXIAjjaXXpKsFOuD2/HXTPpzroKyWvwIGpqvPICjD7emZPz FWIBs5cgFnzCd/G0nYIuQI6tUL43u/2DOZRH8RWELyBVqlVeAGm9QszI+Mp/NyCvz71f gvZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Ft8W9Se2n2QkLd+lJNW66KUzN7VPeSOR5seoant/xQg=; b=d0Yo+kJbqsKVJm84vUJxjT5ctDyaHIC8iCuTcAKe1ZD+QMOx7MqNYAx8tywdLRtIVJ vzA/tEYRn3yw3v6WN0UAAaOvOvOxaNbVdOu4ZSmKlL6FuVLcXQXd1zCmrXcqlb2ZHHUk PvvMsVbd//pre13khEMInvCUvWUs+BtawoAU0j04ky9z3dhmrlz0R2GuAmH9b/LJQKLJ wslK1YT3yVJa1NVm8z9OmC+6eiu/OLwHIxKsnRVeb3a5vuF1Y64+4zw3/vnKGkKVb944 p9St79/hCKSBDXY1SIou8OJ042o+gOquAvbWai1Ux5f7Kpmc1jYusDyIsvQkaSFyxIZk OBew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=X2zvOdfc; 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 31sor15367218plc.62.2019.06.11.07.53.27 for (Google Transport Security); Tue, 11 Jun 2019 07:53:27 -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:a17:902:760a:: with SMTP id k10mr56058835pll.83.1560264807139; Tue, 11 Jun 2019 07:53:27 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:26 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 24/92] ram: rk3399: Add cs1_col enc macro Date: Tue, 11 Jun 2019 20:20:27 +0530 Message-Id: <20190611145135.21399-25-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=X2zvOdfc; 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: , Add dram config macro for handling cs1 column. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 3 +++ drivers/ram/rockchip/sdram_rk3399.c | 1 + 2 files changed, 4 insertions(+) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index dc7275656e..637a0de902 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -74,6 +74,9 @@ (4 + 2 * (ch)); \ } while (0) +#define SYS_REG_CS1_COL_SHIFT(ch) (0 + 2 * (ch)) +#define SYS_REG_ENC_CS1_COL(n, ch) (((n) - 9) << SYS_REG_CS1_COL_SHIFT(ch)) + /* Get sdram size decode from reg */ size_t rockchip_sdram_size(phys_addr_t reg); diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 772fde9732..d77a8310cd 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1033,6 +1033,7 @@ static void dram_all_config(struct dram_info *dram, if (info->cs1_row) SYS_REG_ENC_CS1_ROW(info->cs1_row, sys_reg2, sys_reg3, channel); + sys_reg3 |= SYS_REG_ENC_CS1_COL(info->col, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = &sdram_params->ch[channel].noc_timings; From patchwork Tue Jun 11 14:50:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 476 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4890F3F08F for ; Tue, 11 Jun 2019 16:53:33 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id t2sf4044668plo.10 for ; Tue, 11 Jun 2019 07:53:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264812; cv=pass; d=google.com; s=arc-20160816; b=gvK1m3MBybLNU+kXvT+44oLoaDvEYXiObdv9gXJFQfXMiZymvdjzVZb13BRLEPnm9y saprsnwgiEZ14JzQufdCVOoTRyZ0r6wzh0bdq4ViE7ls3mc9vkkG+/pnFebmLKlb5A3/ r5k9CEdGBj8lbzdWTOtUymoXo9Kk6Sc2AEskxw6cfOqtOQFzWfMNK06IEayf2SYdBlBV Rs6GyqiPHkZ9SSyc9G++I0/xAY8G/VeTQJ2dEQ65anIF3WDevF8h/JbxO0O8obdo+xEA u7LNEkV1xtFf1Iq5IxBJgCU//X2hRigtZIZ22ki7dRFjoVP2LuRCykjT6ZEguc9GJEQZ XpBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=1kKZxmhtLUnh8/v9CEVIUwG2Klt7x7OJeWq52t3B0n4=; b=cPjCaG8izK6LlP5KV5AYxRf/mUlBQ1qqLQd21rr4aVC1j5BS5z8o9XWAUjD9YPfmHC gqcG62CdQ+SqCDfUT2AzeyaGxMedE56AdlN1PkliRb5Y1yY65JAXyNfRhi/yTGx4BQz/ Z4e6gDfhbI3Vmw5dwLSijZPLClhRelcEWbQxf0TdPBc2uu+0/K2ZDh94/NJas3TxJXcc Z95L0PH2Yj2P0nJOm8SFhf6XskTA3gGCRYhJqDE7wyuXHaRwr0LI4WL8XNL8DtMd3xt6 uZSGig3ZaZzwrugUtjtDjI7HBic3xYtaFc3B9Lkyhl1LSZ+DnaVdqDeOyESuf4UDhJg1 ZCig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oYsE0zkx; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=1kKZxmhtLUnh8/v9CEVIUwG2Klt7x7OJeWq52t3B0n4=; b=q55F4mvM0zZcSTrpFpXkRFxGFB0h+ePejyIArxEvBYRDQZm0/EqezXfgr3og/QnXMk TmD+OxliYi0yXlmzoymYEgjgXY2zjfUFs5LYzSuggTKhMvEnt7WdmSe3sSbCZ90CCu3Y TDN/AwF6rfX1de6nwUZsGWAXYcrr/dSYQSmgo= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=1kKZxmhtLUnh8/v9CEVIUwG2Klt7x7OJeWq52t3B0n4=; b=dgF99FurLpGHNZmcz4DxrfkJSKZZBJLaLXhRL6JcremO/UqqEMeNEt23/N496qj3GU l9UK6VaxHCJNw72ziYN1oKVsfZb4VQ1ZRJFkxqaiWukhA2l0PeDOxy8qZyASL3kX6loz if0/mZY4d6h0eStbrhqwhInXdaK5rB19u3bP9SdR5yqE6gYSvOvSceXKFiADP9k3upAm EvhvNMe1wwxrKg51xkfpnXfXX1G70yXJ1BUL2Zy9WrKdciDTmThL3M3EaWNpJL/8+sIA xSX00/OqGDXGNS0+JRVZRusLTzz5jh4NPB44o2NsM2KyGTUzquOayZ4uBoeyDjgKHyPr Q8Fw== X-Gm-Message-State: APjAAAVB1rL2hdVT/DUMHOYhggCvF1FFWL5s4uyx1k0MhOm3asEig0JW MkBsjlogbgckrNshDMCE73tK0Ra2 X-Google-Smtp-Source: APXvYqyEnjua8zR4EeeDrJ339teO5qDvzzs4yQu0YvopqgIAF6nnh0/V7pTaDRIqJW1MGukYOl+ITg== X-Received: by 2002:a17:902:8b87:: with SMTP id ay7mr73753858plb.97.1560264812076; Tue, 11 Jun 2019 07:53:32 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:24f:: with SMTP id 76ls4515866pgc.10.gmail; Tue, 11 Jun 2019 07:53:31 -0700 (PDT) X-Received: by 2002:a63:7ca:: with SMTP id 193mr20402557pgh.240.1560264811641; Tue, 11 Jun 2019 07:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264811; cv=none; d=google.com; s=arc-20160816; b=B0KnUiE5BcATMd25OGXjvgg5Yu6XFgNFYN/6oZHGn3cralJTlBhVhJYFJ8GsPn9BCJ tzxadKpzAEu1S7f81MNVJFciev/GsjZpmMp1Gei//RQ3MKqRFZjv1tOu4b/WaJOjQhme UNShK+5G7GgHA5M7GzixadHZOq/Vl/0fwJukjezgifXSxzThRMLgO/THKNTOHAy6FVkd pqknf+6OSgBk40m7UcxJcbDRR9Mz0AyIoxd4QiQLk1ML+57nWMUjFmMhmvwB53VVFnEE gBvR+mfCgL+Qv/dTLQaLXt+YFTWLD+ngSBccwyMhfZybkusHJsmOcA6BZyPLwf+ftcTn 4YfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=aY2/dWps+z0RNlJTkm62+j81bSU4w14s3hjMynspne4=; b=eTHeycXdhE/7jKYPqbVD7wcCmp71YtEMMJulzCNYVEy0ETlP4oMCbV2XVKvs1iczx6 YqIaixwu8L2s6axvfYKbUDWqM9sAIhmXoukaAHsgLHJEl98hkTitojpJUkyWKvY7eKYX vb6C9uGRtGw5LEEEos5V2bMCI1KI+0tz1qwPgmna81C1hO3r1iG1C+1bG6sdYX2fDZ1F t+6nexTvmWZwuGXC7MQsW2efR8UdDHdIqEzgNkJsuxke0xorHcaSgQThHJ56khFJt7zm cl4+8FZGN6+5MK7e2aVAwsEpyKurKVjkPJEEiHTiF9IXDMfbsP4nNpQLdjqKu+bkDH+Z TlCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oYsE0zkx; 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 70sor15447027ple.41.2019.06.11.07.53.31 for (Google Transport Security); Tue, 11 Jun 2019 07:53:31 -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:a17:902:778d:: with SMTP id o13mr25644519pll.82.1560264811322; Tue, 11 Jun 2019 07:53:31 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:30 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 25/92] ram: rk3399: Add ddr version enc macro Date: Tue, 11 Jun 2019 20:20:28 +0530 Message-Id: <20190611145135.21399-26-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oYsE0zkx; 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: , Add dram config macro for handling ddr version number. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++ drivers/ram/rockchip/sdram_rk3399.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 637a0de902..8021ca21ed 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -28,6 +28,7 @@ * [1:0] dbw_ch0 */ #define SYS_REG_DDRTYPE_SHIFT 13 +#define DDR_SYS_REG_VERSION 2 #define SYS_REG_DDRTYPE_MASK 7 #define SYS_REG_NUM_CH_SHIFT 12 #define SYS_REG_NUM_CH_MASK 1 @@ -60,6 +61,7 @@ #define SYS_REG_DBW_MASK 3 #define SYS_REG_ENC_DBW(n, ch) ((2 >> (n)) << SYS_REG_DBW_SHIFT(ch)) +#define SYS_REG_ENC_VERSION(n) ((n) << 28) #define SYS_REG_ENC_CS0_ROW(n, os_reg2, os_reg3, ch) do { \ (os_reg2) |= (((n) - 13) & 0x3) << (6 + 16 * (ch)); \ (os_reg3) |= ((((n) - 13) & 0x4) >> 2) << \ diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index d77a8310cd..5b87524b7c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1033,7 +1033,9 @@ static void dram_all_config(struct dram_info *dram, if (info->cs1_row) SYS_REG_ENC_CS1_ROW(info->cs1_row, sys_reg2, sys_reg3, channel); + sys_reg3 |= SYS_REG_ENC_CS1_COL(info->col, channel); + sys_reg3 |= SYS_REG_ENC_VERSION(DDR_SYS_REG_VERSION); ddr_msch_regs = dram->chan[channel].msch; noc_timing = &sdram_params->ch[channel].noc_timings; From patchwork Tue Jun 11 14:50:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 477 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5FDC33F08F for ; Tue, 11 Jun 2019 16:53:37 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id q2sf7900194plr.19 for ; Tue, 11 Jun 2019 07:53:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264816; cv=pass; d=google.com; s=arc-20160816; b=qu1Q6SbNEL6/pbwoET1Wyj+iVUkBpdsyS+MCkBw/Jhf8CZfjHBkGPFX+msEAl9w4kM yZTEJe8+7yQ1r1H6wMG+ogswAg/VHY+yxifVenPyxLrCid6gEoOA+jId5V46GAze2ye+ PID8KmJ9deFe3b5Lq46N3AWmz75NlqUnPwCP+qBqdzJ9cwaI3J0O/Dvifk2ZdTD/hq68 ZAmP7/JlEXLi0yCIg3TKXfz4Kub5q4MjP7V/UagboGYwtS8FcNsMP8F3S8bLKN3BkNGQ WjgAhzpGmhXLjXmjyI12O4Fkq2a+a6zphdLJ0JkAYEreTF2GcQGKrxc2Bg5Bl9AMrVvt xRog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mKDMBhxFrNrEY7/6HddOTUVwSIwHM3EUjaclz3Skijo=; b=UQAVWx61E4BQRBXB50grNN8mRMN9FA6h4vz72xb7c1Z/LJGUScRQWtCNlvPGnq5DqI yifRs9BHw5SXiQlNjm48xk5l2u2TKxnb4wVUOJsH/SYrR0ds2C+eY0kg0OWU3/BTKpX3 A/ZeIxqkELSDtNgMxM4pdZ8Xx0bnVOJNZMbVM7uZtr7LcceDK5uST2ZCktGW2WfrOrww ZMGrDZCti1Hxm14YXGFSUzinxSRUpSFIAPGJC/viohcV2m/qkbM6xd+fwPRxdTrnT1O9 H9dQLZPqynkQFxlsKC56hcGYbFiIIv5DGWnPa15d0kvDW5wqEKeHrp6FP/kqMmb7g6Fs mGeQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KjaGpcd1; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=mKDMBhxFrNrEY7/6HddOTUVwSIwHM3EUjaclz3Skijo=; b=hs7bmttu7XY6P9pXOcykNb3avwv3u1WtccNQEVV6GzeTCykE/pFVnNbgcC5at82u5E sQhJyto+HBcy3H+xHDq+2xurfd6VozGhC1WAhVZwDtZv7dmEGMJJze0jxhTC8tV6EXEl KH5VO0Z/dS6JbAPB3YD35iIWtatskyFxj1SaY= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=mKDMBhxFrNrEY7/6HddOTUVwSIwHM3EUjaclz3Skijo=; b=lsI6Mv4BS+BgCJXNY14yZlUNHPnLSrzipNhAdsGWDIirQ8lPbbHS9HSTMWvWNzsgUr /7Kk8qxgfadH8eXeqR/clh8PekAgQGBdUz39yNCNnqb5s/jeFWQHgIAwfQPfzug4umEf DgjyuUuHCiIJ2hPeAtnO7WmEj2mu/AhV8VdWoGh9Eia8va+CR2s7luon9FJVI/FBTICc lLl7HsfPHGVeUjUec8YORSy5M3LJPqx1nP3q6SusQJ1FZ0uUuut8CM37BYUaWNwU4yRi wodGW0zYKWuVK4MIKFnkeOdV+ClBE4o4KZY8z5aybdDeQdLFyAcmMlQCAzTGGIZZPRPv +vPQ== X-Gm-Message-State: APjAAAXdNQ1/Aj559OI7NSdGvuK8P6P4thjv2bcUUtX9PQy09rQOn7be 7r1GbZlAWycWAlJvPe0ksH9N83mT X-Google-Smtp-Source: APXvYqzX0OVswqc3jhBg4Ap6ClvdJytDKztyYwwSxXyg3qWFNr6Q3PVG01vuokTRozp0alPH4qeioA== X-Received: by 2002:a63:6c83:: with SMTP id h125mr19884395pgc.86.1560264816136; Tue, 11 Jun 2019 07:53:36 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5f87:: with SMTP id t129ls1382714pfb.8.gmail; Tue, 11 Jun 2019 07:53:35 -0700 (PDT) X-Received: by 2002:a63:1c4:: with SMTP id 187mr20995421pgb.317.1560264815729; Tue, 11 Jun 2019 07:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264815; cv=none; d=google.com; s=arc-20160816; b=CBS0z4SKUiZlFiI+e+dyirtZHW4RHjx4uO6MsXNTu1A8ZBrDhN8eBGGuPyWaVqfeJ+ HOU6aNZ19keiWqsxgUaeJqyVOeeFu1lsDX6E013BmVicvUjfm/e1KXjNi3N1qthj64S/ MmRk7lPg4bTHoC93JdCVAeSkUxJNTduXz5xQ22H88pJtrXsB4WyOkVXk2W4fJlDU+MtC 88QirBLLAk3Bpt0zgJ+VEVReXp6tjU/7jFi5PAvZnaVL8xFHs69+Fjjm94C6plNWvbxW txPPYBb5uA00vwXLNdHQK8v/9Nf3dlUBCn3Dqufi6Xxqgl/PkaChroKa5TtxqEtnOW3O DUSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=rl7D8VxB/uajjmKlPKunXR7uqNow8tYaqhy8wy5znxA=; b=TddmXUvpwq4w3TNfLw5eMKGGwIcF9Pvq4UYoc1+jShilQBs8epzok8hRPe+qP40k+/ 4XD7b1mDEH9lu1CktOi9mYOCazNS6HI8wZ442/E0hprE2gElf1OdsHyXPGrbhXXprkXI uj300T27jbBV2Ff0+bfP6CW5KV4KvkAqKVK99Y6J6LGRQDGhl66GHbB1pAu2XMhQYcBi 1NheR3EsCp8dqcxGxBUqCBlvGxgrbcr/iA43u6DrFu1kL14C0O4mTsIZwSfIBqnKgoCt SW23I+PBuenY361XkOa/fSl5Q/XjoNAkBZwL3qzMhmEqOv8OZblSnSn8XL7AhEAoVyPk r7zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KjaGpcd1; 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 y6sor2172939pgy.37.2019.06.11.07.53.35 for (Google Transport Security); Tue, 11 Jun 2019 07:53:35 -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:a63:db4e:: with SMTP id x14mr21418185pgi.119.1560264815340; Tue, 11 Jun 2019 07:53:35 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:34 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 26/92] ram: rk3399: Add ddrtimingC0 Date: Tue, 11 Jun 2019 20:20:29 +0530 Message-Id: <20190611145135.21399-27-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KjaGpcd1; 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: , Add DdrTimingC0 structure with associated bit fields. These would help to reconfigure sdram capabilities during lpddr4 setup related configs. Signed-off-by: Jagan Teki --- arch/arm/include/asm/arch-rockchip/sdram_rk3399.h | 12 +++++++++++- drivers/ram/rockchip/sdram_rk3399.c | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h index c6a260bad8..924eeb3bac 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h @@ -26,6 +26,16 @@ struct rk3399_ddr_pi_regs { u32 denali_pi[200]; }; +union noc_ddrtimingc0 { + u32 d32; + struct { + unsigned burstpenalty : 4; + unsigned reserved0 : 4; + unsigned wrtomwr : 6; + unsigned reserved1 : 18; + } b; +}; + struct rk3399_msch_regs { u32 coreid; u32 revisionid; @@ -44,7 +54,7 @@ struct rk3399_msch_regs { struct rk3399_msch_timings { u32 ddrtiminga0; u32 ddrtimingb0; - u32 ddrtimingc0; + union noc_ddrtimingc0 ddrtimingc0; u32 devtodev0; u32 ddrmode; u32 agingx0; diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 5b87524b7c..f9fec14758 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1043,7 +1043,7 @@ static void dram_all_config(struct dram_info *dram, &ddr_msch_regs->ddrtiminga0); writel(noc_timing->ddrtimingb0, &ddr_msch_regs->ddrtimingb0); - writel(noc_timing->ddrtimingc0, + writel(noc_timing->ddrtimingc0.d32, &ddr_msch_regs->ddrtimingc0); writel(noc_timing->devtodev0, &ddr_msch_regs->devtodev0); From patchwork Tue Jun 11 14:50:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 478 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 51CDD3F08F for ; Tue, 11 Jun 2019 16:53:41 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id u7sf9751543pfh.17 for ; Tue, 11 Jun 2019 07:53:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264820; cv=pass; d=google.com; s=arc-20160816; b=SrG0k7RG6BknkFIwapl75HjwSOcF3sZyqIBw6rrUJboFKKsg2u1B+TBkv6VGaq0Upu 9zBCOtSWUc3ffQbZ+CxrVCHPrBEN+Y+7chrilmg5blLLNZSj2k2piEqyOzNsjolf2/+s Ik7TEO4ZS4OjnH9RH4s+avPM3TVDhGubI6VcnaE/k5pU8BZfPDLBcEuh0VNWos3WVGmW 5Bw8Cq0tta6zviKOHCca6X8Q/3CpkNGcBTVevTyGpqpA8HwxR+iPm0rApR6LrFR7UAa8 q7Rv3ZmINZQ3DrtzxBaQ2QV71WoKAie2nKq3iqwSuAhV7aiMDVWZ0Rih7sdwMGBRgtrH rnQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=C5MuGDKPq0FqWkfj9BEnwFZlT5fzQbhsLmB3Un6E68o=; b=VHHKLy2K9ADTSdAhlyfM23hU3XwCKQwj0D6SKyvGSw9+4u7/DhZfcDM+1adjiE7rCr zVoiAOX5cweu5xyLU+/m2IhWLDazkE49reYn1XrGNPV6VPjeWw+905wHxB3Sn6egXZa1 PuYJU9W10mk8Dn7W/J4oDX/mutR+1AYduRgwWGRa7bdDu+2rieTm53l52fmYYhaRnbGt eNEauMn1ErtN1+R5d7mVYauC2JsKUxbX3gYuMqD/RtS5pQZOfSXOIqsbm2vLiGVUaWox D55OMho4JRvx2Zo9gALVGwghMBvnu3WeSyTO6RDFnz2jauefrBXPrAwYfaLI7lj6hEpk iCCg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="rpD/jA2R"; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=C5MuGDKPq0FqWkfj9BEnwFZlT5fzQbhsLmB3Un6E68o=; b=Ea8Do8gwgmana603xCzsbyLHmEn+3UR1jSt8goJ/eECc0ylpgGdVAU0IPehUUoBUUD UhJp7KASP561P7RyQEStZA8xJ7xR/T14kup2/VCbUM1c1w/CacQqkeROIY6/WzJ2WngZ mSAJyS7ODZnfqOkL/IGyu5COcRHw3cRBE4QuU= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=C5MuGDKPq0FqWkfj9BEnwFZlT5fzQbhsLmB3Un6E68o=; b=YEvkbxU97QEmX1qvTkDvUFuXqYWZXc93QA/9jUsp7PREEsGTlpZktuDY3ZfowvFlXm 86vbPMh1zCXgk5YHFHs7s3W07told76uXQr2Qq0/itWQlN/w1GDTmVkzGHzyF16l/jTq Z5TJJ7eYmdNHDd2jMMZNT1aCX9WUPxBX+AUXt6eDC5ZOPTNDDZ6jEDngeVYCwB7G+/Yv yI7h9nQ23nij7KKunpSpAWR7eEgR3nn2QpdL7WVL7nmGk+8oEz31m+t4IWJd3xFOzbtA vzT+IXH6TLZnUP/R6Nc2fdHLXLc5k/XHkDpQRUeiiL4SUECmgZS4RAUd2Akt0QUOqKHS WjDg== X-Gm-Message-State: APjAAAUwpyOQ6fbTrecZMBz0Xd1e45mklPvNV2mmVM2YxCDw5s2e+3yL dfjkbWmZ4Uj5vU3SWx5U07gnKDad X-Google-Smtp-Source: APXvYqzfLl3wcpwvkJCtRjIJ9TrsqFK9efHvkWSjbpO+0JFHV9FMknqrFp4CXTJK7HhZ/Nz4FE1xwQ== X-Received: by 2002:a63:5d05:: with SMTP id r5mr14350212pgb.222.1560264819997; Tue, 11 Jun 2019 07:53:39 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:a584:: with SMTP id b4ls863778pjq.0.canary-gmail; Tue, 11 Jun 2019 07:53:39 -0700 (PDT) X-Received: by 2002:a17:902:2b8a:: with SMTP id l10mr37844760plb.283.1560264819650; Tue, 11 Jun 2019 07:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264819; cv=none; d=google.com; s=arc-20160816; b=mPj8nvtBTYTJN5XCPToq6Sju9AkDGYalV1MYTeisyeFf+ySCJMo3cqq27xo3Z8H2ML PMhhjEXmFNs/nZSbiHTAS2Btz5eyJFhB+/baiQTkCioBgEoA5zHOGW+Wc9jGsmGVB8hr eO5R+Ka1Sfk3felgSj4zQG7ZLL8VkDXtqnzAVSJoWFTAODOfJmbFm33RibG/9FlYyLxB GFkJeVIHHC/ZE2j49tItI0wFEPmWRbV4dUf1qHL3HsJjd576SQ5TOJiUh7I6MYLQspM8 aawXnh3XuXNu9O2YA6hqPKRbTEEeaQCiCaEABgdVBXTGWgo2ewMG8gGxaF5YR+CbddVq os5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pNzjAraVNoewldxYhRz1aFbJ02OEpUk5OMXvghfzWZ0=; b=WzwijXo+K7kwTuOT6//QHveC+c5kABpH7Q7dOvPFpg/DScC2PnasEh9b5OVBjpDRXw OtZl3Sxt019ZvmoP9K8dcfgwTVV2EI59oIWj2tH1FeSt9+0VsqT/me/Dud+W8YQX5gG8 qo3xsrFA06R5MIOFVjEiqiW7Kx5cc0CWGsdNDX5HkFn/fbZPy6P8lQMLItUu/OX2hwGQ vAXvzjoSMhOjsKs8seUh4odx3cEGWy6r/RueAnsHRQvMO3r2f3+tLQZw91pJGl82R86d skzIrqGPFe4fk0wwq56vRTKfZlUWPSpfpRB7fOODtHbxkPHSbtWnNVOtDUKl81uUEl8x jdmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="rpD/jA2R"; 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 n20sor13159777pff.10.2019.06.11.07.53.39 for (Google Transport Security); Tue, 11 Jun 2019 07:53:39 -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:a63:1a59:: with SMTP id a25mr13440302pgm.173.1560264819239; Tue, 11 Jun 2019 07:53:39 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:38 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 27/92] ram: rk3399: Add DdrMode Date: Tue, 11 Jun 2019 20:20:30 +0530 Message-Id: <20190611145135.21399-28-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="rpD/jA2R"; 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: , Add DdrMode structure with associated bit fields. These would help to reconfigure sdram capabilities during lpddr4 setup related configs. Signed-off-by: Jagan Teki --- .../include/asm/arch-rockchip/sdram_rk3399.h | 17 ++++++++++++++++- drivers/ram/rockchip/sdram_rk3399.c | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h index 924eeb3bac..a191d242f8 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h @@ -36,6 +36,21 @@ union noc_ddrtimingc0 { } b; }; +union noc_ddrmode { + u32 d32; + struct { + unsigned autoprecharge : 1; + unsigned bypassfiltering : 1; + unsigned fawbank : 1; + unsigned burstsize : 2; + unsigned mwrsize : 2; + unsigned reserved2 : 1; + unsigned forceorder : 8; + unsigned forceorderstate : 8; + unsigned reserved3 : 8; + } b; +}; + struct rk3399_msch_regs { u32 coreid; u32 revisionid; @@ -56,7 +71,7 @@ struct rk3399_msch_timings { u32 ddrtimingb0; union noc_ddrtimingc0 ddrtimingc0; u32 devtodev0; - u32 ddrmode; + union noc_ddrmode ddrmode; u32 agingx0; }; diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index f9fec14758..6bf8dce6e0 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1047,7 +1047,7 @@ static void dram_all_config(struct dram_info *dram, &ddr_msch_regs->ddrtimingc0); writel(noc_timing->devtodev0, &ddr_msch_regs->devtodev0); - writel(noc_timing->ddrmode, + writel(noc_timing->ddrmode.d32, &ddr_msch_regs->ddrmode); /* rank 1 memory clock disable (dfi_dram_clk_disable = 1) */ From patchwork Tue Jun 11 14:50:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 479 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D33363F08F for ; Tue, 11 Jun 2019 16:53:44 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id f1sf9777225pfb.0 for ; Tue, 11 Jun 2019 07:53:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264823; cv=pass; d=google.com; s=arc-20160816; b=LzCpCvf9Z4sTl9NrSTCx7cXDBPkrrLdaf1Yp4JRYXD+NCLU21rM11F6QWGdTMfjA76 Bm28LDNWD9Px8103rVrXRLL1m96lIbRXi6uKFZkBctxZlSSMmBFywnjTVuihYtASIxHr Hqng53vUXL6IwWeKEGWnwTHaY3Yf6GRaqtmbGYHsNr6eAUXHA/oe8A4wsIRsh5ZwCGt/ AqnM4OG2gOmZb4E8ZgfRnIaXNKH0WEnafSN3OfWSuG2qn08bjlD3g3UTO0r+yAB7aUmq SRiPIuD5SShsbiKjRdi80w/mjWb9/rndXeXHC+xHYDDLlssrSxWdtLWRolTeLk70HBWD bjXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=NOmc2XYmupp62Vudauc50r9dHYlyDhuGFBv8w+SLVzc=; b=h4RW9PBSVzjqY12L55Tp57ty6exEULpW7TdWmm8q+TK4STG41YByTg6npBIzugRS1N pUBJhWZXlV3ZlQe8Sc3Lp0T0wNhliRckoex2sCsF+sO60hteHaH1E2fh8HOFZF63pfYJ iPkfrkPfLrI8yTDeHlIVdP1kFz7xYmO+JnEQc3aRr3O3p0MDikCIPXXNqDS4PquTkMEZ w4RmWtZqyS2IrvTr4yH7PiJ0jDrPqVvK9sY4s9d9zNG8ptH78B06Dnt0YATuPuj/dneG uJLr5V2Eub2NzxJX4WuyW+pafOmbOvhdz4RXLlKVmB9pBFolgorEACLl7Gc+Ckeb+w1t U45w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KMGmhSkt; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=NOmc2XYmupp62Vudauc50r9dHYlyDhuGFBv8w+SLVzc=; b=D+uv2smPEqs3LMmXynke2fYuWb79Qo4XJxxb+sCazztNPQAmWxW1atSg3TaJD0d/kl uYt2pNFeMV3Qm8LP/NfA6fop7ajpwMFtyhIVAsweUfF6eJqStbxpf0Y93xw5oTw1LLMK s30hzbd4wu8d+ze2sd9q6Hi0zXzi/ogh1OJPo= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=NOmc2XYmupp62Vudauc50r9dHYlyDhuGFBv8w+SLVzc=; b=nHin7TvDnDT+ZVdkA9UswhhWluld5vQLguwzgoJdnJUapHVyybU+OC+M4+70go27+U IRuJYV7uG2K/8+p3lffqwCk14L0F3o0CIXJZXCkTk4ATJRGzyKpnVLH+zqKGkkCKBHDQ I8hWyqWuMu2qYNPI9oBSz/LdqDe3R3toO4UpSpW2ZRUufh+eCY8tR4NuqcZdkN94kx5f 8vAHBUCWAbPUQ4vOtXbsiVnUT4xPGo5IJogL29WLLtSIfVedFrSG5xx8gQzuVOJz4meb BzC7RVasV8Wgd4+6PBAkFxpXlrPYFcAytlw+1gTabZbXYlK3QLJn+7gfhbEv+70eiRho SujQ== X-Gm-Message-State: APjAAAVsl3tfeibADPl/JvfkP5+ZYMLtcoTVj81bEPbuRJ1QGine6aFo 3wWjJeyHsLgqNdQfWp3cNHaHnpBk X-Google-Smtp-Source: APXvYqwztmNGRQ/VJdIoame+bvQRfbCr8sMCduioiclvO2MpGfSbd2D+QJd+RV7oPejBY3PZTJtmFA== X-Received: by 2002:a17:902:6902:: with SMTP id j2mr3961948plk.321.1560264823655; Tue, 11 Jun 2019 07:53:43 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8c8d:: with SMTP id t13ls4895489plo.13.gmail; Tue, 11 Jun 2019 07:53:43 -0700 (PDT) X-Received: by 2002:a17:902:860c:: with SMTP id f12mr76695998plo.127.1560264823315; Tue, 11 Jun 2019 07:53:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264823; cv=none; d=google.com; s=arc-20160816; b=jU9SZHZQk56B2qk9MMGGWR4TJdqSXzNTgZcA3bTdKRleOlKVZd1VMBxC/I9lfqjzjZ KO8RBhmVPULENBkymlvW7mzWPzlG50OTr7Cs00iu/V+9vPn7J/tLbo3Zcl37cNXwgnUO JsoeYOMfUayhHA+BeUTC872ZUzZfjGsRnTMpFiz6EufIePZ2fLoZpq3qRBYq/k6TZ9ps AppCiINUBVLINvf+MRLp8jrSnJWHz3AWsSvAPPnZJqeCSHq1E6lzpRQ577IT5xUvLZVT rs+NzW1YSy2zarTlZE2awInEynVJ/r4xTQV03JtU94RBFAq7DuowRVdITHbgP2t+nf45 W9kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=rAuLjhYGsqoY1vVGPKew7EBTf/gbRxPk/ChOgOW0AfY=; b=TdsVX3TF5ZvVxXqNFIqXktxOu0xuKLSOUTFBJvsPm6gmPS856QqDl5Z1sGMJivL8lK ITZlV5Xy6h2QScbhOXvnute2n9Ml6hmqgXuZCR0SwDl3+Pd3REHnZpa2bvIimSz3SCge +Fd9H5xj/L4+4enbxg1NEn8eI7fl307HOlMqq80m5PWAao5LpUnGHVbBLvbtQOziO1GY FUu1Ar/dwnx+D5zR/6TBxv2sQUfEYrnQQxKk9EP/QYEXalyRgNCZchWu3u2UzHo6ulEj cgrYX58QEweXiNrJnJTZZlqivb2a8hZ+BB6553wVSvgepyHVITwq+mnL4n4sMnxmSjC1 Y7Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KMGmhSkt; 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 m37sor15543663pla.6.2019.06.11.07.53.43 for (Google Transport Security); Tue, 11 Jun 2019 07:53:43 -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:a17:902:4181:: with SMTP id f1mr73641857pld.22.1560264823015; Tue, 11 Jun 2019 07:53:43 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:42 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 28/92] ram: rk3399: Handle pctl_cfg return type Date: Tue, 11 Jun 2019 20:20:31 +0530 Message-Id: <20190611145135.21399-29-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KMGmhSkt; 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: , Add proper return type handling of pctl_cfg with meaningful print statement. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 6bf8dce6e0..fab7515b2d 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1120,6 +1120,7 @@ static int sdram_init(struct dram_info *dram, unsigned char dramtype = sdram_params->base.dramtype; unsigned int ddr_freq = sdram_params->base.ddr_freq; int channel; + int ret; debug("Starting SDRAM initialization...\n"); @@ -1139,9 +1140,10 @@ static int sdram_init(struct dram_info *dram, if (channel >= sdram_params->base.num_channels) continue; - if (pctl_cfg(chan, channel, sdram_params) != 0) { - printf("pctl_cfg fail, reset\n"); - return -EIO; + ret = pctl_cfg(chan, channel, sdram_params); + if (ret < 0) { + printf("%s: pctl config failed\n", __func__); + return ret; } /* LPDDR2/LPDDR3 need to wait DAI complete, max 10us */ From patchwork Tue Jun 11 14:50:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 480 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A80F53F08F for ; Tue, 11 Jun 2019 16:53:48 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id g11sf7881774plt.23 for ; Tue, 11 Jun 2019 07:53:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264827; cv=pass; d=google.com; s=arc-20160816; b=wZHxz0+duH9+Mn0IQyODFB/6CaB9WaqdKhtQISaWxNvKyvOTusx+/Nf0cOkFC/LmQu S73N+bGJQIBYusQGBOLIB5DMbUOlAyECaRGvDJ55dEQObCz5vhMIFbY5JJhz91IOb4aj n8QjEThI25HAek1K+Nv/gtS4WLLNniCmlnNrHxRM4W2c4yMvIF00+U34coVM0W8B2LUU W0dxdafcN0OlGE/Lr4oPgmWF8MkC3VZTLXosrg4zowjcMF42A+14wzkA59bkVwcIXWoH hwCaB6HZyYekKA9ZAq0e3iriceKOiiU8Ekk7D782tukExnCfLc3/CHe2oETLe/x32Eru MO9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=s0SOLPbLeSgGEVmVcNRpckO3MnK8EU2OWN7b8Dlrsak=; b=EaXLtoD60JXFReRqPgpN5djnaHXxiEQlBM1VchtrUl3Rrvex9b04Mvfs3fDepYmT84 d1dVLj5JnVArai2QRMz5CDWqHEkXTXjZ9ftH60CRvpGkYEvWh0YCGXoQ0LuivPV1D8U2 pEJmUTnjN1T77WvytDC2f4Y8ZPdINHqtq9KFiyMICr4T4uhDYXa6m4snKYTlfH1VdFQG EfzALAj501VkdJDZjWzdUIhIxKsmM20vgWs2lBC5eGAmOzHG47lOgta92vRy9gfh9F6Q II790JJR5a3VWQRcxXCEbgufTqQkCrFW514wnPZzC0qNLwmmq/GZ0cSyYqSEybmpL7KY Srvw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cvBQf2tQ; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=s0SOLPbLeSgGEVmVcNRpckO3MnK8EU2OWN7b8Dlrsak=; b=buf8X2NB21Hi4YC4NW6jogfKcLPAoV1wHStOisbsvC7hUQuvykP7gGy4kG2+1z28pG aBh9Bnkc/fq9dfLpAcm9n75SQxOAUsVWNpBTUS/GlWL5fckTTFnUSCXMfAnJXTz4W4+R zE182riKnbEtoOSJj9UA/agjjrU2dz4Sey7lM= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=s0SOLPbLeSgGEVmVcNRpckO3MnK8EU2OWN7b8Dlrsak=; b=QTesY/iduzePBk6JbpfwTA47xaRAgJQ2onEsLmdCz8Vs8qCNrnV88HQ0qkHo/AAaEv yOGCE6qo6brgIbdxxmOtDe/lxJ4SOIlEdnakXItFNer8YQe4AknZ5QBAj6lwahIla80D 3x6mVm7xU6hCybU8FkjOJLPM7wGZALaD30NR6prU3mQQBJdt13/VCw3oxB8/NR2FHtTj o3t7SuOWsOW9ecMesLcnVcN88dhCWHvEMaz7ItLqyMBRss2o65jXoiCPUuZ5WwLF259Q FnC8/mucVZZKtwhNaosy+7890AYVN2LifGnd06D272ARuewvS+zfbHahn8FvIZN4a13i vI5A== X-Gm-Message-State: APjAAAV0/GKaaNk/ITDHcaAKofxFZQx3lX03j8lQYGxTNj1wdVeVJOtt XrPiL+IMMGwwhrhZT2dqaVu8sgM1 X-Google-Smtp-Source: APXvYqz7t0mQSZrZzCkf91BlBYg4AL+seSUqUJYnXOudzTwmFq/CQaMCHazSUnVmZBHvvG+09Iy1xA== X-Received: by 2002:a63:6fce:: with SMTP id k197mr20846125pgc.140.1560264827402; Tue, 11 Jun 2019 07:53:47 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:28ca:: with SMTP id o193ls4495571pfo.10.gmail; Tue, 11 Jun 2019 07:53:47 -0700 (PDT) X-Received: by 2002:a62:1456:: with SMTP id 83mr29261147pfu.228.1560264827123; Tue, 11 Jun 2019 07:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264827; cv=none; d=google.com; s=arc-20160816; b=PvfPqNO/KIBlDtA6nVwnZT0jMhSmX148p5yLpYvFnYkkMSgRbavtT2VnhsnS9nojBg SjyfvzKaSX/D9C9vyQG0Te1+RVQJx0+T3ivx105AI8K6m5lc4NUo8E8fMjLR7K/UHnzh SEG3zIDavmBS1uxKBgsgdzj+AKSCskwHWPVxizsQnEPXt9/7cIHH1fU7dBNsGrivNM38 VwcSMF7tiEHAlERw/NPAgTHg+eeV0NjNHB5jt+PZwrqJPygltmDeoLEo50NoarZ3rf9u lj0sEcsJiQ6fSUZSm0pyVkiq5kXAg4QI3OcLBLzxILUaNtGPTx6bPMNy0cNKEGnHnlip ntUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=w03lZucNkjUk4CFMHgUL3E0J7s2uIlvAVgDnBVNXifs=; b=sBL/56MXHTXOZgv72hpxPH6PiiVsFMkKt1HeWO0VwPL+P00Wc52yT0U9pxPwFyFBH1 Gzv5+RDvzEufIsPwopVF3/lBV9NBqpEOVRgjWKUprvRV2RhfPFaHO7Wo/htlhpAwANSO +PG/gAfDZ2ttyazuZXTNmAvYq2nFdOTgkeelZAbzN5PMcS1dpkZYhIHLPVXsbTQwxcDB 7hNB8tYy505zfz4yerEwdfNTi97KPQQIPhgRV39l4IzLogenMZh6KNwl0QOnx8teYvch MKvqdNPdI//3XPjR87rimfeG4yAgC1RolwEDSrN59M0TNGBWz4PtQ8XF4P1nKTf4z+Jo Dx1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cvBQf2tQ; 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 x10sor2906598pjn.26.2019.06.11.07.53.47 for (Google Transport Security); Tue, 11 Jun 2019 07:53:47 -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:a17:90a:730b:: with SMTP id m11mr27120885pjk.89.1560264826753; Tue, 11 Jun 2019 07:53:46 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:46 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 29/92] ram: rk3399: s/tsel_wr_select_n/tsel_wr_select_dq_n Date: Tue, 11 Jun 2019 20:20:32 +0530 Message-Id: <20190611145135.21399-30-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cvBQf2tQ; 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: , Rename tsel_wr_select_n to tsel_wr_select_dq_n based on the bsp code and associated datasheet. No functionality change. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index fab7515b2d..7c05814f19 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -162,7 +162,7 @@ static void set_ds_odt(const struct chan_info *chan, u32 tsel_idle_en, tsel_wr_en, tsel_rd_en; u32 tsel_idle_select_p, tsel_wr_select_p, tsel_rd_select_p; u32 ca_tsel_wr_select_p, ca_tsel_wr_select_n; - u32 tsel_idle_select_n, tsel_wr_select_n, tsel_rd_select_n; + u32 tsel_idle_select_n, tsel_wr_select_dq_n, tsel_rd_select_n; u32 reg_value; if (sdram_params->base.dramtype == LPDDR4) { @@ -172,7 +172,7 @@ static void set_ds_odt(const struct chan_info *chan, tsel_idle_select_p = PHY_DRV_ODT_HI_Z; tsel_rd_select_n = PHY_DRV_ODT_240; - tsel_wr_select_n = PHY_DRV_ODT_40; + tsel_wr_select_dq_n = PHY_DRV_ODT_40; ca_tsel_wr_select_n = PHY_DRV_ODT_40; tsel_idle_select_n = PHY_DRV_ODT_240; } else if (sdram_params->base.dramtype == LPDDR3) { @@ -182,7 +182,7 @@ static void set_ds_odt(const struct chan_info *chan, tsel_idle_select_p = PHY_DRV_ODT_240; tsel_rd_select_n = PHY_DRV_ODT_HI_Z; - tsel_wr_select_n = PHY_DRV_ODT_34_3; + tsel_wr_select_dq_n = PHY_DRV_ODT_34_3; ca_tsel_wr_select_n = PHY_DRV_ODT_48; tsel_idle_select_n = PHY_DRV_ODT_HI_Z; } else { @@ -192,7 +192,7 @@ static void set_ds_odt(const struct chan_info *chan, tsel_idle_select_p = PHY_DRV_ODT_240; tsel_rd_select_n = PHY_DRV_ODT_240; - tsel_wr_select_n = PHY_DRV_ODT_34_3; + tsel_wr_select_dq_n = PHY_DRV_ODT_34_3; ca_tsel_wr_select_n = PHY_DRV_ODT_34_3; tsel_idle_select_n = PHY_DRV_ODT_240; } @@ -211,7 +211,7 @@ static void set_ds_odt(const struct chan_info *chan, * for write cycles for DQ/DM */ reg_value = tsel_rd_select_n | (tsel_rd_select_p << 0x4) | - (tsel_wr_select_n << 8) | (tsel_wr_select_p << 12) | + (tsel_wr_select_dq_n << 8) | (tsel_wr_select_p << 12) | (tsel_idle_select_n << 16) | (tsel_idle_select_p << 20); clrsetbits_le32(&denali_phy[6], 0xffffff, reg_value); clrsetbits_le32(&denali_phy[134], 0xffffff, reg_value); @@ -251,7 +251,7 @@ static void set_ds_odt(const struct chan_info *chan, /* phy_pad_fdbk_drive 23bit DENALI_PHY_924/925 */ clrsetbits_le32(&denali_phy[924], 0xff, - tsel_wr_select_n | (tsel_wr_select_p << 4)); + tsel_wr_select_dq_n | (tsel_wr_select_p << 4)); clrsetbits_le32(&denali_phy[925], 0xff, tsel_rd_select_n | (tsel_rd_select_p << 4)); From patchwork Tue Jun 11 14:50:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 481 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0F1D43F08F for ; Tue, 11 Jun 2019 16:53:53 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id f9sf9772778pfn.6 for ; Tue, 11 Jun 2019 07:53:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264832; cv=pass; d=google.com; s=arc-20160816; b=WqFcJD8LUhLfDn+2/JNTD6BA31iCiD1Ar3c+RWoqEOzVSboTBugMpAR68Tq37yNPQu 5y92Ig5Fpxe8B92RthUyw0BZAqGg9R/z3mrlB1A+tHapeZY7Zt/D5q4+64iasyMWCUAQ aZqRo+bs5L+hjIeiLOZRuXRpc+0JLz7vsyLzeXXcXTa7KqzPhpwl5r41iRjyjEClOiDF 7He/IkUI37CRw257rn3yj9b3ILN+YGRF8rMqZi1LB9c52/11F97iHTEYMG47cf+vo431 VzPsJ6+T4bF9R6/vJlI4jlKOr838HpJ7/cjHUR7RFT2IbfywF7YeTOCjPZSI9SU8rHE7 ZGHA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Flaxt2rWIDVO3FJ9DVAuEliFMoNMKMtvksKNlRluQcQ=; b=AoJYaI89nAVvVHrbRnxDIB7oT4AziXjO4fhkXP9aR5mf3DV1fNpIaQOUobKha4n5qP 3P6XvamHVsCB1scvbfF6gAJBAAIynGo6oJOcnxR+QBd7KpUUewxcgdkzX+gXyIE7+6LW kHKKf0mFwucSsT46Rsvqo8RO0n86m5FwLREroUFzlfEGABld7OXCzvKlJveKCJIwM1mj IMiAJhaB/rqw7TrM/XKn6ZLbp6jLro9CnrLZ2DfASKLjiOHzxzATRqoHecRs4d9C90K4 J2mXtn5JZtoXwxXeqlzh6PeRQkvsOEkdSuRcs5IMWDSUN+2kY8O5yTl74pGPuEgwtA+2 rwYA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FGMgN3E4; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Flaxt2rWIDVO3FJ9DVAuEliFMoNMKMtvksKNlRluQcQ=; b=RjdZ676oIOFqlbbasUWI4r+OACDS23YpGIVSOVU5mkliV/HoHS+KN6wnvESzm+INDs FP2xAZLhUfxxWzC7Juq2EVwRJ3Kn8FU4vUgKJCojnUVKHuh+D/aWjBxvcOASNnQ1fTwb Z6yZJA1TXjXK/wR5pwJ7GD+aPXQQscKxVQXYo= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Flaxt2rWIDVO3FJ9DVAuEliFMoNMKMtvksKNlRluQcQ=; b=OczMFWOtB/oK3tC9H41a3ipsQ4DfwMTn6hezt8jwqtu3DZzcKHLDkIipgjI1V8j21s p08InXQE83T+/H2JQUdF2mgfgmcECYbUQDUoS/EU/dBc8r990aap+lTtkpCyKR9ETZy5 jGnXVQ+o+rJ00vMJBmFkvwfL/cionJDDOP2cRBLkvgPCcoh6nLutB5szxQiG1mhpvc/e xHBIRqfR/26zTAOHnhGRgj/yCQoE4mzkrMN1iVJ4pP80LEKjg5atJWFEqCfSGBXKDwzC 1BxlCud3rzQ5kG4oQDu/waXkeDAIWaxab4GyKd5+p1furUzetFwrpXMUbgKwFJvQwBnU w7mA== X-Gm-Message-State: APjAAAV6oBsFwwPgs3D+B9ETTfxDrG4PTXZywVbCjxcjqAOsKoG1pNS7 VU0gGScPFR5dJlAp/uBtfgd/81bG X-Google-Smtp-Source: APXvYqxUj+eEdrKldAAIeYydK+FxXiguo/WZGwaGMHqNeJ/8q8srtQUp1MEWEks4waf7SHnF2hajAQ== X-Received: by 2002:a63:91c4:: with SMTP id l187mr19349265pge.95.1560264831759; Tue, 11 Jun 2019 07:53:51 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:28ca:: with SMTP id o193ls4495614pfo.10.gmail; Tue, 11 Jun 2019 07:53:51 -0700 (PDT) X-Received: by 2002:a65:4349:: with SMTP id k9mr20304631pgq.243.1560264831381; Tue, 11 Jun 2019 07:53:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264831; cv=none; d=google.com; s=arc-20160816; b=cpO1p6OTZZBJWxsoaeK+hTUGUHnh7NkspyjXOOxzTzAqhJUb5FmoULS8DKlziOlygl JbE+lQU3HgwuPuA8XVLo7nvRTFbCH3cbL0pJqeZ270OVLG9Dh7AVNFy0zoneWSd6oc/j fEWI6D/qXuZn+6VI/IBFgF+wGoq82EOy1lFSxY0pDmc7cb37jg02FlQq8vUyveYiC1pg 0QhJatO8EHsHX7SW3Gk/51JoXLPR2k9nXIlVcHvoWYuNKldS4mGZ4YO4EnNwAvm8pss+ IDtYrZ6gt6Q5E1wPNQ428cchhloTGPROezG2ow4Z5S0eoZenD+VVdrmaFtciZGq8d1lB h+bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=WhSySRubGklfxJzvG9TEEbTczFSibK5OKu3ZWwh2UaM=; b=TYU16yMt9aLgLdaephJtpytLEmjBojPFuEs+1iuOiNsXk+Xrahm6DGpb4i/WQKt2pa vEd8oJ+/d9k+dOWmpJJbnppscfutsXWqtUjoOn8aH3DsPFBVSBq/0hLlWtj7+dbS3rb1 je0GPm1a804Tmw40nGHJS/ZOpXg/nOkIoaNmhHPPyClpn0nyQYHZEYPl711yZ0tqC9/P RBjLiGdnK/iwAEbuw+jvyiqtNDGryA0WJWi+psS+mkg/hJD+KyJ8/YIGUwxLon6zrLth iWPNcRRRrueY1niHsJOGWsocM88rkWErZcVZoHfsK70PPi+jbTP0eew5lccqpHCDX+gK wxSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FGMgN3E4; 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 z7sor11897556pgi.78.2019.06.11.07.53.51 for (Google Transport Security); Tue, 11 Jun 2019 07:53:51 -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:a65:42c3:: with SMTP id l3mr20780565pgp.372.1560264830972; Tue, 11 Jun 2019 07:53:50 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:50 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 30/92] ram: rk3399: s/tsel_wr_select_p/tsel_wr_select_dq_p Date: Tue, 11 Jun 2019 20:20:33 +0530 Message-Id: <20190611145135.21399-31-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FGMgN3E4; 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: , Rename tsel_wr_select_p to tsel_wr_select_dq_p based on the bsp code and associated datasheet. No functionality change. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 7c05814f19..780b18fa17 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -160,14 +160,14 @@ static void set_ds_odt(const struct chan_info *chan, u32 *denali_phy = chan->publ->denali_phy; u32 tsel_idle_en, tsel_wr_en, tsel_rd_en; - u32 tsel_idle_select_p, tsel_wr_select_p, tsel_rd_select_p; + u32 tsel_idle_select_p, tsel_wr_select_dq_p, tsel_rd_select_p; u32 ca_tsel_wr_select_p, ca_tsel_wr_select_n; u32 tsel_idle_select_n, tsel_wr_select_dq_n, tsel_rd_select_n; u32 reg_value; if (sdram_params->base.dramtype == LPDDR4) { tsel_rd_select_p = PHY_DRV_ODT_HI_Z; - tsel_wr_select_p = PHY_DRV_ODT_40; + tsel_wr_select_dq_p = PHY_DRV_ODT_40; ca_tsel_wr_select_p = PHY_DRV_ODT_40; tsel_idle_select_p = PHY_DRV_ODT_HI_Z; @@ -177,7 +177,7 @@ static void set_ds_odt(const struct chan_info *chan, tsel_idle_select_n = PHY_DRV_ODT_240; } else if (sdram_params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; - tsel_wr_select_p = PHY_DRV_ODT_34_3; + tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; ca_tsel_wr_select_p = PHY_DRV_ODT_48; tsel_idle_select_p = PHY_DRV_ODT_240; @@ -187,7 +187,7 @@ static void set_ds_odt(const struct chan_info *chan, tsel_idle_select_n = PHY_DRV_ODT_HI_Z; } else { tsel_rd_select_p = PHY_DRV_ODT_240; - tsel_wr_select_p = PHY_DRV_ODT_34_3; + tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; ca_tsel_wr_select_p = PHY_DRV_ODT_34_3; tsel_idle_select_p = PHY_DRV_ODT_240; @@ -211,7 +211,7 @@ static void set_ds_odt(const struct chan_info *chan, * for write cycles for DQ/DM */ reg_value = tsel_rd_select_n | (tsel_rd_select_p << 0x4) | - (tsel_wr_select_dq_n << 8) | (tsel_wr_select_p << 12) | + (tsel_wr_select_dq_n << 8) | (tsel_wr_select_dq_p << 12) | (tsel_idle_select_n << 16) | (tsel_idle_select_p << 20); clrsetbits_le32(&denali_phy[6], 0xffffff, reg_value); clrsetbits_le32(&denali_phy[134], 0xffffff, reg_value); @@ -251,7 +251,7 @@ static void set_ds_odt(const struct chan_info *chan, /* phy_pad_fdbk_drive 23bit DENALI_PHY_924/925 */ clrsetbits_le32(&denali_phy[924], 0xff, - tsel_wr_select_dq_n | (tsel_wr_select_p << 4)); + tsel_wr_select_dq_n | (tsel_wr_select_dq_p << 4)); clrsetbits_le32(&denali_phy[925], 0xff, tsel_rd_select_n | (tsel_rd_select_p << 4)); From patchwork Tue Jun 11 14:50:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 482 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E06713F08F for ; Tue, 11 Jun 2019 16:53:56 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id z1sf9761854pfb.7 for ; Tue, 11 Jun 2019 07:53:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264835; cv=pass; d=google.com; s=arc-20160816; b=xtvce5tcnVQ5vZgAg60LrVBXfpZUBf3+/VG4yuyAIgzOyoYbtODMITRWmOyMyFGUI4 4VIOztbXM40HJGaVB4Q5Xf2rCvkOirWsy2C7H/ir5nmO6nJeS7JBMwmQ7lfUsbubmtSf e3P+erB/Ca6+ZkiMFgb/f7BfgQWN047hoOF3HYPcrfXJgdeEisjOy5wY3jtwHIfbrLod GoPdaE/m0UbI174geXk6kzx7xaBXuYPq5ndFoorxlK+3hw+OEvEvnnCUK00JuybJ2NJC HBZCuFEy92ND+nSvZUoUirtqn33v9VlTaz5VMyxg3nV1X262qDLpLfiY2y3iyB4ZP00V T/0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ETNWq+FTOZFi/renkdbmVhb6sSBZQ5QMgyqJtgblk2U=; b=Qb8vUjkKIYZmcr0KQrMdINJo8+ef+tjCBPA8Ku8eCtfGlvE0C2gSzEebYComnydfvO HqqzC08pekxC8XIsgzThAdTCHzHorc3pdhHbexwhS1l+3zRY6+wqnYEnVXrjPbAijCx1 PDasvArIoaNHpn7H91OUa9U99A1sJVaDUFVCHQ/p+p9yUdDb6S7vWpSBXfLqDBV2vai8 oe8wwzl/0tTqgDIx6HaZaUrv+UbwPmW2WwlYKBD0zi3jx/xKAZiehBxB63bkSpJt0i+m QkwAVj0xVcmbeZ5rypVAlHT8WFn8eJ2/2A5bBj0O8aPxj5BIVVykQSqwn01bkCjieEz6 a3bg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jl1WRHH2; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ETNWq+FTOZFi/renkdbmVhb6sSBZQ5QMgyqJtgblk2U=; b=N8yBbj/3RUQYi3X0JqNJchRE7ldSMHvc45Uilzyyi5DSaGYQbVkrWJBUkYEXFG/0PW I2JUo8yHudQLFeg9Tmma3sVJhFskoAluqA9YNuaKkOcslVfuUZ3HTXcEkMUv0Xao9wKw /7FaNn6b1y77/wzfMFeguL7UJghLek6MIlrzo= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=ETNWq+FTOZFi/renkdbmVhb6sSBZQ5QMgyqJtgblk2U=; b=RC+xi4rO7kfGex8JjOwXtsIAATwuX1fB9cD/Tt99CyTrI5/LfZVCdn940qxQHC0J0A p78eX48WW5GVtaTLW3Za8TDpwC3upss6G5h/bLfmjKm++waWYJMsyB0KxYfxkVstOHxF ibb8nLkkyzho7QQwooD1KVRh98M4umLlCDbS/RPn3xxx+JJg2FMwUX+6x+OykiFBenWw pF773eJ4wyBkbSovBc50K8Oxuer4sE6UBHz0NWKIxGgCxH8qsLkbfQKA1n6kzmcbysR0 dl71O2AFo7495yp7aMPMVydwBS0HKDKtzzN7DwLLWL+xsi6MkJS45LvmTlaTMf3v4+W3 qfng== X-Gm-Message-State: APjAAAV55rx0y0bnd9FJlEc5pXyxqAUM5wP4z8IZuij9iaIE27r6uQT2 qqwv4u/QSlgGJyT8y/6Svv83GmVq X-Google-Smtp-Source: APXvYqzzf7+t7qcaiRPjN9/1npgfBMWPlWiMuBZzfaBJ5yHx7m/ed3Ix+hEGPLS2a21Hc/bvPN/GJw== X-Received: by 2002:aa7:8e50:: with SMTP id d16mr73279935pfr.65.1560264835737; Tue, 11 Jun 2019 07:53:55 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:2b0b:: with SMTP id r11ls4513950pgr.4.gmail; Tue, 11 Jun 2019 07:53:55 -0700 (PDT) X-Received: by 2002:aa7:81cc:: with SMTP id c12mr73091716pfn.139.1560264835318; Tue, 11 Jun 2019 07:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264835; cv=none; d=google.com; s=arc-20160816; b=QGUWfikqTtJQwEVOss987sxvMathLmUcysnCYpVzToBZhYVzPb48xZX8EWMZrSz83j 5wv7jS9BFmd0c+ktt6puZLmUurBKABWj2f2zu/YO4c4J85L6k3XnEL/wfThr9lX8mVwg Gr0DcfBItME7l57M6Z+eh8tOvTd5X2Qb0CkjeB4/eb6+kD0hT9//YKINTLdA7vLHgNpY l5xJlxkuqNhdqoNZgyeiCuT1lph/aFlMbMgonskXgMJARvoSSBv+zl4D2E5+THXS1rK5 FHg7AcA7HfBDsHTGyX06ocAfsndgItOGy8XwMuJ1NfP6oNIkwjCs3Q6poLtgM9HZ0ViQ UABw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Vq2oI+3vMUMkg0n1XXuFvNc3vyzrVc/D6owKjBX1t4g=; b=zgY3D0TmOWkiEruQmHTuu/QtkZS2PzAzk/wW/awJo1cejbnZo7fnqN34s8ycm0YZg6 FIbXZ7FKP14XWHAfLL9yw+3XfsJAlF8oZMmmMUym5FkpuycgFc3VDLerXqVvfnPRDHJu xeTcG8hK6TRub8GwbJaUjmXheWn+ISEMhvdlVZC/TnYd7P7jiFg8EDouMxDubGWdPusg CWUy9jmfCKvrDUDRlVqPKvKT22A8Zwx39d7G+Vqn5It0633Vlj0/vjC46z0w+Ii5u23t zo0NJV5B9sg40139S0bNM0nklpTkoskaVhBjTa0mgEWihii41Wf/LuSoDRWZ+r3TzzTn LjLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jl1WRHH2; 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 u2sor13150098pfm.28.2019.06.11.07.53.55 for (Google Transport Security); Tue, 11 Jun 2019 07:53: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:a62:e815:: with SMTP id c21mr38798237pfi.244.1560264835030; Tue, 11 Jun 2019 07:53:55 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:54 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 31/92] ram: rk3399: s/ca_tsel_wr_select_n/tsel_wr_select_ca_n Date: Tue, 11 Jun 2019 20:20:34 +0530 Message-Id: <20190611145135.21399-32-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jl1WRHH2; 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: , Rename ca_tsel_wr_select_n to tsel_wr_select_ca_n based on the bsp code and associated datasheet. No functionality change. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 780b18fa17..bfae4e78a9 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -161,7 +161,7 @@ static void set_ds_odt(const struct chan_info *chan, u32 tsel_idle_en, tsel_wr_en, tsel_rd_en; u32 tsel_idle_select_p, tsel_wr_select_dq_p, tsel_rd_select_p; - u32 ca_tsel_wr_select_p, ca_tsel_wr_select_n; + u32 ca_tsel_wr_select_p, tsel_wr_select_ca_n; u32 tsel_idle_select_n, tsel_wr_select_dq_n, tsel_rd_select_n; u32 reg_value; @@ -173,7 +173,7 @@ static void set_ds_odt(const struct chan_info *chan, tsel_rd_select_n = PHY_DRV_ODT_240; tsel_wr_select_dq_n = PHY_DRV_ODT_40; - ca_tsel_wr_select_n = PHY_DRV_ODT_40; + tsel_wr_select_ca_n = PHY_DRV_ODT_40; tsel_idle_select_n = PHY_DRV_ODT_240; } else if (sdram_params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; @@ -183,7 +183,7 @@ static void set_ds_odt(const struct chan_info *chan, tsel_rd_select_n = PHY_DRV_ODT_HI_Z; tsel_wr_select_dq_n = PHY_DRV_ODT_34_3; - ca_tsel_wr_select_n = PHY_DRV_ODT_48; + tsel_wr_select_ca_n = PHY_DRV_ODT_48; tsel_idle_select_n = PHY_DRV_ODT_HI_Z; } else { tsel_rd_select_p = PHY_DRV_ODT_240; @@ -193,7 +193,7 @@ static void set_ds_odt(const struct chan_info *chan, tsel_rd_select_n = PHY_DRV_ODT_240; tsel_wr_select_dq_n = PHY_DRV_ODT_34_3; - ca_tsel_wr_select_n = PHY_DRV_ODT_34_3; + tsel_wr_select_ca_n = PHY_DRV_ODT_34_3; tsel_idle_select_n = PHY_DRV_ODT_240; } @@ -229,7 +229,7 @@ static void set_ds_odt(const struct chan_info *chan, clrsetbits_le32(&denali_phy[391], 0xffffff, reg_value); /* phy_adr_tsel_select_ 8bits DENALI_PHY_544/672/800 offset_0 */ - reg_value = ca_tsel_wr_select_n | (ca_tsel_wr_select_p << 0x4); + reg_value = tsel_wr_select_ca_n | (ca_tsel_wr_select_p << 0x4); clrsetbits_le32(&denali_phy[544], 0xff, reg_value); clrsetbits_le32(&denali_phy[672], 0xff, reg_value); clrsetbits_le32(&denali_phy[800], 0xff, reg_value); From patchwork Tue Jun 11 14:50:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 483 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D40C93F08F for ; Tue, 11 Jun 2019 16:54:00 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id f9sf9772961pfn.6 for ; Tue, 11 Jun 2019 07:54:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264839; cv=pass; d=google.com; s=arc-20160816; b=fTCLokD2yCsKMsQq4H8IDg0dgGM6nAhqn7IR14iLbs2g+X5zsdkFfawJ8ZtFqfdB/X C9lLPny3/8Dd9DLojV3fa2+Y5BlkDRobGrxa7mINmbpkiFbG845qt/amye0YPkYrUVmx ygYt151d7jfVfwSKzyRIVCNEgbP9nZYD0kfnz6WC3bfZULJQwMYA/YihJXFAJEUIEwyn OhT+HEjV1ezwGMV8UpQk5c9m/VU9kqNe92G9+kSOodCZO6VNuO8NEHdcGfn0OcgDFjNh T8lYFwJcTqgSSQP8TdRYxLSBh+PnwYaun9HtVs28OnfbXrpo4+12ATslLP/GI4FyPhtX Y31A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=r60TzY3K3seGLX5sfSk+nAYR4c4w4s+qJ4YRtl6MqYc=; b=bRbBnt/lTvyAqsAdzalxsQLQEgbStG7sM+FxULLHDDwfX1YsfYwjvzTn8UZ27O6IP4 qDTlNuPbEV1mLIKJ8mttijtrfc/j4oPnGqEYtkMbjnT9wsSulo4icEqxRyMn1zvWtXOA Eg2JOC12hShlFQjtKNWLQobYhye3LQEQ0c82kCwJLedsux23vIFY94ZFY7TYEL/PLP9Q 32+t72tE1nidiaoGbSvevQQYFhLWiXtaKnB2W7jtxfuMZFa8QVo8RRIV2Lj+Rzm0mqWr 8HZLN8l6G65zwmA78QflmMUj/EYJ9P/1tbhMwzFUjjp/2H178l9Pk5nnRi5r81G860Js p8CA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fsjmc7sk; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=r60TzY3K3seGLX5sfSk+nAYR4c4w4s+qJ4YRtl6MqYc=; b=YR0eYhiUAqyGb8mJ6sHxRRv6usHGi3JTDF7R4uSu35ro219h/o/6EGdf980L4amhsU A61T6FNzZqU91HULNBMQhWzerbhdI1HHgO4X9O5357ajc+YOodj37BiQYid3tPvs1fUh GV9lduqWd1AGqKnWPEP6vfPm39UVbeFW/I/2c= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=r60TzY3K3seGLX5sfSk+nAYR4c4w4s+qJ4YRtl6MqYc=; b=jbj/967oIudHVEyRLZ6MD6CbQBPq6byqhrtOE5kxdkPCorsYB2xDTC+GeTr6ilz0sC 1w5JwQtS2Ct4gd3TxgIVluhl/DcnImD8hp8lJ1unu8T9jCHZK3QQRq3XF2LLlZNwTvhP 3BGOyHWpCsAd/7/6NA329EirPuOUZg+Me2gHcjNqaYS1p7fcFFYbPtJfLO5+NYxNS1BM liB5dU89p8vnBktvQc4SvxYtIzHq0zFTNhYkuOtv/NvzYbZsLPAF8VYrwtHqB3WGXHOZ M8vrtEl8a0YbofGux5JhKd84bNm5z0k8CGw3Lr9SRYRAmQPRWntF6yQqNYOAdqUme8f+ 6Y5Q== X-Gm-Message-State: APjAAAXu7L3aqytn2hkDxmS/PTiehOgfItDNiUK+9XSeqPXWiGN2p37e IXY+5PETXh+UAmx46QwTB739V3Qy X-Google-Smtp-Source: APXvYqyMgnWbegOS1PyM57GpFmO9n0G6Nb6TGKRmD8gTDiTJu7TYFeWPufO1FXTnxhvEpezQZoIL4g== X-Received: by 2002:a63:2ace:: with SMTP id q197mr20440390pgq.102.1560264839594; Tue, 11 Jun 2019 07:53:59 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:1e8:: with SMTP id b95ls4893457plb.10.gmail; Tue, 11 Jun 2019 07:53:59 -0700 (PDT) X-Received: by 2002:a17:902:2889:: with SMTP id f9mr29259304plb.230.1560264839206; Tue, 11 Jun 2019 07:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264839; cv=none; d=google.com; s=arc-20160816; b=QHX7RMnNkw+f3qj4Dh2RpLG4lynfYddLt67VOixh8tG2flkheaICCfYUjkWptdrzsC wGgnl1RdNk2uayG/geVjmd9eW4lijJAMm3+oTYc/PTSF5o8iGWYzcVfyoVD0cZrv7yVI F2DNc5eKIl7A2kgf+Sf4IS31CFEpTnTfImDs7iiwuj7JB9mcLgNoVRSaM1HYBkZ0DISi przgbkXfl98H7de8I1MgWkCmgMlB76E2UpXmIelZa5c2uAjEWYBrW5bkui3atZ1NURmH P7KGLv8aEzV2fFM0VbTdpTz5p9dKqW1Py1ILwxVA1JUKeyORV+jV/CCvOr0TOFSBq2Rh DXkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=LHu3bpBFUtiuk/X2voRKbnQsiw8KrmHHfMc/0VzA5ZU=; b=YWCxJo6zqLdkoASzJ/K+VBY5A6UkB6NQ//A9z2GDg5UY868MLKyDXuV88Yp14V8A+2 DT15DumLq1w2CqIxc8ImVOok++89UZ8eoXpFihyhJjRMF57g6MAri1kp+PJN3dShpU8u HYixWGgI6BwEOMqH8bESqJUSeGCmkitwKv6EWaICmkUNC3JWXNBlJAzf3ioVJgJMmOov 0Wqs5olIXGeFsO+kqoLkESfM+48hLDjRajAVe9WILtdLdFW5BJV+vtvvDIOzVz3UAYk6 HWqIFEdiibhZe4nYqSrdjj2FZwzR0ChIO6rAbJo30BJEAoqnuZOzJ+43TOAm0Pg1xYHI jHiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fsjmc7sk; 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 c7sor15413788plr.52.2019.06.11.07.53.59 for (Google Transport Security); Tue, 11 Jun 2019 07:53:59 -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:a17:902:a405:: with SMTP id p5mr6314842plq.51.1560264838933; Tue, 11 Jun 2019 07:53:58 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:58 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 32/92] ram: rk3399: s/ca_tsel_wr_select_p/tsel_wr_select_ca_p Date: Tue, 11 Jun 2019 20:20:35 +0530 Message-Id: <20190611145135.21399-33-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fsjmc7sk; 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: , Rename ca_tsel_wr_select_p to tsel_wr_select_ca_p based on the bsp code and associated datasheet. No functionality change. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index bfae4e78a9..d868621c93 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -161,14 +161,14 @@ static void set_ds_odt(const struct chan_info *chan, u32 tsel_idle_en, tsel_wr_en, tsel_rd_en; u32 tsel_idle_select_p, tsel_wr_select_dq_p, tsel_rd_select_p; - u32 ca_tsel_wr_select_p, tsel_wr_select_ca_n; + u32 tsel_wr_select_ca_p, tsel_wr_select_ca_n; u32 tsel_idle_select_n, tsel_wr_select_dq_n, tsel_rd_select_n; u32 reg_value; if (sdram_params->base.dramtype == LPDDR4) { tsel_rd_select_p = PHY_DRV_ODT_HI_Z; tsel_wr_select_dq_p = PHY_DRV_ODT_40; - ca_tsel_wr_select_p = PHY_DRV_ODT_40; + tsel_wr_select_ca_p = PHY_DRV_ODT_40; tsel_idle_select_p = PHY_DRV_ODT_HI_Z; tsel_rd_select_n = PHY_DRV_ODT_240; @@ -178,7 +178,7 @@ static void set_ds_odt(const struct chan_info *chan, } else if (sdram_params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; - ca_tsel_wr_select_p = PHY_DRV_ODT_48; + tsel_wr_select_ca_p = PHY_DRV_ODT_48; tsel_idle_select_p = PHY_DRV_ODT_240; tsel_rd_select_n = PHY_DRV_ODT_HI_Z; @@ -188,7 +188,7 @@ static void set_ds_odt(const struct chan_info *chan, } else { tsel_rd_select_p = PHY_DRV_ODT_240; tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; - ca_tsel_wr_select_p = PHY_DRV_ODT_34_3; + tsel_wr_select_ca_p = PHY_DRV_ODT_34_3; tsel_idle_select_p = PHY_DRV_ODT_240; tsel_rd_select_n = PHY_DRV_ODT_240; @@ -229,7 +229,7 @@ static void set_ds_odt(const struct chan_info *chan, clrsetbits_le32(&denali_phy[391], 0xffffff, reg_value); /* phy_adr_tsel_select_ 8bits DENALI_PHY_544/672/800 offset_0 */ - reg_value = tsel_wr_select_ca_n | (ca_tsel_wr_select_p << 0x4); + reg_value = tsel_wr_select_ca_n | (tsel_wr_select_ca_p << 0x4); clrsetbits_le32(&denali_phy[544], 0xff, reg_value); clrsetbits_le32(&denali_phy[672], 0xff, reg_value); clrsetbits_le32(&denali_phy[800], 0xff, reg_value); From patchwork Tue Jun 11 14:50:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 484 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id EA6B13F08F for ; Tue, 11 Jun 2019 16:54:04 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id u21sf6644825pfn.15 for ; Tue, 11 Jun 2019 07:54:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264843; cv=pass; d=google.com; s=arc-20160816; b=KFqIFE4eDn9CoUx0gXlhxJoQHvh5uaDylYGZIERyDEBPtD9I43NHg3GIne5uZs+hf5 4yA3GD9sfwRY86dXARSyxgLszJCsK1i274kUTcc24333JhDAPCo/l8DYVKYRHOtiFieo 5ljE1fPlXDPaStyo1H7SHm6v8ELRQLcCZrx7ZwNu9Eg3n2l4BmJqsn4fH4Mcuo4CVYb/ bvol5z780Fb7uB+x3FDXDHRszQU+iOH84LblVm+aG0RLqId8gUsdP0MF145ZvaLC8iF+ RIbwTnixCHJiX5XS7KPe/yARy9IC/QKNA+Lzr5nfuEfpRmSBIHvx2Z3PMDG3ZYrOz4Oz 142g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=XbrtU5/O2D1epS3+GSIUQ6jNVr/C1pw03tF3VQAXYk8=; b=qMJ/2CivVK8VEv9VF1Un6qju81Nh68L585gY8UO9TRWp7UascWGnxc8t4vEPFuLdb9 gT62c9a3LiyXpZsj2IrhF2ABsDarDSoOoTlsw2l479awbSUDGhHBSRCnXLn5sxOTxz+1 Py5y2TlUBHHg+CpboELz6Up1qzqhR/XX1ynKavr73cseWdqZewglHynokYiCF0Gsqnfn RLBRyYO7FhyshGL6cftcSdJJ/ZxqTqf3+WJfc921hl1wavcn/ue3HWr6UHqmyI08QVgA TKXkyGEbP6MKgZZFdZcXSWPQJ6M/RmUigDQz7HNf2I008fsSSppy0drHUDjKev0EmKdU mfGw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Zg0f4FKj; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=XbrtU5/O2D1epS3+GSIUQ6jNVr/C1pw03tF3VQAXYk8=; b=KOKVyXzOqe+O6zOj9kKScpzrm+GEQx+0MU7IEpDqLQbdJPk5isZfbIylOW338I7oJ1 GnGlEojcJG/8EnPBPZMY+xjflihPdnVBU3MwWRAzHLhQqV2RPc4Nx8NhK5Nm4qdHa+CP dG9vSPEkMcNMJvfN+kkgePLmg7I+SFGGiXy8M= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=XbrtU5/O2D1epS3+GSIUQ6jNVr/C1pw03tF3VQAXYk8=; b=eTzYcQDtOwLi9XAxnC71Pp0jrhGO1M6atvNsjF9tRCv6YKB2wQhvHNyv4Jnskuurwj 7i+Xgf/ByXG20bKafDkQR67Shee3DMp/L0iUQ/L6kRz//0TqVmonyIy1VuAY+o7bS76c 9Cks/76/y068SB+J66pQmQTlglDvGNoinSr+c4nRklBcoksI2oSeQAROkeDigrQRENaG SLyD0meG+RjRLnvU1FHEsDNRhiXZDkrY7Ns2ANqg9qoELFQylhqk55zKLcO2xDsH87LZ nJ5oHYAJ1zGshALlSJ8J4BZN5u3rdFanq/5XZ6eadgchD7/ALvDaccZ3IbHarK4TRRlw 0Fgg== X-Gm-Message-State: APjAAAXBer70t5jLWHVRiMwObMWcx0M/ROs0HwiX436WYeIMD3HzlJ9s 4vKDfj6L3KiehZve1Q+GpZTv9/vi X-Google-Smtp-Source: APXvYqwTPiAQMsbqpi816xHWuQcHinI9T9FkwNRRR01GXeTOI4UeoaXIhKQ65Fmj7u7dxa2fzwkWEg== X-Received: by 2002:a17:902:a60d:: with SMTP id u13mr7676328plq.144.1560264843728; Tue, 11 Jun 2019 07:54:03 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:ae12:: with SMTP id t18ls860671pjq.4.canary-gmail; Tue, 11 Jun 2019 07:54:03 -0700 (PDT) X-Received: by 2002:a17:902:2983:: with SMTP id h3mr32576488plb.45.1560264843111; Tue, 11 Jun 2019 07:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264843; cv=none; d=google.com; s=arc-20160816; b=QZyGvGmrv+e7CXlRKu5LyuATZBq8IrB665F73UDVdBdh/gSaUM067E5LIq7BKy1ODb y/jd06zgYe1VbH6MK6scLh5HVbtzl/wb8r/wnOZSm43D6fVCp9dsBHkk86/i58m1bMj3 l3IA/SZkE2fH7ACLcOMTlnQt9a76E4J2VGg1ifoD9JlHlu1RJ9yW1BgAlmK0cocpVFlO aypUUzff3/tl7g7jXBYbRwmyvkT+UOcCQOGw4ubxbCU7PfR3cCuJLUIUAoWD6/4Ib6qy 0tijN+XfYlA6bdyDHRDDglWWoMmIKjAjtGDQdFS7MPwx4VLKwr1vAuf37NLNOL/jQcHn HfRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=+xc0HIO7NVzv6VpCdDAeq69DEeZPzBNW306ExnGeXqM=; b=Nr+s/pIJ0AHqw3+l/JX14c2V1MOKbUDXanYC85FLL3Wmkna+6yqNV9j37LRyGuaRAk tNNXVcRFGdHxDiuo1Wwa7239eypZwdIi92uqSEfkwy3nZTWRbrxX+NzJ54PMqcES+jzU erwybXcJETz4jjEUOT4pu61e577ar6rauZ9rDEtrJerukxH8rN28zfd8KMwE8j+ekQgR 1TVeMlPpIsqap8dWB0WBh6SD5dIH3EY9+XpooEr70kaZEYvySWFY50Xaug3eomLu2Ivd T6luvO0YxH57XAkytQvsqRMnL2+w4w0+ozozIR7VVde/bzfJfaoyfNtNlpi0nVElsNnf RQ8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Zg0f4FKj; 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 a16sor7724840pff.11.2019.06.11.07.54.03 for (Google Transport Security); Tue, 11 Jun 2019 07:54:03 -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:a62:5587:: with SMTP id j129mr80338177pfb.45.1560264842797; Tue, 11 Jun 2019 07:54:02 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:02 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 33/92] ram: rk3399: Order tsel variables Date: Tue, 11 Jun 2019 20:20:36 +0530 Message-Id: <20190611145135.21399-34-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Zg0f4FKj; 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: , Order tsel* variable declarations and assignment in proper and meaningful way. No functionality change. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 37 +++++++++++++++++------------ 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index d868621c93..e3945feca3 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -160,41 +160,48 @@ static void set_ds_odt(const struct chan_info *chan, u32 *denali_phy = chan->publ->denali_phy; u32 tsel_idle_en, tsel_wr_en, tsel_rd_en; - u32 tsel_idle_select_p, tsel_wr_select_dq_p, tsel_rd_select_p; - u32 tsel_wr_select_ca_p, tsel_wr_select_ca_n; - u32 tsel_idle_select_n, tsel_wr_select_dq_n, tsel_rd_select_n; + u32 tsel_idle_select_p, tsel_rd_select_p; + u32 tsel_idle_select_n, tsel_rd_select_n; + u32 tsel_wr_select_dq_p, tsel_wr_select_ca_p; + u32 tsel_wr_select_dq_n, tsel_wr_select_ca_n; u32 reg_value; if (sdram_params->base.dramtype == LPDDR4) { tsel_rd_select_p = PHY_DRV_ODT_HI_Z; - tsel_wr_select_dq_p = PHY_DRV_ODT_40; - tsel_wr_select_ca_p = PHY_DRV_ODT_40; + tsel_rd_select_n = PHY_DRV_ODT_240; + tsel_idle_select_p = PHY_DRV_ODT_HI_Z; + tsel_idle_select_n = PHY_DRV_ODT_240; - tsel_rd_select_n = PHY_DRV_ODT_240; + tsel_wr_select_dq_p = PHY_DRV_ODT_40; tsel_wr_select_dq_n = PHY_DRV_ODT_40; + + tsel_wr_select_ca_p = PHY_DRV_ODT_40; tsel_wr_select_ca_n = PHY_DRV_ODT_40; - tsel_idle_select_n = PHY_DRV_ODT_240; } else if (sdram_params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; - tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; - tsel_wr_select_ca_p = PHY_DRV_ODT_48; + tsel_rd_select_n = PHY_DRV_ODT_HI_Z; + tsel_idle_select_p = PHY_DRV_ODT_240; + tsel_idle_select_n = PHY_DRV_ODT_HI_Z; - tsel_rd_select_n = PHY_DRV_ODT_HI_Z; + tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; tsel_wr_select_dq_n = PHY_DRV_ODT_34_3; + + tsel_wr_select_ca_p = PHY_DRV_ODT_48; tsel_wr_select_ca_n = PHY_DRV_ODT_48; - tsel_idle_select_n = PHY_DRV_ODT_HI_Z; } else { tsel_rd_select_p = PHY_DRV_ODT_240; - tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; - tsel_wr_select_ca_p = PHY_DRV_ODT_34_3; + tsel_rd_select_n = PHY_DRV_ODT_240; + tsel_idle_select_p = PHY_DRV_ODT_240; + tsel_idle_select_n = PHY_DRV_ODT_240; - tsel_rd_select_n = PHY_DRV_ODT_240; + tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; tsel_wr_select_dq_n = PHY_DRV_ODT_34_3; + + tsel_wr_select_ca_p = PHY_DRV_ODT_34_3; tsel_wr_select_ca_n = PHY_DRV_ODT_34_3; - tsel_idle_select_n = PHY_DRV_ODT_240; } if (sdram_params->base.odt == 1) From patchwork Tue Jun 11 14:50:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 485 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3D67E3F08F for ; Tue, 11 Jun 2019 16:54:09 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id s22sf3900587plp.5 for ; Tue, 11 Jun 2019 07:54:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264848; cv=pass; d=google.com; s=arc-20160816; b=Kp1A/Is27O/3AJKd2lsYfbf6e1+Y6IX0YEmN/YMCE9CDDbtYH64j1TUPiYHjNLivXQ cV+pvNA4IuAgdXHU0dIZswaxjfG1CIL3qSEqmphnPcsxfGOsyKs5C4mZX9ZghPxvyQ2U QvGGEIyVj4Yy82vZJTO/6dEf2Ps8EACMNd3J24Ayu3mJCpzvojaCYlDekD2RkCSCxqwt gq6U9fNFZWK3XtpjsSobNBy0flzizXBjhpyh9+Jh9lYvfYzHvA0uF/T7N2CFK/Y/1RXG pWvzfJFGKqnDONMdiRXA4rMLF83Ethg8tZhjwWVjn3DEaowkOBEZlEvo40qz3F5P+0Vj zvFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Lqp6TIriUj+Bf1vYgbYsnNI6dGsZo02qVPnemNxb8pw=; b=vEvIf5DpL+yL/eRqWYOGJm7MzgtbUZ+14SLeyNtJiGp/o9G6ODyI5sZI1OOC9fr2bp ekjXqfmEbw9c5ElLV/o0+j+53VRMb423Jwltbo5rQVHBbRPl/F5h8Z1gdfD/T4csJSEc glfXkD4h40NnJK5vlGCbIM+0vpCHG50AhXiP3p5NTS4lS1GpwBIcea4RwD0dHHsdZj6a yZrDhJtm4iMg2KzgO+IyI2ehvIf4jODLg2gtL1apX6YoltEn/TiDJD4eQWshW0ambBIw w0i+5oWEyBCN8g0WXtQkrCtHccvUJlsAulRfd1T+2TSRaB+75TmsaSH5r4ttFurWrOhb ckjQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fWT8VJYS; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Lqp6TIriUj+Bf1vYgbYsnNI6dGsZo02qVPnemNxb8pw=; b=f06Dj3wVXubSeIb4XqV4m1Hg06crvZdOkxLd/YKM4wOmSYj05vU7C9UUmQD5Aoa6f7 SOlRUtFI+Z2nDG0r27A9LpXQLwugEw5z3Bw6XIi88cBfJe2CtCcXUwKJ3rnguHaFs+vG 757pn+adijp006vyMgT86yM5TjvMwABMUy4wo= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Lqp6TIriUj+Bf1vYgbYsnNI6dGsZo02qVPnemNxb8pw=; b=jwWuUS9RI5PHcpyEtBv5mO+2gxI6BzmJeVw9XpZbdIgnFvpwuPjJ6wMK7TI5HxcAYi IS2rw1DomQZotu1t0IyYZQyGfj8Ojq1zcB2UTbi5x7k+RdNWMMSIPePV9F/mqpsaKiQK gI+ajmqbwaFh/mzEpgDGFFae283mQvQx14jaFS3msEmObcuK4J5Om4kBYApPzNsz0R// OvH5czywF2m2mO8zT/yKfKD1FbMP8XkroyhMR1AjHu+cJCswr3s3dZplLvIGLjn2B2hZ sVYb15Wk7WRQRnwLyGih3vQhOrHGHcjma6MujysObLRLvBwIVJzBjQt+P3zuXwpcAkFw UwAQ== X-Gm-Message-State: APjAAAXjh1nYylpJWlwAOWXwX65BMCWZyM2scebo+x2Vj8CeQE+3YWye OQSo/OouDa3Yw3IuJL/0Mvi2TA39 X-Google-Smtp-Source: APXvYqx4Y5I9QPZGJjK5CdDJEFTbY0fpe7ND35CBH3+G1oQpAtxVvuFnO2mddP0XYCLBD2cTxpJ6nw== X-Received: by 2002:a17:902:7618:: with SMTP id k24mr13986300pll.208.1560264848047; Tue, 11 Jun 2019 07:54:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:b21:: with SMTP id 33ls4515417pgl.1.gmail; Tue, 11 Jun 2019 07:54:07 -0700 (PDT) X-Received: by 2002:a62:ee04:: with SMTP id e4mr77516161pfi.232.1560264847702; Tue, 11 Jun 2019 07:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264847; cv=none; d=google.com; s=arc-20160816; b=UYIAUnFbpQeUVbKogwTCQ+jXdNfcxH+D9gGgAqWtw9BmU6QjBFIdIEJrIoVtU1/hOo pFzrXD6EVDzgtOZE5+ByaSHr9d73C33tUJPx/X+Z8i9i6XOGvQNnDpGFE4FPaQYBZMWA pDdFVNnxvi9F8NapNuOV3lgwmMWDybB9fUuXWkuvc1zg6wb4H60ftL+50vRua8xm3ST2 eNeApQea3agWHKVmtQsh5Urp54csF/LmUdxIfBzmNxPP3SuHos/WHkoLS2mlq28A3SgN Upd66Q0+29fky+VwrHU6RcdG0TsuRH2aRlkGizA3wVbkBcNfm/Pkd2yDEF/rnhh04B/z Pn5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Ckb/dVtuw942Plu9XgJ6pHzs/1bm+A1p+7DNE1ADw90=; b=VTqttnmPt8AgnnVHQwghjEJTpvT68NXlFIMffBiQeqjNyvWS9wLwAG/JrWvecQH9/7 /DxiHDYFfD7CxAy3UavH0tUYPVvLKPevkP14Qk0CwxCvWsKaw+N488d1uBs/CC43FXDR UgPfn1w3bEiFvWAex27bmvMzxSpPzzm9td6n1hzIM5D77B/F57U4GzLv8Rw4jPSCW7da VHdzeuBb9V0Lg+9Jp/9X8zp3LKkgiR2taviTj9aCTB9Gfn7b3voCoQXHx7nzklMWpUpg Lv1TwqzCM1lsyZD5ZBCggmczj2AX13zRQgzNK35Q/cx8cbU7B6/whaZmNA+RDH0uzsq2 riGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fWT8VJYS; 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 j9sor11780659pgh.76.2019.06.11.07.54.07 for (Google Transport Security); Tue, 11 Jun 2019 07:54:07 -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:a63:2b8a:: with SMTP id r132mr20451397pgr.196.1560264847320; Tue, 11 Jun 2019 07:54:07 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:06 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 34/92] ram: rk3399: Add phy pctrl reset support Date: Tue, 11 Jun 2019 20:20:37 +0530 Message-Id: <20190611145135.21399-35-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fWT8VJYS; 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: , Add support for phy pctrl reset support for both channel 0, 1. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index e3945feca3..bbf56f29ae 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -35,6 +35,10 @@ #define PHY_DRV_ODT_40 0xe #define PHY_DRV_ODT_34_3 0xf +#define CRU_SFTRST_DDR_CTRL(ch, n) ((0x1 << (8 + 16 + (ch) * 4)) | \ + ((n) << (8 + (ch) * 4))) +#define CRU_SFTRST_DDR_PHY(ch, n) ((0x1 << (9 + 16 + (ch) * 4)) | \ + ((n) << (9 + (ch) * 4))) struct chan_info { struct rk3399_ddr_pctl_regs *pctl; struct rk3399_ddr_pi_regs *pi; @@ -79,6 +83,29 @@ static void copy_to_reg(u32 *dest, const u32 *src, u32 n) } } +static void rkclk_ddr_reset(struct rk3399_cru *cru, u32 channel, u32 ctl, + u32 phy) +{ + channel &= 0x1; + ctl &= 0x1; + phy &= 0x1; + writel(CRU_SFTRST_DDR_CTRL(channel, ctl) | + CRU_SFTRST_DDR_PHY(channel, phy), + &cru->softrst_con[4]); +} + +static void phy_pctrl_reset(struct rk3399_cru *cru, u32 channel) +{ + rkclk_ddr_reset(cru, channel, 1, 1); + udelay(10); + + rkclk_ddr_reset(cru, channel, 1, 0); + udelay(10); + + rkclk_ddr_reset(cru, channel, 0, 0); + udelay(10); +} + static void phy_dll_bypass_set(struct rk3399_ddr_publ_regs *ddr_publ_regs, u32 freq) { @@ -1126,6 +1153,7 @@ static int sdram_init(struct dram_info *dram, { unsigned char dramtype = sdram_params->base.dramtype; unsigned int ddr_freq = sdram_params->base.ddr_freq; + struct rk3399_cru *cru = dram->cru; int channel; int ret; @@ -1142,6 +1170,7 @@ static int sdram_init(struct dram_info *dram, const struct chan_info *chan = &dram->chan[channel]; struct rk3399_ddr_publ_regs *publ = chan->publ; + phy_pctrl_reset(cru, channel); phy_dll_bypass_set(publ, ddr_freq); if (channel >= sdram_params->base.num_channels) From patchwork Tue Jun 11 14:50:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 486 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3C5E83F08F for ; Tue, 11 Jun 2019 16:54:13 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id k36sf4779783pgl.7 for ; Tue, 11 Jun 2019 07:54:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264852; cv=pass; d=google.com; s=arc-20160816; b=zapn5fKeUA7mcbGV7as9nvugILCIHnEVSB+aIVf5cVnkWcmQojG4zeHXK3q3ixxYZV 8sfdH3V6yxoSUKYwYfsl/it9x+TLQWAcXiZuCj4WLzofhtInlWE7ajxEDnxNScHvvuso N+q4S86yHgx83BxXcCw/ZJ8jCK0IjRicCkSpfWZHap8TsGBL+PU10SUlSCzsr8szH13q wUh2YYB9eE3SGVWHQvwuqr8t4Zt0OPsnbvhp5hthhezZ0zPuX4Cf8YnxevsClrXSwRGk vwuMYoeLcHJfeDyht5iG1Z3a/ebKFwGktAuI0jRPbK20/NoOHe2mCVHNJaO+VleOUX4U Vpfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=1gzqH0P7BCJp07nN6hUDnyS0nxqKJZ7uAlaxPQQ1sZQ=; b=t7DPfeBGvmQp2Q80pYMQwZVOkct09oY3K6dlBX+jHtnbBHtmcVc8A3YLKipVQBcqG4 4LQC5O0Q4WwrROXS8Ghso+Hv4XgGa/cpsarz+JIwt5fAydhZv82AE4SA+zP9ZaYoEa+p PY8t68KMV1O+BqtKBIr+azf7EVjU7/e91M/DCpuQIQnDnVzsMQqmCzYc3YLuSKasvX7t 13fzw5A+97kkKs5U2jhs7o9HM8bhV13faCwHRmBGsKJ5Sgc0Qt5Y6a1VdTkQ563d7/cf /Xoq4Ia1NgDsnmYT+0J9CEz0mWSx0aEng86vzItbUvYUa6uMySdntgGkc5YIbjr2UsC+ hZew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gvx4Nazy; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=1gzqH0P7BCJp07nN6hUDnyS0nxqKJZ7uAlaxPQQ1sZQ=; b=qwEl0KdqTddRBmr5YGWTjq1m8ejgReXv2bhz5WIlvkZlZQ6ciOTsZxFkxNgqIrEU0O DEuaGICY7keX4aj2sQtj6LsYH22EW5ckehb1Bc4BWkCUlM6SX6BUlhKHTdvXxXqS48Ka 030kM+JDkbLrkw0a9iGTSfoMODxjaa6yTG5eE= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=1gzqH0P7BCJp07nN6hUDnyS0nxqKJZ7uAlaxPQQ1sZQ=; b=HS8iPV6lGrf2f8ckpZhm7L7pwn5gM8ANvbfsmx2VDzp4I4EqWaSPS1pCHVUcPRJInM /PDUMEaNuMRh44zXGGYU6btlKm1Yi9fo7qpcWlxxgPBTOnTP75byGkZKpFBWHeHnMyr/ n46cYV5HBhFxGCIbRa6craEBWezX6IZfwfMEtbuhon+8hrekppJqrwXwK9jyqIvDn2NW 7V9NlQwrboMiNi8LIQ9KhEGnoZzqZ3Cj2GBzsZREZVRW6jKN9KrS1vCiknleAkS5TlE5 ba7uBs4Za9Pui40ieT4bLoR6wk6fEltcoufPn7xdzEmdiWbpaidlqLwA9e+YLr4wcz/X qRPQ== X-Gm-Message-State: APjAAAVuUMwE1uBYr2xlqDazduQDBj/EbvC68uNdqwPgIja43lGkZEGE eUpCqfHid6Bq53N6lqUc2Vbh3M+d X-Google-Smtp-Source: APXvYqxr96lfJ+doGWIuLKeXzLMgGW8Aet7wyTdRSQerWxuTo4mrAGALdhgwFvgOnct6fwlT0juKfA== X-Received: by 2002:a63:610d:: with SMTP id v13mr20346631pgb.341.1560264851876; Tue, 11 Jun 2019 07:54:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:2b89:: with SMTP id l9ls4897055plb.9.gmail; Tue, 11 Jun 2019 07:54:11 -0700 (PDT) X-Received: by 2002:a17:90a:25e6:: with SMTP id k93mr6329855pje.100.1560264851512; Tue, 11 Jun 2019 07:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264851; cv=none; d=google.com; s=arc-20160816; b=VoMGgWlcSAx5Rir899EFX8vxGG4M6rAqt2llYeFWpEpklRLvcrN47RrFXekjrIeNDC YizygXHvqINSj/vNhozNdI8MRRQqB+Xol6iQhyj1P8FNgf+ny2vIDRm8yPayMUQws+uj ZfaYZ8BFe7xbW0F0De2B3ec1NashRnl7SBC/ABdLXQIvO5ZXKs33Au3e6A63b24WRlji zYLemqx9gpH7zS55ftjc9VdwPQqOLY46hYHaYngP2ONN9kMtJCUgaI56dnDxi4h6xuJ1 nEHHlIyzUVuHJY6XMPCrZIkle+LlqmNWRfyhuYO58yUboqG+Z3YBtr6+j2ZJrDDXvIzK c3uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=LqdRoMBofZUwal7ZnZtD8e6Bzf9aoQ3r4aEYfycEPCo=; b=Jd7SLOsJl3TWzSyWDcINP3rXqhymqwtOLTAI+EilkEX7RzJDL6drr6lIAWbg+E4wjQ TCfIz8A7K/vkeKkccnGqyzKLnyVGuJFX3392msHzlkDoTsSqI15kzFMPUnx0VI55sLOl /Dcmwuux5rBjmc8VmWjFarhqcqWOfm2oOg9E1TVcjTNDDYbuJzuKd6YeB5t9g04RvB1Y 62f/LceuOTvjmsov+l5ofFqOIC3i2ZQJbaILV/EAdmqOzdAKlj4HHE/DrvbgwDh9kjHc m5QjdXRCLRkrOHn1yU6ufNXeqfUSyb53kZKRRVaAK13sCRjvmnJ3qea9UAylf5Z8WlY9 g+Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gvx4Nazy; 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 d5sor7483519plr.38.2019.06.11.07.54.11 for (Google Transport Security); Tue, 11 Jun 2019 07:54:11 -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:a17:902:bb90:: with SMTP id m16mr9745579pls.54.1560264851186; Tue, 11 Jun 2019 07:54:11 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:10 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 35/92] ram: rk3399: Move pwrup_srefresh_exit to dram_info Date: Tue, 11 Jun 2019 20:20:38 +0530 Message-Id: <20190611145135.21399-36-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gvx4Nazy; 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: , Add pwrup_srefresh_exit to be part of dram_info so-that the it can help to support pwrup_srefresh_exit in individual channels while starting pctl in future. No functionality change. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index bbf56f29ae..7ca76d304f 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -49,6 +49,7 @@ struct chan_info { struct dram_info { #if defined(CONFIG_TPL_BUILD) || \ (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) + u32 pwrup_srefresh_exit; struct chan_info chan[2]; struct clk ddr_clk; struct rk3399_cru *cru; @@ -487,8 +488,8 @@ static int phy_io_config(const struct chan_info *chan, return 0; } -static int pctl_cfg(const struct chan_info *chan, u32 channel, - const struct rk3399_sdram_params *sdram_params) +static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, + u32 channel, const struct rk3399_sdram_params *sdram_params) { u32 *denali_ctl = chan->pctl->denali_ctl; u32 *denali_pi = chan->pi->denali_pi; @@ -496,7 +497,6 @@ static int pctl_cfg(const struct chan_info *chan, u32 channel, const u32 *params_ctl = sdram_params->pctl_regs.denali_ctl; const u32 *params_phy = sdram_params->phy_regs.denali_phy; u32 tmp, tmp1, tmp2; - u32 pwrup_srefresh_exit; int ret; const ulong timeout_ms = 200; @@ -516,7 +516,8 @@ static int pctl_cfg(const struct chan_info *chan, u32 channel, writel(sdram_params->phy_regs.denali_phy[911], &denali_phy[911]); writel(sdram_params->phy_regs.denali_phy[912], &denali_phy[912]); - pwrup_srefresh_exit = readl(&denali_ctl[68]) & PWRUP_SREFRESH_EXIT; + dram->pwrup_srefresh_exit = readl(&denali_ctl[68]) & + PWRUP_SREFRESH_EXIT; clrbits_le32(&denali_ctl[68], PWRUP_SREFRESH_EXIT); /* PHY_DLL_RST_EN */ @@ -592,7 +593,7 @@ static int pctl_cfg(const struct chan_info *chan, u32 channel, debug("DRAM (%s): phy locked after %ld ms\n", __func__, get_timer(tmp)); clrsetbits_le32(&denali_ctl[68], PWRUP_SREFRESH_EXIT, - pwrup_srefresh_exit); + dram->pwrup_srefresh_exit); return 0; } @@ -1176,7 +1177,7 @@ static int sdram_init(struct dram_info *dram, if (channel >= sdram_params->base.num_channels) continue; - ret = pctl_cfg(chan, channel, sdram_params); + ret = pctl_cfg(dram, chan, channel, sdram_params); if (ret < 0) { printf("%s: pctl config failed\n", __func__); return ret; From patchwork Tue Jun 11 14:50:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 487 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 511E63F08F for ; Tue, 11 Jun 2019 16:54:17 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id bb9sf7909039plb.2 for ; Tue, 11 Jun 2019 07:54:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264856; cv=pass; d=google.com; s=arc-20160816; b=GPGXflD/GrekxP+9iR18VI/dvKrHN+KT6hRr7p5WZnkEJQ2T60RAUhm/Jc6b7nXgzi VBnGJU6GbrhgPymRuyeLWXsuk1i/RUa+7BIow1rlr+g9CJYQBqGGCKBC006q9hYLSh2V mwBXJi5l3f9OxH4c6Z4uDK4XRmPkRPA8J3pRWFmTVYX8w9C7AHaKmEM0MouCvyfv4Whd fucSt0H2ekkEpRfphN9MRYABe3XoDA4HYMYsWn3/2J8TsfeIHiSTI9AIRJud8p6d186L CLvKXpvxe8O6wNp3kJmz4+lVeG+ecVVE+95C2NItl9G45gF+ovqeuYcowrH2/pyCZSCZ y+KQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ZJv5noS92QhPrIJQ75L8xVTB8j1SUBvmTLkzv8gM4vU=; b=xxKePZ/9snyWlVrzuTKkLL3aEVTzD802cWbHEuXx/gpvVJE3pAzJ2K5w+3DpN/PQKc ixs2PS4OyWXY+ul0oxA8Ggfxsr1qVB38MiCIcRl7XIaUD1U1qOYJGqhHDJ+xleKjZ5Rq 7fKLqLSft6T/t30LGIYsRfVNOMtWEtXeZAc5SLuNmYRiacx0WtZ7694avP7ZY2bSblhq OCj1KEHpIVcc7GFm9LdogTfW1D0eApK+P8PSl920jVtfi3d+Rk/AbTfiEhVtmVZ0w6RU IC6QoXcOFdnZzeEslw2eIKSfW7QviVwJrdNKl5WaGI09e/vkx252T9RjJRyPCATnhc9c WKeg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YCrqcARj; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ZJv5noS92QhPrIJQ75L8xVTB8j1SUBvmTLkzv8gM4vU=; b=ZfvyBeT+SlwOlDjPm8W6d2czz55hIHTLVJ4eMAnmc7BrXfm6mrfYtG51xM1pyqUXuV yxiVeXUX9nY49TmBr4aJAEpM1frG6mL6/kd00vLE0uVcGagBkHqlH4MVknOiDIzPUeGb N7jKW1hpDVwV9agnJeHuCXIkypTMIsIN6CRmU= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=ZJv5noS92QhPrIJQ75L8xVTB8j1SUBvmTLkzv8gM4vU=; b=I5sHJId1J/0I064q3lrBCeMxTsSm7h9dboUfb24mr2lYuJOuj0VMUgdawtIn9sW4Mm ghwiCakt5JYFREO/3xnz/5Beq4lMIXPhU+LlI7lM3uggxL+POdDlTgUlG3KUGlhhOmDE wGZZMPooVeOOoVRE95NEToU3KcpfyVuBNj1jauKcjUMOKa26jpkeVdW3VemjR6j+8Dgv SEogbRq+NDDAocCa2df41UTFiGZ5/e0YIW0RjIG7FhFWo1wxhccO7WoMYiivXzjOdrCm ef46DBEAdFF4tzzzlsBKlfF+L5s/TAZuJkyJzlifTIgLIHq0C/HsuqhsYBQ2QPEV3zTT oUDw== X-Gm-Message-State: APjAAAXFnAAD8ChOX93vw3YkiiFFzynO9tDLrT+9+OmyN+J5VV+ybY0I Bx4XNgUt/GJAMBZUOcDzLcvvH2zT X-Google-Smtp-Source: APXvYqyt0FaPURHaTv/Mj33/lJ9Wo7nRlM6Y8e7Nvt/kDaB2G/Qlu+B1sHC0d6nB1/p1JCD5F7vcag== X-Received: by 2002:aa7:8193:: with SMTP id g19mr74684810pfi.162.1560264856038; Tue, 11 Jun 2019 07:54:16 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5f87:: with SMTP id t129ls1383066pfb.8.gmail; Tue, 11 Jun 2019 07:54:15 -0700 (PDT) X-Received: by 2002:a65:6649:: with SMTP id z9mr2219851pgv.413.1560264855643; Tue, 11 Jun 2019 07:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264855; cv=none; d=google.com; s=arc-20160816; b=vK/N43i5tfTwOK0a20Z/C3gsEsauxFtmILBO0tULCav/SMvAjrnhBD30g2tqg78r8P w1DWvl9DQHPBxy9L05xfTS5j/4UrJCx6c7Ld1/utwQySixMfNMFT9cLra/JQe+2X53+0 bh05OT9yYhwR11KHpJ9jsnI3TmFEPHD862ZxVFD8cTengRqtcxQ80GJoFgzSHJHj6JiR amK2vzGWBW0Rnh2V8uw4YvX/9GTyqvkk347JgoAT8C2fSn/P4bTHbf2hCljCT1seCVdc 6J+FqlCBvLed6qOUVXNr2DFQ/H9hPu3zjyRp2OK8ogph5RtZa3GUXKf4YLFPp+pKrPu0 rMVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0WlhWQw1hMkFv4Ygg+KWS/7JWVu6zGHB1vz3zmQ+5w0=; b=SA25Yq2BvsHwmkbW7ubAlCBxaXhw4bgLNVWGV8ihppn7k8hlEbIwkQGoy5ZHImsggn Qlb34rLLFfq3P+pP55bAGF1CZqYZmiN7XxscqM7JggLwANJkoFYeyZyX8jlw9apl/MrP /Zs0y+GvYxI7pmH5HAqTl87PexEPEoiMXJPU3JLE0DeOEUKcOuQsezMLIGeSRMlM3GKR 8e84MZyU8cHWXPnkAQwBWxijDVebLVTBCj/IoH9kOZdeZQHS24C/i6vi3bKMU43H5X7A m+PnMcJTLkAawCeSviosjiUI8vafV5j2o8C/KeHbyLcxCjnT+He+ZzfpHyUnqQ9yYI/l qqZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YCrqcARj; 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 k10sor3832983pgn.61.2019.06.11.07.54.15 for (Google Transport Security); Tue, 11 Jun 2019 07:54:15 -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:a63:d415:: with SMTP id a21mr2990689pgh.229.1560264855271; Tue, 11 Jun 2019 07:54:15 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:14 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 36/92] ram: rk3399: Add pctl start support Date: Tue, 11 Jun 2019 20:20:39 +0530 Message-Id: <20190611145135.21399-37-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YCrqcARj; 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: , Add support for pctl start for both channel 0, 1 control and phy registers. This would also handle pwrup_srefresh_exit init based on the channel number. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 79 +++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 20 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 7ca76d304f..220197a42e 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -49,10 +49,11 @@ struct chan_info { struct dram_info { #if defined(CONFIG_TPL_BUILD) || \ (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) - u32 pwrup_srefresh_exit; + u32 pwrup_srefresh_exit[2]; struct chan_info chan[2]; struct clk ddr_clk; struct rk3399_cru *cru; + struct rk3399_grf_regs *grf; struct rk3399_pmucru *pmucru; struct rk3399_pmusgrf_regs *pmusgrf; struct rk3399_ddr_cic_regs *cic; @@ -73,6 +74,11 @@ struct rockchip_dmc_plat { struct regmap *map; }; +static void *get_ddrc0_con(struct dram_info *dram, u8 channel) +{ + return (channel == 0) ? &dram->grf->ddrc0_con0 : &dram->grf->ddrc0_con1; +} + static void copy_to_reg(u32 *dest, const u32 *src, u32 n) { int i; @@ -328,6 +334,52 @@ static void set_ds_odt(const struct chan_info *chan, clrsetbits_le32(&denali_phy[930], 0x1 << 17, reg_value); } +static void pctl_start(struct dram_info *dram, + const struct rk3399_sdram_params *sdram_params, + u8 channel) +{ + const struct chan_info *chan = &dram->chan[channel]; + u32 *ddrc0_con = get_ddrc0_con(dram, channel); + u32 *denali_ctl, *denali_phy; + u32 count = 0; + u32 byte, tmp; + + denali_ctl = chan->pctl->denali_ctl; + denali_phy = chan->publ->denali_phy; + + writel(0x01000000, &ddrc0_con); + + clrsetbits_le32(&denali_phy[957], 0x3 << 24, 0x2 << 24); + + while (!(readl(&denali_ctl[203]) & (1 << 3))) { + if (count > 1000) { + printf("%s: Failed to init pctl for channel %d\n", + __func__, channel); + while (1) + ; + } + + udelay(1); + count++; + } + + writel(0x01000100, &ddrc0_con); + + for (byte = 0; byte < 4; byte++) { + tmp = 0x820; + writel((tmp << 16) | tmp, &denali_phy[53 + (128 * byte)]); + writel((tmp << 16) | tmp, &denali_phy[54 + (128 * byte)]); + writel((tmp << 16) | tmp, &denali_phy[55 + (128 * byte)]); + writel((tmp << 16) | tmp, &denali_phy[56 + (128 * byte)]); + writel((tmp << 16) | tmp, &denali_phy[57 + (128 * byte)]); + + clrsetbits_le32(&denali_phy[58 + (128 * byte)], 0xffff, tmp); + } + + clrsetbits_le32(&denali_ctl[68], PWRUP_SREFRESH_EXIT, + dram->pwrup_srefresh_exit[channel]); +} + static int phy_io_config(const struct chan_info *chan, const struct rk3399_sdram_params *sdram_params) { @@ -498,7 +550,6 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, const u32 *params_phy = sdram_params->phy_regs.denali_phy; u32 tmp, tmp1, tmp2; int ret; - const ulong timeout_ms = 200; /* * work around controller bug: @@ -516,8 +567,8 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, writel(sdram_params->phy_regs.denali_phy[911], &denali_phy[911]); writel(sdram_params->phy_regs.denali_phy[912], &denali_phy[912]); - dram->pwrup_srefresh_exit = readl(&denali_ctl[68]) & - PWRUP_SREFRESH_EXIT; + dram->pwrup_srefresh_exit[channel] = readl(&denali_ctl[68]) & + PWRUP_SREFRESH_EXIT; clrbits_le32(&denali_ctl[68], PWRUP_SREFRESH_EXIT); /* PHY_DLL_RST_EN */ @@ -578,22 +629,6 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, if (ret) return ret; - /* PHY_DLL_RST_EN */ - clrsetbits_le32(&denali_phy[957], 0x3 << 24, 0x2 << 24); - - /* Waiting for PHY and DRAM init complete */ - tmp = get_timer(0); - do { - if (get_timer(tmp) > timeout_ms) { - pr_err("DRAM (%s): phy failed to lock within %ld ms\n", - __func__, timeout_ms); - return -ETIME; - } - } while (!(readl(&denali_ctl[203]) & (1 << 3))); - debug("DRAM (%s): phy locked after %ld ms\n", __func__, get_timer(tmp)); - - clrsetbits_le32(&denali_ctl[68], PWRUP_SREFRESH_EXIT, - dram->pwrup_srefresh_exit); return 0; } @@ -1183,6 +1218,9 @@ static int sdram_init(struct dram_info *dram, return ret; } + /* start to trigger initialization */ + pctl_start(dram, sdram_params, channel); + /* LPDDR2/LPDDR3 need to wait DAI complete, max 10us */ if (dramtype == LPDDR3) udelay(10); @@ -1260,6 +1298,7 @@ static int rk3399_dmc_init(struct udevice *dev) #endif priv->cic = syscon_get_first_range(ROCKCHIP_SYSCON_CIC); + priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF); priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); priv->pmusgrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUSGRF); priv->pmucru = rockchip_get_pmucru(); From patchwork Tue Jun 11 14:50:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 488 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 60E2D3F08F for ; Tue, 11 Jun 2019 16:54:21 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id l4sf9778450pff.5 for ; Tue, 11 Jun 2019 07:54:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264860; cv=pass; d=google.com; s=arc-20160816; b=TPoMRFVYw6wtDEfPxtkZJgDwKqUXEoycuunffXqrjuHFRu2BPlkz02VEOW0xH4Q16c dPi8hovSfo2tq+/SwSe/ZHxtnKdn8Hp1iSJPYepWiKdHczjOkk95sXRyGjXdLfUufGfQ cKTCSJo/jjTL4w3B4CiA7d8k7ZemTVJMcLLS6UYy2pxG372pu3qSn2pf1ow7tg0MO+1Q ng9XPNKrUh6RfTHpGXvnSb3xpNCJvGcUGIS9FRb36S9QuTXK+Mgc4/GHh7dOj50h9fWU RW4hss9A64eHBtezloJfSDi/4BLY/Tk6SqRUndtqgfKbrGjJjebsqNUMptmLraJVT6cc K12g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=bQta51Ro7m7AqTLJNBkTKLv7Z1eTMyFZ5VXJV8i5gYo=; b=AunuDNUX/GVij/kSUqiSZPKHSsi8VTel3kEiJ2M5448axfbRpUOWYBrNixZqscvM4E l/P+aFNHGc7zlKGM2MEc4dcItEFes+/y5vsPkBBfcmB7uATjIV3y8A7g4JBm0z6UMdXJ E8/j2Iimx7wm8N8ZbaoPV7IQO23nqdVTedA2BeC8wyE0ICpQ3ti72sVKG9lWiEGhmS0c 8Lm6Nb8G7KNna5avWu6yhbvz+5gYcpqoT9W0NA0RqXuKFubjAPDm4Opf9jCbTsJmK6EP XBZ0DAZEopabraSZW+wZoAjM/RR0ZVUN6zEMefc6DP+5V3FdhBNiAYIiOal0E28CUZQT 2Upg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AQhq3ai+; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=bQta51Ro7m7AqTLJNBkTKLv7Z1eTMyFZ5VXJV8i5gYo=; b=bRSVBOSb5EBpg+8cbTrs95UCJ7OnvaTuyksxalQjI/B9Tj8YAVpM9LkX2ofnC65unz kW/yFs6fnJesMEUfJi40E+EbR25SUoVYXjohlHhjpDgBqCe+crBisaS9NqTeLYOIisGa R76M0ZrOfDwPizuO0MK8csy3DyE0ALwzSH2pM= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=bQta51Ro7m7AqTLJNBkTKLv7Z1eTMyFZ5VXJV8i5gYo=; b=ZMMkrUCjI7STqBzXigVgNxVsfkH/3pp1EmaqrVQ/bujOAhQ2IWjsjfQYlkrP/O+zuT R49nONUiPgypZUTRB1fM/2koqQyoPX6yLfpB63qbwKDbj3WXwJFFYnTKmcheLA75tCQZ tLoqqyVg/2SYV+T9pFX6qjS5mAjEXntMfFQY9nz2sMF1mKpeGRPOBMDdDgr9nJr/dfRf fvvjuNvJ/ds3nceuOccXAFrH4B94p+hfv0lGz2ZIX100U2KkGwdzHjeOf3AoQ8e+bOEU X8Q3XV3D080ImqYRL6XWxB/OJM5MUEbctMgz8ns2K3qRtOa+34KEcIHZ1+UcF+3BV++S 9wYg== X-Gm-Message-State: APjAAAW3ya+yyUKEvW61kOmxO6xM5GtZLVN0H1yBFOnMs+dk6Jgg1GNf iUCHEyyfS7Hfe8VXDfhAQpmHWPQ3 X-Google-Smtp-Source: APXvYqzprWwxuIiNVqlJEXckmwx4zGKbBJOWnI1OWWJfww1zW6BOvzYp0O19wkRuxnHF7wVE8ZBl/g== X-Received: by 2002:a17:90a:5d15:: with SMTP id s21mr27083581pji.125.1560264860100; Tue, 11 Jun 2019 07:54:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:42cd:: with SMTP id l13ls115581pgp.0.gmail; Tue, 11 Jun 2019 07:54:19 -0700 (PDT) X-Received: by 2002:a63:5443:: with SMTP id e3mr20415899pgm.265.1560264859646; Tue, 11 Jun 2019 07:54:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264859; cv=none; d=google.com; s=arc-20160816; b=RugO0Uu0g/wLb8GWKNStx1R5j6s6Gg7Yv/8/lH3tOrlx9InGBT9390JhRJAzJC0CHs 3hHEQY6cR9ldUx8fo3Qkn11hbAGgtmgMRR4Q0BkZTafYDvYHmIbMIMKhtwjrrKSeGi7w obxQwYu12pgx9e0XbkAsxYPnxEY3CZdcTTTWRdgH699jw6uRdHEfWa6gmQj6fJCIaNcl xMUUbfMIEMCrhDjXpWHaBv8EySa2Xjse0ZgNPjBOfx373S7pI6YeBEHdmDVpUwcH+41b ixU1xGEfNS+h2GWC8z2x6N+35sKqjr45x0nr0MXKC8ZXbNsmyH+PFsk8yzuIn4Zm2eqh Z3Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=5Yf1E/nMMJ1uTpuqkdMMi/r9H01gEX8XKmpuGy2lGns=; b=j+lvWVoNuqKjr2mt5rUEQ2BUBi6yXndtcrjQzOmZdgMawmB5d3yb4+Vqvm9boNvLPE DdBUVjkvylDY3qZrAcOwJekq4tiOgWZGZXhM4soShJPM4odadtvKRP6DCyBjbB23WybI mxrVcK7lDdPQnCHprn27h/uxikA1zj6RwQw4HOKucZCpoCtJFai+EOQx0mt7T9DKaXUY TIgzzpjMaHvVyMM9HzdgTuHmyzvJrHwjX+jPLkRYHA4Uzg2EtYjFItKalRXtI1ZT3wCe blAUn/r29wncGBfnxEl+BjaRVYCere3Jfuxy87szCTg7vJCXPcWDwksiohkDo+bPgLuW bk3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AQhq3ai+; 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 h3sor15495898pld.22.2019.06.11.07.54.19 for (Google Transport Security); Tue, 11 Jun 2019 07:54:19 -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:a17:902:988a:: with SMTP id s10mr76931523plp.304.1560264859282; Tue, 11 Jun 2019 07:54:19 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:18 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 37/92] ram: rockchip: rk3399: Add cap_info structure Date: Tue, 11 Jun 2019 20:20:40 +0530 Message-Id: <20190611145135.21399-38-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AQhq3ai+; 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: , Group common ddr attributes like - rank - col - bk - bw - dbw - row_3_4 - cs0_row - cs1_row - ddrconfig into a common cap_info structure for more code readability and extend if possible based on the new features. No functionality change. Signed-off-by: Jagan Teki --- .../include/asm/arch-rockchip/sdram_rk3399.h | 6 +- drivers/ram/rockchip/sdram_rk3399.c | 71 ++++++++++--------- 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h index a191d242f8..67044f53e5 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h @@ -96,7 +96,7 @@ struct rk3399_ddr_cic_regs { /* DENALI_CTL_274 */ #define MEM_RST_VALID 1 -struct rk3399_sdram_channel { +struct sdram_cap_info { unsigned int rank; /* dram column number, 0 means this channel is invalid */ unsigned int col; @@ -114,6 +114,10 @@ struct rk3399_sdram_channel { unsigned int cs0_row; unsigned int cs1_row; unsigned int ddrconfig; +}; + +struct rk3399_sdram_channel { + struct sdram_cap_info cap_info; struct rk3399_msch_timings noc_timings; }; diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 220197a42e..1acf9efe9c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -156,35 +156,36 @@ static void set_memory_map(const struct chan_info *chan, u32 channel, u32 row; /* Get row number from ddrconfig setting */ - if (sdram_ch->ddrconfig < 2 || sdram_ch->ddrconfig == 4) + if (sdram_ch->cap_info.ddrconfig < 2 || + sdram_ch->cap_info.ddrconfig == 4) row = 16; - else if (sdram_ch->ddrconfig == 3) + else if (sdram_ch->cap_info.ddrconfig == 3) row = 14; else row = 15; - cs_map = (sdram_ch->rank > 1) ? 3 : 1; - reduc = (sdram_ch->bw == 2) ? 0 : 1; + cs_map = (sdram_ch->cap_info.rank > 1) ? 3 : 1; + reduc = (sdram_ch->cap_info.bw == 2) ? 0 : 1; /* Set the dram configuration to ctrl */ - clrsetbits_le32(&denali_ctl[191], 0xF, (12 - sdram_ch->col)); + clrsetbits_le32(&denali_ctl[191], 0xF, (12 - sdram_ch->cap_info.col)); clrsetbits_le32(&denali_ctl[190], (0x3 << 16) | (0x7 << 24), - ((3 - sdram_ch->bk) << 16) | + ((3 - sdram_ch->cap_info.bk) << 16) | ((16 - row) << 24)); clrsetbits_le32(&denali_ctl[196], 0x3 | (1 << 16), cs_map | (reduc << 16)); /* PI_199 PI_COL_DIFF:RW:0:4 */ - clrsetbits_le32(&denali_pi[199], 0xF, (12 - sdram_ch->col)); + clrsetbits_le32(&denali_pi[199], 0xF, (12 - sdram_ch->cap_info.col)); /* PI_155 PI_ROW_DIFF:RW:24:3 PI_BANK_DIFF:RW:16:2 */ clrsetbits_le32(&denali_pi[155], (0x3 << 16) | (0x7 << 24), - ((3 - sdram_ch->bk) << 16) | + ((3 - sdram_ch->cap_info.bk) << 16) | ((16 - row) << 24)); /* PI_41 PI_CS_MAP:RW:24:4 */ clrsetbits_le32(&denali_pi[41], 0xf << 24, cs_map << 24); - if (sdram_ch->rank == 1 && sdram_params->base.dramtype == DDR3) + if (sdram_ch->cap_info.rank == 1 && sdram_params->base.dramtype == DDR3) writel(0x2EC7FFFF, &denali_pi[34]); } @@ -686,7 +687,7 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, u32 *denali_phy = chan->publ->denali_phy; u32 i, tmp; u32 obs_0, obs_1, obs_2, obs_err = 0; - u32 rank = sdram_params->ch[channel].rank; + u32 rank = sdram_params->ch[channel].cap_info.rank; u32 rank_mask; /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ @@ -749,7 +750,7 @@ static int data_training_wl(const struct chan_info *chan, u32 channel, u32 *denali_phy = chan->publ->denali_phy; u32 i, tmp; u32 obs_0, obs_1, obs_2, obs_3, obs_err = 0; - u32 rank = sdram_params->ch[channel].rank; + u32 rank = sdram_params->ch[channel].cap_info.rank; /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); @@ -811,7 +812,7 @@ static int data_training_rg(const struct chan_info *chan, u32 channel, u32 *denali_phy = chan->publ->denali_phy; u32 i, tmp; u32 obs_0, obs_1, obs_2, obs_3, obs_err = 0; - u32 rank = sdram_params->ch[channel].rank; + u32 rank = sdram_params->ch[channel].cap_info.rank; /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); @@ -873,7 +874,7 @@ static int data_training_rl(const struct chan_info *chan, u32 channel, { u32 *denali_pi = chan->pi->denali_pi; u32 i, tmp; - u32 rank = sdram_params->ch[channel].rank; + u32 rank = sdram_params->ch[channel].cap_info.rank; /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); @@ -921,7 +922,7 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, { u32 *denali_pi = chan->pi->denali_pi; u32 i, tmp; - u32 rank = sdram_params->ch[channel].rank; + u32 rank = sdram_params->ch[channel].cap_info.rank; u32 rank_mask; /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ @@ -1055,14 +1056,14 @@ static void set_ddrconfig(const struct chan_info *chan, unsigned int cs0_cap = 0; unsigned int cs1_cap = 0; - cs0_cap = (1 << (sdram_params->ch[channel].cs0_row - + sdram_params->ch[channel].col - + sdram_params->ch[channel].bk - + sdram_params->ch[channel].bw - 20)); - if (sdram_params->ch[channel].rank > 1) - cs1_cap = cs0_cap >> (sdram_params->ch[channel].cs0_row - - sdram_params->ch[channel].cs1_row); - if (sdram_params->ch[channel].row_3_4) { + cs0_cap = (1 << (sdram_params->ch[channel].cap_info.cs0_row + + sdram_params->ch[channel].cap_info.col + + sdram_params->ch[channel].cap_info.bk + + sdram_params->ch[channel].cap_info.bw - 20)); + if (sdram_params->ch[channel].cap_info.rank > 1) + cs1_cap = cs0_cap >> (sdram_params->ch[channel].cap_info.cs0_row + - sdram_params->ch[channel].cap_info.cs1_row); + if (sdram_params->ch[channel].cap_info.row_3_4) { cs0_cap = cs0_cap * 3 / 4; cs1_cap = cs1_cap * 3 / 4; } @@ -1089,22 +1090,22 @@ static void dram_all_config(struct dram_info *dram, struct rk3399_msch_regs *ddr_msch_regs; const struct rk3399_msch_timings *noc_timing; - if (sdram_params->ch[channel].col == 0) + if (sdram_params->ch[channel].cap_info.col == 0) continue; idx++; - sys_reg2 |= SYS_REG_ENC_ROW_3_4(info->row_3_4, channel); + sys_reg2 |= SYS_REG_ENC_ROW_3_4(info->cap_info.row_3_4, channel); sys_reg2 |= SYS_REG_ENC_CHINFO(channel); - sys_reg2 |= SYS_REG_ENC_RANK(info->rank, channel); - sys_reg2 |= SYS_REG_ENC_COL(info->col, channel); - sys_reg2 |= SYS_REG_ENC_BK(info->bk, channel); - sys_reg2 |= SYS_REG_ENC_BW(info->bw, channel); - sys_reg2 |= SYS_REG_ENC_DBW(info->dbw, channel); - SYS_REG_ENC_CS0_ROW(info->cs0_row, sys_reg2, sys_reg3, channel); - if (info->cs1_row) - SYS_REG_ENC_CS1_ROW(info->cs1_row, sys_reg2, + sys_reg2 |= SYS_REG_ENC_RANK(info->cap_info.rank, channel); + sys_reg2 |= SYS_REG_ENC_COL(info->cap_info.col, channel); + sys_reg2 |= SYS_REG_ENC_BK(info->cap_info.bk, channel); + sys_reg2 |= SYS_REG_ENC_BW(info->cap_info.bw, channel); + sys_reg2 |= SYS_REG_ENC_DBW(info->cap_info.dbw, channel); + SYS_REG_ENC_CS0_ROW(info->cap_info.cs0_row, sys_reg2, sys_reg3, channel); + if (info->cap_info.cs1_row) + SYS_REG_ENC_CS1_ROW(info->cap_info.cs1_row, sys_reg2, sys_reg3, channel); - sys_reg3 |= SYS_REG_ENC_CS1_COL(info->col, channel); + sys_reg3 |= SYS_REG_ENC_CS1_COL(info->cap_info.col, channel); sys_reg3 |= SYS_REG_ENC_VERSION(DDR_SYS_REG_VERSION); ddr_msch_regs = dram->chan[channel].msch; @@ -1121,7 +1122,7 @@ static void dram_all_config(struct dram_info *dram, &ddr_msch_regs->ddrmode); /* rank 1 memory clock disable (dfi_dram_clk_disable = 1) */ - if (sdram_params->ch[channel].rank == 1) + if (sdram_params->ch[channel].cap_info.rank == 1) setbits_le32(&dram->chan[channel].pctl->denali_ctl[276], 1 << 17); } @@ -1232,7 +1233,7 @@ static int sdram_init(struct dram_info *dram, } set_ddrconfig(chan, sdram_params, channel, - sdram_params->ch[channel].ddrconfig); + sdram_params->ch[channel].cap_info.ddrconfig); } dram_all_config(dram, sdram_params); switch_to_phy_index1(dram, sdram_params); From patchwork Tue Jun 11 14:50:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 489 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 795BA3F08F for ; Tue, 11 Jun 2019 16:54:25 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id g9sf9250354pgd.17 for ; Tue, 11 Jun 2019 07:54:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264864; cv=pass; d=google.com; s=arc-20160816; b=rYJ4i2ucemBzH4CD3Cbh/7MrckhUzP2OIEyKCTu+KwAdT+V5fiijEqT/x3KXpaVSXm Ie+e6AtEN1rnvrE472nM6jzEe2OaW1kNPQ5r3oYWHlCQQGkEb3k4JQBFBdNeiuAYOUdI w0OZyty9X3B02ZN+SVhZ/1YEerKsLRdDLHHnFjui0SdapGGzo2FR7gclFr9fxBTSdVAv OCbZz0Oqciri3i8OqNOLwS2Ob9lkSpDjBSnav7OkWQbmr6t2HXUYUVhooh25K80iUh+q A/5/o7zVtLZRDZHWASF/cs5Jh4fefzXlCcDS0PxQRjlkBhG/PRtIkRKyjvQc/+IkxZIx 1oCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=gOkmVu5hDD6vGQuSu6Xupg/EUlW0P69NVeWutpiveGg=; b=A2DjVJKZI7Nr4h8xI7+GEhrrm6ptWeD2BkiPaafqvbd48naVSJ0xma9YDpRFHbEnSD VFHj5Z4iVPQFJ+uQDA8WJLvsmVfKEMMlI4+usFRZq3r0/JX7nyvsi4/sOVAfgy6qJveL igM0zDZuZDeBetOJV0jYRHJaxaRKVlMNdyZV/ihSDW7zWxsPU/BpyE/TlFxtGM7f8x3C 31HbQoVdgcM2b2128GqpMcdNdAX7jULBkJUTyUdb2eKLkU22gPZdYcErMkk7Knmvyho2 cZ+8y8b9StxShLsZexpH5AtFzhaHxl3fQt1HLYpPtaq0E8QNk2RmMfMz6OX9fZ21DX3m yA1Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=J85+AMkk; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=gOkmVu5hDD6vGQuSu6Xupg/EUlW0P69NVeWutpiveGg=; b=mDEzq+qBJTdXDKV7Mb6KduGNkLucq8DY+t2D73ij/9PTRvPN+usEqg4ENZj5Pc6NCn R7SJSrML1uSb7z4MY0Dw6OLYNL9KJ7aHI0gi8WTn2VUiKaf8FzpOzOZ7ahuZGJmsfrSY unt1kkzIYjd+OLAzFZ4lQ/cSwnijpqZDq+qWY= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=gOkmVu5hDD6vGQuSu6Xupg/EUlW0P69NVeWutpiveGg=; b=YgPPJKQzsmWOVNDJCcvbvy9xMITnS/jHe05dJ2Boe+TXdITLS7cPKNTxjKMRhQjgRd CZZG4oBFf+LnhGQ1NsyMp9zvX83jT8rr8nY1yDnyjpUOP4ObQ9XMaoiFXRw+8oNEs7oH kiJsOL5FlCYd7tDH4HMxOhcE31x4akZkQfau3ErHfuW6kkKzHeHgFP0+vsbkSz287jVo gvbNIr4oHN0Sk7ANenzravvJlDCXlGsMg9E1h4mKjKKaP0ie9e+rJUwszT2irvdVBt/4 4ONUxl0zMJrLzbnHGmF0I9zEnNRX0Zn0SYLKv7EDWA/y9N4EBWJjbSi/DdUyWrKA82lt AbEQ== X-Gm-Message-State: APjAAAUGdj5Lib6/KfdJBLAIYrIayxyGy5uSpczm/DVzQ+Uquf+4lXkD 76yIZ5sQC5RbsZ4vAnO42pTyTwPP X-Google-Smtp-Source: APXvYqwUW9hofkLYGUqQnNYALsL5siXBrRmy9ATiSDOaAj3g1+dIAOINIv0yGEBCUPo8zCnhQ57lGQ== X-Received: by 2002:a65:5787:: with SMTP id b7mr20945477pgr.148.1560264864202; Tue, 11 Jun 2019 07:54:24 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1b8a:: with SMTP id b132ls4498512pfb.9.gmail; Tue, 11 Jun 2019 07:54:24 -0700 (PDT) X-Received: by 2002:a63:a449:: with SMTP id c9mr20921551pgp.149.1560264863819; Tue, 11 Jun 2019 07:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264863; cv=none; d=google.com; s=arc-20160816; b=zFAxo+Oo5uA0vvySQDjVq6QfPQy8gjFj4Ziuo5brqMXKJ4QAQnpe0XCxFxSU5RP1kc gEYVRsIhqrVMdw/yOr3Z2VvncNPT6zoL+1ufozy9OQ/Qlxu06nsi8Ls11+AMfepYa3TA Dcj5VyIJxr0BmmY3nt/vvmKnkOU80pbZcN4Ix5wTlEtH6JjCzRswZmoF42OzeR5aCa3y KXI473Ykejdx56fgby6kupdouFWFP7IJK/+KnswY8ze2USGPWwppXsHhc3q7TTbEryal FydUspcFEwbcBzIfnT3PMhTXM3cmWG/7/mgyYPdHPdUYxrQxiOSbNovGuthtJETCcDW4 SvqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=qgL2FaT1eaStfsj3hGDtJf5kpFbPRE60ag+y7zGYXwk=; b=I5kWwk8DLsAkm4P6r2SD8MpuF71L5Xr07cHm2wWs2+LOW8o28ylINknU0mu4HUMCDO /HyNVZ0574f0P+xFqiDnhTn/BoI9JtWZnZemueSZoNnmRL9gCrYPpJtQr5qQYuLLgBHP IKPrxZ5QXVwu3zEOybGPbSejXIxfKfroxKWk1jV7OcZT9jOe6ve3DStepIzVS1Sr6nIn nZ/IEYQkwxjlrWPt+Gl41vfx3Zq9N7CU5sr8oItFIMR8+Ybr9l86e+Xnbne5kllrfTnX b3rVC9FXrWwM1Cxwl7on7mwsjay7c/8B4y1TOx6BdVGrUllfWITodMyiDCIE4MyefI6C T+DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=J85+AMkk; 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 o5sor3225200pjp.20.2019.06.11.07.54.23 for (Google Transport Security); Tue, 11 Jun 2019 07:54:23 -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:a17:90a:ac11:: with SMTP id o17mr27735080pjq.134.1560264863452; Tue, 11 Jun 2019 07:54:23 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:22 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 38/92] ram: rk3399: s/rk3399_base_params/sdram_base_params Date: Tue, 11 Jun 2019 20:20:41 +0530 Message-Id: <20190611145135.21399-39-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=J85+AMkk; 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: , Most of the ddr parameters are common in rk3399_base_params structure and which would reuse it in another controller like px30 in future. So, rename the structure from rk3399_base_params into sdram_base_params. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_rk3399.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h index 67044f53e5..fe25446cab 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h @@ -121,7 +121,7 @@ struct rk3399_sdram_channel { struct rk3399_msch_timings noc_timings; }; -struct rk3399_base_params { +struct sdram_base_params { unsigned int ddr_freq; unsigned int dramtype; unsigned int num_channels; @@ -131,7 +131,7 @@ struct rk3399_base_params { struct rk3399_sdram_params { struct rk3399_sdram_channel ch[2]; - struct rk3399_base_params base; + struct sdram_base_params base; struct rk3399_ddr_pctl_regs pctl_regs; struct rk3399_ddr_pi_regs pi_regs; struct rk3399_ddr_publ_regs phy_regs; From patchwork Tue Jun 11 14:50:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 490 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8258E3F08F for ; Tue, 11 Jun 2019 16:54:29 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id l184sf9253015pgd.18 for ; Tue, 11 Jun 2019 07:54:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264868; cv=pass; d=google.com; s=arc-20160816; b=Znf1JULjGlH1AP58Pkiyl8MfywPdGXSKhvZlVZwMqyBw9b9A37K9JG5eYmKrvAmegX TPthTTvGa4YKo3PSHbz0mPOu93e+RDpOSXM/lrOc9xWeA2TMHuMIHSzm7kur18vLIf02 Pg528tkJEDsaW7tUayt30z7IsdFsr/bbg3wUq6bgsf4oUQF6q/36rgp86oXEXW9rpyyN djgZ6WpHQOBcA4rMLC0tJ5PjMisvMv1P4XiouSdBPp88Axi/AJ/y7mLR/LYroFTmLFuu L5GRviYYIfauE19LjgMkokBsDBzs67jjm3fo7tElKFT1atYDGWtEeUkeBm8HFtFyfH0n 9wlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=XdRM+RBD1t9/oFLF9fImS+uZxFNWBBcyOjKdettzT2c=; b=JxNlYcxdcukxyfn6zF2NxZoeoNVm3Q3f41GxdBYGEv8VLDY5ZXasiw0m5XOtZDAyJw 6Zjw38sK/ZKfZjLUcZIfVYX3O5P8+PRNJoJzeLdrFLHO1rdTYLJjWf1+uuguySBKXiYT QFyruiYVYzC6nDf6hBmhYyfwS+luOFaU3Yh8I3r85Uq5zahOPeJvoygSMr2bKpF+3pB2 JPNw0a+rbTgOjhTM3pNkgrNx5h8tFn/A51PVjMKkLFF6G55vECAhhgcgJHJazSUOAw2G OH2B+4DTIYtx4kjk/SglnpPyxgD4RXaqBDiMX+TVcbZZ6av3YOPIzgJXReHV/KCEiUts dFaQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eGgTxMis; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=XdRM+RBD1t9/oFLF9fImS+uZxFNWBBcyOjKdettzT2c=; b=nCsXM6RVydkiUo1jehSCmxcpZVuOW4xg92R7XTSImIw/sg7ltHKue7jL8OWimVaGi7 o8Lzt5adfzv6OlWQiWYBBHY48WH7FJfMf8zFIdz6EvETJcdvra1MBu61cYtFD9EkbZZB h4a82QAPG6Gkp4TTMar5M16NsHrr07g53IXI4= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=XdRM+RBD1t9/oFLF9fImS+uZxFNWBBcyOjKdettzT2c=; b=q/LBlvMN4XEYKoo3qxyN3zJmgVwN81tsOzuNwlMcPbxEu19NesIU0ZR4Qztbkc8fkh EO+48R0XNZ71MVJgjVbqom6N3wi/1vlVA3BuCTOzXwq/CwY57HnpJRT8PmeBcNv4HDK1 E58L7hZ93XQefMTx40bST50tTzB4jvT6ioWVZB7yolDD3ivKDesd/vt2yC08dzkzJV+D EavAcLRk+ux3aWbX2D5k+J1uciV2xGXs7uW+9rLYBLHTaJsfMczrECfh9GH14qqdkzdM e1eLGGw9rkvsQFzl5hKFVxYOD5r3ZuE2ZM6k4WKcksx55Eeoegm2V50cum6yzI2y3uBr sbjw== X-Gm-Message-State: APjAAAVpDU9yxPvY26yxm5llE4WXukYQy5Sa7uQWo9YApDYNb2AhVJAy OUraMBygM/9D2GdXG3jaMjOLSC/O X-Google-Smtp-Source: APXvYqzXKTdFglemErG7c+DDoC1m1DsR1TrOppf/Zz9IqA5KKlR1i8cOXSiB14CRKYrbfNOfioFBRg== X-Received: by 2002:a17:902:8209:: with SMTP id x9mr76908970pln.327.1560264868331; Tue, 11 Jun 2019 07:54:28 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b605:: with SMTP id b5ls4895159pls.12.gmail; Tue, 11 Jun 2019 07:54:28 -0700 (PDT) X-Received: by 2002:a17:90a:8a84:: with SMTP id x4mr19973199pjn.105.1560264867984; Tue, 11 Jun 2019 07:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264867; cv=none; d=google.com; s=arc-20160816; b=y2CmPPs8YmfQYbgCXLoX3zOxJ/1mBYbXLmCwjGdriDvO5dwbVtfL7dRS4NemsKLces IlTTvBPnEnZbgBUE104ZRUJyYBzWcXw4cu2dH++WolNx1QnqJQrb74E18qjz8MFmyQt0 zkRxWFGCXYTQ9f0/whvM+avokFc9eI3J2bO5/jy4aMbzc98eVgvLe0xU5PLXL69Z3Hop odoiO5LTVm/tX+Za3xGaID4CLtWsps0cWwPWmvhJNU1/0kapr4+GNekv2pKVeZVGYo2o km9cXsfhMDDzJenaLR9LQG3GrIfW8tzHJfUq/6pIKbuhNsYZEYyaPT3ibsSBPwHapmk0 n89g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=P2YhP5cKxP/vT8AS5LQrl5DB+8q87pvOExCb2ibCXd8=; b=n2Mqc09Yaap1zJSIwQgutKlGkrakJl28vdFlm2idzYNfITAbQFNrOEJVRSVKpvHpbm YbIyyH3MwXiSP00rGHEDuJaU/7Likna40ydnh47BTZ6U2ZPK02Wf6Fh4pS13zccyRSi9 +z8KIQarlsWF8l+Qc2po3zelDfJbqjmutQcJTM1Qkxew2pRnaGDPWgKTuL3MCo5XCt04 KDjJAO/ztHfdpSVGCZdkFfeab6rx9X2hCxDeEYolQ8iTw/fy1Ji6U3111RKAEv2jKZK4 fLZho7aea0NF56inRkRft6ZDNf12aWxqQzNuJfe7yhFfJMEpJyr1L+Qm535SdxeRdX0Q 28Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eGgTxMis; 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 a2sor13153691pfb.68.2019.06.11.07.54.27 for (Google Transport Security); Tue, 11 Jun 2019 07:54:27 -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:97bb:: with SMTP id d27mr13325678pfq.93.1560264867696; Tue, 11 Jun 2019 07:54:27 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:27 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 39/92] ram: rk3399: Move common sdram structures in common header Date: Tue, 11 Jun 2019 20:20:42 +0530 Message-Id: <20190611145135.21399-40-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eGgTxMis; 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: , Move common sdram structures like sdram_cap_info, sdram_base_params into sdram_common header, this would help to reuse the same from another controllers like px30. Signed-off-by: Jagan Teki --- .../include/asm/arch-rockchip/sdram_common.h | 29 +++++++++++++++++++ .../include/asm/arch-rockchip/sdram_rk3399.h | 28 ------------------ 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 8021ca21ed..200551fac5 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -5,6 +5,35 @@ #ifndef _ASM_ARCH_SDRAM_COMMON_H #define _ASM_ARCH_SDRAM_COMMON_H + +struct sdram_cap_info { + unsigned int rank; + /* dram column number, 0 means this channel is invalid */ + unsigned int col; + /* dram bank number, 3:8bank, 2:4bank */ + unsigned int bk; + /* channel buswidth, 2:32bit, 1:16bit, 0:8bit */ + unsigned int bw; + /* die buswidth, 2:32bit, 1:16bit, 0:8bit */ + unsigned int dbw; + /* + * row_3_4 = 1: 6Gb or 12Gb die + * row_3_4 = 0: normal die, power of 2 + */ + unsigned int row_3_4; + unsigned int cs0_row; + unsigned int cs1_row; + unsigned int ddrconfig; +}; + +struct sdram_base_params { + unsigned int ddr_freq; + unsigned int dramtype; + unsigned int num_channels; + unsigned int stride; + unsigned int odt; +}; + /* * sys_reg bitfield struct * [31] row_3_4_ch1 diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h index fe25446cab..6258c811f5 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h @@ -96,39 +96,11 @@ struct rk3399_ddr_cic_regs { /* DENALI_CTL_274 */ #define MEM_RST_VALID 1 -struct sdram_cap_info { - unsigned int rank; - /* dram column number, 0 means this channel is invalid */ - unsigned int col; - /* dram bank number, 3:8bank, 2:4bank */ - unsigned int bk; - /* channel buswidth, 2:32bit, 1:16bit, 0:8bit */ - unsigned int bw; - /* die buswidth, 2:32bit, 1:16bit, 0:8bit */ - unsigned int dbw; - /* - * row_3_4 = 1: 6Gb or 12Gb die - * row_3_4 = 0: normal die, power of 2 - */ - unsigned int row_3_4; - unsigned int cs0_row; - unsigned int cs1_row; - unsigned int ddrconfig; -}; - struct rk3399_sdram_channel { struct sdram_cap_info cap_info; struct rk3399_msch_timings noc_timings; }; -struct sdram_base_params { - unsigned int ddr_freq; - unsigned int dramtype; - unsigned int num_channels; - unsigned int stride; - unsigned int odt; -}; - struct rk3399_sdram_params { struct rk3399_sdram_channel ch[2]; struct sdram_base_params base; From patchwork Tue Jun 11 14:50:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 491 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C3CE73F08F for ; Tue, 11 Jun 2019 16:54:33 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id e7sf2056523plt.13 for ; Tue, 11 Jun 2019 07:54:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264872; cv=pass; d=google.com; s=arc-20160816; b=eCACVtTcznXI207OqMqebm4vxp3AppZkWLvzreZ8OnWb4Oe5zClMNWMq7S/ChKl3R9 j5Z+dNe7RPU56UEvC/Ox1xT+pQZTGN1iE1LAl2CxPkzJ0H1Aic7YtsXGG1fDhqwFQEnV qotwhVOsZAkqQZivzpMLDiI7IfYkNZA9yhvg/DoCOSQGGr/yk61x91CsomCwfTfY5HpW 3MzlxBCXufJj5vrpWsWZQhGu1k+gPDFQAixs4PINInDPnUs/M37wscR2lYORttRgGXND KIdOjOF+Z6iBuIKqe2LW+YWsFd4bfkHhWdPp8JYAT5XqjmbZiuXtJVJV3jIrW7prfzGk B3tg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=l1LqbtOAF8VpvuCBGqFBfYuWeAoTX5yjU7w/V70bbrY=; b=djCtmxvMM5sJQunucVrSxCab9xTboi3SVskyRYFSEfTDQbNQ5eVvDvDYu6y6RY8Vet AbdY5+3UiE1JyCBBCFZV4jqvVOcRgD7/aJBquK/UkzyN2j45E0RlXQ+3/SHWT798bbrC 2Bb4f0Bf5TV+pDJsrIDX83KVLTqAaPN+/IzCYa+LEY6IjBQyMz5wreHhmcLt4H5OLiai mKbUPgzPTTC5yVbxvJ8Wx9sQOC4lv88lps6GDE3RCplo8g/x8k3PUZDNgBmKCtSYmRwZ KcS5V92R8mzJ64RCQogFk6I2C4SlKVV0eImVNzP4zbyGvxrQwsQt1kNE1THjKEyF2dh6 T8nA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GgWaehYI; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=l1LqbtOAF8VpvuCBGqFBfYuWeAoTX5yjU7w/V70bbrY=; b=PTFgH2hERuqi31ub62RQglJFb22NLo0vQH0CiGdsWcb6NDIXl6FF5hnXCfyZXu94Vg a88j+CVTdvzrlSa9uVHXAhDTztGL86xWS5WlEooLmLAStPtBX+78n+vSNXVUZsUU7+3y bBQ2qJ7QlXvJG9eoNiw+6PMTL8Rht2zjttq3o= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=l1LqbtOAF8VpvuCBGqFBfYuWeAoTX5yjU7w/V70bbrY=; b=Xoju6A4WrqfS5EAVgiNviyF7c5R+oUoWeolx1mXSK8c3Y2A/8COn3W7/p7FWrGEB75 nUQldL5J/MOjleGY+Z9uObMWtkGKHlNIaOcl2bFMU6n4nMalrDJ5nMBCFhbW56x8HKZQ wgpVxo8GYUuc7rBITABAvfcrK9wOedanj6NBNueWkSebyzEDKYMA62JfT8DVvEnG9Hdb k+sEXDcgPVFcC03EuoZYlxoxNsqx4zhbc9+3ASlLf+zykcdptYD1V433MocC4TzXS/S4 W5AGRX5RsY4l5G7B4DIsuQBz5R9hIVHf6MYhYSYfz+jO1v37lDZrKiEPGv5uQQtuRzud A/Kg== X-Gm-Message-State: APjAAAXIioTx1wImQpxNfNKx39cDPwZ6XJOhm5ZXdXFM+d5Hmob+8b9Q NKs0vNXICK9i2yAtrMUr4GLfFIri X-Google-Smtp-Source: APXvYqzxQraJBDuIODOrsAvuCg27jI69wexXWLWAO+7Mzj3pMOjiPfBKRyJcisCHMOqBL/oTb9DGyw== X-Received: by 2002:a65:638a:: with SMTP id h10mr21215136pgv.64.1560264872514; Tue, 11 Jun 2019 07:54:32 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:4e81:: with SMTP id c123ls4501494pfb.0.gmail; Tue, 11 Jun 2019 07:54:32 -0700 (PDT) X-Received: by 2002:aa7:86c6:: with SMTP id h6mr43831343pfo.51.1560264872154; Tue, 11 Jun 2019 07:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264872; cv=none; d=google.com; s=arc-20160816; b=wiAb7Mxq97dY+93GN0kFjR0UcwetYWAYILlB8PAqgm7WqwBKODKpI+5oj9Xvvwcewr Gg0+LzaR4Lc/6ismdWHGnm1tK8M+5ozDS6yNZKLcnw4JZ5w/bSZkvFmF8eQ1kwPPhuZf IlRSaVacxI1mblWVfdkv8ZF39qhHhn8cEMIZtP1C9F1Nswi2HiUfXFzCF78/89BMAbMY Q/vseUSWhboYtOs3DxR8+hWHUGkH2iiyJkCm28xRryBUZ9ww4PdfNywfAeCb9/6O69lE CCYd8BmGjsSDFnVevgCyY5iVHLPX6tuQCxuhnJo37GdtK+Z5GEFfO/NwLrxUvhPcwlJP MCYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zGqlfcSM+PyMIHvCMZaov9KVZepmoklQxHnfRiiVIM4=; b=kBHWkn5OduvBuLEbMvdHlsR3lSUgIjB0HA4WaeMxjk0AJNOYHijStdxXJCuiFnL8Rt 2EFYngcDBHW1TlTdmwziY9lEOeWbJMxlp5rL9QYh1zv9BmyUs5vljprhcbpCv7iOpU6l gVjBnF8pi19UwQrmr03iY4n5Am+41mki6lMQKkYPo7/uA3S3MN/fGJ+mVLwQVRkIzNDv zd78CryuGE8isYsq7AXCq5440zONEGi9fboXLPGi6YT80bwDNFBc35dkZBJe4sO0nNRi uARefLnTBNpsbiZfeZ+hs5Uj17vlZzz0cf6vioY9w8osy9lEMSRc2ruskLIZvTOEn7fu 9CQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GgWaehYI; 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 j19sor12854709pfr.25.2019.06.11.07.54.32 for (Google Transport Security); Tue, 11 Jun 2019 07:54:32 -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:a62:fb0a:: with SMTP id x10mr58141116pfm.224.1560264871798; Tue, 11 Jun 2019 07:54:31 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:31 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 40/92] arm: include: rockchip: Move dramtypes to common header Date: Tue, 11 Jun 2019 20:20:43 +0530 Message-Id: <20190611145135.21399-41-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GgWaehYI; 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: , dramtype enum numbers as common across all dram controllers in rockchip, so move the eneum values in common header. Signed-off-by: Jagan Teki --- arch/arm/include/asm/arch-rockchip/sdram.h | 6 ------ arch/arm/include/asm/arch-rockchip/sdram_common.h | 8 ++++++++ arch/arm/include/asm/arch-rockchip/sdram_rk322x.h | 7 ------- arch/arm/include/asm/arch-rockchip/sdram_rk3399.h | 8 -------- 4 files changed, 8 insertions(+), 21 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/sdram.h b/arch/arm/include/asm/arch-rockchip/sdram.h index bbe425deb9..9220763fa7 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram.h +++ b/arch/arm/include/asm/arch-rockchip/sdram.h @@ -8,12 +8,6 @@ #ifndef _ASM_ARCH_RK3288_SDRAM_H__ #define _ASM_ARCH_RK3288_SDRAM_H__ -enum { - DDR3 = 3, - LPDDR3 = 6, - UNUSED = 0xFF, -}; - struct rk3288_sdram_channel { /* * bit width in address, eg: diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 200551fac5..e0a94f81a4 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -6,6 +6,14 @@ #ifndef _ASM_ARCH_SDRAM_COMMON_H #define _ASM_ARCH_SDRAM_COMMON_H +enum { + DDR3 = 0x3, + LPDDR2 = 0x5, + LPDDR3 = 0x6, + LPDDR4 = 0x7, + UNUSED = 0xFF +}; + struct sdram_cap_info { unsigned int rank; /* dram column number, 0 means this channel is invalid */ diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h index d0091a7aaf..336c5d7e8c 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h @@ -7,13 +7,6 @@ #include -enum { - DDR3 = 3, - LPDDR2 = 5, - LPDDR3 = 6, - UNUSED = 0xFF, -}; - struct rk322x_sdram_channel { /* * bit width in address, eg: diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h index 6258c811f5..dc65ae7924 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h @@ -6,14 +6,6 @@ #ifndef _ASM_ARCH_SDRAM_RK3399_H #define _ASM_ARCH_SDRAM_RK3399_H -enum { - DDR3 = 0x3, - LPDDR2 = 0x5, - LPDDR3 = 0x6, - LPDDR4 = 0x7, - UNUSED = 0xFF -}; - struct rk3399_ddr_pctl_regs { u32 denali_ctl[332]; }; From patchwork Tue Jun 11 14:50:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 492 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DE18B3F08F for ; Tue, 11 Jun 2019 16:54:37 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id j7sf9770152pfn.10 for ; Tue, 11 Jun 2019 07:54:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264876; cv=pass; d=google.com; s=arc-20160816; b=EeEHSjVnKiRGf6JDqJSiQg5ykpjbsCrSf5TvrGL+52zgEDCmZpQslMBvl37O0fDz8R qEsJZ468oTGMdzxz1SYMSvsgEwNsZ1K9Asa/0rDcPvqrNYy0uf3eTCgdVcnsNzNNI9Vg mwBPwf7aHj+6QZO7JawF9Va6e+kNYUTu5/Hg4RLCNMVkySSP0+XkzFG3PaS5Bf+VIpS6 fQdlRQWt0iLYlHS9AIVL+7gc6gtm3nB1UPvZuspIDE6gtZSxIUtZdygJUQByVRIG7z6h B+71z+6jxGfW8qdSAQX6cL3bsQdHYwExShRo2y3dQdhG3FD9pXa2je0sAcQFRsqofZPx v9Yg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=W0YTPxzAjP1Dsk+oT+3cyLgwqhwNYAN+NlfKUN7CQbM=; b=Du5CGP4Vc/M6ijCE/YbYamOn2Papd0E4qbLbyZaTt6jz2/zmNPrhdLBXc/qptq+Wsf 6O1+IjXi3FXOpBoe3mtF35GMKxUm95deVpDQ7yQDBSeQ3WLcHAn1jXw8atnrNXMEuEFA e1XfXimo3V48peiOnmrU03Bup5dQvnDlpvO3BJedKcmmMNkbZTwthaCb7dhMkRh98W1v YxMyGTwZbCbAB/WoD3vEY3DUsMd0DcnrUx7CR8siQoCVkSIIz0ehgJpCvE2pIzLqohT5 x95+34LbW1JwGq1t4AWGetXJQrh238zI9v059dFSFQowtYcQ+wk0RSc3PTn6bvenK8q0 aphQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mAlknVM8; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=W0YTPxzAjP1Dsk+oT+3cyLgwqhwNYAN+NlfKUN7CQbM=; b=gSJo32SeFQZqWPi4PH+aJOY48FKnzT6dBwfPoDCsKuNf9/pUdjf93SmXGxq1bnWzL3 66KHC1CUp2heZkGV2mJzcZi6qSP+SYiDIOnP7d/cMAJAunESQX7E1HIoxcY/U6xw+Gzt P3kmBMp3tlHJ9UL2WJ2s9g1obXP7RywwhqJI8= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=W0YTPxzAjP1Dsk+oT+3cyLgwqhwNYAN+NlfKUN7CQbM=; b=e/Fx6s/T06TZwldXXWRKZ4SpEQUdgiQktNg92Qi6C+lnFRH3tuqE2fYwAMm9rH8sM5 9rGgUKMBw7h51pleXqDmIT3Pw7q+EDH/cKFWt/RWvTiUumnTtu+oUv4JxW764DjvfK2s X5r7TT3CL7mTCSJpb/Lt7fuuAgPn89ljk58QKF4Ezl8ANT3eBpIyV9gr5kbNszgXGIlB 1QHGGld45ngO4X1+Jcj/ypjZmpNhq7Vms620/ni2j69bwGTU9mWv/JnRxIClE1tpnkj1 FeCEINVrYBe/U1JiGEBToFfS4hO8g27qcfr59Y99i567IAgT8d1Czf6392Jgs05oAQ1+ khyg== X-Gm-Message-State: APjAAAVwHnFmpcFI2J3xVCWPcz/jQ5dOIUP+wWL5nvhpShcozSgwTW4+ Z0e15ZivFjANN0gtD3Q8BzEmMTnr X-Google-Smtp-Source: APXvYqz1rb/+OA6ECvoSS3loO27XyQKJAg//fcE9TvlOrOJIB4hsdDNNIV0dheXmk+xN9P5M7SIYog== X-Received: by 2002:a63:1f04:: with SMTP id f4mr21318108pgf.423.1560264876572; Tue, 11 Jun 2019 07:54:36 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:2670:: with SMTP id l103ls858748pje.5.canary-gmail; Tue, 11 Jun 2019 07:54:36 -0700 (PDT) X-Received: by 2002:a17:902:5c5:: with SMTP id f63mr76203586plf.176.1560264875844; Tue, 11 Jun 2019 07:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264875; cv=none; d=google.com; s=arc-20160816; b=j4ijS4OPsDzJ35NUF2KNLYSoUxyGx+wiAH4WcI/I8xn3ICSQS7gcIGiW4Ijbc04NwD BmeRNbooCGz1E3TdlBLwKJakB46AbaQwktNjFAoa/Tztix2Xyfvo6T3poygjF3eyRRbU xOLGppK5nF6wE4fHi9bXTrWtZED+fC+++p3fFuSe0ud/xOISS0jOKiUch700nceymqZz KpjAx5/hd9jYDbVC7M5UQVJ1FOoik/tnTNoVpcumRiOmcfC7kOEX5Cl5leIxA+KiiS+r YOuQH4nqotku4hrrV0Q6kDQEo0JLidAzJg5nqT3By3K5kIM4QPqzez4p+c3fhdX0R4GZ mxJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=UO8s36uD488DPxloYMOirzQDsI0oPxHRDrZXZS1gaH4=; b=tpyV0yzopMPzxxAACPAJADaNLXTVttvp7jup/HLi6/U+MgaeFP4tXsmtqEwl86lPx5 M2y07dHvf0EJwfqVLWcxBnejjIBL5DUq7CIUsYrzCyWdfMHrbnlm9owVfBRBDiziGi+y 6meRdMrrcQMjsyZQobc7zBeofRNwnsoP8Taunv6l3v78YJAPpa70QqK4NopMrayIO8tA a+88PUOddAURtpajUugUooAXnzesi1ve5Omk9diurBjoVEC2O+GRay89999r90jooNZ5 +fJ10GtKmV/DKW54cGazMkKKPYKuebodMg2ID7byeDPtXO7DbPEC9DZ+5mfBXT2Sp14L bQUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mAlknVM8; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id j13sor13074976pfa.8.2019.06.11.07.54.35 for (Google Transport Security); Tue, 11 Jun 2019 07:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a62:5214:: with SMTP id g20mr26762065pfb.187.1560264875555; Tue, 11 Jun 2019 07:54:35 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:35 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 41/92] arm: include: rockchip: Add DDR4 enum Date: Tue, 11 Jun 2019 20:20:44 +0530 Message-Id: <20190611145135.21399-42-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mAlknVM8; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add DDR4 enum number in common header. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index e0a94f81a4..d723e6dacc 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -7,6 +7,7 @@ #define _ASM_ARCH_SDRAM_COMMON_H enum { + DDR4 = 0, DDR3 = 0x3, LPDDR2 = 0x5, LPDDR3 = 0x6, From patchwork Tue Jun 11 14:50:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 493 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 68CEE3F08F for ; Tue, 11 Jun 2019 16:54:41 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id f25sf9751440pfk.14 for ; Tue, 11 Jun 2019 07:54:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264880; cv=pass; d=google.com; s=arc-20160816; b=JjXrsaWJbmQEAhicB1NlS1SgF9uMpm1lrk6qqOlzZPNAUsS2DG2HxO5+PnPTA+iSJj wS6sFeQvVLxbvCUqVQZcasGDFOUeYBnYk7hQNlwY94O21cHRX2Gf6jUShDC+LOJdD+nK gdhxheOOXymAmXvEiEBLWUjCgTuOOQ11ylz/PWsWVhqMsfcD/ZwR8KqmZp+59OaREFOF nHJCgXNfH2ZpjgKf2kLxKuWEXAT6omyAcWnZgHlUprMr4VQc+CGZ4pznqz6Ms/qwP4Dg 3QT8cTSvO3GNq26kuQrnCsuhxCTKdQqlZpLsRtsfDGvWW1AMv9ldkmaIkheKJ7iZn1Gz rl9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=eEaAQkyGm8YZQ8xTfle3cGOKrKQ5aFSplyJva+Fzskc=; b=CBqxorVTu0OG8+Z9aZ2pdoQb2IyPyjCpkGgox5N2bg0AFn4E6Q8I7InelEQcoM5lyh 0kq+r+cOrRSVXrwh9/D/7lZUeA5IzjCo5gC18qt756KCB9+v00i8ONL8NTFUwJWteJYF lA28989ue4Ps3vimb9V/corLxVPOoxPkmMeImE2tV3zp5rPmmlcaZ+7uPyGJOmH28ffK bNvhgUMYTIedRhMSNyt/4+EB5pdEVO/29DJQOf4UUFI91Qfgz57hpmKCOL9XOBeZFYGd IyItEq7Mumjh6NzYkbNZeCxKCOAvIBsvROiKE99cAoQATW5DyuPzZx52H4dAEd/rhD9+ 0F6A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=X7mbBQN4; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=eEaAQkyGm8YZQ8xTfle3cGOKrKQ5aFSplyJva+Fzskc=; b=gNLtuELaKpymy/5SjTNI/Mkz586PQRqIsifEQeADD2vX7Q/ZAvwf+bf+1cBj6lZsBW CrGXmP+BUFfGlgtzh7HWjDknucH4K2yTCBxoNaLbvZoK6og+Es0NuhE721Lmn1/8m86I 3iUVJ/x8ffSVORulV7MqoiPYX3RthSb0vo3CE= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=eEaAQkyGm8YZQ8xTfle3cGOKrKQ5aFSplyJva+Fzskc=; b=o1pJwPVZr4Ah7ApZjI18pGI+IIlhC8fw/DJjmziL0vDuTohkqPHDB73pBjNmog4Ffd gkeWEpipZCMJ9IowcjrinAB1uWnSCX9Y6seaUSGZO8K1iBjTQPM9qCUU67Gs9SX3T4Bb i984cAKvqkfq4fviHHNywE6XGqrcFNSgAKLS2aR4Ji1rGxPwBidWgu8OwIuNhQo5D2x3 2Nskx8vOUDm2bbs1rBAU310/zf403NcC2R2blEXFNSJU+/b9Za7N2Omd/qkhJ0mNdHXl QB9+C6jVcSr5Ax34sWwGm+vyMDbJRLRaLfdWOqPob5pI6JHGSfumvsq6N1qM24ZaPtMz uciw== X-Gm-Message-State: APjAAAV9ql+A6Uxukbam/RBJd7PH162ZvKV03jg3sI199np3+2MIsl64 H14gKEcvE2iSNcqf/uuciCYJ+dfO X-Google-Smtp-Source: APXvYqzXmfdJYVJfmktGvXljGPEcGODUkAp+201nvfqCEKrRlHT6xrGfrhfgurtWAx8/Kd0BX/ndxg== X-Received: by 2002:a17:902:54f:: with SMTP id 73mr75095758plf.246.1560264880255; Tue, 11 Jun 2019 07:54:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:28ca:: with SMTP id o193ls4496045pfo.10.gmail; Tue, 11 Jun 2019 07:54:40 -0700 (PDT) X-Received: by 2002:a63:cc4e:: with SMTP id q14mr20441700pgi.84.1560264879801; Tue, 11 Jun 2019 07:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264879; cv=none; d=google.com; s=arc-20160816; b=xfFxOgn+ZMTT9iXUT06v0kwh1uChxg5byIQC5V0tyTWD5DxjTWDwv/oZvbb05E+gMM G/5HYG/rZT1J+9bFIHWMwOPXzABaPxnzr0WbJpkNI6mNTjZyfLES1pit+QK9AuqjYuW4 rmUsL/x32nCaR9qo+9AcliYOOoQlM+McHddjQs9r+bpUTwi6LYdHdxPmmMHpKDu6wPCU oprs9UeqHVOZDqqfQiP1PPsftgoToy36SnCuQ979gAqkaeg3ltO/3vQ/lb62d90qxjmN INgWesU05qPUlR2auAAij9tQojvuxF8WWpyjYvaODdhZ3CyTIFPU2SBeXRF2F+5wQ27q ghng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=H4/nKsiczNmGqfi/dZQpnKSiemWR24mun0ufWG0UjA4=; b=PJhBrHqTkH4GqP1e7FwZ7+RrcwzXKjLkaYEvZCuHxdvhoAK6QpXjJCnFoTxDQcZPMY sY/WRU0+WIxnvyg97ILABsuekmcXkyRRokltxK/5QQIZ+FVa6Soi37MrZQscLhU1dcoC Yz7w7eqfD9dWlcooLwmDXwOQq6bJRzur+MVCtu60AdGmHA0B4eqHRiaAlubx9j3Wt2/L KlB0TxUFyPIgq4yh9K26Ay8x3lJ9mX6VPt0ATAutOC+CEX+SWBsdxNNEe0AzfyhuzUaZ RfVXNOGwLFU4XEocG4F3SNPT1bcJvjbn0p1s28nNpk2iluxyWqLtfEEdozx3cu5IIP4t odLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=X7mbBQN4; 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 b5sor15620011ple.15.2019.06.11.07.54.39 for (Google Transport Security); Tue, 11 Jun 2019 07:54:39 -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:a17:902:8b8b:: with SMTP id ay11mr76266842plb.63.1560264879488; Tue, 11 Jun 2019 07:54:39 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:39 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 42/92] ram: rockchip: Add initial Kconfig Date: Tue, 11 Jun 2019 20:20:45 +0530 Message-Id: <20190611145135.21399-43-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=X7mbBQN4; 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: , Right now sdram drivers in rockchip SoC are built based on the SoC configs which may not be an adequate solutions while adding common or debug driver. So, add meaningful Kconfig options start with rk3399. Signed-off-by: Jagan Teki --- drivers/ram/Kconfig | 1 + drivers/ram/rockchip/Kconfig | 17 +++++++++++++++++ drivers/ram/rockchip/Makefile | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 drivers/ram/rockchip/Kconfig diff --git a/drivers/ram/Kconfig b/drivers/ram/Kconfig index fbf7d7b20f..568d8f2c6a 100644 --- a/drivers/ram/Kconfig +++ b/drivers/ram/Kconfig @@ -54,4 +54,5 @@ config K3_AM654_DDRSS config add support for the initialization of the external SDRAM devices connected to DDR subsystem. +source "drivers/ram/rockchip/Kconfig" source "drivers/ram/stm32mp1/Kconfig" diff --git a/drivers/ram/rockchip/Kconfig b/drivers/ram/rockchip/Kconfig new file mode 100644 index 0000000000..995cb487b8 --- /dev/null +++ b/drivers/ram/rockchip/Kconfig @@ -0,0 +1,17 @@ +config RAM_ROCKCHIP + bool "Ram drivers support for Rockchip SoCs" + depends on RAM && ARCH_ROCKCHIP + default y + help + This enables support for ram drivers Rockchip SoCs. + +if RAM_ROCKCHIP + +config RAM_RK3399 + bool "Ram driver for Rockchip RK3399" + default ROCKCHIP_RK3399 + help + This enables ram drivers support for the platforms based on + Rockchip RK3399 SoC. + +endif # RAM_ROCKCHIP diff --git a/drivers/ram/rockchip/Makefile b/drivers/ram/rockchip/Makefile index 5df196066d..07d4b62a9d 100644 --- a/drivers/ram/rockchip/Makefile +++ b/drivers/ram/rockchip/Makefile @@ -9,4 +9,4 @@ obj-$(CONFIG_ROCKCHIP_RK3188) = sdram_rk3188.o obj-$(CONFIG_ROCKCHIP_RK322X) = sdram_rk322x.o obj-$(CONFIG_ROCKCHIP_RK3288) = sdram_rk3288.o obj-$(CONFIG_ROCKCHIP_RK3328) = sdram_rk3328.o -obj-$(CONFIG_ROCKCHIP_RK3399) = sdram_rk3399.o +obj-$(CONFIG_RAM_RK3399) += sdram_rk3399.o From patchwork Tue Jun 11 14:50:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 494 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0B29D3F08F for ; Tue, 11 Jun 2019 16:54:45 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id b10sf5012746pgb.22 for ; Tue, 11 Jun 2019 07:54:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264883; cv=pass; d=google.com; s=arc-20160816; b=n9AKjoyf4au4NDj3gzFjH75LObyuhVgn547bkJJ4biUIHRmleDLGWHvwcgQCcWZAVt 302kJHOxW3mq8YmINpUoPK3keLRDNpN89earC9+9v9SFrt8eK/4W5KP7YDrmGgdrO+IS j1ifxFrObdoMagD9mIlEUNavykYSYUhcUUstt1qSsumahPJIG+3EgOzURIMQUp9iPJf6 vn8LPz7PG/1j84K7cpnIqfkUsqjSBuN4BWRLSDgodRgbqFDfSxblAT/NBujCZr8QoXaX xmd1QNZxI+RVK3x5CizOw4H0PZdAStNiMx0MEcPpPTW4NCW3z4S2jTFh+XTiwtKoXfcY foLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jN2P/uIhjH9C4BBOXz3A5tK9gssgvHRdgDpeLs9Qp2E=; b=TqyqQo8my5uHeJNevgPA8idh7C7Jz1v52zDhfmoh/poVwmdjQxqWfuD+2NavB92SwS Z8HGrZ8IaStLHqFalpnDaNnvVHxCEpUUgNA+KIrAKPl+JLlrz/hGKpi/H6QbD1GQlG8L dU7WR7WyFQ7wYiQH7IXfuBH2n0fxWjQT8pncNYNC4Oi+dST8Yv0wc/r6HukpL3MkHIic Hh5G9bV7dX/8wi51aU7+bIrvtHQ0D1F3/E+DXebCdlTbtA892OD6nbx/9IyVyzplAFKa zouVgJNh5nVBtYiHCLc8K5UVmCEfOYW87C/zxpbgdU3hTSSR+drHpGyNZb1n/fGn4buu X8cg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KrImql71; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=jN2P/uIhjH9C4BBOXz3A5tK9gssgvHRdgDpeLs9Qp2E=; b=B2Z2nKUI1Zkr8Mo2Doh4DtvP/5/mQtZFFr87cocAfQUWKfyWIgmgRoUEZnl7Ql1s8V Mj6QoIQGWMwItpE22Nwv07JvAiEp35TcuW/Ps65IQKwndENNnXCGp+gsqnV2ljnYLNoq AGuX5ShIG1U5wsjHImQkkjjvStuJm/Wb12fWc= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=jN2P/uIhjH9C4BBOXz3A5tK9gssgvHRdgDpeLs9Qp2E=; b=FX2vxe6YlaLN0DxbQchaHq12hhTMsCU7Af4EAmFJcalOHDWR19kH2eS/hfqHOjuFaa ihkhgvIiT5+boTcy4bkwAh0FLhwCChGcuPzjRwXUVcuJjRzM3Bm81Xnn9TD/z+gnC3i7 p1KvvD64D37o0k06uh+dMvWYY/hqXDBynvPWOWibzkidqfQT+G+LfCVHv7Njr+KtfL7T kuLr4mEjzUZwQbMJ/itEEstigjz0W6BPUEo6px2QrXoqCj0lSUshgel+mNla/FliL1It DqkWkPhXLKNMgJSRjvCjnj6Gb8iRxhYedCS7tuypum1gpUp+DpO/ZLaOwdPyf2FDEXVM 1pzA== X-Gm-Message-State: APjAAAUIlVc9GK7+bGgv6OChES3K8rgiaHAijw92zqcHLL8dUVxqf/nL HCdwTUbtBtyNNJMFOyq2Ky/73I0S X-Google-Smtp-Source: APXvYqyPUxl6Hubmzt/lLL/ADPtMRg2y9uMXqdOJ8C3XrUHE8rA9LHxch/Pu2o0Gr2XcX0P8ura+vQ== X-Received: by 2002:a62:a509:: with SMTP id v9mr79308282pfm.82.1560264883874; Tue, 11 Jun 2019 07:54:43 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:8593:: with SMTP id m19ls861096pjn.2.canary-gmail; Tue, 11 Jun 2019 07:54:43 -0700 (PDT) X-Received: by 2002:a17:902:a5c5:: with SMTP id t5mr77742349plq.288.1560264883593; Tue, 11 Jun 2019 07:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264883; cv=none; d=google.com; s=arc-20160816; b=gibRDLvpIL4MjR/dv8Jw4aXbvOOSlQXxG0ADgFhOY2PtZr2PBKfjjlV1Pc5Q1FefKI plUKIdN2eO8nLyo5gMVQ3ItoUcmfQEUiHDzhXeN1q/SgjcXhtmD3sY+OUqsMYj71UkOu gw2GmuHjSQieRzOGM6BpXZxqW0NM/r5fQsMXRDd4cn6Zk6nHku3Z+M5i0XBLvLU9WvmM x5XMXLcKS3HwMfNLI+hUoPz2A1XWAP+/QBF8ZOCuQ02TF59HmiUfvDdZDrPhdgbxApwW DrIIMS5cDGISG977PH48m2GYaVFhJF8lmVMnBqFXVNAWuHe8sia4bHSx3AhNLms4XuOu uB4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=7B3tbjY3n0ai6z9ObJzMBT9vy+XRoJe3mWhFKoigG/c=; b=ptYsgbA5zMczBx0j9eW9BQMME/9rTXnoZ9Unf//WvUsv/4Kz06tMVIg2drElhe3k6E 6TCLOVWO5FZRvyIqQJmUdYL2fJNhqZfuA7etbZVcXoBhUdSE1p9UuNb05jsr5rL+fjgl E4hCzha5aZOanfu2Mnap1FJq5Y2P6V36J1aQDAZ9Xt3gAEVKJQbb+FEEHVvU1BYEtxei 3oD3Z8OgsJu3qth/Gpeh+jcz2geguqD/HmEIO9ql6Dbv+uY0X9G1M2t2E5HCNijQbvYB wNkecqsVjjgwLvjKOCKae0RzFFiYNLQtrnxIGeHinnm/WzP11jIKi4LPTqkqGXlPNiJN /O1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KrImql71; 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 b65sor13296937pfa.19.2019.06.11.07.54.43 for (Google Transport Security); Tue, 11 Jun 2019 07:54:43 -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:8083:: with SMTP id v3mr1852563pff.69.1560264883270; Tue, 11 Jun 2019 07:54:43 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:42 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 43/92] debug_uart: Add printdec Date: Tue, 11 Jun 2019 20:20:46 +0530 Message-Id: <20190611145135.21399-44-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KrImql71; 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: , Add printdec, this would help to print an output a decimalism value. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- include/debug_uart.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/debug_uart.h b/include/debug_uart.h index 34e8b2fc81..cd70ae1a04 100644 --- a/include/debug_uart.h +++ b/include/debug_uart.h @@ -104,6 +104,13 @@ void printhex4(uint value); */ void printhex8(uint value); +/** + * printdec() - Output a decimalism value + * + * @value: Value to output + */ +void printdec(uint value); + #ifdef CONFIG_DEBUG_UART_ANNOUNCE #define _DEBUG_UART_ANNOUNCE printascii(" "); #else @@ -170,6 +177,18 @@ void printhex8(uint value); { \ printhex(value, 8); \ } \ +\ + void printdec(uint value) \ + { \ + if (value > 10) { \ + printdec(value / 10); \ + value %= 10; \ + } else if (value == 10) { \ + _debug_uart_putc('1'); \ + value = 0; \ + } \ + _debug_uart_putc('0' + value); \ + } \ \ void debug_uart_init(void) \ { \ From patchwork Tue Jun 11 14:50:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 495 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4C5633F08F for ; Tue, 11 Jun 2019 16:54:49 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id r7sf7901802plo.6 for ; Tue, 11 Jun 2019 07:54:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264888; cv=pass; d=google.com; s=arc-20160816; b=KxDzLvQox7XpuhqVewV7U8Hm3GKrspLS9i+o+cmH/ESGIld/HBRfIpRNkoOeTXq0+h feN2jurvj1qifJbnVV8w3rvq/HF9ZNW/MwyhSpnC1NfuE0ScAWMBAamyX0X/oTfjbHDj Um6kBS0A40NiWRNKEb18tsFw1fc23Oo76hBwAnz/CvnuyHDufIZUJ2tqqfdaw8EtVouM cUk50aoIJeQ6neB4B4hOI098dY9CMZvpdWEphg2NDK81LSf2RreXNfRt8vlgTmtQG8nq ai8jL+qat0rm6xAqaB771+r4IcvUqbJOXCMqH72ZkSYW8NoXeekZTLH+Ar/hnktsg98Z E17A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cTJFVIS0wRShDQJkWnobfOnqtb7bpGvqiegoaDMGUVc=; b=W6qt0/WUV4VoV3AZJSIHNjDrT5mieVUukZE01JnWn3BOarCpTYN9foCylE1+fHx0MU ln+nFLQ8svVwt+NAdzACOJBI8gnHlOUVeZJNFauqsj4STcdMF1JDSuPRGCGQsvUg37gs 7qDk3HBf/A3mjil+z9U0fTHTuQ47NmINWjd+RtHsD9UJ5TEqE9DuDjjsEEwB0gI+/EzR b71gxwzY+NR/xgg/N2q7Fr+nLDbmkbgU0cXtslECYq4OEqsHFoJ1EUlr1q7jmR4lhSew WDlzj9j7WMtM4FmGjHJKvVL8mgCYE1w4lAlRs5EDNgpVfGAJzAGYM+EHczr4TBn5qjvH DRdw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Kf5GydXh; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=cTJFVIS0wRShDQJkWnobfOnqtb7bpGvqiegoaDMGUVc=; b=XQwAQ58JiWNdPqslHYP8UG+ngGZ9EbPXBUd5Er79XLrrsaHbmb30FUgyZh7byfZ/kE njmLyXaCHJWSO4jV4+5T3dHIdUyHixw3Z4E0wY9VyqrAh0isCkM529taP1kflOJf2M1F pcFXQhfK26tarPSHB3nlt+dLzUtl4bIu2wcN4= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=cTJFVIS0wRShDQJkWnobfOnqtb7bpGvqiegoaDMGUVc=; b=qxDVdQMEMPDSFvMV87BIr8OmyFZbGhsIkW48TzKUGqjUybdrs/xn7VkmbcZRWXqYly Fe+3HSSN/FVi7KS8exPvLVLRqZEuMfYig1VxsJ+1ijOOGyz4aUb7XoHJM33mb7zD+p/1 JOwfmjcXAqybDncBaGluGi9tbhhHSlXOrWHIc3k0O6LW7x8fOBQuXkYVlMQk60Ns6GAm mSGVN7gvyD0nsPvSVQFbBUdoVo6YAAktcUwzrXxsDctKaNiUgD+sEkjV+d0tkvnVP553 yGT4A/p+vBBQWisvCgwvguUPLwXBa351KQt0WP2QIRnkH5z1tif7WrFHbfbAq9hE81fe +G0Q== X-Gm-Message-State: APjAAAXa79hNz2WY8l6f7IVJQxOmiRGAgu5WrGGw6V/ibMgS9KAIbzll 69I+TkFDZLkl8mzXw8WKK9WMH0Cn X-Google-Smtp-Source: APXvYqxoZDpuD5R20bBvLuvs9wuanLZSBlIFDPJk/Iw2Luo5OA4kE28+A8TEcdq10sfSsM6isAdu4Q== X-Received: by 2002:a17:902:70c4:: with SMTP id l4mr40756844plt.171.1560264888144; Tue, 11 Jun 2019 07:54:48 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8a8f:: with SMTP id p15ls4699984plo.2.gmail; Tue, 11 Jun 2019 07:54:47 -0700 (PDT) X-Received: by 2002:a17:902:934b:: with SMTP id g11mr64004910plp.245.1560264887782; Tue, 11 Jun 2019 07:54:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264887; cv=none; d=google.com; s=arc-20160816; b=wxFACpZ5vXlylpMSo7Y8bGDcPFU3v+4VDHKXpxd+4ebjUKuclcmBWQ1MphQnyqIMcm deEDZ5qpCd9H5Vxuv69/DaqHZlacABMhBdnqGGM8IO+iY7ZkZzIyRL8t+GToFVa1+qMD N8yR0TKCjFV/MZo3Cq/VrmbtscF6+Df8PYKEt6XMRmBGnSDJ8xDcEAt9FMOnXKEqPS0m 1RNK/8zLC8vQiQHWhAV7WeyyjcmkljzpIUFlewx5t5NS4H9Y3woFQP7U1Duz05x5EXA0 UGkKzTpDJ/1YOkDzUXqPQ7tBkkb8PqAuTvnkrXuKq9iNb5VbL+hn7I4qaMDK66ib02Om 2dKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=XhdCNTKPTz7BvpFyl8lpuUkh8SvoRcCSv/2PVP+pBIM=; b=x0p+CElmrlVF/nlj4OPLANZa5OBRqSi/DSknlQP4/wzxwz9jkEK/M0znDjeJoDtALB uK38usV/W+YnKqrz+agumCYZsjsgkqRy3S11LnXMFbVIc0wm7vdl4B2cuXQAPiMhBnFP KxxdQGPF0ZfKMm7KXxp1soIuq3GtRhzRcTCoeS2rcXRZ3lgUdcWvHD+vMt9xKl1wWhYK qWqil6aysGf1L74G8y3oYUFm3l8kAXVguUjG9u66enASlXjmDhAgXE4rRyL6ebp2HTG9 MX3OD3dZiHnNDnTvEvTIIb9E32hjXV9vZ3TEwOsK+up7OVeandD1lrHL5Q1EmVanU77Z /fkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Kf5GydXh; 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 v196sor6658032pgb.58.2019.06.11.07.54.47 for (Google Transport Security); Tue, 11 Jun 2019 07:54:47 -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:a65:60cd:: with SMTP id r13mr20771234pgv.58.1560264887387; Tue, 11 Jun 2019 07:54:47 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:46 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 44/92] ram: rockchip: Add debug sdram driver Date: Tue, 11 Jun 2019 20:20:47 +0530 Message-Id: <20190611145135.21399-45-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Kf5GydXh; 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: , Add sdram driver to handle debug across rockchip SoCs. This would help to improve code debugging feature for sdram drivers in rockchip family, whoever wants to debug the driver should call these core debug code on their respective platform sdram drivers. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- .../include/asm/arch-rockchip/sdram_common.h | 9 +++++ drivers/ram/rockchip/Kconfig | 9 +++++ drivers/ram/rockchip/Makefile | 1 + drivers/ram/rockchip/sdram_debug.c | 34 +++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 drivers/ram/rockchip/sdram_debug.c diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index d723e6dacc..ebf4148b4d 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -122,4 +122,13 @@ size_t rockchip_sdram_size(phys_addr_t reg); /* Called by U-Boot board_init_r for Rockchip SoCs */ int dram_init(void); + +#if !defined(CONFIG_RAM_ROCKCHIP_DEBUG) +inline void sdram_print_dram_type(unsigned char dramtype) +{ +} +#else +void sdram_print_dram_type(unsigned char dramtype); +#endif /* CONFIG_RAM_ROCKCHIP_DEBUG */ + #endif diff --git a/drivers/ram/rockchip/Kconfig b/drivers/ram/rockchip/Kconfig index 995cb487b8..151ffb684d 100644 --- a/drivers/ram/rockchip/Kconfig +++ b/drivers/ram/rockchip/Kconfig @@ -7,6 +7,15 @@ config RAM_ROCKCHIP if RAM_ROCKCHIP +config RAM_ROCKCHIP_DEBUG + bool "Rockchip ram drivers debugging" + help + This enables debugging ram driver API's for the platforms + based on Rockchip SoCs. + + This is an option for developers to understand the ram drivers + initialization, configurations and etc. + config RAM_RK3399 bool "Ram driver for Rockchip RK3399" default ROCKCHIP_RK3399 diff --git a/drivers/ram/rockchip/Makefile b/drivers/ram/rockchip/Makefile index 07d4b62a9d..feb1f82d00 100644 --- a/drivers/ram/rockchip/Makefile +++ b/drivers/ram/rockchip/Makefile @@ -3,6 +3,7 @@ # Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH # +obj-$(CONFIG_RAM_ROCKCHIP_DEBUG) += sdram_debug.o obj-$(CONFIG_ROCKCHIP_RK3368) = dmc-rk3368.o obj-$(CONFIG_ROCKCHIP_RK3128) = sdram_rk3128.o obj-$(CONFIG_ROCKCHIP_RK3188) = sdram_rk3188.o diff --git a/drivers/ram/rockchip/sdram_debug.c b/drivers/ram/rockchip/sdram_debug.c new file mode 100644 index 0000000000..c13e140fa5 --- /dev/null +++ b/drivers/ram/rockchip/sdram_debug.c @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * (C) Copyright 2019 Rockchip Electronics Co., Ltd + * (C) Copyright 2019 Amarula Solutions. + * Author: Jagan Teki + */ + +#include +#include +#include + +void sdram_print_dram_type(unsigned char dramtype) +{ + switch (dramtype) { + case DDR3: + printascii("DDR3"); + break; + case DDR4: + printascii("DDR4"); + break; + case LPDDR2: + printascii("LPDDR2"); + break; + case LPDDR3: + printascii("LPDDR3"); + break; + case LPDDR4: + printascii("LPDDR4"); + break; + default: + printascii("Unknown Device"); + break; + } +} From patchwork Tue Jun 11 14:50:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 496 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 77D963F08F for ; Tue, 11 Jun 2019 16:54:55 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id d3sf6358922pgc.9 for ; Tue, 11 Jun 2019 07:54:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264894; cv=pass; d=google.com; s=arc-20160816; b=DhoEscPdgoGhFsXYqWcVy3f7OeAWUYklQzTSMBbkq7klXbD6AZEd75XZkDePLBOY83 OGUNMjrmmDOSG1isolcTYU6aINX4Evomu5LZLecMNPbwAptn3AE0OkPBdTv1NlNrU37n Claf/KSFvHhZFTtvRR6nQBf1JMdH/FNgJgCMF/bWG22QNfVmmpKsT4OgO0RGypANihVc 4RiN/3PEwDG0VADIntsXXuR/RcjIN39sTwKtKVFDZEuBBgbW4RKssPwc8ChnScjBJ8bj irgnxLaayNGhErjsciB4uoLEILWEa+ok1c57O/Rb57D/XzuI6sZoxVfoPOWN9zMjhXos jIYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0ajNIuC+Bqqxosb9VHgvMQ9iga5FOe1zL8J6w0xK5wI=; b=B5prvdEqiauUKoeLYALBD908WQ5XCOLWyMf0PGq7nhusO4EQ8V1mxBgXsJ1Q6AA7pf Tc6a8DCHJdSCN8VcfaHAU6C7UEXUnwTbkib7nRzhPQNdYPKzE+duT45z52mPiC0Zlpsr WhpZCFq1OxuiH47HLDEUu/Dy2+ZEnrHExblm3LiMRrgkiBSrE+NDCPbLoLKKYhsp6CRr b1Y5PKVRdYta+apNizpB9vtxCoshTewOL7fuW86BUek524uhnUIUy10PBF4T4KrHI4dx QhbaoBPESwY9rF4POHWopsVbXlKqkMt5XF8SMhrpKKAMgoHxbxnFjXFHmXKoqJIte4e/ is2Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ByS6AL9F; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=0ajNIuC+Bqqxosb9VHgvMQ9iga5FOe1zL8J6w0xK5wI=; b=Rpehn5T64CzrsLHpMRuhOLnoCsPmAjn8h7ZEz7k0KOnTBgBo0Q9u8jtbpj7C3KQNPj Bd7e9CuVtcpqjr9TbSktMQFInyxFfo1AWKB5xVkyhz1sqEj7AvQq1pYS61qAc2sJJYAs e/e/KB5HFkctU14Jj/ZpMA/ZWL1pNTfLbjS5w= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=0ajNIuC+Bqqxosb9VHgvMQ9iga5FOe1zL8J6w0xK5wI=; b=PD1lFY+Ss8eOZOed0B8Qyl57VsRDEhQQ3Z0YUACoZE8YIaBvP23pLv8dRvcNpPijna WzGvEZ7zMihBKPQ+eTxYbMMTckh7C7zHKRCOMfqjXwdXDrzX3F5w3tZdHigJL0m3dZ3n D6TjMNDqX8FGExhR/8peIefHjO+4Y/5oPOJGzj+CMeKuIyl5dsRoALTm7pdHlamzIdpr PZ+O0J0VNVnZWSrCK2UByp45b+LDdwwcocK7lN6NOsFrz4Sa2q0XSOd0xpt30myG3sWB 52NM/box4TPDhf3PgG/jJlNmnxt552ZQKNyJsOTRBCfrZ7E5tyBoHG2fILe97oUIPa3C 8orQ== X-Gm-Message-State: APjAAAXlTTotlRdkShgvew866Y4uF2XeEH/zG1u3Z2zImdojiDM21ycS tDneBF3Wrgfi6OMMbiw3s/uUvyBI X-Google-Smtp-Source: APXvYqx2BfxZ4aXyR7Z6NRQXv33JhVFyJrSjzQfu52gwLpQL5TN/K+DjBTK0vMfg3DSp8Sa4hmzEHQ== X-Received: by 2002:a62:2ccc:: with SMTP id s195mr17782626pfs.256.1560264894328; Tue, 11 Jun 2019 07:54:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:6849:: with SMTP id d70ls4513642pgc.7.gmail; Tue, 11 Jun 2019 07:54:54 -0700 (PDT) X-Received: by 2002:a65:5302:: with SMTP id m2mr20351809pgq.266.1560264891472; Tue, 11 Jun 2019 07:54:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264891; cv=none; d=google.com; s=arc-20160816; b=zIiaCpK8McFZ21FitxmB2fji+7oO/9JEWzctp+jCfA0/16hVBAo34yOOr+HsuMp6T0 wjRjJ7Ev+SJQPzku2wGUqM26AycE6zzSTeHSDdg6AZCUS9ax4mC1uYRYNERl761FLoIU 38jQmqizeyq/nNw0AY1xpf/JsUUw8SpOWYIt2ObEswdwn9nTNVzhfcrpRN11BO+/ddSk QyPtqJ/O8L3R/D/fqIeAiwey/DCWS6g9u7jx4TXMkXuTPeNr0ogomts4TwYbuulyviWp KAypvJrqoXPcpkG/vCRRzTmvPqiYDqkjUecaLKfq6tVdQ7HU/NU5lJSGHjFCE1nwsk8s VLkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YkuVVRMXiZIA/m7cVW93c891hOorYukwdD8YcfXRjME=; b=g4+guJY7xqgbn6QnA4nZwIOhHlgvUrfdagCiyDu5r/n/FRPAwlaNN5T9UpOfqhsUKM AFA/QXRR2hNUYkNyQa4b3iXBR7/eKkC1ORjb28XLpbKghW/XMwTXRPfZMMeJfIn1lZw/ FEEfUWxZhAEZBKMCGUu2ogFnjnik8ynz2WyumGNmHDritFyL219n2XyiPmDeGXl7xiI6 b7y31ajJ1EoquU80Dt+TV4KnmO8AoDHVbd/VnwfPXCurGTAT9S7Og33UcaWEm9YQe53c sn9P7+N/1z/0zH3xQCG1iNzo0U5ksCkmtnoXHOuoshV6dhDVZSYIsH1JIHMQsLh+Ewbw ghwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ByS6AL9F; 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 c25sor13147489pfn.55.2019.06.11.07.54.51 for (Google Transport Security); Tue, 11 Jun 2019 07:54:51 -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:921a:: with SMTP id 26mr37534014pfo.99.1560264891166; Tue, 11 Jun 2019 07:54:51 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:50 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 45/92] ram: rockchip: debug: Add sdram_print_ddr_info Date: Tue, 11 Jun 2019 20:20:48 +0530 Message-Id: <20190611145135.21399-46-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ByS6AL9F; 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: , Add sdram ddr info print support, this would help to observe the sdram base parameters. Here is sample print on LPDDR4, 50MHz channel 0 BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- .../include/asm/arch-rockchip/sdram_common.h | 7 ++++ drivers/ram/rockchip/sdram_debug.c | 40 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index ebf4148b4d..3935733871 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -127,8 +127,15 @@ int dram_init(void); inline void sdram_print_dram_type(unsigned char dramtype) { } + +inline void sdram_print_ddr_info(struct sdram_cap_info *cap_info, + struct sdram_base_params *base) +{ +} #else void sdram_print_dram_type(unsigned char dramtype); +void sdram_print_ddr_info(struct sdram_cap_info *cap_info, + struct sdram_base_params *base); #endif /* CONFIG_RAM_ROCKCHIP_DEBUG */ #endif diff --git a/drivers/ram/rockchip/sdram_debug.c b/drivers/ram/rockchip/sdram_debug.c index c13e140fa5..69a6f94a73 100644 --- a/drivers/ram/rockchip/sdram_debug.c +++ b/drivers/ram/rockchip/sdram_debug.c @@ -32,3 +32,43 @@ void sdram_print_dram_type(unsigned char dramtype) break; } } + +void sdram_print_ddr_info(struct sdram_cap_info *cap_info, + struct sdram_base_params *base) +{ + u32 bg; + + bg = (cap_info->dbw == 0) ? 2 : 1; + + sdram_print_dram_type(base->dramtype); + + printascii(", "); + printdec(base->ddr_freq); + printascii("MHz\n"); + + printascii("BW="); + printdec(8 << cap_info->bw); + + printascii(" Col="); + printdec(cap_info->col); + + printascii(" Bk="); + printdec(0x1 << cap_info->bk); + if (base->dramtype == DDR4) { + printascii(" BG="); + printdec(1 << bg); + } + + printascii(" CS0 Row="); + printdec(cap_info->cs0_row); + if (cap_info->rank > 1) { + printascii(" CS1 Row="); + printdec(cap_info->cs1_row); + } + + printascii(" CS="); + printdec(cap_info->rank); + + printascii(" Die BW="); + printdec(8 << cap_info->dbw); +} From patchwork Tue Jun 11 14:50:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 497 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0B3513F08F for ; Tue, 11 Jun 2019 16:54:57 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id x18sf9769678pfj.4 for ; Tue, 11 Jun 2019 07:54:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264895; cv=pass; d=google.com; s=arc-20160816; b=Q6kypMudfkbNJYDJb2d42SqBqT23N2MKPkhF7jzuRnsInzI8ndfAIsc+hgJwxQzrQl 1dqtAlIA2WBsFqs73SJM0dIug/zmsULjWlW7EUWph81PS5JFzxst0cCQNsChkRtVZPai CPgCpCB9G89Tj3LpbB0i2EcUKSZ2vfRTh4IK1UTzOdAbRpVJ3oD+IgPbr2XuQi4KI2Hs NRvFrU0s2U9YNN4QO0DmJ2Ef5p3rNGOYlaWkOgfMaCjUP6+WVVJdi5N+0hn3/YyaFXwL 1CADS//LiSxgB6ozLenByrII9MBIBmvtKLKwfntMTOoY9CjoTckGwgJAsKpnouURkacJ jNeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mpyBy1M4sHzD+ljCjlmfvmkVck6x13avomdxTD1rC2g=; b=izrxdzb/+HoObvYzUsLZCUOhixUlDJNYO6GSn0Rhs62ql9ooIvv6c3Dfx697WSegFI 7s0BgSiwRNrlkoCnW5Mo6plBfIS6N2NhniMlcRrSg+gPQ5wanCuO5zksHWULIUjUD5JH dfvUr/w0eiK3cDJzEvM6M/9We/FH7Dz9Jc1+hfTfJKyPQpPgAXwDTXIHGoz1Ymv3/ldu 8Sa4VuVLQT4sskakhJSq/nyWgpkX7+RACa9DlgWAxBPU1QY2C4wWXN12DV+stNLTQwfh Ey12EpzSOHioBWHvaZ+7J78xbaisnnAWT83A6pAFTaGPEtWE6hUv5e/HZP08Wc1tI6IK bc4g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=a1CevRZ8; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=mpyBy1M4sHzD+ljCjlmfvmkVck6x13avomdxTD1rC2g=; b=DwVKh20DhehN3W1HTODGj0G0YXnZc4nqGhU6fW2Tpud3b1RF+n1rp2C5jkVvjUw1TZ 5o2NxdEY7E/kkpZEJZdIBo5uCevTFpbC1zDkpbjvAj0VmMX/ZLyVMGRPTBlQD5FdAQ4A XTzuzRt0qy3h3Ar3JiYx9LK3OUYgIyJIPqfhg= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=mpyBy1M4sHzD+ljCjlmfvmkVck6x13avomdxTD1rC2g=; b=PEhlSVTYganLqHDH07ZPsEtGLlieYGemYIIsQcdEnFQkIXQ8069Ht9qBA9p6Cs3Cdc vxqU4JlTMRe5aMqb0KGJJmscRvPpaE+CKUnAe6RBbGj3F0dy5M2nx74uMpVD4/7w0RNA TBsRTrjrjWNcP9dXZfU/8HafENvp4ClexHuCFIPKH2yX9aB16pXJsRgEbFHgIwZX0tlA zWqW+zQ+pKaoCb254HUna+zrXmURiBz2nkw/UURfa/OeHnU8Vk2Tp9INTEizn9gAMuR5 e5OYvCtxnwNL4lKapyPYx+7tPK++lyE+TXFYhhKbeSqmBiNVHOGZ5m0b8kklncPADJVd Hslw== X-Gm-Message-State: APjAAAWNsUmx5iYfo3vwFQCUvZRGqNnWl+8p0OAcgGRVSPYikw6ilXI8 ZJ4dbPVsVA89sA7dwFPvTM6OYDES X-Google-Smtp-Source: APXvYqzNGbEdYdS191K9zYyeC/7Pj8B8YMtcHYaqt1hyCMa7oK/MrtDoft2n1OPmbijlgZ8LIq5ECw== X-Received: by 2002:a63:e304:: with SMTP id f4mr20521126pgh.187.1560264895706; Tue, 11 Jun 2019 07:54:55 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:2704:: with SMTP id o4ls464154pje.4.gmail; Tue, 11 Jun 2019 07:54:55 -0700 (PDT) X-Received: by 2002:a17:902:31a4:: with SMTP id x33mr47577241plb.331.1560264895331; Tue, 11 Jun 2019 07:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264895; cv=none; d=google.com; s=arc-20160816; b=Q6mSRJMcnnIHuz85248TP7jJ8WbfeyCrJ7WrUOFFprE8XW++S5RN/CCuX2/8Vpdejv z4iy0TIHxTbytgsZ7vRS4TI5NYXl4gfMqlemz3PQ8leVVzmq7q/R8hIo3gE0cUUbWYLF WyhiT5/dc8sRZ7QgTLSnFIPbpbzX85M8b6z/kt1UqeA61TyZD0vStDEbslVnLeMRugBL Biu4f4513oqpRz2bEO0JQnOE1EfEB/RSsd1u4VJqIyS20TC3BXv5EghKi0oro4TINuU8 KFkiJUnrrlUsGeZK32jhf1myhMsTIkUMf6470C1IlHC0iRwrxHgxrPWcD/AhC5Zr+Jdp Mr7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=kw/++CuXx6mQuiTZ6aAWPkhA635XZSGQPzWMsqf+2Gk=; b=NfJ4KxARf/076mmE+T1q9/xZBJ3sZupvkGYvMv22SUW6jzwBGH99QcJNZDYbOK2IhD l8LCQPMBQSC/a6SZhmpMJft3/Or/dNqE8NpQ9/SSbCrpkoNY8dCTzvk5dcScrNbjv0/j SiWbYw8tolGV01EyWxM9GOeV7GOMBqXtCju2imN6zu+Rccpe5+H5SID0b4DrpxzJpHBs mtTaaXAIBvqvFN7w0AhdsBYmeyWUAo452Z6WB/d5dh4vi5K5tumXHSusj1f80EHk1fji DBKe62XTdTNrlb6peYSp0IuRaZcBdIivkJSnfTpiobFtgL12oAHRKLXT8FFidIcbmdi7 ZkHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=a1CevRZ8; 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 b33sor11964653pgb.13.2019.06.11.07.54.55 for (Google Transport Security); Tue, 11 Jun 2019 07:54: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:a63:6c87:: with SMTP id h129mr21158099pgc.427.1560264895006; Tue, 11 Jun 2019 07:54:55 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:54 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 46/92] ram: rockchip: debug: Get the cs capacity Date: Tue, 11 Jun 2019 20:20:49 +0530 Message-Id: <20190611145135.21399-47-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=a1CevRZ8; 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: , Add code to get the channel capacity, this would help to print the capacity of specific channel. Here is sample print on LPDDR4, 50MHz channel 0 BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_debug.c | 46 +++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/drivers/ram/rockchip/sdram_debug.c b/drivers/ram/rockchip/sdram_debug.c index 69a6f94a73..19e9225c12 100644 --- a/drivers/ram/rockchip/sdram_debug.c +++ b/drivers/ram/rockchip/sdram_debug.c @@ -33,10 +33,46 @@ void sdram_print_dram_type(unsigned char dramtype) } } +/** + * cs = 0, cs0 + * cs = 1, cs1 + * cs => 2, cs0+cs1 + * note: it didn't consider about row_3_4 + */ +u64 sdram_get_cs_cap(struct sdram_cap_info *cap_info, u32 cs, u32 dram_type) +{ + u32 bg; + u64 cap[2]; + + if (dram_type == DDR4) + /* DDR4 8bit dram BG = 2(4bank groups), + * 16bit dram BG = 1 (2 bank groups) + */ + bg = (cap_info->dbw == 0) ? 2 : 1; + else + bg = 0; + + cap[0] = 1llu << (cap_info->bw + cap_info->col + + bg + cap_info->bk + cap_info->cs0_row); + + if (cap_info->rank == 2) + cap[1] = 1llu << (cap_info->bw + cap_info->col + + bg + cap_info->bk + cap_info->cs1_row); + else + cap[1] = 0; + + if (cs == 0) + return cap[0]; + else if (cs == 1) + return cap[1]; + else + return (cap[0] + cap[1]); +} + void sdram_print_ddr_info(struct sdram_cap_info *cap_info, struct sdram_base_params *base) { - u32 bg; + u32 bg, cap; bg = (cap_info->dbw == 0) ? 2 : 1; @@ -71,4 +107,12 @@ void sdram_print_ddr_info(struct sdram_cap_info *cap_info, printascii(" Die BW="); printdec(8 << cap_info->dbw); + + cap = sdram_get_cs_cap(cap_info, 3, base->dramtype); + if (cap_info->row_3_4) + cap = cap * 3 / 4; + + printascii(" Size="); + printdec(cap >> 20); + printascii("MB\n"); } From patchwork Tue Jun 11 14:50:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 498 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 91CA83F08F for ; Tue, 11 Jun 2019 16:55:00 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id b127sf9767238pfb.8 for ; Tue, 11 Jun 2019 07:55:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264899; cv=pass; d=google.com; s=arc-20160816; b=KgPaYhc60e8ZDTRMZaj5+R9kO7mjbEinnmUutblLCRcHgLQB7pNzVky7lMwWukryUW j0mBfZ5kubLgJjSPJKdgA0Rsl5aDQJRoNxQAnq0yUfQNkEJPnbAb3bz3cpatfyd1GUEo qGKK8IyJ+nD9ROLcP5mPimv249lt988LP/5f05y0L3A1Ge/Lyyy+dPm1Qew8oGeHCTGa 9KUYd9mmG1pNwBJLeXry8gAQK11URbb4NAvISp7VMB8wLNfXVVeH1SyMQPyh2YF4mN31 +WjYNFykklu0cXK5Q1wJu+7l542qDji2+m/D5ea7+4gjIKY8vmPBJz1K4BkjyfHlYnH1 V31w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ycYk2nqlaqxjeU1putVGipzyeE9xjAQGj240udr3nys=; b=BW+Ry7muBmhpKFc8HTq4ASvR6Sap7DMgEAJIdaE2qWVLv6M1YG7TJJyeb00GE/FDu0 IkgJqrk8By7J3Vx6bazxNRfdrgoPmZb3GXdiSlWw9km0bAh9j0LgvOwCcXGLLIlZBVET f8vXrm0D8NPZtnkQg+VzFsfS0hRMUPAkwk0gwI35QOtWjLzpB4aQaYeQObzEZGj+gapM uzjFxFoX8jFonTfN6ZHLws8zieDOirN4B1xKZTV3jQPnw0NUSnK9anOohFe2dJE5lcNO Kg8V4/NFgwpTev8Fj30/6vVRQjNOPbfJLp3FZwb5U3f2V49h/svaQw14zpt2b1Ta+RBj G7Nw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="UPQW2/Rr"; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ycYk2nqlaqxjeU1putVGipzyeE9xjAQGj240udr3nys=; b=FKHOOiaeTjp6VD/QQQuMSEe8PoyAGwZdxlx5zRVAQ16lIAtFrrgjHAtzCPjhiF0gey 7+Rbp1zhQKRJpcP8lRqw5XDzfJhq6dZw2m+3S89BYmaaOYDCQgPi5vBFKJ8GYdOIWVEj n7RdzuiJikRYNDu+Myd/W1rhaWtmAg3kxasxs= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=ycYk2nqlaqxjeU1putVGipzyeE9xjAQGj240udr3nys=; b=obKl3SNlbqyGVymxm5x7Cb70FtxGVPxUXtI/RXbtP6t7Nj3yRLrxUU8J0TrMVcVJzk fAtZlgFFKAZwzVz5rdWo+aVy9F8vETArcJc90niVII9kaZFgw02gYDJD7dt6Ime5POng xjTX0WEgBZYhdFCd6xHDqOdnK2jYaKz8r9hXDS27dOEdcp21Qfng3InS5jIK+Vmvo0e/ JIzvRqU0NwkMPNoOMvnjWfLILwJFEjBJmIMzAt7oYuHwz4BRW1Ls56Bs5Pzl5AcvLR+w nWC6774ZkU1UGOTe6DaOt8Kd4Cjci85Wx4x0i39UZkpSDA2YXTX1aKJONZjCvingtHSg kBfQ== X-Gm-Message-State: APjAAAWMHTDdPLxMv04W9wJgpBKWhQnUc3FgV6oSof4Z9D9w0mjpUYYv pYGVq6IsjM9brXyHXbOTBIEIC3xg X-Google-Smtp-Source: APXvYqz0AAOiOO/kuzZXsaXlls6dpnFGriwo+Br/X6uZtsOIHvO4smpORt1MLNE3fQe7EuoJHyj8NQ== X-Received: by 2002:a17:902:e306:: with SMTP id cg6mr46238224plb.341.1560264899413; Tue, 11 Jun 2019 07:54:59 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:85:: with SMTP id 127ls4501776pfa.1.gmail; Tue, 11 Jun 2019 07:54:59 -0700 (PDT) X-Received: by 2002:a63:6948:: with SMTP id e69mr9886038pgc.441.1560264898951; Tue, 11 Jun 2019 07:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264898; cv=none; d=google.com; s=arc-20160816; b=JNfz6gdkb76Czn/OuhmQBeYxbVAzQD5pTeJul6jv7l/0TciuDbze4IkEZ53x/V0ZJ7 DckzzGdYi1C9/BWXY/4ftOPD32980lRPEZlwakdCkChJu4e/7wOtc4TRXPaAawI8+6zj iK/WxygxAcnK4QGdSbAaYM00MXZ1ZxNhM9/2X3oYq2DKw4guntUclqhOg2sOhyDkJ1gC lIgLwFY/69LmPV9AWLNQ3wqJcNOlv0lxHKw4tt2zCEFzk8fMX4H/osmNJ6Amgk9R6sFt Fm3RJ9OWi6LiVKne/pfIDg9I6/yLFN8AvUMcbqKEYthKdxSfzpZSW4DEi0uXrGJX8UhU AYaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=91d3Q/abSo/d7WjJEcuCr0VuZ8ECJ4wV6RZKeJL/eXg=; b=LQ1dG+T4BXeVUq60IIEZA8KTPtpqjxMqEAV2iqIVB2ha8Of2KhhULPYqUp7aurBgMn j4HFAyUW4zg62L8OyyCOb4YiHl4gzoGAP+goU2W/FHp0AXlyAUywUjM/qkJePAwKBMRg 0v1wDGJKuDboMLbj+keY2smf78qQ6YSLoP+1pLBZ+8hVkkHdo20H0+Jb1rC7gx3rhLZ1 32RuCOxz02tDFcxPjVKq3XtA5FrvFsEc5rE1NHQNtruOhesUnB81+e4z7nplwJasVNNH GuBKfJVyR1BD8Z8x7z0inlfyRUSGxxEXhC2/NC8RSNsFdamYTLB2zLOMDlPOX/aJ79uQ mjUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="UPQW2/Rr"; 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 f32sor2030962pje.11.2019.06.11.07.54.58 for (Google Transport Security); Tue, 11 Jun 2019 07:54:58 -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:a17:90a:1706:: with SMTP id z6mr26420430pjd.108.1560264898607; Tue, 11 Jun 2019 07:54:58 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54:58 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 47/92] ram: rk3399: debug: Add sdram_print_stride Date: Tue, 11 Jun 2019 20:20:50 +0530 Message-Id: <20190611145135.21399-48-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="UPQW2/Rr"; 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: , Add code to print the channel stride, this would help to print the stride of associated channel. Here is sample print on LPDDR4, 50MHz. 256B stride Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- .../include/asm/arch-rockchip/sdram_common.h | 5 ++++ drivers/ram/rockchip/sdram_debug.c | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 3935733871..69cafda904 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -132,10 +132,15 @@ inline void sdram_print_ddr_info(struct sdram_cap_info *cap_info, struct sdram_base_params *base) { } + +inline void sdram_print_stride(unsigned int stride) +{ +} #else void sdram_print_dram_type(unsigned char dramtype); void sdram_print_ddr_info(struct sdram_cap_info *cap_info, struct sdram_base_params *base); +void sdram_print_stride(unsigned int stride); #endif /* CONFIG_RAM_ROCKCHIP_DEBUG */ #endif diff --git a/drivers/ram/rockchip/sdram_debug.c b/drivers/ram/rockchip/sdram_debug.c index 19e9225c12..9cf662675b 100644 --- a/drivers/ram/rockchip/sdram_debug.c +++ b/drivers/ram/rockchip/sdram_debug.c @@ -116,3 +116,32 @@ void sdram_print_ddr_info(struct sdram_cap_info *cap_info, printdec(cap >> 20); printascii("MB\n"); } + +void sdram_print_stride(unsigned int stride) +{ + switch (stride) { + case 0xc: + printf("128B stride\n"); + break; + case 5: + case 9: + case 0xd: + case 0x11: + case 0x19: + printf("256B stride\n"); + break; + case 0xa: + case 0xe: + case 0x12: + printf("512B stride\n"); + break; + case 0xf: + printf("4K stride\n"); + break; + case 0x1f: + printf("32MB + 256B stride\n"); + break; + default: + printf("no stride\n"); + } +} From patchwork Tue Jun 11 14:50:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 499 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 080C23F08F for ; Tue, 11 Jun 2019 16:55:05 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id u10sf7888653plq.21 for ; Tue, 11 Jun 2019 07:55:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264903; cv=pass; d=google.com; s=arc-20160816; b=rSkLF2Cs72uvke/OlOxs3X8b5+Zal/2v3i/zWyGSQP6Twf6zfScCW+lPJv3gJzKp5h 6Mr4wQnNmQkuvmh/8BafVWV8FgbSDNCwekv8Jyrwi7ohmg+ef+DycuyGJIksXS2rEbcd 1Vc0NB4bMxBMLtapRJr+j9jkDyA1ZIeDv8JyA3aCDoYiqUTzAfNOwMaNLnUZCYe1MTLg UL30Kz5oizRLpAbsXwICeBkSt06xC5OqOCtc6g4bCxjKxPREwuSf7T25901faE3EuLax YtX30FjNKHez/0NyXZ/cH0K5Y2isVk5QTMDUkAflAwOUWO6o1a3Oq6hv2HVS6/RR4/Y6 xtRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=BDmllI42H9B0AHGd0syD2JrjTAcp+VSru8gcs2qj4Ko=; b=a16RsvIPOxzGBH4MzRVeGwh7hTnlcEDNbtb5EKrcV6l8ThPAkgI95+KNK3zQQrDrfr vBPlkZvELEmZl159PT889KXLVH7Sj/d+2PFIJt/tuqfFs/GF5z0We/w1E5lBBZlwoZfW tUdwTv40Zp9WzkBTYECIkRs0ms5DdP/KWJLeINpj+nK66PdQqWl0hBs5NXOruQkhevuP YStuR4IlGZ5zhtYwNyzNmhyYU1ccj6OIIcex0KJM9cItyKvewVew8l/Yf5T/P8xZ8J6J zlCop/2ImeOFJcZmy+3bnhfcUwu7/QfuYcVCtkZGkOBBsheFA4G82Gbma/pxVBvFvojT nfFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WnwtPCWu; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=BDmllI42H9B0AHGd0syD2JrjTAcp+VSru8gcs2qj4Ko=; b=Ly8eCJhkvn+WLCR7HvwTPFDyQZG/78oENmVmqdSx0VSa3uduE/+TXhjeSNUwPp6UiO Kn2tld9yem/7Y463iRGgn1rE88XYh0+gsEnx9DYYouE9FvAf/lU3bJrsV3bjtxzsrezZ 5WoX0krDm68Yc4ET5DFkbfdS4LzeznlpL75dE= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=BDmllI42H9B0AHGd0syD2JrjTAcp+VSru8gcs2qj4Ko=; b=m/BLYD0gOZEaj4N38c4uQZ45rCdrZPgS1wy7dKXPgCeYA9Dz5X0k2cnGbxBo04v92I oNiwJwhfwPo3GyCXA5VEynZrfzTtmoR7qc2mCHjrRRM3Wjfsx7w+fCWgXpY5FB0giCIc DKKUns1m/Zo8I+P9Sh4qO5NcFC0ZFGjhRPwEIcuRt/EbxgJnaLYBIJNCdW6JyEjsWan4 5TAWO48F5P1gjShae+CjEKCnLUYtH0u3Rt2+cZSxzro5i30bl3rhT5NwhaYIAfXpTg9f 1UsQNNt5XWig7SGaMPrqxLXW4RFma2GUp0vf7kTfEPEXUZ9tAqwOYy3xEzrDI2SwvJal 6P0A== X-Gm-Message-State: APjAAAW7PIp0Nj+1Nixo6mgO3ji3QwmSjNgRJIt2SyL6WvAOEYQ/83Hj Gpw2ubh2YHaaCoSp+O2xoO3RrdUN X-Google-Smtp-Source: APXvYqwGVyZjSqipwynjnBW5CX+Xlt/FoBOWFO3XhhWOb1WyTDOJRKbjPrJ8czJIvYW1JJv0V+rYIg== X-Received: by 2002:a63:2b92:: with SMTP id r140mr20933318pgr.363.1560264903752; Tue, 11 Jun 2019 07:55:03 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b605:: with SMTP id b5ls4895449pls.12.gmail; Tue, 11 Jun 2019 07:55:03 -0700 (PDT) X-Received: by 2002:a17:902:824:: with SMTP id 33mr78629220plk.29.1560264903412; Tue, 11 Jun 2019 07:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264903; cv=none; d=google.com; s=arc-20160816; b=REfokgp1db2ZXRVW7QS8j5eRldL/txS2nQ/MDmBgfFAa3fVdGK5NNpi/myZzHlZ0/o 5aWR75DzKhETLLjzWFlUxAYqiOF5q2J28FC+m8m2sqBHNEv2IK4j0qM+EtZ0bYih0jMC FJofpIqZm+ZDKhVUSEDhAwoChRbEe1rK52wm68+zkebdWL6OOD3MzbhDFnIvkPc6fqNY ehAGQQByqQcFlUMn2anCKuIjJMc6ttYr5IomNZPWYKgFXVq4bLyOk4mA5TTpRp5p6JiY uF3j1hFyjsqiVUbduh8qS1ALHyBywuba/sPGHcMtazzdWJmleTu7iU7jdRbL6ku6SrUZ Xf5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=q9WmmKSiG6PRsHUFUAVRH5Oq8xmXKYOkeIJI7ZtLjSw=; b=hSWJ03j0L38h6eIfovlQ7epwSLrxCVjUjn0v46Fpabhx1eunqKM6B4HIbATTviTJXB N5dOFggAJu4OjWYsmoz8iQzyptS9A6sq0L6WQyfMGnA419AMD5u3iKteQ676ZqD9n3ea EWWFrSpZhTyAtvAKDaPmClDLMfJgwWK3b0AiV8alRze8mpUj1y13/Kd+uuTt2G5tI+m4 Bi9yoLu4N3X24gZH+f0ji8k9tkhWyMdpw01tq1qmUQmahkOlekdwSQW9ONdWCUHt8U8J zSGncGPGyQA6lN3t4LUOV2NfJrogTDX2RvB0Ow5etsITVeJ6IQbktyMldjjgddCSHO/Z LPhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WnwtPCWu; 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 z1sor3178067pjn.1.2019.06.11.07.55.03 for (Google Transport Security); Tue, 11 Jun 2019 07:55:03 -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:a17:90a:2430:: with SMTP id h45mr28194841pje.14.1560264903013; Tue, 11 Jun 2019 07:55:03 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:02 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 48/92] ram: rk3399: Compute stride for 2 channels Date: Tue, 11 Jun 2019 20:20:51 +0530 Message-Id: <20190611145135.21399-49-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WnwtPCWu; 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: , stride value from sdram timings can be computed dynamically based on the determined capacity for the given channel. Right now these stride values are taken as part of sdram timings via dtsi, but it possible to use same timings dtsi for given frequency even though the configured board sdram do support single channel with different size by dynamically detect the stride value. Example, NanoPi NEO4 do have DDR3-1866, but with single channel and 1GB size with dynamic stride detection it is possible to use existing rk3399-sdram-ddr3-1866.dtsi whose stride, number of channels and capacity it support is d efferent. So, add initial support to calculate the stride value for 2 channels sdram, which is available by default on existing boards. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 72 ++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 1acf9efe9c..5985c37f08 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1185,8 +1185,76 @@ static int switch_to_phy_index1(struct dram_info *dram, return 0; } +static unsigned char calculate_stride(struct rk3399_sdram_params *sdram_params) +{ + unsigned int stride = sdram_params->base.stride; + unsigned int channel, chinfo = 0; + unsigned int ch_cap[2] = {0, 0}; + u64 cap; + + for (channel = 0; channel < 2; channel++) { + unsigned int cs0_cap = 0; + unsigned int cs1_cap = 0; + struct sdram_cap_info *cap_info = + &sdram_params->ch[channel].cap_info; + + if (cap_info->col == 0) + continue; + + cs0_cap = (1 << (cap_info->cs0_row + cap_info->col + + cap_info->bk + cap_info->bw - 20)); + if (cap_info->rank > 1) + cs1_cap = cs0_cap >> (cap_info->cs0_row + - cap_info->cs1_row); + if (cap_info->row_3_4) { + cs0_cap = cs0_cap * 3 / 4; + cs1_cap = cs1_cap * 3 / 4; + } + ch_cap[channel] = cs0_cap + cs1_cap; + chinfo |= 1 << channel; + } + + /* stride calculation for 2 channels, default gstride type is 256B */ + if (ch_cap[0] == ch_cap[1]) { + cap = ch_cap[0] + ch_cap[1]; + switch (cap) { + /* 512MB */ + case 512: + stride = 0; + break; + /* 1GB */ + case 1024: + stride = 0x5; + break; + /* + * 768MB + 768MB same as total 2GB memory + * useful space: 0-768MB 1GB-1792MB + */ + case 1536: + /* 2GB */ + case 2048: + stride = 0x9; + break; + /* 1536MB + 1536MB */ + case 3072: + stride = 0x11; + break; + /* 4GB */ + case 4096: + stride = 0xD; + break; + default: + printf("%s: Unable to calculate stride for ", __func__); + print_size((cap * (1 << 20)), " capacity\n"); + break; + } + } + + return stride; +} + static int sdram_init(struct dram_info *dram, - const struct rk3399_sdram_params *sdram_params) + struct rk3399_sdram_params *sdram_params) { unsigned char dramtype = sdram_params->base.dramtype; unsigned int ddr_freq = sdram_params->base.ddr_freq; @@ -1235,6 +1303,8 @@ static int sdram_init(struct dram_info *dram, set_ddrconfig(chan, sdram_params, channel, sdram_params->ch[channel].cap_info.ddrconfig); } + + sdram_params->base.stride = calculate_stride(sdram_params); dram_all_config(dram, sdram_params); switch_to_phy_index1(dram, sdram_params); From patchwork Tue Jun 11 14:50:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 500 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B287B3F08F for ; Tue, 11 Jun 2019 16:55:08 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id x9sf9758146pfm.16 for ; Tue, 11 Jun 2019 07:55:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264907; cv=pass; d=google.com; s=arc-20160816; b=otwuuPeV9mFSfwoMfwFyZYOK5mz22+bXBtAt0jgNe8Ddf5zrobZ9dOdXlDnPkSWWYy S779GK+ceVFHFPYfNhJVWxdHs5oDMUtq9ruBF84GouGWsIMH5HaPjuqmVAOnjrxOxX5f L95Yasg5bb8rjDiSDerVoBn/VIfxThltq7+hQ8nyiNFk+nIgOFBQxsFeXnR3tJRP55nh BJwZ6z3q5sFEGg6b/5VC0ZTxg3Isl9hcYH1Ly88w8h5BfRK94x3aoQdo0T+hvCBrg/y9 Q6TTjQLk8PeeRTedSODCAbmUWg4VoSjb6/vJOj6EOTywlO46dnvp9zkYemNUk71Jz7Q0 p5eQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=gZ+j+BnSM0MCJYwFLJsmYJg9rgNDSaeBnGeWkQllyFQ=; b=I5Gtqwkl0szXZLKmgqoCz7YzM95K3sgFQGFnCqqLwJWWYIV7lN+RJApS9EEgF1lmhQ iDSVht7xeRNA4v1+VJl1fbAiaCW0p5zS/H5iqosXj44Q+HrMkUoUI2mrm7IlfgRV7e2Q F8iqGmKGkcJO2h/REmFRupLL6BW4RRv/Li5/e5GbcDYQ1L9DqF94Xntqlz6T6aWH1sVa 4m+oGkNOBa1X0mXr2d9j6lpmOwllcHGDd/y0D0wVp7YcKP8Gw1u9gvv9kmUwh3dpPF7D vWTxLinMDNT7z7YeaeN2Y5oY1I6yWl5ZsjjubkBad5+i3zCZEF/PuIEi/Hwk4gMxtuw9 9pNQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lOvDBu75; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=gZ+j+BnSM0MCJYwFLJsmYJg9rgNDSaeBnGeWkQllyFQ=; b=dYd+mVBLBwWvchkIXothNkaM6ruK78NdgyUJCDUDQ1JFy/ny6Fdsctq0Lyo4Uq8fdt ecLvhYh8stgf9y0kBQNd78DAM1KMuiH3PhJ/STyN7cjYiGfftLZuMvhU7FI+qx1vlXSY Unc971Hx+q2U6l5VQsxsaDyxwD9RkoguOOCyo= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=gZ+j+BnSM0MCJYwFLJsmYJg9rgNDSaeBnGeWkQllyFQ=; b=dng8zCyh1sAPFgrYF3MAzLINgMpFaIesJEKERjwEhcbXGkR3+3Dk/BPrSOuWyhLvow W1xozkleArKsAgUTQy8/NRef4/m8LGOXAlJcCnwY4EWcGpw6NscPrSONAn3wnFxJMfWz ZKiQnEIZquP3hlUzsYAqs4M9WuCedveUQLzGBn/L7pj0gd/eucivfM9RkjdRF2UxtwWx hRELm5Lh3tAbJ0MGEngisXKTv/QYsPmgtGmYzkLzfDS3ZE0Y5X4Gc57Ea48a3LNU7sin yEfpdl22KMCrFEXTj7/E/Ckjbi3LwT1wajjvYpwsIHWzDNM5TF5R81np4mpGUZmbmI7s 5e7A== X-Gm-Message-State: APjAAAUgVGbrWeoU2KRxUlFp5gM2vnCXwtPDWcdt+a6vE90sUv1eXesW 9H05aH7SDZ6GMaFaSFb1SzQuKf7W X-Google-Smtp-Source: APXvYqxnSYJJCFaWrViOvmDIlNuBFE1EhQQLu20rv5fr4MeUZmr3O6rbImFF26xfGPfugNTLJt5jww== X-Received: by 2002:a62:7a8a:: with SMTP id v132mr57827392pfc.103.1560264907546; Tue, 11 Jun 2019 07:55:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:28ca:: with SMTP id o193ls4496290pfo.10.gmail; Tue, 11 Jun 2019 07:55:07 -0700 (PDT) X-Received: by 2002:a63:6ec6:: with SMTP id j189mr15504739pgc.168.1560264907124; Tue, 11 Jun 2019 07:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264907; cv=none; d=google.com; s=arc-20160816; b=qp02A7XbUgeFQ48fgMWt/TUEbd4DVAUSWwrCXRlYNkGdYk2x6FV6hUBXx3zZRzm53p T1rXI/woL9nEIqwkpMgZJGP8UAvJFKcooDp0rF6T/klCNSX0jfskgTvIKzP3K4t2G3Aq Eyl88qhh/amEjDFLyHdxdaCUJAEcNALBNUYG2i5Fdz3qh7ieQl2tLqQuJRL33q3XAR7I Ltnpj15LTW+l4JREoDd1cOIjdpce325+9kHb5WR9I48d3hn4Lz1ndVCewckWRSiwEWwd Q9UMzcrX063ZUdqN490BD+XV8GAqZFZ9KeqogaLXtsNE+fArFh1NSraZ9JI5IFltNVg+ y/+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=p/nbMHgZZiiLRgXry1m/sPwN8GCBFLgdUWXWzFtklvg=; b=0MBVuYonKvMcNTqatS1WmxleHyBgyuXouo3aHG9XAJZaGs/RA2VG9SQnLJNvhvXj3y 5XMLSYeUKgrju5A6GzidTsWPOWu5/+UVM3K881ctlH5SFgTqFabyfrRX73QhIj0WpRue OGq+Hhz01y/x0n3QvXPhbKmTdZNHEg+x5XwSrTmRf6zakvW1fqtq47k3+IAW3C77wA6o JUhv1biiZMfFS8cq7g2uG5kS7YXdtJ+hg48o3QleOubpxWQzScEhdkAf0A5AjE1LjQIz S1THQcUk4pcYocxpOrCZnlb0ooHgSIi2TWFjIBj/Cx8Gfsevmax2S1RNw9i3BCFQ/c+6 nTtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lOvDBu75; 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 s13sor13106375pfm.59.2019.06.11.07.55.07 for (Google Transport Security); Tue, 11 Jun 2019 07:55:07 -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:a63:c903:: with SMTP id o3mr9224659pgg.295.1560264906761; Tue, 11 Jun 2019 07:55:06 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:06 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 49/92] ram: rk3399: Compute stride for 1 channel a Date: Tue, 11 Jun 2019 20:20:52 +0530 Message-Id: <20190611145135.21399-50-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lOvDBu75; 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: , Add stride computation for the sdram which support single channel a This configuration available in NanoPi NEO4 and the same can work with existing rk3399-sdram-ddr3-1866.dtsi Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 5985c37f08..033b2730a6 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1214,6 +1214,10 @@ static unsigned char calculate_stride(struct rk3399_sdram_params *sdram_params) chinfo |= 1 << channel; } + /* stride calculation for 1 channel */ + if (sdram_params->base.num_channels == 1 && chinfo & 1) + return 0x17; /* channel a */ + /* stride calculation for 2 channels, default gstride type is 256B */ if (ch_cap[0] == ch_cap[1]) { cap = ch_cap[0] + ch_cap[1]; From patchwork Tue Jun 11 14:50:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 501 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AB8AB3F08F for ; Tue, 11 Jun 2019 16:55:12 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id y5sf9745833pfb.20 for ; Tue, 11 Jun 2019 07:55:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264911; cv=pass; d=google.com; s=arc-20160816; b=hhBwLuNhcBZEDy7K4ptaoSqpH9Ln71ZMC7ZAeBPJ+DXlAfBPIjgOKpl/SkWvjLKmq5 ABS+YfG309bfrTc9pwysz9pZyz4EalNUFOn8RR1lvguKCMMq3fkawwCZyC3QSYN485jM Z3bHIXHq8nl3O+JEuCxN3GMiq4L/z1Ur55H6VFEzog1CBKBkjeQ1lEct2IQJQv75jGzb XWLR9Crf1mHfjLC8apOBd4K8hHjlDamNBon+dgqLYEQ4ly9pim0fYfq8341yBU1nkXmB k6vXqTOwDL5VkNISl6S0ba2zivc7fEoc0pwn2SJBrQ03xIC/Tf9tSz7oaX8GjciVm4ut yjUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=omod/d1hS1qTSBGjunXepUw0t+uAkVhXn4MypilFja4=; b=vKqnNxlylTTwfOZie1BzdpELXUpR1X02macDT9hNUzLG37C26fC2JI38p/k8E5Uf7i yIHV1/qNaO4f2rGAgG+KexPmnNkdwzaYKOIuDSRM49HtkOozYw1RawhIUQcNY82zVsPR QYSKtgOShbTRO50nNhqaExhlxuluwkIxfY4qIQiRaRmbxytQcBWu+CkFZZs12LjSVKzK w1tXCK7IiEvU5gKP7aoDw1YcCj9oDXmjH3sF65JL8YKtkcG2RQhFMq1SQEgJANkxhkfJ jsb91z0/wBb6cINfG8+40lgLPYW+8n3KHd88AXFnY85x6riNJ1WZSWrgY/6hmBq+BGsZ T3/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j5VRfK3i; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=omod/d1hS1qTSBGjunXepUw0t+uAkVhXn4MypilFja4=; b=LVuXT8gy/hgaIXzO+Rg6dxjUJrEchjcnKaGHGbmjd0PswvIUDSS1euzrsg47wG5ImM GpVl2QMcyK4WBsssjMkALiarviseAdZZeh6gASDko7lnaTZr0nAlRqL2Qgord/eKXAhC dL7FlMevn5Ht/w1X9MuXWQ+zSKxALS0mG8WNg= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=omod/d1hS1qTSBGjunXepUw0t+uAkVhXn4MypilFja4=; b=P9wqO+D3Czdf+S+UDuI54bpPXeqWeYkcvxZPIl+i0URrjpUqvAKpNZ1AAaNdO769Ok X4Wm5B5v1kFlUyyVrurXMrG80i+NaIT/KUOOt5faQsesz/8bwEquY1H9/ASkQq/XwPe7 L2fJqZGwjPvw6+M8Wy7S12uqFL40xq1/8VFmj1VXumLmlGSm7dTpJTrdTkVhQ+/+GFLY fOdb4RRJSQ8i0a0d1UeTbuynYaGsUfElWT+vISAsa0QYKXc/t38E0qeYrp+HMd4CVUeN LkraN23PZOljH7QRWDr2ZoshInYxtfHiZMaW2WD/eH8jm8wOrngwg3TnKPZ/9JR10gMA 5aEg== X-Gm-Message-State: APjAAAXCFqbKYsIA0iccrl1LOXQhT+22PunlGFlLG/7TEFoiD9svE4sg VciLoC0Az4PYhKWnCqoqQGVGurIx X-Google-Smtp-Source: APXvYqx2+QG1ZmUJeDh5DZQcdALEeCNS9NTH9TvXCKNDwR11Xa11xXjE503L2jeehrn185zDU0cpMA== X-Received: by 2002:a17:902:860c:: with SMTP id f12mr76701256plo.127.1560264911445; Tue, 11 Jun 2019 07:55:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:5041:: with SMTP id k1ls4510009pgo.16.gmail; Tue, 11 Jun 2019 07:55:11 -0700 (PDT) X-Received: by 2002:a65:64d5:: with SMTP id t21mr21128980pgv.310.1560264910948; Tue, 11 Jun 2019 07:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264910; cv=none; d=google.com; s=arc-20160816; b=dGevIGJffpV+iPSXqyI3IsmtNlMjYUCB5yXNBdVtBKLu/jrwRW3egq4FLlh/nEYUtV xBq/bygX0NGvjr5gu9/Vj8FzFKBlaOa0SJ9OC6sIV+XvpP2z6BzbSOfDjUvNGy5NnIMj KqrcrPICTSxGzOblnZ5zt+04gMIiopoqu8OpQIftBov0N1eZ0rKrIJTnpsjSx+zZ2pW8 9ap2IbHo8H3D/3QLIJuDQODpkoJxjaX88qEoDoGHL0z0qqILsR8nmnboj1d6wQEJZg1S sGIvAF316xoPNymnS+8Kx3nXtEW5NHd+7O/7y6AmG6NSQCdsDOBOhYfG1llNeqdxorra RtOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YWFY8OB8qH64wLMK+dtpSQ0QVPAol0EQVIgUSITRXPQ=; b=WQzdIWkn7R2OrY5dQVnefDy+OooowmzldhBoDqcsYYsksSI4gAUOENhm7KsdJeuoV/ BcnZKLlJClGViWXunX0sh4RWIEGfUYxE5Mu0he4dKnbWcDYXHHxMT2nT7yYpu4jRQFXV J4VcWvhoCMctbWdsbq9ZnA0jVrY9Sfyq6b7ooy+tLTEsanv3nertrBThFPWOD3K5V52v SC3wbvJ+7HkDNXxx0CHN/wv/b/xUbU67WlGSVETyaqQKe9clpWrdUkdlm0q/6xzJJSZR kWC1MsKw5vwxDG7v4biO55t29lSaHW+58NwRLOEG/JqiRBPx9YZfDcJyRFPokMuL3tKL ioeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j5VRfK3i; 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 m129sor13245430pfb.2.2019.06.11.07.55.10 for (Google Transport Security); Tue, 11 Jun 2019 07:55:10 -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:8219:: with SMTP id k25mr83108651pfi.38.1560264910594; Tue, 11 Jun 2019 07:55:10 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:10 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 50/92] ram: rk3399: Add rank detection support Date: Tue, 11 Jun 2019 20:20:53 +0530 Message-Id: <20190611145135.21399-51-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j5VRfK3i; 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: , Right now the rk3399 sdram driver assume that the board has configured with 2 channels, so any possibility to enable single channel on the same driver will encounter channel #1 data training failure. Log: U-Boot TPL board init sdram_init: data training failed rk3399_dmc_init DRAM init failed -5 So, add an algorithm that can capable to compute the active or configured rank with associated channel like a) do rank loop to compute the active rank, with associated channel numbers b) then, succeed the data training only for configured channel c) preserve the rank for given channel d) do channel loop for setting the active channel e) if given rank is zero or inactive on the specific channel, clear the timings for the associated channel f) finally, return error if number of channels is zero Tested in NanoPI-NEO4 since it support single channel sdram configuration. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 112 +++++++++++++++++++++------- 1 file changed, 87 insertions(+), 25 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 033b2730a6..b658d7d1ab 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1257,13 +1257,52 @@ static unsigned char calculate_stride(struct rk3399_sdram_params *sdram_params) return stride; } +static void clear_channel_params(struct rk3399_sdram_params *params, u8 channel) +{ + params->ch[channel].cap_info.rank = 0; + params->ch[channel].cap_info.col = 0; + params->ch[channel].cap_info.bk = 0; + params->ch[channel].cap_info.bw = 32; + params->ch[channel].cap_info.dbw = 32; + params->ch[channel].cap_info.row_3_4 = 0; + params->ch[channel].cap_info.cs0_row = 0; + params->ch[channel].cap_info.cs1_row = 0; + params->ch[channel].cap_info.ddrconfig = 0; +} + +static int pctl_init(struct dram_info *dram, struct rk3399_sdram_params *params) +{ + int channel; + int ret; + + for (channel = 0; channel < 2; channel++) { + const struct chan_info *chan = &dram->chan[channel]; + struct rk3399_cru *cru = dram->cru; + struct rk3399_ddr_publ_regs *publ = chan->publ; + + phy_pctrl_reset(cru, channel); + phy_dll_bypass_set(publ, params->base.ddr_freq); + + ret = pctl_cfg(dram, chan, channel, params); + if (ret < 0) { + printf("%s: pctl config failed\n", __func__); + return ret; + } + + /* start to trigger initialization */ + pctl_start(dram, params, channel); + } + + return 0; +} + static int sdram_init(struct dram_info *dram, struct rk3399_sdram_params *sdram_params) { unsigned char dramtype = sdram_params->base.dramtype; unsigned int ddr_freq = sdram_params->base.ddr_freq; - struct rk3399_cru *cru = dram->cru; - int channel; + u32 training_flag = PI_READ_GATE_TRAINING; + int channel, ch, rank; int ret; debug("Starting SDRAM initialization...\n"); @@ -1275,37 +1314,60 @@ static int sdram_init(struct dram_info *dram, return -E2BIG; } - for (channel = 0; channel < 2; channel++) { - const struct chan_info *chan = &dram->chan[channel]; - struct rk3399_ddr_publ_regs *publ = chan->publ; + for (ch = 0; ch < 2; ch++) { + sdram_params->ch[ch].cap_info.rank = 2; + for (rank = 2; rank != 0; rank--) { + ret = pctl_init(dram, sdram_params); + if (ret < 0) { + printf("%s: pctl init failed\n", __func__); + return ret; + } - phy_pctrl_reset(cru, channel); - phy_dll_bypass_set(publ, ddr_freq); + /* LPDDR2/LPDDR3 need to wait DAI complete, max 10us */ + if (dramtype == LPDDR3) + udelay(10); - if (channel >= sdram_params->base.num_channels) - continue; + sdram_params->ch[ch].cap_info.rank = rank; - ret = pctl_cfg(dram, chan, channel, sdram_params); - if (ret < 0) { - printf("%s: pctl config failed\n", __func__); - return ret; - } + /* + * LPDDR3 CA training msut be trigger before + * other training. + * DDR3 is not have CA training. + */ + if (sdram_params->base.dramtype == LPDDR3) + training_flag |= PI_CA_TRAINING; - /* start to trigger initialization */ - pctl_start(dram, sdram_params, channel); + if (!(data_training(&dram->chan[ch], ch, + sdram_params, training_flag))) + break; + } + /* Computed rank with associated channel number */ + sdram_params->ch[ch].cap_info.rank = rank; + } - /* LPDDR2/LPDDR3 need to wait DAI complete, max 10us */ - if (dramtype == LPDDR3) - udelay(10); + sdram_params->base.num_channels = 0; + for (channel = 0; channel < 2; channel++) { + const struct chan_info *chan = &dram->chan[channel]; + struct sdram_cap_info *cap_info = + &sdram_params->ch[channel].cap_info; - if (data_training(chan, channel, - sdram_params, PI_FULL_TRAINING)) { - printf("%s: data training failed\n", __func__); - return -EIO; + if (cap_info->rank == 0) { + clear_channel_params(sdram_params, channel); + continue; + } else { + sdram_params->base.num_channels++; } - set_ddrconfig(chan, sdram_params, channel, - sdram_params->ch[channel].cap_info.ddrconfig); + debug("Channel "); + debug(channel ? "1: " : "0: "); + + set_ddrconfig(chan, sdram_params, channel, cap_info->ddrconfig); + } + + if (sdram_params->base.num_channels == 0) { + printf("%s: ", __func__); + printf(" - %dMHz failed!\n", sdram_params->base.ddr_freq); + return -EINVAL; } sdram_params->base.stride = calculate_stride(sdram_params); From patchwork Tue Jun 11 14:50:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 502 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 74B363F08F for ; Tue, 11 Jun 2019 16:55:16 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id q6sf7885752pll.22 for ; Tue, 11 Jun 2019 07:55:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264915; cv=pass; d=google.com; s=arc-20160816; b=vLvTcxJRmD80jYXwaVG+7sa4wUMZ6h87BFGQsGYQNDV1CbNT+5q/y+Xhegtq2Ft7yg 78U8fhPbnjQZl7vzlGFFYZHrCZjxI46dEqD8hEjZVkEmVgVS6NM/1Av3PtERH9UuRW/n VMoogohqXLatn2K6ewrb9DsKvrlWJ6vRDPdvO6fGshPX3/5BZDV0lvr8+OnehQ0VIGZ7 SdmmVuaDZORoNyBhfRHML8D2qefjYxVMTFckWM3RLYvqoST2oJOqerUSyuDIp8jzp/SJ aluqHSVOT/6vj3WTq7yIbqW/X+TKjV0Ka5Q3V47DqUbkx+Nv4x92S8akuNvBc8D4teiA 5ztA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0vQHU1IENOEzES80AebY+b6k02BOSvUZGAebfGUby9o=; b=nkrJHKpkHCpe+pcDP7N2i5KXOC1brm4Ld1XLwSolOAFrPKtBfLFNzIZjaaw9TR3fqn ekP1l8p5C7oHhbopnbH+67dgypHmZfjcira1x0N15RTwlbeBrY5KD0EFWIVFCn7C5Il2 3LXreQRaSee/7QN2Hx5ilWYFwz5FSPZpRVg7mQpLQNHQGxo0VBDytamzv1VHQT+tUhiw xfqG5RwUzw8/k1TZ+AWeB4XP2XU5pR06r21b26GHhfI9OTcMExvJfmS9p5fIaNdDLQvc JRpbiXcNpYXnuZg2a6gAo0S9sdrNEqoSrI259OVz3LPaM0pZYmO72XU4TUxuzN4PqGHH UhWw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Q0cM60yQ; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=0vQHU1IENOEzES80AebY+b6k02BOSvUZGAebfGUby9o=; b=g0O2QuDb2uVW60Vdy244Z+nvf0X5lOJ3MOdnlTuCJHETAtYq2Une0MSit0UwuLvsv7 dgvS6J5DmjxprCuWguLnpNpZvKa5MIzRzSGadUJcCJXYxqHuVNAAtgtESSlxf/s20zuh o6V3jcax6zlSWTOOKrvB+qc0JEge2o9ebBEc4= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=0vQHU1IENOEzES80AebY+b6k02BOSvUZGAebfGUby9o=; b=g0PLxGfMMfMkYVGibz/8GZ1B3nhqBgPLt2/6RQhNpUT7Qy+s75zbW+Vzp1O+FUs/sC Uu3zx5W55i8LBjVyQL653NnrzOL0ndDz9WhURPvmifUsWU0sDL59IorX8DQzixe1Vh3d 5WVjk/5u2lXnfY5ikysuDQk3FYCXQibjJOSIawtcF3rAtMaAXoaiO2z3i3EKU52p8wSq HdYRPHFyxYQvQYKhzBcVSJsWQS8hKDO+YALnnWX8kwXwe+S0Uf1p+tyrd806jm6jkVT/ 7UIWdLYcRWU5pI6x066KZ67kKtg/PEdmyEswBBJwCMRuU47lzEkTsuoPKv68syh2LF1D r55w== X-Gm-Message-State: APjAAAXZ12+NKyM5E+dcmil1cIyN4KOhCMoNiU55jZzckvX9hkPvUBak 8frecePnAng3P/jaLNSg02Pk4UHO X-Google-Smtp-Source: APXvYqzRAZxFyMx5mh/5FV4grT8wD1kJOOFgRxxNto2CMUuMzeZwr7XdoFQ165AtsWJ7iisvxWBPLw== X-Received: by 2002:a63:e70c:: with SMTP id b12mr12395379pgi.242.1560264915188; Tue, 11 Jun 2019 07:55:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bd8b:: with SMTP id q11ls2688808pls.4.gmail; Tue, 11 Jun 2019 07:55:14 -0700 (PDT) X-Received: by 2002:a17:902:b611:: with SMTP id b17mr23388277pls.261.1560264914514; Tue, 11 Jun 2019 07:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264914; cv=none; d=google.com; s=arc-20160816; b=uQLvb5BzwCI+kbBphLzXLgEBhyPWxcMcQjyTmtcO+LFzfAjNtLc3dOijhg9W/BZKVc lhYQsr0HOxdtNebXOy1bI1COXfsXb7auMyj92vRKgMLvq2tRdvf9vig9Rg5xBMzW5CaA R/LFdgdfLdxGgpNK17kkVA1EOekBimIpttTLjAGhlG4Db6rbOPclSCqV2vmkqREWLgAb kEfrEHJfQIeUrc4pldZKFEbJBcndCoMr1OBkTzLg1hNQDTkUIulGNwcRfWftCIVhxBdQ z6Ax+6JRzqQxAQWHzh7Wpj0BoClvC3o6TrJfIpqKLrL3lkuDPia3uh06mvU3c8Hgyal+ sgKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DjIAVTpqi9cTAQJKYzj4NaFyCm4Ruk4KU5YCL5Br3is=; b=eILTo0PXSMbVFKYSaJwm4BfKwdMhAzX7o6OJtrzS+2TLaO2AQy7SsxuzPP89NkK4ky qgXl3UNgEGLvO4BkKrGQr5vZe+bE1IPywCmwBXdNXrZz+GwPMtVuF4CENwyr/aJA/lPu D/e1hgPRCv2ong2+4ehCgqESyhDlUo2uaYLn688KScH/K7xYq+1DZbQCmMQ2lWTOLkjM 1Wo0LRLlDF9pHUSp4zjowD3l1zqpL++VEes8fF5mJoT8lbtu2Fj1k5zZojxnd7nUxgWZ SP+35NeR/c23JdM6W5XD+pmeHEkhmM19qqlh+BrP2UQjK3pDsixMuUWc3FWolS8cXuhx HYyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Q0cM60yQ; 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 123sor7592830pfu.0.2019.06.11.07.55.14 for (Google Transport Security); Tue, 11 Jun 2019 07:55:14 -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:956d:: with SMTP id x13mr41478496pfq.132.1560264914236; Tue, 11 Jun 2019 07:55:14 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:13 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 51/92] ram: rk3399: Enable sdram debug functions Date: Tue, 11 Jun 2019 20:20:54 +0530 Message-Id: <20190611145135.21399-52-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Q0cM60yQ; 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: , This would help to debug the sdram base parameters while debugging existing chip or while supporting new sdram type. It require explicit enablement of CONFIG_RAM_ROCKCHIP_DEBUG for showing the debug prints. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index b658d7d1ab..ce38f72374 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1254,6 +1254,8 @@ static unsigned char calculate_stride(struct rk3399_sdram_params *sdram_params) } } + sdram_print_stride(stride); + return stride; } @@ -1361,11 +1363,14 @@ static int sdram_init(struct dram_info *dram, debug("Channel "); debug(channel ? "1: " : "0: "); + sdram_print_ddr_info(cap_info, &sdram_params->base); + set_ddrconfig(chan, sdram_params, channel, cap_info->ddrconfig); } if (sdram_params->base.num_channels == 0) { printf("%s: ", __func__); + sdram_print_dram_type(sdram_params->base.dramtype); printf(" - %dMHz failed!\n", sdram_params->base.ddr_freq); return -EINVAL; } From patchwork Tue Jun 11 14:50:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 503 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 975F53F08A for ; Tue, 11 Jun 2019 16:55:20 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id d3sf6359483pgc.9 for ; Tue, 11 Jun 2019 07:55:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264919; cv=pass; d=google.com; s=arc-20160816; b=BFkOlAXDVWs6ZgdSWGiuvit1C3cwZWHnIbzkpxmIwFZxG3u7gcy+xBIxkULGmFRbzn MHkVRFlsrjPT27AIpN44OH3NNFr43ACc/4i3bQAnCRLzxboWY37b5VoiIshawEMQjoOL N/u+s70pQCvqbQ9Mm5ebCgQ4l3ehdF5+cJ+OqfaI+yHZ6uLQMIU0oCN60ayvQfAqgW44 XFZIvXEP+CCSi5oslo+T0NE50L1nBXyEsgAnBGstNisoeaYu7pt+ZuPI4yI1nxSxqVBa BoiyVun6PDz/jbkC1468dxs8HFdWqExPysljqPtGdApAvbDsTfDQM8wgmvJDXz/AZUXE WYag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=iVWpQMDxwqMMR4hI3zcfClbYsUacXVI90bG1xzl/7tg=; b=gZmKY88CFx0mMLEv/XSL0GBVKG/PIgUjmBuRNPgiZ6p+MEmir725EYZzg6/++tCBou uTmmgUkCPQTLqfp5KRiQzIKbfJOjpS5J38XzhYgU8rzSNqhyrAAca701XQwVu40d92hm dUqSXzU9ogi8ZkdICKf3g5xjqkNuiH+5EH3vhx/aKQcPgZ5O9s99lR5eun7n7m5TxYUV M7x4NuIdmb6ODXMkexR6IqiIlS2vl1kqj/P0hUTjCpwRAF8pySlwrOLIHcJJRpz82uf9 XXlJC2taBTDXIDGojztMFCFkbuJygTnphHmg+K1JfXbDXzc1cEP4BqIGZk2uA/pxjqKH 53pQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nDsuaL94; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=iVWpQMDxwqMMR4hI3zcfClbYsUacXVI90bG1xzl/7tg=; b=TnkHNkpw1l+pXNBkqYKmAENwh3z3rrhoax/UYGNv3CHalvu/lkjWAj/uWhGynkOnSU g/ddw36EKLceaCVT3R6A6WlLjkiYqKfD/irHeYJPubGg0hUXXj4lipEB2uxQOzWdgIKc aPpW+1Ev5mKQuzKVEq1TxosmCyAHmchkFPjbw= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=iVWpQMDxwqMMR4hI3zcfClbYsUacXVI90bG1xzl/7tg=; b=rdS4HRnhWCR+pYskZGNKNXTK/TztB2yIbef1aKY/0Hhei+Sux44Smnk/8QgEe6PkEE LgK1sKs7Ii93eT1XM65KFMBHtWdhjTVDfZuU9kUErepx7ls/z0Y5IMEk/8rLDFKcUZZu m9aJSeJ8gGj/NJKQ2OlNkn1jG45KSueA9NANRs3I0mMnA4pSVvrw23HUVbp6GE22xiSS nk13Gx2Lw16s7R9T6G+vBTACFH2qCCfZW2lXNtxRvPaJozNxgtPq3E/Zz1TE94RPuAD5 d37x0zgfAt7Lmucn1imCh3Mrepxrp9IcXcJ1yxqsJmc7NYtuDcLA0TNeK7fnIDXjuobc qXUg== X-Gm-Message-State: APjAAAWCiJkyOZYWFPpfiBp2L4HXtyjuqUYRy9YKpoQDxK5Zrccu+OnU XqNuFZwfqWaij1RT0bYyt0rgnhy1 X-Google-Smtp-Source: APXvYqx7v4a+MSe5P/bWuH+NPvLtw8BMAeD+fWTjrJxvylZvEU83kii9+gUtTdbwIvN4wpH5Qj7GYQ== X-Received: by 2002:a62:1750:: with SMTP id 77mr12648055pfx.172.1560264919447; Tue, 11 Jun 2019 07:55:19 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:d0c2:: with SMTP id y2ls859227pjw.5.gmail; Tue, 11 Jun 2019 07:55:19 -0700 (PDT) X-Received: by 2002:a17:90a:6505:: with SMTP id i5mr8151480pjj.47.1560264919147; Tue, 11 Jun 2019 07:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264919; cv=none; d=google.com; s=arc-20160816; b=qebVzIALYC2RzDa1hMv7+R3HZ411IXIgjJ9zehDmkBU+JYsTzch4NFtNF9HI82Wy8u Xm7jB1Pkccxckh01NIPn/2lV7L4iNSlizHgm5JBUHQiQMMeQME3TtuhSUvHhY+M1IQSc 9Ql0kOo7jyYIfqEeEbV3cq1wLArJ8B3NTkidBDlOIN98yEg49CuZcz2LTVjFBlj4X0LL srMZ58vopoMflSG8rGNucSlv+Eld1D+xVMQIoSrofRfGdEGiASqQ57SqGxWfdm64UmEP GphiKAlVTM0OX6WV3HLmDZjPiSiZYWKNF1wDYyKAq7280nSz8YGhFzkfiHMWlKOHT9Gc I79w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wTBXweD1R6wZJRqFVMEPyWutx8ndp9xyM4VkgFPZiDk=; b=MQCQODG6yfS2l36jVll5W11iFo89br8bqj5fXEz5uygvQyb/RZj9fMmr/YlCL17WeK inqs9jgGdpRHpJSGdKnFWV8gQkh1nDGjWSiNdA/SrJxtuhUGH/ez4feodQ/0JmZEjYJu /3h323wrIg/Rm21n0ieK4aZpx4C3rAJdxaVY/qXci0s0xb8pbBNrk0g+bClsO2LYrvo+ /w0Wj0KFkJaR6tdWCH9/iIKviLNM1IWYYGLu4yCTbkb1ODxVXAMx4NtJ/HjzmleVE4Wh +EeOSekS/nznwF+UtsmSo+YSTQTPLW9oPlNgtL6aAupaqIpzNH03u4G4yEmOK68C8+KD 6dgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nDsuaL94; 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 o8sor15781526plk.18.2019.06.11.07.55.19 for (Google Transport Security); Tue, 11 Jun 2019 07:55:19 -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:a17:902:624:: with SMTP id 33mr77404730plg.325.1560264918711; Tue, 11 Jun 2019 07:55:18 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:18 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 52/92] rockchip: dts: rk3399: nanopi-neo4: Use DDR3-1866 dtsi Date: Tue, 11 Jun 2019 20:20:55 +0530 Message-Id: <20190611145135.21399-53-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nDsuaL94; 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: , Use DDR3-1866 2GB ddr timings dtsi for 1GB NanoPi Neo4 board. Since sdram rk3399 support dynamic stride and rank detection it can able to detect 1GB ddr eventough the timings are meant for dual channel, 2GB size. Bootchain after and before this change are: TPL -> SPL -> U-Boot proper rkbin -> SPL -> U-Boot proper This certainly fix the second channel data training initialization since we have dynamic rank, stride where second channel capabilities are clear or memset to 0. Signed-off-by: Jagan Teki --- arch/arm/dts/rk3399-nanopi-neo4-u-boot.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/rk3399-nanopi-neo4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi-neo4-u-boot.dtsi index 7d22528f49..eb0aca4758 100644 --- a/arch/arm/dts/rk3399-nanopi-neo4-u-boot.dtsi +++ b/arch/arm/dts/rk3399-nanopi-neo4-u-boot.dtsi @@ -4,3 +4,4 @@ */ #include "rk3399-nanopi4-u-boot.dtsi" +#include "rk3399-sdram-ddr3-1866.dtsi" From patchwork Tue Jun 11 14:50:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 504 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C168B3F08A for ; Tue, 11 Jun 2019 16:55:24 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id f25sf9752516pfk.14 for ; Tue, 11 Jun 2019 07:55:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264923; cv=pass; d=google.com; s=arc-20160816; b=gXfAYeRwobiJfOhi5mliHxaREyWjg9Bna82jcbYhlMhV6VK9OKjKA7w3iP4s1qTY+r 4VIpJRLxrC6u9r3/vMbBvVRBVJRrLn1VJFZqDUv00SgaY2l1/ZyFpiA4u8mQ3bvK6e46 9oOdpzV0347tx8SaaCxvE7jbsP15+rVMZL6R7adLPoMcn04IZIkSGpBo7GC5tCxjtnRO tpD5wDXOLSsF/Cs/5w8RiZ63IzWV7sQvpAN+T+cL+/NTtVYiQjI+M/Ueaz2n3I4DjAw4 eUNdqhFD0N8jX+lYHEa83h6qTypXINsbFQg473vWKs8OoF/x25QfGydKnGOA8PinT0ac Hl0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=F5mwDD3sBkpkDX77l5WXTAqoT52v4YLO8/5fyfm+9n8=; b=zlHMN8Vr0DWVVGsJ2mI5HaRSx41rEx/JZvbtc7Zs2q6kaJT6jT4gSvCF8ez36XD++k m2ByZuhgQTXLwVXBCANQmHYVpL9/RvNFJjyt3Dv+NfIrD2v1famyAoB7n/9pI7CAJFIE gX/qIp2OEd1bWlnZg3iYpNtoK52+MKlkDO4FsQpC/tvOnNlDMlpY13hyWdoAISSjkeQV KWyR1LNN1P8fc4uG9uoO5s0oeM0fSXRgstDT6QUeKFFfdu9gsiUJFauJhzvnUk4cVRSQ wRLGPnQ7+WgoiHda+R5RYNj8k4qXxoRsxuWJvRdscTacGzNczi567CWG2+yLq898tmzs MbjA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IkYZm6qB; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=F5mwDD3sBkpkDX77l5WXTAqoT52v4YLO8/5fyfm+9n8=; b=eB154fMSP/4tCZ5LvzwOrqi+3TXaepU7yHgfaFk8GTKSFtYSP8/8M0h0JBDHvBtq9t CJQSY9CK/HIifCZRCHY82ScfNi57SttGOJm5xF6Vb1L1LvJpLISXQjw4wKE8MdcJHosx DEmEfVfZgIGddC2hyppHS3zIRKMZU7QJPpW2s= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=F5mwDD3sBkpkDX77l5WXTAqoT52v4YLO8/5fyfm+9n8=; b=XwjvJLhEoZxl5/OU4e8lK/XX7572eDNv7nf7M5DF6qy29WxnvXOScO+34o9khKktcH q4rTY/ZDzAh5KbhvvN3UX0qRGObklfcy+jYtiAh5BcD2WT3uu3urZqPvwx5nWat+/8PX h9SRNZU4PIvMHbhc/X0MI38MBItZHTad6n2SgYS1uGJKisB8Sxyke2a2ick4eHXvEHnq bUD94NYYvZFSh7Md/+dq44bHyCfEDATu8T0kMv2Wyk5uJimH/YAscCbT49jZpoG0bU3b 7nJZVw84VwSg88WqMIdR2NeGCEyY08Ni9fIVc+AyXJEp6mHcjCK44NyRuWvjzkP6Ssqe zNhw== X-Gm-Message-State: APjAAAWxgwnqoZugrTGZJXvTwMO51xLVmZXwGSRPT9Lb54mHmrwJ+RMn SG6bj3H3ok83eGy8EDClsDOkEGFU X-Google-Smtp-Source: APXvYqwMorTGT3npxjjisRNV9gLTquow7HoWv3u8D8s1Y9ABqFI0uLOdhFozpeMaRFMv5wfPFawObQ== X-Received: by 2002:a63:3008:: with SMTP id w8mr20929567pgw.11.1560264923547; Tue, 11 Jun 2019 07:55:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:1463:: with SMTP id 35ls22848pgu.5.gmail; Tue, 11 Jun 2019 07:55:23 -0700 (PDT) X-Received: by 2002:a63:5b5c:: with SMTP id l28mr20237181pgm.158.1560264922915; Tue, 11 Jun 2019 07:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264922; cv=none; d=google.com; s=arc-20160816; b=jnwS4nbWoO34r/EmcFKC3yoFswoZRzKWliFGEURBU4a8lqj8JvtmYHIxOlIoodWOxF v26cVgsa+tW4bVKjYGB5UmfB6A6Gd1JWKAOe3ndphtR52N0xVPkO+8KAqlPVAV9b/wEG fPZifr69iqBK1YToUJaonP79jmEKwOx/lnC6G2lCmHXjHnlDybTyyuXY1OhN7zG1SXsf EsN469SMCKiUlKRO3iNOUmBK04lzvXDsnL4ZRl4HX7lEKtLgSG2X37Wdc9fvNOR7LOtS G1wqCZBFrBUqSzV38KmVHS7yDFAlzNp7vBsksHWJl/7NppcLt5NxdSVsNV2FtJtqKMC2 HFUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jYVJfJji5VncNUtRfq/ZDyMh3tw9MhBZTI5H0xl5J+I=; b=w4+xnOBadZFCo9UErrLRb8sbOttJ1RFTue4J2KEGdQ9JhSDDtEbYto8fB3LeJ3In1y cDzlSUZldNF7nT6bhbHfuFuVKaiip04PrlPbboQCE8UioM4mkO7qSlEDD10pGhqSYdXY 819lN7CLXxh5l7X+yU/KofiLpV2BA9eKJeVgGKd8ct+falFn9ELn58b7/G1HqSJJcGvS p8MfHb+nOdQf20cooSeCIuLOXRKrLl5EvrjkH1btPv4nMthddX7gF4tElw03RX+D3lva y+LbDct4x0wBySQpZ9HlZgvcVsIFodeuVn8ScLj+ccWz67BRpUzf3oMCSS5snUkzYNMu PRnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IkYZm6qB; 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 10sor11939370pgv.21.2019.06.11.07.55.22 for (Google Transport Security); Tue, 11 Jun 2019 07:55:22 -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:a65:4c07:: with SMTP id u7mr19970332pgq.93.1560264922413; Tue, 11 Jun 2019 07:55:22 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:21 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 53/92] clk: rockchip: rk3399: Fix check patch warnings and checks Date: Tue, 11 Jun 2019 20:20:56 +0530 Message-Id: <20190611145135.21399-54-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IkYZm6qB; 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: , - CHECK: spaces preferred around that '*' - CHECK: spaces preferred around that '/' - CHECK: space preferred before that '|' - WARNING: macros should not use a trailing semicolon - CHECK: Unnecessary parentheses around 'fbdiv <= min_fbdiv' - CHECK: Unnecessary parentheses around 'parent->id == SCLK_MAC' - CHECK: Unnecessary parentheses around 'parent->dev == clk->dev' - WARNING: line over 80 characters - CHECK: Prefer kernel type 'u8' over 'uint8_t' - Add proper macro definitions arrangements Note: there are still line over 80 characters and other warnings but fixing those making code look unreadable, so I kept it as it is. Signed-off-by: Jagan Teki --- drivers/clk/rockchip/clk_rk3399.c | 68 ++++++++++++++----------------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index aa6a8ad1c9..5d1ad94e85 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -38,8 +38,8 @@ struct pll_div { }; #define RATE_TO_DIV(input_rate, output_rate) \ - ((input_rate) / (output_rate) - 1); -#define DIV_TO_RATE(input_rate, div) ((input_rate) / ((div) + 1)) + ((input_rate) / (output_rate) - 1) +#define DIV_TO_RATE(input_rate, div) ((input_rate) / ((div) + 1)) #define PLL_DIVISORS(hz, _refdiv, _postdiv1, _postdiv2) {\ .refdiv = _refdiv,\ @@ -53,15 +53,15 @@ static const struct pll_div cpll_init_cfg = PLL_DIVISORS(CPLL_HZ, 1, 2, 2); static const struct pll_div ppll_init_cfg = PLL_DIVISORS(PPLL_HZ, 2, 2, 1); #endif -static const struct pll_div apll_l_1600_cfg = PLL_DIVISORS(1600*MHz, 3, 1, 1); -static const struct pll_div apll_l_600_cfg = PLL_DIVISORS(600*MHz, 1, 2, 1); +static const struct pll_div apll_l_1600_cfg = PLL_DIVISORS(1600 * MHz, 3, 1, 1); +static const struct pll_div apll_l_600_cfg = PLL_DIVISORS(600 * MHz, 1, 2, 1); static const struct pll_div *apll_l_cfgs[] = { [APLL_L_1600_MHZ] = &apll_l_1600_cfg, [APLL_L_600_MHZ] = &apll_l_600_cfg, }; -static const struct pll_div apll_b_600_cfg = PLL_DIVISORS(600*MHz, 1, 2, 1); +static const struct pll_div apll_b_600_cfg = PLL_DIVISORS(600 * MHz, 1, 2, 1); static const struct pll_div *apll_b_cfgs[] = { [APLL_B_600_MHZ] = &apll_b_600_cfg, }; @@ -393,7 +393,7 @@ static int pll_para_config(u32 freq_hz, struct pll_div *div) fref_khz = ref_khz / refdiv; fbdiv = vco_khz / fref_khz; - if ((fbdiv >= max_fbdiv) || (fbdiv <= min_fbdiv)) + if (fbdiv >= max_fbdiv || fbdiv <= min_fbdiv) continue; diff_khz = vco_khz - fbdiv * fref_khz; if (fbdiv + 1 < max_fbdiv && diff_khz > fref_khz / 2) { @@ -409,7 +409,7 @@ static int pll_para_config(u32 freq_hz, struct pll_div *div) div->fbdiv = fbdiv; } - if (best_diff_khz > 4 * (MHz/KHz)) { + if (best_diff_khz > 4 * (MHz / KHz)) { printf("%s: Failed to match output frequency %u, " "difference is %u Hz,exceed 4MHZ\n", __func__, freq_hz, best_diff_khz * KHz); @@ -489,28 +489,21 @@ void rk3399_configure_cpu_b(struct rk3399_cru *cru, } #define I2C_CLK_REG_MASK(bus) \ - (I2C_DIV_CON_MASK << \ - CLK_I2C ##bus## _DIV_CON_SHIFT | \ - CLK_I2C_PLL_SEL_MASK << \ - CLK_I2C ##bus## _PLL_SEL_SHIFT) + (I2C_DIV_CON_MASK << CLK_I2C ##bus## _DIV_CON_SHIFT | \ + CLK_I2C_PLL_SEL_MASK << CLK_I2C ##bus## _PLL_SEL_SHIFT) #define I2C_CLK_REG_VALUE(bus, clk_div) \ - ((clk_div - 1) << \ - CLK_I2C ##bus## _DIV_CON_SHIFT | \ - CLK_I2C_PLL_SEL_GPLL << \ - CLK_I2C ##bus## _PLL_SEL_SHIFT) + ((clk_div - 1) << CLK_I2C ##bus## _DIV_CON_SHIFT | \ + CLK_I2C_PLL_SEL_GPLL << CLK_I2C ##bus## _PLL_SEL_SHIFT) #define I2C_CLK_DIV_VALUE(con, bus) \ - (con >> CLK_I2C ##bus## _DIV_CON_SHIFT) & \ - I2C_DIV_CON_MASK; + ((con >> CLK_I2C ##bus## _DIV_CON_SHIFT) & I2C_DIV_CON_MASK) #define I2C_PMUCLK_REG_MASK(bus) \ - (I2C_DIV_CON_MASK << \ - CLK_I2C ##bus## _DIV_CON_SHIFT) + (I2C_DIV_CON_MASK << CLK_I2C ##bus## _DIV_CON_SHIFT) #define I2C_PMUCLK_REG_VALUE(bus, clk_div) \ - ((clk_div - 1) << \ - CLK_I2C ##bus## _DIV_CON_SHIFT) + ((clk_div - 1) << CLK_I2C ##bus## _DIV_CON_SHIFT) static ulong rk3399_i2c_get_clk(struct rk3399_cru *cru, ulong clk_id) { @@ -597,9 +590,9 @@ static ulong rk3399_i2c_set_clk(struct rk3399_cru *cru, ulong clk_id, uint hz) */ struct spi_clkreg { - uint8_t reg; /* CLKSEL_CON[reg] register in CRU */ - uint8_t div_shift; - uint8_t sel_shift; + u8 reg; /* CLKSEL_CON[reg] register in CRU */ + u8 div_shift; + u8 sel_shift; }; /* @@ -678,7 +671,7 @@ static ulong rk3399_spi_set_clk(struct rk3399_cru *cru, ulong clk_id, uint hz) static ulong rk3399_vop_set_clk(struct rk3399_cru *cru, ulong clk_id, u32 hz) { struct pll_div vpll_config = {0}; - int aclk_vop = 198*MHz; + int aclk_vop = 198 * MHz; void *aclkreg_addr, *dclkreg_addr; u32 div; @@ -710,7 +703,7 @@ static ulong rk3399_vop_set_clk(struct rk3399_cru *cru, ulong clk_id, u32 hz) rkclk_set_pll(&cru->vpll_con[0], &vpll_config); rk_clrsetreg(dclkreg_addr, - DCLK_VOP_DCLK_SEL_MASK | DCLK_VOP_PLL_SEL_MASK| + DCLK_VOP_DCLK_SEL_MASK | DCLK_VOP_PLL_SEL_MASK | DCLK_VOP_DIV_CON_MASK, DCLK_VOP_DCLK_SEL_DIVOUT << DCLK_VOP_DCLK_SEL_SHIFT | DCLK_VOP_PLL_SEL_VPLL << DCLK_VOP_PLL_SEL_SHIFT | @@ -750,7 +743,7 @@ static ulong rk3399_mmc_set_clk(struct rk3399_cru *cru, ulong clk_id, ulong set_rate) { int src_clk_div; - int aclk_emmc = 198*MHz; + int aclk_emmc = 198 * MHz; switch (clk_id) { case HCLK_SDMMC: @@ -776,7 +769,7 @@ static ulong rk3399_mmc_set_clk(struct rk3399_cru *cru, break; case SCLK_EMMC: /* Select aclk_emmc source from GPLL */ - src_clk_div = DIV_ROUND_UP(GPLL_HZ , aclk_emmc); + src_clk_div = DIV_ROUND_UP(GPLL_HZ, aclk_emmc); assert(src_clk_div - 1 < 32); rk_clrsetreg(&cru->clksel_con[21], @@ -834,23 +827,23 @@ static ulong rk3399_ddr_set_clk(struct rk3399_cru *cru, /* clk_ddrc == DPLL = 24MHz / refdiv * fbdiv / postdiv1 / postdiv2 */ switch (set_rate) { - case 200*MHz: + case 200 * MHz: dpll_cfg = (struct pll_div) {.refdiv = 1, .fbdiv = 50, .postdiv1 = 6, .postdiv2 = 1}; break; - case 300*MHz: + case 300 * MHz: dpll_cfg = (struct pll_div) {.refdiv = 2, .fbdiv = 100, .postdiv1 = 4, .postdiv2 = 1}; break; - case 666*MHz: + case 666 * MHz: dpll_cfg = (struct pll_div) {.refdiv = 2, .fbdiv = 111, .postdiv1 = 2, .postdiv2 = 1}; break; - case 800*MHz: + case 800 * MHz: dpll_cfg = (struct pll_div) {.refdiv = 1, .fbdiv = 100, .postdiv1 = 3, .postdiv2 = 1}; break; - case 933*MHz: + case 933 * MHz: dpll_cfg = (struct pll_div) {.refdiv = 1, .fbdiv = 116, .postdiv1 = 3, .postdiv2 = 1}; break; @@ -916,7 +909,6 @@ static ulong rk3399_clk_get_rate(struct clk *clk) case SCLK_UART2: case SCLK_UART3: return 24000000; - break; case PCLK_HDMI_CTRL: break; case DCLK_VOP0: @@ -1014,7 +1006,8 @@ static ulong rk3399_clk_set_rate(struct clk *clk, ulong rate) return ret; } -static int __maybe_unused rk3399_gmac_set_parent(struct clk *clk, struct clk *parent) +static int __maybe_unused rk3399_gmac_set_parent(struct clk *clk, + struct clk *parent) { struct rk3399_clk_priv *priv = dev_get_priv(clk->dev); const char *clock_output_name; @@ -1024,7 +1017,7 @@ static int __maybe_unused rk3399_gmac_set_parent(struct clk *clk, struct clk *pa * If the requested parent is in the same clock-controller and * the id is SCLK_MAC ("clk_gmac"), switch to the internal clock. */ - if ((parent->dev == clk->dev) && (parent->id == SCLK_MAC)) { + if (parent->dev == clk->dev && parent->id == SCLK_MAC) { debug("%s: switching RGMII to SCLK_MAC\n", __func__); rk_clrreg(&priv->cru->clksel_con[19], BIT(4)); return 0; @@ -1049,7 +1042,8 @@ static int __maybe_unused rk3399_gmac_set_parent(struct clk *clk, struct clk *pa return -EINVAL; } -static int __maybe_unused rk3399_clk_set_parent(struct clk *clk, struct clk *parent) +static int __maybe_unused rk3399_clk_set_parent(struct clk *clk, + struct clk *parent) { switch (clk->id) { case SCLK_RMII_SRC: From patchwork Tue Jun 11 14:50:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 505 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 497443F08A for ; Tue, 11 Jun 2019 16:55:28 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id f25sf9752584pfk.14 for ; Tue, 11 Jun 2019 07:55:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264927; cv=pass; d=google.com; s=arc-20160816; b=Mk7+KBnimzpGtBMTqQato85VO5V4db0UoqkmIIRzU0F805be2e0IrRUI5MQmI7Ryzz zhp0RyR5GZ1YIDmrn0CQNSXBeb/o0T0/XyAAALcTJ7/tu43bNsgvGSEJ/ph2zO6H931i CCdDwrpYMURLkhugLk6RIsdtzJCXLTD/1R8aVfW6bwUxX+t5SuImoXH9F0PIDjoZYBwe KCgI74CbizPXKR/XsusXurJ3DkBA19kPjVAUVkDDyAjIu3WmyYz/wABuVUvQvKWsvGU4 KntxLemh4meh8NZJXa8Cuqx+w7BbACBQTUDt3zQn/Y73a1kKnGFNX5/wtLDKHvDARGLf mJOg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=nDFl7MbzeQ7oB2bxP4KAMqBqVpITLmNbmheqyIbSd5s=; b=l7o6W1jSJPtquAziEV8CvaDe5CtcXVNUO/7jKyjDB1VrwNxMkqE4rbge5D+mSo/4Lu HLAS3YsLNdW5KJlod2yW2wyRoAlAPDjw4iHYQVt/c3XGuSMm4DPLJWdMvGe5dwBq2qZa TU+NcBHQ/MDlzIJEYq2MS2Jsu7fbEvZFOkimnopogNckcy+GpAjegweSReMrw5q7Q/0f pyw9cDsjs1D4a7kndP/pAobBDajeK7pN44CY7Wm0W7rfc9Ki0NjcMo9x/PWCGL1w4XqZ qR8zPlTDE21dNua3XL/d3cCzItRCxg0B6C93tra/0ksU4VrOO8PVBoCIR9ZJe+inMn5W /KkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LjnB6IpZ; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=nDFl7MbzeQ7oB2bxP4KAMqBqVpITLmNbmheqyIbSd5s=; b=DIY2euIEBnoRxJwcBA7IDTgohVth/eDX7nW3VaW6WOYwa/irYvOgF+MM6ypatKCgup 7Yd4p2/HywxKqiZ1TMco2Vv7IQOVcMU7OTJkosc5ivAnZpWiGLvlZE1hZFjyfHt/Thkz Poz9I6BSrjObbTlRpkT+ithALHb6JABE5T9xc= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=nDFl7MbzeQ7oB2bxP4KAMqBqVpITLmNbmheqyIbSd5s=; b=lcMGsCKyAZ5/WRORjgxLelKgVUGMcHe0MUYKJWPCyBdm1uTwd+HH+IDXZotWppYTPK 1++o+FxkwZClgak/BEX7RAZa7+uUGZooUSM3Hq1abEjJjwM2zdOGRPjL0PJOjLHvnKjB 8IitnuU8j4Ceb0CawL2SkQLE9jj3qkizPotAbROKjpD5zSZVYn7+64TQmGe1OHYeDAV+ SPz/ZQaGf4zfQC3dhEvE2+ps+cVyHjwaRy0iP3HZTgztOKzy0sq8wZTcdK9wKcOoaXTV n3JgQ3jMg24i6g/z8qKCKtDXrIMM4yl+WBunkg7msD+y3Aws/KaD6pZTfdnQYk63c4CR cTAA== X-Gm-Message-State: APjAAAWNYyXFYjTzxcunzL0J2/sZBaoG+yIkUGsyBxrv/EEORZB1zwVK dL/eWvjxaaaYKKarxfDAZU06U8ZZ X-Google-Smtp-Source: APXvYqyZ4Q+uATjrBGkKC/WI7uX4sQjA2pzktudwsLyhd96Om549uNCykaTy5XWXE3fu3vKDeNLh+Q== X-Received: by 2002:a17:902:d20f:: with SMTP id t15mr9295039ply.11.1560264927128; Tue, 11 Jun 2019 07:55:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:35c5:: with SMTP id r63ls865689pjb.0.gmail; Tue, 11 Jun 2019 07:55:26 -0700 (PDT) X-Received: by 2002:a17:90a:2e89:: with SMTP id r9mr27179286pjd.117.1560264926837; Tue, 11 Jun 2019 07:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264926; cv=none; d=google.com; s=arc-20160816; b=hFZjKYHF/3H71qlL6UZxO6viwbYjy+yTmnV8uiFA/BxxJVQ1XbxxG5swlmljqwjCuX EChcmD3b4q+yl0Sv+Q+uifHASiVKmUW+dGEkKLgpAwTQS8fNW/tfdzsSXKG7Jo95cpzO 25u0AGE452GtI4MLNeUwrIeRNkVoryWct5SXDR2i8+EERo3YwgZA/qPLQ+NDpH6BieoF WJpjbKzTnIKVvtXPD0421UEqq4skbYcDCAXBBYexN6TllI/cHORP0b38XwLMPuXYubWb N8Zb+4iKX6yZOB0hPVKY910Z7XdBsl1dk4vTsfwNhz8Qr5i4FcbyjW8kZbYg1JgHeF/l cYsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=nmwFUqUOCS8iVkKDxNTkju/mBzepfxNYBfFL/J8gC6k=; b=J92kUvzkXGUu2QXx+mx40AU5rwuyC/n3Wsa4rS6/1q0ZKhodPXJPSLxU23pkhCsjU2 qkmEZ7ni1c72GARUyfcS1VfRSbUca1rLSfXhbpraX345gdO0po4C2SiWZJSHS16i6DB9 CDcs6NvXK+3NOtlypSRXfr4QpvWmP9DOZWWjhPzHhN8ViB52/n0KfDjxC0xmhcmYmHro 5BgBPSglp0Kio3bmFB4TgCUtX53QWIDbTd+b0ecDn5ucN0QBAvlUnAx0tOhp0E7fbf0I MiwGDkKaQd3O7UCI8meyk3DZ1uS7qz30NjW1JhPA4WIK4ztNxheCkXnCRuaRyIZYtQlO xCCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LjnB6IpZ; 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 e33sor15508811pld.12.2019.06.11.07.55.26 for (Google Transport Security); Tue, 11 Jun 2019 07:55:26 -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:a17:902:70c4:: with SMTP id l4mr40759268plt.171.1560264926408; Tue, 11 Jun 2019 07:55:26 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:25 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 54/92] clk: rockchip: rk3399: Set 50MHz ddr clock Date: Tue, 11 Jun 2019 20:20:57 +0530 Message-Id: <20190611145135.21399-55-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LjnB6IpZ; 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: , Add support for setting 50MHz ddr clock. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/clk/rockchip/clk_rk3399.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index 5d1ad94e85..1de21c9f3e 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -827,6 +827,10 @@ static ulong rk3399_ddr_set_clk(struct rk3399_cru *cru, /* clk_ddrc == DPLL = 24MHz / refdiv * fbdiv / postdiv1 / postdiv2 */ switch (set_rate) { + case 50 * MHz: + dpll_cfg = (struct pll_div) + {.refdiv = 1, .fbdiv = 12, .postdiv1 = 3, .postdiv2 = 2}; + break; case 200 * MHz: dpll_cfg = (struct pll_div) {.refdiv = 1, .fbdiv = 50, .postdiv1 = 6, .postdiv2 = 1}; From patchwork Tue Jun 11 14:50:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 506 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id F24203F08A for ; Tue, 11 Jun 2019 16:55:31 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id j36sf9257319pgb.20 for ; Tue, 11 Jun 2019 07:55:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264930; cv=pass; d=google.com; s=arc-20160816; b=Hxdh9168+IKvpGtoJeHX2LuzVZ3+2A3mMObYXpuPqcFoVMa4l2gmN9RnBUGD/brPrN qhHF3IxCP7jnTs8KJcK4AK8bh97HitdXXGwZdbbuTUjFUpJBv9euZ7yiurlIs/A5Ul72 cnVsUvSBAu18RdlP5UEF7oNasSNARY3KAxU+x95erHv3aCE8agnyF5+EaOvmmue70r1P NWmVatclz02QeRPGOU1p8lFEfmtQqY1qVV6w3G8lWJFyL7QlKv+P18jLkrR/Vb3Y2gY/ PqJehI+GKi694T9UvcjG1Cj7eLwZjoklwixaYva3CHYvR/+wFL5wpTnGnAuYnvfs5X+r KI7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=WQT0/Zi/t3V+WCAUJa2Wj2NyK8ku7TJ3jWbH7BNZmJo=; b=YvpZzmizn6MnF7dOiHFkJDv2BHLxSF9YGbCD8uRV42cNTtIVB+38JizU+VYEFOSyhj eKYWzRwt0AYF+PbZ4nr7sfssyBBtw/l+vu6rQGJk/Fvpef8l9lVIu8NBytDIid6w2xcD uJDJOP9HiqBwK2GvIQD6MiFOi/iURulGIKpTnV4tWVVuM3l0YlnnzflYdTRb3ddAYvni C1f2H5vhWciK/MiQvDJxhzQe5leiXhs4MRl0g0chglImxkAIYjFPT04iByPyh8wnikXi tG2YsxI76iqNvco7WABNzok0RmMV+gx58JPnzFouXL2JYw94gVQZeIGoe+6eSyqgiTgH 9GWw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dpJlCAF4; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=WQT0/Zi/t3V+WCAUJa2Wj2NyK8ku7TJ3jWbH7BNZmJo=; b=V01QdidobwG/Mw3XjYFczPSIll18NpkQdcS7EwDqTxAVu5IBcyJfu8zfeBkXUlVGON HSbSU0tYAMni6SU8PWj9Us7C2FB24uwVq9+j6HANM7+6Le+SlHDOqzDmTuvmsaFODf3S 2eE8KhdtvVA+jTeTg52J4px6Sximxbcbpu/YA= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=WQT0/Zi/t3V+WCAUJa2Wj2NyK8ku7TJ3jWbH7BNZmJo=; b=AGw+4X2fhtnJcMM0kMt76DV4MqO6epfHfMd09ZYhOCR1TjXspM438iIGUD/scuyZmn cIkh63yYyKHAj64WfSGSRmoZ/ZG3g/QqPKR7RKiZzrXzr3KuFyWa2ttlAJpCTknI/V16 /BH57Zlx95o5U1rjoLfUY2HHHGy7D3QcTDR/VfCr96b7nSP1C97IC3C/heNW9NptDPh1 MhNXj5gCz3H1839rvi2BZug9UPWwnKdFk2YT+eXLCCv+i8XayVWEEzLdb915nmpHkPJ0 oVVfvUK2tj2qlay+i65QjUfRdH7csq/4mnA5bf93uFL7wQCufdNN49jGBL8lYJ0AYxFM HICg== X-Gm-Message-State: APjAAAX667jZ1EO+IUFpzExd5zMTP2eh0j6SmBExAaWceyQ/MWZ4j+kQ 5sJpevO1dKf6V0YWgWxrtWLD0/e8 X-Google-Smtp-Source: APXvYqzIsUcvMYU2eTJPH9gxGEfWEhZBOZEDToa9r4PjPxSgWwMbfD4PMs0fZh5BoQtXfnJA94xPfA== X-Received: by 2002:a62:4dc5:: with SMTP id a188mr81694109pfb.8.1560264930793; Tue, 11 Jun 2019 07:55:30 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8d8f:: with SMTP id i15ls4389908pfr.7.gmail; Tue, 11 Jun 2019 07:55:30 -0700 (PDT) X-Received: by 2002:a62:a511:: with SMTP id v17mr78526674pfm.129.1560264930430; Tue, 11 Jun 2019 07:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264930; cv=none; d=google.com; s=arc-20160816; b=NHi71Adl9J/rAtK0sobi0YSWJ46E5ngoFaeuYeM6h/4knV8e6fOQOGguViCdkA3TkL rEvp6AHIvz+m4lE86fFQHOsDp4AKohjLEuhgnC8v1oYlfZRL18hMrnbHLiYVkWIcjTXB 46oBq18T+MXoxFI3rJTJg5C5/hEETkSdYCwkZXAg8vdDi8JjVYa1/Ea79PCebdGwu4Ul fu2gKtUSvrhc5jhcVMZbS7f/WgPxNJs89AfO1q6WsfjOrM8GTf45lpAnDhu/cDe+yE9u LKsqTJWoEs1cnlgR4B8YoVo0yffzdYLNdXhCHPM29JnL8knXb/5c17AWsJkWYnLfB2SG zDCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=VZZq8s/MFgMQ4+KCax6f04xB7tKYUG01ZRKiMSlIBrI=; b=Xw777EsBpXaeZXy4XbWGjmqGgkyS3n0mDy1f0z6MmI4BR0umMTo5ko5i7481rxzGwi 6GdNm+bM8X8fAZ9XN1Ya9BYdLwgpr/kzX4MB2gKzJS54rfioSKmWv3K9eU8rOg7FQYoA jMhV8Z6leyK8LKOJmyofu0ZNurXwhq8E7bEC2YIXowzuiwjuBgCPjtRQJPfiyEEsEJ3G vYunKfMlG5qB4qk2uosZ7H25xbVBJkUZqGd37VgzrvTLklP36sV6LIx343we8wUpxxjR EZiLi4toLh0/DVkLh1jf5hADBIK6rHGzEVJbusRo4dPiw6nRM6hQ94IA2ji37RCLvCUP RE5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dpJlCAF4; 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 bc5sor15052074plb.1.2019.06.11.07.55.30 for (Google Transport Security); Tue, 11 Jun 2019 07:55:30 -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:a17:902:988a:: with SMTP id s10mr76935799plp.304.1560264930144; Tue, 11 Jun 2019 07:55:30 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:29 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 55/92] clk: rockchip: rk3399: Set 400MHz ddr clock Date: Tue, 11 Jun 2019 20:20:58 +0530 Message-Id: <20190611145135.21399-56-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dpJlCAF4; 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: , Add support for setting 400MHz ddr clock. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/clk/rockchip/clk_rk3399.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index 1de21c9f3e..79007b8682 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -839,6 +839,10 @@ static ulong rk3399_ddr_set_clk(struct rk3399_cru *cru, dpll_cfg = (struct pll_div) {.refdiv = 2, .fbdiv = 100, .postdiv1 = 4, .postdiv2 = 1}; break; + case 400 * MHz: + dpll_cfg = (struct pll_div) + {.refdiv = 1, .fbdiv = 50, .postdiv1 = 3, .postdiv2 = 1}; + break; case 666 * MHz: dpll_cfg = (struct pll_div) {.refdiv = 2, .fbdiv = 111, .postdiv1 = 2, .postdiv2 = 1}; From patchwork Tue Jun 11 14:50:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 507 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DD31D3F08A for ; Tue, 11 Jun 2019 16:55:35 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id a21sf9258299pgh.11 for ; Tue, 11 Jun 2019 07:55:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264934; cv=pass; d=google.com; s=arc-20160816; b=QQcgjXtGl42CO1/MdUFuWUIg9z8kEZPmXrflHwvJ609wAQY8PhJkueq7IfIVJzTvuE 9wyfZ1xuSm4F/pNaabSjkrCbc0xk5SaNdCCiLa9mGwSMl8EfgxdHTfeUBn7LL+wKfZ1N Gj737IDPPQt9UqeDsXw35qliC8x9QUcItMOcbMx9H2+2I2/3PH74CWPhMt8AkmGvaLyS cR97boYEljdlZQUwOKqHYIvdIRov08SdFvusyzTjkMFsrUPwXQsaY8KnjeFkZh74eCQR xo3L3VIiaRLp3gcZLUJdcMP384L+M8tWnvbQJQXa34DfHQnLJ9gdsX4oDQEyKx34SwNO z/4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=RHS64AMRATBWuWTFfHudzKUFToZff70fmB0SemU/P94=; b=nSboTGPQRA+xyFM8RFqnVeHZfPtuZkxa0nTf9LnoPGoqf1Rwr0s5dXUQssyXJRADQC jE16V5ELFR6TtUpB7ofWOhDWzDGuhXOUP9qyLN+iPm76JPoC5J1T14Xu8k6YYH3F816W RryjvXVQ8m4Cru0FaaN2eF9qxnYuL2NseVhOAjRwvQCfuuv++gljOSEGehgz2PKkYqTV r0vMlaMwOucpb8HMuyg062CxF55yPFfcWpQJ1WimU6zwC/PyGcNyTZdwk3xKLR3/LX6B AJmiPERECE0A0+Lo6RYp0zNgiGRCpRaaG6Vcg+VGsSlM/WmltneWtzDRW0lSSg8cql5o 4Xlg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jmo4EHno; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=RHS64AMRATBWuWTFfHudzKUFToZff70fmB0SemU/P94=; b=O7IVH/osQiXivnJZVGTZA8Oy/wl9V3qw15KMMylaSgHxjMi4haq64MKMuNZU2QtjD7 hoGgSdvtbSHnimkO4VvZcR/3J1KgJYAoD6+kWEHPmgspQw3On3b0iv75SbzEQp1sR+hi Ind3a58kLD0vRTFek1LBcN3mqpA6rJdXo8E2I= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=RHS64AMRATBWuWTFfHudzKUFToZff70fmB0SemU/P94=; b=Ehi3XIocl9Zz4oVuwmW+Qj6alAey6p/mQIKS25lYSmg0stVWzT7CXetmuRGoWZleqT Zpt8qMfQQxU2xdM3We3yIDmDPXix7juWi8EU/oG9NwaoOkVfGKpYbyGxwK1lHn3tAfRN UB7Q8w7bxtLATWAxkDg7/silTlZnEEIyzeG9EAVRJJakKcUYVB6YD3QCli+6kJx5zPeN 54KyvS1B+0f7SAb/CIRsQJV/SgTE2ViCTi7pejtG3ZZcN474UH8JZt7MHLYaoAwRbKcW lPR/FNx4PY/Sq+rF22+TEQ4KmGstJTK1esoAAMz4R1+K9zhXmgIdlApl1ELWjPsrv+r+ dneg== X-Gm-Message-State: APjAAAVquAF1rVILzyVPyRHHtOpAuSlnefpebhCOGH3tJUBv3MAqTIiR JrIqAeYJ3t08nBKwrWO0Z0WRMzcb X-Google-Smtp-Source: APXvYqymNbOTlPX3kP/zJGMlQGAfg9DuhIxXutA/Y5bpXeNp66zsLPr0CAHHrcbB5qfDPS3Eaj01RQ== X-Received: by 2002:a65:5c88:: with SMTP id a8mr20242576pgt.388.1560264934625; Tue, 11 Jun 2019 07:55:34 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8614:: with SMTP id p20ls4495796pfn.14.gmail; Tue, 11 Jun 2019 07:55:34 -0700 (PDT) X-Received: by 2002:a63:de4b:: with SMTP id y11mr18647875pgi.301.1560264934232; Tue, 11 Jun 2019 07:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264934; cv=none; d=google.com; s=arc-20160816; b=u2P+Sl5uXpBice+VDeuwMclmNLH0lmdPQOh9RPgfvwJgIRnvoMZZLSMbCcUQKhk4wP LwAsvm0s1DkkYga0/i5u9rbZyb+taYob+1t/oo0ViS5mwvS2iJ5yJHMsxOhZWJFg0h6+ Fggp1uUcbN5X2hZ4L5Uh8DY5UNL1p1H8FvolRWUUclxusDPI3MiGiXeaM1RM3GTGZ06b wTvzfptBygZP20eqvcuPwou0X7ljB0y6MBjFUYJL4jifCX1xeVS2mRte9WXzNn4zt5im 7MXe4ZQP1Fh5tvS1piT5thHNEcm7TaSpTd5S230w1aeGr6xdecN6vYUnrXiaODMrTZe/ X0gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zCTHA7AbQTHQFenEvVby/jfWdGvdtti0ZUnuqqPQWH4=; b=yCo5b7cuTcIgfnNjhgdIoGc0gibiWL7Q+MGM0lFqgvQxVw5R0HVn3sG/2s28l9pnUs 1U/wdqFKiChwkVC9vjBDnK6kGopatxKZi+RuOjWRPEwAJbKeQenUNayrP1adulfJ2tbW jH2KQZfTSy2ZiZkqM3DqnDJ7WjYWNWQT47KFcKsX3RLe3tQb/IBSmG+TewqZqIb0rmmX EE3UJFcPDKdmfHFOoefhP4r9n41PWRBQt6Jy/nomtAGKmWoOJ53kPlvcgb9ETBWlomss V5ilaY6oIOVWyBXiHgYBmpqWu3QygNdaWRRkmZV1SxOIy/iC4Do3LtDoGxBlFcgWEoj7 PKPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jmo4EHno; 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 gn6sor15420958plb.66.2019.06.11.07.55.34 for (Google Transport Security); Tue, 11 Jun 2019 07:55:34 -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:a17:902:467:: with SMTP id 94mr20751079ple.131.1560264933956; Tue, 11 Jun 2019 07:55:33 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:33 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 56/92] ram: rk3399: Add spaces in pctl_cfg Date: Tue, 11 Jun 2019 20:20:59 +0530 Message-Id: <20190611145135.21399-57-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jmo4EHno; 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: , Trivial patch, add proper spaces in pctl_cfg. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index ce38f72374..7251532ad0 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -559,8 +559,10 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, copy_to_reg(&denali_ctl[1], ¶ms_ctl[1], sizeof(struct rk3399_ddr_pctl_regs) - 4); writel(params_ctl[0], &denali_ctl[0]); + copy_to_reg(denali_pi, &sdram_params->pi_regs.denali_pi[0], sizeof(struct rk3399_ddr_pi_regs)); + /* rank count need to set for init */ set_memory_map(chan, channel, sdram_params); From patchwork Tue Jun 11 14:51:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 508 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 198F63F08A for ; Tue, 11 Jun 2019 16:55:40 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id 59sf7891373plb.14 for ; Tue, 11 Jun 2019 07:55:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264939; cv=pass; d=google.com; s=arc-20160816; b=gBoL29IWZuOzaiqWS3ItrYQ+36CfRLxIzp/VHTsK730karh6/74r9chdr+iZCBA0XV TeqVgYO1Y0R8XChpCUny3EJhXXfN5nA4N8oa5EPsKuAvz87K2C8hvads5669bhzrpaII z1xCNe2GzbZ7PQGmnthpO/C4aqfOfYq04WegIZHyTUrOIKknNulqjS76aS9IvKxcz3ud 4wjH4V+rzDUhfFsE7Skbu7KAfrOEDCAphR13BlqXhQrX0F+TJFTvX2mFgxArkuaCVwLW QUkOYRbMie1syv9ym0u3auyiwvKJKVAwV/hQDXMEurVzT1RMmwgL5DhtWWdn2Sg6rPMw 7HwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=J6aYD0wBSmIbJy9ncwreo6UtulPffRTD6sUIM2i0xVU=; b=rWF5XswHkdTKlqbaWK5fNlf8BlmpAPm7iv1WH0QWce0G4u9SEhJy4RqiZpF7rhlZkN du7tSzB3SHBA14CKrBgwNFsZyAWzpfPkqMhfS1Tf2I0IAwfBxPpYPAEXG1+UJnstmt1p UwT8U4eptQHTjJKpK645cD6KId/xRn9v4r2HUm9B12bioD6wK2JZMjWmDUyUSf/4wYFf V7npYVTOzvSP0J68iw+ANaTXqJgiIio0xHjJ5EMrRCEUwU6F61gp89OEmxaw0Xoobzo4 7odnt+2vvDtjVHnB7+thJuXytkvN4WeZkV8aUYVLdlnMfWajOvSShAmaRpKhs81pp/yj dtZQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="PpXB/rrs"; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=J6aYD0wBSmIbJy9ncwreo6UtulPffRTD6sUIM2i0xVU=; b=qLP490Pi+X8RtOJ98afFkszaHAtEOhE8ru6WkA2/T0oIyLUIkKpcgwVvir5f6vPpx3 6mvv1z+cl2J/N4B+Mb3cPF9Vx7FhszeJ5xfi14xRqLyd3QAuUvKkUFWdMH+yRkxXwByx 7XqgrMoL1jErwLvvSN0QiMlvGz8/nf8aXB9eM= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=J6aYD0wBSmIbJy9ncwreo6UtulPffRTD6sUIM2i0xVU=; b=QkdI6nrmzQV1gdouQPkKuEWm+MFyZr9Dzd6HWKNlZKbFx3HwW+KgHhCRUaVSTtKRg2 Wht5OiPopXpDwL4vjtqnMa6IR2f5ZCElPNhvy21C3+cPqjwgim8JkKmKkTVHFzFfGqDC oO4r5aUc8EFmZN7UOh5fdmTwNhfDUlhw9m8lvz2Y+K0b90St7hZBzCcT+bSeiMinRjw2 tOP+ePM6iIsTDCFd0wf+P553P8aqdy+7gTu3S4d36dtpGat1IXJBbe3xH0TjztLJ6SOC A6T6VBpFdKCb/eVrXiiKmJVz/xzz8YVgV9HMI8eFodzQPir5BRpxLIj3QuWHsJXTXijE 0pUg== X-Gm-Message-State: APjAAAVwqqFdfCIr4GJLkxNUG+p1nWQiShCo7sooQ5brnV39gL9rMUkh N3rNhr6Wyy+4LUUwoO3bKPQDExYr X-Google-Smtp-Source: APXvYqytR9oQ6NsN5FS+yZ9d80YcKP9iPlf0p0iToNjBjgG198bEisjqQoAdI5HMkICXsgRPzD6NFQ== X-Received: by 2002:a62:5214:: with SMTP id g20mr26766624pfb.187.1560264938919; Tue, 11 Jun 2019 07:55:38 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8115:: with SMTP id b21ls3288626pfi.12.gmail; Tue, 11 Jun 2019 07:55:38 -0700 (PDT) X-Received: by 2002:a62:3103:: with SMTP id x3mr147646pfx.107.1560264938560; Tue, 11 Jun 2019 07:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264938; cv=none; d=google.com; s=arc-20160816; b=ntPx0CBCX3iPLqpD5KZPlzuJLrd6FsZgGrMALRzx+pHrz2ONNRrrsDG+KhyuAbjaGd bjj0InL+ndquykff27CRIMDUK7mW5marRSSO/fSitvbBCMmjUKwEi/KHTKIYbu2QUEMK LxWm0N9pSiK+XDH1OJ684Oag7zB1M9j94ovi1eZitCmTqkDEIBNIDzcwnH68fiAzlTtG RqIdqekiJhwSg2fPEI7Um4gHA3/BwyzG3M8ExutdfuHt7c32MmF4Cbi8QkM6YLlqNQJv bzrIJrVqsfTbu91Dj+bezDnDBcx2UZDbaDKeYPmVf7WRqVmm1TGJbamWz3y+KnJKr0in lXrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0GrsBjEX7iCp3lTuEUQL6fUt2JymwWu7HOsq8NZhHSQ=; b=SlwIUUR0tfx0ipP7GxvaN4hxi52K2tYO5W3LfxjXj/vNBPzDdm4hBVHOuoGnSRj6Pe Na78i5e75U15uqGSFw3zCYLmfdeWdPg0ZBTQXSxTkvN2xx8LpgWss+gMfFX5oVrObXIM 5X5o+ToenRizCHYw8lp/j4q21GuOimkUNihvk4MOgLoWd9EkHSk5kw6awaJaxpVahUNR /RCLLNvR0rvhS707uJfmIAcvP10n3Mv4GGqfJs8NFIjgcV7FGl90zqkCxGZY1LM/njcs sl6sKRDRw3pz0hoaKg4UhllN1uzH65Uqi+YsNzz280JYfAV+40eUPoEDo996yfQFWaCG TtNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="PpXB/rrs"; 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 b5sor2120809plz.29.2019.06.11.07.55.38 for (Google Transport Security); Tue, 11 Jun 2019 07:55:38 -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:a17:902:24c:: with SMTP id 70mr75952993plc.2.1560264938145; Tue, 11 Jun 2019 07:55:38 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:37 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 57/92] ram: rk3399: Configure phy IO in ds odt Date: Tue, 11 Jun 2019 20:21:00 +0530 Message-Id: <20190611145135.21399-58-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="PpXB/rrs"; 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: , Some dramtypes like lpddr4 initialization would required to configure phy IO even after pctl_cfg and after set_ds_odt. For those cases the set_ds_odt would be an initial call to setup the phy. To satisfy all the cases, trigger phy IO from set_ds_odt. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 327 ++++++++++++++-------------- 1 file changed, 162 insertions(+), 165 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 7251532ad0..a5fa41e498 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -189,6 +189,166 @@ static void set_memory_map(const struct chan_info *chan, u32 channel, writel(0x2EC7FFFF, &denali_pi[34]); } +static int phy_io_config(const struct chan_info *chan, + const struct rk3399_sdram_params *sdram_params) +{ + u32 *denali_phy = chan->publ->denali_phy; + u32 vref_mode_dq, vref_value_dq, vref_mode_ac, vref_value_ac; + u32 mode_sel; + u32 reg_value; + u32 drv_value, odt_value; + u32 speed; + + /* vref setting */ + if (sdram_params->base.dramtype == LPDDR4) { + /* LPDDR4 */ + vref_mode_dq = 0x6; + vref_value_dq = 0x1f; + vref_mode_ac = 0x6; + vref_value_ac = 0x1f; + } else if (sdram_params->base.dramtype == LPDDR3) { + if (sdram_params->base.odt == 1) { + vref_mode_dq = 0x5; /* LPDDR3 ODT */ + drv_value = (readl(&denali_phy[6]) >> 12) & 0xf; + odt_value = (readl(&denali_phy[6]) >> 4) & 0xf; + if (drv_value == PHY_DRV_ODT_48) { + switch (odt_value) { + case PHY_DRV_ODT_240: + vref_value_dq = 0x16; + break; + case PHY_DRV_ODT_120: + vref_value_dq = 0x26; + break; + case PHY_DRV_ODT_60: + vref_value_dq = 0x36; + break; + default: + debug("Invalid ODT value.\n"); + return -EINVAL; + } + } else if (drv_value == PHY_DRV_ODT_40) { + switch (odt_value) { + case PHY_DRV_ODT_240: + vref_value_dq = 0x19; + break; + case PHY_DRV_ODT_120: + vref_value_dq = 0x23; + break; + case PHY_DRV_ODT_60: + vref_value_dq = 0x31; + break; + default: + debug("Invalid ODT value.\n"); + return -EINVAL; + } + } else if (drv_value == PHY_DRV_ODT_34_3) { + switch (odt_value) { + case PHY_DRV_ODT_240: + vref_value_dq = 0x17; + break; + case PHY_DRV_ODT_120: + vref_value_dq = 0x20; + break; + case PHY_DRV_ODT_60: + vref_value_dq = 0x2e; + break; + default: + debug("Invalid ODT value.\n"); + return -EINVAL; + } + } else { + debug("Invalid DRV value.\n"); + return -EINVAL; + } + } else { + vref_mode_dq = 0x2; /* LPDDR3 */ + vref_value_dq = 0x1f; + } + vref_mode_ac = 0x2; + vref_value_ac = 0x1f; + } else if (sdram_params->base.dramtype == DDR3) { + /* DDR3L */ + vref_mode_dq = 0x1; + vref_value_dq = 0x1f; + vref_mode_ac = 0x1; + vref_value_ac = 0x1f; + } else { + debug("Unknown DRAM type.\n"); + return -EINVAL; + } + + reg_value = (vref_mode_dq << 9) | (0x1 << 8) | vref_value_dq; + + /* PHY_913 PHY_PAD_VREF_CTRL_DQ_0 12bits offset_8 */ + clrsetbits_le32(&denali_phy[913], 0xfff << 8, reg_value << 8); + /* PHY_914 PHY_PAD_VREF_CTRL_DQ_1 12bits offset_0 */ + clrsetbits_le32(&denali_phy[914], 0xfff, reg_value); + /* PHY_914 PHY_PAD_VREF_CTRL_DQ_2 12bits offset_16 */ + clrsetbits_le32(&denali_phy[914], 0xfff << 16, reg_value << 16); + /* PHY_915 PHY_PAD_VREF_CTRL_DQ_3 12bits offset_0 */ + clrsetbits_le32(&denali_phy[915], 0xfff, reg_value); + + reg_value = (vref_mode_ac << 9) | (0x1 << 8) | vref_value_ac; + + /* PHY_915 PHY_PAD_VREF_CTRL_AC 12bits offset_16 */ + clrsetbits_le32(&denali_phy[915], 0xfff << 16, reg_value << 16); + + if (sdram_params->base.dramtype == LPDDR4) + mode_sel = 0x6; + else if (sdram_params->base.dramtype == LPDDR3) + mode_sel = 0x0; + else if (sdram_params->base.dramtype == DDR3) + mode_sel = 0x1; + else + return -EINVAL; + + /* PHY_924 PHY_PAD_FDBK_DRIVE */ + clrsetbits_le32(&denali_phy[924], 0x7 << 15, mode_sel << 15); + /* PHY_926 PHY_PAD_DATA_DRIVE */ + clrsetbits_le32(&denali_phy[926], 0x7 << 6, mode_sel << 6); + /* PHY_927 PHY_PAD_DQS_DRIVE */ + clrsetbits_le32(&denali_phy[927], 0x7 << 6, mode_sel << 6); + /* PHY_928 PHY_PAD_ADDR_DRIVE */ + clrsetbits_le32(&denali_phy[928], 0x7 << 14, mode_sel << 14); + /* PHY_929 PHY_PAD_CLK_DRIVE */ + clrsetbits_le32(&denali_phy[929], 0x7 << 14, mode_sel << 14); + /* PHY_935 PHY_PAD_CKE_DRIVE */ + clrsetbits_le32(&denali_phy[935], 0x7 << 14, mode_sel << 14); + /* PHY_937 PHY_PAD_RST_DRIVE */ + clrsetbits_le32(&denali_phy[937], 0x7 << 14, mode_sel << 14); + /* PHY_939 PHY_PAD_CS_DRIVE */ + clrsetbits_le32(&denali_phy[939], 0x7 << 14, mode_sel << 14); + + /* speed setting */ + if (sdram_params->base.ddr_freq < 400) + speed = 0x0; + else if (sdram_params->base.ddr_freq < 800) + speed = 0x1; + else if (sdram_params->base.ddr_freq < 1200) + speed = 0x2; + else + speed = 0x3; + + /* PHY_924 PHY_PAD_FDBK_DRIVE */ + clrsetbits_le32(&denali_phy[924], 0x3 << 21, speed << 21); + /* PHY_926 PHY_PAD_DATA_DRIVE */ + clrsetbits_le32(&denali_phy[926], 0x3 << 9, speed << 9); + /* PHY_927 PHY_PAD_DQS_DRIVE */ + clrsetbits_le32(&denali_phy[927], 0x3 << 9, speed << 9); + /* PHY_928 PHY_PAD_ADDR_DRIVE */ + clrsetbits_le32(&denali_phy[928], 0x3 << 17, speed << 17); + /* PHY_929 PHY_PAD_CLK_DRIVE */ + clrsetbits_le32(&denali_phy[929], 0x3 << 17, speed << 17); + /* PHY_935 PHY_PAD_CKE_DRIVE */ + clrsetbits_le32(&denali_phy[935], 0x3 << 17, speed << 17); + /* PHY_937 PHY_PAD_RST_DRIVE */ + clrsetbits_le32(&denali_phy[937], 0x3 << 17, speed << 17); + /* PHY_939 PHY_PAD_CS_DRIVE */ + clrsetbits_le32(&denali_phy[939], 0x3 << 17, speed << 17); + + return 0; +} + static void set_ds_odt(const struct chan_info *chan, const struct rk3399_sdram_params *sdram_params) { @@ -333,6 +493,8 @@ static void set_ds_odt(const struct chan_info *chan, /* phy_pad_fdbk_term 1bit DENALI_PHY_930 offset_17 */ clrsetbits_le32(&denali_phy[930], 0x1 << 17, reg_value); + + phy_io_config(chan, sdram_params); } static void pctl_start(struct dram_info *dram, @@ -381,166 +543,6 @@ static void pctl_start(struct dram_info *dram, dram->pwrup_srefresh_exit[channel]); } -static int phy_io_config(const struct chan_info *chan, - const struct rk3399_sdram_params *sdram_params) -{ - u32 *denali_phy = chan->publ->denali_phy; - u32 vref_mode_dq, vref_value_dq, vref_mode_ac, vref_value_ac; - u32 mode_sel; - u32 reg_value; - u32 drv_value, odt_value; - u32 speed; - - /* vref setting */ - if (sdram_params->base.dramtype == LPDDR4) { - /* LPDDR4 */ - vref_mode_dq = 0x6; - vref_value_dq = 0x1f; - vref_mode_ac = 0x6; - vref_value_ac = 0x1f; - } else if (sdram_params->base.dramtype == LPDDR3) { - if (sdram_params->base.odt == 1) { - vref_mode_dq = 0x5; /* LPDDR3 ODT */ - drv_value = (readl(&denali_phy[6]) >> 12) & 0xf; - odt_value = (readl(&denali_phy[6]) >> 4) & 0xf; - if (drv_value == PHY_DRV_ODT_48) { - switch (odt_value) { - case PHY_DRV_ODT_240: - vref_value_dq = 0x16; - break; - case PHY_DRV_ODT_120: - vref_value_dq = 0x26; - break; - case PHY_DRV_ODT_60: - vref_value_dq = 0x36; - break; - default: - debug("Invalid ODT value.\n"); - return -EINVAL; - } - } else if (drv_value == PHY_DRV_ODT_40) { - switch (odt_value) { - case PHY_DRV_ODT_240: - vref_value_dq = 0x19; - break; - case PHY_DRV_ODT_120: - vref_value_dq = 0x23; - break; - case PHY_DRV_ODT_60: - vref_value_dq = 0x31; - break; - default: - debug("Invalid ODT value.\n"); - return -EINVAL; - } - } else if (drv_value == PHY_DRV_ODT_34_3) { - switch (odt_value) { - case PHY_DRV_ODT_240: - vref_value_dq = 0x17; - break; - case PHY_DRV_ODT_120: - vref_value_dq = 0x20; - break; - case PHY_DRV_ODT_60: - vref_value_dq = 0x2e; - break; - default: - debug("Invalid ODT value.\n"); - return -EINVAL; - } - } else { - debug("Invalid DRV value.\n"); - return -EINVAL; - } - } else { - vref_mode_dq = 0x2; /* LPDDR3 */ - vref_value_dq = 0x1f; - } - vref_mode_ac = 0x2; - vref_value_ac = 0x1f; - } else if (sdram_params->base.dramtype == DDR3) { - /* DDR3L */ - vref_mode_dq = 0x1; - vref_value_dq = 0x1f; - vref_mode_ac = 0x1; - vref_value_ac = 0x1f; - } else { - debug("Unknown DRAM type.\n"); - return -EINVAL; - } - - reg_value = (vref_mode_dq << 9) | (0x1 << 8) | vref_value_dq; - - /* PHY_913 PHY_PAD_VREF_CTRL_DQ_0 12bits offset_8 */ - clrsetbits_le32(&denali_phy[913], 0xfff << 8, reg_value << 8); - /* PHY_914 PHY_PAD_VREF_CTRL_DQ_1 12bits offset_0 */ - clrsetbits_le32(&denali_phy[914], 0xfff, reg_value); - /* PHY_914 PHY_PAD_VREF_CTRL_DQ_2 12bits offset_16 */ - clrsetbits_le32(&denali_phy[914], 0xfff << 16, reg_value << 16); - /* PHY_915 PHY_PAD_VREF_CTRL_DQ_3 12bits offset_0 */ - clrsetbits_le32(&denali_phy[915], 0xfff, reg_value); - - reg_value = (vref_mode_ac << 9) | (0x1 << 8) | vref_value_ac; - - /* PHY_915 PHY_PAD_VREF_CTRL_AC 12bits offset_16 */ - clrsetbits_le32(&denali_phy[915], 0xfff << 16, reg_value << 16); - - if (sdram_params->base.dramtype == LPDDR4) - mode_sel = 0x6; - else if (sdram_params->base.dramtype == LPDDR3) - mode_sel = 0x0; - else if (sdram_params->base.dramtype == DDR3) - mode_sel = 0x1; - else - return -EINVAL; - - /* PHY_924 PHY_PAD_FDBK_DRIVE */ - clrsetbits_le32(&denali_phy[924], 0x7 << 15, mode_sel << 15); - /* PHY_926 PHY_PAD_DATA_DRIVE */ - clrsetbits_le32(&denali_phy[926], 0x7 << 6, mode_sel << 6); - /* PHY_927 PHY_PAD_DQS_DRIVE */ - clrsetbits_le32(&denali_phy[927], 0x7 << 6, mode_sel << 6); - /* PHY_928 PHY_PAD_ADDR_DRIVE */ - clrsetbits_le32(&denali_phy[928], 0x7 << 14, mode_sel << 14); - /* PHY_929 PHY_PAD_CLK_DRIVE */ - clrsetbits_le32(&denali_phy[929], 0x7 << 14, mode_sel << 14); - /* PHY_935 PHY_PAD_CKE_DRIVE */ - clrsetbits_le32(&denali_phy[935], 0x7 << 14, mode_sel << 14); - /* PHY_937 PHY_PAD_RST_DRIVE */ - clrsetbits_le32(&denali_phy[937], 0x7 << 14, mode_sel << 14); - /* PHY_939 PHY_PAD_CS_DRIVE */ - clrsetbits_le32(&denali_phy[939], 0x7 << 14, mode_sel << 14); - - /* speed setting */ - if (sdram_params->base.ddr_freq < 400) - speed = 0x0; - else if (sdram_params->base.ddr_freq < 800) - speed = 0x1; - else if (sdram_params->base.ddr_freq < 1200) - speed = 0x2; - else - speed = 0x3; - - /* PHY_924 PHY_PAD_FDBK_DRIVE */ - clrsetbits_le32(&denali_phy[924], 0x3 << 21, speed << 21); - /* PHY_926 PHY_PAD_DATA_DRIVE */ - clrsetbits_le32(&denali_phy[926], 0x3 << 9, speed << 9); - /* PHY_927 PHY_PAD_DQS_DRIVE */ - clrsetbits_le32(&denali_phy[927], 0x3 << 9, speed << 9); - /* PHY_928 PHY_PAD_ADDR_DRIVE */ - clrsetbits_le32(&denali_phy[928], 0x3 << 17, speed << 17); - /* PHY_929 PHY_PAD_CLK_DRIVE */ - clrsetbits_le32(&denali_phy[929], 0x3 << 17, speed << 17); - /* PHY_935 PHY_PAD_CKE_DRIVE */ - clrsetbits_le32(&denali_phy[935], 0x3 << 17, speed << 17); - /* PHY_937 PHY_PAD_RST_DRIVE */ - clrsetbits_le32(&denali_phy[937], 0x3 << 17, speed << 17); - /* PHY_939 PHY_PAD_CS_DRIVE */ - clrsetbits_le32(&denali_phy[939], 0x3 << 17, speed << 17); - - return 0; -} - static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, u32 channel, const struct rk3399_sdram_params *sdram_params) { @@ -550,7 +552,6 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, const u32 *params_ctl = sdram_params->pctl_regs.denali_ctl; const u32 *params_phy = sdram_params->phy_regs.denali_phy; u32 tmp, tmp1, tmp2; - int ret; /* * work around controller bug: @@ -628,10 +629,6 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, tmp = (readl(&denali_phy[467]) >> 16) & 0xff; clrsetbits_le32(&denali_phy[467], 0xff << 16, (tmp + 0x10) << 16); - ret = phy_io_config(chan, sdram_params); - if (ret) - return ret; - return 0; } From patchwork Tue Jun 11 14:51:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 509 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CA6BE3F08A for ; Tue, 11 Jun 2019 16:55:43 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id 59sf7891455plb.14 for ; Tue, 11 Jun 2019 07:55:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264942; cv=pass; d=google.com; s=arc-20160816; b=P+odiXFslCxi1grR+EIs6kOqQ0zaC0GC62CGsJC3zjocBQe4XcDs4Z3o10l0FQIbZN +fR6KoJDYRda/QE+AKewumiaFmyhOm/WKnTdoHQG4XoQFTrVsSFgj6uS+od47bUt1Sec t4Jqi4AWhs04b2BJe23SbKQUL6hl7g/iiF521Ou8RlletmNqe9HsAjq98yO6gI04IZuQ eK/xfkj7wxMfpD1rXdv5daebMwtJmCkyneKCYftfi42dZ2tANSAZ8zXZ/TKUMg6P7OBu yjKeLQG3jXI4j5+jBMthf3xpP8SmKby8t7J9T9ua/a9KzgMc768ELIiRdlNdng2b/fmY HmxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=v6fO8BdpOTUTAApnVs35oaE7fiG1+ITpC6Q6cmmk650=; b=BocdHu4qZfnNl8WbdENomZvGmuN0/8lbxe8KzSBef6LJ5qNdWhjBkxSM+C+UhWvpgK 6P8Xp0YxABaOSbr2vhBsRl4QptW4VB3N8vlcViHRS0xS+MXqZkoI1ppMgroUQ90+SPJk y2gfRjzhloHOJIE0b1/Nj8Q1d+YRsx3rCXsSbJ86NqGbPZdg5GXidKM5ijMWsN5nrPtJ ATk3N+laSZLTjbMLdJtrk1CyK3k40ZMkLPFYrKLb8rOpNkWoZMV7uYyTNt4X105wQLaQ 4Q0ySEVcb+jrEt9m3crohSdeclvIcyYRoqNAPgIQR2CVo3HtvRF5J2R7Aacs2F/oqOFi miXQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ryg2ctVp; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=v6fO8BdpOTUTAApnVs35oaE7fiG1+ITpC6Q6cmmk650=; b=k0MWLOIpYBDKcbBi1VtFrz/2DPTc8yTwrR2CbdGJzMlw2AFsk4M7sOj/Y+KBY1EPrn HXj96J4Qs40bIbi6iKUBwdNsVcB8sB2upZx+uqWFAafquAbRTagQu5sftMe7aYlNLdOv kOt6Hhr2abYtRWS0//UUBXZJGJbBk8dRAaHjU= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=v6fO8BdpOTUTAApnVs35oaE7fiG1+ITpC6Q6cmmk650=; b=aKkPF0huQVRE0h1N1HHj4K6XPZY4HImw1X2r/J3NnhHX2L3PcRncDLsJcGGKhFGCG4 J7+abXKnyClHxrwN3AvWePhg3Vi/jArw0RY1CtX9yItwhTTxrU0etkERv/sEyvPt32Lb UNj2vNdcG9LLDpvwuA3DZbgHEyi1zsF+8Lexu+Iwe3vfa9WoDxJZ0jg29ehxxt8qNiSA rOlXdZm0njHxFl+TSYgjn1bVPmKz5OCPQwIe0htyIiZQNrDcFuKIrAyv+Bnui2SL0PKR g3n2lf12e2PGsEAHZ2601+ajf/fq9bb7VHhwGVT4TmLNaXlalGOHrdwD7Ip49Xj4VKGk fxMA== X-Gm-Message-State: APjAAAWHejnolpGuIYsn2iHaroXPB8RGq0WlrfHyRZjRkKitYVnFGvgk WQK+DySFFo9rWXr4fpGPJWJZBg2b X-Google-Smtp-Source: APXvYqxhuEhTerP7ZItgFJkAmBiNyOneXW1mBN5F6c+/0ShgkDoFKFhX3by4yGxYiP6phdl8CrSWaw== X-Received: by 2002:a63:ed06:: with SMTP id d6mr18284363pgi.267.1560264942479; Tue, 11 Jun 2019 07:55:42 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:e444:: with SMTP id i4ls4508286pgk.13.gmail; Tue, 11 Jun 2019 07:55:42 -0700 (PDT) X-Received: by 2002:a62:2cc2:: with SMTP id s185mr79403948pfs.106.1560264942158; Tue, 11 Jun 2019 07:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264942; cv=none; d=google.com; s=arc-20160816; b=NIut4V5/R9JHxEAiZZkZ8BnTN1/vqwtsWhIu3wJZJ+3eThjOAMybz89TeEAgZVwLTB o5/HBWxE+hJniDHpGl0inAE5+OgfmwLlPOkIOh2GcQqik6mz6P0I1dHnHsAO3uNGnSc8 HTC8SaFuM0UbGPpWB8ja88Z1xv+tL+0cIiS6+kRsAh83wdX+qU7UvStCYRw48+mz7QAV qhBrsieb9HSEpPjYs4O25M7Ubg5+frh7h+zKaRqlN0Ohl30g4MREi9WyqiQd7/A0uBYC iIMYYh/9TxlTcfFocAJQ0iNMl03ZZVfRk/3HUKFlf3pbkBjQHeQ5LPZOw0ol19aRTbWx S+wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ih+Anadf88MvP50WAMrcs/65Vc6e/HWE4U7h04mB5FU=; b=xVECyUtMm641BWHz9epNSIppLE1/l1w14bCtTZsb+gv8wMIOxVsGs3CQWI5LBV+lti 5+UoL+2noCi35yDlAl0qU3DnGcJQ/2YV7NdfHcBASI+OPruuXJiTZkEQ17Jc6YCzjKHf +5CT3noDX3abLfpU+tWCB5kOtdf/u634+7hOSk+R38SvK4orbxyBTGHaeMd44Qat8aMb bPiR/9ZX70DKwubEfGEaEw/QYScEmeBvELFidQjZledUWfFhsLqJo1f96z2vAcYOV9Aw vvD7q1bVdFzMbIY+iR/OdRm93DOgfWqj8SO8kZskLhL3uylRa82LaMEu2uPrsbkYT2vn emzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ryg2ctVp; 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 x5sor3268012pjp.9.2019.06.11.07.55.42 for (Google Transport Security); Tue, 11 Jun 2019 07:55:42 -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:a17:90a:372a:: with SMTP id u39mr27500295pjb.2.1560264941836; Tue, 11 Jun 2019 07:55:41 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:41 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 58/92] ram: rk3399: Add lpddr4 rank mask for cs training Date: Tue, 11 Jun 2019 20:21:01 +0530 Message-Id: <20190611145135.21399-59-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ryg2ctVp; 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: , Add rank_mask based on the rank number for lpddr4. This would keep the ca data training loop based on the desired rank mask value instead of looping for all values. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index a5fa41e498..004a4819ff 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -692,7 +692,10 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); - rank_mask = (rank == 1) ? 0x1 : 0x3; + if (sdram_params->base.dramtype == LPDDR4) + rank_mask = (rank == 1) ? 0x5 : 0xf; + else + rank_mask = (rank == 1) ? 0x1 : 0x3; for (i = 0; i < 4; i++) { if (!(rank_mask & (1 << i))) From patchwork Tue Jun 11 14:51:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 510 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C036D3F08A for ; Tue, 11 Jun 2019 16:55:47 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id s4sf4448756pgr.3 for ; Tue, 11 Jun 2019 07:55:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264946; cv=pass; d=google.com; s=arc-20160816; b=NRWsyCXoblg9jhkSZ4sXyqYrFuHP+CTe4KpJbZJ2TrJuv8IqidOAE1DrJHTqTq6mcj eqjGwfMBKX4YCbdK49WAoqH3+19AxPOzHxbROsnXE4llamU0iSLGZfZK1v3/8eSL0KmS aVWkrBkCFT3Z0EDEpDv1tYIfd1/haN63+VKFZmEyYRh97iBDjbPI+LpWm4E3FvBdlnhK S/Rl7P+s4owvados5pAHGuF4nW1ZKWpL9PBxAERSeF3WEuzvmgl2uYPkJerGeyfPDCNU OQj9y1uL+NP3ZRQf/rYKb7umQOjSyIPqSql3XTVj0z7I8+Mfx/COAjaO8EVlj0XVTJJm uRqA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=RaeCnHi06idj9vQSXbTM4yitf0Iu4nzVp7ok3IKAf1c=; b=htMgOBMqsRNnFw04zZzh9RwBZdVj7Yn1AVpN8Iq9GbHQe4/9waoIZBjTG2rnuzbFqx M5erzvsJ9nEsMy+iE/5Q+bpRwTMkUAmRRjUCr/ajthv7h0IMSQMrPUawGjaMArSZWhsG s0FGKi7JRodLBhaZl2J5+CFl0wBAyc97vtbBhAaO9qIW8diZOh0xlS31kR0bWltYW3Uq vLlxn3VWqCfasBxGZqtpXby1as3PSu3IYQ6YCsEFEcYik4zFnAZof4v0zgk2MKDAT7Ne fH5017PqMh9pxC1sJuS5pS1ejIc524Jh1LBrWgW3cWFmHs/gU9cNSpPUiIdNznJgVxzD WBRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JKfm4La+; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=RaeCnHi06idj9vQSXbTM4yitf0Iu4nzVp7ok3IKAf1c=; b=Kfy44rkP8tkKN7256yUIkW1XbS9ObFRs0SJx8weY57i97Wpt04HYanFO7tGvEtA6Ro GIs3oOjVBSdt9hMxvJC1Plr2s5qfifStPM44xvZ+hKsP0Y0y9pKgDRiy6Ja6yTwG0oB8 O1d3bXThPlRHwB1Lth8i0oFyd6XOOotK+zEGk= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=RaeCnHi06idj9vQSXbTM4yitf0Iu4nzVp7ok3IKAf1c=; b=VtVCwupfeGJ2WgNvUFydiOSGyQeF+3rGCJm5vtmrTvz+z3cDo6v8JKvtxEy/XSCOC4 RYX08mfdgfUmlMDQ98L6cNgBib2E1xGARENjeiSQlftaqwry0SyFBGtHloLN62an82Qs s78ePJkbg2FE5fELsfTzRLCXov8z5ep6PynWtXqBnGswSy95yMkGVjJAtDyLkLJvXf0B GRx0/5JTnj4deu2fcJI3mVBnuBdS0WHJXy+0UBomHB94xJz+ANAD63eybUhEFPL0dB4F c0QnRfuvab7tiud8OteM6yAsQ6MDGDSOJFi9/9AAk3fLJmmyTdcgLXhZQ4djY6RNotJH MnxA== X-Gm-Message-State: APjAAAW8neIladwDdO3q6aTytdIJMDcqxlXelOLBNCnKIGAro2aetnvh SA/c+AM7Bg9yFRCEevQSe1TD6TJ8 X-Google-Smtp-Source: APXvYqwMjxANj/EGiGl9Q14cDY4wP6qrPG0KM1boHeVt/cgqstjdCkf6ShO1TsqszkcFzjKc2Fr/uA== X-Received: by 2002:a17:90a:a596:: with SMTP id b22mr27445111pjq.20.1560264946631; Tue, 11 Jun 2019 07:55:46 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:1021:: with SMTP id b30ls2010149pla.1.gmail; Tue, 11 Jun 2019 07:55:46 -0700 (PDT) X-Received: by 2002:a17:902:934a:: with SMTP id g10mr65790152plp.18.1560264946290; Tue, 11 Jun 2019 07:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264946; cv=none; d=google.com; s=arc-20160816; b=EbHXgatsKYx2viARHkLibh5od47ycC/W3UhEOTM+kvI56b8CRAN1xXn7vYHJSP/foJ d+eZRfP6oz0BBmWhOhDZJ4XxXxvKXzQdF9CNUg9rucjUy5Tmqhbq1E6g+bsN3Wf/liPA nS28L6tyJUrrGT9gt3oYGLfHhYg/GswCkSYPQhrMEqLWDLDUc5e6bhbFzs6mgZBs3g6j u3yC/K2/TXh3WiBumm/Rx7yky+DlJv7476dr3dKu45s6CS8zcarek+oXDrARDQ4CdP/k Pv5q4dQGBRr6YJbR+qoYLYF6y3Esrrm2p2EWJTLrr4ZjSvg7BPX94ZRtc7rRcSlQXYzu ZHaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YPsDuHwMsZEcSjNyEXX3p/fPEQA09mtws/4GAANMYcA=; b=kQLClfccZPhLJFVrTVOwrOqgO3YKCjHR01GSHq88e7UGlXojKNSJR/jkdKS2zJFCUn OD4kjBOYWE5N+Opo0Qpb0lpZvCp8QtnLg2w0QOdxUYy5zOdIig2I1PuAO0QB4thQalZP VAYy/Wzyp9yTPnT//7k32/fZEgJKWLoWfB8iy5DOaI0hMi9VWspikJnQ2c0aLsPSXSYD GkKcX98vZvyOS0FzRfSwP6cEBAgUxmwoqUnD3TFPMtHzOvlEqKM10Jpq1+1hV7hZJEgi IicunlloGAv7gnaPBCvULPopfSOXZ5C8aygecVgK5GUY8GMELJMqW1rcnd7BNG53JLNC d0SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JKfm4La+; 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 c16sor11934267pgc.40.2019.06.11.07.55.46 for (Google Transport Security); Tue, 11 Jun 2019 07:55:46 -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:a65:60c2:: with SMTP id r2mr20317319pgv.156.1560264945964; Tue, 11 Jun 2019 07:55:45 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:45 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 59/92] ram: rk3399: Add lpddr4 rank mask for wdql training Date: Tue, 11 Jun 2019 20:21:02 +0530 Message-Id: <20190611145135.21399-60-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JKfm4La+; 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: , Add rank_mask based on the rank number for lpddr4. This would keep the wdql data training loop based on the desired rank mask value instead of looping for all values. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 004a4819ff..f80c8a424c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -930,7 +930,10 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); - rank_mask = (rank == 1) ? 0x1 : 0x3; + if (sdram_params->base.dramtype == LPDDR4) + rank_mask = (rank == 1) ? 0x5 : 0xf; + else + rank_mask = (rank == 1) ? 0x1 : 0x3; for (i = 0; i < 4; i++) { if (!(rank_mask & (1 << i))) From patchwork Tue Jun 11 14:51:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 511 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1D5173F08A for ; Tue, 11 Jun 2019 16:55:52 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id d125sf9786054pfd.3 for ; Tue, 11 Jun 2019 07:55:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264951; cv=pass; d=google.com; s=arc-20160816; b=M1o9G0ixGmyWgDgO+P/qF1OqKX7fduOAYIKKE9Sqcbf4eVS/WimyrMICf7NYY2S85q 8PU+X7UMDQ3UtlUqWYmyKcGK2xfjkJWxNeuCdV3nWO7ptOuBqKPMZ+4kNGliUt61QeRe AqhcyA5ae5a60FzEBeTAFB1SUjcayy4vajZYWFLQ0/+pagzGpKOR4MW6Y+j2TUvjafQe g8mugZ7WaiRvAFuGEe4bUr9Hm0kGJWnwW2xMETFrut4vWrE+eoKNPM5rl70IDhRyRB/8 q6Nlg68bTP7gPgRa9o3STZhDfxZ09OGalLyiylInIP21MGNqPVljKLRgbqtpm2ef6B97 IlgA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hBeEhiCEhJd0uv3jN+VhK5US3HPd4aKz+zpcyK1ZcrY=; b=yzj0OPzbQJ2PBAuS7tRMUqk2v33EjVlLQoSUynDQ5pTYkvopBqogu/aq0m9HJs/OcL +pZsCV0Cysa2v7ir9n+H9mbsx98+SpalV3ZeZ90f9YVWhAFRzjA6KeLuBEBzUaDocs9s cItQsyV0JkubfMmj0gG9wC8MHCy+GPjpVWNKUYjjMqkbv1O2FCuVqPMiKaKaWbtvTaHu 26Dldtd9tD6Ep+78/2pb/sYr7SRcCXC8fblMQ1LD/iH7atvPJBvi8TESTcTyar0opY8q 38rO3eI7EgJ6pYFUm0l63D4+H9D5bPiITKRTJ9daz8Pgv8rbK4wMBB5441tQLW32uGZo jsng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ep8QmzA4; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=hBeEhiCEhJd0uv3jN+VhK5US3HPd4aKz+zpcyK1ZcrY=; b=dLpFWfXyW9vmzVID/zMVUQg721ZALmSEbfSGe6MLZiMxurpPELLwZanzLt/bikGvdL mDH9lIF/uSb87Z8gAebaX9qIyP1e1DTJxAMirryDxXoT0/x/SSLeJSjX1HB+MWJwcFiw u8ya11lf0XolYMhQ7HgTVuX058FUz9841Jnso= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=hBeEhiCEhJd0uv3jN+VhK5US3HPd4aKz+zpcyK1ZcrY=; b=G73qlCeB2RjEHiB0Uhph7C687YZcIjrxx1z/fEPAmBEtI1nNO2pQfOuY5hIbzlCxj4 asDdJRcn18LhssW/H43A9DR3hxzlCRu61UlwtE6F+4Fu//nHNNMGBwNkMx94AfKt90XU 08FEdmuqtX12r1iZbGrB40khnuXgvboH0xjyTcmusxYTNigX1ciR9INUVo1IbY0twtBQ D7+vUz2owDmwO8O+Cf6G1n58553hIYxSjvr5kjOokFGw4Adg4+gn4JC+zsVWfHJyj1B2 3KlhQfO1qnCuqLnGbIEA+9rmWHNfY8odUtyr4mfceicIlkvJPzu2jU2Z4h/+nZ7kIjkf j5Dg== X-Gm-Message-State: APjAAAU8iNp04CiRFtbqEzfOhBL34iTPB9DhmIcKE65ZQVB82dOwqtz5 TNpaXegVIUvsdjscU9RnVdNchvtd X-Google-Smtp-Source: APXvYqyQ0tp3CZBjFwI/IMyAAiCzTVJVMSKhwWX724OtzthuMKWF+iqw8ueHXVERM5TKLhRd43N/bg== X-Received: by 2002:a63:1650:: with SMTP id 16mr20779764pgw.164.1560264950851; Tue, 11 Jun 2019 07:55:50 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:2670:: with SMTP id l103ls859422pje.5.canary-gmail; Tue, 11 Jun 2019 07:55:50 -0700 (PDT) X-Received: by 2002:a17:902:8f87:: with SMTP id z7mr49766780plo.65.1560264950564; Tue, 11 Jun 2019 07:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264950; cv=none; d=google.com; s=arc-20160816; b=w0yMeRP1x68GUsOawt7cuCFQl/A92WvqdPiHPIVikh3zJMKa6YdABEqKPnhCVM24Dq nOUAmcpR3M10kI7WM1lY/Ufn7TI7w1MMsua0SyrWI9iOSDYQAbbtrWKSlmXqqYGvVShm w0Iqn2yP4tK6ZS+xXqyopxVgf0CWwOGGImGcqlhDm5SXGRLRKztGbmpJWcu3iCJe0UPY zwVbevJIMHgtj6FrIjgD6WfniqhokPHyfzUos0uAu3ALBkyYAA62eWHwJ4jHUoIUm0CJ yb+RPjvJpp6GuDQTSxqBOrs6k0njyZqwU5GkqxdoSsCoWC/x+8EPQF+of1y2YnhON99w YTMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pvtsocxqtDyRVeeeF9ZrknNra8/8DhlqqO3pIq4y19M=; b=UwA8nzGtIa/xLCuAJtIbeM/TmHgueScAh5opTlASeT1FfMfwH8w36fbmtTCqxHSR+i ZDXBlhLIcf+oh4q7ds9ztGZhi2fT+A+nfWcc8ZsKIjoW+05dPp8KAQwDqmFiIm1TTqzj N2urWBNBQFYeSt0rMv4Y03lIeswtz7kLoj8hpXxhwQiV2LY9A25tWBkLPLACWmImQhiU V4RcAvrNyuAUNfBHDczgIiVbWbpskVvghriIQafkaQy+DwyP9l+vmyXb3tvPfXWYeljY W6PHOP2bG0P+rhLKx524JL7VZNRHP/b2LFjA+1ChHvdrRj+dITkGXWGtvJiT9aiY4r+S H7Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ep8QmzA4; 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 b2sor15753478pls.45.2019.06.11.07.55.50 for (Google Transport Security); Tue, 11 Jun 2019 07:55:50 -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:a17:902:70cb:: with SMTP id l11mr15504710plt.343.1560264950254; Tue, 11 Jun 2019 07:55:50 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:49 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 60/92] ram: rk3399: Move mode_sel assignment Date: Tue, 11 Jun 2019 20:21:03 +0530 Message-Id: <20190611145135.21399-61-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ep8QmzA4; 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: , mode_sel assignment is based on dram type. In phy_io_config, already have vref setting based on the dram type, so move this mode_sel assignment on vref setting area. No functionality change. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index f80c8a424c..d399ec8e38 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -206,6 +206,7 @@ static int phy_io_config(const struct chan_info *chan, vref_value_dq = 0x1f; vref_mode_ac = 0x6; vref_value_ac = 0x1f; + mode_sel = 0x6; } else if (sdram_params->base.dramtype == LPDDR3) { if (sdram_params->base.odt == 1) { vref_mode_dq = 0x5; /* LPDDR3 ODT */ @@ -266,12 +267,14 @@ static int phy_io_config(const struct chan_info *chan, } vref_mode_ac = 0x2; vref_value_ac = 0x1f; + mode_sel = 0x0; } else if (sdram_params->base.dramtype == DDR3) { /* DDR3L */ vref_mode_dq = 0x1; vref_value_dq = 0x1f; vref_mode_ac = 0x1; vref_value_ac = 0x1f; + mode_sel = 0x1; } else { debug("Unknown DRAM type.\n"); return -EINVAL; @@ -293,15 +296,6 @@ static int phy_io_config(const struct chan_info *chan, /* PHY_915 PHY_PAD_VREF_CTRL_AC 12bits offset_16 */ clrsetbits_le32(&denali_phy[915], 0xfff << 16, reg_value << 16); - if (sdram_params->base.dramtype == LPDDR4) - mode_sel = 0x6; - else if (sdram_params->base.dramtype == LPDDR3) - mode_sel = 0x0; - else if (sdram_params->base.dramtype == DDR3) - mode_sel = 0x1; - else - return -EINVAL; - /* PHY_924 PHY_PAD_FDBK_DRIVE */ clrsetbits_le32(&denali_phy[924], 0x7 << 15, mode_sel << 15); /* PHY_926 PHY_PAD_DATA_DRIVE */ From patchwork Tue Jun 11 14:51:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 512 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CF85B3F08A for ; Tue, 11 Jun 2019 16:55:55 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id i33sf7900959pld.15 for ; Tue, 11 Jun 2019 07:55:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264954; cv=pass; d=google.com; s=arc-20160816; b=CMZ7GI/wN1dxc4GJ7I07CzHTnui4K3oA2yYKsVRXh3kdXo6nhcYZVhi9Copk+KINXf dv0YAH0JF+8ZWsHojcfGDLYhAiB23yht5ru9Ppsxu6bwH/b35L6P/e3sMCbcGyFL2QnS mFtsAXZRhGOCupnBQjlLzZlZJrUUzJivr/EAVF2E/vdxNMDoE3qrEzZyI+UIWq/lj/hU Lw6QgSiLz4AhrriByg/JjXHq1X1uZfXhzavWheMjl7RimO8q82eKDdpEY9U7K0tMJupg KQjDzKmHdlSVzgUW117oYSCz9B7bxAavUpv3ydEiS5AHSrNza/JouJvrfpCyFhCSoV6+ RjcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=J25cawgiNUKjFO0QViuQs9nhQepOojdv9sMzJG2dGBM=; b=vXvQdniRO1eFLSYZiCpNT8rBVuvQBbe0XaXAqNBnO2H/zcl3a10C2F400/5KILjXct l1UoVXSCGd3wkytYaQsen2lv1iulTyf5cTW8i8pJcS+6McCC2QBeyEb1s+SKVZVm5YGN OYG0z7uBtSLwEe1XMtV5UHMG3SPUAhG/+IJP7x9QFeDQCpg4I3VQp+zUg2E3g6NdydtZ IAh8X3jU2api66r3vMw41NvmOidm5Yml+BUqitrotC5RkftCSTZ6w+fBINoYc+x4rM+o pBJJ1rtm0oYbNqahoIUEedoMLDvM6iaIA0CDJC1Dem0eQfvUG8No4bTNjVaadb1jE1sJ CHzw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kCYanFe7; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=J25cawgiNUKjFO0QViuQs9nhQepOojdv9sMzJG2dGBM=; b=iBIh2phVKBPJ+ra8ZPu1qsgccUUQkONERgHUOvXestkoKRdwNoR7Fe7MAiWnLK3qCa iz0SMUTiOEZewtAtBw9HaM/rAyMquxbcCjNYAnmkPUmmLJAyU6Af2nQFJvs1KS57xNxM tO0tWAfOzT7EeicZvhuT+sg0Qw+BjUYvTvQz8= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=J25cawgiNUKjFO0QViuQs9nhQepOojdv9sMzJG2dGBM=; b=kpZkrclA1PbaSKacxuH++v3FlapUZP7c2GXybhUPo18XQUrpUC1b1do8LX76b/Bacv r02C/oaHoXFm+vgeb9ZFKxlCYV5Ao/7BOfvgIlt0kJEJN/fxgaEa0nhUhq4A8wSdSIUb Cv8F7HmxWEIFVCFBv+o1SgwfHZ0Ryfp10hzE137RWFKjttNYKui+zhxqf3k0wAV95Z4u tXKu8Gey8I8ZI4ccDXxFKbgC33tb/SYHDjhUnQN3SIFDndpXwE6gcCLAXVX2lpKSPSMl Hz+exk2JGU4k0b0/2X/TXTyGlgLzUpVzw7Jkj/hl+ufjgNbKTYFO3HzzQNGYliacldED XLXw== X-Gm-Message-State: APjAAAWlmHmBppSKpYvF1Lf9XdkXO3r0f4X1AGup0Uv04mg0kop5nASo jhGmkEcASNOCCEKpXwm7w9rtZ/o4 X-Google-Smtp-Source: APXvYqy9pEKV+XFaGyd5ipTb+Zv0FSiI/Wi++x0vPAJzCIuEWx1UaoVW0IltU40f6hU1vGCFXTzpvw== X-Received: by 2002:a17:902:9a84:: with SMTP id w4mr77218063plp.241.1560264954585; Tue, 11 Jun 2019 07:55:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:1021:: with SMTP id b30ls2010202pla.1.gmail; Tue, 11 Jun 2019 07:55:54 -0700 (PDT) X-Received: by 2002:a17:90a:376f:: with SMTP id u102mr8300735pjb.5.1560264954283; Tue, 11 Jun 2019 07:55:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264954; cv=none; d=google.com; s=arc-20160816; b=07kAxj8CdiJEGFyuTnT2sF9MG/I0c1aU7vRrqGd+vGihN/K9ygCjaIKH1YvvrblwCe PJt3LNhPGHLACzegwlSHut5iF325z+QQQ/dzNvnYaL8YQgHqaxMl/z75rXqSGDzEGjft yYsb6yQc7Cys3PGr0meZYtfSNgYf6n5H0U+fr0S4YXOPWXiJQK1KqT7l3Mypjcs8zPCv VDUWqhMfNuIhHU0Bd2ItI4VCAn1tUAk3j/GpgmJuSyqL8urrqKpOy83wuckFRdRRm6RC Rw0hSiCVf7+BzdAXjRmJ5PrVBWnPbgKPwD90oxudFANTUyKD94hxQ0j22kA/1M3O0GRQ TAJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Rc17BFgLGXaaIgQA51MwKypvmo5RpUkXna/erYhtptg=; b=qOPvOSAtxn1aLebZGEFis2/9MPGOHB8wu3uSunr6xtNQKSd4nme4XfXVb1XIw96wjj pfP+AtypNfqvUVrFerg9bNzj1oRJ08jkaOEIv3ArBR1R/AYA8CdFV+nKX+d94/dkdCyt P4lCmJvezdH6ix80iZX3bh/hIk9IkYTxN3Au3ZQKI9nogJA+hcZ/ha5FNaSOdJIaL+Ea xyfmkJGb5H531KqnceQ+7/lCQJFcfCDldfI/Ebg++I+rdvBxxGdtG/Xqk3+SbdO1p93Y yeEzgoOEUHoPDFPZC8/W+f1sJWEbGESjNp34A+1XgcxB0ER2CfrNhZJZcfJyuVCcFIm4 G02A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kCYanFe7; 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 l7sor11989141pgi.62.2019.06.11.07.55.54 for (Google Transport Security); Tue, 11 Jun 2019 07:55:54 -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:a63:794:: with SMTP id 142mr12485448pgh.157.1560264953912; Tue, 11 Jun 2019 07:55:53 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:53 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 61/92] ram: rk3399: Don't wait for PLL lock in lpddr4 Date: Tue, 11 Jun 2019 20:21:04 +0530 Message-Id: <20190611145135.21399-62-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kCYanFe7; 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: , lpddr4 has PLL bypass mode during phy initialization phase, which does all pll configurations. So need to wait explicitly during pctl config. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index d399ec8e38..3d26cede77 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -575,16 +575,22 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, setbits_le32(&denali_pi[0], START); setbits_le32(&denali_ctl[0], START); - /* Waiting for phy DLL lock */ - while (1) { - tmp = readl(&denali_phy[920]); - tmp1 = readl(&denali_phy[921]); - tmp2 = readl(&denali_phy[922]); - if ((((tmp >> 16) & 0x1) == 0x1) && - (((tmp1 >> 16) & 0x1) == 0x1) && - (((tmp1 >> 0) & 0x1) == 0x1) && - (((tmp2 >> 0) & 0x1) == 0x1)) - break; + /** + * LPDDR4 use PLL bypass mode for init + * not need to wait for the PLL to lock + */ + if (sdram_params->base.dramtype != LPDDR4) { + /* Waiting for phy DLL lock */ + while (1) { + tmp = readl(&denali_phy[920]); + tmp1 = readl(&denali_phy[921]); + tmp2 = readl(&denali_phy[922]); + if ((((tmp >> 16) & 0x1) == 0x1) && + (((tmp1 >> 16) & 0x1) == 0x1) && + (((tmp1 >> 0) & 0x1) == 0x1) && + (((tmp2 >> 0) & 0x1) == 0x1)) + break; + } } copy_to_reg(&denali_phy[896], ¶ms_phy[896], (958 - 895) * 4); From patchwork Tue Jun 11 14:51:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 513 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 04DC23F08A for ; Tue, 11 Jun 2019 16:56:00 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id d3sf6360283pgc.9 for ; Tue, 11 Jun 2019 07:55:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264958; cv=pass; d=google.com; s=arc-20160816; b=n4KQ3qkiGa496vLfHem6Ntjjq9mywnhmoVKJoU5v77tXAxttvdqvgPf9g5w/NO5TOQ uO0LdYeHPZDyv+boic83o0O6Z+vVC45hjGijIYfilOz9frMxHC33LBN1hhUfmQLuX9Mf iEmtwOF+L4EwqXULSDqbea8PzUQKYhRbsXmlus/2DupmntYfn+muYN/9WiQYLPYjFLN8 cHgvJE+Aujbg6gnWYSu8H8oVhkUmPxE9cFsLyctiOGN4zTqpBxGiC0ihyFpg7ZE0aXCb vJGMuDBtGT7g8kc3nZgTCAAVOdqEqkaZBb4lpVW7/LJJvStouCQvq8tQM6wucZzeMwRL Dqkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0HR1aRfWemY4Bv4UDrHX1DffExcS1DJCA/FSESkJ6n4=; b=GY34PPvZYE8dLnNb/nTmfsPXrl4iQWrvuh3dvQqwKzo/F+9ownH0I96eK5ZrYaxwGY wDFB6r4VL100LTZlOdkVeyLCvs5b2yGXM+EX1c+u9EjSnlzMlEdK8oXHASsHcXSOWPXz TpUKGPwIrS0w6FVdA/rYyKrbWI03lhRBlCYIgwhY88b4Kz37mzx38zglRbaCrM3kh96w UlkFk0O+YJyoG/ftFSPT8ce6YAR+5N6sy+8sQfo3sq8nnNXE4Hq1v3uLeNRPLAbJzITq cm6mgNH9smsx8iKqbx8YJChhGYHmHO412JI8HVTpdzGrG/Sel4AyiWQiMd4M4C7xY7B0 bPXw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Wug8ICFZ; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=0HR1aRfWemY4Bv4UDrHX1DffExcS1DJCA/FSESkJ6n4=; b=UKhLjzVqowL9C/cj5Fs//MarTKbzPAwtYHxCe5WQ3zVEuTU6+zjDKvB+Zj2Bi95yPY bFeil7kcXY4DkABj1ef/5KycO6GdOfKt2wqc/J8wCLIPmUjcFNa1n+eBsRosFHGK7vjB C17oOD4vQDzuFxsV06hxQ1ECApE+isahyyGgA= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=0HR1aRfWemY4Bv4UDrHX1DffExcS1DJCA/FSESkJ6n4=; b=RgfQvTolmALjMw3wTlaLwiSPIu1Kyg84+3PkhiXNeSPfAlhOiGHyQCzDU9uzSa6s0N DFBVaKcA5D5q6ILtbhme6bG5AuXWcpWWU/Z2MtY7b5AMwnzzOos2AxUjrNZIRvDRCOfc fIhIWi8vRl8HZHc8VrzL+NBRVGO5/FMueqa0S2L7o2QVKiI1bkabMB96t7OtEE8ZIXxe 066a2sipfiPvATy/8cxo74GT1fZeYjS5UEMRC2kar8I1cVFVyakmvjMLfkX17xZu0Cax fw0K1+zIqmmRPSxJBzL5aj/7XZhWzvZ9HH/SovqhtocHUepiRzxW2zNBqL6FqS6sjCik Jp0Q== X-Gm-Message-State: APjAAAWw1LIXSsAU44O7pDOiWrNQXzKtZT/zi5V6rwpkcaf2I693jqwb xS5jPCiT1zpgtriInFWFOGZa5CAN X-Google-Smtp-Source: APXvYqzAUZ0gl2orHg12VnLaDq2p1R/Hp77SByctpkrB72AHgXUY1gM6ymhbOpXdDjngko5BD50rfQ== X-Received: by 2002:a65:5302:: with SMTP id m2mr20355408pgq.266.1560264958714; Tue, 11 Jun 2019 07:55:58 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8609:: with SMTP id f9ls4897878plo.7.gmail; Tue, 11 Jun 2019 07:55:58 -0700 (PDT) X-Received: by 2002:a17:902:9004:: with SMTP id a4mr4407157plp.109.1560264958333; Tue, 11 Jun 2019 07:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264958; cv=none; d=google.com; s=arc-20160816; b=qw5IlG36DoKk6JHcpeQ266XTNEaqk3sx1A0mZrrBR9KMEQQ8eEqjRx8C2MBs9rTera 6kclPdJmLepTWujaIzEPzjWGBHLKFjz+dAvQ5cQ4SOoULGc5KsxwUic7PyBiZhkjO4ok iDG7MMkcfDONy460xHwAPIZ8q+l9paTGEO4HE8JA2a5T9DgVJZkkCM3ZiKCNxANLrMmS C+JeYBqXFK5tORUXg6858JsOgfoEsZGS39iFuN51BVvppvTQh0mJzKhWMJ5m4m0xJRIQ r3CM4yxSNiPyJZ881pfRiDziug97LYeoETvKN887VCyGqR6e9cxGNWmdd+OJW8YSszq1 G4UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=C3pvVFe0j7lJkswUINInjiKgniwvXCUL5KajZ1QFEME=; b=U0YsFopay9ugPCQtHXGijSqbHl1pGzSSpPnGXZKPz4O1iqeiAJN1SRVXnug4GzxNgu b0e7EZKzw+XRDrOnTitLGInQf+hBhiTFKZ12pDKejQQAhSg46XMKVfbwp8jQ4Bcdo31U E5yyqZmoHx1YT+dqOZ3GbZ0W8S4c4RHpc9gVRDZJzm1/CpsMlNVLG5A15dz6LfQyVlAy KhL45o1IZPnWN3m6LrdbovD6T8WvxXItENUymDbNne0JL/uv84Z1v4YFQtvD3+xgqeH+ xIIPsIrx6hfZquNcEnRh1KiEMAWRPTopbfPXIP6BiBJ/pZAIk6Ap9MWIazKxSuYPaeE6 /18A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Wug8ICFZ; 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 ce3sor3187521pjb.12.2019.06.11.07.55.58 for (Google Transport Security); Tue, 11 Jun 2019 07:55:58 -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:a17:90a:2244:: with SMTP id c62mr11228065pje.29.1560264957974; Tue, 11 Jun 2019 07:55:57 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:57 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 62/92] ram: rk3399: Avoid two channel ZQ Cal Start at the same time Date: Tue, 11 Jun 2019 20:21:05 +0530 Message-Id: <20190611145135.21399-63-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Wug8ICFZ; 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: , It is possible in lpddr4 dram, where both the channels would start at same time with ZQ Cal Start. If it uses ZQ Call start then it will use RZQ. For example LPDDR4 366 Dual-Die, Quad-Channel Package, RZQ maybe connect to both channel. If ZQ Cal Start at the same time, it will use the same RZQ. It is not a problem of using RZQ in both the channels, but can not use at the same time. So, to avoid this, we have an option of dram tINIT3 value for increasing the frequency for channel 1. This patch increase the available tINIT3 with existing running dram frequency. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 3d26cede77..1abeee7198 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -555,6 +555,20 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, sizeof(struct rk3399_ddr_pctl_regs) - 4); writel(params_ctl[0], &denali_ctl[0]); + /* + * two channel init at the same time, then ZQ Cal Start + * at the same time, it will use the same RZQ, but cannot + * start at the same time. + * + * So, increase tINIT3 for channel 1, will avoid two + * channel ZQ Cal Start at the same time + */ + if (sdram_params->base.dramtype == LPDDR4 && channel == 1) { + tmp = ((sdram_params->base.ddr_freq * MHz + 999) / 1000); + tmp1 = readl(&denali_ctl[14]); + writel(tmp + tmp1, &denali_ctl[14]); + } + copy_to_reg(denali_pi, &sdram_params->pi_regs.denali_pi[0], sizeof(struct rk3399_ddr_pi_regs)); From patchwork Tue Jun 11 14:51:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 514 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B25613F08A for ; Tue, 11 Jun 2019 16:56:03 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id z15sf767292pgk.10 for ; Tue, 11 Jun 2019 07:56:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264962; cv=pass; d=google.com; s=arc-20160816; b=QjGetIFDoKJs2YQL/bZDshHOvgsN9XSJMO1XS/vua1Y0+nWUqUUAK+HcGfAMP9uVxi CeLMnTCICI87zANbt2hXM28gzQVyKjeTuR9j41av3zaquCiOKy6nYZMK6M0LrrL4w5Iz MGEgUh08NSTVJZ7nv7whD+Y6R4TF7dPLBlGqCKBuPorj296Y+wqVK9qGRSTR9O00LzV4 9lSzQdCyJ7mA5e2GyVj/WgHgXBehnpTugCa3PE3q1b2r6hwkQGwkTpWxGR8+oSPLn2jS FQBRmFrAe5ZGBtajmEw0NLsxMc5kI/Bjdit6HVrROThwxvziEh0orYRYjHZrGhafKjSa DMoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=WnEAZzhjfXDX42Ky8/p12Gwd+Kn1vvYeSZ2400TfGbQ=; b=OF2Qehc4r+MG5V2/cuVmwTTK958LxZGdkRE771UYoTUacMSikxJoR0h6YIek8+4+dK HvmJ1msLWaQ2H2kdFdJwv+x50/vb94vfbnNLkCQWcpXyGQ9xb+3g1YWuwJM+yLKM/atU lR/pzKgMWyq35eUcsTTnwVLCN+JvCx5DvX0dZIKLVYyRBT0LszQNNhHRqp7PrEbHGXBb k2RpCDgXqonHaJShC2thoESlmVB5lGumX0kdekvaqJauoMPd9myoPXqS0FG3UL7sQGZP R2PoM2sX52QzdlV5mnFrFYgoMENsvxCiPXDefOgQIHnwAQBzhm2bUeKaq3LyF8KqgBVV qcbw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ptWmYvW2; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=WnEAZzhjfXDX42Ky8/p12Gwd+Kn1vvYeSZ2400TfGbQ=; b=CpkSwwT7M/sInD1iziPL1Kjp4e9zrIbzXNJbUgFK1Abzf9rxL3I5uk3o0YZ9HSUiYb 5dQnJmGic7Ss+LtOpn77ftFyiD5MQMHrDR+jmFENJRxos4RT7nRAOgUYcEhgDaiK7D/c dKX+JigtEpvD3t/JlrbONBWYsl6+Rm7cxLMqw= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=WnEAZzhjfXDX42Ky8/p12Gwd+Kn1vvYeSZ2400TfGbQ=; b=JOX2Z3sWCKW9KeImT96GabkJMwwXUH0sGLzdW/9vT+V5mTPHL3xgj7Xd0CkUA9bTC9 u+xsn6n4D4g7lPc2CALoIGjGXlXx8Elox74QCQ+lKdYGSnCE0IrBYYMziw9+EARtUbU+ 9idTBsbN8A8nmzhpHerROyeGs4rsETgdtwDVtobsB7/69nzbWXMOcIYXfxAV29feZdSc KK1eiho1Fa2BP4RfBLE3XtHyhBjUKZ+MZNiNplAc/aMD7VqKLECQCU0Fs+zTQWT+6/bt ATyXJbyMLejtaCg4ONbzP1DiWfkY0qVUTe4EhEYsE3q2q4khdPY0cc75dphQ5t7HiCpA qNwg== X-Gm-Message-State: APjAAAX5VB4OkIxVcZ9wzy3l1+lNMi7Sc41p2jpeDDvyv0qPFoRspvM9 QPLgE8X7CJVF4fk6dhddVl3otGyk X-Google-Smtp-Source: APXvYqwnNLL2/7sAcSC4LAwQKLp//tcoClSykDS4lBbM/de0RlceooTdqWGb4taFITY/lGVXzovx3A== X-Received: by 2002:a63:545a:: with SMTP id e26mr20422592pgm.162.1560264962401; Tue, 11 Jun 2019 07:56:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:de4d:: with SMTP id y13ls4511392pgi.12.gmail; Tue, 11 Jun 2019 07:56:02 -0700 (PDT) X-Received: by 2002:aa7:8007:: with SMTP id j7mr16585662pfi.154.1560264962059; Tue, 11 Jun 2019 07:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264962; cv=none; d=google.com; s=arc-20160816; b=PNfye0dONYG9SvZ4rXbTLWPmyitU48uno5WkoqqvHm/tNiZ9MTnx+CxW717wmTH7jE /5fon8vzxfP7FLcn9lzuRl87Wb9aRbLsRYJ0izAP9FFNWzY2Qv7unqhhBOJMz1ReLFYH H9sMXNIVVPnUsRq0zGn4ecYPYJ6JEPouoQzOHczy3x8TK+KseAeFhFV9tKijXB39afR9 yLSzBI/ZgGX9nDQ8Y9AFCFzRGvzqEZly0WEfGOJIwhw6RbJoj6DczL7Jx4JeLAwwfQeK YcmZO+edvP47YRh6SShALV+YCR0XAiFajN/VD0r+ZdiTsZhLPAsIouTA7UIU5PeHDDcf xtrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TpXn9gLeVxf8FJ7fZ8L6VRSMcI8dM+6/u5xw7csXCnQ=; b=oH7+8HxXCgc0H+T7XVW1GohIOaNc18PibqeagKOCxcpOR5kjByZMe9D3c9S85lDnRe LruLbNu+noxmQCbDYAw3kxaoJX8OasjV4gpH04p6wwLKn7bp5BEQg6FCqOB2+1tYxWKK bWcaoDZwSw9AQk89AeT7P08mx0ud59FKct70GDf0NsSJ40WIY6DXCRXOJtu5CNvvXHiK btxmJgzBfNdSHuU2ZSgCaL+ox/paTFDDGvRGJG7hNrMm4IJubwCV14Tl1MjM/uOOHsNW lrMZ1bwLTvPKM/8iQ3z3FFKP/yX033lWNqF65DFctMuUF1WBOy5De8u/Uz5ktsGZsduv 8wjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ptWmYvW2; 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 c138sor13393689pfc.38.2019.06.11.07.56.02 for (Google Transport Security); Tue, 11 Jun 2019 07:56:02 -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:8ac9:: with SMTP id b9mr70662639pfd.260.1560264961782; Tue, 11 Jun 2019 07:56:01 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:01 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 63/92] ram: rk3399: Configure PHY_898, PHY_919 for lpddr4 Date: Tue, 11 Jun 2019 20:21:06 +0530 Message-Id: <20190611145135.21399-64-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ptWmYvW2; 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: , PHY_898, PHY_919 would require to configure PHY LP4 boot pll control and ca for lpddr4. So, configure the same in pctl_cfg for LPDDR4. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 1abeee7198..7d2359740c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -579,6 +579,13 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, writel(sdram_params->phy_regs.denali_phy[911], &denali_phy[911]); writel(sdram_params->phy_regs.denali_phy[912], &denali_phy[912]); + if (sdram_params->base.dramtype == LPDDR4) { + writel(sdram_params->phy_regs.denali_phy[898], + &denali_phy[898]); + writel(sdram_params->phy_regs.denali_phy[919], + &denali_phy[919]); + } + dram->pwrup_srefresh_exit[channel] = readl(&denali_ctl[68]) & PWRUP_SREFRESH_EXIT; clrbits_le32(&denali_ctl[68], PWRUP_SREFRESH_EXIT); From patchwork Tue Jun 11 14:51:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 515 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 71A413F08A for ; Tue, 11 Jun 2019 16:56:07 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id g9sf9252448pgd.17 for ; Tue, 11 Jun 2019 07:56:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264966; cv=pass; d=google.com; s=arc-20160816; b=bamwUIylWwU+liVVbACeG0AoUdZNaxHA520nfblMf0TVs3DXRAqFy9H0I7up+rtl9F 5xvg09RGVLBeoD4JamiEZ0wvCVSAMQDM7uoPGt8o8NXOEFFps5t8pF3hGrTcq4zBIVcF 3RnhOnpHBglxWfW7JWz2zqNfr731zX16GzpppbEIoQPjbD3XSrH7TvhnJsMvowPoiMVy of9UF0zJd+S2x8sUG9/hxah/xiAQIm/Rr5Wtz9jWsKkiLOOTugPPY05o5lHmh7/Csbj1 F6OXCd0CcUsBH+lhp3uWf8d9jxMISSkThSL44rXF7BAU5U4RkE6iw7C/C6Eddbs1F0k6 guCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ND8KkZ1vYQroTyDmf6cqOOA71xxh7a2LDDPEnurko1E=; b=aYuY2O9vwaGLg9v4L5Ymv6b6t7C6oFnHJD3kWT1HACX2jdfHVrMp2YtzISBkKl+QTp 6ar3w5GzhECcxSpEF3x+Mmrf5iyFCNOjes5WGfGpVchpvvsAC1/HXpWIoX5VxmsFlG0P rmfPGz6UuvxJ+BxXlJzlBV9BNOAE2IG7KNvzx1GphXNp2fejUmoqOSrgMLkFqOehnlv4 PDgGGs4DAf6FzQprIaaFlub/vC6Ngh6K3YGAjAs9c3AsBd3XiWA6XTGN8OIGCrN+36Wi l+gMqYqs+kCblJ9ba/4krhV2OuBBmB3WAJieq0qyEYlB1yA7dgLN+d/9vL6Fv2SDkWTe YQuQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Zclbl/Tt"; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ND8KkZ1vYQroTyDmf6cqOOA71xxh7a2LDDPEnurko1E=; b=TCBYpq9Lg8aaH/04uhM9ilhTl7kY2CcIjkeGj7a01JRLFa7J+Mg1k8bSus6Oi7t9W8 tVJieC7bokeRO51VChc/zLEptC5wxANO75N5hFkPqngDuiR6015M+xGP5vwRVOtT6Pje 2x9oExNscD5CfP+9To+9RKIINfIdJpC+gWvr4= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=ND8KkZ1vYQroTyDmf6cqOOA71xxh7a2LDDPEnurko1E=; b=pBsn1hxMwW4GCXnQ6VWRgtzCLO+3bkXFQCVs1+JPGf2FSOzkPDii7YQum2wUV65nPm eD01UgX8Ipu4n/WsAIrCxXzB2xPvboanwLWqqXpzw96O/IL4aTAH5fa6cl633h1GcxRj ylNfDN1qfP4Q0igZvAuVIXQYV2ejUpS70whg4YpHGloEmLy7bbJ7SpE3Ny6Djyapqzum ChJsURH5h/9+UMwvmMTNYR6/pSaivoYxe0kpGw4GamS4KfjLL2Utft48WrI62ufGu2p3 gz98/XxNdkDUnv10Bsn644qYMWh+u0SXpJUlziVF5tPy9x/ZL02l+VhYLYNHjmirVoBf UBqw== X-Gm-Message-State: APjAAAUWpuFtYwgeybXvf3rGTaVcP8dHhmR9KY2e1QceQKagpFNhEhuz B/Jj/7YcSaKM+dBgezHFKjAvuN7a X-Google-Smtp-Source: APXvYqznbltQOM/9hifCJ/dG9M1l5eKt1MD7vxBN+v/6r849tQDY2EA1ADcdV4AxxBUU8aQL/4TsEQ== X-Received: by 2002:a63:2109:: with SMTP id h9mr20816597pgh.51.1560264966148; Tue, 11 Jun 2019 07:56:06 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:868b:: with SMTP id g11ls4892098plo.15.gmail; Tue, 11 Jun 2019 07:56:05 -0700 (PDT) X-Received: by 2002:a17:90a:ad83:: with SMTP id s3mr27313711pjq.43.1560264965791; Tue, 11 Jun 2019 07:56:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264965; cv=none; d=google.com; s=arc-20160816; b=X+CQHnj1+6NoxEZPJMaJ+Ho0Ww7H7luI4VWF6ZmneqLij7WWrynVDn9GwrW/FjiPAe Zko1IxnFnqAR08qYyu+0l+T3JonQqKluBkqmV34U3WKb0PS39uYW1jcnxevNY8L7TYZ+ 50tDylhwRf24fWmA5/+36BEZzORk6rF6r6TsL3/vnBxngoG+omuz/oWBgXQnUaNdeFpt JaLyDRh9wGPzPxo5o+G8+L1QE0VkBTUhTxdJ/hVlMi6MxBVkH2drziMHKC4ofFsOVL9p 2nSDTt8cRj8EAriZQq4Rnk7/2qhvhkTjFkkDZ6OP3AP4RyKEBpZOadgw8aIKayvqdD6d l+0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=tIWk7gFh8c/pZ29462fIFinB2tOvSTfoq9zVwh/fWgs=; b=W8Cd5OhjlmKpXF3e2YD3y4KER7jJvFYlM7P9f3S1XZ7G1dzB0WDw8Z1afb5ItSjiRg UQPTRvlT7giqPVg2Qr+ElKcJZlV0oSUoiDODkMrhy1T9ZQVohAiSl4ttAVyQs6NwoE4d w6X5deGuPl4WHd2vK4CRXoELvAnkFwemZc4dOV3xwQNxinFLXB8StFjQK2TCD1fFgsN1 7zMFl+ueFqzDw7lqTa2EaSw4GYjcCQpeCW+ZDXiuiXKNSOf0FtGCVDkNojWUDySQk/Zw 4bMiRAhF4gMUZErtXVKrWnHYysFXp7tHQFrcY8ZSStpUE7bPuQZ36vy6+7Cqc0rYcfHn j5GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Zclbl/Tt"; 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 b5sor3172595pjq.8.2019.06.11.07.56.05 for (Google Transport Security); Tue, 11 Jun 2019 07:56:05 -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:a17:90a:730b:: with SMTP id m11mr27129430pjk.89.1560264965427; Tue, 11 Jun 2019 07:56:05 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:04 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 64/92] ram: rk3399: Configure BOOSTP_EN, BOOSTN_EN for lpddr4 Date: Tue, 11 Jun 2019 20:21:07 +0530 Message-Id: <20190611145135.21399-65-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Zclbl/Tt"; 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: , Configure BOOSTP_EN, BOOSTN_EN for lpddr4 during phy IO config. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 7d2359740c..4328790a4f 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -35,6 +35,9 @@ #define PHY_DRV_ODT_40 0xe #define PHY_DRV_ODT_34_3 0xf +#define PHY_BOOSTP_EN 0x1 +#define PHY_BOOSTN_EN 0x1 + #define CRU_SFTRST_DDR_CTRL(ch, n) ((0x1 << (8 + 16 + (ch) * 4)) | \ ((n) << (8 + (ch) * 4))) #define CRU_SFTRST_DDR_PHY(ch, n) ((0x1 << (9 + 16 + (ch) * 4)) | \ @@ -313,6 +316,27 @@ static int phy_io_config(const struct chan_info *chan, /* PHY_939 PHY_PAD_CS_DRIVE */ clrsetbits_le32(&denali_phy[939], 0x7 << 14, mode_sel << 14); + if (sdram_params->base.dramtype == LPDDR4) { + /* BOOSTP_EN & BOOSTN_EN */ + reg_value = ((PHY_BOOSTP_EN << 4) | PHY_BOOSTN_EN); + /* PHY_925 PHY_PAD_FDBK_DRIVE2 */ + clrsetbits_le32(&denali_phy[925], 0xff << 8, reg_value << 8); + /* PHY_926 PHY_PAD_DATA_DRIVE */ + clrsetbits_le32(&denali_phy[926], 0xff << 12, reg_value << 12); + /* PHY_927 PHY_PAD_DQS_DRIVE */ + clrsetbits_le32(&denali_phy[927], 0xff << 14, reg_value << 14); + /* PHY_928 PHY_PAD_ADDR_DRIVE */ + clrsetbits_le32(&denali_phy[928], 0xff << 20, reg_value << 20); + /* PHY_929 PHY_PAD_CLK_DRIVE */ + clrsetbits_le32(&denali_phy[929], 0xff << 22, reg_value << 22); + /* PHY_935 PHY_PAD_CKE_DRIVE */ + clrsetbits_le32(&denali_phy[935], 0xff << 20, reg_value << 20); + /* PHY_937 PHY_PAD_RST_DRIVE */ + clrsetbits_le32(&denali_phy[937], 0xff << 20, reg_value << 20); + /* PHY_939 PHY_PAD_CS_DRIVE */ + clrsetbits_le32(&denali_phy[939], 0xff << 20, reg_value << 20); + } + /* speed setting */ if (sdram_params->base.ddr_freq < 400) speed = 0x0; From patchwork Tue Jun 11 14:51:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 516 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 090DA3F08A for ; Tue, 11 Jun 2019 16:56:11 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id z1sf9765102pfb.7 for ; Tue, 11 Jun 2019 07:56:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264969; cv=pass; d=google.com; s=arc-20160816; b=Yz8z0Q9oAqrZIEc4cCwOGUU0b50ZV62g8vHdc1O9RXJ1oBCLeCw9jOcUqx7T84P1JN SS16n+CAQQ1HLY+BAeNCET5J9vNpINn/rR8UXV3WIwI2MxGoYC+uzFHmdGsS/XHjzeyF +V+OQStizp7mQyW33hLRRDi7G+2ZWThFjtRt2T8AtSGMURxNEcqVATEj3PrTHOxINnEw qkNUIFwQs94iCcvlD3thhpIekfz1BmTo8ldyPO7wquWqI8FLIso86Foyf5DuNXig5mDu W1h86nbh980w5mxLEDLjcsUU/od8JXWgZQuKgiA50UEc2GreIZrRPK02ySMFdsmO1CAM fybA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=6qqBuCVOz2o6Dho8AMD6TLZzIgiAuXhS+OHuOnlGYe8=; b=w9jRH9skDJyeJmCN8owxdcK75l/cHQSLe50zpkVSrbM40o4c/VMQlIELLgBxOMsJPd IxW0ZYCAO3WBCwdyfwuzDqdpkimcGsDvHbZXeDYTBNZiL+XXqBO0ZewoOjWWVb1n4PEv 5ivCLEn6SfvZpVrjxD1eZwdgBDG6ySpmm5uJgJsDTwCYYpoxGc8CmRYDPgxfT6Ye/EYP jIVuPFPWVbrvt/kgTQJIkNjZMGlKJtfS/m43iWB1Skb01yXxttn1Vhx0McJopNmVkj3/ RQSpV0qVqD32YRU2CE4H5Qobgsgm7pDyFJZhCmCY7cu88EbP7Wjq5pC1sa1297Y3U8Yr mA3Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IoLqh2nF; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=6qqBuCVOz2o6Dho8AMD6TLZzIgiAuXhS+OHuOnlGYe8=; b=nEL8Mxt7a00eLuU1SnmhoEktAiFzKN0XtmSfaCuiWDnY69LDwLo+RTPjy/A6j5/K0v DAbbGEvWcP6z1/cKPuTu3SvGfAKN/d3zzBkeniPU6jOIEpJuwfPEIDsHTqKCoXU/51nY 6LvsfjGqHbS5mXRRF4x9QJ15B1ZbOJwD3NKJY= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=6qqBuCVOz2o6Dho8AMD6TLZzIgiAuXhS+OHuOnlGYe8=; b=ar4KeR5iUGyhii2m4UaEqIq1HvxqITRm1tk2yTieODfelaNiy1iYobpTmTJOhUtf+D mUa+k9ebsoUsXDzuVaMDvuvOPlwWIJdpPOkSBeZwulGdVP/k0DOBKA0V1s7l8p+DO5hE 9zHkfZxS5otU1+N735XjYEgKRP3G2yM8czqJmjiukW3+ZEC12E4wlT+SgayU37HeUicd //uMzz/WkPBOk8Ol0FQb71EF0zS+AGyZNeHSIk4g8CRa3B1Gl9GAWxacpGBUXAu3sqV2 9atN0VLk5T3Gb9KQFBIOV+/rNlOrBTo4r6ge35VTBL/9wyMBl5AybtG/CqfTlk2mBtL0 uC4Q== X-Gm-Message-State: APjAAAWGSOW95Vude6i66I9mAGUm2wWptV+Iu7AqHFpxDd5G0YFGBWtL eZZzJep7ddbh7Ywc4924VX4xBxbF X-Google-Smtp-Source: APXvYqwxJ/vGHYLMoiamWWWtWdg3fcVFGvFFu3LO+5QdFFUMSs/kg+JxO9p7vsquRYdb7FEhRlf4/A== X-Received: by 2002:a63:2d41:: with SMTP id t62mr21048434pgt.113.1560264969770; Tue, 11 Jun 2019 07:56:09 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:9505:: with SMTP id t5ls861658pjo.3.gmail; Tue, 11 Jun 2019 07:56:09 -0700 (PDT) X-Received: by 2002:a17:902:a5ca:: with SMTP id t10mr70983201plq.98.1560264969424; Tue, 11 Jun 2019 07:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264969; cv=none; d=google.com; s=arc-20160816; b=aW8R7not9FFJD5I4k0P84TMRNnY7Ygx8IHgU8okrmJCFTRr45gsTV6hkXRtsVLJiOY 35YoQyNM+/SGxS5dZQlAV+q9fQiazEM7qBpxaFkSjoMvYQ2IgcV4vID8Fys+NllF36ES dROIOIcCOvp1CUWtVozsgr95ncSL6yD5lbhaMuodFA65kpS3RhKqGpClEgbKFrmwWgJC M4R2jGItEtXHhB8sOkzPMKC3d8hV7m71weSaeCBJ3vgguKnik24HycuEhgZffGdIryqi W4ShL7x07FbBj1PcmzfK4H6SrT7Rj1BNx00nxAwao70m1+doWtDPf84ESTF7tJeBoJRX aZ6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=FkCYBiID/lhz7C8lOWKp6q5hTcm2jkjoqxxR1eSGoWw=; b=vmT5sIfOluVj0faG4KYDclhnnzvgt8JIVC2sbecN2U4XOVAq5Hv+mnxB/e/VfaIkCl D5c/JuJkJG1zhS14mznGkYMABMHJoj2S5P5PG1O16OHj4Wq687rY9xPlVGdVBw0FsnWS k22s3d5qm+zw9iJS1d8S6R2reqboWy8AdFsHrdCB1VjNTyknqhsWydFcBDEHXJXaBvoC FoTwSA0Hmq2/Np8d+uhq5kCcyh/nHh2RY47iquG1v6acuYVkmA0Pw0+QF6mImwmdd1+K AiVgUS8wyhuwRNrhsHqZvQvkBSIgkNvw1/6Co5J4bj9t/yMZa/m/GPuqLmcGUZmTBF43 g7Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IoLqh2nF; 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 u28sor11879475pgl.9.2019.06.11.07.56.09 for (Google Transport Security); Tue, 11 Jun 2019 07:56:09 -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:a63:d415:: with SMTP id a21mr2996509pgh.229.1560264969049; Tue, 11 Jun 2019 07:56:09 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:08 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 65/92] ram: rk3399: Configure SLEWP_EN, SLEWN_EN for lpddr4 Date: Tue, 11 Jun 2019 20:21:08 +0530 Message-Id: <20190611145135.21399-66-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IoLqh2nF; 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: , Configure SLEWP_EN, SLEWN_EN for lpddr4 during phy IO config. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 4328790a4f..78e249e164 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -37,6 +37,8 @@ #define PHY_BOOSTP_EN 0x1 #define PHY_BOOSTN_EN 0x1 +#define PHY_SLEWP_EN 0x1 +#define PHY_SLEWN_EN 0x1 #define CRU_SFTRST_DDR_CTRL(ch, n) ((0x1 << (8 + 16 + (ch) * 4)) | \ ((n) << (8 + (ch) * 4))) @@ -335,6 +337,25 @@ static int phy_io_config(const struct chan_info *chan, clrsetbits_le32(&denali_phy[937], 0xff << 20, reg_value << 20); /* PHY_939 PHY_PAD_CS_DRIVE */ clrsetbits_le32(&denali_phy[939], 0xff << 20, reg_value << 20); + + /* SLEWP_EN & SLEWN_EN */ + reg_value = ((PHY_SLEWP_EN << 3) | PHY_SLEWN_EN); + /* PHY_924 PHY_PAD_FDBK_DRIVE */ + clrsetbits_le32(&denali_phy[924], 0x3f << 8, reg_value << 8); + /* PHY_926 PHY_PAD_DATA_DRIVE */ + clrsetbits_le32(&denali_phy[926], 0x3f, reg_value); + /* PHY_927 PHY_PAD_DQS_DRIVE */ + clrsetbits_le32(&denali_phy[927], 0x3f, reg_value); + /* PHY_928 PHY_PAD_ADDR_DRIVE */ + clrsetbits_le32(&denali_phy[928], 0x3f << 8, reg_value << 8); + /* PHY_929 PHY_PAD_CLK_DRIVE */ + clrsetbits_le32(&denali_phy[929], 0x3f << 8, reg_value << 8); + /* PHY_935 PHY_PAD_CKE_DRIVE */ + clrsetbits_le32(&denali_phy[935], 0x3f << 8, reg_value << 8); + /* PHY_937 PHY_PAD_RST_DRIVE */ + clrsetbits_le32(&denali_phy[937], 0x3f << 8, reg_value << 8); + /* PHY_939 PHY_PAD_CS_DRIVE */ + clrsetbits_le32(&denali_phy[939], 0x3f << 8, reg_value << 8); } /* speed setting */ From patchwork Tue Jun 11 14:51:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 517 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id EC2C43F08A for ; Tue, 11 Jun 2019 16:56:14 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id q6sf7886843pll.22 for ; Tue, 11 Jun 2019 07:56:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264973; cv=pass; d=google.com; s=arc-20160816; b=xH6Gn6sYkoKo7VCV0jMbZ8zm5FO4AQxPpk4gPwkAC5u1FYncO4sFeEp1z+dUDqjOHP fz4/vj8zbfY7H6ewmFfRkgLuD1/PGPu7uz012zJ/USsFJVIdYT/306aePchEstSiqVtE 8TaCylp00KBm8N8+0rDCcKpP4fiPqh64zD0hWlxiiFa2RmkmGTLYxK+DW1Vr9rVlTq5s qVU8xtUpnDp68ALdtYJeKejgj5xeYAEGMJLhtmlQWl4/E1ZB9m8xz7BIcygLvuecACS+ NwpLvjUJ7UoEDsw2DHqiZ1qCVl2nQlUbjoROhbM+2hALnDqYU2miP5elncql/71Vs94E i5Gw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=B5xj+xOu/pC7F0TjjN6w6tJTgGGjFJdYa1SM6ZQm7pA=; b=ckU4EqD8gIX/DZyyoLnPgk6rAiJFqkQk0y0kT2j6RdB2p7LzN+w6O17i4hi+I1Q7+9 nQ42hNG2IEaWo8mzt/JPSsv0MghKIhcH2pPaL4ZdgC258zapXsHsseN3AQ0AylsDWaYn ckUhEVzMngzkslqiQ0BEkInkd2gKVd3mCHG5cN/RAEDI+L6X/InA8e4Cd1T5B1hQ6I8n LcnCMM5m5AQ9PxBnrLuzzVxNVbDprvO8C14kSRN832ZZqCeQHUcb3nkoilXpp3+iSg3/ gQJEzsRFc9SKn1kL9j9tfwDa5miQ4paczd1cR5BrPkS8a9hpg+OYfaVNDsXTO6zSnlRJ oDrQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oZa0p48o; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=B5xj+xOu/pC7F0TjjN6w6tJTgGGjFJdYa1SM6ZQm7pA=; b=T7LdECtpMiS3TPuull5TluwHVH6d5A2LQJz2fE+ohH5S1bBqzpQDSCsYYjP6snwfaL OXcP2STrihrHod9fWe1PXNV53WNYqIeDuEjv7DgR0m72lHTJLISuokBmfusZzKSIRV0U 9r1lH0psn66LAvwSSNMs/JGOSlZyx1m+XOGs4= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=B5xj+xOu/pC7F0TjjN6w6tJTgGGjFJdYa1SM6ZQm7pA=; b=QobTOvwaut1xK24/JcvXt4VXqJrXU4ISf1pV5HhnUUCkHamIk+p50bJa9J0yeRCs6u 0nv8uchBerdgYfGSayPTALr4UXcii4VX4MT0PzMQBOTzmwuqa1mTDnQ+UlNkVatXLTE9 EGerk2qCBFtxPtuSuAryrZhar+DHxeGEYw1FdDmb5RW6TrnEx3xxVCwaZDife0khzmQS 8ZCxueefR79tc26TweGhEAqoiwU0g8HcJJcmwSL7yXKJVhlluOnayUo4FrZVCrCBJ7ZK qN+Ih2yhxCwJmp3gZGCkQLB+NVFvNqgBU4OFZMlsa6P/kTEPmzFY34slJo2dO349tjhH iKeg== X-Gm-Message-State: APjAAAVdugo+U1iNQcurlfec5e62xG2TXFSLdK/ZBloibd7MaWXVZfET Bx2U3XW0JQFbc8NWPULa1Y68Xb6m X-Google-Smtp-Source: APXvYqzXQ4O8btQLX9F0WUGyxwi0nk4LEeQ3fWtBLO8xlasuTU51X5WnzzqoirnUoIL2PHdDXc+ARA== X-Received: by 2002:a17:90a:22ea:: with SMTP id s97mr27061825pjc.39.1560264973743; Tue, 11 Jun 2019 07:56:13 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:2a57:: with SMTP id q84ls4513660pgq.15.gmail; Tue, 11 Jun 2019 07:56:13 -0700 (PDT) X-Received: by 2002:a62:5306:: with SMTP id h6mr81693936pfb.29.1560264973456; Tue, 11 Jun 2019 07:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264973; cv=none; d=google.com; s=arc-20160816; b=QD8FZOm1cCbHkaWHHfYqxF9h9DSTWcoH/seX2oLDxPHXnDlmH//T1UNE5mgO6USfR9 trS5ZCNu03pxg3bvoy2uNxp2Ahg7880BgYqEuLNjOyb2kDOGGVDD2GgWZBaVui3dXRc4 UM5UBOWtD0DrYlkeRvqU2VA3owNnSSeD5v0yWt48EFqmqazRIdjqucXekVgGG7as3DWs FsOZxPtXh/BGIIMYcr7fuKYhCh3XoFD/jkWDulAK7YhVBs3nFh77r1E8s+0lWf4oR48C jZpXLaIrt6xy0G78SYVzeJZtpMINCPDzIDxhJFzJ7QE2MxBxMl/28nKup5gzy0ozFyyu izgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=lHIlhtc4hn8aPvwui/UYtP3RQ7a5tpEUgL/90QN/WxU=; b=nnABBkFlRefaPLSTvA4iWTOrnnW8vC6xWCsMM4CRC2Dly4CQPTxiG9FD9ON22qeTDd YlC11A5E3L8Pn+mx23vmKrlxtbXBsLFw1PrZX5U4VyKTUEAFsOugCuVSS/zjk6E+yDwg zUNlrvWonhce8U5jcAwHuUw0RqylDWI5jZU5ChxE+DNCwZGI6vDIY5nPRHR1J0oiP1k1 Vm7MJTULDx2IuwiMtBPKWZ4p+RWI9Qp69uhAmAy5EYBLC4x6NxOvD+LMjIBRx/AOkCRN wDVHnoht8bzD21d6p2li9vWo98hEwFYQrRF3byzLV9Ir7l7LbZKBchPqEAYxBNSQP7mj RR/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oZa0p48o; 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 k22sor13375936pfk.22.2019.06.11.07.56.13 for (Google Transport Security); Tue, 11 Jun 2019 07:56:13 -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:9f8b:: with SMTP id z11mr14189987pfr.121.1560264973127; Tue, 11 Jun 2019 07:56:13 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:12 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 66/92] ram: rk3399: Configure PHY RX_CM_INPUT for lpddr4 Date: Tue, 11 Jun 2019 20:21:09 +0530 Message-Id: <20190611145135.21399-67-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oZa0p48o; 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: , Configure PHY RX_CM_INPUT for lpddr4 during phy IO config. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 78e249e164..13c552649c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -39,6 +39,7 @@ #define PHY_BOOSTN_EN 0x1 #define PHY_SLEWP_EN 0x1 #define PHY_SLEWN_EN 0x1 +#define PHY_RX_CM_INPUT 0x1 #define CRU_SFTRST_DDR_CTRL(ch, n) ((0x1 << (8 + 16 + (ch) * 4)) | \ ((n) << (8 + (ch) * 4))) @@ -385,6 +386,27 @@ static int phy_io_config(const struct chan_info *chan, /* PHY_939 PHY_PAD_CS_DRIVE */ clrsetbits_le32(&denali_phy[939], 0x3 << 17, speed << 17); + if (sdram_params->base.dramtype == LPDDR4) { + /* RX_CM_INPUT */ + reg_value = PHY_RX_CM_INPUT; + /* PHY_924 PHY_PAD_FDBK_DRIVE */ + clrsetbits_le32(&denali_phy[924], 0x1 << 14, reg_value << 14); + /* PHY_926 PHY_PAD_DATA_DRIVE */ + clrsetbits_le32(&denali_phy[926], 0x1 << 11, reg_value << 11); + /* PHY_927 PHY_PAD_DQS_DRIVE */ + clrsetbits_le32(&denali_phy[927], 0x1 << 13, reg_value << 13); + /* PHY_928 PHY_PAD_ADDR_DRIVE */ + clrsetbits_le32(&denali_phy[928], 0x1 << 19, reg_value << 19); + /* PHY_929 PHY_PAD_CLK_DRIVE */ + clrsetbits_le32(&denali_phy[929], 0x1 << 21, reg_value << 21); + /* PHY_935 PHY_PAD_CKE_DRIVE */ + clrsetbits_le32(&denali_phy[935], 0x1 << 19, reg_value << 19); + /* PHY_937 PHY_PAD_RST_DRIVE */ + clrsetbits_le32(&denali_phy[937], 0x1 << 19, reg_value << 19); + /* PHY_939 PHY_PAD_CS_DRIVE */ + clrsetbits_le32(&denali_phy[939], 0x1 << 19, reg_value << 19); + } + return 0; } From patchwork Tue Jun 11 14:51:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 518 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9CB883F08A for ; Tue, 11 Jun 2019 16:56:18 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id o184sf9784411pfg.1 for ; Tue, 11 Jun 2019 07:56:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264977; cv=pass; d=google.com; s=arc-20160816; b=ZBp68HRnOjVXfz05o4xxkS4+8ypTYdEcOJN4N8OvitNXljT9fYIX6CfWXMC93st2Fi 5Um0R7QYMgNZ2uYGWAkI1IqsxpFEIYjbfSHEOJnO3kFQ9mH/xDY0aZarlCN8cJzMyeSk H1xpDQ4s+wOHAnlB8nfHn2esGkb64TcGDq0wC+DnGElX3qNFPouJBcN9CJCHdTwCcdg+ LBCXtsL9J23i3S7+sWolnYO+aHbuwCtnkqcAifZ2N+9HGxfQ4XtusJMAW3a0nE9M0HVE 2+P9H/1ULM9SXEjLLNw9s2miL48IG9BOlEI4KWek40TLMGT+ndTAlVwn75rPcRpvn/I6 fZxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=5NDNZWbezWp6BglCkhFuY/PSBmBCA/0kkIJ8LH3hi98=; b=Y1IOcBj4bb/Gl5HoRZm0LHTOARM85INorScuwJ9UDSLURMPd5+cfsHB/aZ28W2+kEq WHiYzPPXfznQVMD1Vb/K9jompV2dsRvp9CrfwvDvgkWyFX6JjUbPDnThTMYVO2gufDoJ taIBxLqhBIqPVqQ5Yv/Pg/DkF4pdzt65yr+qBVvZXt1NPWT8K9XU+57MS721/V9v8LVZ 9iQmKCNCsP0C2qc5Iiih0nrA67JDhB9auBbM/4fV7X3/wLyEg0bd6xONP3yvT58Fcnj6 SFccN4pvlZF1xhNvvqB0UAqoq0s5wSse1riuZ1/8kCWr27JKZqW3V0cAg3iSjiK0q8/L 28mw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=atxzZC9s; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=5NDNZWbezWp6BglCkhFuY/PSBmBCA/0kkIJ8LH3hi98=; b=KvhGPwkijQhSYNtLsixGm/dpaSPPEfflhQ0c92KsiXgtmFySASIjDnBKsxTRy2D42e XVEMu6pF6gfW2umz7fT1Acqdbu7ZoSIdv+jWJh/kn0K5K8+a2QsdilfKmlsvdEyLOPMi NljwO5Hhu/sEWo12R+kckAFjFS5DnMui957bk= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=5NDNZWbezWp6BglCkhFuY/PSBmBCA/0kkIJ8LH3hi98=; b=Q/zT6EOSdbjIjlRrge3RfAsfsscW+7IguX8YCjtNgm0xsGnnvigahiKB3SQWrupabp xW6r3E8f/pqC9KMvmph13CzvYAHTP5UExjedaVlYbg6LdLX4OEaR1/W3cQ4mWesvd0w6 gB7sixi2uZALF/YBRFOMKBgu0DhWdz48rfwXt5o5ALpZww59xgPrzXlecgqCMb1hAAKt at/FW0Gcdb7wQlmP/kzOmV10uD/YEMC9+xtKSXornxbjCm0zUZ6E3RlJr9XW4BL8m6h8 GrEmMHT9g7ccJdqD9LiJANcaIEZFTITWr4FrK9vgaTTIhp2Dq8xW2lkHD3By2ZqkuZMI 1NrQ== X-Gm-Message-State: APjAAAXICTVbqEmMuaudsI6wBGuDt99VOMGh2UrSAlGDziN7IJR5BqdT 1DYQkxCSllSsUQF9LsVXZZ+B1Fe1 X-Google-Smtp-Source: APXvYqx4SMLoHeF8DsYcNXPl4qJaRfFR4zf9p0fyclLPKqnOPjBAB6lya6hqZPSLv6CWJx+W+gKZWg== X-Received: by 2002:a17:90a:628a:: with SMTP id d10mr27120575pjj.7.1560264977413; Tue, 11 Jun 2019 07:56:17 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:8593:: with SMTP id m19ls862086pjn.2.canary-gmail; Tue, 11 Jun 2019 07:56:17 -0700 (PDT) X-Received: by 2002:a17:90a:2008:: with SMTP id n8mr26810624pjc.4.1560264977102; Tue, 11 Jun 2019 07:56:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264977; cv=none; d=google.com; s=arc-20160816; b=wSC9/4Uf8cW2LZM0TL0blZ6iFHGFxOzDQ//ethxjKEUJElbr/Kn3Yeuk2gSPeQoUYV xf0cEZYfqcBFkAuAKIZhVF/E6qSWBGybhOwa+NMCCAuP41mfwkTkTex7yUGP6/Q1cuW9 nvIylwUz5DuHT2EFAXkOrJ98GFugd4ATjVT2+1eNAzLj0YfIDYhxVmpr4OBwYdBBCSM/ 0BgSd8ybcxD2DENej7Uqgk6CPUHcNQgTn1vNezzyRs3TU8xihIStFN3ry4C/V/UutvVy 0a7aM1GMq40dfZZHDoo5bfL2n5MEkGSLW8P3SXxzem6qEx8o9ewWHZSZZQEkQWc3WrG+ 7qgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=LnrKP4ufWufAf+TSgUvgwMId8hTqzwuPYT4ERq3rBNk=; b=hYVsNUvJi9AavI9E5xhaxNok+sghm21jZ0bqwCiVqqBgPLryVhRRoOEfTM+lW0jv8j A3gX2JMk0fsizY2GCLlQ34MuCNXyewje0Pi8wkgeiI+ug3dqBJrbcpl1W8ICIf7vP5Kz Fn/Svr0bUvob5+rQRsXSCLpgFlEQ0WwRwthh1UGmP6U+ETye67J9tBXHn5zX87uqwzFF QEM07amncCmqerIlqlLdaFOQRODDgDVOBf+09vWF63YMqonLGXAhCNM/mEVWi5Oa9jdM tjNj4b5RqFYpASNoDjNSevZxwfWQ5xkMCsa/Ogud8bzHanx7AByRbIOybYk3K58JGfA0 1/MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=atxzZC9s; 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 y5sor12007357pgs.32.2019.06.11.07.56.17 for (Google Transport Security); Tue, 11 Jun 2019 07:56:17 -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:a63:5961:: with SMTP id j33mr4337823pgm.89.1560264976669; Tue, 11 Jun 2019 07:56:16 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:16 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 67/92] ram: rk3399: Map chipselect for lpddr4 Date: Tue, 11 Jun 2019 20:21:10 +0530 Message-Id: <20190611145135.21399-68-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=atxzZC9s; 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: , Assign desired cs_map values for lpddr4 during set memory map. Initial cs_map values is based on the sdram parameters, so the same will adjusted based dramtype as LPDDR4. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 13c552649c..ecc215b9c7 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -189,6 +189,16 @@ static void set_memory_map(const struct chan_info *chan, u32 channel, clrsetbits_le32(&denali_pi[155], (0x3 << 16) | (0x7 << 24), ((3 - sdram_ch->cap_info.bk) << 16) | ((16 - row) << 24)); + + if (sdram_params->base.dramtype == LPDDR4) { + if (cs_map == 1) + cs_map = 0x5; + else if (cs_map == 2) + cs_map = 0xa; + else + cs_map = 0xF; + } + /* PI_41 PI_CS_MAP:RW:24:4 */ clrsetbits_le32(&denali_pi[41], 0xf << 24, cs_map << 24); if (sdram_ch->cap_info.rank == 1 && sdram_params->base.dramtype == DDR3) From patchwork Tue Jun 11 14:51:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 519 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D1EEA3F08A for ; Tue, 11 Jun 2019 16:56:22 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id x18sf9771902pfj.4 for ; Tue, 11 Jun 2019 07:56:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264981; cv=pass; d=google.com; s=arc-20160816; b=ESk+JJNS2hqFsZnEuPpbwF0PMJNCZq9/HJqWodKk2Z9rCfRSnp8i6Vhx8vEf/HyYWC nzZkSg0DXdrvL3v1hv5LeQRA9ArepOxLBS1pOnJ2/9UWpyoF3ZKV1v07MinVd0WA7wnd ynJAZLfyXev6HeYOTypBSbOV9bXWJ4NaHoJeZA/m2YkWpo7x2J0Vdmy0kEFGMmgB0jEg dM4x0mKz2E02idNhJUNjpQPB87SiBmQbCzkBDImP83SnrVkikMSKduUBsqZkK/WUC/4t v8Hd2pxLpVa363dAI3eVBkVDX0RZWw2qRqAKaZMiIkVBLkImdUfzER+krFi6KIsQaZmI 1YLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=MVPVWkFHBl4WurvoSyKMaAJtjy5+2hV2U9JrjK25cCQ=; b=w9BIF11w911r3hiAyCZIjqt4Jtx/DR1+yk4PHlzxAueax0GbLsuaL9nckyz+iDtLpj YXpHcK4mo+F8Yd3YNS+MFDBKftTC83fyMQvbIBn2gdaOPjRW8Dvuu9Gvy6O+Dpg/SPfl jthLhWi2hf2/IL4rEHJUDOK7MzQZC2JExb+GMiVuW5YM/QqLzgjPXIB3ctc1AdxnXrzA vgGtoQ4fLi4TyhyTqVfipHlyRr2snXLEEpPcSskjJe4a+b7+6FMuSHLo9UVJGeCcUuic RT9x/yDopDDdvYCjtYxgsiLyMLuzWqHAG4geJm/SeqxdiThxhrNa5L0hdvLDwlqMMO/9 SB+w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mKVBpxMz; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=MVPVWkFHBl4WurvoSyKMaAJtjy5+2hV2U9JrjK25cCQ=; b=mpEP+aJMcgW1OSP6EayKlWBS+5PnCGkAEQ+hmAcaRF5JwpsVo6UDgZSkm+a1MEPbp1 sMWAAMSI7VHhnRufjwTuuMrSkvjhrUsBmQH3ej6DYMIXp2quWyK62BgnUTuszYCZBzon TEHB579+GmDO4givhOKd93RcV8k/MEpCsmCiQ= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=MVPVWkFHBl4WurvoSyKMaAJtjy5+2hV2U9JrjK25cCQ=; b=UWaEpHc85efXLrdBNFqMKjEzqHRTgdrjIyxvrM2SvxXpdwl9ifgKyqrMusCEe9Vlok uV7n4BOqZHrdP19BdzU9yjdJokUA/Y12GT9kWtzJpOtJmtM/tWB7Bl1d/+tWD7AAgEnv TindZUiuf2qIbAz7Q1qYMMp5PshgdS5cL6/xoIlkxuPEjr6D/FysjnBtFT9iImw8Ika/ a4YqILXgSZUES8Lj0AhZHDc3/G/LidhpSOe9m36+N08T/YV0TkZ7Zab3yemlGzEHUDoW BF82Ra/jV6fU9F+Yjenjv1XpxunIN50pg4d9znf1mWLA+QLsLuNo2/uTQImPPf062MpZ FBUA== X-Gm-Message-State: APjAAAXGYxGhqiWMH1SKIC1uz9P+71awbgna//GPA427SQQPKjD8lv0I 5VeSe3aNiJase1z8kcMGS86UQnon X-Google-Smtp-Source: APXvYqw+D0KpaWG2XE1zfvEpLLXPLvgxuYRuacfpAGidM16ZPNPCKMT8eEgHPl2QJILkIyAFaMw42g== X-Received: by 2002:a63:c203:: with SMTP id b3mr20081597pgd.398.1560264981626; Tue, 11 Jun 2019 07:56:21 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8c8d:: with SMTP id t13ls4896899plo.13.gmail; Tue, 11 Jun 2019 07:56:21 -0700 (PDT) X-Received: by 2002:a17:902:8ec3:: with SMTP id x3mr73968166plo.340.1560264981293; Tue, 11 Jun 2019 07:56:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264981; cv=none; d=google.com; s=arc-20160816; b=KbG+zPX+VTr1Omog4OHKDr5LLRxhRLeaKzFLMlMuYXYmZSmDkDwdENQdjT0dqSNw2C 4HWZKriG8IMcD8e42vhJho5CJcBfLRugIteuhnm1WxME+jV4D45KglC5m9rOX0lBzF6k G1E7jBxBVEiyNMj7ng8hwXdG5oTBfj+6iz5fA1K170HTAhGQ1OxxHDrjZqRiXjEODOG1 oi/5HAmuO2jxU/htRcjSCC+VCci7/d9KgLYFGNIvXMcUvoN1dE2dXLZdPMtWExYCNNQ5 NaqnbyZYWb6/7BzJ6EhS1Br9ruOxI+sFtLl7esTUtQ1R3W8EXC9YbUTTaKkPNjNdBgxb ENYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=GsHylnIB++iBMUiXDFzXoSlZ07F6iOqo9v8tqN3hKF8=; b=r/phOYCuyrFMDfKuHoUX7KPncgjXU4i2qmtfhb4Tk9EpmxvdTUA+SOdpl9YV5/Y0YN Pu47TABiveBxhNwZsrU6uoKG2KA0yDPX0At1+dfxsbT4QXkUNfLxWpdY3XSVfQpsbVoB +hQzzWo93X3uq0kUTjxtztIycTzwAPu3819K1AtytMy4r01ERLhWq991ZUbS9n9F0S1C zlp0MH0d3EAz+phyFbo54/sP5/9SqrDc7i4uOf1iNi3TR1O8SMsPjRcwS7NCyR8cN/Cg LZK5agP9aGkYJg03ZPPuVY32hJHjdKGmWYp5k7x9aOpvzpuY5VUL++YR5Rw1iE2nLyT7 GxmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mKVBpxMz; 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 r3sor7009229pgj.74.2019.06.11.07.56.21 for (Google Transport Security); Tue, 11 Jun 2019 07:56:21 -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:a63:6c87:: with SMTP id h129mr21163121pgc.427.1560264980824; Tue, 11 Jun 2019 07:56:20 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:20 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 68/92] ram: rk3399: Configure tsel write ca for lpddr4 Date: Tue, 11 Jun 2019 20:21:11 +0530 Message-Id: <20190611145135.21399-69-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mKVBpxMz; 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: , tsel write ca_p and ca_n values need to write on PHY 544, 672 and 800 to configure ds odt. Configure the same PHY register for lpddr4 would require a mask value of (300 << 8). Add support for it. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index ecc215b9c7..a251fc6045 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -503,9 +503,18 @@ static void set_ds_odt(const struct chan_info *chan, /* phy_adr_tsel_select_ 8bits DENALI_PHY_544/672/800 offset_0 */ reg_value = tsel_wr_select_ca_n | (tsel_wr_select_ca_p << 0x4); - clrsetbits_le32(&denali_phy[544], 0xff, reg_value); - clrsetbits_le32(&denali_phy[672], 0xff, reg_value); - clrsetbits_le32(&denali_phy[800], 0xff, reg_value); + if (sdram_params->base.dramtype == LPDDR4) { + /* LPDDR4 these register read always return 0, so + * can not use clrsetbits_le32(), need to write32 + */ + writel((0x300 << 8) | reg_value, &denali_phy[544]); + writel((0x300 << 8) | reg_value, &denali_phy[672]); + writel((0x300 << 8) | reg_value, &denali_phy[800]); + } else { + clrsetbits_le32(&denali_phy[544], 0xff, reg_value); + clrsetbits_le32(&denali_phy[672], 0xff, reg_value); + clrsetbits_le32(&denali_phy[800], 0xff, reg_value); + } /* phy_pad_addr_drive 8bits DENALI_PHY_928 offset_0 */ clrsetbits_le32(&denali_phy[928], 0xff, reg_value); From patchwork Tue Jun 11 14:51:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 520 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D38203F08A for ; Tue, 11 Jun 2019 16:56:26 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id a21sf9259461pgh.11 for ; Tue, 11 Jun 2019 07:56:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264985; cv=pass; d=google.com; s=arc-20160816; b=LbzUk3eSnJAU6LhPO8swK9IlqB5bdqkenN8Ri9P/p9dgSRtQvwv8AzLwEzREF12iyr TyB6BixKDHsAzEnZDziWgOAFvd6D84gTTe4zfxhoti4/gHrljrnhHdB5ukQpWw4aTjqs jomV+57XJ+nQzheIk+m+gY1V3QirE/m80oku4dRSA3VSj50g91Jsd9lUUdj4TVLpCGWb tyf9UXkaEchABCqXZi3ivnWCcNdzUrRcVLJlwUahWvqrP/EV+LJavDRitW6pANqR6XPg w4s3IMFbkBFJUEa/h7aR2Qh4LHceIgnWWBQmHPbj6H/UrTfJszQwmOeBV1ipZVBqtdPf zPXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Eb0a8TQhOJT8UxuTC9UM0le+JxMOYqOT7COxYjw4RqU=; b=tdEpfJ5bqfZYbY14yH1dsJazH5cb6gSzfOD/Jyog3XenWj0q1mWMY9y2LWv427x+6N Dh09ctUimdVNFdLoLCGuNHiLmSFDWWPfjNvx5xadMe/ix+WdUvgbigxHcPNI3TQScS6x kAG0CatxdDQi0Pts3q+QywzJcSp+t3iD2+S+bJmG/CNWqf/HHlXnIimEmU1tdg8BjUj4 XXTlUC7ajqiDEsC/2MoECL773VC463zK5oU6DySO1jUkL96DOIuKvblPBiD8u3IUEeaa w3pB90L/+SrEi2OWrElJ8djdcj1NEQYi/t90HGOuSw8ERjzMx0YOFD2iOaSloPiChf4k KISg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mqkCBdj5; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Eb0a8TQhOJT8UxuTC9UM0le+JxMOYqOT7COxYjw4RqU=; b=L7GslkCur5aP2zdrNS9hy7JAKLlGHUXMRzgXggl8vqhBX3QB5jSFfx/7wr53XCt0fl 1oSYqJAq2uXSt+44XOzg9+kuSuKR+mHRth5fRHedsmLatbQvLmIrfrpZ6rAakk/spjRl VVnavZYFgIpNwc29Q2+KNFM+Fjb09vpsiULbo= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Eb0a8TQhOJT8UxuTC9UM0le+JxMOYqOT7COxYjw4RqU=; b=S9j0ciUpK0SxmVUzsalLGn2tEsBuY6G3O0mGJvM3j1mdeBBK6bzryb8IxrytskXXEg 6lrBTb4dHluIgXvx5EVNBWlcOVCLTqTrPcZJlpLGOck3QxRAZHMBpvxx+VB7QsZUGPaA ZhQtlozl/8erBlE3zhT9s+0s9BZ8LSNSI7LFqabGZRlyYkc9RtvCkSI/LnSx6cycBoEr +KhXYALNun5ufVxBuQlrh57/oOZyguxT4sXqKdyELnsh8g8MDtcsBusbWdqMh1hFtSTs 1ddxreDqAvWzlv6BsDA4NBY+ahrBvvFkmjWudG1fkssOW2omgelCKh9sQ1Sd2O/rK7Vw 90uw== X-Gm-Message-State: APjAAAUNJLuCBWY+IrJV5M2FRO/RG6NwLEP1t8iQyLsBiTfHVFRMqc8j 0MyN7bgbT4r5OmYx5iAeaYZVxNAx X-Google-Smtp-Source: APXvYqxsLm+rG7C8Te1kX5Ugv+4mNfk1XcKnXdnS7T0igoxjY5dTkeaEFzZ1EnvNR7rXVLCt8p2jrw== X-Received: by 2002:a65:42cd:: with SMTP id l13mr20274576pgp.72.1560264985597; Tue, 11 Jun 2019 07:56:25 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b605:: with SMTP id b5ls4896248pls.12.gmail; Tue, 11 Jun 2019 07:56:25 -0700 (PDT) X-Received: by 2002:a17:90a:7343:: with SMTP id j3mr26034474pjs.84.1560264984965; Tue, 11 Jun 2019 07:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264984; cv=none; d=google.com; s=arc-20160816; b=AK2zOYlX1WWEtGrzwRN9AAgOSnp43ZTjffr99k3a/4HWpgAU5n252QwCGIKmITE9Ax qGdEAx6e9/HMAXF/RVkr0twj/L/3qMIgQWghwQNU4ceWuVlahZOCV0MmwMtW1BjASJPr SuirHVAftQR/WqVHltBHWAPWRg2XBZdh/6uMEKuZOGg2D41q+wHvEu7BGIZvLN/fy47u FSjhIviCQzXRKLucS54/beGrxO+azsvVLcUJ7qUGJ5/S9RCEqzoLJ+sx3GB9asKoE6Y2 P6/KxS5t3Rdl/fSChurI9afeCqE2N2gdsHcuoFwXyHkLawRIPqiMfgc1XmfZuz/SV6SI 4jxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=CdKYTAWEPhUXylEOQSNrbOliIo7eTy5laKiwuvhYZ0Q=; b=RVJDjU8ReGJlRtsDbQzOo4bRWj+bXQNrACBvG5+/AFFdI302jm7DX3rNbkfEZt3wY+ lctmQgjTc4yTP8HviPJk3Re676lTPcXcEXq89nkSGVdvraEd19LiHpDRQWQoYOqZTJpE jfp0dmUm5bAwyIVcPqX/vRNlxDE46kQV3/NDtFgAnR/piTngTj2Tz5xMFZPV4wwCO6/D I2koQf1Ih2vXIF7sMff8TCXmdBjIHtQknVv0EBpoLwYd6PNQHzOV2sb6Q0x7Kkv7oNb6 cpjVltXv+GRg0TmVqqN7Uiw/rZDrNcR9e26EuTHbQdp3wj/2KLH73DtmwOQAJcAI0q7n QQJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mqkCBdj5; 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 x5sor3270183pjp.9.2019.06.11.07.56.24 for (Google Transport Security); Tue, 11 Jun 2019 07:56:24 -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:a17:90a:a116:: with SMTP id s22mr26976818pjp.51.1560264984603; Tue, 11 Jun 2019 07:56:24 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:24 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 69/92] ram: rk3399: Don't disable dfi dram clk for lpddr4, rank 1 Date: Tue, 11 Jun 2019 20:21:12 +0530 Message-Id: <20190611145135.21399-70-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mqkCBdj5; 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: , The hardware for LPDDR4 with - CLK0P/N connect to lower 16-bits - CLK1P/N connect to higher 16-bits and usually dfi dram clk is configured via CLK1P/N, so disabling dfi dram clk will disable the CLK1P/N as well. So, add patch to not to disable dfi dram clk for lpddr4, with rank 1. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index a251fc6045..9151b023e2 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1233,8 +1233,18 @@ static void dram_all_config(struct dram_info *dram, writel(noc_timing->ddrmode.d32, &ddr_msch_regs->ddrmode); - /* rank 1 memory clock disable (dfi_dram_clk_disable = 1) */ - if (sdram_params->ch[channel].cap_info.rank == 1) + /** + * rank 1 memory clock disable (dfi_dram_clk_disable = 1) + * + * The hardware for LPDDR4 with + * - CLK0P/N connect to lower 16-bits + * - CLK1P/N connect to higher 16-bits + * + * dfi dram clk is configured via CLK1P/N, so disabling + * dfi dram clk will disable the CLK1P/N as well for lpddr4. + */ + if (sdram_params->ch[channel].cap_info.rank == 1 && + sdram_params->base.dramtype != LPDDR4) setbits_le32(&dram->chan[channel].pctl->denali_ctl[276], 1 << 17); } From patchwork Tue Jun 11 14:51:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 521 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7C7C33F08A for ; Tue, 11 Jun 2019 16:56:30 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id z1sf9765662pfb.7 for ; Tue, 11 Jun 2019 07:56:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264989; cv=pass; d=google.com; s=arc-20160816; b=oQw9IMnGJou7EwvRXo2BB186vmqRpkUvI1ln5zCDVGHVrHuTBRR5geynRlCYYY6iti 9YtNQAGkKCl4W0r3FRmFpBf6hfqGhFDIgGJ23BdiZzx2uOtuKe3lnDYo0qGZq8t1BwFU o/owFRkRwG0N9tAT9U2e6bdXUOuWDSeCHqa2YXKGBTYyTfYWy2QyB/7cbYyVzRVUEJrR lT0ZiH9FI7MpLf4kxMIZGVCbnHRniyAOPhtqUnEx/aZ8D7mTHPwDPUBxaG0oCZWXosCF hMhDhfyqNW/dwVdWUuur8QQq9jlGO0X+tO3YrzcKw1o9syfaUZVEeQW91F5fWh16Ppad P1sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=lbyOqiaY4N7QZ6wRCtFvrZKWJ25YQL2B5mF2Luef0Fo=; b=lCednYDk40WyLepKgMOCrnJFBapOuj4HIm/DKBjdHh/QQ1LSmZs2LeMxW2RSy49P5b lh8zNgEuwls7hYJ/i1M3nlCqadcpEr99NJbpHU2+m4ThDNLb573b62qG2mPxvgvIqdXb t3j3tGkmA6hQbJbXaQD4ZBI7Y2IRiS3P8ChcRypBlPAps/ikdDxghhxIwTu4y0aXq/8g pD/EIx0rR/RXDXIdBz3zd5qvph3HRSIFYx6cua6mq7vb5ZlYY9iNm+L2umhR5HnVd50y uThCzoM8QkgPV5Ziize3IoiqQIIaa43iodz9MMvM2uNaIJmGOlJeSLidKzNKtYhjrLj2 NEuQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GANHWTSc; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=lbyOqiaY4N7QZ6wRCtFvrZKWJ25YQL2B5mF2Luef0Fo=; b=bK9iOTUCJp8U17C+nYkry1sJc8HKaiSs6I4j/XaYr60I2oTn4B9rE2e+32RUPQE9pF 7h+IiZpayj86FaWkAo78qu0fzvHTQG+WGxnnk7wdAs8uFCy5Z+j9RwX/LsOGOUN8ipvK /4gxWRhdfZiRbY2SJJsy9zW6vjiewwxZMPBMk= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=lbyOqiaY4N7QZ6wRCtFvrZKWJ25YQL2B5mF2Luef0Fo=; b=Wkxyj5tH6qDsZF5lPMcQtYraEFYKzc6isiMEmci8E8daxzHpVtuFQ2+n3iM6WnGK5r VqxWDxQq0k/e5+kGa7WK7Dyf9Zk4jPFR79BBPXdxcQSJzbxqeSIj0jwhGT06HM6rzB9r sh3m/Zt3FRKMJ6L1+SEsz+ROBjd4CK8g2vjcLBe1uW1Z4VfIxRqqmr4BJhb7V+VFpyCM iiTnuEoZ/Ist7F13OvSzoSvpKOz+qU/VQvCz0fFd5m/TsZO/V6J+g850YDcY0vkMDbI1 XOFbzvigfOOJv2vg6FVXy4QbV4/rKdapf2DAslWrUZmy5IjAr5VbOY2UFmKssMGaP5bk DubA== X-Gm-Message-State: APjAAAUZQcwdG7bBP8u4bBk3MddrcDl+fAeHKL4LbICaid3r0bFiwpmd 7ybKeSD3ZbsP6e1GZCO6fByCT/wC X-Google-Smtp-Source: APXvYqy1KFG8oeMNiLHtOnyPbKLPGDVFp8tcYj35N10Bb0xfxQSRyNqOnmBrlk/0en/mCNFzdtkCHA== X-Received: by 2002:a17:90a:214e:: with SMTP id a72mr28087281pje.0.1560264989290; Tue, 11 Jun 2019 07:56:29 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:4e81:: with SMTP id c123ls4502685pfb.0.gmail; Tue, 11 Jun 2019 07:56:29 -0700 (PDT) X-Received: by 2002:a63:6005:: with SMTP id u5mr11108828pgb.123.1560264988935; Tue, 11 Jun 2019 07:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264988; cv=none; d=google.com; s=arc-20160816; b=iA8BnrUJisqeZ5C5rWmQs6HuD+Dcoj49U2TuUWb0R6JwmP+4RtauZWk5SExHzCvR1R i0weOYXblkAC2cphP/Bf9cU1+zVPG00Tn/qKcMNj1LbNlVzzlUX+E4g3I2sq/rTBZPUE LR2pJR1qXAYR0BsSzoh+aMr4VlXJ7TOimIVN0Ue4DkCvFlz7HtD8DCbbrwhPTOIdNz8A FClnsY1TdFoqgoWDGFVp8JTwkjxXSuGvNjhS4ZEuMr5IHETqmvHan1YabVS1/1G0lfV+ fq3iyau7MVCQQdnrhbjZNMsTKGKgyxtE2UsN5iTsSk7OlHGqTItxOb5H/Z0iGkdBHQIs xPkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=be5iGODuHUyOHnG/APAPnJWbjtO4VKwOHIm/JwaS84I=; b=lFUX2vQgRFNj2++KhEzrvA1tLnRhAm7JjybcoO9v0kyDzLxUJtGWYQpuiyqzkDyWKY aqTbIbyhHhulGaTWZZOed8catEgoSSjVdFhLGMBzk7e1ZehySvG0173mbxE4AaWykYmd 4cIi0XxeCz414/GnEtOz7TmI88dR1/MQJYlNDaS+iuBToFjUTij9QCqGrw2WW5HaM4KG CnVJY8XDyauHP32A+VvTYq6rVuvnaNN/J0kcP/SUZ6xNjL65SVmjehdOXbI712PMHrVe s3+0uRicUPnJp1qTXGfMOSZzgvMofLcInzhUiTLdiOumradggpPMeEl8JJ/T9wYvrtee CgGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GANHWTSc; 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 w2sor15471309ply.72.2019.06.11.07.56.28 for (Google Transport Security); Tue, 11 Jun 2019 07:56:28 -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:a17:902:4181:: with SMTP id f1mr73651417pld.22.1560264988626; Tue, 11 Jun 2019 07:56:28 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:28 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 70/92] ram: rk3399: Add IO settings Date: Tue, 11 Jun 2019 20:21:13 +0530 Message-Id: <20190611145135.21399-71-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GANHWTSc; 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: , Add IO settings for dram ctl and phy. IO settings are useful for configuring ctl, phy odt, vref, mr5, mode select and other needed input output operations for lpddr4 or any other dramtype sdram. Right now, this patch added IO setting for all supported sdram frequencies. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 104 ++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 9151b023e2..5db7cbe116 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -80,6 +80,110 @@ struct rockchip_dmc_plat { struct regmap *map; }; +struct io_setting { + u32 mhz; + u32 mr5; + /* dram side */ + u32 dq_odt; + u32 ca_odt; + u32 pdds; + u32 dq_vref; + u32 ca_vref; + /* phy side */ + u32 rd_odt; + u32 wr_dq_drv; + u32 wr_ca_drv; + u32 wr_ckcs_drv; + u32 rd_odt_en; + u32 rd_vref; +} lpddr4_io_setting[] = { + { + 50 * MHz, + 0, + /* dram side */ + 0, /* dq_odt; */ + 0, /* ca_odt; */ + 6, /* pdds; */ + 0x72, /* dq_vref; */ + 0x72, /* ca_vref; */ + /* phy side */ + PHY_DRV_ODT_HI_Z, /* rd_odt; */ + PHY_DRV_ODT_40, /* wr_dq_drv; */ + PHY_DRV_ODT_40, /* wr_ca_drv; */ + PHY_DRV_ODT_40, /* wr_ckcs_drv; */ + 0, /* rd_odt_en;*/ + 41, /* rd_vref; (unit %, range 3.3% - 48.7%) */ + }, + { + 600 * MHz, + 0, + /* dram side */ + 1, /* dq_odt; */ + 0, /* ca_odt; */ + 6, /* pdds; */ + 0x72, /* dq_vref; */ + 0x72, /* ca_vref; */ + /* phy side */ + PHY_DRV_ODT_HI_Z, /* rd_odt; */ + PHY_DRV_ODT_48, /* wr_dq_drv; */ + PHY_DRV_ODT_40, /* wr_ca_drv; */ + PHY_DRV_ODT_40, /* wr_ckcs_drv; */ + 0, /* rd_odt_en; */ + 32, /* rd_vref; (unit %, range 3.3% - 48.7%) */ + }, + { + 800 * MHz, + 0, + /* dram side */ + 1, /* dq_odt; */ + 0, /* ca_odt; */ + 1, /* pdds; */ + 0x72, /* dq_vref; */ + 0x72, /* ca_vref; */ + /* phy side */ + PHY_DRV_ODT_40, /* rd_odt; */ + PHY_DRV_ODT_48, /* wr_dq_drv; */ + PHY_DRV_ODT_40, /* wr_ca_drv; */ + PHY_DRV_ODT_40, /* wr_ckcs_drv; */ + 1, /* rd_odt_en; */ + 17, /* rd_vref; (unit %, range 3.3% - 48.7%) */ + }, + { + 933 * MHz, + 0, + /* dram side */ + 3, /* dq_odt; */ + 0, /* ca_odt; */ + 6, /* pdds; */ + 0x59, /* dq_vref; 32% */ + 0x72, /* ca_vref; */ + /* phy side */ + PHY_DRV_ODT_HI_Z, /* rd_odt; */ + PHY_DRV_ODT_48, /* wr_dq_drv; */ + PHY_DRV_ODT_40, /* wr_ca_drv; */ + PHY_DRV_ODT_40, /* wr_ckcs_drv; */ + 0, /* rd_odt_en; */ + 32, /* rd_vref; (unit %, range 3.3% - 48.7%) */ + }, + { + 1066 * MHz, + 0, + /* dram side */ + 6, /* dq_odt; */ + 0, /* ca_odt; */ + 1, /* pdds; */ + 0x10, /* dq_vref; */ + 0x72, /* ca_vref; */ + /* phy side */ + PHY_DRV_ODT_40, /* rd_odt; */ + PHY_DRV_ODT_60, /* wr_dq_drv; */ + PHY_DRV_ODT_40, /* wr_ca_drv; */ + PHY_DRV_ODT_40, /* wr_ckcs_drv; */ + 1, /* rd_odt_en; */ + 17, /* rd_vref; (unit %, range 3.3% - 48.7%) */ + }, +}; + static void *get_ddrc0_con(struct dram_info *dram, u8 channel) { return (channel == 0) ? &dram->grf->ddrc0_con0 : &dram->grf->ddrc0_con1; From patchwork Tue Jun 11 14:51:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 522 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 719903F08A for ; Tue, 11 Jun 2019 16:56:34 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id d125sf9787197pfd.3 for ; Tue, 11 Jun 2019 07:56:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264993; cv=pass; d=google.com; s=arc-20160816; b=BtVcoitFTCauXNmbbpAtd5pJhgbXHLSly9ByFQCQKzsCBsSZsGjnBmq63ZwaoBd1F0 YFVtrUS7bGJQaY0g5pa5C6gMGGUJ/JtX8N1RXYNsjaJ4eJGyEwIhu1B0oKyHZ/b9DX7X KwKEMlbB7cA4/gA7ag/QkRTSCV171RJ1b7xsFOQTVpXH/LCL6vADA79cNxLKe0EytQ2H 7a7OlJ5RX3tVgSUCRviZTJWD65XzYnwgv1Dw0z/iRjmzU3OtGepuCILa8RQVTJkPBnDg nHxOHElTCEpUAwk2m1GHjQBepHmX9oHj1zEH5CvZyWiOA7l7BGMQx/hq9NzdQHJkLEPC +m9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=4IFuzytInjHdGsPJ/YMOr5rwZvqcUX3Hj5rCfyUpXgg=; b=RF+e4Mb0xlZS659M2Dt7M8JkacuEI9vQC/71vgZy7ydtpWBs3bN5b8Gj5LHi8Ammg/ FYgxgpeYWcSZhLHIrDYGhaYZqwn1gx0B1J1qNd0OdtwmpD6LkRfGPYXJoTuUCQFKi0qR YSt7C3QgQYVk0LFd6Dx96JMqXb3QhDpTZHyBSadOb3icUglaTBrpHlX/Y7AxtSkOLX0U gfX3tIeLU7HxDYITS5448FMPpuvwF6XfgGHSJ/scqbEoyyy3bn5wEtEN8tQU6wgYn2J6 mxnCUDKaS/jI+diD5T5Bk8r2MocXeAz6AcuYeZNDJGKOfK0g3p/o9RwgrvL+CDDsk62f 4hQg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i4tr6oM5; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=4IFuzytInjHdGsPJ/YMOr5rwZvqcUX3Hj5rCfyUpXgg=; b=l02PQxKCnpJ5dlOkfPvF5BUGYjCQBIKRW8Y2GzCie3e0ZOiBEY41//0+6YMRyJp8rS wuVtrotCZLhuTf7hmHkHdVMoMyFtUvVJNPoZ5WSf3OIsIqLw5iC0b9DdgezF9wPOiYLQ oqEcF5GVKuAKUxNkLQ3YgDlsqqveXygRChkDg= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=4IFuzytInjHdGsPJ/YMOr5rwZvqcUX3Hj5rCfyUpXgg=; b=pQSCCvbMixK0kt+oK0YU+/4vFsYr09CdiyojsOHEMiLohsnKgRoaoxg03LOCr4E6bm SZI3n+R+w2OwZOhmG18QCw3Dg2n655e3Ol3z985fGshQsUKAutozY9lfMCa1kDlSx0Rz wVDZyWGASJCZ2hnN5oF43eKUTEVaYxeTNewThlcNnFoK27egQyCmXaIKDkDiyM9XXIMm OJ1K5VC/owdRfkiEuinpHUAElEWmlcPML/6OLN170LpOig7VO3E8W8Q8iUHp1mB2D840 dq6JmmQYfOUI98Z4lgy0MAKeGpQy5geOk8Art+bowur3T2JSpaqs8YdWyPM2fqajH56y kgpQ== X-Gm-Message-State: APjAAAUhtDar6fU/s80k83agGN3euDCPpZ1aUUhuQgLFrIDMbwh3XS2e xmOMYKZxVvaiUv+cmgi5mYtqn1cj X-Google-Smtp-Source: APXvYqw0AMQPBc2mrdNqE7rnMCBU3988SFQQPlzj8auT8mlR8LpuLdzhGYGtllMsZe0NFapUZ0FAvg== X-Received: by 2002:a62:2ec4:: with SMTP id u187mr79524137pfu.84.1560264993180; Tue, 11 Jun 2019 07:56:33 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:d0c2:: with SMTP id y2ls859994pjw.5.gmail; Tue, 11 Jun 2019 07:56:33 -0700 (PDT) X-Received: by 2002:a17:90a:d58d:: with SMTP id v13mr27235709pju.1.1560264992867; Tue, 11 Jun 2019 07:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264992; cv=none; d=google.com; s=arc-20160816; b=c9pcatTSCA9O7FfP23k8Q5SYymdaKpY+/S/w7QNkDVKMssd/9QQsimx+iG7s57yh1+ lFt9P8p7RcOJ7xKj23OET04jvhSnaXh4xYer0JudnCEIOnhHa8WCtGSHd/njK8k5SR54 NegIO+g7NPUdMStvklQE+f9x7umwM0fZD0h18Fy2upEHucyCZW3AxgC/6PKC9ELq4ltn 6P20o+/lvuqCizEx6tRSjNA3OcQJMs/erfmPVnP8ZHPDoKCETI4SKMrIeBrLkrGdGG14 1cpeILpjihmNwsx2z8YawOf9Ef63ZOCCHycN+bHAx4SUBS06o/TCnx8HZGXxGKwXFbpk 6VIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=8c4S0X3iJtmuWtriTLrvafldLxCMegBBSbIDtgfjMO4=; b=N5kMYF3OhNndQnd8dzXSwk4fGYIlFh7mUFfhX7BzKXlVI4I5zgZjCqTo2grNpMbomQ hnNnUgLtKh1XLd6AD4izvj2BnUGmdfwBpoShPkLZMFPyL8RKJyH3UHr1vugvJ/3Cboe0 u57IcSU+vmCfBKtXZRrbXHfcPzy0INe2av76Ic87yW6BSPl5GHGGVLSjsttTq4oQNo5h Eu72pebhijgXbLJRtQKi46e9KchIaznIGepDy2wPJhgehLX0+MOgtMoN4Ih98AuvMi1c 3qqaq2wjCd8AN6ogGaYqezzgnytSl6OHHYaoBXqTHumm9bOxcuqT+KCpZ8r7xm2bFWrj e/kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i4tr6oM5; 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 d5sor7489044plr.38.2019.06.11.07.56.32 for (Google Transport Security); Tue, 11 Jun 2019 07:56:32 -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:a17:902:e306:: with SMTP id cg6mr46243669plb.341.1560264992549; Tue, 11 Jun 2019 07:56:32 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:32 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 71/92] ram: sdram: Configure lpddr4 tsel rd, wr based on IO settings Date: Tue, 11 Jun 2019 20:21:14 +0530 Message-Id: <20190611145135.21399-72-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i4tr6oM5; 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: , Now we have IO settings available for all supported sdram frequencies, so retrieve these IO settings and make used for LPDDR4 ds odt configuration. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 42 ++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 5db7cbe116..6385df5600 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -184,6 +184,33 @@ struct io_setting { }, }; +/** + * phy = 0, PHY boot freq + * phy = 1, PHY index 0 + * phy = 2, PHY index 1 + */ +static struct io_setting * +lpddr4_get_io_settings(const struct rk3399_sdram_params *params, u32 mr5) +{ + struct io_setting *io = NULL; + u32 n; + + for (n = 0; n < ARRAY_SIZE(lpddr4_io_setting); n++) { + io = &lpddr4_io_setting[n]; + + if (io->mr5 != 0) { + if (io->mhz >= params->base.ddr_freq && + io->mr5 == mr5) + break; + } else { + if (io->mhz >= params->base.ddr_freq) + break; + } + } + + return io; +} + static void *get_ddrc0_con(struct dram_info *dram, u8 channel) { return (channel == 0) ? &dram->grf->ddrc0_con0 : &dram->grf->ddrc0_con1; @@ -525,7 +552,7 @@ static int phy_io_config(const struct chan_info *chan, } static void set_ds_odt(const struct chan_info *chan, - const struct rk3399_sdram_params *sdram_params) + const struct rk3399_sdram_params *sdram_params, u32 mr5) { u32 *denali_phy = chan->publ->denali_phy; @@ -534,19 +561,22 @@ static void set_ds_odt(const struct chan_info *chan, u32 tsel_idle_select_n, tsel_rd_select_n; u32 tsel_wr_select_dq_p, tsel_wr_select_ca_p; u32 tsel_wr_select_dq_n, tsel_wr_select_ca_n; + struct io_setting *io = NULL; u32 reg_value; if (sdram_params->base.dramtype == LPDDR4) { + io = lpddr4_get_io_settings(sdram_params, mr5); + tsel_rd_select_p = PHY_DRV_ODT_HI_Z; - tsel_rd_select_n = PHY_DRV_ODT_240; + tsel_rd_select_n = io->rd_odt; tsel_idle_select_p = PHY_DRV_ODT_HI_Z; tsel_idle_select_n = PHY_DRV_ODT_240; - tsel_wr_select_dq_p = PHY_DRV_ODT_40; + tsel_wr_select_dq_p = io->wr_dq_drv; tsel_wr_select_dq_n = PHY_DRV_ODT_40; - tsel_wr_select_ca_p = PHY_DRV_ODT_40; + tsel_wr_select_ca_p = io->wr_ca_drv; tsel_wr_select_ca_n = PHY_DRV_ODT_40; } else if (sdram_params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; @@ -728,7 +758,7 @@ static void pctl_start(struct dram_info *dram, } static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, - u32 channel, const struct rk3399_sdram_params *sdram_params) + u32 channel, struct rk3399_sdram_params *sdram_params) { u32 *denali_ctl = chan->pctl->denali_ctl; u32 *denali_pi = chan->pi->denali_pi; @@ -812,7 +842,7 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, copy_to_reg(&denali_phy[512], ¶ms_phy[512], (549 - 512 + 1) * 4); copy_to_reg(&denali_phy[640], ¶ms_phy[640], (677 - 640 + 1) * 4); copy_to_reg(&denali_phy[768], ¶ms_phy[768], (805 - 768 + 1) * 4); - set_ds_odt(chan, sdram_params); + set_ds_odt(chan, sdram_params, 0); /* * phy_dqs_tsel_wr_timing_X 8bits DENALI_PHY_84/212/340/468 offset_8 From patchwork Tue Jun 11 14:51:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 523 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 01A9E3F08A for ; Tue, 11 Jun 2019 16:56:39 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id a5sf7920567pla.3 for ; Tue, 11 Jun 2019 07:56:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264997; cv=pass; d=google.com; s=arc-20160816; b=rJNiCbWLxxvUIEB7dtyBpI8eAT+qdTL/1e5bJkbhM0Shv1wwPks4WFW/ZzT/qHJpAg NuXUjbQrMcpNpTCV6ydBEIla9HLLoAC9t5oOYR4Kr2gQ22+BLTEHIJczRbtt2O+SesFI A+ADrF3aoT86TSETBBqDz5fxxdst3orI01Yq42xTEyEhsSyGLZAWzHIODW2mBZg+MGfi Ar2Z0wH3/NEur//1d7vqKCCadGlJvVc5ZFHoiTZny6XF5MJD/kzsWyDn+7dgRap/95dJ aTYQSYYcNS0/FpLuPxb+lmqEngNyAD6NlemmjmD/hmkFC11YuExi1loKBdCxSynZ2duB Zxxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jjaR4GAPfcAR2iBlynmjW20/v56BElAU9YU4u5ue1LU=; b=B0yXWlcHE+CmkZqgGPa+ee4ifANDeNJN496CHMKT5bcHi7JurJU42muL9SCvy8q75v kbiWndDtMAHHuOYvcDGfAUH9WgBGIC3F75ZUd+jjykR8Fl4hilyduYD0fGwk342BzctR wJO9h0kWwdR07XaWv98Oyax+JoOciTLeWyzNUbv2C+Ex4TBjS1gNcZDngt9VJ2evPGyM AUSSv4MHmK0eslQWlBebgaxcbhAWUu24v8qDupwKojoYxMBHDf+A1EbKs9m4aQXVaalN 32D7eyn55jIqeUSYBmC6W8UjIs85llX1+AH5lDNm/DkLXU2x2qPwNybwIc7mnrhp1miH CHyQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kptZu+l4; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=jjaR4GAPfcAR2iBlynmjW20/v56BElAU9YU4u5ue1LU=; b=C747TDWwZCPXpl2uQ2IkWSY+dwtHgYnVHMJTFXFJNdjxG5+laNejGfFGGI74tBbtiB ei6CO0Wpah52WALh76xISz/etK6xMl+XfEmaVNH7bYB0jUkKkXv9HtiqllzfWaOF8AxI QEeI1SETHbaIRWjzXDAs/PpKXzRf+HFUy3v00= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=jjaR4GAPfcAR2iBlynmjW20/v56BElAU9YU4u5ue1LU=; b=SjD210r0FliFcx6iDC2QLXFmJ2lEp/fv8+gKuE6/uYepjX7K7sVMg655yOxIgMZtCI It9xHR98l9HDJVZrQg7ZM15IYEFmeZaa1R69CHITslxVIdvPS2VhsSddf6ZLgOpl9zQz S6AN8oQdGPFMCii4jUeV7LL69nx4L0Dc7243rp5UDDqQVx60sccC72nnZKrx21t/mx0l GqwcTM94ylwhD8js13xrQu8nVlOMK+Pjk4rgp9ws53Ey21mAfl7PfCJ1zMokQ6fqfgMI 40QjSh+691Ld4rXrBas432/LKtBDMu701FBIiUiNYzGNFZypAgC88ui6G1s7JMZtxplm 1ssw== X-Gm-Message-State: APjAAAVsGChqbgfS0XtvS0cq+iUZpJ/snubeCpX0LKiFdLlcQRm7PWqj XxXcDV7wbGfo/iq9wMxz9fTLVXcp X-Google-Smtp-Source: APXvYqwpb6RZTVmryNJcvOS/6ecaJ0D+QgSXpMH1uzY+D6a0qQxoM+VD4pEYqi/7WN2GaXwSIPnWLw== X-Received: by 2002:a17:90a:7f93:: with SMTP id m19mr28093033pjl.73.1560264997763; Tue, 11 Jun 2019 07:56:37 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:42cd:: with SMTP id l13ls116706pgp.0.gmail; Tue, 11 Jun 2019 07:56:37 -0700 (PDT) X-Received: by 2002:a65:60d9:: with SMTP id r25mr20608320pgv.228.1560264997120; Tue, 11 Jun 2019 07:56:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264997; cv=none; d=google.com; s=arc-20160816; b=YLA35ZqImR2OT7rNTtdxZusEM+dgrYa7yJ8aIT736MZc7X52NNmavNPrwEIwSthPfs hI/vW14Ak4FGDo7iGAEDT2a7uj/YZgT4VGzv1vcukDHLq1rYZvkUeYe+wUdb/xqb6PKi 9gsr+ecSfKI6QDI0eQv5ojihSsp2SaK7upaxWSKmuC8TdA1JU+Su6bUY/CHFyUOUroZO BtkjMl8HjDt1vs9c8hoKs2qgCXs1vqN5tJOTUmgmqjA/CRzfikTBr183221HcJE6vriR KjdJh1LGwGF2aIho/PzEWgdcg5OfA6DMwlXNBKFAlKnf6DN/B6dcmjzKZ2HcGj/LCJ1T uP8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/MXONAs6Fu3wWL6xP4hCLg6XcM1l7Qu3kL3gQwYjmtg=; b=Q8Y3I65KoMNWEZLbYPlXktqt1VBgnlKymlgurHZbahKZXyt2nUlAwoHgHr76/R6JUZ k3He7xl+n9gDAX1vr2DfxZqzNv2+6gmegoPidi/DRTk68eIdiZ+rVG7NTjgqLsGPGurw 3XZlCyX7UpKFIrhQyr7nrRULRPaUM0RddRJBVmgKxujLZV+Znakt2UJbAa7+MIxxNiB6 IOiXxp7W3UJ+swMZlNj6JU+pNMLLLXG7WlANvaKzFoaA3XgmpWNatlp1vY1Sv2egefrU 1dzJ/voT2vBfmuvw/eONfjdKM78cEMOPU7dF0tyWH06CPPqDWWFygyxG19TDIr+dooBh QqlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kptZu+l4; 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 a16sor7730644pff.11.2019.06.11.07.56.37 for (Google Transport Security); Tue, 11 Jun 2019 07:56:37 -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:a62:e0c2:: with SMTP id d63mr23902909pfm.60.1560264996789; Tue, 11 Jun 2019 07:56:36 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:36 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 72/92] ram: rk3399: Add tsel control clock drive Date: Tue, 11 Jun 2019 20:21:15 +0530 Message-Id: <20190611145135.21399-73-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kptZu+l4; 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: , tsel contrl clock drives are required to configure PHY 929, 939 controls drive settings. Add support for these control clock for all dramtype sdrams. Thse control clock drives are configure via tsel_ckcs_select_p and tsel_ckcs_select_n variables. tsel_ckcs_select_n is PHY_DRV_ODT_34_3 value where as tsel_ckcs_select_p is retrived from IO settings for lpddr4 and rest uses PHY_DRV_ODT_34_3. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 6385df5600..8eaa304e95 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -561,6 +561,7 @@ static void set_ds_odt(const struct chan_info *chan, u32 tsel_idle_select_n, tsel_rd_select_n; u32 tsel_wr_select_dq_p, tsel_wr_select_ca_p; u32 tsel_wr_select_dq_n, tsel_wr_select_ca_n; + u32 tsel_ckcs_select_p, tsel_ckcs_select_n; struct io_setting *io = NULL; u32 reg_value; @@ -578,6 +579,9 @@ static void set_ds_odt(const struct chan_info *chan, tsel_wr_select_ca_p = io->wr_ca_drv; tsel_wr_select_ca_n = PHY_DRV_ODT_40; + + tsel_ckcs_select_p = io->wr_ckcs_drv; + tsel_ckcs_select_n = PHY_DRV_ODT_34_3; } else if (sdram_params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; tsel_rd_select_n = PHY_DRV_ODT_HI_Z; @@ -590,6 +594,9 @@ static void set_ds_odt(const struct chan_info *chan, tsel_wr_select_ca_p = PHY_DRV_ODT_48; tsel_wr_select_ca_n = PHY_DRV_ODT_48; + + tsel_ckcs_select_p = PHY_DRV_ODT_34_3; + tsel_ckcs_select_n = PHY_DRV_ODT_34_3; } else { tsel_rd_select_p = PHY_DRV_ODT_240; tsel_rd_select_n = PHY_DRV_ODT_240; @@ -602,6 +609,9 @@ static void set_ds_odt(const struct chan_info *chan, tsel_wr_select_ca_p = PHY_DRV_ODT_34_3; tsel_wr_select_ca_n = PHY_DRV_ODT_34_3; + + tsel_ckcs_select_p = PHY_DRV_ODT_34_3; + tsel_ckcs_select_n = PHY_DRV_ODT_34_3; } if (sdram_params->base.odt == 1) @@ -660,10 +670,12 @@ static void set_ds_odt(const struct chan_info *chan, clrsetbits_le32(&denali_phy[935], 0xff, reg_value); /* phy_pad_cs_drive 8bits DENALI_PHY_939 offset_0 */ - clrsetbits_le32(&denali_phy[939], 0xff, reg_value); + clrsetbits_le32(&denali_phy[939], 0xff, + tsel_ckcs_select_n | (tsel_ckcs_select_p << 0x4)); /* phy_pad_clk_drive 8bits DENALI_PHY_929 offset_0 */ - clrsetbits_le32(&denali_phy[929], 0xff, reg_value); + clrsetbits_le32(&denali_phy[929], 0xff, + tsel_ckcs_select_n | (tsel_ckcs_select_p << 0x4)); /* phy_pad_fdbk_drive 23bit DENALI_PHY_924/925 */ clrsetbits_le32(&denali_phy[924], 0xff, From patchwork Tue Jun 11 14:51:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 524 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A69ED3F08A for ; Tue, 11 Jun 2019 16:56:42 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id x9sf9760629pfm.16 for ; Tue, 11 Jun 2019 07:56:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265001; cv=pass; d=google.com; s=arc-20160816; b=Km7e5x8VVjQfyeDrc+pOsLAJRi8I7NFydJ7hVv4cpvl9FAVEorvi2XhS89pyojtAm1 +DpdRVHse+6/pnuqc8/iMaR9bngmQDmA7MUM4sbtUWohAxXwFxpJ/zEs/dpHmcp67ElL Xqs8I52UMUJ3uHnHdFqCaPJsBCzcX8Ik7rxD/DHX4Boh+yRLZfKd321j1mfpdoc3nzeq JLKvN0cELVMBoxYzWiJj10Icj12Bj95s57psUo4KzojWQFBBkst2dgMUUXsL/H2A7tFA 9dT+MeHFx8Ig64o+gFJt0LOTwZdkXhK18Zj5htaJMRnWxAGYrxCBwbZ/YdusbgsLxXVn R6zA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=gHH2oHL9+nN8I/NPFeEzqGjhOcml8jVnn2UI9tI2k9g=; b=n4b+twQYRtULuZAqphEM3ulGVX8uaXYl9Qu7OSTA7ttXGUR4uCITMU8WW9fnB+O/FW uGcrqyF7bKYCImLrb0l3FP2p43mvaBRaGvzjQJ7NGgVUAK24bgpLq9ifUAowbECddwGD Xh2sbDaHxZxjzIf2Xwz1IowxPm8s9yFBLA2zeWSzFEaDN5mDt/PbqWZbYmNOXuS5SvuX P4uQMlEKw05EKKB6SBLKh1NhJAQRpLxqDHPA+g7clkbp3gHdo7vPCfGyP7NIWR20LYrC 9A0ftGYVbnDBzl/zNf6thweMaBEkgKrECYCmPbpmcVAOqrEhgym19yOGywLPoi1i4tlb FtmQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j6reQS1z; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=gHH2oHL9+nN8I/NPFeEzqGjhOcml8jVnn2UI9tI2k9g=; b=W2l9uxTUQWoHmS53lMSjvfUBKHY+rq3uE3GG8ia6TXwRSQ7yNdEQVWG/kRtNaIf6tq 5Q1Ks/8aBhLZ18N4q4EZRmiyrSqid8nYuBRaO6Dei5W0aJ10Z4uAu6d3SZX4OwCw3nKJ p0Rpl7iU1O3hEk5f9DEvy6cNG0X/V0bs5xnQk= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=gHH2oHL9+nN8I/NPFeEzqGjhOcml8jVnn2UI9tI2k9g=; b=Btrqt2ohCso2cPzBR62O1Dx8XbNxn/rIyVv38dIt0B/vXf6HYljglwP51O6jFH29kC 2k4hrmg3ttF4mb8+PjGdaNNHngGy+O+79C06yWu1m/33RiEkxyeGRqQW/ISAGgEKqSGO 8vBRXEA/akMiM8gvEjDI+ZPmMmAoy6i840XOwlT3P7xgU3dmj/KUAGiQ6tsOF0W9PUzb mGM5BPwACmupuIfG/fARTwpBB7KulFXlkQA6OrJJrglIjZUe6bTZf7ifuvIpNZNB8wXX +yh4YzVM9tyryAZDuq5DLlfLooec7uaKV/SQjnDQLhCtZ6fM/wyeuKLipTZ7wFqlOT9d Be1Q== X-Gm-Message-State: APjAAAVVkVIIQJxCT+dXqHP1JYlk+FiFO6Lrt0VclpG2Vv1w7kmn+Fz1 GxHR4g0lLicmUQbZj4A2RvSmiJ4U X-Google-Smtp-Source: APXvYqxlbc7NFJ0OitZOc2AR7EHfTnIqqZiAFA+CQ/Ffcf05qns1eEdIpruHDrhXsUVCTgJhU+lsQw== X-Received: by 2002:a63:3c9:: with SMTP id 192mr15189908pgd.90.1560265001321; Tue, 11 Jun 2019 07:56:41 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:2670:: with SMTP id l103ls859969pje.5.canary-gmail; Tue, 11 Jun 2019 07:56:41 -0700 (PDT) X-Received: by 2002:a17:902:2b8a:: with SMTP id l10mr37855574plb.283.1560265001027; Tue, 11 Jun 2019 07:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265001; cv=none; d=google.com; s=arc-20160816; b=i0HKxFQhb2so+QQvQzEV2XaCTsu1FxBhqxwjQtGXtcx8E738+tD/10IzDrzo59dmT3 cIO/1bvSEht98+eQDyvgiFWdlFkLPJaQcO9E6qyQoFUVOSW2wZjzXKTr++Zu4C+gkvI5 F1H0FZkWTW9XHW/xkLKDOAEqjrNk06+xW4Nr7wkJJql9sM1J/KH/cfVdP/UgGkS8zJCP o4cEYnKj6qgbbcZXSMGKh/2hFkmWal+nzvZ85FzIPW8w/PfijGBUHDn258vKpGqCzwtK PS5mE84pQPv/uzPD5sG922nUjDzWNOpcFCduLQXo+YA5pFRma7v/c2+u8vENg4QEalSe WYWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=5Ey+tXNUftUUYHSLf3pHnoBViCPgW7WVcaPO8JBuG00=; b=swmFPVVu0Z8zcaJEwu97c9VF44bOcIBwNpy3Ng5nYG5HWHR/YsmL2miI6C0mwHBfLO /KBbt3qXf84WvSuzM50GxSaLw5yvW5RdDdgF9XsvX+p/QcL84W8NLmmhRpGjvUsBkJuA ocnXiYplFYSzzPDrWI3rAXV+6DHY2qpp955v8X9IAfVcijKUgHTCnRU35WS4wVTem1Dk 1qmkYNwT1QeaN+SkQM0yhqtCiE9JwnZfhaXWcMQbMd3fWowCLPijgWGOz4NsdfuzCgQj HGzxQw6XZeCUbcCWDogujZxax1czbzSAObPD5zKOxz9++j4gPieWR0/vWqSXuMJ1WoFv 2Oyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j6reQS1z; 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 b65sor13301828pfa.19.2019.06.11.07.56.41 for (Google Transport Security); Tue, 11 Jun 2019 07:56:41 -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:956d:: with SMTP id x13mr41484908pfq.132.1560265000707; Tue, 11 Jun 2019 07:56:40 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:40 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 73/92] ram: rk3399: Configure soc odt support Date: Tue, 11 Jun 2019 20:21:16 +0530 Message-Id: <20190611145135.21399-74-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j6reQS1z; 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: , CTL 145, 146, 159, 160 registers are used to configure soc odt on rk3399. These soc odt values are updated from CS0_MR22_VAL and CS1_MR22_VAL and for lpddr4 these values ORed with tsel_rd_select_n. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 49 ++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 8eaa304e95..2ce9066d53 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -40,6 +40,8 @@ #define PHY_SLEWP_EN 0x1 #define PHY_SLEWN_EN 0x1 #define PHY_RX_CM_INPUT 0x1 +#define CS0_MR22_VAL 0 +#define CS1_MR22_VAL 3 #define CRU_SFTRST_DDR_CTRL(ch, n) ((0x1 << (8 + 16 + (ch) * 4)) | \ ((n) << (8 + (ch) * 4))) @@ -555,7 +557,7 @@ static void set_ds_odt(const struct chan_info *chan, const struct rk3399_sdram_params *sdram_params, u32 mr5) { u32 *denali_phy = chan->publ->denali_phy; - + u32 *denali_ctl = chan->pctl->denali_ctl; u32 tsel_idle_en, tsel_wr_en, tsel_rd_en; u32 tsel_idle_select_p, tsel_rd_select_p; u32 tsel_idle_select_n, tsel_rd_select_n; @@ -563,6 +565,7 @@ static void set_ds_odt(const struct chan_info *chan, u32 tsel_wr_select_dq_n, tsel_wr_select_ca_n; u32 tsel_ckcs_select_p, tsel_ckcs_select_n; struct io_setting *io = NULL; + u32 soc_odt = 0; u32 reg_value; if (sdram_params->base.dramtype == LPDDR4) { @@ -582,6 +585,35 @@ static void set_ds_odt(const struct chan_info *chan, tsel_ckcs_select_p = io->wr_ckcs_drv; tsel_ckcs_select_n = PHY_DRV_ODT_34_3; + switch (tsel_rd_select_n) { + case PHY_DRV_ODT_240: + soc_odt = 1; + break; + case PHY_DRV_ODT_120: + soc_odt = 2; + break; + case PHY_DRV_ODT_80: + soc_odt = 3; + break; + case PHY_DRV_ODT_60: + soc_odt = 4; + break; + case PHY_DRV_ODT_48: + soc_odt = 5; + break; + case PHY_DRV_ODT_40: + soc_odt = 6; + break; + case PHY_DRV_ODT_34_3: + soc_odt = 6; + printf("%s: Unable to support LPDDR4 MR22 Soc ODT\n", + __func__); + break; + case PHY_DRV_ODT_HI_Z: + default: + soc_odt = 0; + break; + } } else if (sdram_params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; tsel_rd_select_n = PHY_DRV_ODT_HI_Z; @@ -622,6 +654,21 @@ static void set_ds_odt(const struct chan_info *chan, tsel_wr_en = 0; tsel_idle_en = 0; + /* F0_0 */ + clrsetbits_le32(&denali_ctl[145], 0xFF << 16, + (soc_odt | (CS0_MR22_VAL << 3)) << 16); + /* F2_0, F1_0 */ + clrsetbits_le32(&denali_ctl[146], 0xFF00FF, + ((soc_odt | (CS0_MR22_VAL << 3)) << 16) | + (soc_odt | (CS0_MR22_VAL << 3))); + /* F0_1 */ + clrsetbits_le32(&denali_ctl[159], 0xFF << 16, + (soc_odt | (CS1_MR22_VAL << 3)) << 16); + /* F2_1, F1_1 */ + clrsetbits_le32(&denali_ctl[160], 0xFF00FF, + ((soc_odt | (CS1_MR22_VAL << 3)) << 16) | + (soc_odt | (CS1_MR22_VAL << 3))); + /* * phy_dq_tsel_select_X 24bits DENALI_PHY_6/134/262/390 offset_0 * sets termination values for read/idle cycles and drive strength From patchwork Tue Jun 11 14:51:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 525 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5E6683F08A for ; Tue, 11 Jun 2019 16:56:46 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id t64sf7534414pgt.8 for ; Tue, 11 Jun 2019 07:56:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265005; cv=pass; d=google.com; s=arc-20160816; b=hf0cYxVJp3codd8j6pNWQ+wOJnZKa5Upp1JqMe8rlCyIVHON3pbmGkOT0sjfR4dLmm ddfd3v6TQ+2TLbW3g1RMUR8NSq3vV7zN8EZLL7O3pZbCnmhS9ZKuFwNyQta6PT19+kjG IsyaSx5VUviZFWwYYxH0yfpkjX2boD7BdQGHhOa5glVJbFe2kOLS/oO+2I3fzv6Ugmf6 fmELuiZC+Uw7eRMyFP51ftdj+6+RU6xVcprEdf6x8lu//qTGXWrk9smWXuPgD8l6mGqQ Hn1QP3q9nsbGsGMfknafjSTweta2UN9i+NQ3wnQzACsxrW8fGxSz3cCBWEIn/c2naBP6 9PBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=7CNlQ+/Zkdkpy1GSqLH8n3LCItCrFWRytuPzCl3SfI8=; b=YdNM2+kwX7Kna606PwpVljw3GNVEgXoxsjl2eBTwgC2GeW3m3ZEmSLIl9ikU5YCByy cq7QMzlWPf+2724K6CGCBgBShz1PmQzR58jVBMrKQky8NxbBsWrfIxVe7ZqN1ANSK0sm dj1+JtcfgEiWc9xjq9eC1byMyUDHtdXK2XSNmvmvzlpIHZPb1+/gYWg3bVcKuP8+dxlW TWisY4LUvOMRZieoMx+ZFeU1zxf8nUtx4ef94DEDq3yv8BRkUJKZOuBO43Jh3yKTPZ4A kRJO+t68daChAGXXL/jLlsgXodviIehN3LUy8FjyggkyTgiT1tt6bWUpiBaRHM1GEP7X owDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HC25Yp5F; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=7CNlQ+/Zkdkpy1GSqLH8n3LCItCrFWRytuPzCl3SfI8=; b=D0S5u0mQ6soUZ32EPpBlZboeZnU53ApeZfZewthmlAPV2qz2rYstP4dQBYfdIUVqRO Z7enamYDITlbJg+I6D3B7IzBqN247dtvy6sRzzxqlT8HV4rhMBrFJrFOKHxOUdzf/nxQ b5iGXyvl52c96U6mrT0EybC4DZYZ7nzZ5tXBg= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=7CNlQ+/Zkdkpy1GSqLH8n3LCItCrFWRytuPzCl3SfI8=; b=jBFmE+kAHXCwIZ20S1wzyaj+xAwuHkgKn8NF8t8jX9GPfp3QbAzgflpq9/JywyseRC TBSkclTzcJUznhjM0Fg6FtIjSK6uU7YNUG9ckqupB0QIZp+mwJO9KZMbNQjZQCZDLXGm H5EtL2uFY9zSXEfowrAcYRiUtXS25crNeHmY2miP/5x0hpuEaYgZ1Qw1vUeIKf2fHDtZ DQ45Gbe4BMTvEgKSN2UBf9vE+BQ/LNf9J8wexm2t81F5YQgVHEFq8bt6pRizF47MNfxJ 2WJ97YWXhKhsL9Z1DESVR+Sz09CErJ7rEgmKZ34tzBj6tavTb8aOf5VSX3u72AqcdpuA y4pQ== X-Gm-Message-State: APjAAAW9d/uA5chE60hJXQRxH+NW7ZIDYQml574UAEs5mw5hrHfdVh8Y 7mwrn+PC9e4dXZAwyeZRm1dwMO+y X-Google-Smtp-Source: APXvYqxsfxE4mQC5P9wy7OTioHcoo9TPYid6S6sfkhLzXhhLZ9W/vG6elMNCKxDUb0wb01Gzv9DVWw== X-Received: by 2002:a63:ee12:: with SMTP id e18mr21147650pgi.412.1560265005027; Tue, 11 Jun 2019 07:56:45 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:1cc:: with SMTP id 195ls4519706pgb.2.gmail; Tue, 11 Jun 2019 07:56:44 -0700 (PDT) X-Received: by 2002:a63:1617:: with SMTP id w23mr12905142pgl.183.1560265004580; Tue, 11 Jun 2019 07:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265004; cv=none; d=google.com; s=arc-20160816; b=XYwj7qzC2Didq6fVLcv0bzP4UADNselvbLxsy4EEDHL9MIB04vY1g7gxxr19DkWzgs Wkg+uLQP+jw1QgrwGhosThwLJ1Fn5/SBcBvkRe29IMKoxOnsoHjy3T7tpQalLd1K6FRe lK+KQElw32mQIq9t6rkjm2Xmpx3odsvkeJ37VTiDUgYe7SnppUs+nlZjCp5i7MQTvUC9 PGY//pR6pHE8MpWNBgu/O0/2ov0lWbTNxvav8crYj3z2/e2DIqeJnlkrwmeVkZgQNP4Q zztHTvoyFQ1E0NPHJPYSLx7Y2dlwI6kJNLkcUnXoEb33bNw1qVRwW22H0FMWwJT2Hwsi sgfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=nn/bptUR9NP7149zH48cvEKKo/AitoZ6dFu84lE6uH8=; b=cL64niCP6BxXPAAU0RTJYca3n0wn/A4/XjO4HGWR/6NtfGwylfAmr0fjZsO1eO5U6i /WJsFzRopiW4BnvFrGiDxXq8FIgnhrPsC3MFSfwj+DQg95PjkruwYykqy0cVAngtnz3W OapLgQDI+n0/SiDBFPGTKzrb21QGSNeH/BHXWVnSCNR2SrOE0YmYBslH2s+LxGYLmHUf 47yK9kdEFV55bRLDWnLxTdNFJhpzLqhhCU75OdncFnOuerM05utCsSLB6eQVyrm23+Jq nkcdT5kgvp/o3gs3IPbJHWBZocqEDWcOQtuhwj3jdNhWRUnfKM3rzoYzS7YUvIoVnYsd hZYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HC25Yp5F; 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 35sor11870978pgn.16.2019.06.11.07.56.44 for (Google Transport Security); Tue, 11 Jun 2019 07:56:44 -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:a63:1b56:: with SMTP id b22mr19811987pgm.87.1560265004176; Tue, 11 Jun 2019 07:56:44 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:43 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 74/92] ram: rk3399: Get lpddr4 tsel_rd_en from io settings Date: Tue, 11 Jun 2019 20:21:17 +0530 Message-Id: <20190611145135.21399-75-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HC25Yp5F; 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: , For base.odt 1 the lpddr4 tsel_rd_en value is depending on IO settings of rd_odt_en. Add support for it. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 2ce9066d53..c0e9a4e7c8 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -646,10 +646,14 @@ static void set_ds_odt(const struct chan_info *chan, tsel_ckcs_select_n = PHY_DRV_ODT_34_3; } - if (sdram_params->base.odt == 1) + if (sdram_params->base.odt == 1) { tsel_rd_en = 1; - else + + if (sdram_params->base.dramtype == LPDDR4) + tsel_rd_en = io->rd_odt_en; + } else { tsel_rd_en = 0; + } tsel_wr_en = 0; tsel_idle_en = 0; From patchwork Tue Jun 11 14:51:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 526 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E63523F08A for ; Tue, 11 Jun 2019 16:56:49 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id f25sf9754827pfk.14 for ; Tue, 11 Jun 2019 07:56:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265008; cv=pass; d=google.com; s=arc-20160816; b=nh6GOR23Z9Fg+d9ptTutqdBtsBQdbZQPajtiRdAFMVG+XhWUMclyvLf2vho1BUpqm7 p03henkGirX1Ee8efbZgghlglOmGmH6HkWJK/7c21A0wg28k7clsyezAXnWe92ypFq14 /6Kv8CPNKB6dB1SiRHz0Mve80lmVh1t3xJGx8sqmDQXG4LU+b5Lj71iWg5h1jlDbTxYr 74MywDr0l1NYKlbDlSDk89L3mbq7j4Wy05VHIYvEdzlJuT2Fr5gY0vrR/TSHI3/Zf3Mj UPPDovqBB4GckJ8/bBKJIoS6TifqzKmqo7i9ksYYSzW+ugES6xkDIU0SlLzb/ML4jbZ+ a5iQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wwFfqsbIX6XP+5gX0pLc7UMx3mYSC9kxZUMo8SwLaNQ=; b=XhJxojI+k6yUNEoz5sM3gXxBdRolzaz4ryC/N6tBLJ750XjfsHt4tX7lxoDqpVyBSN HulOY8a05VQs6pRUQtiLsjsms9Ys97EZ79ZcmbXsslhYS0TG+s5LGK1X6P1C7lCruwLn pbmJVHr0iwsPYy1Y0s+IrhnV0ILB2TyW2do/wUNaXRsKHeYcR5vOoboe57Xh8jKSFkxN mElS6lFEWbMKD2sIJ8UQhhrcLK5AaSKx/kH35TGRIOMgv3hH3hkjfgjlHvdT0ZJVaeB+ kIUTNqO17qnAQu4+d+6oR0hEdsP+KXIJq3kNjKRe5601LU0QKKrCHYqEHRmipdLedN6a /RCg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jqgj6lY1; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=wwFfqsbIX6XP+5gX0pLc7UMx3mYSC9kxZUMo8SwLaNQ=; b=ca6ob4FGh0vtMG9STcPYQVA2mS5y6q4sIevvqIAWF+TWMUpiFN9hI+EPAUthK8X7/N 7dJ95iu6ro4ncvmnRUJmymgMrLbTTfWY7OF0SgkGLlH1yIlYrg/YliR9r9An5hQuSJqU u+vc6DxpKcSjnVHvM1FMti5VqSbS4r7Orm67U= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=wwFfqsbIX6XP+5gX0pLc7UMx3mYSC9kxZUMo8SwLaNQ=; b=SrBUtughTp8YmjYKZWugUlnL8DYrfla4G82U8YaLYds0SkI4Nm45q2xrxTXRZBh+md ylR6jvayyTYS6Xti6GdHFxfDOr1uSrJeXqErmm7waX9yPIP2alvjnm82oaObpYzpyTn6 ICqieRjfAxCWVZZCNUxuhH7wzhyo6tnRXSH/OViLeRv90vsTGgnXLyYgSzHK/XUFgNeC wV4MzCoFm7PAFfLNurWvf7IUhEcXjZkYxkXJkaCsUwYKExSjOTqTTNQKPao1iX1Kzn48 x8QP7XXkBrNLbKfwbx/VcmS9MKfSL8TulOhOJ2LzZHf6a7n/naK0QvazGDa0WoSA1mKa AEpw== X-Gm-Message-State: APjAAAXxb7jrvlc0/XCRUKelHwdtlVKx7lRTyDvSqBk5Mt/cYIzvxuWW 9IYSVqjQKcUK4oYRc0OqeM6D095d X-Google-Smtp-Source: APXvYqwCRggayjwslK3/sM9eKC7AaiHj8vsEjqH3bylBRpjmM5m+mJk4S0wnAfyqtcWhBzWuQykouw== X-Received: by 2002:aa7:824b:: with SMTP id e11mr79336336pfn.33.1560265008759; Tue, 11 Jun 2019 07:56:48 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:a584:: with SMTP id b4ls865631pjq.0.canary-gmail; Tue, 11 Jun 2019 07:56:48 -0700 (PDT) X-Received: by 2002:a17:902:2a28:: with SMTP id i37mr74507996plb.52.1560265008444; Tue, 11 Jun 2019 07:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265008; cv=none; d=google.com; s=arc-20160816; b=rCumCTFBireuAZYMEziMLTEHGfD0wvuj0rs+t60rGTi+aZ7AyJq2btmOQ4cOrXhJtH COB8BO/gwaEGU9OJVN9OfcyuG+lgPwfwey8TPN0mQYsaBbfXZ90JQEPigVJgxTDgY0LR 9psgs4y3O7T1UjX9dGirp3M0LLCIc12kfdFH6di+VTZKLKwMQjrAQfIJMiBXm0mo4EOO lC0AJTXBI3OiDGJxxigpL34lC0oDkJVxhB+vu7QX/veyeYhz+zCeQ0BRMrQ6JHQ3jQgQ wQeXSlkQNC/7Co3I4bvG12ZQtDEydtIqtNPK4EHhrBIeGGbxkg6M64Il4Xsmx9jhGnpt wtFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=MPayWhbGgEs+DGe2m5E7+3IPn0K+3R0BZ007ckgTzeM=; b=BQpWyHy2cFw2WRVhWNSJ3Pf4jPTehAubDWZDvp9yaClf1zXCo0HepvUcfEXXo5h3kn TRAJBRt17MT8RFrv22XYIKtR78mQUfknEAlM5wZpZ1xpq+ldSf8IEwi5RLMLqfJcgSO2 ySOvIFdywq02EQSapV4v3ChdQlwPFNRtyMLtkL9GIzNYy5803T0MzQUVrl2/vQfYs1un COc4FRB6ieh0oHnGfRSn+9/X9UwoExVx3x5cxWxIvlvoxXsYm1aKxLArsQo+vu4DH+vd QbgIi9N1rs91WhF3xRtBSTBd1BcGrhFc8/nQipem1fvqEUz7kTas9GpcyhxcCf2aF78o cJWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jqgj6lY1; 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 l68sor15323847plb.69.2019.06.11.07.56.48 for (Google Transport Security); Tue, 11 Jun 2019 07:56:48 -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:a17:902:a98b:: with SMTP id bh11mr50065341plb.8.1560265008029; Tue, 11 Jun 2019 07:56:48 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:47 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 75/92] ram: rk3399: Update lpddr4 vref based on io settings Date: Tue, 11 Jun 2019 20:21:18 +0530 Message-Id: <20190611145135.21399-76-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jqgj6lY1; 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: , The vref_mode_dq, vref_value_dq on lpddr4 value is depending on IO settings of rd_vref. Add support for it. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index c0e9a4e7c8..413469f4cc 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -339,7 +339,8 @@ static void set_memory_map(const struct chan_info *chan, u32 channel, } static int phy_io_config(const struct chan_info *chan, - const struct rk3399_sdram_params *sdram_params) + const struct rk3399_sdram_params *sdram_params, + u32 mr5) { u32 *denali_phy = chan->publ->denali_phy; u32 vref_mode_dq, vref_value_dq, vref_mode_ac, vref_value_ac; @@ -350,9 +351,19 @@ static int phy_io_config(const struct chan_info *chan, /* vref setting */ if (sdram_params->base.dramtype == LPDDR4) { - /* LPDDR4 */ - vref_mode_dq = 0x6; - vref_value_dq = 0x1f; + struct io_setting *io = lpddr4_get_io_settings(sdram_params, + mr5); + u32 rd_vref = io->rd_vref * 1000; + + if (rd_vref < 36700) { + /* MODE_LV[2:0] = LPDDR4 (Range 2)*/ + vref_mode_dq = 0x7; + vref_value_dq = (rd_vref - 3300) / 521; + } else { + /* MODE_LV[2:0] = LPDDR4 (Range 1)*/ + vref_mode_dq = 0x6; + vref_value_dq = (rd_vref - 15300) / 521; + } vref_mode_ac = 0x6; vref_value_ac = 0x1f; mode_sel = 0x6; @@ -771,7 +782,7 @@ static void set_ds_odt(const struct chan_info *chan, /* phy_pad_fdbk_term 1bit DENALI_PHY_930 offset_17 */ clrsetbits_le32(&denali_phy[930], 0x1 << 17, reg_value); - phy_io_config(chan, sdram_params); + phy_io_config(chan, sdram_params, mr5); } static void pctl_start(struct dram_info *dram, From patchwork Tue Jun 11 14:51:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 527 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9F1013F08A for ; Tue, 11 Jun 2019 16:56:53 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id v62sf9286859pgb.0 for ; Tue, 11 Jun 2019 07:56:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265012; cv=pass; d=google.com; s=arc-20160816; b=DtkyTuZ0w40aNMF0Q9O9iquLVsrzsm1BzTldCid6BKDf2mOql/yORSjCEA3u1oCNwx cphtOJFk9YagbtebUWWRQDq3kA7mbTL/peXd5CcbQbJiYCoY/f6osIgz9wcnWQXRZw2V Zf8NBYdtXoM00tW/YnPMV/seWTQYqFeVYEx65YmqYoZBeDDpOGQ4GlSKjt9mhKBSx07g 3qdc3Aryu8t/8NaToFT1FHRHbOtOMAo8I8M81Fqq+iW0AuVP4Kv4cgedvLKhaBa1wqVi w6g1tK6r7KAcPqmmW3SH+e3d0E8x+j/3tuFaqvaVatAmIL2Neix3a6O/BBuHkuH5g6pu Iefw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wmR3Okuz1YFwbgagwbAJr/Igv1fRuWBkWFml35ua/UM=; b=h/YbaXm1DNF2V5l9lX579nQQoZaXJkozqI4mOadzHKj44nEPGt5JIpcffKrfWgC00B XSouxR2V7VhMNQubvfZ3N2Kz0aAn2Wf94DjbgCvT7/40fSnQycLVdi1NkZRsqt9gJn2b D95zTATgUG72w7DNdnbOxwcnzDW/3wAi61iMrFxiHphq3CXnAYAf7J0jzB96y9kn7WV6 /iXADFSiPx2irm1cy6+8K090FDAhf5hKwSP+O8qoXO+rieVfU8hUqSNrlMG8Vjt033Z5 dX94d0X2h2+5ps6ffZrfKbfrJfy2UcLIDKDOTxHo2is32eSaTAYK87DeJJP5SYwyyEQm 2KkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=otUXCN6C; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=wmR3Okuz1YFwbgagwbAJr/Igv1fRuWBkWFml35ua/UM=; b=DWN2dAVUyTNCxn8Aukh7M7uMHMpqGVtYUHYdRGTUfa1UQM2b1BVgJehKbzYAVCkc9L ZXEugZ5uneTZy/1h6z4nk+KJr9Ha1efqk+5Sdxc8VEnifRu4RCO4uNUPM5ctSV8iaTwC mRrDx3Kza3WzHdjtRQhl8SI1NG7g2DibMRAXo= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=wmR3Okuz1YFwbgagwbAJr/Igv1fRuWBkWFml35ua/UM=; b=eu65zxPf3G/vuazWbQC1vvU7Lgum/82KwmHtC/OPBAW2ZQE99RnGpEuvajYLMGd/Lj vgu2mfvDrnx5HkPRb1Pvfvw7QktJuwGAoMFdrq5kOoXNdG9E+Z5ylBTC9+yj/f5a/Vct fGL5LNaMuzoKaVb8ttmyqGJYqJ8+IRCpziBdyZhdfa0t+DunVP/sjEzx97/6Xoyv23Ee nwloxWpHIE4ZBJZ1AiF2m1DQw1wld9iF9FsdhIPGAIZ86EQalGKIozGlHdnxDDeRdBaX FbAdCPUFW/WdU59OKoRBpSUaTRZu3LhcR6BM6xwFap2JAbD7BJyGeR2fhsE9Zty/WC0q d5fA== X-Gm-Message-State: APjAAAXm0vtn1WZ0z6iEogI/OHSAvz0JkneOmMVAsk344afaLqPKwZhW ez+uwuF1IfT9b95WOONgFxwfCHdC X-Google-Smtp-Source: APXvYqz/aBMbJqrM0hUVMP8/wmxsuWkugExK/3SbpRf5h3tHPRXtkj+xqvuR0pbz0Es8ijwnnd0T8A== X-Received: by 2002:a17:902:5c2:: with SMTP id f60mr76075466plf.61.1560265012463; Tue, 11 Jun 2019 07:56:52 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:28ca:: with SMTP id o193ls4497368pfo.10.gmail; Tue, 11 Jun 2019 07:56:52 -0700 (PDT) X-Received: by 2002:aa7:8106:: with SMTP id b6mr8482761pfi.5.1560265012111; Tue, 11 Jun 2019 07:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265012; cv=none; d=google.com; s=arc-20160816; b=BmoaB/c6GWAo1i47E89lF4rr4V9/f7pcIV7NxJniJX9HJryGZklVWu0/CpWBGzNK6h oDQjC2domWpLqrYXR5uUUUqJH6bRGFHxZfBfnHOD8mjWJzTQhoxW29wtLROduhfbs0o4 7dA+5x538BMEExxTLEt5PQc9BHwxaTrG7PJ4qEqogDteMeZb6cCc4JaUmnoAZE0nqaic gX46NEkdrjoXMYzWju08NQNuB2rKfmBF/UpA8hceLABhuse1ZeTTm8tJRLo85uTEhfh2 tapV4zr0PKdaHnWbhafTa4rgROT/6XkYY1oywUhPeWM1sNLRF7khcfD9PDkmke7BdXEJ NzxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=EVzetAd1OkF45Ou1v8dASP8ipKtVAWLCo38xLJGywqU=; b=qug5fZQ5SS7Cp0AA9wziNqAMHG89h86aA0GJ3ZMxmI/r20uB+4ml6l36OyUibvHwB+ 0l56H9lmvfhuoWetJNARm6DIZcSv2+pK8+2a2QYPdH+e8j0OkWJKfPKhaP1URJumLkEE +3XWDl38D8f4l/kMUPCzLIj3e1culN+HB2FSO+yDOBqjbuJl0nwTM3gjfIpbwHgFuHf/ FFEqM5P2z2N8/Gv+d4ghgi9VRJaR7m6vHoR2u5WT65xzdY90eKC2LyBlb67BX5S2KOUt XXRHdZM+tvF3pW7ffkwYo7KC+IFlY+pW+olLuzKHKz1j7HEgexLY9U/5ZZVuPY+ZYEXy IAWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=otUXCN6C; 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 o8sor15785713plk.18.2019.06.11.07.56.52 for (Google Transport Security); Tue, 11 Jun 2019 07:56:52 -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:a17:902:988a:: with SMTP id s10mr76940856plp.304.1560265011799; Tue, 11 Jun 2019 07:56:51 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:51 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 76/92] ram: rk3399: Update lpddr4 mode_sel based on io settings Date: Tue, 11 Jun 2019 20:21:19 +0530 Message-Id: <20190611145135.21399-77-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=otUXCN6C; 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: , The mode_sel on lpddr4 value is depending on IO settings of rd_vref. Add support for it. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 413469f4cc..618327983a 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -349,7 +349,7 @@ static int phy_io_config(const struct chan_info *chan, u32 drv_value, odt_value; u32 speed; - /* vref setting */ + /* vref setting & mode setting */ if (sdram_params->base.dramtype == LPDDR4) { struct io_setting *io = lpddr4_get_io_settings(sdram_params, mr5); @@ -358,15 +358,18 @@ static int phy_io_config(const struct chan_info *chan, if (rd_vref < 36700) { /* MODE_LV[2:0] = LPDDR4 (Range 2)*/ vref_mode_dq = 0x7; + /* MODE[2:0]= LPDDR4 Range 2(0.4*VDDQ) */ + mode_sel = 0x5; vref_value_dq = (rd_vref - 3300) / 521; } else { /* MODE_LV[2:0] = LPDDR4 (Range 1)*/ vref_mode_dq = 0x6; + /* MODE[2:0]= LPDDR4 Range 1(0.33*VDDQ) */ + mode_sel = 0x4; vref_value_dq = (rd_vref - 15300) / 521; } vref_mode_ac = 0x6; vref_value_ac = 0x1f; - mode_sel = 0x6; } else if (sdram_params->base.dramtype == LPDDR3) { if (sdram_params->base.odt == 1) { vref_mode_dq = 0x5; /* LPDDR3 ODT */ From patchwork Tue Jun 11 14:51:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 528 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8A2A13F08A for ; Tue, 11 Jun 2019 16:56:57 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id r7sf7904463plo.6 for ; Tue, 11 Jun 2019 07:56:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265016; cv=pass; d=google.com; s=arc-20160816; b=w9pyY1PrznhleZKZZ4yORYXCvE5125q/XG2hKMIjb/bbqIgMMGCQwJxFa5TTMWk1zS /Ox79jZwotHx0y5l836+4rybur5jniLoNG3DHNQB0NXS9lk9wT+Ucbn1sVVV61B/+K5Y 545yPFli5gmjLNd37/FrDj2zsUVU5DPm5jBM/mv3a2g2v3CZq0kOHOtJsGYdrOhHFUn4 LFJYEyLPvupe/pEN5/TEd8KxosNNDCb4If2ORN0ENSezfDnXlDXzmGbPKX2GqSaBYMW3 z9RJdFIOvLTrw9pgAlyMaD7HQ5Ams5ETEgEdUUgNbpGM0JbdoE/1ImxmzZYdWCIiECKQ REiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pOaQVbmt8DMGo3qJexdgs/ydqhPMje+EX25iEiHYyCE=; b=Be0GWdAW32/fvyRBdON5dChqg/wFdQZ0D10qEJRl7U70DCMGrD8mSme868nINk9nQG IpN4v47PFq6emS37QSIX3/ycM8UNt81+pMMBsaqNhHdnRlgGaEZbx3njKZitUumFt5nP I3yhfTTuptnY72NzNW0F/WuiU4uJ+ZmbUkPoCR8wLFn4j5EFIqdHevRq8SRC0EPnNsN1 Nd7d0Weq1zKySUNXV3RcfqunMm696lE7hN5Ha1d0LIiASsA2LiW4qPD5pwDL+m2uQhmW 4beDB4KlbxCs59oe3y86xlikb6/e8zRy8gvn/XNRjLmXhFb5FbinSHPqFNjZR1GpqpNI /25w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="rE/6Nro0"; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=pOaQVbmt8DMGo3qJexdgs/ydqhPMje+EX25iEiHYyCE=; b=ATYhDEDCYbjxZIKUEesQFEpSqMV6o5OAyup5TsVZlV7G8TQZlgLG/FJnhccIQhMwCE RgFwlktlVxSLxpZQ0TQLhq91OKPtSf8ynvKSErXF6cU8A0P8yR2lLUfkGz7y7AfFqcXh QK/qGDd33PZu/ctRJoqRoWYQlMw648HJXrvqY= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=pOaQVbmt8DMGo3qJexdgs/ydqhPMje+EX25iEiHYyCE=; b=UlAsmfyY/myfBz4xUm7+QEKcOx2M59QOUb9b/cMxbeD9jnRpk5pPLCvuNxU12wpMoq RQ6ESoUSpxyw7brgqkmC220cXUm0/3l/tFCFa1cu+aMBUxq8gjIFNIT96Zd7/yS/LzT4 FAXeaMGp/QOijtWM6Oq0dyzUrMbAQAokotDCH1p2ZuejL9mrekmX47PnEItw0AAoFhw6 wf050gS57gTjTwiEO9cAT/u1doTsqf4SKAvWkNxXn33KKI6eZlby0eqUFVyQkqy60Kz9 tdr6shVc7wlCz2vr0Of3zAkuZ0mh5uUr/DOrYHdnmJF92LwukBXqnQEMFxOqB3sHIun/ ihUA== X-Gm-Message-State: APjAAAVwjby7mdw9qBpYmr4YSreLR1idlxEc8K167QilOTGivM7oeSYm SxGjUMrKAlqzdJSLMYaCsV7lL5cX X-Google-Smtp-Source: APXvYqx1PZmpBr0vH+soU1TOhzv1ILvMzpY/jBFEcXEdFOtxtob8E8w4K1EdFjpGLlqXSo/USfLkrQ== X-Received: by 2002:a17:90a:fa12:: with SMTP id cm18mr27214043pjb.137.1560265016392; Tue, 11 Jun 2019 07:56:56 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:e509:: with SMTP id n9ls4505929pff.2.gmail; Tue, 11 Jun 2019 07:56:56 -0700 (PDT) X-Received: by 2002:a63:3141:: with SMTP id x62mr21031128pgx.282.1560265015989; Tue, 11 Jun 2019 07:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265015; cv=none; d=google.com; s=arc-20160816; b=otpnc7nlI3PdyBDEQBRamJqPi8/QmgWyorCBf/YfuOdX7jcriQtSdzy9Mb9uFsL7Cn tqfUPUl4BFOpp//BixvRTDDL3hJiv6tzTgjgcs1fZXeSFCrj5dwkWwVQH9d0WVsy49MS CCsiQ58XurNZqeHPkcMs+pU8f5XZAqodg6df7x+0yyisyLlXC/f9ceOM4yuoIEYNOfxz 2oj7cTZrpu8ugA5zZImKwdQJpaxwGbmMdzu77uixvmlSAM6nbne38I+4CtjDTC/Wskn4 OqYFixecYBDh9aehchQ47Rt6x8/5XtKmtHyE4uLBDAQU3R+QIrY/Br14r8e49ipn0Kca bSDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=epVZ5TNHwS2kL7R8kp8MIF+ns/FTazpsB8dfhp1jT1M=; b=xcdICIT88aTE0s1L2Qg9ggM3jaDsqHEz7eSvQuKq8/l0gM24l3wGFuBTN+J2A+W7y6 78az4p+q4o408R1iuKqK0UBEfziTw8UPwPM0jxxgWbDl+PaWCIobvlXDII6BMiMJe09C 1FNSy+NQ8rYQp2anzbA9eIhrkPWyBo9GiiUWgdvDcg9+0zlbZvywpHwchrPxN1O9pBMP c8Tnt7r1nHdYAvSo2Wqdw1muvQwCc95a7SI1SB7Bs1B8AsObOMpC7hJa+qsFYXEgwNzN HYKmytP5yUDAzaCmz6JWLhFvBlvPFlbx0xqwom0Wz29WgEsVxKdkSlRBuAQPYOEmlSpI Wzsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="rE/6Nro0"; 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 a21sor11999941pgh.0.2019.06.11.07.56.55 for (Google Transport Security); Tue, 11 Jun 2019 07:56: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:a63:f54c:: with SMTP id e12mr20767978pgk.62.1560265015609; Tue, 11 Jun 2019 07:56:55 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:55 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 77/92] ram: rk3399: Update lpddr4 vref_mode_ac Date: Tue, 11 Jun 2019 20:21:20 +0530 Message-Id: <20190611145135.21399-78-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="rE/6Nro0"; 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: , Update vref_mode_ac for lpddr4 based on VDDQ/3/2=16.8% Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 618327983a..89348cf296 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -369,7 +369,8 @@ static int phy_io_config(const struct chan_info *chan, vref_value_dq = (rd_vref - 15300) / 521; } vref_mode_ac = 0x6; - vref_value_ac = 0x1f; + /* VDDQ/3/2=16.8% */ + vref_value_ac = 0x3; } else if (sdram_params->base.dramtype == LPDDR3) { if (sdram_params->base.odt == 1) { vref_mode_dq = 0x5; /* LPDDR3 ODT */ From patchwork Tue Jun 11 14:51:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 529 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AC1AD3F08A for ; Tue, 11 Jun 2019 16:57:01 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id d125sf9788021pfd.3 for ; Tue, 11 Jun 2019 07:57:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265020; cv=pass; d=google.com; s=arc-20160816; b=RU9ESS3Y1BJUL7MTgPIwgnFW/DzSc4ceGNp3ZNaqTR+dI5kRZDEs4hF5Q3XE4ho2Dg f2cR77YNB8ZvZlw/4/fGb3hVeP6fLrBP9esEAZAXZH78ksqdzBcATpFjx1wKCsUIpSL1 jrlBRoSMbtYCs1yEtIoe1CW9R6aq4VHOCoBZJOlf7xRD3WvBXHbjJFQFBm+HR1vXQYPS rqHdvl4qU8nwhiUQ+BeVfEouU34+GDpLmfe3r9U+qdrqtlAn8u4V0jzpjmU23LneBaIo cHJH3ROrRakNqqVB5t09Z5GkdCS+BphEwk4GW3vCZhLDxdbzzt5KYt8HmnSOBVDxE3Fn iwig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YCbiN1G6MHlkBTF8Nhk+ZdWaqbNxCbYqTcCvB8iEiGk=; b=b2sFJ5J80XRGv8cmJawH/hSMXkhcSDdgATM4PqujT0+DPiAVfVuM6UQ0V8EJLmp07n vdhlmwV8pLgBzH+TIUO+a4ejiu+qHfkbuKgJiTICL8B3W+c8aOg12m6Nxt1ml1Rh26uJ OM3oaQIMR1o3M224UzEEiz1CAZtNG2dS+N32LEbOsUf2Qdjt06WdylYh/KgAe042+ZoD LJ3vX8R0BfpJ/DyiiIMgtDDY0F1HFCgG0ZG5+W+/Eb3Uk1I9I+ByfWmQvX8OsecJX+5U 24TCE9W5nhUefsTkh+fFd6KlkCfDhoMO4Lya3bopcHZsROoU2I3HExcSzXN5WdCb8gdN c6hg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kVthj+Xr; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=YCbiN1G6MHlkBTF8Nhk+ZdWaqbNxCbYqTcCvB8iEiGk=; b=al9TtXJV+LDr8BgMwndmAFkXJQ5FL/td0BqxpMhCt34iV8gbAZV566KXBMjznlqERf +lZtf1NL2TILLd3AgzjL+siySW+h9iGmVbV8TUewYxZSWO//zY6T7Kp75Mk9zoZE6SiU 4PZVwY6msX1IzUCKrphPAF3n8+2rFbB8XOwOo= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=YCbiN1G6MHlkBTF8Nhk+ZdWaqbNxCbYqTcCvB8iEiGk=; b=CLXWjCuhkWu3OSCBg3ull6M3vuLcHiSEK+TH+pvHUYzqZjWjM4NR1w31ogJc28p/fN SSgRkfkNkrCNFzKZr8Un8IzdoluEr4U1Gr8k+OEEb2jTiHh2iAPAyR80OL8ufWNXpLEU RUZKZ51VYsOEwqdjfe8sHB6RN/oEJK2h48NlkqXJhpYRej5M7Q5LyckgWFsmHf7Z9AvJ lXH5JZIR0F0H8LG+1JTOinDPORri1JW9dljt9cNZmgbXpHM9UFvLVE2cnezs9zZFVIdj RMK5gULfE747QRiuXDjBwDIgtFrShNV2K1lD91YMI42RZRDBopQWXxYSVjfWwZQn7nuB NpCw== X-Gm-Message-State: APjAAAXNkylP2Qdn2yezGPCCCI4jPJyUQFrhs4WUMIxzbjwsXzzT1Qhl +0a3oFkQ3ggutgGziaODZ4y8rZku X-Google-Smtp-Source: APXvYqzeQoxtF0rINotuknoDq9ofIz7yjWnlQZYEEoh3mUnL9nXezdIi1w0MDWBjYUOwZzwnO5D2UA== X-Received: by 2002:aa7:8083:: with SMTP id v3mr1862770pff.69.1560265020415; Tue, 11 Jun 2019 07:57:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:1463:: with SMTP id 35ls23657pgu.5.gmail; Tue, 11 Jun 2019 07:57:00 -0700 (PDT) X-Received: by 2002:a63:5024:: with SMTP id e36mr21449816pgb.220.1560265019728; Tue, 11 Jun 2019 07:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265019; cv=none; d=google.com; s=arc-20160816; b=v13PQ++WJyxwz3B6HPP5VzlRhb2zrtpV7uwin+bofh9iH5rEZWW14HELN4awSKR6f0 aYak7ZNrcEGEddV/OykVLAfnhFrHkZofOS8c1QZXlrqtixvKaZYq5g6TtA3bxRvkxPMe xizmlEgCCb0wjZnGQoGI+N77GEuZxw8Z9031SekmWR3CQ/KM6IMJWzuJ4gx6K9hvTIrf xPNjhL9i7r/BkBjw+UIizQmCfsn7AOFgat8TsuzPDfPgUvXT19qvLMYtB7NLFLa6RW3J eIzxo2Akq9IoDz/rD8qkDlsUh9YMuBwKKOSmCPZ+9xGLWHpnIPdT2C1rtlwQuvQREJDI LZaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mGAVbQ0/GKtxUT4Ixc2BHlNx/P364Q0MbJKj7oZiPw0=; b=OvWXe9cuGWADdFoG2iCu7hCbeKoEvNJS3qLwciW4/bulzDJ8yZprKSAeS5uwRkiDZ6 K8P4BqdK79CTN2/Wb2TE10jLp/iVBFbGeJfDE9WP7Ccw9sehVlaFvK7eQYeF//ZMSkAd gHegOnaQXp1UxpAKLd7lmXajkzIFgI5s6d/zfNZ0WBBoVPhg6pAQw5O2p76vJ0WoZnxC 0EpjwLBtWDA10uAehrs87n/AC5qilRiECa6wyM3gJzp7rH9stkxX1zZ+odIfciZl1F0H +TLFYI5oO+/+QVwUrAb9WS1Eb4a+CwCn4GsvzBO+z3ufzhMmUPKMEJCmGkwc0VoIoxS2 gHgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kVthj+Xr; 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 123sor7597159pfu.0.2019.06.11.07.56.59 for (Google Transport Security); Tue, 11 Jun 2019 07:56:59 -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:a62:36c1:: with SMTP id d184mr82811975pfa.49.1560265019396; Tue, 11 Jun 2019 07:56:59 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:56:58 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 78/92] ram: rk3399: Add LPPDR4 mr detection Date: Tue, 11 Jun 2019 20:21:21 +0530 Message-Id: <20190611145135.21399-79-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kVthj+Xr; 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: , Like data training in other sdram types, mr detection need to taken care for lpddr4 with looped rank and associated channel to make sure the proper configuration held. Once the mr detection successful for active and configured rank with channel number, the same can later reused during actual LPDDR4 initialization. So, add code to support for it. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 254 ++++++++++++++++++++++++++-- 1 file changed, 243 insertions(+), 11 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 89348cf296..5a0872c23f 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -218,6 +218,16 @@ static void *get_ddrc0_con(struct dram_info *dram, u8 channel) return (channel == 0) ? &dram->grf->ddrc0_con0 : &dram->grf->ddrc0_con1; } +static u32 get_ddr_stride(struct rk3399_pmusgrf_regs *pmusgrf) +{ + return ((readl(&pmusgrf->soc_con4) >> 10) & 0x1F); +} + +static void set_ddr_stride(struct rk3399_pmusgrf_regs *pmusgrf, u32 stride) +{ + rk_clrsetreg(&pmusgrf->soc_con4, 0x1f << 10, stride << 10); +} + static void copy_to_reg(u32 *dest, const u32 *src, u32 n) { int i; @@ -1593,6 +1603,215 @@ static unsigned char calculate_stride(struct rk3399_sdram_params *sdram_params) return stride; } +static void set_cap_relate_config(const struct chan_info *chan, + struct rk3399_sdram_params *sdram_params, + unsigned int channel) +{ + u32 *denali_ctl = chan->pctl->denali_ctl; + u32 tmp; + struct rk3399_msch_timings *noc_timing; + + if (sdram_params->base.dramtype == LPDDR3) { + tmp = (8 << sdram_params->ch[channel].cap_info.bw) / + (8 << sdram_params->ch[channel].cap_info.dbw); + + /** + * memdata_ratio + * 1 -> 0, 2 -> 1, 4 -> 2 + */ + clrsetbits_le32(&denali_ctl[197], 0x7, + (tmp >> 1)); + clrsetbits_le32(&denali_ctl[198], 0x7 << 8, + (tmp >> 1) << 8); + } + + noc_timing = &sdram_params->ch[channel].noc_timings; + + /* + * noc timing bw relate timing is 32 bit, and real bw is 16bit + * actually noc reg is setting at function dram_all_config + */ + if (sdram_params->ch[channel].cap_info.bw == 16 && + noc_timing->ddrmode.b.mwrsize == 2) { + if (noc_timing->ddrmode.b.burstsize) + noc_timing->ddrmode.b.burstsize -= 1; + noc_timing->ddrmode.b.mwrsize -= 1; + noc_timing->ddrtimingc0.b.burstpenalty *= 2; + noc_timing->ddrtimingc0.b.wrtomwr *= 2; + } +} + +static u32 calculate_ddrconfig(struct rk3399_sdram_params *sdram_params, + u32 channel) +{ + unsigned int cs0_row = sdram_params->ch[channel].cap_info.cs0_row; + unsigned int col = sdram_params->ch[channel].cap_info.col; + unsigned int bw = sdram_params->ch[channel].cap_info.bw; + u16 ddr_cfg_2_rbc[] = { + /* + * [6] highest bit col + * [5:3] max row(14+n) + * [2] insertion row + * [1:0] col(9+n),col, data bus 32bit + * + * highbitcol, max_row, insertion_row, col + */ + ((0 << 6) | (2 << 3) | (0 << 2) | 0), /* 0 */ + ((0 << 6) | (2 << 3) | (0 << 2) | 1), /* 1 */ + ((0 << 6) | (1 << 3) | (0 << 2) | 2), /* 2 */ + ((0 << 6) | (0 << 3) | (0 << 2) | 3), /* 3 */ + ((0 << 6) | (2 << 3) | (1 << 2) | 1), /* 4 */ + ((0 << 6) | (1 << 3) | (1 << 2) | 2), /* 5 */ + ((1 << 6) | (0 << 3) | (0 << 2) | 2), /* 6 */ + ((1 << 6) | (1 << 3) | (0 << 2) | 2), /* 7 */ + }; + u32 i; + + col -= (bw == 2) ? 0 : 1; + col -= 9; + + for (i = 0; i < 4; i++) { + if ((col == (ddr_cfg_2_rbc[i] & 0x3)) && + (cs0_row <= (((ddr_cfg_2_rbc[i] >> 3) & 0x7) + 14))) + break; + } + + if (i >= 4) + i = -EINVAL; + + return i; +} + +/** + * read mr_num mode register + * rank = 1: cs0 + * rank = 2: cs1 + */ +static int read_mr(struct rk3399_ddr_pctl_regs *ddr_pctl_regs, u32 rank, + u32 mr_num, u32 *buf) +{ + s32 timeout = 100; + + writel(((1 << 16) | (((rank == 2) ? 1 : 0) << 8) | mr_num) << 8, + &ddr_pctl_regs->denali_ctl[118]); + + while (0 == (readl(&ddr_pctl_regs->denali_ctl[203]) & + ((1 << 21) | (1 << 12)))) { + udelay(1); + + if (timeout <= 0) { + printf("%s: pctl timeout!\n", __func__); + return -ETIMEDOUT; + } + + timeout--; + } + + if (!(readl(&ddr_pctl_regs->denali_ctl[203]) & (1 << 12))) { + *buf = readl(&ddr_pctl_regs->denali_ctl[119]) & 0xFF; + } else { + printf("%s: read mr failed with 0x%x status\n", __func__, + readl(&ddr_pctl_regs->denali_ctl[17]) & 0x3); + *buf = 0; + } + + setbits_le32(&ddr_pctl_regs->denali_ctl[205], (1 << 21) | (1 << 12)); + + return 0; +} + +static int lpddr4_mr_detect(struct dram_info *dram, u32 channel, u32 rank, + struct rk3399_sdram_params *sdram_params) +{ + u64 cs0_cap; + u32 stride; + u32 cs = 0, col = 0, bk = 0, bw = 0, row_3_4 = 0; + u32 cs0_row = 0, cs1_row = 0, ddrconfig = 0; + u32 mr5, mr12, mr14; + struct chan_info *chan = &dram->chan[channel]; + struct rk3399_ddr_pctl_regs *ddr_pctl_regs = chan->pctl; + void __iomem *addr = NULL; + int ret = 0; + u32 val; + + stride = get_ddr_stride(dram->pmusgrf); + + if (sdram_params->ch[channel].cap_info.col == 0) { + ret = -EPERM; + goto end; + } + + cs = sdram_params->ch[channel].cap_info.rank; + col = sdram_params->ch[channel].cap_info.col; + bk = sdram_params->ch[channel].cap_info.bk; + bw = sdram_params->ch[channel].cap_info.bw; + row_3_4 = sdram_params->ch[channel].cap_info.row_3_4; + cs0_row = sdram_params->ch[channel].cap_info.cs0_row; + cs1_row = sdram_params->ch[channel].cap_info.cs1_row; + ddrconfig = sdram_params->ch[channel].cap_info.ddrconfig; + + /* 2GB */ + sdram_params->ch[channel].cap_info.rank = 2; + sdram_params->ch[channel].cap_info.col = 10; + sdram_params->ch[channel].cap_info.bk = 3; + sdram_params->ch[channel].cap_info.bw = 2; + sdram_params->ch[channel].cap_info.row_3_4 = 0; + sdram_params->ch[channel].cap_info.cs0_row = 15; + sdram_params->ch[channel].cap_info.cs1_row = 15; + sdram_params->ch[channel].cap_info.ddrconfig = 1; + + set_memory_map(chan, channel, sdram_params); + sdram_params->ch[channel].cap_info.ddrconfig = + calculate_ddrconfig(sdram_params, channel); + set_ddrconfig(chan, sdram_params, channel, + sdram_params->ch[channel].cap_info.ddrconfig); + set_cap_relate_config(chan, sdram_params, channel); + + cs0_cap = (1 << (sdram_params->ch[channel].cap_info.bw + + sdram_params->ch[channel].cap_info.col + + sdram_params->ch[channel].cap_info.bk + + sdram_params->ch[channel].cap_info.cs0_row)); + + if (sdram_params->ch[channel].cap_info.row_3_4) + cs0_cap = cs0_cap * 3 / 4; + + if (channel == 0) + set_ddr_stride(dram->pmusgrf, 0x17); + else + set_ddr_stride(dram->pmusgrf, 0x18); + + /* read and write data to DRAM, avoid be optimized by compiler. */ + if (rank == 1) + addr = (void __iomem *)0x100; + else if (rank == 2) + addr = (void __iomem *)(cs0_cap + 0x100); + + val = readl(addr); + writel(val + 1, addr); + + read_mr(ddr_pctl_regs, rank, 5, &mr5); + read_mr(ddr_pctl_regs, rank, 12, &mr12); + read_mr(ddr_pctl_regs, rank, 14, &mr14); + + if (mr5 == 0 || mr12 != 0x4d || mr14 != 0x4d) { + ret = -EINVAL; + goto end; + } +end: + sdram_params->ch[channel].cap_info.rank = cs; + sdram_params->ch[channel].cap_info.col = col; + sdram_params->ch[channel].cap_info.bk = bk; + sdram_params->ch[channel].cap_info.bw = bw; + sdram_params->ch[channel].cap_info.row_3_4 = row_3_4; + sdram_params->ch[channel].cap_info.cs0_row = cs0_row; + sdram_params->ch[channel].cap_info.cs1_row = cs1_row; + sdram_params->ch[channel].cap_info.ddrconfig = ddrconfig; + + set_ddr_stride(dram->pmusgrf, stride); + + return ret; +} + static void clear_channel_params(struct rk3399_sdram_params *params, u8 channel) { params->ch[channel].cap_info.rank = 0; @@ -1665,17 +1884,30 @@ static int sdram_init(struct dram_info *dram, sdram_params->ch[ch].cap_info.rank = rank; - /* - * LPDDR3 CA training msut be trigger before - * other training. - * DDR3 is not have CA training. - */ - if (sdram_params->base.dramtype == LPDDR3) - training_flag |= PI_CA_TRAINING; - - if (!(data_training(&dram->chan[ch], ch, - sdram_params, training_flag))) - break; + if (sdram_params->base.dramtype == LPDDR4) { + if (!lpddr4_mr_detect(dram, ch, rank, + sdram_params)) { + debug("%s: lpddr4 mr detected for rank %d, ch %d\n", + __func__, rank, ch); + break; + } + } else { + /* + * LPDDR3 CA training msut be trigger before + * other training. + * DDR3 is not have CA training. + */ + if (sdram_params->base.dramtype == LPDDR3) + training_flag |= PI_CA_TRAINING; + + if (!(data_training(&dram->chan[ch], ch, + sdram_params, + training_flag))) { + debug("%s: data trained for rank %d, ch %d\n", + __func__, rank, ch); + break; + } + } } /* Computed rank with associated channel number */ sdram_params->ch[ch].cap_info.rank = rank; From patchwork Tue Jun 11 14:51:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 530 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 06F7D3F08A for ; Tue, 11 Jun 2019 16:57:05 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id x9sf9761244pfm.16 for ; Tue, 11 Jun 2019 07:57:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265023; cv=pass; d=google.com; s=arc-20160816; b=fl7UauvNYe8GDshaAGbfeVyyP01+pgkfRD7hHWsEGkNSJ968e6YhXS+y8X5+BcTkcr AqS8vBPaAZo7m3qcFmqfLx4QlA+xq053zyrSooIMubisyNMwJQdFznfFCEaJ7kzy5RQj GRDLL1GD23gYDbw8NuSin1sBUhWmINW1KvcrqB57AHMjtoJKKV6AqJJhDA7xsdzG2tmu IiYYQUuhZ5a+dXeT5XEqQyAcMs3lBg/bGLNN0l0GyM2TSH1ZlqBVjtyg736gpqZN5ZsO HnH/7dzbsYDOtagvOU4yMW7JLAJYB9O+3mMN7m/5b0O54d0ijCr5dr4a8Uj6o1zwX2I+ jzYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=3vEcTjnIfiM2WTCZBrGXJMl0P0io4rREaBpyvbjJD+o=; b=sBIgsyoqY6yuOUizIMat8e1Wf7eim1b4dLIpO8DZzew9I+F90HJSWJlfjfV8rhY/JD 4jxd03q1sy8RYgBeNzsqo19WcHji/FWaqHJjcOPtcIvoVZc/QCUk1GIs9K4vyU8Pc/Ep 6QDE13+L+rIc5flx42H3OicKWYeEs4Nj4XAuOhnWPhbw0MJexOPrpPVU7wRLGEdys98Y zs4iwb1pIFZfArNyGjIj0Wmh2MYVGT32kacCW3G9rRh/XkKq2CkmltQjUWYXGaTKw8bU vBtOXUkSG8ra0k6wbDDcrTTAf50ZpgtGa9T5zne4b4HSWNXyWJKWBpkw/A0lXc89Mz5C ubAA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Aa4i2TFy; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=3vEcTjnIfiM2WTCZBrGXJMl0P0io4rREaBpyvbjJD+o=; b=MsbyxeZLvBFFRSYD0wqpAW36YBZqykMUWP4arZGw53zlQaFeuP3Q7TPNjuvlU2EqF+ SQl4fIYXTazpi5qaGQ/1kHE5rNvRUWjfJPd0813OBWlXCEhUbwT7YVJ/XXajRYiIJ7tH llH1IlRxnirVXPmrv3x0em3/FZxhK8ETGk14Q= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=3vEcTjnIfiM2WTCZBrGXJMl0P0io4rREaBpyvbjJD+o=; b=D6hSjJ46+buDPVlr9Xafd4hnTyMFA6Y53rPE0Wqrer3PKk2cSKrUwcWpVMCRb3wSxA 9QtEFlL77f9KpcpqtkVGGpjrKCV6FGhfaF9j/lczjrpY2PYWO9ms8Oabx/kQl7MaBnn1 gglw7sZjYIlrAjVKHoFYPokw9afSj4gclRJyRtitbQI0wYb/1QsJYZWYF6mukzYSa9Pg MlMSC4Wt29hycO/3/OSfjzIOfhwKkOf7MKGCjh5/tRjB8q7sNWz8JDzKl5BFJjRkX7Zh pqo2aub4IZ4CfXcdUsOhPHn+Co/o9Lpq3AfuHF9NdCwpr9+9yRxsa6RVbhLWDmkuoR7U y14Q== X-Gm-Message-State: APjAAAVdY7OqF9v9qhMNzVH+Lw0gSR4smokAHDXFpRNaC2GNI+vbgGRI phRnLSRb9T6kmy6Gi3syypvKsFjz X-Google-Smtp-Source: APXvYqyiep+gjwsqBSyxE18BISN/jg3BBnVBEHbK5MkuoaNCl/Drn7M2tkuIeQIWfrvjoMsy0lt4qw== X-Received: by 2002:a62:5cc6:: with SMTP id q189mr80372772pfb.114.1560265023842; Tue, 11 Jun 2019 07:57:03 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:32d:: with SMTP id 42ls4892775pld.11.gmail; Tue, 11 Jun 2019 07:57:03 -0700 (PDT) X-Received: by 2002:a17:90a:9bca:: with SMTP id b10mr26566556pjw.90.1560265023515; Tue, 11 Jun 2019 07:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265023; cv=none; d=google.com; s=arc-20160816; b=nODGO1ZiR/7ZQ5YPorMTwPG6rzR3zQ4i1L+VS00NwitGanUovT4EIjj+Gdhr92iwgN +yI2hRZO/KlK8YXj5DAdk6710G3Ufngq11IRp1fUN3HIrpv254ypNNKhjNTAAPdJI0xl alWquopz9YjouOzIBEcIxnqk944RwUvoZHV/oHeYH9xeugSA5wU90KVfk/G+SO1etLUT 5OP3RCrlZFSeQ+C+xwWTJdLiuy0QIuPIdUiK/CMYTGLTt4Ulm+NVarFBrjebZEIdo8VP f0lRzy5juzFIz0qNGxgsjWKGSzN97Nd4HQdpgJQapaU9hzvZGjuhHvJj5csUPcn8y7QQ c4yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=3scj5tpu65v2n66++2cTbZLzQWWaAK5Y+ewcl6Aa8Eo=; b=dP+lVwYCY8cnfcHZCOOiX6cxglECYHt5MLabQ/yFBrNqLgQBNEkZAIomrOHd70NdWU U0gE1xqsSGarktWuFXq0vmhZEhkCjumuKyxKsX5AcQdFH6XlhMFN7mXAVyEraiRCV6fW CgZMAGtQ5wuOeZkY3SHrZhOIDrtiOSTIOxXn1BeeUKyHDT4AcsmuxLU+gbnlLCTCE/iz CTA4Hr3dsBfUnRBLY/hE2RAfpZW5V8Uti3kTJZ4T5Kd8LhBMVwFtBp4zudlpxlakJlel CmoVvYi8MuFaGjEzn2evKei7VQFpk0wpWCnH2KfpMjmTB97lEvhfSr8dLATzVQ2vhRPO EGfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Aa4i2TFy; 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 v196sor6662730pgb.58.2019.06.11.07.57.03 for (Google Transport Security); Tue, 11 Jun 2019 07:57:03 -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:a63:1516:: with SMTP id v22mr21201453pgl.204.1560265023084; Tue, 11 Jun 2019 07:57:03 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.56.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:02 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 79/92] arm: include: rockchip: Add rk3399 pmu file Date: Tue, 11 Jun 2019 20:21:22 +0530 Message-Id: <20190611145135.21399-80-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Aa4i2TFy; 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: , Add pmu header file for rk3399 SoC, this will help to configure pmu in sdram driver. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- .../include/asm/arch-rockchip/pmu_rk3399.h | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 arch/arm/include/asm/arch-rockchip/pmu_rk3399.h diff --git a/arch/arm/include/asm/arch-rockchip/pmu_rk3399.h b/arch/arm/include/asm/arch-rockchip/pmu_rk3399.h new file mode 100644 index 0000000000..f1096dccce --- /dev/null +++ b/arch/arm/include/asm/arch-rockchip/pmu_rk3399.h @@ -0,0 +1,72 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2018 Rockchip Electronics Co., Ltd. + * + */ + +#ifndef __SOC_ROCKCHIP_RK3399_PMU_H__ +#define __SOC_ROCKCHIP_RK3399_PMU_H__ + +struct rk3399_pmu_regs { + u32 pmu_wakeup_cfg[5]; + u32 pmu_pwrdn_con; + u32 pmu_pwrdn_st; + u32 pmu_pll_con; + u32 pmu_pwrmode_con; + u32 pmu_sft_con; + u32 pmu_int_con; + u32 pmu_int_st; + u32 pmu_gpio0_pos_int_con; + u32 pmu_gpio0_net_int_con; + u32 pmu_gpio1_pos_int_con; + u32 pmu_gpio1_net_int_con; + u32 pmu_gpio0_pos_int_st; + u32 pmu_gpio0_net_int_st; + u32 pmu_gpio1_pos_int_st; + u32 pmu_gpio1_net_int_st; + u32 pmu_pwrdn_inten; + u32 pmu_pwrdn_status; + u32 pmu_wakeup_status; + u32 pmu_bus_clr; + u32 pmu_bus_idle_req; + u32 pmu_bus_idle_st; + u32 pmu_bus_idle_ack; + u32 pmu_cci500_con; + u32 pmu_adb400_con; + u32 pmu_adb400_st; + u32 pmu_power_st; + u32 pmu_core_pwr_st; + u32 pmu_osc_cnt; + u32 pmu_plllock_cnt; + u32 pmu_pllrst_cnt; + u32 pmu_stable_cnt; + u32 pmu_ddrio_pwron_cnt; + u32 pmu_wakeup_rst_clr_cnt; + u32 pmu_ddr_sref_st; + u32 pmu_scu_l_pwrdn_cnt; + u32 pmu_scu_l_pwrup_cnt; + u32 pmu_scu_b_pwrdn_cnt; + u32 pmu_scu_b_pwrup_cnt; + u32 pmu_gpu_pwrdn_cnt; + u32 pmu_gpu_pwrup_cnt; + u32 pmu_center_pwrdn_cnt; + u32 pmu_center_pwrup_cnt; + u32 pmu_timeout_cnt; + u32 pmu_cpu0apm_con; + u32 pmu_cpu1apm_con; + u32 pmu_cpu2apm_con; + u32 pmu_cpu3apm_con; + u32 pmu_cpu0bpm_con; + u32 pmu_cpu1bpm_con; + u32 pmu_noc_auto_ena; + u32 pmu_pwrdn_con1; + u32 reserved0[0x4]; + u32 pmu_sys_reg_reg0; + u32 pmu_sys_reg_reg1; + u32 pmu_sys_reg_reg2; + u32 pmu_sys_reg_reg3; +}; + +check_member(rk3399_pmu_regs, pmu_sys_reg_reg3, 0xfc); + +#endif /* __SOC_ROCKCHIP_RK3399_PMU_H__ */ From patchwork Tue Jun 11 14:51:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 531 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 531523F08A for ; Tue, 11 Jun 2019 16:57:08 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id s3sf9263173pgv.12 for ; Tue, 11 Jun 2019 07:57:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265027; cv=pass; d=google.com; s=arc-20160816; b=IRykhZhhTZ0kap3prdHz+qHtJ6ix2f8H9+QWIRPv/mz5bLfkS+I1LTylWgA8DA0eRn lFyYNlg8EeE8PIWQeyOVUaB021vDn8aElNTsigr1OuVSDzZt+IKesHUXxP3s6GAUAHq6 4Wg8ftUJJUSMtoh0vSKZzhWSKOZ8CPaQSwLZAqkeom9J1Pdl8k3g5n7+rEr3+5Pvoenn V90B8huCnoGpBy65Xg7BaflTp3BZn85zGFpz5rhTnGgnR+CREh0B5xoewuKcfForaTGl lsuMH8hdlpiOrZ8wt7pyCEZhkapYCq9unpEphviFlsKL9kjpqvnZjOSMGgKgk4Zxcw5r T9zA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=SfBANrTcCyRnOvHlJQRGtJix1H4LxgkT4A2gphF9iZc=; b=WI/OwkdIKoII+AOq29n2+ajyReKlSFNMlE5nmdPkpx8f+v5+/u6kDQwBqNLoXBBH9B LCxXryoQIyM/pUI7colN8oPXF6lSx7f9Xt3kq3qNM3+su3057RiHWmuoh0dMv9PXZr3N cqxyVeHGrjK72mW0/n1Enxd9Vg8wHpaMrP4asX+JA2el17tdHF0W74V3MN1q7kceZtOj gwbP1UHsF96qrYurTsvtPciTt3ZcS0bTyu2DGOwdyHm5DVmLnMtWZz8eujKu0/5jzn0r gbpZhc74CeU90cenboxOBXjmxsQIQwa1s0sTJMS8WR6cV4zCdOrITDvC7YxdAdndW0DL 42sQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=On5snYkD; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=SfBANrTcCyRnOvHlJQRGtJix1H4LxgkT4A2gphF9iZc=; b=NUHJqxiUVk663uFZzDycOCqdq0ArxNuomBrXTAZwyDPT/hAGJc4SWzAvV0y80Ok4eO LCUe/zlavKSG/M1GFM9RUBpHry5Sp4ATK2Ea41GGcBK52UURgh2L+Vna8DgqqIS59J0V zYWbX30vi1MZ+b3Th2gqgldfVLd1ErLx2evn8= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=SfBANrTcCyRnOvHlJQRGtJix1H4LxgkT4A2gphF9iZc=; b=Wkup9l7pOQGCXoEOPxCg6jIeQcQyGXwmWT8HPLhn84IEeZdwWe4XM8TMwZMbeeyqOo H5MrjJexUTyueqX3RhjeTL5HU13E2hcUUCbpqhHKDwdYpliuIkR1y+W4rzG5qLpXHUnS STzdb7aZD6sfTIfvbl/qSizisAdHHaDNh7Ixz73YYeZlsu3pWyOJCsc6/g2Mqo/CEcnK /Q54yK8+w4LIGgsmGCPgUM1tqEG8yDqVr3+ol0t1f2yUfcmftVwkIM465aGFBHo14mOi 75tKGGXvOVitTEVL+S60a8MEx5EOc2BCGVX75NHDQfI0QgeWB8N/AQZYMzLt85YvfQGd zCVQ== X-Gm-Message-State: APjAAAVIz1RM3PRC1USsJ24kNs6YjXRyu+0CC5KhBIYYeNKydmeiz2En LntaR+rxSu0Xq7cJWAFIgYL8PPCW X-Google-Smtp-Source: APXvYqxHWXkzqpZ9SKwr1YV/TZlGfvwApUTTl9aZMoC1m3PL92mkwq5h2tmzo8nMYbtP9YCpSxPLKA== X-Received: by 2002:a17:90a:db44:: with SMTP id u4mr27242554pjx.52.1560265027126; Tue, 11 Jun 2019 07:57:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8a8f:: with SMTP id p15ls4701293plo.2.gmail; Tue, 11 Jun 2019 07:57:06 -0700 (PDT) X-Received: by 2002:a17:90a:25af:: with SMTP id k44mr26645114pje.122.1560265026823; Tue, 11 Jun 2019 07:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265026; cv=none; d=google.com; s=arc-20160816; b=pAsBSS/TH8dzdGg01cFXVrumpLmOwxV2jchKERhliQ0HD923NCozD+V5Q7wtf0hyHC uuH1/uGbSDsIdFrOM6o6oYeBWxzNK22DYULDXOeQnjQ+wqAzUm483uaV0M55H2ACffTo 1bCuOBBNxEOroeyUqFpC9Ox7FAkkel5L6zm4wod1CU80gOMcSq6X7zwgPylHhWW2q6y8 P4nEN0yl+qAOcYsPagAUV1MeTs4YfIggBq+B4KGFMt4tkltvWp62Pf6wP8NZdJJmUTNp xJKeh2AcrskYsBTJgxphtwebUPQ2GBYXAN8s9r+zIMf0xj2yvOMZWt+T9bY62M5j9S6e V1xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=4ooZ4JipFDgtDLaGnlpclxsC67JdyjRNWw7MSSBZLXI=; b=PlgG4FxGXcLf+lB6kD2k/OsS9sm/MvOPR7rtNbQ7r5Ti0KLbDUlONdfrdviLBNsEmk zMyGor8lx+mEfDCcn1Fmhqa48xS7+VNMZ1GPGsOQT1Tvu56xCXI1oFZVt4BZQleV42H4 xAH/SPXZJxoMZJeS9H2nF1yOn/ckLlg33NQFmtRkPrEp5kDH4zhUPeZt983aziiojNSW rlI3jVOOMqc07K+NwVe9Qftx1MAGrfkMRiXx30MEpSNrHiYX9T1dIVb5BhZc1fqTyF7+ BtJ8V9womwih3ZbN4v2zR/Y+VpDVeRUNy8Ov2b4aIbhwUZUq5soYHDYxWG0Es/WzZMGe l3Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=On5snYkD; 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 u28sor11881500pgl.9.2019.06.11.07.57.06 for (Google Transport Security); Tue, 11 Jun 2019 07:57:06 -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:a63:6c87:: with SMTP id h129mr21165695pgc.427.1560265026486; Tue, 11 Jun 2019 07:57:06 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:06 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 80/92] rockchip: rk3399: syscon: Add pmu support Date: Tue, 11 Jun 2019 20:21:23 +0530 Message-Id: <20190611145135.21399-81-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=On5snYkD; 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: , Add pmu compatible with relevant U_BOOT_DRIVER for rk3399 via syscon rk3399 driver. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/mach-rockchip/rk3399/syscon_rk3399.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c index a8bb5b11e5..259ca44d68 100644 --- a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c +++ b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c @@ -13,6 +13,7 @@ static const struct udevice_id rk3399_syscon_ids[] = { { .compatible = "rockchip,rk3399-pmugrf", .data = ROCKCHIP_SYSCON_PMUGRF }, { .compatible = "rockchip,rk3399-pmusgrf", .data = ROCKCHIP_SYSCON_PMUSGRF }, { .compatible = "rockchip,rk3399-cic", .data = ROCKCHIP_SYSCON_CIC }, + { .compatible = "rockchip,rk3399-pmu", .data = ROCKCHIP_SYSCON_PMU }, { } }; @@ -58,4 +59,11 @@ U_BOOT_DRIVER(rockchip_rk3399_cic) = { .of_match = rk3399_syscon_ids + 3, .bind = rk3399_syscon_bind_of_platdata, }; + +U_BOOT_DRIVER(rockchip_rk3399_pmu) = { + .name = "rockchip_rk3399_pmu", + .id = UCLASS_SYSCON, + .of_match = rk3399_syscon_ids + 4, + .bind = rk3399_syscon_bind_of_platdata, +}; #endif From patchwork Tue Jun 11 14:51:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 532 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CF2383F08A for ; Tue, 11 Jun 2019 16:57:11 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id j7sf9774290pfn.10 for ; Tue, 11 Jun 2019 07:57:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265030; cv=pass; d=google.com; s=arc-20160816; b=IovArl6/UnpiVUOBgpvDH0gE2GCZEAzCdSRvoiuRuwtjgMdsv73V2/yQjDu/swmqtv On8ONZEkwlBcWQp0+5yGFsspxshwrjus4DrefGTj+hSMZRDOi2I7VY76ORg6fBsY+/Ks T5W3NirL0oXYTGTRMx78WOc+mKgaHwpd1La9oXmtzTYWzEDeyF9cmZ8de0sjORTckjkF 0pOX9W7y5g7Q1lB/jzPPVUjgCCwJl1Ombu3lL0p16tM9Yd8Mws7Q6EdKknxed5mA2gSC VrXsULA3yo5K+8jF4Iz1+EellIbTWFv4t0MRqlDG0GZVEvji6sYEML1wguiJ4CgA1Ztq ZYRA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/4G+Kr+Pzoyi9K8N4Dq3GMuHDqy7Ta4wGHtbq2qNwOA=; b=VI5zzPY61N1uN0lQCydTkpEdv6Ik9WnN1oXymhwAkOdeiEz0t7l7rr51dBFmiJifVR kVyXrHVmeOKA+AojltM8EUUdadSd4QarSAAgGgWorMpf8Gwg6kK2lHIve/koz5PAv6Ds CjN1qIpcys7F2nXG6PO/bS5xKRbwJ04wjveKm/3UnpH7KoEBRb4A4a0FuVBoxgb7F33W h2paBm4AIs7qvBRTPHT/PtysS1LKLdY2dyXV40yMowXIMdVKBqSJdrEaiQ/5Y3FwoD0A M0evBBp/+ChZnIhu4o8iy53fgm0eBkO6gjqicz0iKHzYRhZnDnRQEYXHcjBWUv1MMYac 0uHQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=F03rGZZp; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=/4G+Kr+Pzoyi9K8N4Dq3GMuHDqy7Ta4wGHtbq2qNwOA=; b=Hyyr18JISvpvnkR09VzeBEBrd88UF4W2EijVIE12d1ffSiSrqyIwNJ8hdZo4Aq0Sjc pnQHkKApButxUJIvaUJl4NCTz/11V4WTlhJdapPZg/d4D9JAaXadbKREooTUTPNJqMDn 3EkAI7M3VyCyZkB8H0evUqPVM433bQLmNvA14= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=/4G+Kr+Pzoyi9K8N4Dq3GMuHDqy7Ta4wGHtbq2qNwOA=; b=g9xwB/2BAeSVlpUvvHbYasJhB9wah3LBQrZ6EFIJKxYK8mvkSpExkmfxyn+EnNcaA1 UBxYhr6qenzpI82yl6ZhKT29J2uYtDb8vqaRD+TU3MZ6myFT9Qxqo4P36p4aBwB8LlX7 U6CCYrXCQZSLEUAD8AFQD4KRjkdOiZno6AgO+G9hHFvG5RVKwp1QZ6ijJAT6Ia3RxPz7 bhcqnqLCKTd6LUdt3efZ/yAWbw1XLH672rRq5rrPS1VYOZO0BxuNKAXjtGCg0aitgxj9 9GPBwaasKtvbiqvBprCHXWeBYZA9ylB9CHZICucH1xGqOK7VowdhbkCTHFPTJotJVxrZ lMMw== X-Gm-Message-State: APjAAAU5UfsZwXwSoyiT2hd2nLnqEpZyw4Yz+rSFmVxdqtZSTswrJnAJ VTsCKAWzfzU08DRHetUAVbU4rwJf X-Google-Smtp-Source: APXvYqx/1QxPPhPuf2PT02E26tj6ycZ1Z5nfJWLchiMWKs0R+29H0jDF6oe9HurSWRSCzSq90N1F7w== X-Received: by 2002:a17:90a:2562:: with SMTP id j89mr27161444pje.123.1560265030660; Tue, 11 Jun 2019 07:57:10 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:35c5:: with SMTP id r63ls866936pjb.0.gmail; Tue, 11 Jun 2019 07:57:10 -0700 (PDT) X-Received: by 2002:a17:902:9f93:: with SMTP id g19mr60942664plq.223.1560265030384; Tue, 11 Jun 2019 07:57:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265030; cv=none; d=google.com; s=arc-20160816; b=CD7Mvs1qyTwQkpbUCOabH6nMcVSrwfPE8/3xiIsxYL345VnkUDDB6+qY/ceunlhFsB sZkC8rFtRcFO8Lff/TEZictlLiuqB51949wAbYS2PGSIAkG2bKC16Iei2FZ8IeYyatch 6jOp1PRTjVq2WXqQWO5Xpyz13SKBXA1Efrst/0EgZMMloyEr9+45PrJRoScTDVP2whb9 +2IutQ6dJ6Pj7P/mJmHcznuLf12h9ERYefKz0M+KjopSXTKwlRo4wB7pwJ5nVnevEPxU avZyjAWXStniWSpGM+hXlEG411RS5edmhJ0c4KbEC1tY/+HFmhjLSeGxJGDnF5o0udCN sT2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DPGRrQseEV7fRp15l6glCYd3VAIDrHx8CUe7joMScwI=; b=fO7ki8GPevaNdm9+WrlG1fgFPBDzrLF6EkQJBj2i41g+481bgbTTqv8K/guUk/8IqM POoLo77dLpehCd1F86zSDwpbNN/QcRtv2b6p6x3skmDowJPQWCkoDVlfkQimovozxuYb xdoqIKdScTWOM+g2udz/zr1YNkGYZGXDx9ndrQuI0ouL8iFIHLbrd/2uz7aFmYi16T/9 I+IiVtq3AS6iOZeilvAGE0l6/UngyvQl7qJ++RjJlt8AC4U1jnePNN+UsW/yRUlxx8Zn kCeNCZJ8nlHxxLSkGhedbB67MfSkEFn1QS98oEazeZoW3mRczoQUBeY7XCNav7p56piX KRyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=F03rGZZp; 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 v196sor6662925pgb.58.2019.06.11.07.57.10 for (Google Transport Security); Tue, 11 Jun 2019 07:57:10 -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:a65:42c3:: with SMTP id l3mr20791067pgp.372.1560265029983; Tue, 11 Jun 2019 07:57:09 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:09 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 81/92] rockchip: dts: rk3399: Add u-boot, dm-pre-reloc for pmu Date: Tue, 11 Jun 2019 20:21:24 +0530 Message-Id: <20190611145135.21399-82-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=F03rGZZp; 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: , Add u-boot,dm-pre-reloc property for pmu in rk3399-u-boot.dtsi so-that SPL can access pmu. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/dts/rk3399-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi index 0786c1193a..31942899f6 100644 --- a/arch/arm/dts/rk3399-u-boot.dtsi +++ b/arch/arm/dts/rk3399-u-boot.dtsi @@ -3,6 +3,10 @@ * Copyright (C) 2019 Jagan Teki */ +&pmu { + u-boot,dm-pre-reloc; +}; + &sdmmc { u-boot,dm-pre-reloc; }; From patchwork Tue Jun 11 14:51:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 533 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 47C443F08A for ; Tue, 11 Jun 2019 16:57:17 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id o184sf9786131pfg.1 for ; Tue, 11 Jun 2019 07:57:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265036; cv=pass; d=google.com; s=arc-20160816; b=kDWrvYyzkAAb4GTvPh2HYmIFuNrqs/Agb2Z9geABOD42qUOhchDq2JagI6hCIv0aoy fMekABbOzUmbI9UTZQbM+YzRKGzB0v+yQpmC/OHRfCLsNravi0z1MMtiG+BrGnha/dcZ oGOUDOSFCGdRNzVYTIHxI+672h9mmmPPvaTZhUWUBVZjwTuOTdqtZIN1yAqBsCvP3EVh gqXzC+WyDiyBFu4NznaadfkwrxrnhUU4+mghqJ3ppXWUpnHRBntp/N1TDivgL9yi2Oye cZPk1CiYYy/8jcUAdzRhrSFaQGjE5SEmK1XPKq0YejmWif3KvDac0fYGrXyFgEXiN1Ez Avuw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pi3yMUgyQn6ZEl7cnTDkqHiq3kNifh29cyGuoRN2EoA=; b=SftLd/9tobsqy1RQbTl2aJqtYJCvOoCwrnDXw59kpEk0sD2jy3lrtMyjwXiegXZ6G9 jEw+UuNiJ3/a64dilVpzzrwMXuDJBPgWsu6sPDxsDX89HyKJ5OfRT5sByEPu54O2fexc 3wYTzMVyo1II1h3YfJYu9lG4fBOE8wnLBG0qy8DyDH+3lYY12Nh7oYYqxXS0z5CsPHkt ybOippY+EQqqcZbnmuRAqFBqHvWAQpCm9oZzyVoPct/Zg6mWrPF3rhTmCtwDHs57ye5o xAzQ+qDAFsiCW0NbOIFtMGS4Kc5gNylhlk9DXo2T/hwCaj+/3TO+aZdh4QwNb9366r2o WnJA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kOsISm+v; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=pi3yMUgyQn6ZEl7cnTDkqHiq3kNifh29cyGuoRN2EoA=; b=S6xj99WjYEIM95pH/dGBJ94BnSYpVGRCH5HA6aZXlpB6PgXoIOeJ4yGLS3OjBx3pgS sdSIC4DSyVIOdhjhPkCkcz0JsqL2oRdX9oveZHvY7xBjfWAOoI9dVL53TDIbUL5+Ke+O shRD0m+TOVtv2QszxezZV77CmNNzjloRX0oog= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=pi3yMUgyQn6ZEl7cnTDkqHiq3kNifh29cyGuoRN2EoA=; b=WYYFGqDzzGVFdRLv3AjKXF1Y927eYyvasBjRmi2BPNFgUD/0PO9zgRq0R77yl3DEZE W4KEBHIBqZd8ozMBEai55yaAadkGLTumdKgpX/OfEq5+eZl7400G8g89jAOJWQxu8f4c ZFlaKeK9c4nY7l7VKljakpUH28tWpFxxGFAYm8cbdZmsbL4LIV6TRA8bu3XNSxXANbvj 3kXTYJ0sotV46mMS/lU3hizmhy/NxKeNgyTF7+txRfK0uECbIfwM1Q/r75u8HOxrmh4V uPZ2DfYxFfDQbu52sFOuit/Zp82oBzWgK8x7OOwi5fAVwf53rj2hSyF5Ed6bF3epZ3hz GBnQ== X-Gm-Message-State: APjAAAWDV5RXFZ5sbseuQbFT653ksyZ8RnHNrIWS8fyDRfpXJ5ZX4wjo 6CFfUG31BaxZtBCQybeGetGqtkLi X-Google-Smtp-Source: APXvYqxJuilWfvUIlZEmro6e/0cIjfaski6BcC2ucZuQADnG/bSeVvBTFOwet9W6eoIZJXK3EAi6Ig== X-Received: by 2002:a17:902:29a7:: with SMTP id h36mr24368431plb.158.1560265035889; Tue, 11 Jun 2019 07:57:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:35c5:: with SMTP id r63ls867051pjb.0.gmail; Tue, 11 Jun 2019 07:57:15 -0700 (PDT) X-Received: by 2002:a17:902:9006:: with SMTP id a6mr71494117plp.305.1560265035378; Tue, 11 Jun 2019 07:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265035; cv=none; d=google.com; s=arc-20160816; b=UO8RnsAzl7kSjGQ2ajuXlJbZF2kObOm9Ja8TNoWOtGoVTYSw66BgNiEwOHzZYoSHsz XpKSW710QOJuhqsvv2OFztWGljnRAGS6ifOe/RcV8cqKy6DO6Z9Ue+Ntvx+nmbn1psva cqpCz46x/lfC0AAcqIXn3Uehf2u6eYNNFB6RvfkG+ToNVtjaHjDTyy88DaPW1mx3tVTz /T8XHVbANaio76gbDGw38x3ajiIrCPOpdN24p0HzIIwoLwDfrHaV5XOiPLLGyO6kkimy N5vIxP7HbUZ+iMsl2PmOHgKfKah3u+LNFbtpAehV6QUlcNiGeYq+ykRfRb/7llmsEqqy MCUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=6IGCZvJ5OxQ32ol7rqBb2TRyEZNMkCsvqYwWAu9hehA=; b=G9mhqNVUsidUGZ28oURMHj6Tfz8j9VhaTDOcFBjPEuXVlTRZLNrwYrI9XYIgI+F1Tr fuf3bWcLOxcWwHDQCNwLK2dx9zcmFzDTDjk0nLs0kIRWek5y3+0xxodIFHKXuK+w9Kei v5hDvwwCJiQupWSgImvMf/9RbpWJF8IOSaHWQyM3HU5d6c9WN+jyfglvO7JROjk6kOG3 9cr3dlejVkvPvuwx3+huSWMQyaIgqkE3TnJx+JEhZ7himW7nY2z9te825yal/u+eDq7G cUpdi9QxrBWhPmCUQ6cZBO1gSrv7ZUa+CeSkwimDWq7WWSWbbKb3ty+b1fQpDfKYZzck urIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kOsISm+v; 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 b4sor3523948pgq.26.2019.06.11.07.57.15 for (Google Transport Security); Tue, 11 Jun 2019 07:57:15 -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:a63:794:: with SMTP id 142mr12489761pgh.157.1560265034176; Tue, 11 Jun 2019 07:57:14 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:13 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 82/92] ram: rk3399: Add LPPDDR4-400 timings inc Date: Tue, 11 Jun 2019 20:21:25 +0530 Message-Id: <20190611145135.21399-83-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kOsISm+v; 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: , LPDDR4 initialization start with at board selected frequency and then it switches into 400MHz and 800MHz simultaneously to make the proper sequence work on each channel with associated training. So, add LPDDR4-400 timings inc file in driver area so-that these timings will take during LPDDR4 initialization phase. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- .../ram/rockchip/sdram-rk3399-lpddr4-400.inc | 1570 +++++++++++++++++ 1 file changed, 1570 insertions(+) create mode 100644 drivers/ram/rockchip/sdram-rk3399-lpddr4-400.inc diff --git a/drivers/ram/rockchip/sdram-rk3399-lpddr4-400.inc b/drivers/ram/rockchip/sdram-rk3399-lpddr4-400.inc new file mode 100644 index 0000000000..c50a03d9dd --- /dev/null +++ b/drivers/ram/rockchip/sdram-rk3399-lpddr4-400.inc @@ -0,0 +1,1570 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * (C) Copyright 2019 Rockchip Electronics Co., Ltd. + * (C) Copyright 2019 Amarula Solutions + */ + +{ + { + { + { + .rank = 0x2, + .col = 0xA, + .bk = 0x3, + .bw = 0x2, + .dbw = 0x1, + .row_3_4 = 0x0, + .cs0_row = 0xF, + .cs1_row = 0xF, + .ddrconfig = 1, + }, + { + .ddrtiminga0 = 0x80241d22, + .ddrtimingb0 = 0x15050f08, + .ddrtimingc0 = { + 0x00000602, + }, + .devtodev0 = 0x00002122, + .ddrmode = { + 0x0000004c, + }, + .agingx0 = 0x00000000, + } + }, + { + { + .rank = 0x2, + .col = 0xA, + .bk = 0x3, + .bw = 0x2, + .dbw = 0x1, + .row_3_4 = 0x0, + .cs0_row = 0xF, + .cs1_row = 0xF, + .ddrconfig = 1, + }, + { + .ddrtiminga0 = 0x80241d22, + .ddrtimingb0 = 0x15050f08, + .ddrtimingc0 = { + 0x00000602, + }, + .devtodev0 = 0x00002122, + .ddrmode = { + 0x0000004c, + }, + .agingx0 = 0x00000000, + } + } + }, + { + .ddr_freq = 400 * MHz, + .dramtype = LPDDR4, + .num_channels = 2, + .stride = 13, + .odt = 1, + }, + { + { + 0x00000b00, /* DENALI_CTL_00_DATA */ + 0x00000000, /* DENALI_CTL_01_DATA */ + 0x00000000, /* DENALI_CTL_02_DATA */ + 0x00000000, /* DENALI_CTL_03_DATA */ + 0x00000000, /* DENALI_CTL_04_DATA */ + 0x00013880, /* DENALI_CTL_05_DATA */ + 0x000c3500, /* DENALI_CTL_06_DATA */ + 0x00000005, /* DENALI_CTL_07_DATA */ + 0x00000320, /* DENALI_CTL_08_DATA */ + 0x00027100, /* DENALI_CTL_09_DATA */ + 0x00186a00, /* DENALI_CTL_10_DATA */ + 0x00000005, /* DENALI_CTL_11_DATA */ + 0x00000640, /* DENALI_CTL_12_DATA */ + 0x00002710, /* DENALI_CTL_13_DATA */ + 0x000186a0, /* DENALI_CTL_14_DATA */ + 0x00000005, /* DENALI_CTL_15_DATA */ + 0x01000064, /* DENALI_CTL_16_DATA */ + 0x00000000, /* DENALI_CTL_17_DATA */ + 0x02020101, /* DENALI_CTL_18_DATA */ + 0x00000102, /* DENALI_CTL_19_DATA */ + 0x00000050, /* DENALI_CTL_20_DATA */ + 0x000000c8, /* DENALI_CTL_21_DATA */ + 0x00000000, /* DENALI_CTL_22_DATA */ + 0x06140000, /* DENALI_CTL_23_DATA */ + 0x00081c00, /* DENALI_CTL_24_DATA */ + 0x0400040c, /* DENALI_CTL_25_DATA */ + 0x19042008, /* DENALI_CTL_26_DATA */ + 0x10080a11, /* DENALI_CTL_27_DATA */ + 0x22310800, /* DENALI_CTL_28_DATA */ + 0x00200f0a, /* DENALI_CTL_29_DATA */ + 0x0a030704, /* DENALI_CTL_30_DATA */ + 0x08000204, /* DENALI_CTL_31_DATA */ + 0x00000a0a, /* DENALI_CTL_32_DATA */ + 0x04006db0, /* DENALI_CTL_33_DATA */ + 0x0a0a0804, /* DENALI_CTL_34_DATA */ + 0x0600db60, /* DENALI_CTL_35_DATA */ + 0x0a0a0806, /* DENALI_CTL_36_DATA */ + 0x04000db6, /* DENALI_CTL_37_DATA */ + 0x02030404, /* DENALI_CTL_38_DATA */ + 0x0f0a0800, /* DENALI_CTL_39_DATA */ + 0x08040411, /* DENALI_CTL_40_DATA */ + 0x1400640a, /* DENALI_CTL_41_DATA */ + 0x02010a0a, /* DENALI_CTL_42_DATA */ + 0x00010001, /* DENALI_CTL_43_DATA */ + 0x04082012, /* DENALI_CTL_44_DATA */ + 0x00041109, /* DENALI_CTL_45_DATA */ + 0x00000000, /* DENALI_CTL_46_DATA */ + 0x03010000, /* DENALI_CTL_47_DATA */ + 0x06100034, /* DENALI_CTL_48_DATA */ + 0x0c280068, /* DENALI_CTL_49_DATA */ + 0x00bb0007, /* DENALI_CTL_50_DATA */ + 0x00000000, /* DENALI_CTL_51_DATA */ + 0x00060003, /* DENALI_CTL_52_DATA */ + 0x000a0003, /* DENALI_CTL_53_DATA */ + 0x000a0014, /* DENALI_CTL_54_DATA */ + 0x01000000, /* DENALI_CTL_55_DATA */ + 0x030a0000, /* DENALI_CTL_56_DATA */ + 0x0c000002, /* DENALI_CTL_57_DATA */ + 0x00000103, /* DENALI_CTL_58_DATA */ + 0x0003030a, /* DENALI_CTL_59_DATA */ + 0x00060037, /* DENALI_CTL_60_DATA */ + 0x0003006e, /* DENALI_CTL_61_DATA */ + 0x05050007, /* DENALI_CTL_62_DATA */ + 0x03020605, /* DENALI_CTL_63_DATA */ + 0x06050301, /* DENALI_CTL_64_DATA */ + 0x06020c05, /* DENALI_CTL_65_DATA */ + 0x05050302, /* DENALI_CTL_66_DATA */ + 0x03020305, /* DENALI_CTL_67_DATA */ + 0x00000301, /* DENALI_CTL_68_DATA */ + 0x00000301, /* DENALI_CTL_69_DATA */ + 0x00000001, /* DENALI_CTL_70_DATA */ + 0x00000000, /* DENALI_CTL_71_DATA */ + 0x00000000, /* DENALI_CTL_72_DATA */ + 0x01000000, /* DENALI_CTL_73_DATA */ + 0x80104002, /* DENALI_CTL_74_DATA */ + 0x00040003, /* DENALI_CTL_75_DATA */ + 0x00040005, /* DENALI_CTL_76_DATA */ + 0x00030000, /* DENALI_CTL_77_DATA */ + 0x00050004, /* DENALI_CTL_78_DATA */ + 0x00000004, /* DENALI_CTL_79_DATA */ + 0x00040003, /* DENALI_CTL_80_DATA */ + 0x00040005, /* DENALI_CTL_81_DATA */ + 0x18400000, /* DENALI_CTL_82_DATA */ + 0x00000c20, /* DENALI_CTL_83_DATA */ + 0x185030a0, /* DENALI_CTL_84_DATA */ + 0x02ec0000, /* DENALI_CTL_85_DATA */ + 0x00000176, /* DENALI_CTL_86_DATA */ + 0x00000000, /* DENALI_CTL_87_DATA */ + 0x00000000, /* DENALI_CTL_88_DATA */ + 0x00000000, /* DENALI_CTL_89_DATA */ + 0x00000000, /* DENALI_CTL_90_DATA */ + 0x00000000, /* DENALI_CTL_91_DATA */ + 0x06030300, /* DENALI_CTL_92_DATA */ + 0x00030303, /* DENALI_CTL_93_DATA */ + 0x02030200, /* DENALI_CTL_94_DATA */ + 0x00040703, /* DENALI_CTL_95_DATA */ + 0x03020302, /* DENALI_CTL_96_DATA */ + 0x02000407, /* DENALI_CTL_97_DATA */ + 0x07030203, /* DENALI_CTL_98_DATA */ + 0x00030f04, /* DENALI_CTL_99_DATA */ + 0x00070004, /* DENALI_CTL_100_DATA */ + 0x00000000, /* DENALI_CTL_101_DATA */ + 0x00000000, /* DENALI_CTL_102_DATA */ + 0x00000000, /* DENALI_CTL_103_DATA */ + 0x00000000, /* DENALI_CTL_104_DATA */ + 0x00000000, /* DENALI_CTL_105_DATA */ + 0x00000000, /* DENALI_CTL_106_DATA */ + 0x00000000, /* DENALI_CTL_107_DATA */ + 0x00010000, /* DENALI_CTL_108_DATA */ + 0x20040020, /* DENALI_CTL_109_DATA */ + 0x00200400, /* DENALI_CTL_110_DATA */ + 0x01000400, /* DENALI_CTL_111_DATA */ + 0x00000b80, /* DENALI_CTL_112_DATA */ + 0x00000000, /* DENALI_CTL_113_DATA */ + 0x00000001, /* DENALI_CTL_114_DATA */ + 0x00000002, /* DENALI_CTL_115_DATA */ + 0x0000000e, /* DENALI_CTL_116_DATA */ + 0x00000000, /* DENALI_CTL_117_DATA */ + 0x00000000, /* DENALI_CTL_118_DATA */ + 0x00000000, /* DENALI_CTL_119_DATA */ + 0x00000000, /* DENALI_CTL_120_DATA */ + 0x00000000, /* DENALI_CTL_121_DATA */ + 0x00500000, /* DENALI_CTL_122_DATA */ + 0x00640028, /* DENALI_CTL_123_DATA */ + 0x00640404, /* DENALI_CTL_124_DATA */ + 0x005000a0, /* DENALI_CTL_125_DATA */ + 0x060600c8, /* DENALI_CTL_126_DATA */ + 0x000a00c8, /* DENALI_CTL_127_DATA */ + 0x000d0005, /* DENALI_CTL_128_DATA */ + 0x000d0404, /* DENALI_CTL_129_DATA */ + 0x00000000, /* DENALI_CTL_130_DATA */ + 0x00000000, /* DENALI_CTL_131_DATA */ + 0x00000000, /* DENALI_CTL_132_DATA */ + 0x001400a3, /* DENALI_CTL_133_DATA */ + 0x00e30009, /* DENALI_CTL_134_DATA */ + 0x00120024, /* DENALI_CTL_135_DATA */ + 0x00040063, /* DENALI_CTL_136_DATA */ + 0x00000000, /* DENALI_CTL_137_DATA */ + 0x00310031, /* DENALI_CTL_138_DATA */ + 0x00000031, /* DENALI_CTL_139_DATA */ + 0x004d0000, /* DENALI_CTL_140_DATA */ + 0x004d004d, /* DENALI_CTL_141_DATA */ + 0x004d0000, /* DENALI_CTL_142_DATA */ + 0x004d004d, /* DENALI_CTL_143_DATA */ + 0x00010101, /* DENALI_CTL_144_DATA */ + 0x00000000, /* DENALI_CTL_145_DATA */ + 0x00000000, /* DENALI_CTL_146_DATA */ + 0x001400a3, /* DENALI_CTL_147_DATA */ + 0x00e30009, /* DENALI_CTL_148_DATA */ + 0x00120024, /* DENALI_CTL_149_DATA */ + 0x00040063, /* DENALI_CTL_150_DATA */ + 0x00000000, /* DENALI_CTL_151_DATA */ + 0x00310031, /* DENALI_CTL_152_DATA */ + 0x00000031, /* DENALI_CTL_153_DATA */ + 0x004d0000, /* DENALI_CTL_154_DATA */ + 0x004d004d, /* DENALI_CTL_155_DATA */ + 0x004d0000, /* DENALI_CTL_156_DATA */ + 0x004d004d, /* DENALI_CTL_157_DATA */ + 0x00010101, /* DENALI_CTL_158_DATA */ + 0x00000000, /* DENALI_CTL_159_DATA */ + 0x00000000, /* DENALI_CTL_160_DATA */ + 0x00000000, /* DENALI_CTL_161_DATA */ + 0x00000001, /* DENALI_CTL_162_DATA */ + 0x00000000, /* DENALI_CTL_163_DATA */ + 0x18151100, /* DENALI_CTL_164_DATA */ + 0x0000000c, /* DENALI_CTL_165_DATA */ + 0x00000000, /* DENALI_CTL_166_DATA */ + 0x00000000, /* DENALI_CTL_167_DATA */ + 0x00000000, /* DENALI_CTL_168_DATA */ + 0x00000000, /* DENALI_CTL_169_DATA */ + 0x00000000, /* DENALI_CTL_170_DATA */ + 0x00000000, /* DENALI_CTL_171_DATA */ + 0x00000000, /* DENALI_CTL_172_DATA */ + 0x00000000, /* DENALI_CTL_173_DATA */ + 0x00000000, /* DENALI_CTL_174_DATA */ + 0x00000000, /* DENALI_CTL_175_DATA */ + 0x00000000, /* DENALI_CTL_176_DATA */ + 0x00000000, /* DENALI_CTL_177_DATA */ + 0x00000000, /* DENALI_CTL_178_DATA */ + 0x00020003, /* DENALI_CTL_179_DATA */ + 0x00400100, /* DENALI_CTL_180_DATA */ + 0x000c0190, /* DENALI_CTL_181_DATA */ + 0x01000200, /* DENALI_CTL_182_DATA */ + 0x03200040, /* DENALI_CTL_183_DATA */ + 0x00020018, /* DENALI_CTL_184_DATA */ + 0x00400100, /* DENALI_CTL_185_DATA */ + 0x00080032, /* DENALI_CTL_186_DATA */ + 0x00140000, /* DENALI_CTL_187_DATA */ + 0x00030028, /* DENALI_CTL_188_DATA */ + 0x01010100, /* DENALI_CTL_189_DATA */ + 0x02000202, /* DENALI_CTL_190_DATA */ + 0x0b000002, /* DENALI_CTL_191_DATA */ + 0x01000f0f, /* DENALI_CTL_192_DATA */ + 0x00000000, /* DENALI_CTL_193_DATA */ + 0x00000000, /* DENALI_CTL_194_DATA */ + 0x00010003, /* DENALI_CTL_195_DATA */ + 0x00000c03, /* DENALI_CTL_196_DATA */ + 0x00040101, /* DENALI_CTL_197_DATA */ + 0x04010100, /* DENALI_CTL_198_DATA */ + 0x01000000, /* DENALI_CTL_199_DATA */ + 0x02010000, /* DENALI_CTL_200_DATA */ + 0x00000001, /* DENALI_CTL_201_DATA */ + 0x00000000, /* DENALI_CTL_202_DATA */ + 0x00000000, /* DENALI_CTL_203_DATA */ + 0x00000000, /* DENALI_CTL_204_DATA */ + 0x00000000, /* DENALI_CTL_205_DATA */ + 0x00000000, /* DENALI_CTL_206_DATA */ + 0x00000000, /* DENALI_CTL_207_DATA */ + 0x00000000, /* DENALI_CTL_208_DATA */ + 0x00000000, /* DENALI_CTL_209_DATA */ + 0x00000000, /* DENALI_CTL_210_DATA */ + 0x00010000, /* DENALI_CTL_211_DATA */ + 0x00000001, /* DENALI_CTL_212_DATA */ + 0x01010001, /* DENALI_CTL_213_DATA */ + 0x05040001, /* DENALI_CTL_214_DATA */ + 0x040a0703, /* DENALI_CTL_215_DATA */ + 0x02080808, /* DENALI_CTL_216_DATA */ + 0x020e000a, /* DENALI_CTL_217_DATA */ + 0x020f010b, /* DENALI_CTL_218_DATA */ + 0x000d0008, /* DENALI_CTL_219_DATA */ + 0x00080b0a, /* DENALI_CTL_220_DATA */ + 0x03000200, /* DENALI_CTL_221_DATA */ + 0x00000100, /* DENALI_CTL_222_DATA */ + 0x00000000, /* DENALI_CTL_223_DATA */ + 0x00000000, /* DENALI_CTL_224_DATA */ + 0x0d000001, /* DENALI_CTL_225_DATA */ + 0x00000028, /* DENALI_CTL_226_DATA */ + 0x00010000, /* DENALI_CTL_227_DATA */ + 0x00000003, /* DENALI_CTL_228_DATA */ + 0x00000000, /* DENALI_CTL_229_DATA */ + 0x00000000, /* DENALI_CTL_230_DATA */ + 0x00000000, /* DENALI_CTL_231_DATA */ + 0x00000000, /* DENALI_CTL_232_DATA */ + 0x00000000, /* DENALI_CTL_233_DATA */ + 0x00000000, /* DENALI_CTL_234_DATA */ + 0x00000000, /* DENALI_CTL_235_DATA */ + 0x00000000, /* DENALI_CTL_236_DATA */ + 0x00010100, /* DENALI_CTL_237_DATA */ + 0x01000000, /* DENALI_CTL_238_DATA */ + 0x00000001, /* DENALI_CTL_239_DATA */ + 0x00000303, /* DENALI_CTL_240_DATA */ + 0x00000000, /* DENALI_CTL_241_DATA */ + 0x00000000, /* DENALI_CTL_242_DATA */ + 0x00000000, /* DENALI_CTL_243_DATA */ + 0x00000000, /* DENALI_CTL_244_DATA */ + 0x00000000, /* DENALI_CTL_245_DATA */ + 0x00000000, /* DENALI_CTL_246_DATA */ + 0x00000000, /* DENALI_CTL_247_DATA */ + 0x00000000, /* DENALI_CTL_248_DATA */ + 0x00000000, /* DENALI_CTL_249_DATA */ + 0x00000000, /* DENALI_CTL_250_DATA */ + 0x00000000, /* DENALI_CTL_251_DATA */ + 0x00000000, /* DENALI_CTL_252_DATA */ + 0x00000000, /* DENALI_CTL_253_DATA */ + 0x00000000, /* DENALI_CTL_254_DATA */ + 0x00000000, /* DENALI_CTL_255_DATA */ + 0x000556aa, /* DENALI_CTL_256_DATA */ + 0x000aaaaa, /* DENALI_CTL_257_DATA */ + 0x000aa955, /* DENALI_CTL_258_DATA */ + 0x00055555, /* DENALI_CTL_259_DATA */ + 0x000b3133, /* DENALI_CTL_260_DATA */ + 0x0004cd33, /* DENALI_CTL_261_DATA */ + 0x0004cecc, /* DENALI_CTL_262_DATA */ + 0x000b32cc, /* DENALI_CTL_263_DATA */ + 0x00010300, /* DENALI_CTL_264_DATA */ + 0x03000100, /* DENALI_CTL_265_DATA */ + 0x00000000, /* DENALI_CTL_266_DATA */ + 0x00000000, /* DENALI_CTL_267_DATA */ + 0x00000000, /* DENALI_CTL_268_DATA */ + 0x00000000, /* DENALI_CTL_269_DATA */ + 0x00000000, /* DENALI_CTL_270_DATA */ + 0x00000000, /* DENALI_CTL_271_DATA */ + 0x00000000, /* DENALI_CTL_272_DATA */ + 0x00000000, /* DENALI_CTL_273_DATA */ + 0x00ffff00, /* DENALI_CTL_274_DATA */ + 0x1a160000, /* DENALI_CTL_275_DATA */ + 0x08000012, /* DENALI_CTL_276_DATA */ + 0x00000c20, /* DENALI_CTL_277_DATA */ + 0x00000200, /* DENALI_CTL_278_DATA */ + 0x00000200, /* DENALI_CTL_279_DATA */ + 0x00000200, /* DENALI_CTL_280_DATA */ + 0x00000200, /* DENALI_CTL_281_DATA */ + 0x00000c20, /* DENALI_CTL_282_DATA */ + 0x00007940, /* DENALI_CTL_283_DATA */ + 0x18500409, /* DENALI_CTL_284_DATA */ + 0x00000200, /* DENALI_CTL_285_DATA */ + 0x00000200, /* DENALI_CTL_286_DATA */ + 0x00000200, /* DENALI_CTL_287_DATA */ + 0x00000200, /* DENALI_CTL_288_DATA */ + 0x00001850, /* DENALI_CTL_289_DATA */ + 0x0000f320, /* DENALI_CTL_290_DATA */ + 0x0176060c, /* DENALI_CTL_291_DATA */ + 0x00000200, /* DENALI_CTL_292_DATA */ + 0x00000200, /* DENALI_CTL_293_DATA */ + 0x00000200, /* DENALI_CTL_294_DATA */ + 0x00000200, /* DENALI_CTL_295_DATA */ + 0x00000176, /* DENALI_CTL_296_DATA */ + 0x00000e9c, /* DENALI_CTL_297_DATA */ + 0x02020205, /* DENALI_CTL_298_DATA */ + 0x03030202, /* DENALI_CTL_299_DATA */ + 0x00000018, /* DENALI_CTL_300_DATA */ + 0x00000000, /* DENALI_CTL_301_DATA */ + 0x00000000, /* DENALI_CTL_302_DATA */ + 0x00001403, /* DENALI_CTL_303_DATA */ + 0x00000000, /* DENALI_CTL_304_DATA */ + 0x00000000, /* DENALI_CTL_305_DATA */ + 0x00000000, /* DENALI_CTL_306_DATA */ + 0x00030000, /* DENALI_CTL_307_DATA */ + 0x000a001c, /* DENALI_CTL_308_DATA */ + 0x000e0020, /* DENALI_CTL_309_DATA */ + 0x00060018, /* DENALI_CTL_310_DATA */ + 0x00000000, /* DENALI_CTL_311_DATA */ + 0x00000000, /* DENALI_CTL_312_DATA */ + 0x02000000, /* DENALI_CTL_313_DATA */ + 0x00090305, /* DENALI_CTL_314_DATA */ + 0x00050101, /* DENALI_CTL_315_DATA */ + 0x00000000, /* DENALI_CTL_316_DATA */ + 0x00000000, /* DENALI_CTL_317_DATA */ + 0x00000000, /* DENALI_CTL_318_DATA */ + 0x00000000, /* DENALI_CTL_319_DATA */ + 0x00000000, /* DENALI_CTL_320_DATA */ + 0x00000000, /* DENALI_CTL_321_DATA */ + 0x00000000, /* DENALI_CTL_322_DATA */ + 0x00000000, /* DENALI_CTL_323_DATA */ + 0x01000001, /* DENALI_CTL_324_DATA */ + 0x01010101, /* DENALI_CTL_325_DATA */ + 0x01000101, /* DENALI_CTL_326_DATA */ + 0x01000100, /* DENALI_CTL_327_DATA */ + 0x00010001, /* DENALI_CTL_328_DATA */ + 0x00010002, /* DENALI_CTL_329_DATA */ + 0x00020100, /* DENALI_CTL_330_DATA */ + 0x00000002 /* DENALI_CTL_331_DATA */ + } + }, + { + { + 0x00000b00, /* DENALI_PI_00_DATA */ + 0x00000000, /* DENALI_PI_01_DATA */ + 0x000002ec, /* DENALI_PI_02_DATA */ + 0x00000176, /* DENALI_PI_03_DATA */ + 0x000030a0, /* DENALI_PI_04_DATA */ + 0x00001850, /* DENALI_PI_05_DATA */ + 0x00001840, /* DENALI_PI_06_DATA */ + 0x01760c20, /* DENALI_PI_07_DATA */ + 0x00000200, /* DENALI_PI_08_DATA */ + 0x00000200, /* DENALI_PI_09_DATA */ + 0x00000200, /* DENALI_PI_10_DATA */ + 0x00000200, /* DENALI_PI_11_DATA */ + 0x00001850, /* DENALI_PI_12_DATA */ + 0x00000200, /* DENALI_PI_13_DATA */ + 0x00000200, /* DENALI_PI_14_DATA */ + 0x00000200, /* DENALI_PI_15_DATA */ + 0x00000200, /* DENALI_PI_16_DATA */ + 0x00000c20, /* DENALI_PI_17_DATA */ + 0x00000200, /* DENALI_PI_18_DATA */ + 0x00000200, /* DENALI_PI_19_DATA */ + 0x00000200, /* DENALI_PI_20_DATA */ + 0x00000200, /* DENALI_PI_21_DATA */ + 0x00010000, /* DENALI_PI_22_DATA */ + 0x00000007, /* DENALI_PI_23_DATA */ + 0x01000001, /* DENALI_PI_24_DATA */ + 0x00000000, /* DENALI_PI_25_DATA */ + 0x3fffffff, /* DENALI_PI_26_DATA */ + 0x00000000, /* DENALI_PI_27_DATA */ + 0x00000000, /* DENALI_PI_28_DATA */ + 0x00000000, /* DENALI_PI_29_DATA */ + 0x00000000, /* DENALI_PI_30_DATA */ + 0x00000000, /* DENALI_PI_31_DATA */ + 0x00000000, /* DENALI_PI_32_DATA */ + 0x00000000, /* DENALI_PI_33_DATA */ + 0x00000000, /* DENALI_PI_34_DATA */ + 0x00000000, /* DENALI_PI_35_DATA */ + 0x00000000, /* DENALI_PI_36_DATA */ + 0x00000000, /* DENALI_PI_37_DATA */ + 0x00000000, /* DENALI_PI_38_DATA */ + 0x00000000, /* DENALI_PI_39_DATA */ + 0x00000000, /* DENALI_PI_40_DATA */ + 0x0f000101, /* DENALI_PI_41_DATA */ + 0x082b3223, /* DENALI_PI_42_DATA */ + 0x080c0004, /* DENALI_PI_43_DATA */ + 0x00061c00, /* DENALI_PI_44_DATA */ + 0x00000214, /* DENALI_PI_45_DATA */ + 0x00bb0007, /* DENALI_PI_46_DATA */ + 0x0c280068, /* DENALI_PI_47_DATA */ + 0x06100034, /* DENALI_PI_48_DATA */ + 0x00000500, /* DENALI_PI_49_DATA */ + 0x00000000, /* DENALI_PI_50_DATA */ + 0x00000000, /* DENALI_PI_51_DATA */ + 0x00000000, /* DENALI_PI_52_DATA */ + 0x00000000, /* DENALI_PI_53_DATA */ + 0x00000000, /* DENALI_PI_54_DATA */ + 0x00000000, /* DENALI_PI_55_DATA */ + 0x00000000, /* DENALI_PI_56_DATA */ + 0x00000000, /* DENALI_PI_57_DATA */ + 0x04040100, /* DENALI_PI_58_DATA */ + 0x0a000004, /* DENALI_PI_59_DATA */ + 0x00000128, /* DENALI_PI_60_DATA */ + 0x00000000, /* DENALI_PI_61_DATA */ + 0x0003000f, /* DENALI_PI_62_DATA */ + 0x00000018, /* DENALI_PI_63_DATA */ + 0x00000000, /* DENALI_PI_64_DATA */ + 0x00000000, /* DENALI_PI_65_DATA */ + 0x00060002, /* DENALI_PI_66_DATA */ + 0x00010001, /* DENALI_PI_67_DATA */ + 0x00000101, /* DENALI_PI_68_DATA */ + 0x00020001, /* DENALI_PI_69_DATA */ + 0x00080004, /* DENALI_PI_70_DATA */ + 0x00000000, /* DENALI_PI_71_DATA */ + 0x05030000, /* DENALI_PI_72_DATA */ + 0x070a0404, /* DENALI_PI_73_DATA */ + 0x00000000, /* DENALI_PI_74_DATA */ + 0x00000000, /* DENALI_PI_75_DATA */ + 0x00000000, /* DENALI_PI_76_DATA */ + 0x000f0f00, /* DENALI_PI_77_DATA */ + 0x0000001e, /* DENALI_PI_78_DATA */ + 0x00000000, /* DENALI_PI_79_DATA */ + 0x01010300, /* DENALI_PI_80_DATA */ + 0x00000000, /* DENALI_PI_81_DATA */ + 0x00000000, /* DENALI_PI_82_DATA */ + 0x01000000, /* DENALI_PI_83_DATA */ + 0x00000101, /* DENALI_PI_84_DATA */ + 0x55555a5a, /* DENALI_PI_85_DATA */ + 0x55555a5a, /* DENALI_PI_86_DATA */ + 0x55555a5a, /* DENALI_PI_87_DATA */ + 0x55555a5a, /* DENALI_PI_88_DATA */ + 0x0c050001, /* DENALI_PI_89_DATA */ + 0x06020009, /* DENALI_PI_90_DATA */ + 0x00010004, /* DENALI_PI_91_DATA */ + 0x00000203, /* DENALI_PI_92_DATA */ + 0x00030000, /* DENALI_PI_93_DATA */ + 0x170f0000, /* DENALI_PI_94_DATA */ + 0x00060018, /* DENALI_PI_95_DATA */ + 0x000e0020, /* DENALI_PI_96_DATA */ + 0x000a001c, /* DENALI_PI_97_DATA */ + 0x00000000, /* DENALI_PI_98_DATA */ + 0x00000000, /* DENALI_PI_99_DATA */ + 0x00000100, /* DENALI_PI_100_DATA */ + 0x140a0000, /* DENALI_PI_101_DATA */ + 0x000d010a, /* DENALI_PI_102_DATA */ + 0x0100c802, /* DENALI_PI_103_DATA */ + 0x010a0064, /* DENALI_PI_104_DATA */ + 0x000e0100, /* DENALI_PI_105_DATA */ + 0x0100000e, /* DENALI_PI_106_DATA */ + 0x00c900c9, /* DENALI_PI_107_DATA */ + 0x00650100, /* DENALI_PI_108_DATA */ + 0x1e1a0065, /* DENALI_PI_109_DATA */ + 0x10010204, /* DENALI_PI_110_DATA */ + 0x06070605, /* DENALI_PI_111_DATA */ + 0x20000202, /* DENALI_PI_112_DATA */ + 0x00201000, /* DENALI_PI_113_DATA */ + 0x00201000, /* DENALI_PI_114_DATA */ + 0x04041000, /* DENALI_PI_115_DATA */ + 0x10020100, /* DENALI_PI_116_DATA */ + 0x0003010c, /* DENALI_PI_117_DATA */ + 0x004b004a, /* DENALI_PI_118_DATA */ + 0x1a0f0000, /* DENALI_PI_119_DATA */ + 0x0102041e, /* DENALI_PI_120_DATA */ + 0x34000000, /* DENALI_PI_121_DATA */ + 0x00000000, /* DENALI_PI_122_DATA */ + 0x00000000, /* DENALI_PI_123_DATA */ + 0x00010000, /* DENALI_PI_124_DATA */ + 0x00000400, /* DENALI_PI_125_DATA */ + 0x00310000, /* DENALI_PI_126_DATA */ + 0x004d4d00, /* DENALI_PI_127_DATA */ + 0x00120024, /* DENALI_PI_128_DATA */ + 0x4d000031, /* DENALI_PI_129_DATA */ + 0x0000144d, /* DENALI_PI_130_DATA */ + 0x00310009, /* DENALI_PI_131_DATA */ + 0x004d4d00, /* DENALI_PI_132_DATA */ + 0x00000004, /* DENALI_PI_133_DATA */ + 0x4d000031, /* DENALI_PI_134_DATA */ + 0x0000244d, /* DENALI_PI_135_DATA */ + 0x00310012, /* DENALI_PI_136_DATA */ + 0x004d4d00, /* DENALI_PI_137_DATA */ + 0x00090014, /* DENALI_PI_138_DATA */ + 0x4d000031, /* DENALI_PI_139_DATA */ + 0x0004004d, /* DENALI_PI_140_DATA */ + 0x00310000, /* DENALI_PI_141_DATA */ + 0x004d4d00, /* DENALI_PI_142_DATA */ + 0x00120024, /* DENALI_PI_143_DATA */ + 0x4d000031, /* DENALI_PI_144_DATA */ + 0x0000144d, /* DENALI_PI_145_DATA */ + 0x00310009, /* DENALI_PI_146_DATA */ + 0x004d4d00, /* DENALI_PI_147_DATA */ + 0x00000004, /* DENALI_PI_148_DATA */ + 0x4d000031, /* DENALI_PI_149_DATA */ + 0x0000244d, /* DENALI_PI_150_DATA */ + 0x00310012, /* DENALI_PI_151_DATA */ + 0x004d4d00, /* DENALI_PI_152_DATA */ + 0x00090014, /* DENALI_PI_153_DATA */ + 0x4d000031, /* DENALI_PI_154_DATA */ + 0x0200004d, /* DENALI_PI_155_DATA */ + 0x00c8000d, /* DENALI_PI_156_DATA */ + 0x08080064, /* DENALI_PI_157_DATA */ + 0x040a0404, /* DENALI_PI_158_DATA */ + 0x03000d92, /* DENALI_PI_159_DATA */ + 0x010a2001, /* DENALI_PI_160_DATA */ + 0x0f11080a, /* DENALI_PI_161_DATA */ + 0x0000110a, /* DENALI_PI_162_DATA */ + 0x2200d92e, /* DENALI_PI_163_DATA */ + 0x080c2003, /* DENALI_PI_164_DATA */ + 0x0809080a, /* DENALI_PI_165_DATA */ + 0x00000a0a, /* DENALI_PI_166_DATA */ + 0x11006c97, /* DENALI_PI_167_DATA */ + 0x040a2002, /* DENALI_PI_168_DATA */ + 0x0200020a, /* DENALI_PI_169_DATA */ + 0x02000200, /* DENALI_PI_170_DATA */ + 0x02000200, /* DENALI_PI_171_DATA */ + 0x02000200, /* DENALI_PI_172_DATA */ + 0x02000200, /* DENALI_PI_173_DATA */ + 0x00000000, /* DENALI_PI_174_DATA */ + 0x00000000, /* DENALI_PI_175_DATA */ + 0x00000000, /* DENALI_PI_176_DATA */ + 0x00000000, /* DENALI_PI_177_DATA */ + 0x00000000, /* DENALI_PI_178_DATA */ + 0x00000000, /* DENALI_PI_179_DATA */ + 0x00000000, /* DENALI_PI_180_DATA */ + 0x00000000, /* DENALI_PI_181_DATA */ + 0x00000000, /* DENALI_PI_182_DATA */ + 0x00000000, /* DENALI_PI_183_DATA */ + 0x00000000, /* DENALI_PI_184_DATA */ + 0x00000000, /* DENALI_PI_185_DATA */ + 0x01000400, /* DENALI_PI_186_DATA */ + 0x00017600, /* DENALI_PI_187_DATA */ + 0x00000e9c, /* DENALI_PI_188_DATA */ + 0x00001850, /* DENALI_PI_189_DATA */ + 0x0000f320, /* DENALI_PI_190_DATA */ + 0x00000c20, /* DENALI_PI_191_DATA */ + 0x00007940, /* DENALI_PI_192_DATA */ + 0x08000000, /* DENALI_PI_193_DATA */ + 0x00000100, /* DENALI_PI_194_DATA */ + 0x00000000, /* DENALI_PI_195_DATA */ + 0x00000000, /* DENALI_PI_196_DATA */ + 0x00000000, /* DENALI_PI_197_DATA */ + 0x00000000, /* DENALI_PI_198_DATA */ + 0x00000002 /* DENALI_PI_199_DATA */ + } + }, + { + { + 0x76543210, /* DENALI_PHY_00_DATA */ + 0x0004f008, /* DENALI_PHY_01_DATA */ + 0x00020119, /* DENALI_PHY_02_DATA */ + 0x00000000, /* DENALI_PHY_03_DATA */ + 0x00000000, /* DENALI_PHY_04_DATA */ + 0x00010000, /* DENALI_PHY_05_DATA */ + 0x01665555, /* DENALI_PHY_06_DATA */ + 0x03665555, /* DENALI_PHY_07_DATA */ + 0x00010f00, /* DENALI_PHY_08_DATA */ + 0x04000100, /* DENALI_PHY_09_DATA */ + 0x00000001, /* DENALI_PHY_10_DATA */ + 0x00170180, /* DENALI_PHY_11_DATA */ + 0x00cc0201, /* DENALI_PHY_12_DATA */ + 0x00030066, /* DENALI_PHY_13_DATA */ + 0x00000000, /* DENALI_PHY_14_DATA */ + 0x00000000, /* DENALI_PHY_15_DATA */ + 0x00000000, /* DENALI_PHY_16_DATA */ + 0x00000000, /* DENALI_PHY_17_DATA */ + 0x00000000, /* DENALI_PHY_18_DATA */ + 0x00000000, /* DENALI_PHY_19_DATA */ + 0x00000000, /* DENALI_PHY_20_DATA */ + 0x00000000, /* DENALI_PHY_21_DATA */ + 0x04080000, /* DENALI_PHY_22_DATA */ + 0x04080400, /* DENALI_PHY_23_DATA */ + 0x30000000, /* DENALI_PHY_24_DATA */ + 0x0c00c007, /* DENALI_PHY_25_DATA */ + 0x00000100, /* DENALI_PHY_26_DATA */ + 0x00000000, /* DENALI_PHY_27_DATA */ + 0xfd02fe01, /* DENALI_PHY_28_DATA */ + 0xf708fb04, /* DENALI_PHY_29_DATA */ + 0xdf20ef10, /* DENALI_PHY_30_DATA */ + 0x7f80bf40, /* DENALI_PHY_31_DATA */ + 0x0001aaaa, /* DENALI_PHY_32_DATA */ + 0x00000000, /* DENALI_PHY_33_DATA */ + 0x00000000, /* DENALI_PHY_34_DATA */ + 0x00000000, /* DENALI_PHY_35_DATA */ + 0x00000000, /* DENALI_PHY_36_DATA */ + 0x00000000, /* DENALI_PHY_37_DATA */ + 0x00000000, /* DENALI_PHY_38_DATA */ + 0x00000000, /* DENALI_PHY_39_DATA */ + 0x00000000, /* DENALI_PHY_40_DATA */ + 0x00000000, /* DENALI_PHY_41_DATA */ + 0x00000000, /* DENALI_PHY_42_DATA */ + 0x00000000, /* DENALI_PHY_43_DATA */ + 0x00000000, /* DENALI_PHY_44_DATA */ + 0x00000000, /* DENALI_PHY_45_DATA */ + 0x00000000, /* DENALI_PHY_46_DATA */ + 0x00000000, /* DENALI_PHY_47_DATA */ + 0x00000000, /* DENALI_PHY_48_DATA */ + 0x00000000, /* DENALI_PHY_49_DATA */ + 0x00000000, /* DENALI_PHY_50_DATA */ + 0x00000000, /* DENALI_PHY_51_DATA */ + 0x00200000, /* DENALI_PHY_52_DATA */ + 0x00000000, /* DENALI_PHY_53_DATA */ + 0x00000000, /* DENALI_PHY_54_DATA */ + 0x00000000, /* DENALI_PHY_55_DATA */ + 0x00000000, /* DENALI_PHY_56_DATA */ + 0x00000000, /* DENALI_PHY_57_DATA */ + 0x00000000, /* DENALI_PHY_58_DATA */ + 0x02800280, /* DENALI_PHY_59_DATA */ + 0x02800280, /* DENALI_PHY_60_DATA */ + 0x02800280, /* DENALI_PHY_61_DATA */ + 0x02800280, /* DENALI_PHY_62_DATA */ + 0x00000280, /* DENALI_PHY_63_DATA */ + 0x00000000, /* DENALI_PHY_64_DATA */ + 0x00000000, /* DENALI_PHY_65_DATA */ + 0x00000000, /* DENALI_PHY_66_DATA */ + 0x00000000, /* DENALI_PHY_67_DATA */ + 0x00800000, /* DENALI_PHY_68_DATA */ + 0x00800080, /* DENALI_PHY_69_DATA */ + 0x00800080, /* DENALI_PHY_70_DATA */ + 0x00800080, /* DENALI_PHY_71_DATA */ + 0x00800080, /* DENALI_PHY_72_DATA */ + 0x00800080, /* DENALI_PHY_73_DATA */ + 0x00800080, /* DENALI_PHY_74_DATA */ + 0x00800080, /* DENALI_PHY_75_DATA */ + 0x00800080, /* DENALI_PHY_76_DATA */ + 0x01190080, /* DENALI_PHY_77_DATA */ + 0x00000001, /* DENALI_PHY_78_DATA */ + 0x00000000, /* DENALI_PHY_79_DATA */ + 0x00000000, /* DENALI_PHY_80_DATA */ + 0x00000200, /* DENALI_PHY_81_DATA */ + 0x00000000, /* DENALI_PHY_82_DATA */ + 0x51315152, /* DENALI_PHY_83_DATA */ + 0xc0003150, /* DENALI_PHY_84_DATA */ + 0x010000c0, /* DENALI_PHY_85_DATA */ + 0x00100000, /* DENALI_PHY_86_DATA */ + 0x07044204, /* DENALI_PHY_87_DATA */ + 0x000f0c18, /* DENALI_PHY_88_DATA */ + 0x01000140, /* DENALI_PHY_89_DATA */ + 0x00000c10, /* DENALI_PHY_90_DATA */ + 0x00000000, /* DENALI_PHY_91_DATA */ + 0x00000000, /* DENALI_PHY_92_DATA */ + 0x00000000, /* DENALI_PHY_93_DATA */ + 0x00000000, /* DENALI_PHY_94_DATA */ + 0x00000000, /* DENALI_PHY_95_DATA */ + 0x00000000, /* DENALI_PHY_96_DATA */ + 0x00000000, /* DENALI_PHY_97_DATA */ + 0x00000000, /* DENALI_PHY_98_DATA */ + 0x00000000, /* DENALI_PHY_99_DATA */ + 0x00000000, /* DENALI_PHY_100_DATA */ + 0x00000000, /* DENALI_PHY_101_DATA */ + 0x00000000, /* DENALI_PHY_102_DATA */ + 0x00000000, /* DENALI_PHY_103_DATA */ + 0x00000000, /* DENALI_PHY_104_DATA */ + 0x00000000, /* DENALI_PHY_105_DATA */ + 0x00000000, /* DENALI_PHY_106_DATA */ + 0x00000000, /* DENALI_PHY_107_DATA */ + 0x00000000, /* DENALI_PHY_108_DATA */ + 0x00000000, /* DENALI_PHY_109_DATA */ + 0x00000000, /* DENALI_PHY_110_DATA */ + 0x00000000, /* DENALI_PHY_111_DATA */ + 0x00000000, /* DENALI_PHY_112_DATA */ + 0x00000000, /* DENALI_PHY_113_DATA */ + 0x00000000, /* DENALI_PHY_114_DATA */ + 0x00000000, /* DENALI_PHY_115_DATA */ + 0x00000000, /* DENALI_PHY_116_DATA */ + 0x00000000, /* DENALI_PHY_117_DATA */ + 0x00000000, /* DENALI_PHY_118_DATA */ + 0x00000000, /* DENALI_PHY_119_DATA */ + 0x00000000, /* DENALI_PHY_120_DATA */ + 0x00000000, /* DENALI_PHY_121_DATA */ + 0x00000000, /* DENALI_PHY_122_DATA */ + 0x00000000, /* DENALI_PHY_123_DATA */ + 0x00000000, /* DENALI_PHY_124_DATA */ + 0x00000000, /* DENALI_PHY_125_DATA */ + 0x00000000, /* DENALI_PHY_126_DATA */ + 0x00000000, /* DENALI_PHY_127_DATA */ + 0x76543210, /* DENALI_PHY_128_DATA */ + 0x0004f008, /* DENALI_PHY_129_DATA */ + 0x00020119, /* DENALI_PHY_130_DATA */ + 0x00000000, /* DENALI_PHY_131_DATA */ + 0x00000000, /* DENALI_PHY_132_DATA */ + 0x00010000, /* DENALI_PHY_133_DATA */ + 0x01665555, /* DENALI_PHY_134_DATA */ + 0x03665555, /* DENALI_PHY_135_DATA */ + 0x00010f00, /* DENALI_PHY_136_DATA */ + 0x04000100, /* DENALI_PHY_137_DATA */ + 0x00000001, /* DENALI_PHY_138_DATA */ + 0x00170180, /* DENALI_PHY_139_DATA */ + 0x00cc0201, /* DENALI_PHY_140_DATA */ + 0x00030066, /* DENALI_PHY_141_DATA */ + 0x00000000, /* DENALI_PHY_142_DATA */ + 0x00000000, /* DENALI_PHY_143_DATA */ + 0x00000000, /* DENALI_PHY_144_DATA */ + 0x00000000, /* DENALI_PHY_145_DATA */ + 0x00000000, /* DENALI_PHY_146_DATA */ + 0x00000000, /* DENALI_PHY_147_DATA */ + 0x00000000, /* DENALI_PHY_148_DATA */ + 0x00000000, /* DENALI_PHY_149_DATA */ + 0x04080000, /* DENALI_PHY_150_DATA */ + 0x04080400, /* DENALI_PHY_151_DATA */ + 0x30000000, /* DENALI_PHY_152_DATA */ + 0x0c00c007, /* DENALI_PHY_153_DATA */ + 0x00000100, /* DENALI_PHY_154_DATA */ + 0x00000000, /* DENALI_PHY_155_DATA */ + 0xfd02fe01, /* DENALI_PHY_156_DATA */ + 0xf708fb04, /* DENALI_PHY_157_DATA */ + 0xdf20ef10, /* DENALI_PHY_158_DATA */ + 0x7f80bf40, /* DENALI_PHY_159_DATA */ + 0x0000aaaa, /* DENALI_PHY_160_DATA */ + 0x00000000, /* DENALI_PHY_161_DATA */ + 0x00000000, /* DENALI_PHY_162_DATA */ + 0x00000000, /* DENALI_PHY_163_DATA */ + 0x00000000, /* DENALI_PHY_164_DATA */ + 0x00000000, /* DENALI_PHY_165_DATA */ + 0x00000000, /* DENALI_PHY_166_DATA */ + 0x00000000, /* DENALI_PHY_167_DATA */ + 0x00000000, /* DENALI_PHY_168_DATA */ + 0x00000000, /* DENALI_PHY_169_DATA */ + 0x00000000, /* DENALI_PHY_170_DATA */ + 0x00000000, /* DENALI_PHY_171_DATA */ + 0x00000000, /* DENALI_PHY_172_DATA */ + 0x00000000, /* DENALI_PHY_173_DATA */ + 0x00000000, /* DENALI_PHY_174_DATA */ + 0x00000000, /* DENALI_PHY_175_DATA */ + 0x00000000, /* DENALI_PHY_176_DATA */ + 0x00000000, /* DENALI_PHY_177_DATA */ + 0x00000000, /* DENALI_PHY_178_DATA */ + 0x00000000, /* DENALI_PHY_179_DATA */ + 0x00200000, /* DENALI_PHY_180_DATA */ + 0x00000000, /* DENALI_PHY_181_DATA */ + 0x00000000, /* DENALI_PHY_182_DATA */ + 0x00000000, /* DENALI_PHY_183_DATA */ + 0x00000000, /* DENALI_PHY_184_DATA */ + 0x00000000, /* DENALI_PHY_185_DATA */ + 0x00000000, /* DENALI_PHY_186_DATA */ + 0x02800280, /* DENALI_PHY_187_DATA */ + 0x02800280, /* DENALI_PHY_188_DATA */ + 0x02800280, /* DENALI_PHY_189_DATA */ + 0x02800280, /* DENALI_PHY_190_DATA */ + 0x00000280, /* DENALI_PHY_191_DATA */ + 0x00000000, /* DENALI_PHY_192_DATA */ + 0x00000000, /* DENALI_PHY_193_DATA */ + 0x00000000, /* DENALI_PHY_194_DATA */ + 0x00000000, /* DENALI_PHY_195_DATA */ + 0x00800000, /* DENALI_PHY_196_DATA */ + 0x00800080, /* DENALI_PHY_197_DATA */ + 0x00800080, /* DENALI_PHY_198_DATA */ + 0x00800080, /* DENALI_PHY_199_DATA */ + 0x00800080, /* DENALI_PHY_200_DATA */ + 0x00800080, /* DENALI_PHY_201_DATA */ + 0x00800080, /* DENALI_PHY_202_DATA */ + 0x00800080, /* DENALI_PHY_203_DATA */ + 0x00800080, /* DENALI_PHY_204_DATA */ + 0x01190080, /* DENALI_PHY_205_DATA */ + 0x00000001, /* DENALI_PHY_206_DATA */ + 0x00000000, /* DENALI_PHY_207_DATA */ + 0x00000000, /* DENALI_PHY_208_DATA */ + 0x00000200, /* DENALI_PHY_209_DATA */ + 0x00000000, /* DENALI_PHY_210_DATA */ + 0x51315152, /* DENALI_PHY_211_DATA */ + 0xc0003150, /* DENALI_PHY_212_DATA */ + 0x010000c0, /* DENALI_PHY_213_DATA */ + 0x00100000, /* DENALI_PHY_214_DATA */ + 0x07044204, /* DENALI_PHY_215_DATA */ + 0x000f0c18, /* DENALI_PHY_216_DATA */ + 0x01000140, /* DENALI_PHY_217_DATA */ + 0x00000c10, /* DENALI_PHY_218_DATA */ + 0x00000000, /* DENALI_PHY_219_DATA */ + 0x00000000, /* DENALI_PHY_220_DATA */ + 0x00000000, /* DENALI_PHY_221_DATA */ + 0x00000000, /* DENALI_PHY_222_DATA */ + 0x00000000, /* DENALI_PHY_223_DATA */ + 0x00000000, /* DENALI_PHY_224_DATA */ + 0x00000000, /* DENALI_PHY_225_DATA */ + 0x00000000, /* DENALI_PHY_226_DATA */ + 0x00000000, /* DENALI_PHY_227_DATA */ + 0x00000000, /* DENALI_PHY_228_DATA */ + 0x00000000, /* DENALI_PHY_229_DATA */ + 0x00000000, /* DENALI_PHY_230_DATA */ + 0x00000000, /* DENALI_PHY_231_DATA */ + 0x00000000, /* DENALI_PHY_232_DATA */ + 0x00000000, /* DENALI_PHY_233_DATA */ + 0x00000000, /* DENALI_PHY_234_DATA */ + 0x00000000, /* DENALI_PHY_235_DATA */ + 0x00000000, /* DENALI_PHY_236_DATA */ + 0x00000000, /* DENALI_PHY_237_DATA */ + 0x00000000, /* DENALI_PHY_238_DATA */ + 0x00000000, /* DENALI_PHY_239_DATA */ + 0x00000000, /* DENALI_PHY_240_DATA */ + 0x00000000, /* DENALI_PHY_241_DATA */ + 0x00000000, /* DENALI_PHY_242_DATA */ + 0x00000000, /* DENALI_PHY_243_DATA */ + 0x00000000, /* DENALI_PHY_244_DATA */ + 0x00000000, /* DENALI_PHY_245_DATA */ + 0x00000000, /* DENALI_PHY_246_DATA */ + 0x00000000, /* DENALI_PHY_247_DATA */ + 0x00000000, /* DENALI_PHY_248_DATA */ + 0x00000000, /* DENALI_PHY_249_DATA */ + 0x00000000, /* DENALI_PHY_250_DATA */ + 0x00000000, /* DENALI_PHY_251_DATA */ + 0x00000000, /* DENALI_PHY_252_DATA */ + 0x00000000, /* DENALI_PHY_253_DATA */ + 0x00000000, /* DENALI_PHY_254_DATA */ + 0x00000000, /* DENALI_PHY_255_DATA */ + 0x76543210, /* DENALI_PHY_256_DATA */ + 0x0004f008, /* DENALI_PHY_257_DATA */ + 0x00020119, /* DENALI_PHY_258_DATA */ + 0x00000000, /* DENALI_PHY_259_DATA */ + 0x00000000, /* DENALI_PHY_260_DATA */ + 0x00010000, /* DENALI_PHY_261_DATA */ + 0x01665555, /* DENALI_PHY_262_DATA */ + 0x03665555, /* DENALI_PHY_263_DATA */ + 0x00010f00, /* DENALI_PHY_264_DATA */ + 0x04000100, /* DENALI_PHY_265_DATA */ + 0x00000001, /* DENALI_PHY_266_DATA */ + 0x00170180, /* DENALI_PHY_267_DATA */ + 0x00cc0201, /* DENALI_PHY_268_DATA */ + 0x00030066, /* DENALI_PHY_269_DATA */ + 0x00000000, /* DENALI_PHY_270_DATA */ + 0x00000000, /* DENALI_PHY_271_DATA */ + 0x00000000, /* DENALI_PHY_272_DATA */ + 0x00000000, /* DENALI_PHY_273_DATA */ + 0x00000000, /* DENALI_PHY_274_DATA */ + 0x00000000, /* DENALI_PHY_275_DATA */ + 0x00000000, /* DENALI_PHY_276_DATA */ + 0x00000000, /* DENALI_PHY_277_DATA */ + 0x04080000, /* DENALI_PHY_278_DATA */ + 0x04080400, /* DENALI_PHY_279_DATA */ + 0x30000000, /* DENALI_PHY_280_DATA */ + 0x0c00c007, /* DENALI_PHY_281_DATA */ + 0x00000100, /* DENALI_PHY_282_DATA */ + 0x00000000, /* DENALI_PHY_283_DATA */ + 0xfd02fe01, /* DENALI_PHY_284_DATA */ + 0xf708fb04, /* DENALI_PHY_285_DATA */ + 0xdf20ef10, /* DENALI_PHY_286_DATA */ + 0x7f80bf40, /* DENALI_PHY_287_DATA */ + 0x0001aaaa, /* DENALI_PHY_288_DATA */ + 0x00000000, /* DENALI_PHY_289_DATA */ + 0x00000000, /* DENALI_PHY_290_DATA */ + 0x00000000, /* DENALI_PHY_291_DATA */ + 0x00000000, /* DENALI_PHY_292_DATA */ + 0x00000000, /* DENALI_PHY_293_DATA */ + 0x00000000, /* DENALI_PHY_294_DATA */ + 0x00000000, /* DENALI_PHY_295_DATA */ + 0x00000000, /* DENALI_PHY_296_DATA */ + 0x00000000, /* DENALI_PHY_297_DATA */ + 0x00000000, /* DENALI_PHY_298_DATA */ + 0x00000000, /* DENALI_PHY_299_DATA */ + 0x00000000, /* DENALI_PHY_300_DATA */ + 0x00000000, /* DENALI_PHY_301_DATA */ + 0x00000000, /* DENALI_PHY_302_DATA */ + 0x00000000, /* DENALI_PHY_303_DATA */ + 0x00000000, /* DENALI_PHY_304_DATA */ + 0x00000000, /* DENALI_PHY_305_DATA */ + 0x00000000, /* DENALI_PHY_306_DATA */ + 0x00000000, /* DENALI_PHY_307_DATA */ + 0x00200000, /* DENALI_PHY_308_DATA */ + 0x00000000, /* DENALI_PHY_309_DATA */ + 0x00000000, /* DENALI_PHY_310_DATA */ + 0x00000000, /* DENALI_PHY_311_DATA */ + 0x00000000, /* DENALI_PHY_312_DATA */ + 0x00000000, /* DENALI_PHY_313_DATA */ + 0x00000000, /* DENALI_PHY_314_DATA */ + 0x02800280, /* DENALI_PHY_315_DATA */ + 0x02800280, /* DENALI_PHY_316_DATA */ + 0x02800280, /* DENALI_PHY_317_DATA */ + 0x02800280, /* DENALI_PHY_318_DATA */ + 0x00000280, /* DENALI_PHY_319_DATA */ + 0x00000000, /* DENALI_PHY_320_DATA */ + 0x00000000, /* DENALI_PHY_321_DATA */ + 0x00000000, /* DENALI_PHY_322_DATA */ + 0x00000000, /* DENALI_PHY_323_DATA */ + 0x00800000, /* DENALI_PHY_324_DATA */ + 0x00800080, /* DENALI_PHY_325_DATA */ + 0x00800080, /* DENALI_PHY_326_DATA */ + 0x00800080, /* DENALI_PHY_327_DATA */ + 0x00800080, /* DENALI_PHY_328_DATA */ + 0x00800080, /* DENALI_PHY_329_DATA */ + 0x00800080, /* DENALI_PHY_330_DATA */ + 0x00800080, /* DENALI_PHY_331_DATA */ + 0x00800080, /* DENALI_PHY_332_DATA */ + 0x01190080, /* DENALI_PHY_333_DATA */ + 0x00000001, /* DENALI_PHY_334_DATA */ + 0x00000000, /* DENALI_PHY_335_DATA */ + 0x00000000, /* DENALI_PHY_336_DATA */ + 0x00000200, /* DENALI_PHY_337_DATA */ + 0x00000000, /* DENALI_PHY_338_DATA */ + 0x51315152, /* DENALI_PHY_339_DATA */ + 0xc0003150, /* DENALI_PHY_340_DATA */ + 0x010000c0, /* DENALI_PHY_341_DATA */ + 0x00100000, /* DENALI_PHY_342_DATA */ + 0x07044204, /* DENALI_PHY_343_DATA */ + 0x000f0c18, /* DENALI_PHY_344_DATA */ + 0x01000140, /* DENALI_PHY_345_DATA */ + 0x00000c10, /* DENALI_PHY_346_DATA */ + 0x00000000, /* DENALI_PHY_347_DATA */ + 0x00000000, /* DENALI_PHY_348_DATA */ + 0x00000000, /* DENALI_PHY_349_DATA */ + 0x00000000, /* DENALI_PHY_350_DATA */ + 0x00000000, /* DENALI_PHY_351_DATA */ + 0x00000000, /* DENALI_PHY_352_DATA */ + 0x00000000, /* DENALI_PHY_353_DATA */ + 0x00000000, /* DENALI_PHY_354_DATA */ + 0x00000000, /* DENALI_PHY_355_DATA */ + 0x00000000, /* DENALI_PHY_356_DATA */ + 0x00000000, /* DENALI_PHY_357_DATA */ + 0x00000000, /* DENALI_PHY_358_DATA */ + 0x00000000, /* DENALI_PHY_359_DATA */ + 0x00000000, /* DENALI_PHY_360_DATA */ + 0x00000000, /* DENALI_PHY_361_DATA */ + 0x00000000, /* DENALI_PHY_362_DATA */ + 0x00000000, /* DENALI_PHY_363_DATA */ + 0x00000000, /* DENALI_PHY_364_DATA */ + 0x00000000, /* DENALI_PHY_365_DATA */ + 0x00000000, /* DENALI_PHY_366_DATA */ + 0x00000000, /* DENALI_PHY_367_DATA */ + 0x00000000, /* DENALI_PHY_368_DATA */ + 0x00000000, /* DENALI_PHY_369_DATA */ + 0x00000000, /* DENALI_PHY_370_DATA */ + 0x00000000, /* DENALI_PHY_371_DATA */ + 0x00000000, /* DENALI_PHY_372_DATA */ + 0x00000000, /* DENALI_PHY_373_DATA */ + 0x00000000, /* DENALI_PHY_374_DATA */ + 0x00000000, /* DENALI_PHY_375_DATA */ + 0x00000000, /* DENALI_PHY_376_DATA */ + 0x00000000, /* DENALI_PHY_377_DATA */ + 0x00000000, /* DENALI_PHY_378_DATA */ + 0x00000000, /* DENALI_PHY_379_DATA */ + 0x00000000, /* DENALI_PHY_380_DATA */ + 0x00000000, /* DENALI_PHY_381_DATA */ + 0x00000000, /* DENALI_PHY_382_DATA */ + 0x00000000, /* DENALI_PHY_383_DATA */ + 0x76543210, /* DENALI_PHY_384_DATA */ + 0x0004f008, /* DENALI_PHY_385_DATA */ + 0x00020119, /* DENALI_PHY_386_DATA */ + 0x00000000, /* DENALI_PHY_387_DATA */ + 0x00000000, /* DENALI_PHY_388_DATA */ + 0x00010000, /* DENALI_PHY_389_DATA */ + 0x01665555, /* DENALI_PHY_390_DATA */ + 0x03665555, /* DENALI_PHY_391_DATA */ + 0x00010f00, /* DENALI_PHY_392_DATA */ + 0x04000100, /* DENALI_PHY_393_DATA */ + 0x00000001, /* DENALI_PHY_394_DATA */ + 0x00170180, /* DENALI_PHY_395_DATA */ + 0x00cc0201, /* DENALI_PHY_396_DATA */ + 0x00030066, /* DENALI_PHY_397_DATA */ + 0x00000000, /* DENALI_PHY_398_DATA */ + 0x00000000, /* DENALI_PHY_399_DATA */ + 0x00000000, /* DENALI_PHY_400_DATA */ + 0x00000000, /* DENALI_PHY_401_DATA */ + 0x00000000, /* DENALI_PHY_402_DATA */ + 0x00000000, /* DENALI_PHY_403_DATA */ + 0x00000000, /* DENALI_PHY_404_DATA */ + 0x00000000, /* DENALI_PHY_405_DATA */ + 0x04080000, /* DENALI_PHY_406_DATA */ + 0x04080400, /* DENALI_PHY_407_DATA */ + 0x30000000, /* DENALI_PHY_408_DATA */ + 0x0c00c007, /* DENALI_PHY_409_DATA */ + 0x00000100, /* DENALI_PHY_410_DATA */ + 0x00000000, /* DENALI_PHY_411_DATA */ + 0xfd02fe01, /* DENALI_PHY_412_DATA */ + 0xf708fb04, /* DENALI_PHY_413_DATA */ + 0xdf20ef10, /* DENALI_PHY_414_DATA */ + 0x7f80bf40, /* DENALI_PHY_415_DATA */ + 0x0000aaaa, /* DENALI_PHY_416_DATA */ + 0x00000000, /* DENALI_PHY_417_DATA */ + 0x00000000, /* DENALI_PHY_418_DATA */ + 0x00000000, /* DENALI_PHY_419_DATA */ + 0x00000000, /* DENALI_PHY_420_DATA */ + 0x00000000, /* DENALI_PHY_421_DATA */ + 0x00000000, /* DENALI_PHY_422_DATA */ + 0x00000000, /* DENALI_PHY_423_DATA */ + 0x00000000, /* DENALI_PHY_424_DATA */ + 0x00000000, /* DENALI_PHY_425_DATA */ + 0x00000000, /* DENALI_PHY_426_DATA */ + 0x00000000, /* DENALI_PHY_427_DATA */ + 0x00000000, /* DENALI_PHY_428_DATA */ + 0x00000000, /* DENALI_PHY_429_DATA */ + 0x00000000, /* DENALI_PHY_430_DATA */ + 0x00000000, /* DENALI_PHY_431_DATA */ + 0x00000000, /* DENALI_PHY_432_DATA */ + 0x00000000, /* DENALI_PHY_433_DATA */ + 0x00000000, /* DENALI_PHY_434_DATA */ + 0x00000000, /* DENALI_PHY_435_DATA */ + 0x00200000, /* DENALI_PHY_436_DATA */ + 0x00000000, /* DENALI_PHY_437_DATA */ + 0x00000000, /* DENALI_PHY_438_DATA */ + 0x00000000, /* DENALI_PHY_439_DATA */ + 0x00000000, /* DENALI_PHY_440_DATA */ + 0x00000000, /* DENALI_PHY_441_DATA */ + 0x00000000, /* DENALI_PHY_442_DATA */ + 0x02800280, /* DENALI_PHY_443_DATA */ + 0x02800280, /* DENALI_PHY_444_DATA */ + 0x02800280, /* DENALI_PHY_445_DATA */ + 0x02800280, /* DENALI_PHY_446_DATA */ + 0x00000280, /* DENALI_PHY_447_DATA */ + 0x00000000, /* DENALI_PHY_448_DATA */ + 0x00000000, /* DENALI_PHY_449_DATA */ + 0x00000000, /* DENALI_PHY_450_DATA */ + 0x00000000, /* DENALI_PHY_451_DATA */ + 0x00800000, /* DENALI_PHY_452_DATA */ + 0x00800080, /* DENALI_PHY_453_DATA */ + 0x00800080, /* DENALI_PHY_454_DATA */ + 0x00800080, /* DENALI_PHY_455_DATA */ + 0x00800080, /* DENALI_PHY_456_DATA */ + 0x00800080, /* DENALI_PHY_457_DATA */ + 0x00800080, /* DENALI_PHY_458_DATA */ + 0x00800080, /* DENALI_PHY_459_DATA */ + 0x00800080, /* DENALI_PHY_460_DATA */ + 0x01190080, /* DENALI_PHY_461_DATA */ + 0x00000001, /* DENALI_PHY_462_DATA */ + 0x00000000, /* DENALI_PHY_463_DATA */ + 0x00000000, /* DENALI_PHY_464_DATA */ + 0x00000200, /* DENALI_PHY_465_DATA */ + 0x00000000, /* DENALI_PHY_466_DATA */ + 0x51315152, /* DENALI_PHY_467_DATA */ + 0xc0003150, /* DENALI_PHY_468_DATA */ + 0x010000c0, /* DENALI_PHY_469_DATA */ + 0x00100000, /* DENALI_PHY_470_DATA */ + 0x07044204, /* DENALI_PHY_471_DATA */ + 0x000f0c18, /* DENALI_PHY_472_DATA */ + 0x01000140, /* DENALI_PHY_473_DATA */ + 0x00000c10, /* DENALI_PHY_474_DATA */ + 0x00000000, /* DENALI_PHY_475_DATA */ + 0x00000000, /* DENALI_PHY_476_DATA */ + 0x00000000, /* DENALI_PHY_477_DATA */ + 0x00000000, /* DENALI_PHY_478_DATA */ + 0x00000000, /* DENALI_PHY_479_DATA */ + 0x00000000, /* DENALI_PHY_480_DATA */ + 0x00000000, /* DENALI_PHY_481_DATA */ + 0x00000000, /* DENALI_PHY_482_DATA */ + 0x00000000, /* DENALI_PHY_483_DATA */ + 0x00000000, /* DENALI_PHY_484_DATA */ + 0x00000000, /* DENALI_PHY_485_DATA */ + 0x00000000, /* DENALI_PHY_486_DATA */ + 0x00000000, /* DENALI_PHY_487_DATA */ + 0x00000000, /* DENALI_PHY_488_DATA */ + 0x00000000, /* DENALI_PHY_489_DATA */ + 0x00000000, /* DENALI_PHY_490_DATA */ + 0x00000000, /* DENALI_PHY_491_DATA */ + 0x00000000, /* DENALI_PHY_492_DATA */ + 0x00000000, /* DENALI_PHY_493_DATA */ + 0x00000000, /* DENALI_PHY_494_DATA */ + 0x00000000, /* DENALI_PHY_495_DATA */ + 0x00000000, /* DENALI_PHY_496_DATA */ + 0x00000000, /* DENALI_PHY_497_DATA */ + 0x00000000, /* DENALI_PHY_498_DATA */ + 0x00000000, /* DENALI_PHY_499_DATA */ + 0x00000000, /* DENALI_PHY_500_DATA */ + 0x00000000, /* DENALI_PHY_501_DATA */ + 0x00000000, /* DENALI_PHY_502_DATA */ + 0x00000000, /* DENALI_PHY_503_DATA */ + 0x00000000, /* DENALI_PHY_504_DATA */ + 0x00000000, /* DENALI_PHY_505_DATA */ + 0x00000000, /* DENALI_PHY_506_DATA */ + 0x00000000, /* DENALI_PHY_507_DATA */ + 0x00000000, /* DENALI_PHY_508_DATA */ + 0x00000000, /* DENALI_PHY_509_DATA */ + 0x00000000, /* DENALI_PHY_510_DATA */ + 0x00000000, /* DENALI_PHY_511_DATA */ + 0x00000000, /* DENALI_PHY_512_DATA */ + 0x00000000, /* DENALI_PHY_513_DATA */ + 0x00000000, /* DENALI_PHY_514_DATA */ + 0x00000000, /* DENALI_PHY_515_DATA */ + 0x00000000, /* DENALI_PHY_516_DATA */ + 0x00000000, /* DENALI_PHY_517_DATA */ + 0x00000000, /* DENALI_PHY_518_DATA */ + 0x00000002, /* DENALI_PHY_519_DATA */ + 0x00000000, /* DENALI_PHY_520_DATA */ + 0x00000000, /* DENALI_PHY_521_DATA */ + 0x00000000, /* DENALI_PHY_522_DATA */ + 0x00400320, /* DENALI_PHY_523_DATA */ + 0x00000040, /* DENALI_PHY_524_DATA */ + 0x00dcba98, /* DENALI_PHY_525_DATA */ + 0x00000000, /* DENALI_PHY_526_DATA */ + 0x00dcba98, /* DENALI_PHY_527_DATA */ + 0x01000000, /* DENALI_PHY_528_DATA */ + 0x00020003, /* DENALI_PHY_529_DATA */ + 0x00000000, /* DENALI_PHY_530_DATA */ + 0x00000000, /* DENALI_PHY_531_DATA */ + 0x00000000, /* DENALI_PHY_532_DATA */ + 0x0000002a, /* DENALI_PHY_533_DATA */ + 0x00000015, /* DENALI_PHY_534_DATA */ + 0x00000015, /* DENALI_PHY_535_DATA */ + 0x0000002a, /* DENALI_PHY_536_DATA */ + 0x00000033, /* DENALI_PHY_537_DATA */ + 0x0000000c, /* DENALI_PHY_538_DATA */ + 0x0000000c, /* DENALI_PHY_539_DATA */ + 0x00000033, /* DENALI_PHY_540_DATA */ + 0x0a418820, /* DENALI_PHY_541_DATA */ + 0x003f0000, /* DENALI_PHY_542_DATA */ + 0x0000003f, /* DENALI_PHY_543_DATA */ + 0x00030055, /* DENALI_PHY_544_DATA */ + 0x03000300, /* DENALI_PHY_545_DATA */ + 0x03000300, /* DENALI_PHY_546_DATA */ + 0x00000300, /* DENALI_PHY_547_DATA */ + 0x42080010, /* DENALI_PHY_548_DATA */ + 0x00000003, /* DENALI_PHY_549_DATA */ + 0x00000000, /* DENALI_PHY_550_DATA */ + 0x00000000, /* DENALI_PHY_551_DATA */ + 0x00000000, /* DENALI_PHY_552_DATA */ + 0x00000000, /* DENALI_PHY_553_DATA */ + 0x00000000, /* DENALI_PHY_554_DATA */ + 0x00000000, /* DENALI_PHY_555_DATA */ + 0x00000000, /* DENALI_PHY_556_DATA */ + 0x00000000, /* DENALI_PHY_557_DATA */ + 0x00000000, /* DENALI_PHY_558_DATA */ + 0x00000000, /* DENALI_PHY_559_DATA */ + 0x00000000, /* DENALI_PHY_560_DATA */ + 0x00000000, /* DENALI_PHY_561_DATA */ + 0x00000000, /* DENALI_PHY_562_DATA */ + 0x00000000, /* DENALI_PHY_563_DATA */ + 0x00000000, /* DENALI_PHY_564_DATA */ + 0x00000000, /* DENALI_PHY_565_DATA */ + 0x00000000, /* DENALI_PHY_566_DATA */ + 0x00000000, /* DENALI_PHY_567_DATA */ + 0x00000000, /* DENALI_PHY_568_DATA */ + 0x00000000, /* DENALI_PHY_569_DATA */ + 0x00000000, /* DENALI_PHY_570_DATA */ + 0x00000000, /* DENALI_PHY_571_DATA */ + 0x00000000, /* DENALI_PHY_572_DATA */ + 0x00000000, /* DENALI_PHY_573_DATA */ + 0x00000000, /* DENALI_PHY_574_DATA */ + 0x00000000, /* DENALI_PHY_575_DATA */ + 0x00000000, /* DENALI_PHY_576_DATA */ + 0x00000000, /* DENALI_PHY_577_DATA */ + 0x00000000, /* DENALI_PHY_578_DATA */ + 0x00000000, /* DENALI_PHY_579_DATA */ + 0x00000000, /* DENALI_PHY_580_DATA */ + 0x00000000, /* DENALI_PHY_581_DATA */ + 0x00000000, /* DENALI_PHY_582_DATA */ + 0x00000000, /* DENALI_PHY_583_DATA */ + 0x00000000, /* DENALI_PHY_584_DATA */ + 0x00000000, /* DENALI_PHY_585_DATA */ + 0x00000000, /* DENALI_PHY_586_DATA */ + 0x00000000, /* DENALI_PHY_587_DATA */ + 0x00000000, /* DENALI_PHY_588_DATA */ + 0x00000000, /* DENALI_PHY_589_DATA */ + 0x00000000, /* DENALI_PHY_590_DATA */ + 0x00000000, /* DENALI_PHY_591_DATA */ + 0x00000000, /* DENALI_PHY_592_DATA */ + 0x00000000, /* DENALI_PHY_593_DATA */ + 0x00000000, /* DENALI_PHY_594_DATA */ + 0x00000000, /* DENALI_PHY_595_DATA */ + 0x00000000, /* DENALI_PHY_596_DATA */ + 0x00000000, /* DENALI_PHY_597_DATA */ + 0x00000000, /* DENALI_PHY_598_DATA */ + 0x00000000, /* DENALI_PHY_599_DATA */ + 0x00000000, /* DENALI_PHY_600_DATA */ + 0x00000000, /* DENALI_PHY_601_DATA */ + 0x00000000, /* DENALI_PHY_602_DATA */ + 0x00000000, /* DENALI_PHY_603_DATA */ + 0x00000000, /* DENALI_PHY_604_DATA */ + 0x00000000, /* DENALI_PHY_605_DATA */ + 0x00000000, /* DENALI_PHY_606_DATA */ + 0x00000000, /* DENALI_PHY_607_DATA */ + 0x00000000, /* DENALI_PHY_608_DATA */ + 0x00000000, /* DENALI_PHY_609_DATA */ + 0x00000000, /* DENALI_PHY_610_DATA */ + 0x00000000, /* DENALI_PHY_611_DATA */ + 0x00000000, /* DENALI_PHY_612_DATA */ + 0x00000000, /* DENALI_PHY_613_DATA */ + 0x00000000, /* DENALI_PHY_614_DATA */ + 0x00000000, /* DENALI_PHY_615_DATA */ + 0x00000000, /* DENALI_PHY_616_DATA */ + 0x00000000, /* DENALI_PHY_617_DATA */ + 0x00000000, /* DENALI_PHY_618_DATA */ + 0x00000000, /* DENALI_PHY_619_DATA */ + 0x00000000, /* DENALI_PHY_620_DATA */ + 0x00000000, /* DENALI_PHY_621_DATA */ + 0x00000000, /* DENALI_PHY_622_DATA */ + 0x00000000, /* DENALI_PHY_623_DATA */ + 0x00000000, /* DENALI_PHY_624_DATA */ + 0x00000000, /* DENALI_PHY_625_DATA */ + 0x00000000, /* DENALI_PHY_626_DATA */ + 0x00000000, /* DENALI_PHY_627_DATA */ + 0x00000000, /* DENALI_PHY_628_DATA */ + 0x00000000, /* DENALI_PHY_629_DATA */ + 0x00000000, /* DENALI_PHY_630_DATA */ + 0x00000000, /* DENALI_PHY_631_DATA */ + 0x00000000, /* DENALI_PHY_632_DATA */ + 0x00000000, /* DENALI_PHY_633_DATA */ + 0x00000000, /* DENALI_PHY_634_DATA */ + 0x00000000, /* DENALI_PHY_635_DATA */ + 0x00000000, /* DENALI_PHY_636_DATA */ + 0x00000000, /* DENALI_PHY_637_DATA */ + 0x00000000, /* DENALI_PHY_638_DATA */ + 0x00000000, /* DENALI_PHY_639_DATA */ + 0x00000000, /* DENALI_PHY_640_DATA */ + 0x00000000, /* DENALI_PHY_641_DATA */ + 0x00000000, /* DENALI_PHY_642_DATA */ + 0x00000000, /* DENALI_PHY_643_DATA */ + 0x00000000, /* DENALI_PHY_644_DATA */ + 0x00000000, /* DENALI_PHY_645_DATA */ + 0x00000000, /* DENALI_PHY_646_DATA */ + 0x00000002, /* DENALI_PHY_647_DATA */ + 0x00000000, /* DENALI_PHY_648_DATA */ + 0x00000000, /* DENALI_PHY_649_DATA */ + 0x00000000, /* DENALI_PHY_650_DATA */ + 0x00400320, /* DENALI_PHY_651_DATA */ + 0x00000040, /* DENALI_PHY_652_DATA */ + 0x00000000, /* DENALI_PHY_653_DATA */ + 0x00000000, /* DENALI_PHY_654_DATA */ + 0x00000000, /* DENALI_PHY_655_DATA */ + 0x01000000, /* DENALI_PHY_656_DATA */ + 0x00020003, /* DENALI_PHY_657_DATA */ + 0x00000000, /* DENALI_PHY_658_DATA */ + 0x00000000, /* DENALI_PHY_659_DATA */ + 0x00000000, /* DENALI_PHY_660_DATA */ + 0x0000002a, /* DENALI_PHY_661_DATA */ + 0x00000015, /* DENALI_PHY_662_DATA */ + 0x00000015, /* DENALI_PHY_663_DATA */ + 0x0000002a, /* DENALI_PHY_664_DATA */ + 0x00000033, /* DENALI_PHY_665_DATA */ + 0x0000000c, /* DENALI_PHY_666_DATA */ + 0x0000000c, /* DENALI_PHY_667_DATA */ + 0x00000033, /* DENALI_PHY_668_DATA */ + 0x00000000, /* DENALI_PHY_669_DATA */ + 0x00000000, /* DENALI_PHY_670_DATA */ + 0x00000000, /* DENALI_PHY_671_DATA */ + 0x00030055, /* DENALI_PHY_672_DATA */ + 0x03000300, /* DENALI_PHY_673_DATA */ + 0x03000300, /* DENALI_PHY_674_DATA */ + 0x00000300, /* DENALI_PHY_675_DATA */ + 0x42080010, /* DENALI_PHY_676_DATA */ + 0x00000003, /* DENALI_PHY_677_DATA */ + 0x00000000, /* DENALI_PHY_678_DATA */ + 0x00000000, /* DENALI_PHY_679_DATA */ + 0x00000000, /* DENALI_PHY_680_DATA */ + 0x00000000, /* DENALI_PHY_681_DATA */ + 0x00000000, /* DENALI_PHY_682_DATA */ + 0x00000000, /* DENALI_PHY_683_DATA */ + 0x00000000, /* DENALI_PHY_684_DATA */ + 0x00000000, /* DENALI_PHY_685_DATA */ + 0x00000000, /* DENALI_PHY_686_DATA */ + 0x00000000, /* DENALI_PHY_687_DATA */ + 0x00000000, /* DENALI_PHY_688_DATA */ + 0x00000000, /* DENALI_PHY_689_DATA */ + 0x00000000, /* DENALI_PHY_690_DATA */ + 0x00000000, /* DENALI_PHY_691_DATA */ + 0x00000000, /* DENALI_PHY_692_DATA */ + 0x00000000, /* DENALI_PHY_693_DATA */ + 0x00000000, /* DENALI_PHY_694_DATA */ + 0x00000000, /* DENALI_PHY_695_DATA */ + 0x00000000, /* DENALI_PHY_696_DATA */ + 0x00000000, /* DENALI_PHY_697_DATA */ + 0x00000000, /* DENALI_PHY_698_DATA */ + 0x00000000, /* DENALI_PHY_699_DATA */ + 0x00000000, /* DENALI_PHY_700_DATA */ + 0x00000000, /* DENALI_PHY_701_DATA */ + 0x00000000, /* DENALI_PHY_702_DATA */ + 0x00000000, /* DENALI_PHY_703_DATA */ + 0x00000000, /* DENALI_PHY_704_DATA */ + 0x00000000, /* DENALI_PHY_705_DATA */ + 0x00000000, /* DENALI_PHY_706_DATA */ + 0x00000000, /* DENALI_PHY_707_DATA */ + 0x00000000, /* DENALI_PHY_708_DATA */ + 0x00000000, /* DENALI_PHY_709_DATA */ + 0x00000000, /* DENALI_PHY_710_DATA */ + 0x00000000, /* DENALI_PHY_711_DATA */ + 0x00000000, /* DENALI_PHY_712_DATA */ + 0x00000000, /* DENALI_PHY_713_DATA */ + 0x00000000, /* DENALI_PHY_714_DATA */ + 0x00000000, /* DENALI_PHY_715_DATA */ + 0x00000000, /* DENALI_PHY_716_DATA */ + 0x00000000, /* DENALI_PHY_717_DATA */ + 0x00000000, /* DENALI_PHY_718_DATA */ + 0x00000000, /* DENALI_PHY_719_DATA */ + 0x00000000, /* DENALI_PHY_720_DATA */ + 0x00000000, /* DENALI_PHY_721_DATA */ + 0x00000000, /* DENALI_PHY_722_DATA */ + 0x00000000, /* DENALI_PHY_723_DATA */ + 0x00000000, /* DENALI_PHY_724_DATA */ + 0x00000000, /* DENALI_PHY_725_DATA */ + 0x00000000, /* DENALI_PHY_726_DATA */ + 0x00000000, /* DENALI_PHY_727_DATA */ + 0x00000000, /* DENALI_PHY_728_DATA */ + 0x00000000, /* DENALI_PHY_729_DATA */ + 0x00000000, /* DENALI_PHY_730_DATA */ + 0x00000000, /* DENALI_PHY_731_DATA */ + 0x00000000, /* DENALI_PHY_732_DATA */ + 0x00000000, /* DENALI_PHY_733_DATA */ + 0x00000000, /* DENALI_PHY_734_DATA */ + 0x00000000, /* DENALI_PHY_735_DATA */ + 0x00000000, /* DENALI_PHY_736_DATA */ + 0x00000000, /* DENALI_PHY_737_DATA */ + 0x00000000, /* DENALI_PHY_738_DATA */ + 0x00000000, /* DENALI_PHY_739_DATA */ + 0x00000000, /* DENALI_PHY_740_DATA */ + 0x00000000, /* DENALI_PHY_741_DATA */ + 0x00000000, /* DENALI_PHY_742_DATA */ + 0x00000000, /* DENALI_PHY_743_DATA */ + 0x00000000, /* DENALI_PHY_744_DATA */ + 0x00000000, /* DENALI_PHY_745_DATA */ + 0x00000000, /* DENALI_PHY_746_DATA */ + 0x00000000, /* DENALI_PHY_747_DATA */ + 0x00000000, /* DENALI_PHY_748_DATA */ + 0x00000000, /* DENALI_PHY_749_DATA */ + 0x00000000, /* DENALI_PHY_750_DATA */ + 0x00000000, /* DENALI_PHY_751_DATA */ + 0x00000000, /* DENALI_PHY_752_DATA */ + 0x00000000, /* DENALI_PHY_753_DATA */ + 0x00000000, /* DENALI_PHY_754_DATA */ + 0x00000000, /* DENALI_PHY_755_DATA */ + 0x00000000, /* DENALI_PHY_756_DATA */ + 0x00000000, /* DENALI_PHY_757_DATA */ + 0x00000000, /* DENALI_PHY_758_DATA */ + 0x00000000, /* DENALI_PHY_759_DATA */ + 0x00000000, /* DENALI_PHY_760_DATA */ + 0x00000000, /* DENALI_PHY_761_DATA */ + 0x00000000, /* DENALI_PHY_762_DATA */ + 0x00000000, /* DENALI_PHY_763_DATA */ + 0x00000000, /* DENALI_PHY_764_DATA */ + 0x00000000, /* DENALI_PHY_765_DATA */ + 0x00000000, /* DENALI_PHY_766_DATA */ + 0x00000000, /* DENALI_PHY_767_DATA */ + 0x00000000, /* DENALI_PHY_768_DATA */ + 0x00000000, /* DENALI_PHY_769_DATA */ + 0x00000000, /* DENALI_PHY_770_DATA */ + 0x00000000, /* DENALI_PHY_771_DATA */ + 0x00000000, /* DENALI_PHY_772_DATA */ + 0x00000000, /* DENALI_PHY_773_DATA */ + 0x00000000, /* DENALI_PHY_774_DATA */ + 0x00000002, /* DENALI_PHY_775_DATA */ + 0x00000000, /* DENALI_PHY_776_DATA */ + 0x00000000, /* DENALI_PHY_777_DATA */ + 0x00000000, /* DENALI_PHY_778_DATA */ + 0x00400320, /* DENALI_PHY_779_DATA */ + 0x00000040, /* DENALI_PHY_780_DATA */ + 0x00000000, /* DENALI_PHY_781_DATA */ + 0x00000000, /* DENALI_PHY_782_DATA */ + 0x00000000, /* DENALI_PHY_783_DATA */ + 0x01000000, /* DENALI_PHY_784_DATA */ + 0x00020003, /* DENALI_PHY_785_DATA */ + 0x00000000, /* DENALI_PHY_786_DATA */ + 0x00000000, /* DENALI_PHY_787_DATA */ + 0x00000000, /* DENALI_PHY_788_DATA */ + 0x0000002a, /* DENALI_PHY_789_DATA */ + 0x00000015, /* DENALI_PHY_790_DATA */ + 0x00000015, /* DENALI_PHY_791_DATA */ + 0x0000002a, /* DENALI_PHY_792_DATA */ + 0x00000033, /* DENALI_PHY_793_DATA */ + 0x0000000c, /* DENALI_PHY_794_DATA */ + 0x0000000c, /* DENALI_PHY_795_DATA */ + 0x00000033, /* DENALI_PHY_796_DATA */ + 0x1ee6b16a, /* DENALI_PHY_797_DATA */ + 0x10000000, /* DENALI_PHY_798_DATA */ + 0x00000000, /* DENALI_PHY_799_DATA */ + 0x00030055, /* DENALI_PHY_800_DATA */ + 0x03000300, /* DENALI_PHY_801_DATA */ + 0x03000300, /* DENALI_PHY_802_DATA */ + 0x00000300, /* DENALI_PHY_803_DATA */ + 0x42080010, /* DENALI_PHY_804_DATA */ + 0x00000003, /* DENALI_PHY_805_DATA */ + 0x00000000, /* DENALI_PHY_806_DATA */ + 0x00000000, /* DENALI_PHY_807_DATA */ + 0x00000000, /* DENALI_PHY_808_DATA */ + 0x00000000, /* DENALI_PHY_809_DATA */ + 0x00000000, /* DENALI_PHY_810_DATA */ + 0x00000000, /* DENALI_PHY_811_DATA */ + 0x00000000, /* DENALI_PHY_812_DATA */ + 0x00000000, /* DENALI_PHY_813_DATA */ + 0x00000000, /* DENALI_PHY_814_DATA */ + 0x00000000, /* DENALI_PHY_815_DATA */ + 0x00000000, /* DENALI_PHY_816_DATA */ + 0x00000000, /* DENALI_PHY_817_DATA */ + 0x00000000, /* DENALI_PHY_818_DATA */ + 0x00000000, /* DENALI_PHY_819_DATA */ + 0x00000000, /* DENALI_PHY_820_DATA */ + 0x00000000, /* DENALI_PHY_821_DATA */ + 0x00000000, /* DENALI_PHY_822_DATA */ + 0x00000000, /* DENALI_PHY_823_DATA */ + 0x00000000, /* DENALI_PHY_824_DATA */ + 0x00000000, /* DENALI_PHY_825_DATA */ + 0x00000000, /* DENALI_PHY_826_DATA */ + 0x00000000, /* DENALI_PHY_827_DATA */ + 0x00000000, /* DENALI_PHY_828_DATA */ + 0x00000000, /* DENALI_PHY_829_DATA */ + 0x00000000, /* DENALI_PHY_830_DATA */ + 0x00000000, /* DENALI_PHY_831_DATA */ + 0x00000000, /* DENALI_PHY_832_DATA */ + 0x00000000, /* DENALI_PHY_833_DATA */ + 0x00000000, /* DENALI_PHY_834_DATA */ + 0x00000000, /* DENALI_PHY_835_DATA */ + 0x00000000, /* DENALI_PHY_836_DATA */ + 0x00000000, /* DENALI_PHY_837_DATA */ + 0x00000000, /* DENALI_PHY_838_DATA */ + 0x00000000, /* DENALI_PHY_839_DATA */ + 0x00000000, /* DENALI_PHY_840_DATA */ + 0x00000000, /* DENALI_PHY_841_DATA */ + 0x00000000, /* DENALI_PHY_842_DATA */ + 0x00000000, /* DENALI_PHY_843_DATA */ + 0x00000000, /* DENALI_PHY_844_DATA */ + 0x00000000, /* DENALI_PHY_845_DATA */ + 0x00000000, /* DENALI_PHY_846_DATA */ + 0x00000000, /* DENALI_PHY_847_DATA */ + 0x00000000, /* DENALI_PHY_848_DATA */ + 0x00000000, /* DENALI_PHY_849_DATA */ + 0x00000000, /* DENALI_PHY_850_DATA */ + 0x00000000, /* DENALI_PHY_851_DATA */ + 0x00000000, /* DENALI_PHY_852_DATA */ + 0x00000000, /* DENALI_PHY_853_DATA */ + 0x00000000, /* DENALI_PHY_854_DATA */ + 0x00000000, /* DENALI_PHY_855_DATA */ + 0x00000000, /* DENALI_PHY_856_DATA */ + 0x00000000, /* DENALI_PHY_857_DATA */ + 0x00000000, /* DENALI_PHY_858_DATA */ + 0x00000000, /* DENALI_PHY_859_DATA */ + 0x00000000, /* DENALI_PHY_860_DATA */ + 0x00000000, /* DENALI_PHY_861_DATA */ + 0x00000000, /* DENALI_PHY_862_DATA */ + 0x00000000, /* DENALI_PHY_863_DATA */ + 0x00000000, /* DENALI_PHY_864_DATA */ + 0x00000000, /* DENALI_PHY_865_DATA */ + 0x00000000, /* DENALI_PHY_866_DATA */ + 0x00000000, /* DENALI_PHY_867_DATA */ + 0x00000000, /* DENALI_PHY_868_DATA */ + 0x00000000, /* DENALI_PHY_869_DATA */ + 0x00000000, /* DENALI_PHY_870_DATA */ + 0x00000000, /* DENALI_PHY_871_DATA */ + 0x00000000, /* DENALI_PHY_872_DATA */ + 0x00000000, /* DENALI_PHY_873_DATA */ + 0x00000000, /* DENALI_PHY_874_DATA */ + 0x00000000, /* DENALI_PHY_875_DATA */ + 0x00000000, /* DENALI_PHY_876_DATA */ + 0x00000000, /* DENALI_PHY_877_DATA */ + 0x00000000, /* DENALI_PHY_878_DATA */ + 0x00000000, /* DENALI_PHY_879_DATA */ + 0x00000000, /* DENALI_PHY_880_DATA */ + 0x00000000, /* DENALI_PHY_881_DATA */ + 0x00000000, /* DENALI_PHY_882_DATA */ + 0x00000000, /* DENALI_PHY_883_DATA */ + 0x00000000, /* DENALI_PHY_884_DATA */ + 0x00000000, /* DENALI_PHY_885_DATA */ + 0x00000000, /* DENALI_PHY_886_DATA */ + 0x00000000, /* DENALI_PHY_887_DATA */ + 0x00000000, /* DENALI_PHY_888_DATA */ + 0x00000000, /* DENALI_PHY_889_DATA */ + 0x00000000, /* DENALI_PHY_890_DATA */ + 0x00000000, /* DENALI_PHY_891_DATA */ + 0x00000000, /* DENALI_PHY_892_DATA */ + 0x00000000, /* DENALI_PHY_893_DATA */ + 0x00000000, /* DENALI_PHY_894_DATA */ + 0x00000000, /* DENALI_PHY_895_DATA */ + 0x00000000, /* DENALI_PHY_896_DATA */ + 0x00000000, /* DENALI_PHY_897_DATA */ + 0x00000005, /* DENALI_PHY_898_DATA */ + 0x04000f01, /* DENALI_PHY_899_DATA */ + 0x00020040, /* DENALI_PHY_900_DATA */ + 0x00020055, /* DENALI_PHY_901_DATA */ + 0x00000000, /* DENALI_PHY_902_DATA */ + 0x00000000, /* DENALI_PHY_903_DATA */ + 0x00000000, /* DENALI_PHY_904_DATA */ + 0x00000050, /* DENALI_PHY_905_DATA */ + 0x00000000, /* DENALI_PHY_906_DATA */ + 0x01010100, /* DENALI_PHY_907_DATA */ + 0x00000600, /* DENALI_PHY_908_DATA */ + 0x00000000, /* DENALI_PHY_909_DATA */ + 0x00006400, /* DENALI_PHY_910_DATA */ + 0x03221302, /* DENALI_PHY_911_DATA */ + 0x00000000, /* DENALI_PHY_912_DATA */ + 0x000d1f01, /* DENALI_PHY_913_DATA */ + 0x0d1f0d1f, /* DENALI_PHY_914_DATA */ + 0x0d1f0d1f, /* DENALI_PHY_915_DATA */ + 0x00030003, /* DENALI_PHY_916_DATA */ + 0x03000300, /* DENALI_PHY_917_DATA */ + 0x00000300, /* DENALI_PHY_918_DATA */ + 0x03221302, /* DENALI_PHY_919_DATA */ + 0x00000000, /* DENALI_PHY_920_DATA */ + 0x00000000, /* DENALI_PHY_921_DATA */ + 0x01020000, /* DENALI_PHY_922_DATA */ + 0x00000001, /* DENALI_PHY_923_DATA */ + 0x00000411, /* DENALI_PHY_924_DATA */ + 0x00000411, /* DENALI_PHY_925_DATA */ + 0x00000040, /* DENALI_PHY_926_DATA */ + 0x00000040, /* DENALI_PHY_927_DATA */ + 0x00000411, /* DENALI_PHY_928_DATA */ + 0x00000411, /* DENALI_PHY_929_DATA */ + 0x00004410, /* DENALI_PHY_930_DATA */ + 0x00004410, /* DENALI_PHY_931_DATA */ + 0x00004410, /* DENALI_PHY_932_DATA */ + 0x00004410, /* DENALI_PHY_933_DATA */ + 0x00004410, /* DENALI_PHY_934_DATA */ + 0x00000411, /* DENALI_PHY_935_DATA */ + 0x00004410, /* DENALI_PHY_936_DATA */ + 0x00000411, /* DENALI_PHY_937_DATA */ + 0x00004410, /* DENALI_PHY_938_DATA */ + 0x00000411, /* DENALI_PHY_939_DATA */ + 0x00004410, /* DENALI_PHY_940_DATA */ + 0x00000000, /* DENALI_PHY_941_DATA */ + 0x00000000, /* DENALI_PHY_942_DATA */ + 0x00000000, /* DENALI_PHY_943_DATA */ + 0x64000000, /* DENALI_PHY_944_DATA */ + 0x00000000, /* DENALI_PHY_945_DATA */ + 0x00000000, /* DENALI_PHY_946_DATA */ + 0x00000408, /* DENALI_PHY_947_DATA */ + 0x00000000, /* DENALI_PHY_948_DATA */ + 0x00000000, /* DENALI_PHY_949_DATA */ + 0x00000000, /* DENALI_PHY_950_DATA */ + 0x00000000, /* DENALI_PHY_951_DATA */ + 0x00000000, /* DENALI_PHY_952_DATA */ + 0x00000000, /* DENALI_PHY_953_DATA */ + 0xe4000000, /* DENALI_PHY_954_DATA */ + 0x00000000, /* DENALI_PHY_955_DATA */ + 0x00000000, /* DENALI_PHY_956_DATA */ + 0x01010000, /* DENALI_PHY_957_DATA */ + 0x00000000 /* DENALI_PHY_958_DATA */ + } + }, +}, From patchwork Tue Jun 11 14:51:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 534 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AB0553F08A for ; Tue, 11 Jun 2019 16:57:21 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id 5sf9761382pff.11 for ; Tue, 11 Jun 2019 07:57:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265040; cv=pass; d=google.com; s=arc-20160816; b=XRDsFjsxidAjScyEujqOJt0I28SrgcFg1OYvl7rX0O5mwHEakklNlxCjqxf1teKsL6 6KavhyXYQ6U/oZ5MrgTknu1HmyoXctbKOR/f7LMN0/mcERlEebCMKUSGddquRar5dQyo a/h5v3MRz3wGmFImH/GastxFJyfOJ7WQHtIOxswXBv/RWA0Qwjgjqz2G0hGKr5Nmksjs J5+ycoSuhLBF4eftFWOnTzZVK2ns6g9IQcVy4936/aRBdo68OsTl85rwgVYzPMQXtsEO 9EDiaeRZChnKykdFI19MkufOZhtqWp3z3whCzcQyQK1pn5VDcF1py3F4qBAZBTFSA7ft pcBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=U6gA7eaZWt6simitv7OROSpe5yospPJ/T5iE/M7/yPI=; b=YDIdXjXPseAk3qjx8PYkiD77gvS3GvzA09g9Qsr61yUwbzyYipcVdM6vq5+P8R04dC RsEH7IzLPkBpuJfuCa1PGX9tZKiZ6N/0fiTtBQnfoO1TdRKr9PnZ5gexL8KNizwWGhx+ umJOM5s2wFgL8sAakx0jdx2xP3JzCoMxEGsId9O7Q3K33HgEEfk/Fp/cW1yFExMujbUz Srh0ULG3j1Wm/DzRQFN41jQ+GtDAdGVDs/boiv57UuLSEPH7sWGl2mifG+F1XsVZw+UK GUQGWguWTC88GkX3yCg15wBgnBA2heEmP/DiYRArED5DptMZMj4Qeo8FwX3eVSNti6b7 lICg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rUToB0AY; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=U6gA7eaZWt6simitv7OROSpe5yospPJ/T5iE/M7/yPI=; b=VxXm2e9Njue+80bxLBWAAyvPsp+yI3lSPMheloUg+FvUOa47C1/wyd1bcRDVYg0G1b JYGr2g0J6cc2cT56132zkOeRWhcJvC7adxug0lhXDjAAWpKd3nJLqjcauPyQWlaEzaa/ 3IPX7TILuiljbtk07WWbwTg21/7sIRC1KbHQQ= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=U6gA7eaZWt6simitv7OROSpe5yospPJ/T5iE/M7/yPI=; b=Vf5qxWEyuCA1VPWMAET4VeCK7tieazoS1piObuVALnaVqL8IjwK48lKyNWLQMZVU8D 4x8nYKXrjrErvbPh7+wdHTTCdFLg3oVmrwdkhkWiYpZZJPY/SMDLIw///Ulw78X4+8RX SQ+AC2RiNDCKdCPIly9XMKNM6bHnkkUfx0LAgYcszwIKIoo1OqVuUmYJjd4UxeabsZ+E A1TYGZcMVsmWIur2lyMd4JUBS2UU7vyHQ1EKnnxowdzsfF70hkfmYqnhLHIvorUg14wm rIXrlGovbsvY6fsNQ2SLC70c7msys6kaFeOKkrmbHksgc+Ivu3T2ZfmbmHDjf6wIxPRS oPbQ== X-Gm-Message-State: APjAAAWRsgYVvYk8zIgashwcrgFZGDMdM6IyOyoYW9QE6n5J04y6KEgc daJM4DSgd8QkZxA56aZeHfkPAmXo X-Google-Smtp-Source: APXvYqw/uGAPSa0nox4v4IIctpfgY3ltY2m6gJ3Nw6ho4ekuPfrT5B04T0u75+bhCIb2LEr9cHuR1A== X-Received: by 2002:a65:6116:: with SMTP id z22mr20556068pgu.50.1560265040283; Tue, 11 Jun 2019 07:57:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b605:: with SMTP id b5ls4896756pls.12.gmail; Tue, 11 Jun 2019 07:57:20 -0700 (PDT) X-Received: by 2002:a17:90a:de0e:: with SMTP id m14mr27339310pjv.36.1560265039760; Tue, 11 Jun 2019 07:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265039; cv=none; d=google.com; s=arc-20160816; b=yTsft4AsGZJuaIQCvGnHmkB12GXR+ls9oGh4jzJb4+/5yfCytdbTe4YF1RPOSli0HZ BN4Ul2co59QeKmCFtBtR8Rm6qD1x0fr6mAH6/LVwPfIF178Xf6xDzIyjqdPDcw7W+hSp xGUwqC8dU6Q4dKjVHQlUgFsDlBgS13OqL3etzTIdXYIhc2uTki4S2J0P8Ar2Q1wlXyr8 BV1ydLxjoDz4USSBdobI+mK83BHIIa0GSENz+NbuR9BONzZAClAOfe7PyZehUUUsllQl RZN54dt2oZ834OjH9DHGCTRJq4XXKvxrDcmXCkU8c/WPiAk8ZgYZ/r6Uy8etGxHgTAAu g/Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=yFK41Swk9CvNo1HohrbxocFCC/xQIVJHjQ/lewyc/+M=; b=Rf3xFMLg2NG5xlmG4tq/7LVfyneh7MjbvbfTWWBLBAiWdh1JTs6NLHIotUoifX1T0z 3v5jMWZXVgw1eqo5uIZVNzX59P5e5bWLPtbURJ36r+E7cFALN8pJ6ILzvy5c4X75rDBN NqVKbwU+dSZieT1Yzs94AN//gBgbwmiouqOZz4PXDK5il/pNBZKWyoWltA/g3t21Fc69 8VWJn2n6iFDel3tGTi39hDVDuCKwJCsEUqpA05xISH217QJmy0Zqenms6xoySlSGMBVS stm6i73ArnmNegAy85TIXhK6J8y3vvFGQbwmmKhPgJrdmq7w+pA3v8sR6KZJGPtEvUSx XwnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rUToB0AY; 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 g95sor15328569plb.67.2019.06.11.07.57.19 for (Google Transport Security); Tue, 11 Jun 2019 07:57:19 -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:a17:902:9885:: with SMTP id s5mr76199075plp.102.1560265038343; Tue, 11 Jun 2019 07:57:18 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:17 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 83/92] ram: rk3399: Add LPPDDR4-800 timings inc Date: Tue, 11 Jun 2019 20:21:26 +0530 Message-Id: <20190611145135.21399-84-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rUToB0AY; 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: , LPDDR4 initialization start with at board selected frequency and then it switches into 400MHz and 800MHz simultaneously to make the proper sequence work on each channel with associated training. So, add LPDDR4-800 timings inc file in driver area so-that these timings will take during LPDDR4 initialization phase. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- .../ram/rockchip/sdram-rk3399-lpddr4-800.inc | 1570 +++++++++++++++++ 1 file changed, 1570 insertions(+) create mode 100644 drivers/ram/rockchip/sdram-rk3399-lpddr4-800.inc diff --git a/drivers/ram/rockchip/sdram-rk3399-lpddr4-800.inc b/drivers/ram/rockchip/sdram-rk3399-lpddr4-800.inc new file mode 100644 index 0000000000..d8ae3359a3 --- /dev/null +++ b/drivers/ram/rockchip/sdram-rk3399-lpddr4-800.inc @@ -0,0 +1,1570 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * (C) Copyright 2019 Rockchip Electronics Co., Ltd. + * (C) Copyright 2019 Amarula Solutions + */ + +{ + { + { + { + .rank = 0x2, + .col = 0xA, + .bk = 0x3, + .bw = 0x2, + .dbw = 0x1, + .row_3_4 = 0x0, + .cs0_row = 0xF, + .cs1_row = 0xF, + .ddrconfig = 1, + }, + { + .ddrtiminga0 = 0x80241d22, + .ddrtimingb0 = 0x15050f08, + .ddrtimingc0 = { + 0x00000602, + }, + .devtodev0 = 0x00002122, + .ddrmode = { + 0x0000004c, + }, + .agingx0 = 0x00000000, + } + }, + { + { + .rank = 0x2, + .col = 0xA, + .bk = 0x3, + .bw = 0x2, + .dbw = 0x1, + .row_3_4 = 0x0, + .cs0_row = 0xF, + .cs1_row = 0xF, + .ddrconfig = 1, + }, + { + .ddrtiminga0 = 0x80241d22, + .ddrtimingb0 = 0x15050f08, + .ddrtimingc0 = { + 0x00000602, + }, + .devtodev0 = 0x00002122, + .ddrmode = { + 0x0000004c, + }, + .agingx0 = 0x00000000, + } + } + }, + { + .ddr_freq = 800 * MHz, + .dramtype = LPDDR4, + .num_channels = 2, + .stride = 13, + .odt = 1, + }, + { + { + 0x00000b00, /* DENALI_CTL_00_DATA */ + 0x00000000, /* DENALI_CTL_01_DATA */ + 0x00000000, /* DENALI_CTL_02_DATA */ + 0x00000000, /* DENALI_CTL_03_DATA */ + 0x00000000, /* DENALI_CTL_04_DATA */ + 0x00013880, /* DENALI_CTL_05_DATA */ + 0x000c3500, /* DENALI_CTL_06_DATA */ + 0x00000005, /* DENALI_CTL_07_DATA */ + 0x00000320, /* DENALI_CTL_08_DATA */ + 0x00027100, /* DENALI_CTL_09_DATA */ + 0x00186a00, /* DENALI_CTL_10_DATA */ + 0x00000005, /* DENALI_CTL_11_DATA */ + 0x00000640, /* DENALI_CTL_12_DATA */ + 0x00002710, /* DENALI_CTL_13_DATA */ + 0x000186a0, /* DENALI_CTL_14_DATA */ + 0x00000005, /* DENALI_CTL_15_DATA */ + 0x01000064, /* DENALI_CTL_16_DATA */ + 0x00000000, /* DENALI_CTL_17_DATA */ + 0x02020101, /* DENALI_CTL_18_DATA */ + 0x00000102, /* DENALI_CTL_19_DATA */ + 0x00000050, /* DENALI_CTL_20_DATA */ + 0x000000c8, /* DENALI_CTL_21_DATA */ + 0x00000000, /* DENALI_CTL_22_DATA */ + 0x06140000, /* DENALI_CTL_23_DATA */ + 0x00081c00, /* DENALI_CTL_24_DATA */ + 0x0400040c, /* DENALI_CTL_25_DATA */ + 0x19042008, /* DENALI_CTL_26_DATA */ + 0x10080a11, /* DENALI_CTL_27_DATA */ + 0x22310800, /* DENALI_CTL_28_DATA */ + 0x00200f0a, /* DENALI_CTL_29_DATA */ + 0x0a030704, /* DENALI_CTL_30_DATA */ + 0x08000204, /* DENALI_CTL_31_DATA */ + 0x00000a0a, /* DENALI_CTL_32_DATA */ + 0x04006db0, /* DENALI_CTL_33_DATA */ + 0x0a0a0804, /* DENALI_CTL_34_DATA */ + 0x0600db60, /* DENALI_CTL_35_DATA */ + 0x0a0a0806, /* DENALI_CTL_36_DATA */ + 0x04000db6, /* DENALI_CTL_37_DATA */ + 0x02030404, /* DENALI_CTL_38_DATA */ + 0x0f0a0800, /* DENALI_CTL_39_DATA */ + 0x08040411, /* DENALI_CTL_40_DATA */ + 0x1400640a, /* DENALI_CTL_41_DATA */ + 0x02010a0a, /* DENALI_CTL_42_DATA */ + 0x00010001, /* DENALI_CTL_43_DATA */ + 0x04082012, /* DENALI_CTL_44_DATA */ + 0x00041109, /* DENALI_CTL_45_DATA */ + 0x00000000, /* DENALI_CTL_46_DATA */ + 0x03010000, /* DENALI_CTL_47_DATA */ + 0x06100034, /* DENALI_CTL_48_DATA */ + 0x0c280068, /* DENALI_CTL_49_DATA */ + 0x00bb0007, /* DENALI_CTL_50_DATA */ + 0x00000000, /* DENALI_CTL_51_DATA */ + 0x00060003, /* DENALI_CTL_52_DATA */ + 0x000a0003, /* DENALI_CTL_53_DATA */ + 0x000a0014, /* DENALI_CTL_54_DATA */ + 0x01000000, /* DENALI_CTL_55_DATA */ + 0x030a0000, /* DENALI_CTL_56_DATA */ + 0x0c000002, /* DENALI_CTL_57_DATA */ + 0x00000103, /* DENALI_CTL_58_DATA */ + 0x0003030a, /* DENALI_CTL_59_DATA */ + 0x00060037, /* DENALI_CTL_60_DATA */ + 0x0003006e, /* DENALI_CTL_61_DATA */ + 0x05050007, /* DENALI_CTL_62_DATA */ + 0x03020605, /* DENALI_CTL_63_DATA */ + 0x06050301, /* DENALI_CTL_64_DATA */ + 0x06020c05, /* DENALI_CTL_65_DATA */ + 0x05050302, /* DENALI_CTL_66_DATA */ + 0x03020305, /* DENALI_CTL_67_DATA */ + 0x00000301, /* DENALI_CTL_68_DATA */ + 0x00000301, /* DENALI_CTL_69_DATA */ + 0x00000001, /* DENALI_CTL_70_DATA */ + 0x00000000, /* DENALI_CTL_71_DATA */ + 0x00000000, /* DENALI_CTL_72_DATA */ + 0x01000000, /* DENALI_CTL_73_DATA */ + 0x80104002, /* DENALI_CTL_74_DATA */ + 0x00040003, /* DENALI_CTL_75_DATA */ + 0x00040005, /* DENALI_CTL_76_DATA */ + 0x00030000, /* DENALI_CTL_77_DATA */ + 0x00050004, /* DENALI_CTL_78_DATA */ + 0x00000004, /* DENALI_CTL_79_DATA */ + 0x00040003, /* DENALI_CTL_80_DATA */ + 0x00040005, /* DENALI_CTL_81_DATA */ + 0x18400000, /* DENALI_CTL_82_DATA */ + 0x00000c20, /* DENALI_CTL_83_DATA */ + 0x185030a0, /* DENALI_CTL_84_DATA */ + 0x02ec0000, /* DENALI_CTL_85_DATA */ + 0x00000176, /* DENALI_CTL_86_DATA */ + 0x00000000, /* DENALI_CTL_87_DATA */ + 0x00000000, /* DENALI_CTL_88_DATA */ + 0x00000000, /* DENALI_CTL_89_DATA */ + 0x00000000, /* DENALI_CTL_90_DATA */ + 0x00000000, /* DENALI_CTL_91_DATA */ + 0x06030300, /* DENALI_CTL_92_DATA */ + 0x00030303, /* DENALI_CTL_93_DATA */ + 0x02030200, /* DENALI_CTL_94_DATA */ + 0x00040703, /* DENALI_CTL_95_DATA */ + 0x03020302, /* DENALI_CTL_96_DATA */ + 0x02000407, /* DENALI_CTL_97_DATA */ + 0x07030203, /* DENALI_CTL_98_DATA */ + 0x00030f04, /* DENALI_CTL_99_DATA */ + 0x00070004, /* DENALI_CTL_100_DATA */ + 0x00000000, /* DENALI_CTL_101_DATA */ + 0x00000000, /* DENALI_CTL_102_DATA */ + 0x00000000, /* DENALI_CTL_103_DATA */ + 0x00000000, /* DENALI_CTL_104_DATA */ + 0x00000000, /* DENALI_CTL_105_DATA */ + 0x00000000, /* DENALI_CTL_106_DATA */ + 0x00000000, /* DENALI_CTL_107_DATA */ + 0x00010000, /* DENALI_CTL_108_DATA */ + 0x20040020, /* DENALI_CTL_109_DATA */ + 0x00200400, /* DENALI_CTL_110_DATA */ + 0x01000400, /* DENALI_CTL_111_DATA */ + 0x00000b80, /* DENALI_CTL_112_DATA */ + 0x00000000, /* DENALI_CTL_113_DATA */ + 0x00000001, /* DENALI_CTL_114_DATA */ + 0x00000002, /* DENALI_CTL_115_DATA */ + 0x0000000e, /* DENALI_CTL_116_DATA */ + 0x00000000, /* DENALI_CTL_117_DATA */ + 0x00000000, /* DENALI_CTL_118_DATA */ + 0x00000000, /* DENALI_CTL_119_DATA */ + 0x00000000, /* DENALI_CTL_120_DATA */ + 0x00000000, /* DENALI_CTL_121_DATA */ + 0x00500000, /* DENALI_CTL_122_DATA */ + 0x00640028, /* DENALI_CTL_123_DATA */ + 0x00640404, /* DENALI_CTL_124_DATA */ + 0x005000a0, /* DENALI_CTL_125_DATA */ + 0x060600c8, /* DENALI_CTL_126_DATA */ + 0x000a00c8, /* DENALI_CTL_127_DATA */ + 0x000d0005, /* DENALI_CTL_128_DATA */ + 0x000d0404, /* DENALI_CTL_129_DATA */ + 0x00000000, /* DENALI_CTL_130_DATA */ + 0x00000000, /* DENALI_CTL_131_DATA */ + 0x00000000, /* DENALI_CTL_132_DATA */ + 0x001400a3, /* DENALI_CTL_133_DATA */ + 0x00e30009, /* DENALI_CTL_134_DATA */ + 0x00120024, /* DENALI_CTL_135_DATA */ + 0x00040063, /* DENALI_CTL_136_DATA */ + 0x00000000, /* DENALI_CTL_137_DATA */ + 0x00310031, /* DENALI_CTL_138_DATA */ + 0x00000031, /* DENALI_CTL_139_DATA */ + 0x004d0000, /* DENALI_CTL_140_DATA */ + 0x004d004d, /* DENALI_CTL_141_DATA */ + 0x004d0000, /* DENALI_CTL_142_DATA */ + 0x004d004d, /* DENALI_CTL_143_DATA */ + 0x00010101, /* DENALI_CTL_144_DATA */ + 0x00000000, /* DENALI_CTL_145_DATA */ + 0x00000000, /* DENALI_CTL_146_DATA */ + 0x001400a3, /* DENALI_CTL_147_DATA */ + 0x00e30009, /* DENALI_CTL_148_DATA */ + 0x00120024, /* DENALI_CTL_149_DATA */ + 0x00040063, /* DENALI_CTL_150_DATA */ + 0x00000000, /* DENALI_CTL_151_DATA */ + 0x00310031, /* DENALI_CTL_152_DATA */ + 0x00000031, /* DENALI_CTL_153_DATA */ + 0x004d0000, /* DENALI_CTL_154_DATA */ + 0x004d004d, /* DENALI_CTL_155_DATA */ + 0x004d0000, /* DENALI_CTL_156_DATA */ + 0x004d004d, /* DENALI_CTL_157_DATA */ + 0x00010101, /* DENALI_CTL_158_DATA */ + 0x00000000, /* DENALI_CTL_159_DATA */ + 0x00000000, /* DENALI_CTL_160_DATA */ + 0x00000000, /* DENALI_CTL_161_DATA */ + 0x00000001, /* DENALI_CTL_162_DATA */ + 0x00000000, /* DENALI_CTL_163_DATA */ + 0x18151100, /* DENALI_CTL_164_DATA */ + 0x0000000c, /* DENALI_CTL_165_DATA */ + 0x00000000, /* DENALI_CTL_166_DATA */ + 0x00000000, /* DENALI_CTL_167_DATA */ + 0x00000000, /* DENALI_CTL_168_DATA */ + 0x00000000, /* DENALI_CTL_169_DATA */ + 0x00000000, /* DENALI_CTL_170_DATA */ + 0x00000000, /* DENALI_CTL_171_DATA */ + 0x00000000, /* DENALI_CTL_172_DATA */ + 0x00000000, /* DENALI_CTL_173_DATA */ + 0x00000000, /* DENALI_CTL_174_DATA */ + 0x00000000, /* DENALI_CTL_175_DATA */ + 0x00000000, /* DENALI_CTL_176_DATA */ + 0x00000000, /* DENALI_CTL_177_DATA */ + 0x00000000, /* DENALI_CTL_178_DATA */ + 0x00020003, /* DENALI_CTL_179_DATA */ + 0x00400100, /* DENALI_CTL_180_DATA */ + 0x000c0190, /* DENALI_CTL_181_DATA */ + 0x01000200, /* DENALI_CTL_182_DATA */ + 0x03200040, /* DENALI_CTL_183_DATA */ + 0x00020018, /* DENALI_CTL_184_DATA */ + 0x00400100, /* DENALI_CTL_185_DATA */ + 0x00080032, /* DENALI_CTL_186_DATA */ + 0x00140000, /* DENALI_CTL_187_DATA */ + 0x00030028, /* DENALI_CTL_188_DATA */ + 0x01010100, /* DENALI_CTL_189_DATA */ + 0x02000202, /* DENALI_CTL_190_DATA */ + 0x0b000002, /* DENALI_CTL_191_DATA */ + 0x01000f0f, /* DENALI_CTL_192_DATA */ + 0x00000000, /* DENALI_CTL_193_DATA */ + 0x00000000, /* DENALI_CTL_194_DATA */ + 0x00010003, /* DENALI_CTL_195_DATA */ + 0x00000c03, /* DENALI_CTL_196_DATA */ + 0x00040101, /* DENALI_CTL_197_DATA */ + 0x04010100, /* DENALI_CTL_198_DATA */ + 0x01000000, /* DENALI_CTL_199_DATA */ + 0x02010000, /* DENALI_CTL_200_DATA */ + 0x00000001, /* DENALI_CTL_201_DATA */ + 0x00000000, /* DENALI_CTL_202_DATA */ + 0x00000000, /* DENALI_CTL_203_DATA */ + 0x00000000, /* DENALI_CTL_204_DATA */ + 0x00000000, /* DENALI_CTL_205_DATA */ + 0x00000000, /* DENALI_CTL_206_DATA */ + 0x00000000, /* DENALI_CTL_207_DATA */ + 0x00000000, /* DENALI_CTL_208_DATA */ + 0x00000000, /* DENALI_CTL_209_DATA */ + 0x00000000, /* DENALI_CTL_210_DATA */ + 0x00010000, /* DENALI_CTL_211_DATA */ + 0x00000001, /* DENALI_CTL_212_DATA */ + 0x01010001, /* DENALI_CTL_213_DATA */ + 0x05040001, /* DENALI_CTL_214_DATA */ + 0x040a0703, /* DENALI_CTL_215_DATA */ + 0x02080808, /* DENALI_CTL_216_DATA */ + 0x020e000a, /* DENALI_CTL_217_DATA */ + 0x020f010b, /* DENALI_CTL_218_DATA */ + 0x000d0008, /* DENALI_CTL_219_DATA */ + 0x00080b0a, /* DENALI_CTL_220_DATA */ + 0x03000200, /* DENALI_CTL_221_DATA */ + 0x00000100, /* DENALI_CTL_222_DATA */ + 0x00000000, /* DENALI_CTL_223_DATA */ + 0x00000000, /* DENALI_CTL_224_DATA */ + 0x0d000001, /* DENALI_CTL_225_DATA */ + 0x00000028, /* DENALI_CTL_226_DATA */ + 0x00010000, /* DENALI_CTL_227_DATA */ + 0x00000003, /* DENALI_CTL_228_DATA */ + 0x00000000, /* DENALI_CTL_229_DATA */ + 0x00000000, /* DENALI_CTL_230_DATA */ + 0x00000000, /* DENALI_CTL_231_DATA */ + 0x00000000, /* DENALI_CTL_232_DATA */ + 0x00000000, /* DENALI_CTL_233_DATA */ + 0x00000000, /* DENALI_CTL_234_DATA */ + 0x00000000, /* DENALI_CTL_235_DATA */ + 0x00000000, /* DENALI_CTL_236_DATA */ + 0x00010100, /* DENALI_CTL_237_DATA */ + 0x01000000, /* DENALI_CTL_238_DATA */ + 0x00000001, /* DENALI_CTL_239_DATA */ + 0x00000303, /* DENALI_CTL_240_DATA */ + 0x00000000, /* DENALI_CTL_241_DATA */ + 0x00000000, /* DENALI_CTL_242_DATA */ + 0x00000000, /* DENALI_CTL_243_DATA */ + 0x00000000, /* DENALI_CTL_244_DATA */ + 0x00000000, /* DENALI_CTL_245_DATA */ + 0x00000000, /* DENALI_CTL_246_DATA */ + 0x00000000, /* DENALI_CTL_247_DATA */ + 0x00000000, /* DENALI_CTL_248_DATA */ + 0x00000000, /* DENALI_CTL_249_DATA */ + 0x00000000, /* DENALI_CTL_250_DATA */ + 0x00000000, /* DENALI_CTL_251_DATA */ + 0x00000000, /* DENALI_CTL_252_DATA */ + 0x00000000, /* DENALI_CTL_253_DATA */ + 0x00000000, /* DENALI_CTL_254_DATA */ + 0x00000000, /* DENALI_CTL_255_DATA */ + 0x000556aa, /* DENALI_CTL_256_DATA */ + 0x000aaaaa, /* DENALI_CTL_257_DATA */ + 0x000aa955, /* DENALI_CTL_258_DATA */ + 0x00055555, /* DENALI_CTL_259_DATA */ + 0x000b3133, /* DENALI_CTL_260_DATA */ + 0x0004cd33, /* DENALI_CTL_261_DATA */ + 0x0004cecc, /* DENALI_CTL_262_DATA */ + 0x000b32cc, /* DENALI_CTL_263_DATA */ + 0x00010300, /* DENALI_CTL_264_DATA */ + 0x03000100, /* DENALI_CTL_265_DATA */ + 0x00000000, /* DENALI_CTL_266_DATA */ + 0x00000000, /* DENALI_CTL_267_DATA */ + 0x00000000, /* DENALI_CTL_268_DATA */ + 0x00000000, /* DENALI_CTL_269_DATA */ + 0x00000000, /* DENALI_CTL_270_DATA */ + 0x00000000, /* DENALI_CTL_271_DATA */ + 0x00000000, /* DENALI_CTL_272_DATA */ + 0x00000000, /* DENALI_CTL_273_DATA */ + 0x00ffff00, /* DENALI_CTL_274_DATA */ + 0x1a160000, /* DENALI_CTL_275_DATA */ + 0x08000012, /* DENALI_CTL_276_DATA */ + 0x00000c20, /* DENALI_CTL_277_DATA */ + 0x00000200, /* DENALI_CTL_278_DATA */ + 0x00000200, /* DENALI_CTL_279_DATA */ + 0x00000200, /* DENALI_CTL_280_DATA */ + 0x00000200, /* DENALI_CTL_281_DATA */ + 0x00000c20, /* DENALI_CTL_282_DATA */ + 0x00007940, /* DENALI_CTL_283_DATA */ + 0x18500409, /* DENALI_CTL_284_DATA */ + 0x00000200, /* DENALI_CTL_285_DATA */ + 0x00000200, /* DENALI_CTL_286_DATA */ + 0x00000200, /* DENALI_CTL_287_DATA */ + 0x00000200, /* DENALI_CTL_288_DATA */ + 0x00001850, /* DENALI_CTL_289_DATA */ + 0x0000f320, /* DENALI_CTL_290_DATA */ + 0x0176060c, /* DENALI_CTL_291_DATA */ + 0x00000200, /* DENALI_CTL_292_DATA */ + 0x00000200, /* DENALI_CTL_293_DATA */ + 0x00000200, /* DENALI_CTL_294_DATA */ + 0x00000200, /* DENALI_CTL_295_DATA */ + 0x00000176, /* DENALI_CTL_296_DATA */ + 0x00000e9c, /* DENALI_CTL_297_DATA */ + 0x02020205, /* DENALI_CTL_298_DATA */ + 0x03030202, /* DENALI_CTL_299_DATA */ + 0x00000018, /* DENALI_CTL_300_DATA */ + 0x00000000, /* DENALI_CTL_301_DATA */ + 0x00000000, /* DENALI_CTL_302_DATA */ + 0x00001403, /* DENALI_CTL_303_DATA */ + 0x00000000, /* DENALI_CTL_304_DATA */ + 0x00000000, /* DENALI_CTL_305_DATA */ + 0x00000000, /* DENALI_CTL_306_DATA */ + 0x00030000, /* DENALI_CTL_307_DATA */ + 0x000a001c, /* DENALI_CTL_308_DATA */ + 0x000e0020, /* DENALI_CTL_309_DATA */ + 0x00060018, /* DENALI_CTL_310_DATA */ + 0x00000000, /* DENALI_CTL_311_DATA */ + 0x00000000, /* DENALI_CTL_312_DATA */ + 0x02000000, /* DENALI_CTL_313_DATA */ + 0x00090305, /* DENALI_CTL_314_DATA */ + 0x00050101, /* DENALI_CTL_315_DATA */ + 0x00000000, /* DENALI_CTL_316_DATA */ + 0x00000000, /* DENALI_CTL_317_DATA */ + 0x00000000, /* DENALI_CTL_318_DATA */ + 0x00000000, /* DENALI_CTL_319_DATA */ + 0x00000000, /* DENALI_CTL_320_DATA */ + 0x00000000, /* DENALI_CTL_321_DATA */ + 0x00000000, /* DENALI_CTL_322_DATA */ + 0x00000000, /* DENALI_CTL_323_DATA */ + 0x01000001, /* DENALI_CTL_324_DATA */ + 0x01010101, /* DENALI_CTL_325_DATA */ + 0x01000101, /* DENALI_CTL_326_DATA */ + 0x01000100, /* DENALI_CTL_327_DATA */ + 0x00010001, /* DENALI_CTL_328_DATA */ + 0x00010002, /* DENALI_CTL_329_DATA */ + 0x00020100, /* DENALI_CTL_330_DATA */ + 0x00000002 /* DENALI_CTL_331_DATA */ + } + }, + { + { + 0x00000b00, /* DENALI_PI_00_DATA */ + 0x00000000, /* DENALI_PI_01_DATA */ + 0x000002ec, /* DENALI_PI_02_DATA */ + 0x00000176, /* DENALI_PI_03_DATA */ + 0x000030a0, /* DENALI_PI_04_DATA */ + 0x00001850, /* DENALI_PI_05_DATA */ + 0x00001840, /* DENALI_PI_06_DATA */ + 0x01760c20, /* DENALI_PI_07_DATA */ + 0x00000200, /* DENALI_PI_08_DATA */ + 0x00000200, /* DENALI_PI_09_DATA */ + 0x00000200, /* DENALI_PI_10_DATA */ + 0x00000200, /* DENALI_PI_11_DATA */ + 0x00001850, /* DENALI_PI_12_DATA */ + 0x00000200, /* DENALI_PI_13_DATA */ + 0x00000200, /* DENALI_PI_14_DATA */ + 0x00000200, /* DENALI_PI_15_DATA */ + 0x00000200, /* DENALI_PI_16_DATA */ + 0x00000c20, /* DENALI_PI_17_DATA */ + 0x00000200, /* DENALI_PI_18_DATA */ + 0x00000200, /* DENALI_PI_19_DATA */ + 0x00000200, /* DENALI_PI_20_DATA */ + 0x00000200, /* DENALI_PI_21_DATA */ + 0x00010000, /* DENALI_PI_22_DATA */ + 0x00000007, /* DENALI_PI_23_DATA */ + 0x01000001, /* DENALI_PI_24_DATA */ + 0x00000000, /* DENALI_PI_25_DATA */ + 0x3fffffff, /* DENALI_PI_26_DATA */ + 0x00000000, /* DENALI_PI_27_DATA */ + 0x00000000, /* DENALI_PI_28_DATA */ + 0x00000000, /* DENALI_PI_29_DATA */ + 0x00000000, /* DENALI_PI_30_DATA */ + 0x00000000, /* DENALI_PI_31_DATA */ + 0x00000000, /* DENALI_PI_32_DATA */ + 0x00000000, /* DENALI_PI_33_DATA */ + 0x00000000, /* DENALI_PI_34_DATA */ + 0x00000000, /* DENALI_PI_35_DATA */ + 0x00000000, /* DENALI_PI_36_DATA */ + 0x00000000, /* DENALI_PI_37_DATA */ + 0x00000000, /* DENALI_PI_38_DATA */ + 0x00000000, /* DENALI_PI_39_DATA */ + 0x00000000, /* DENALI_PI_40_DATA */ + 0x0f000101, /* DENALI_PI_41_DATA */ + 0x082b3223, /* DENALI_PI_42_DATA */ + 0x080c0004, /* DENALI_PI_43_DATA */ + 0x00061c00, /* DENALI_PI_44_DATA */ + 0x00000214, /* DENALI_PI_45_DATA */ + 0x00bb0007, /* DENALI_PI_46_DATA */ + 0x0c280068, /* DENALI_PI_47_DATA */ + 0x06100034, /* DENALI_PI_48_DATA */ + 0x00000500, /* DENALI_PI_49_DATA */ + 0x00000000, /* DENALI_PI_50_DATA */ + 0x00000000, /* DENALI_PI_51_DATA */ + 0x00000000, /* DENALI_PI_52_DATA */ + 0x00000000, /* DENALI_PI_53_DATA */ + 0x00000000, /* DENALI_PI_54_DATA */ + 0x00000000, /* DENALI_PI_55_DATA */ + 0x00000000, /* DENALI_PI_56_DATA */ + 0x00000000, /* DENALI_PI_57_DATA */ + 0x04040100, /* DENALI_PI_58_DATA */ + 0x0a000004, /* DENALI_PI_59_DATA */ + 0x00000128, /* DENALI_PI_60_DATA */ + 0x00000000, /* DENALI_PI_61_DATA */ + 0x0003000f, /* DENALI_PI_62_DATA */ + 0x00000018, /* DENALI_PI_63_DATA */ + 0x00000000, /* DENALI_PI_64_DATA */ + 0x00000000, /* DENALI_PI_65_DATA */ + 0x00060002, /* DENALI_PI_66_DATA */ + 0x00010001, /* DENALI_PI_67_DATA */ + 0x00000101, /* DENALI_PI_68_DATA */ + 0x00020001, /* DENALI_PI_69_DATA */ + 0x00080004, /* DENALI_PI_70_DATA */ + 0x00000000, /* DENALI_PI_71_DATA */ + 0x05030000, /* DENALI_PI_72_DATA */ + 0x070a0404, /* DENALI_PI_73_DATA */ + 0x00000000, /* DENALI_PI_74_DATA */ + 0x00000000, /* DENALI_PI_75_DATA */ + 0x00000000, /* DENALI_PI_76_DATA */ + 0x000f0f00, /* DENALI_PI_77_DATA */ + 0x0000001e, /* DENALI_PI_78_DATA */ + 0x00000000, /* DENALI_PI_79_DATA */ + 0x01010300, /* DENALI_PI_80_DATA */ + 0x00000000, /* DENALI_PI_81_DATA */ + 0x00000000, /* DENALI_PI_82_DATA */ + 0x01000000, /* DENALI_PI_83_DATA */ + 0x00000101, /* DENALI_PI_84_DATA */ + 0x55555a5a, /* DENALI_PI_85_DATA */ + 0x55555a5a, /* DENALI_PI_86_DATA */ + 0x55555a5a, /* DENALI_PI_87_DATA */ + 0x55555a5a, /* DENALI_PI_88_DATA */ + 0x0c050001, /* DENALI_PI_89_DATA */ + 0x06020009, /* DENALI_PI_90_DATA */ + 0x00010004, /* DENALI_PI_91_DATA */ + 0x00000203, /* DENALI_PI_92_DATA */ + 0x00030000, /* DENALI_PI_93_DATA */ + 0x170f0000, /* DENALI_PI_94_DATA */ + 0x00060018, /* DENALI_PI_95_DATA */ + 0x000e0020, /* DENALI_PI_96_DATA */ + 0x000a001c, /* DENALI_PI_97_DATA */ + 0x00000000, /* DENALI_PI_98_DATA */ + 0x00000000, /* DENALI_PI_99_DATA */ + 0x00000100, /* DENALI_PI_100_DATA */ + 0x140a0000, /* DENALI_PI_101_DATA */ + 0x000d010a, /* DENALI_PI_102_DATA */ + 0x0100c802, /* DENALI_PI_103_DATA */ + 0x010a0064, /* DENALI_PI_104_DATA */ + 0x000e0100, /* DENALI_PI_105_DATA */ + 0x0100000e, /* DENALI_PI_106_DATA */ + 0x00c900c9, /* DENALI_PI_107_DATA */ + 0x00650100, /* DENALI_PI_108_DATA */ + 0x1e1a0065, /* DENALI_PI_109_DATA */ + 0x10010204, /* DENALI_PI_110_DATA */ + 0x06070605, /* DENALI_PI_111_DATA */ + 0x20000202, /* DENALI_PI_112_DATA */ + 0x00201000, /* DENALI_PI_113_DATA */ + 0x00201000, /* DENALI_PI_114_DATA */ + 0x04041000, /* DENALI_PI_115_DATA */ + 0x10020100, /* DENALI_PI_116_DATA */ + 0x0003010c, /* DENALI_PI_117_DATA */ + 0x004b004a, /* DENALI_PI_118_DATA */ + 0x1a0f0000, /* DENALI_PI_119_DATA */ + 0x0102041e, /* DENALI_PI_120_DATA */ + 0x34000000, /* DENALI_PI_121_DATA */ + 0x00000000, /* DENALI_PI_122_DATA */ + 0x00000000, /* DENALI_PI_123_DATA */ + 0x00010000, /* DENALI_PI_124_DATA */ + 0x00000400, /* DENALI_PI_125_DATA */ + 0x00310000, /* DENALI_PI_126_DATA */ + 0x004d4d00, /* DENALI_PI_127_DATA */ + 0x00120024, /* DENALI_PI_128_DATA */ + 0x4d000031, /* DENALI_PI_129_DATA */ + 0x0000144d, /* DENALI_PI_130_DATA */ + 0x00310009, /* DENALI_PI_131_DATA */ + 0x004d4d00, /* DENALI_PI_132_DATA */ + 0x00000004, /* DENALI_PI_133_DATA */ + 0x4d000031, /* DENALI_PI_134_DATA */ + 0x0000244d, /* DENALI_PI_135_DATA */ + 0x00310012, /* DENALI_PI_136_DATA */ + 0x004d4d00, /* DENALI_PI_137_DATA */ + 0x00090014, /* DENALI_PI_138_DATA */ + 0x4d000031, /* DENALI_PI_139_DATA */ + 0x0004004d, /* DENALI_PI_140_DATA */ + 0x00310000, /* DENALI_PI_141_DATA */ + 0x004d4d00, /* DENALI_PI_142_DATA */ + 0x00120024, /* DENALI_PI_143_DATA */ + 0x4d000031, /* DENALI_PI_144_DATA */ + 0x0000144d, /* DENALI_PI_145_DATA */ + 0x00310009, /* DENALI_PI_146_DATA */ + 0x004d4d00, /* DENALI_PI_147_DATA */ + 0x00000004, /* DENALI_PI_148_DATA */ + 0x4d000031, /* DENALI_PI_149_DATA */ + 0x0000244d, /* DENALI_PI_150_DATA */ + 0x00310012, /* DENALI_PI_151_DATA */ + 0x004d4d00, /* DENALI_PI_152_DATA */ + 0x00090014, /* DENALI_PI_153_DATA */ + 0x4d000031, /* DENALI_PI_154_DATA */ + 0x0200004d, /* DENALI_PI_155_DATA */ + 0x00c8000d, /* DENALI_PI_156_DATA */ + 0x08080064, /* DENALI_PI_157_DATA */ + 0x040a0404, /* DENALI_PI_158_DATA */ + 0x03000d92, /* DENALI_PI_159_DATA */ + 0x010a2001, /* DENALI_PI_160_DATA */ + 0x0f11080a, /* DENALI_PI_161_DATA */ + 0x0000110a, /* DENALI_PI_162_DATA */ + 0x2200d92e, /* DENALI_PI_163_DATA */ + 0x080c2003, /* DENALI_PI_164_DATA */ + 0x0809080a, /* DENALI_PI_165_DATA */ + 0x00000a0a, /* DENALI_PI_166_DATA */ + 0x11006c97, /* DENALI_PI_167_DATA */ + 0x040a2002, /* DENALI_PI_168_DATA */ + 0x0200020a, /* DENALI_PI_169_DATA */ + 0x02000200, /* DENALI_PI_170_DATA */ + 0x02000200, /* DENALI_PI_171_DATA */ + 0x02000200, /* DENALI_PI_172_DATA */ + 0x02000200, /* DENALI_PI_173_DATA */ + 0x00000000, /* DENALI_PI_174_DATA */ + 0x00000000, /* DENALI_PI_175_DATA */ + 0x00000000, /* DENALI_PI_176_DATA */ + 0x00000000, /* DENALI_PI_177_DATA */ + 0x00000000, /* DENALI_PI_178_DATA */ + 0x00000000, /* DENALI_PI_179_DATA */ + 0x00000000, /* DENALI_PI_180_DATA */ + 0x00000000, /* DENALI_PI_181_DATA */ + 0x00000000, /* DENALI_PI_182_DATA */ + 0x00000000, /* DENALI_PI_183_DATA */ + 0x00000000, /* DENALI_PI_184_DATA */ + 0x00000000, /* DENALI_PI_185_DATA */ + 0x01000400, /* DENALI_PI_186_DATA */ + 0x00017600, /* DENALI_PI_187_DATA */ + 0x00000e9c, /* DENALI_PI_188_DATA */ + 0x00001850, /* DENALI_PI_189_DATA */ + 0x0000f320, /* DENALI_PI_190_DATA */ + 0x00000c20, /* DENALI_PI_191_DATA */ + 0x00007940, /* DENALI_PI_192_DATA */ + 0x08000000, /* DENALI_PI_193_DATA */ + 0x00000100, /* DENALI_PI_194_DATA */ + 0x00000000, /* DENALI_PI_195_DATA */ + 0x00000000, /* DENALI_PI_196_DATA */ + 0x00000000, /* DENALI_PI_197_DATA */ + 0x00000000, /* DENALI_PI_198_DATA */ + 0x00000002 /* DENALI_PI_199_DATA */ + } + }, + { + { + 0x76543210, /* DENALI_PHY_00_DATA */ + 0x0004f008, /* DENALI_PHY_01_DATA */ + 0x00020119, /* DENALI_PHY_02_DATA */ + 0x00000000, /* DENALI_PHY_03_DATA */ + 0x00000000, /* DENALI_PHY_04_DATA */ + 0x00010000, /* DENALI_PHY_05_DATA */ + 0x01665555, /* DENALI_PHY_06_DATA */ + 0x03665555, /* DENALI_PHY_07_DATA */ + 0x00010f00, /* DENALI_PHY_08_DATA */ + 0x05010200, /* DENALI_PHY_09_DATA */ + 0x00000002, /* DENALI_PHY_10_DATA */ + 0x00170180, /* DENALI_PHY_11_DATA */ + 0x00cc0201, /* DENALI_PHY_12_DATA */ + 0x00030066, /* DENALI_PHY_13_DATA */ + 0x00000000, /* DENALI_PHY_14_DATA */ + 0x00000000, /* DENALI_PHY_15_DATA */ + 0x00000000, /* DENALI_PHY_16_DATA */ + 0x00000000, /* DENALI_PHY_17_DATA */ + 0x00000000, /* DENALI_PHY_18_DATA */ + 0x00000000, /* DENALI_PHY_19_DATA */ + 0x00000000, /* DENALI_PHY_20_DATA */ + 0x00000000, /* DENALI_PHY_21_DATA */ + 0x04080000, /* DENALI_PHY_22_DATA */ + 0x04080400, /* DENALI_PHY_23_DATA */ + 0x30000000, /* DENALI_PHY_24_DATA */ + 0x0c00c007, /* DENALI_PHY_25_DATA */ + 0x00000100, /* DENALI_PHY_26_DATA */ + 0x00000000, /* DENALI_PHY_27_DATA */ + 0xfd02fe01, /* DENALI_PHY_28_DATA */ + 0xf708fb04, /* DENALI_PHY_29_DATA */ + 0xdf20ef10, /* DENALI_PHY_30_DATA */ + 0x7f80bf40, /* DENALI_PHY_31_DATA */ + 0x0001aaaa, /* DENALI_PHY_32_DATA */ + 0x00000000, /* DENALI_PHY_33_DATA */ + 0x00000000, /* DENALI_PHY_34_DATA */ + 0x00000000, /* DENALI_PHY_35_DATA */ + 0x00000000, /* DENALI_PHY_36_DATA */ + 0x00000000, /* DENALI_PHY_37_DATA */ + 0x00000000, /* DENALI_PHY_38_DATA */ + 0x00000000, /* DENALI_PHY_39_DATA */ + 0x00000000, /* DENALI_PHY_40_DATA */ + 0x00000000, /* DENALI_PHY_41_DATA */ + 0x00000000, /* DENALI_PHY_42_DATA */ + 0x00000000, /* DENALI_PHY_43_DATA */ + 0x00000000, /* DENALI_PHY_44_DATA */ + 0x00000000, /* DENALI_PHY_45_DATA */ + 0x00000000, /* DENALI_PHY_46_DATA */ + 0x00000000, /* DENALI_PHY_47_DATA */ + 0x00000000, /* DENALI_PHY_48_DATA */ + 0x00000000, /* DENALI_PHY_49_DATA */ + 0x00000000, /* DENALI_PHY_50_DATA */ + 0x00000000, /* DENALI_PHY_51_DATA */ + 0x00200000, /* DENALI_PHY_52_DATA */ + 0x00000000, /* DENALI_PHY_53_DATA */ + 0x00000000, /* DENALI_PHY_54_DATA */ + 0x00000000, /* DENALI_PHY_55_DATA */ + 0x00000000, /* DENALI_PHY_56_DATA */ + 0x00000000, /* DENALI_PHY_57_DATA */ + 0x00000000, /* DENALI_PHY_58_DATA */ + 0x02800280, /* DENALI_PHY_59_DATA */ + 0x02800280, /* DENALI_PHY_60_DATA */ + 0x02800280, /* DENALI_PHY_61_DATA */ + 0x02800280, /* DENALI_PHY_62_DATA */ + 0x00000280, /* DENALI_PHY_63_DATA */ + 0x00000000, /* DENALI_PHY_64_DATA */ + 0x00000000, /* DENALI_PHY_65_DATA */ + 0x00000000, /* DENALI_PHY_66_DATA */ + 0x00000000, /* DENALI_PHY_67_DATA */ + 0x00800000, /* DENALI_PHY_68_DATA */ + 0x00800080, /* DENALI_PHY_69_DATA */ + 0x00800080, /* DENALI_PHY_70_DATA */ + 0x00800080, /* DENALI_PHY_71_DATA */ + 0x00800080, /* DENALI_PHY_72_DATA */ + 0x00800080, /* DENALI_PHY_73_DATA */ + 0x00800080, /* DENALI_PHY_74_DATA */ + 0x00800080, /* DENALI_PHY_75_DATA */ + 0x00800080, /* DENALI_PHY_76_DATA */ + 0x01190080, /* DENALI_PHY_77_DATA */ + 0x00000002, /* DENALI_PHY_78_DATA */ + 0x00000000, /* DENALI_PHY_79_DATA */ + 0x00000000, /* DENALI_PHY_80_DATA */ + 0x00000200, /* DENALI_PHY_81_DATA */ + 0x00000000, /* DENALI_PHY_82_DATA */ + 0x51315152, /* DENALI_PHY_83_DATA */ + 0xc0013150, /* DENALI_PHY_84_DATA */ + 0x020000c0, /* DENALI_PHY_85_DATA */ + 0x00100001, /* DENALI_PHY_86_DATA */ + 0x07054204, /* DENALI_PHY_87_DATA */ + 0x000f0c18, /* DENALI_PHY_88_DATA */ + 0x01000140, /* DENALI_PHY_89_DATA */ + 0x00000c10, /* DENALI_PHY_90_DATA */ + 0x00000000, /* DENALI_PHY_91_DATA */ + 0x00000000, /* DENALI_PHY_92_DATA */ + 0x00000000, /* DENALI_PHY_93_DATA */ + 0x00000000, /* DENALI_PHY_94_DATA */ + 0x00000000, /* DENALI_PHY_95_DATA */ + 0x00000000, /* DENALI_PHY_96_DATA */ + 0x00000000, /* DENALI_PHY_97_DATA */ + 0x00000000, /* DENALI_PHY_98_DATA */ + 0x00000000, /* DENALI_PHY_99_DATA */ + 0x00000000, /* DENALI_PHY_100_DATA */ + 0x00000000, /* DENALI_PHY_101_DATA */ + 0x00000000, /* DENALI_PHY_102_DATA */ + 0x00000000, /* DENALI_PHY_103_DATA */ + 0x00000000, /* DENALI_PHY_104_DATA */ + 0x00000000, /* DENALI_PHY_105_DATA */ + 0x00000000, /* DENALI_PHY_106_DATA */ + 0x00000000, /* DENALI_PHY_107_DATA */ + 0x00000000, /* DENALI_PHY_108_DATA */ + 0x00000000, /* DENALI_PHY_109_DATA */ + 0x00000000, /* DENALI_PHY_110_DATA */ + 0x00000000, /* DENALI_PHY_111_DATA */ + 0x00000000, /* DENALI_PHY_112_DATA */ + 0x00000000, /* DENALI_PHY_113_DATA */ + 0x00000000, /* DENALI_PHY_114_DATA */ + 0x00000000, /* DENALI_PHY_115_DATA */ + 0x00000000, /* DENALI_PHY_116_DATA */ + 0x00000000, /* DENALI_PHY_117_DATA */ + 0x00000000, /* DENALI_PHY_118_DATA */ + 0x00000000, /* DENALI_PHY_119_DATA */ + 0x00000000, /* DENALI_PHY_120_DATA */ + 0x00000000, /* DENALI_PHY_121_DATA */ + 0x00000000, /* DENALI_PHY_122_DATA */ + 0x00000000, /* DENALI_PHY_123_DATA */ + 0x00000000, /* DENALI_PHY_124_DATA */ + 0x00000000, /* DENALI_PHY_125_DATA */ + 0x00000000, /* DENALI_PHY_126_DATA */ + 0x00000000, /* DENALI_PHY_127_DATA */ + 0x76543210, /* DENALI_PHY_128_DATA */ + 0x0004f008, /* DENALI_PHY_129_DATA */ + 0x00020119, /* DENALI_PHY_130_DATA */ + 0x00000000, /* DENALI_PHY_131_DATA */ + 0x00000000, /* DENALI_PHY_132_DATA */ + 0x00010000, /* DENALI_PHY_133_DATA */ + 0x01665555, /* DENALI_PHY_134_DATA */ + 0x03665555, /* DENALI_PHY_135_DATA */ + 0x00010f00, /* DENALI_PHY_136_DATA */ + 0x05010200, /* DENALI_PHY_137_DATA */ + 0x00000002, /* DENALI_PHY_138_DATA */ + 0x00170180, /* DENALI_PHY_139_DATA */ + 0x00cc0201, /* DENALI_PHY_140_DATA */ + 0x00030066, /* DENALI_PHY_141_DATA */ + 0x00000000, /* DENALI_PHY_142_DATA */ + 0x00000000, /* DENALI_PHY_143_DATA */ + 0x00000000, /* DENALI_PHY_144_DATA */ + 0x00000000, /* DENALI_PHY_145_DATA */ + 0x00000000, /* DENALI_PHY_146_DATA */ + 0x00000000, /* DENALI_PHY_147_DATA */ + 0x00000000, /* DENALI_PHY_148_DATA */ + 0x00000000, /* DENALI_PHY_149_DATA */ + 0x04080000, /* DENALI_PHY_150_DATA */ + 0x04080400, /* DENALI_PHY_151_DATA */ + 0x30000000, /* DENALI_PHY_152_DATA */ + 0x0c00c007, /* DENALI_PHY_153_DATA */ + 0x00000100, /* DENALI_PHY_154_DATA */ + 0x00000000, /* DENALI_PHY_155_DATA */ + 0xfd02fe01, /* DENALI_PHY_156_DATA */ + 0xf708fb04, /* DENALI_PHY_157_DATA */ + 0xdf20ef10, /* DENALI_PHY_158_DATA */ + 0x7f80bf40, /* DENALI_PHY_159_DATA */ + 0x0000aaaa, /* DENALI_PHY_160_DATA */ + 0x00000000, /* DENALI_PHY_161_DATA */ + 0x00000000, /* DENALI_PHY_162_DATA */ + 0x00000000, /* DENALI_PHY_163_DATA */ + 0x00000000, /* DENALI_PHY_164_DATA */ + 0x00000000, /* DENALI_PHY_165_DATA */ + 0x00000000, /* DENALI_PHY_166_DATA */ + 0x00000000, /* DENALI_PHY_167_DATA */ + 0x00000000, /* DENALI_PHY_168_DATA */ + 0x00000000, /* DENALI_PHY_169_DATA */ + 0x00000000, /* DENALI_PHY_170_DATA */ + 0x00000000, /* DENALI_PHY_171_DATA */ + 0x00000000, /* DENALI_PHY_172_DATA */ + 0x00000000, /* DENALI_PHY_173_DATA */ + 0x00000000, /* DENALI_PHY_174_DATA */ + 0x00000000, /* DENALI_PHY_175_DATA */ + 0x00000000, /* DENALI_PHY_176_DATA */ + 0x00000000, /* DENALI_PHY_177_DATA */ + 0x00000000, /* DENALI_PHY_178_DATA */ + 0x00000000, /* DENALI_PHY_179_DATA */ + 0x00200000, /* DENALI_PHY_180_DATA */ + 0x00000000, /* DENALI_PHY_181_DATA */ + 0x00000000, /* DENALI_PHY_182_DATA */ + 0x00000000, /* DENALI_PHY_183_DATA */ + 0x00000000, /* DENALI_PHY_184_DATA */ + 0x00000000, /* DENALI_PHY_185_DATA */ + 0x00000000, /* DENALI_PHY_186_DATA */ + 0x02800280, /* DENALI_PHY_187_DATA */ + 0x02800280, /* DENALI_PHY_188_DATA */ + 0x02800280, /* DENALI_PHY_189_DATA */ + 0x02800280, /* DENALI_PHY_190_DATA */ + 0x00000280, /* DENALI_PHY_191_DATA */ + 0x00000000, /* DENALI_PHY_192_DATA */ + 0x00000000, /* DENALI_PHY_193_DATA */ + 0x00000000, /* DENALI_PHY_194_DATA */ + 0x00000000, /* DENALI_PHY_195_DATA */ + 0x00800000, /* DENALI_PHY_196_DATA */ + 0x00800080, /* DENALI_PHY_197_DATA */ + 0x00800080, /* DENALI_PHY_198_DATA */ + 0x00800080, /* DENALI_PHY_199_DATA */ + 0x00800080, /* DENALI_PHY_200_DATA */ + 0x00800080, /* DENALI_PHY_201_DATA */ + 0x00800080, /* DENALI_PHY_202_DATA */ + 0x00800080, /* DENALI_PHY_203_DATA */ + 0x00800080, /* DENALI_PHY_204_DATA */ + 0x01190080, /* DENALI_PHY_205_DATA */ + 0x00000002, /* DENALI_PHY_206_DATA */ + 0x00000000, /* DENALI_PHY_207_DATA */ + 0x00000000, /* DENALI_PHY_208_DATA */ + 0x00000200, /* DENALI_PHY_209_DATA */ + 0x00000000, /* DENALI_PHY_210_DATA */ + 0x51315152, /* DENALI_PHY_211_DATA */ + 0xc0013150, /* DENALI_PHY_212_DATA */ + 0x020000c0, /* DENALI_PHY_213_DATA */ + 0x00100001, /* DENALI_PHY_214_DATA */ + 0x07054204, /* DENALI_PHY_215_DATA */ + 0x000f0c18, /* DENALI_PHY_216_DATA */ + 0x01000140, /* DENALI_PHY_217_DATA */ + 0x00000c10, /* DENALI_PHY_218_DATA */ + 0x00000000, /* DENALI_PHY_219_DATA */ + 0x00000000, /* DENALI_PHY_220_DATA */ + 0x00000000, /* DENALI_PHY_221_DATA */ + 0x00000000, /* DENALI_PHY_222_DATA */ + 0x00000000, /* DENALI_PHY_223_DATA */ + 0x00000000, /* DENALI_PHY_224_DATA */ + 0x00000000, /* DENALI_PHY_225_DATA */ + 0x00000000, /* DENALI_PHY_226_DATA */ + 0x00000000, /* DENALI_PHY_227_DATA */ + 0x00000000, /* DENALI_PHY_228_DATA */ + 0x00000000, /* DENALI_PHY_229_DATA */ + 0x00000000, /* DENALI_PHY_230_DATA */ + 0x00000000, /* DENALI_PHY_231_DATA */ + 0x00000000, /* DENALI_PHY_232_DATA */ + 0x00000000, /* DENALI_PHY_233_DATA */ + 0x00000000, /* DENALI_PHY_234_DATA */ + 0x00000000, /* DENALI_PHY_235_DATA */ + 0x00000000, /* DENALI_PHY_236_DATA */ + 0x00000000, /* DENALI_PHY_237_DATA */ + 0x00000000, /* DENALI_PHY_238_DATA */ + 0x00000000, /* DENALI_PHY_239_DATA */ + 0x00000000, /* DENALI_PHY_240_DATA */ + 0x00000000, /* DENALI_PHY_241_DATA */ + 0x00000000, /* DENALI_PHY_242_DATA */ + 0x00000000, /* DENALI_PHY_243_DATA */ + 0x00000000, /* DENALI_PHY_244_DATA */ + 0x00000000, /* DENALI_PHY_245_DATA */ + 0x00000000, /* DENALI_PHY_246_DATA */ + 0x00000000, /* DENALI_PHY_247_DATA */ + 0x00000000, /* DENALI_PHY_248_DATA */ + 0x00000000, /* DENALI_PHY_249_DATA */ + 0x00000000, /* DENALI_PHY_250_DATA */ + 0x00000000, /* DENALI_PHY_251_DATA */ + 0x00000000, /* DENALI_PHY_252_DATA */ + 0x00000000, /* DENALI_PHY_253_DATA */ + 0x00000000, /* DENALI_PHY_254_DATA */ + 0x00000000, /* DENALI_PHY_255_DATA */ + 0x76543210, /* DENALI_PHY_256_DATA */ + 0x0004f008, /* DENALI_PHY_257_DATA */ + 0x00020119, /* DENALI_PHY_258_DATA */ + 0x00000000, /* DENALI_PHY_259_DATA */ + 0x00000000, /* DENALI_PHY_260_DATA */ + 0x00010000, /* DENALI_PHY_261_DATA */ + 0x01665555, /* DENALI_PHY_262_DATA */ + 0x03665555, /* DENALI_PHY_263_DATA */ + 0x00010f00, /* DENALI_PHY_264_DATA */ + 0x05010200, /* DENALI_PHY_265_DATA */ + 0x00000002, /* DENALI_PHY_266_DATA */ + 0x00170180, /* DENALI_PHY_267_DATA */ + 0x00cc0201, /* DENALI_PHY_268_DATA */ + 0x00030066, /* DENALI_PHY_269_DATA */ + 0x00000000, /* DENALI_PHY_270_DATA */ + 0x00000000, /* DENALI_PHY_271_DATA */ + 0x00000000, /* DENALI_PHY_272_DATA */ + 0x00000000, /* DENALI_PHY_273_DATA */ + 0x00000000, /* DENALI_PHY_274_DATA */ + 0x00000000, /* DENALI_PHY_275_DATA */ + 0x00000000, /* DENALI_PHY_276_DATA */ + 0x00000000, /* DENALI_PHY_277_DATA */ + 0x04080000, /* DENALI_PHY_278_DATA */ + 0x04080400, /* DENALI_PHY_279_DATA */ + 0x30000000, /* DENALI_PHY_280_DATA */ + 0x0c00c007, /* DENALI_PHY_281_DATA */ + 0x00000100, /* DENALI_PHY_282_DATA */ + 0x00000000, /* DENALI_PHY_283_DATA */ + 0xfd02fe01, /* DENALI_PHY_284_DATA */ + 0xf708fb04, /* DENALI_PHY_285_DATA */ + 0xdf20ef10, /* DENALI_PHY_286_DATA */ + 0x7f80bf40, /* DENALI_PHY_287_DATA */ + 0x0001aaaa, /* DENALI_PHY_288_DATA */ + 0x00000000, /* DENALI_PHY_289_DATA */ + 0x00000000, /* DENALI_PHY_290_DATA */ + 0x00000000, /* DENALI_PHY_291_DATA */ + 0x00000000, /* DENALI_PHY_292_DATA */ + 0x00000000, /* DENALI_PHY_293_DATA */ + 0x00000000, /* DENALI_PHY_294_DATA */ + 0x00000000, /* DENALI_PHY_295_DATA */ + 0x00000000, /* DENALI_PHY_296_DATA */ + 0x00000000, /* DENALI_PHY_297_DATA */ + 0x00000000, /* DENALI_PHY_298_DATA */ + 0x00000000, /* DENALI_PHY_299_DATA */ + 0x00000000, /* DENALI_PHY_300_DATA */ + 0x00000000, /* DENALI_PHY_301_DATA */ + 0x00000000, /* DENALI_PHY_302_DATA */ + 0x00000000, /* DENALI_PHY_303_DATA */ + 0x00000000, /* DENALI_PHY_304_DATA */ + 0x00000000, /* DENALI_PHY_305_DATA */ + 0x00000000, /* DENALI_PHY_306_DATA */ + 0x00000000, /* DENALI_PHY_307_DATA */ + 0x00200000, /* DENALI_PHY_308_DATA */ + 0x00000000, /* DENALI_PHY_309_DATA */ + 0x00000000, /* DENALI_PHY_310_DATA */ + 0x00000000, /* DENALI_PHY_311_DATA */ + 0x00000000, /* DENALI_PHY_312_DATA */ + 0x00000000, /* DENALI_PHY_313_DATA */ + 0x00000000, /* DENALI_PHY_314_DATA */ + 0x02800280, /* DENALI_PHY_315_DATA */ + 0x02800280, /* DENALI_PHY_316_DATA */ + 0x02800280, /* DENALI_PHY_317_DATA */ + 0x02800280, /* DENALI_PHY_318_DATA */ + 0x00000280, /* DENALI_PHY_319_DATA */ + 0x00000000, /* DENALI_PHY_320_DATA */ + 0x00000000, /* DENALI_PHY_321_DATA */ + 0x00000000, /* DENALI_PHY_322_DATA */ + 0x00000000, /* DENALI_PHY_323_DATA */ + 0x00800000, /* DENALI_PHY_324_DATA */ + 0x00800080, /* DENALI_PHY_325_DATA */ + 0x00800080, /* DENALI_PHY_326_DATA */ + 0x00800080, /* DENALI_PHY_327_DATA */ + 0x00800080, /* DENALI_PHY_328_DATA */ + 0x00800080, /* DENALI_PHY_329_DATA */ + 0x00800080, /* DENALI_PHY_330_DATA */ + 0x00800080, /* DENALI_PHY_331_DATA */ + 0x00800080, /* DENALI_PHY_332_DATA */ + 0x01190080, /* DENALI_PHY_333_DATA */ + 0x00000002, /* DENALI_PHY_334_DATA */ + 0x00000000, /* DENALI_PHY_335_DATA */ + 0x00000000, /* DENALI_PHY_336_DATA */ + 0x00000200, /* DENALI_PHY_337_DATA */ + 0x00000000, /* DENALI_PHY_338_DATA */ + 0x51315152, /* DENALI_PHY_339_DATA */ + 0xc0013150, /* DENALI_PHY_340_DATA */ + 0x020000c0, /* DENALI_PHY_341_DATA */ + 0x00100001, /* DENALI_PHY_342_DATA */ + 0x07054204, /* DENALI_PHY_343_DATA */ + 0x000f0c18, /* DENALI_PHY_344_DATA */ + 0x01000140, /* DENALI_PHY_345_DATA */ + 0x00000c10, /* DENALI_PHY_346_DATA */ + 0x00000000, /* DENALI_PHY_347_DATA */ + 0x00000000, /* DENALI_PHY_348_DATA */ + 0x00000000, /* DENALI_PHY_349_DATA */ + 0x00000000, /* DENALI_PHY_350_DATA */ + 0x00000000, /* DENALI_PHY_351_DATA */ + 0x00000000, /* DENALI_PHY_352_DATA */ + 0x00000000, /* DENALI_PHY_353_DATA */ + 0x00000000, /* DENALI_PHY_354_DATA */ + 0x00000000, /* DENALI_PHY_355_DATA */ + 0x00000000, /* DENALI_PHY_356_DATA */ + 0x00000000, /* DENALI_PHY_357_DATA */ + 0x00000000, /* DENALI_PHY_358_DATA */ + 0x00000000, /* DENALI_PHY_359_DATA */ + 0x00000000, /* DENALI_PHY_360_DATA */ + 0x00000000, /* DENALI_PHY_361_DATA */ + 0x00000000, /* DENALI_PHY_362_DATA */ + 0x00000000, /* DENALI_PHY_363_DATA */ + 0x00000000, /* DENALI_PHY_364_DATA */ + 0x00000000, /* DENALI_PHY_365_DATA */ + 0x00000000, /* DENALI_PHY_366_DATA */ + 0x00000000, /* DENALI_PHY_367_DATA */ + 0x00000000, /* DENALI_PHY_368_DATA */ + 0x00000000, /* DENALI_PHY_369_DATA */ + 0x00000000, /* DENALI_PHY_370_DATA */ + 0x00000000, /* DENALI_PHY_371_DATA */ + 0x00000000, /* DENALI_PHY_372_DATA */ + 0x00000000, /* DENALI_PHY_373_DATA */ + 0x00000000, /* DENALI_PHY_374_DATA */ + 0x00000000, /* DENALI_PHY_375_DATA */ + 0x00000000, /* DENALI_PHY_376_DATA */ + 0x00000000, /* DENALI_PHY_377_DATA */ + 0x00000000, /* DENALI_PHY_378_DATA */ + 0x00000000, /* DENALI_PHY_379_DATA */ + 0x00000000, /* DENALI_PHY_380_DATA */ + 0x00000000, /* DENALI_PHY_381_DATA */ + 0x00000000, /* DENALI_PHY_382_DATA */ + 0x00000000, /* DENALI_PHY_383_DATA */ + 0x76543210, /* DENALI_PHY_384_DATA */ + 0x0004f008, /* DENALI_PHY_385_DATA */ + 0x00020119, /* DENALI_PHY_386_DATA */ + 0x00000000, /* DENALI_PHY_387_DATA */ + 0x00000000, /* DENALI_PHY_388_DATA */ + 0x00010000, /* DENALI_PHY_389_DATA */ + 0x01665555, /* DENALI_PHY_390_DATA */ + 0x03665555, /* DENALI_PHY_391_DATA */ + 0x00010f00, /* DENALI_PHY_392_DATA */ + 0x05010200, /* DENALI_PHY_393_DATA */ + 0x00000002, /* DENALI_PHY_394_DATA */ + 0x00170180, /* DENALI_PHY_395_DATA */ + 0x00cc0201, /* DENALI_PHY_396_DATA */ + 0x00030066, /* DENALI_PHY_397_DATA */ + 0x00000000, /* DENALI_PHY_398_DATA */ + 0x00000000, /* DENALI_PHY_399_DATA */ + 0x00000000, /* DENALI_PHY_400_DATA */ + 0x00000000, /* DENALI_PHY_401_DATA */ + 0x00000000, /* DENALI_PHY_402_DATA */ + 0x00000000, /* DENALI_PHY_403_DATA */ + 0x00000000, /* DENALI_PHY_404_DATA */ + 0x00000000, /* DENALI_PHY_405_DATA */ + 0x04080000, /* DENALI_PHY_406_DATA */ + 0x04080400, /* DENALI_PHY_407_DATA */ + 0x30000000, /* DENALI_PHY_408_DATA */ + 0x0c00c007, /* DENALI_PHY_409_DATA */ + 0x00000100, /* DENALI_PHY_410_DATA */ + 0x00000000, /* DENALI_PHY_411_DATA */ + 0xfd02fe01, /* DENALI_PHY_412_DATA */ + 0xf708fb04, /* DENALI_PHY_413_DATA */ + 0xdf20ef10, /* DENALI_PHY_414_DATA */ + 0x7f80bf40, /* DENALI_PHY_415_DATA */ + 0x0000aaaa, /* DENALI_PHY_416_DATA */ + 0x00000000, /* DENALI_PHY_417_DATA */ + 0x00000000, /* DENALI_PHY_418_DATA */ + 0x00000000, /* DENALI_PHY_419_DATA */ + 0x00000000, /* DENALI_PHY_420_DATA */ + 0x00000000, /* DENALI_PHY_421_DATA */ + 0x00000000, /* DENALI_PHY_422_DATA */ + 0x00000000, /* DENALI_PHY_423_DATA */ + 0x00000000, /* DENALI_PHY_424_DATA */ + 0x00000000, /* DENALI_PHY_425_DATA */ + 0x00000000, /* DENALI_PHY_426_DATA */ + 0x00000000, /* DENALI_PHY_427_DATA */ + 0x00000000, /* DENALI_PHY_428_DATA */ + 0x00000000, /* DENALI_PHY_429_DATA */ + 0x00000000, /* DENALI_PHY_430_DATA */ + 0x00000000, /* DENALI_PHY_431_DATA */ + 0x00000000, /* DENALI_PHY_432_DATA */ + 0x00000000, /* DENALI_PHY_433_DATA */ + 0x00000000, /* DENALI_PHY_434_DATA */ + 0x00000000, /* DENALI_PHY_435_DATA */ + 0x00200000, /* DENALI_PHY_436_DATA */ + 0x00000000, /* DENALI_PHY_437_DATA */ + 0x00000000, /* DENALI_PHY_438_DATA */ + 0x00000000, /* DENALI_PHY_439_DATA */ + 0x00000000, /* DENALI_PHY_440_DATA */ + 0x00000000, /* DENALI_PHY_441_DATA */ + 0x00000000, /* DENALI_PHY_442_DATA */ + 0x02800280, /* DENALI_PHY_443_DATA */ + 0x02800280, /* DENALI_PHY_444_DATA */ + 0x02800280, /* DENALI_PHY_445_DATA */ + 0x02800280, /* DENALI_PHY_446_DATA */ + 0x00000280, /* DENALI_PHY_447_DATA */ + 0x00000000, /* DENALI_PHY_448_DATA */ + 0x00000000, /* DENALI_PHY_449_DATA */ + 0x00000000, /* DENALI_PHY_450_DATA */ + 0x00000000, /* DENALI_PHY_451_DATA */ + 0x00800000, /* DENALI_PHY_452_DATA */ + 0x00800080, /* DENALI_PHY_453_DATA */ + 0x00800080, /* DENALI_PHY_454_DATA */ + 0x00800080, /* DENALI_PHY_455_DATA */ + 0x00800080, /* DENALI_PHY_456_DATA */ + 0x00800080, /* DENALI_PHY_457_DATA */ + 0x00800080, /* DENALI_PHY_458_DATA */ + 0x00800080, /* DENALI_PHY_459_DATA */ + 0x00800080, /* DENALI_PHY_460_DATA */ + 0x01190080, /* DENALI_PHY_461_DATA */ + 0x00000002, /* DENALI_PHY_462_DATA */ + 0x00000000, /* DENALI_PHY_463_DATA */ + 0x00000000, /* DENALI_PHY_464_DATA */ + 0x00000200, /* DENALI_PHY_465_DATA */ + 0x00000000, /* DENALI_PHY_466_DATA */ + 0x51315152, /* DENALI_PHY_467_DATA */ + 0xc0013150, /* DENALI_PHY_468_DATA */ + 0x020000c0, /* DENALI_PHY_469_DATA */ + 0x00100001, /* DENALI_PHY_470_DATA */ + 0x07054204, /* DENALI_PHY_471_DATA */ + 0x000f0c18, /* DENALI_PHY_472_DATA */ + 0x01000140, /* DENALI_PHY_473_DATA */ + 0x00000c10, /* DENALI_PHY_474_DATA */ + 0x00000000, /* DENALI_PHY_475_DATA */ + 0x00000000, /* DENALI_PHY_476_DATA */ + 0x00000000, /* DENALI_PHY_477_DATA */ + 0x00000000, /* DENALI_PHY_478_DATA */ + 0x00000000, /* DENALI_PHY_479_DATA */ + 0x00000000, /* DENALI_PHY_480_DATA */ + 0x00000000, /* DENALI_PHY_481_DATA */ + 0x00000000, /* DENALI_PHY_482_DATA */ + 0x00000000, /* DENALI_PHY_483_DATA */ + 0x00000000, /* DENALI_PHY_484_DATA */ + 0x00000000, /* DENALI_PHY_485_DATA */ + 0x00000000, /* DENALI_PHY_486_DATA */ + 0x00000000, /* DENALI_PHY_487_DATA */ + 0x00000000, /* DENALI_PHY_488_DATA */ + 0x00000000, /* DENALI_PHY_489_DATA */ + 0x00000000, /* DENALI_PHY_490_DATA */ + 0x00000000, /* DENALI_PHY_491_DATA */ + 0x00000000, /* DENALI_PHY_492_DATA */ + 0x00000000, /* DENALI_PHY_493_DATA */ + 0x00000000, /* DENALI_PHY_494_DATA */ + 0x00000000, /* DENALI_PHY_495_DATA */ + 0x00000000, /* DENALI_PHY_496_DATA */ + 0x00000000, /* DENALI_PHY_497_DATA */ + 0x00000000, /* DENALI_PHY_498_DATA */ + 0x00000000, /* DENALI_PHY_499_DATA */ + 0x00000000, /* DENALI_PHY_500_DATA */ + 0x00000000, /* DENALI_PHY_501_DATA */ + 0x00000000, /* DENALI_PHY_502_DATA */ + 0x00000000, /* DENALI_PHY_503_DATA */ + 0x00000000, /* DENALI_PHY_504_DATA */ + 0x00000000, /* DENALI_PHY_505_DATA */ + 0x00000000, /* DENALI_PHY_506_DATA */ + 0x00000000, /* DENALI_PHY_507_DATA */ + 0x00000000, /* DENALI_PHY_508_DATA */ + 0x00000000, /* DENALI_PHY_509_DATA */ + 0x00000000, /* DENALI_PHY_510_DATA */ + 0x00000000, /* DENALI_PHY_511_DATA */ + 0x00000000, /* DENALI_PHY_512_DATA */ + 0x00000000, /* DENALI_PHY_513_DATA */ + 0x00000000, /* DENALI_PHY_514_DATA */ + 0x00000000, /* DENALI_PHY_515_DATA */ + 0x00000000, /* DENALI_PHY_516_DATA */ + 0x00000000, /* DENALI_PHY_517_DATA */ + 0x00000000, /* DENALI_PHY_518_DATA */ + 0x00000002, /* DENALI_PHY_519_DATA */ + 0x00000000, /* DENALI_PHY_520_DATA */ + 0x00000000, /* DENALI_PHY_521_DATA */ + 0x00000000, /* DENALI_PHY_522_DATA */ + 0x00400320, /* DENALI_PHY_523_DATA */ + 0x00000040, /* DENALI_PHY_524_DATA */ + 0x00dcba98, /* DENALI_PHY_525_DATA */ + 0x00000000, /* DENALI_PHY_526_DATA */ + 0x00dcba98, /* DENALI_PHY_527_DATA */ + 0x01000000, /* DENALI_PHY_528_DATA */ + 0x00020003, /* DENALI_PHY_529_DATA */ + 0x00000000, /* DENALI_PHY_530_DATA */ + 0x00000000, /* DENALI_PHY_531_DATA */ + 0x00000000, /* DENALI_PHY_532_DATA */ + 0x0000002a, /* DENALI_PHY_533_DATA */ + 0x00000015, /* DENALI_PHY_534_DATA */ + 0x00000015, /* DENALI_PHY_535_DATA */ + 0x0000002a, /* DENALI_PHY_536_DATA */ + 0x00000033, /* DENALI_PHY_537_DATA */ + 0x0000000c, /* DENALI_PHY_538_DATA */ + 0x0000000c, /* DENALI_PHY_539_DATA */ + 0x00000033, /* DENALI_PHY_540_DATA */ + 0x0a418820, /* DENALI_PHY_541_DATA */ + 0x003f0000, /* DENALI_PHY_542_DATA */ + 0x0000003f, /* DENALI_PHY_543_DATA */ + 0x00030055, /* DENALI_PHY_544_DATA */ + 0x03000300, /* DENALI_PHY_545_DATA */ + 0x03000300, /* DENALI_PHY_546_DATA */ + 0x00000300, /* DENALI_PHY_547_DATA */ + 0x42080010, /* DENALI_PHY_548_DATA */ + 0x00000003, /* DENALI_PHY_549_DATA */ + 0x00000000, /* DENALI_PHY_550_DATA */ + 0x00000000, /* DENALI_PHY_551_DATA */ + 0x00000000, /* DENALI_PHY_552_DATA */ + 0x00000000, /* DENALI_PHY_553_DATA */ + 0x00000000, /* DENALI_PHY_554_DATA */ + 0x00000000, /* DENALI_PHY_555_DATA */ + 0x00000000, /* DENALI_PHY_556_DATA */ + 0x00000000, /* DENALI_PHY_557_DATA */ + 0x00000000, /* DENALI_PHY_558_DATA */ + 0x00000000, /* DENALI_PHY_559_DATA */ + 0x00000000, /* DENALI_PHY_560_DATA */ + 0x00000000, /* DENALI_PHY_561_DATA */ + 0x00000000, /* DENALI_PHY_562_DATA */ + 0x00000000, /* DENALI_PHY_563_DATA */ + 0x00000000, /* DENALI_PHY_564_DATA */ + 0x00000000, /* DENALI_PHY_565_DATA */ + 0x00000000, /* DENALI_PHY_566_DATA */ + 0x00000000, /* DENALI_PHY_567_DATA */ + 0x00000000, /* DENALI_PHY_568_DATA */ + 0x00000000, /* DENALI_PHY_569_DATA */ + 0x00000000, /* DENALI_PHY_570_DATA */ + 0x00000000, /* DENALI_PHY_571_DATA */ + 0x00000000, /* DENALI_PHY_572_DATA */ + 0x00000000, /* DENALI_PHY_573_DATA */ + 0x00000000, /* DENALI_PHY_574_DATA */ + 0x00000000, /* DENALI_PHY_575_DATA */ + 0x00000000, /* DENALI_PHY_576_DATA */ + 0x00000000, /* DENALI_PHY_577_DATA */ + 0x00000000, /* DENALI_PHY_578_DATA */ + 0x00000000, /* DENALI_PHY_579_DATA */ + 0x00000000, /* DENALI_PHY_580_DATA */ + 0x00000000, /* DENALI_PHY_581_DATA */ + 0x00000000, /* DENALI_PHY_582_DATA */ + 0x00000000, /* DENALI_PHY_583_DATA */ + 0x00000000, /* DENALI_PHY_584_DATA */ + 0x00000000, /* DENALI_PHY_585_DATA */ + 0x00000000, /* DENALI_PHY_586_DATA */ + 0x00000000, /* DENALI_PHY_587_DATA */ + 0x00000000, /* DENALI_PHY_588_DATA */ + 0x00000000, /* DENALI_PHY_589_DATA */ + 0x00000000, /* DENALI_PHY_590_DATA */ + 0x00000000, /* DENALI_PHY_591_DATA */ + 0x00000000, /* DENALI_PHY_592_DATA */ + 0x00000000, /* DENALI_PHY_593_DATA */ + 0x00000000, /* DENALI_PHY_594_DATA */ + 0x00000000, /* DENALI_PHY_595_DATA */ + 0x00000000, /* DENALI_PHY_596_DATA */ + 0x00000000, /* DENALI_PHY_597_DATA */ + 0x00000000, /* DENALI_PHY_598_DATA */ + 0x00000000, /* DENALI_PHY_599_DATA */ + 0x00000000, /* DENALI_PHY_600_DATA */ + 0x00000000, /* DENALI_PHY_601_DATA */ + 0x00000000, /* DENALI_PHY_602_DATA */ + 0x00000000, /* DENALI_PHY_603_DATA */ + 0x00000000, /* DENALI_PHY_604_DATA */ + 0x00000000, /* DENALI_PHY_605_DATA */ + 0x00000000, /* DENALI_PHY_606_DATA */ + 0x00000000, /* DENALI_PHY_607_DATA */ + 0x00000000, /* DENALI_PHY_608_DATA */ + 0x00000000, /* DENALI_PHY_609_DATA */ + 0x00000000, /* DENALI_PHY_610_DATA */ + 0x00000000, /* DENALI_PHY_611_DATA */ + 0x00000000, /* DENALI_PHY_612_DATA */ + 0x00000000, /* DENALI_PHY_613_DATA */ + 0x00000000, /* DENALI_PHY_614_DATA */ + 0x00000000, /* DENALI_PHY_615_DATA */ + 0x00000000, /* DENALI_PHY_616_DATA */ + 0x00000000, /* DENALI_PHY_617_DATA */ + 0x00000000, /* DENALI_PHY_618_DATA */ + 0x00000000, /* DENALI_PHY_619_DATA */ + 0x00000000, /* DENALI_PHY_620_DATA */ + 0x00000000, /* DENALI_PHY_621_DATA */ + 0x00000000, /* DENALI_PHY_622_DATA */ + 0x00000000, /* DENALI_PHY_623_DATA */ + 0x00000000, /* DENALI_PHY_624_DATA */ + 0x00000000, /* DENALI_PHY_625_DATA */ + 0x00000000, /* DENALI_PHY_626_DATA */ + 0x00000000, /* DENALI_PHY_627_DATA */ + 0x00000000, /* DENALI_PHY_628_DATA */ + 0x00000000, /* DENALI_PHY_629_DATA */ + 0x00000000, /* DENALI_PHY_630_DATA */ + 0x00000000, /* DENALI_PHY_631_DATA */ + 0x00000000, /* DENALI_PHY_632_DATA */ + 0x00000000, /* DENALI_PHY_633_DATA */ + 0x00000000, /* DENALI_PHY_634_DATA */ + 0x00000000, /* DENALI_PHY_635_DATA */ + 0x00000000, /* DENALI_PHY_636_DATA */ + 0x00000000, /* DENALI_PHY_637_DATA */ + 0x00000000, /* DENALI_PHY_638_DATA */ + 0x00000000, /* DENALI_PHY_639_DATA */ + 0x00000000, /* DENALI_PHY_640_DATA */ + 0x00000000, /* DENALI_PHY_641_DATA */ + 0x00000000, /* DENALI_PHY_642_DATA */ + 0x00000000, /* DENALI_PHY_643_DATA */ + 0x00000000, /* DENALI_PHY_644_DATA */ + 0x00000000, /* DENALI_PHY_645_DATA */ + 0x00000000, /* DENALI_PHY_646_DATA */ + 0x00000002, /* DENALI_PHY_647_DATA */ + 0x00000000, /* DENALI_PHY_648_DATA */ + 0x00000000, /* DENALI_PHY_649_DATA */ + 0x00000000, /* DENALI_PHY_650_DATA */ + 0x00400320, /* DENALI_PHY_651_DATA */ + 0x00000040, /* DENALI_PHY_652_DATA */ + 0x00000000, /* DENALI_PHY_653_DATA */ + 0x00000000, /* DENALI_PHY_654_DATA */ + 0x00000000, /* DENALI_PHY_655_DATA */ + 0x01000000, /* DENALI_PHY_656_DATA */ + 0x00020003, /* DENALI_PHY_657_DATA */ + 0x00000000, /* DENALI_PHY_658_DATA */ + 0x00000000, /* DENALI_PHY_659_DATA */ + 0x00000000, /* DENALI_PHY_660_DATA */ + 0x0000002a, /* DENALI_PHY_661_DATA */ + 0x00000015, /* DENALI_PHY_662_DATA */ + 0x00000015, /* DENALI_PHY_663_DATA */ + 0x0000002a, /* DENALI_PHY_664_DATA */ + 0x00000033, /* DENALI_PHY_665_DATA */ + 0x0000000c, /* DENALI_PHY_666_DATA */ + 0x0000000c, /* DENALI_PHY_667_DATA */ + 0x00000033, /* DENALI_PHY_668_DATA */ + 0x00000000, /* DENALI_PHY_669_DATA */ + 0x00000000, /* DENALI_PHY_670_DATA */ + 0x00000000, /* DENALI_PHY_671_DATA */ + 0x00030055, /* DENALI_PHY_672_DATA */ + 0x03000300, /* DENALI_PHY_673_DATA */ + 0x03000300, /* DENALI_PHY_674_DATA */ + 0x00000300, /* DENALI_PHY_675_DATA */ + 0x42080010, /* DENALI_PHY_676_DATA */ + 0x00000003, /* DENALI_PHY_677_DATA */ + 0x00000000, /* DENALI_PHY_678_DATA */ + 0x00000000, /* DENALI_PHY_679_DATA */ + 0x00000000, /* DENALI_PHY_680_DATA */ + 0x00000000, /* DENALI_PHY_681_DATA */ + 0x00000000, /* DENALI_PHY_682_DATA */ + 0x00000000, /* DENALI_PHY_683_DATA */ + 0x00000000, /* DENALI_PHY_684_DATA */ + 0x00000000, /* DENALI_PHY_685_DATA */ + 0x00000000, /* DENALI_PHY_686_DATA */ + 0x00000000, /* DENALI_PHY_687_DATA */ + 0x00000000, /* DENALI_PHY_688_DATA */ + 0x00000000, /* DENALI_PHY_689_DATA */ + 0x00000000, /* DENALI_PHY_690_DATA */ + 0x00000000, /* DENALI_PHY_691_DATA */ + 0x00000000, /* DENALI_PHY_692_DATA */ + 0x00000000, /* DENALI_PHY_693_DATA */ + 0x00000000, /* DENALI_PHY_694_DATA */ + 0x00000000, /* DENALI_PHY_695_DATA */ + 0x00000000, /* DENALI_PHY_696_DATA */ + 0x00000000, /* DENALI_PHY_697_DATA */ + 0x00000000, /* DENALI_PHY_698_DATA */ + 0x00000000, /* DENALI_PHY_699_DATA */ + 0x00000000, /* DENALI_PHY_700_DATA */ + 0x00000000, /* DENALI_PHY_701_DATA */ + 0x00000000, /* DENALI_PHY_702_DATA */ + 0x00000000, /* DENALI_PHY_703_DATA */ + 0x00000000, /* DENALI_PHY_704_DATA */ + 0x00000000, /* DENALI_PHY_705_DATA */ + 0x00000000, /* DENALI_PHY_706_DATA */ + 0x00000000, /* DENALI_PHY_707_DATA */ + 0x00000000, /* DENALI_PHY_708_DATA */ + 0x00000000, /* DENALI_PHY_709_DATA */ + 0x00000000, /* DENALI_PHY_710_DATA */ + 0x00000000, /* DENALI_PHY_711_DATA */ + 0x00000000, /* DENALI_PHY_712_DATA */ + 0x00000000, /* DENALI_PHY_713_DATA */ + 0x00000000, /* DENALI_PHY_714_DATA */ + 0x00000000, /* DENALI_PHY_715_DATA */ + 0x00000000, /* DENALI_PHY_716_DATA */ + 0x00000000, /* DENALI_PHY_717_DATA */ + 0x00000000, /* DENALI_PHY_718_DATA */ + 0x00000000, /* DENALI_PHY_719_DATA */ + 0x00000000, /* DENALI_PHY_720_DATA */ + 0x00000000, /* DENALI_PHY_721_DATA */ + 0x00000000, /* DENALI_PHY_722_DATA */ + 0x00000000, /* DENALI_PHY_723_DATA */ + 0x00000000, /* DENALI_PHY_724_DATA */ + 0x00000000, /* DENALI_PHY_725_DATA */ + 0x00000000, /* DENALI_PHY_726_DATA */ + 0x00000000, /* DENALI_PHY_727_DATA */ + 0x00000000, /* DENALI_PHY_728_DATA */ + 0x00000000, /* DENALI_PHY_729_DATA */ + 0x00000000, /* DENALI_PHY_730_DATA */ + 0x00000000, /* DENALI_PHY_731_DATA */ + 0x00000000, /* DENALI_PHY_732_DATA */ + 0x00000000, /* DENALI_PHY_733_DATA */ + 0x00000000, /* DENALI_PHY_734_DATA */ + 0x00000000, /* DENALI_PHY_735_DATA */ + 0x00000000, /* DENALI_PHY_736_DATA */ + 0x00000000, /* DENALI_PHY_737_DATA */ + 0x00000000, /* DENALI_PHY_738_DATA */ + 0x00000000, /* DENALI_PHY_739_DATA */ + 0x00000000, /* DENALI_PHY_740_DATA */ + 0x00000000, /* DENALI_PHY_741_DATA */ + 0x00000000, /* DENALI_PHY_742_DATA */ + 0x00000000, /* DENALI_PHY_743_DATA */ + 0x00000000, /* DENALI_PHY_744_DATA */ + 0x00000000, /* DENALI_PHY_745_DATA */ + 0x00000000, /* DENALI_PHY_746_DATA */ + 0x00000000, /* DENALI_PHY_747_DATA */ + 0x00000000, /* DENALI_PHY_748_DATA */ + 0x00000000, /* DENALI_PHY_749_DATA */ + 0x00000000, /* DENALI_PHY_750_DATA */ + 0x00000000, /* DENALI_PHY_751_DATA */ + 0x00000000, /* DENALI_PHY_752_DATA */ + 0x00000000, /* DENALI_PHY_753_DATA */ + 0x00000000, /* DENALI_PHY_754_DATA */ + 0x00000000, /* DENALI_PHY_755_DATA */ + 0x00000000, /* DENALI_PHY_756_DATA */ + 0x00000000, /* DENALI_PHY_757_DATA */ + 0x00000000, /* DENALI_PHY_758_DATA */ + 0x00000000, /* DENALI_PHY_759_DATA */ + 0x00000000, /* DENALI_PHY_760_DATA */ + 0x00000000, /* DENALI_PHY_761_DATA */ + 0x00000000, /* DENALI_PHY_762_DATA */ + 0x00000000, /* DENALI_PHY_763_DATA */ + 0x00000000, /* DENALI_PHY_764_DATA */ + 0x00000000, /* DENALI_PHY_765_DATA */ + 0x00000000, /* DENALI_PHY_766_DATA */ + 0x00000000, /* DENALI_PHY_767_DATA */ + 0x00000000, /* DENALI_PHY_768_DATA */ + 0x00000000, /* DENALI_PHY_769_DATA */ + 0x00000000, /* DENALI_PHY_770_DATA */ + 0x00000000, /* DENALI_PHY_771_DATA */ + 0x00000000, /* DENALI_PHY_772_DATA */ + 0x00000000, /* DENALI_PHY_773_DATA */ + 0x00000000, /* DENALI_PHY_774_DATA */ + 0x00000002, /* DENALI_PHY_775_DATA */ + 0x00000000, /* DENALI_PHY_776_DATA */ + 0x00000000, /* DENALI_PHY_777_DATA */ + 0x00000000, /* DENALI_PHY_778_DATA */ + 0x00400320, /* DENALI_PHY_779_DATA */ + 0x00000040, /* DENALI_PHY_780_DATA */ + 0x00000000, /* DENALI_PHY_781_DATA */ + 0x00000000, /* DENALI_PHY_782_DATA */ + 0x00000000, /* DENALI_PHY_783_DATA */ + 0x01000000, /* DENALI_PHY_784_DATA */ + 0x00020003, /* DENALI_PHY_785_DATA */ + 0x00000000, /* DENALI_PHY_786_DATA */ + 0x00000000, /* DENALI_PHY_787_DATA */ + 0x00000000, /* DENALI_PHY_788_DATA */ + 0x0000002a, /* DENALI_PHY_789_DATA */ + 0x00000015, /* DENALI_PHY_790_DATA */ + 0x00000015, /* DENALI_PHY_791_DATA */ + 0x0000002a, /* DENALI_PHY_792_DATA */ + 0x00000033, /* DENALI_PHY_793_DATA */ + 0x0000000c, /* DENALI_PHY_794_DATA */ + 0x0000000c, /* DENALI_PHY_795_DATA */ + 0x00000033, /* DENALI_PHY_796_DATA */ + 0x1ee6b16a, /* DENALI_PHY_797_DATA */ + 0x10000000, /* DENALI_PHY_798_DATA */ + 0x00000000, /* DENALI_PHY_799_DATA */ + 0x00030055, /* DENALI_PHY_800_DATA */ + 0x03000300, /* DENALI_PHY_801_DATA */ + 0x03000300, /* DENALI_PHY_802_DATA */ + 0x00000300, /* DENALI_PHY_803_DATA */ + 0x42080010, /* DENALI_PHY_804_DATA */ + 0x00000003, /* DENALI_PHY_805_DATA */ + 0x00000000, /* DENALI_PHY_806_DATA */ + 0x00000000, /* DENALI_PHY_807_DATA */ + 0x00000000, /* DENALI_PHY_808_DATA */ + 0x00000000, /* DENALI_PHY_809_DATA */ + 0x00000000, /* DENALI_PHY_810_DATA */ + 0x00000000, /* DENALI_PHY_811_DATA */ + 0x00000000, /* DENALI_PHY_812_DATA */ + 0x00000000, /* DENALI_PHY_813_DATA */ + 0x00000000, /* DENALI_PHY_814_DATA */ + 0x00000000, /* DENALI_PHY_815_DATA */ + 0x00000000, /* DENALI_PHY_816_DATA */ + 0x00000000, /* DENALI_PHY_817_DATA */ + 0x00000000, /* DENALI_PHY_818_DATA */ + 0x00000000, /* DENALI_PHY_819_DATA */ + 0x00000000, /* DENALI_PHY_820_DATA */ + 0x00000000, /* DENALI_PHY_821_DATA */ + 0x00000000, /* DENALI_PHY_822_DATA */ + 0x00000000, /* DENALI_PHY_823_DATA */ + 0x00000000, /* DENALI_PHY_824_DATA */ + 0x00000000, /* DENALI_PHY_825_DATA */ + 0x00000000, /* DENALI_PHY_826_DATA */ + 0x00000000, /* DENALI_PHY_827_DATA */ + 0x00000000, /* DENALI_PHY_828_DATA */ + 0x00000000, /* DENALI_PHY_829_DATA */ + 0x00000000, /* DENALI_PHY_830_DATA */ + 0x00000000, /* DENALI_PHY_831_DATA */ + 0x00000000, /* DENALI_PHY_832_DATA */ + 0x00000000, /* DENALI_PHY_833_DATA */ + 0x00000000, /* DENALI_PHY_834_DATA */ + 0x00000000, /* DENALI_PHY_835_DATA */ + 0x00000000, /* DENALI_PHY_836_DATA */ + 0x00000000, /* DENALI_PHY_837_DATA */ + 0x00000000, /* DENALI_PHY_838_DATA */ + 0x00000000, /* DENALI_PHY_839_DATA */ + 0x00000000, /* DENALI_PHY_840_DATA */ + 0x00000000, /* DENALI_PHY_841_DATA */ + 0x00000000, /* DENALI_PHY_842_DATA */ + 0x00000000, /* DENALI_PHY_843_DATA */ + 0x00000000, /* DENALI_PHY_844_DATA */ + 0x00000000, /* DENALI_PHY_845_DATA */ + 0x00000000, /* DENALI_PHY_846_DATA */ + 0x00000000, /* DENALI_PHY_847_DATA */ + 0x00000000, /* DENALI_PHY_848_DATA */ + 0x00000000, /* DENALI_PHY_849_DATA */ + 0x00000000, /* DENALI_PHY_850_DATA */ + 0x00000000, /* DENALI_PHY_851_DATA */ + 0x00000000, /* DENALI_PHY_852_DATA */ + 0x00000000, /* DENALI_PHY_853_DATA */ + 0x00000000, /* DENALI_PHY_854_DATA */ + 0x00000000, /* DENALI_PHY_855_DATA */ + 0x00000000, /* DENALI_PHY_856_DATA */ + 0x00000000, /* DENALI_PHY_857_DATA */ + 0x00000000, /* DENALI_PHY_858_DATA */ + 0x00000000, /* DENALI_PHY_859_DATA */ + 0x00000000, /* DENALI_PHY_860_DATA */ + 0x00000000, /* DENALI_PHY_861_DATA */ + 0x00000000, /* DENALI_PHY_862_DATA */ + 0x00000000, /* DENALI_PHY_863_DATA */ + 0x00000000, /* DENALI_PHY_864_DATA */ + 0x00000000, /* DENALI_PHY_865_DATA */ + 0x00000000, /* DENALI_PHY_866_DATA */ + 0x00000000, /* DENALI_PHY_867_DATA */ + 0x00000000, /* DENALI_PHY_868_DATA */ + 0x00000000, /* DENALI_PHY_869_DATA */ + 0x00000000, /* DENALI_PHY_870_DATA */ + 0x00000000, /* DENALI_PHY_871_DATA */ + 0x00000000, /* DENALI_PHY_872_DATA */ + 0x00000000, /* DENALI_PHY_873_DATA */ + 0x00000000, /* DENALI_PHY_874_DATA */ + 0x00000000, /* DENALI_PHY_875_DATA */ + 0x00000000, /* DENALI_PHY_876_DATA */ + 0x00000000, /* DENALI_PHY_877_DATA */ + 0x00000000, /* DENALI_PHY_878_DATA */ + 0x00000000, /* DENALI_PHY_879_DATA */ + 0x00000000, /* DENALI_PHY_880_DATA */ + 0x00000000, /* DENALI_PHY_881_DATA */ + 0x00000000, /* DENALI_PHY_882_DATA */ + 0x00000000, /* DENALI_PHY_883_DATA */ + 0x00000000, /* DENALI_PHY_884_DATA */ + 0x00000000, /* DENALI_PHY_885_DATA */ + 0x00000000, /* DENALI_PHY_886_DATA */ + 0x00000000, /* DENALI_PHY_887_DATA */ + 0x00000000, /* DENALI_PHY_888_DATA */ + 0x00000000, /* DENALI_PHY_889_DATA */ + 0x00000000, /* DENALI_PHY_890_DATA */ + 0x00000000, /* DENALI_PHY_891_DATA */ + 0x00000000, /* DENALI_PHY_892_DATA */ + 0x00000000, /* DENALI_PHY_893_DATA */ + 0x00000000, /* DENALI_PHY_894_DATA */ + 0x00000000, /* DENALI_PHY_895_DATA */ + 0x00000000, /* DENALI_PHY_896_DATA */ + 0x00000000, /* DENALI_PHY_897_DATA */ + 0x00000005, /* DENALI_PHY_898_DATA */ + 0x04000f01, /* DENALI_PHY_899_DATA */ + 0x00020040, /* DENALI_PHY_900_DATA */ + 0x00020055, /* DENALI_PHY_901_DATA */ + 0x00000000, /* DENALI_PHY_902_DATA */ + 0x00000000, /* DENALI_PHY_903_DATA */ + 0x00000000, /* DENALI_PHY_904_DATA */ + 0x00000050, /* DENALI_PHY_905_DATA */ + 0x00000000, /* DENALI_PHY_906_DATA */ + 0x01010100, /* DENALI_PHY_907_DATA */ + 0x00000600, /* DENALI_PHY_908_DATA */ + 0x00000000, /* DENALI_PHY_909_DATA */ + 0x00006400, /* DENALI_PHY_910_DATA */ + 0x01221102, /* DENALI_PHY_911_DATA */ + 0x00000000, /* DENALI_PHY_912_DATA */ + 0x000d1f00, /* DENALI_PHY_913_DATA */ + 0x0d1f0d1f, /* DENALI_PHY_914_DATA */ + 0x0d1f0d1f, /* DENALI_PHY_915_DATA */ + 0x00030003, /* DENALI_PHY_916_DATA */ + 0x03000300, /* DENALI_PHY_917_DATA */ + 0x00000300, /* DENALI_PHY_918_DATA */ + 0x01221102, /* DENALI_PHY_919_DATA */ + 0x00000000, /* DENALI_PHY_920_DATA */ + 0x00000000, /* DENALI_PHY_921_DATA */ + 0x03020000, /* DENALI_PHY_922_DATA */ + 0x00000001, /* DENALI_PHY_923_DATA */ + 0x00000411, /* DENALI_PHY_924_DATA */ + 0x00000411, /* DENALI_PHY_925_DATA */ + 0x00000040, /* DENALI_PHY_926_DATA */ + 0x00000040, /* DENALI_PHY_927_DATA */ + 0x00000411, /* DENALI_PHY_928_DATA */ + 0x00000411, /* DENALI_PHY_929_DATA */ + 0x00004410, /* DENALI_PHY_930_DATA */ + 0x00004410, /* DENALI_PHY_931_DATA */ + 0x00004410, /* DENALI_PHY_932_DATA */ + 0x00004410, /* DENALI_PHY_933_DATA */ + 0x00004410, /* DENALI_PHY_934_DATA */ + 0x00000411, /* DENALI_PHY_935_DATA */ + 0x00004410, /* DENALI_PHY_936_DATA */ + 0x00000411, /* DENALI_PHY_937_DATA */ + 0x00004410, /* DENALI_PHY_938_DATA */ + 0x00000411, /* DENALI_PHY_939_DATA */ + 0x00004410, /* DENALI_PHY_940_DATA */ + 0x00000000, /* DENALI_PHY_941_DATA */ + 0x00000000, /* DENALI_PHY_942_DATA */ + 0x00000000, /* DENALI_PHY_943_DATA */ + 0x64000000, /* DENALI_PHY_944_DATA */ + 0x00000000, /* DENALI_PHY_945_DATA */ + 0x00000000, /* DENALI_PHY_946_DATA */ + 0x00000508, /* DENALI_PHY_947_DATA */ + 0x00000000, /* DENALI_PHY_948_DATA */ + 0x00000000, /* DENALI_PHY_949_DATA */ + 0x00000000, /* DENALI_PHY_950_DATA */ + 0x00000000, /* DENALI_PHY_951_DATA */ + 0x00000000, /* DENALI_PHY_952_DATA */ + 0x00000000, /* DENALI_PHY_953_DATA */ + 0xe4000000, /* DENALI_PHY_954_DATA */ + 0x00000000, /* DENALI_PHY_955_DATA */ + 0x00000000, /* DENALI_PHY_956_DATA */ + 0x01010000, /* DENALI_PHY_957_DATA */ + 0x00000000 /* DENALI_PHY_958_DATA */ + } + }, +}, From patchwork Tue Jun 11 14:51:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 535 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id BCBF63F08A for ; Tue, 11 Jun 2019 16:57:24 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id a21sf9260874pgh.11 for ; Tue, 11 Jun 2019 07:57:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265043; cv=pass; d=google.com; s=arc-20160816; b=LPjyL5bIrXWxFnbBOLAR6q15VvkU/DOFB6poIuwaXlVY5eA4aBzOEGLXK/9UVbHQCz OWWmjwtVXUZwm3/2lnougdTTbcPA5HzjdoeUsM7OCNw5IqOsdLg0m3c0jIZhsdnBuuLc 7B/GnxFG70rNTUS9RxHg3Ftd5Dl6LB1VeDLt2FBvh+G6qvT9oFrEYYGPF6mTlEnqOHUp tBae8nbLk5ZnYPqKy65PPVDoZZZjnmIsolD4vcNYmxPj8gjaQaYDklj7hmulU1Tz6H9R J3ij4HNugTu/8jvWXqfQnTn0wkZj83yuLgSzfHNUdCe7/Ef+otELe7h30hHwWsVoDxij v4Uw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=25zyE7xtI9FXrh+Nr9Bh/j/zdgFK+KO6GageYimP3AQ=; b=OCLr9wBVlc7zIWjdY8fpz2OUa10KJf/wNRsIDtaX7/WKkER2MnWJOSykwxS3A/2BFP 2agG3nntKWsk5qGB0pDlTTt8T2xez9n5BwonHj47vDkGvuR4tQpDGHdc0szf2t3LLRCV EwMSfsGU2QsW0JsGmScqjXvf5xG4+sg9T7ZNWRQYiGCj06HQaKKgC68Ei5MYD0fAdJT/ 1qsJ0e+Rp7Xc2O+rOhGifW5zzdFEFkmkSnoZbrJSKKB+inU/KgpXISt8VGEYKSCQ3xuy zGgt/ni/kWKvJXfuuqxpKYibbVvKDG/Fk777bFljbM6Ldpe66FiXL0mahiMD8pqT+jz8 VH7Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="nSg/hdL5"; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=25zyE7xtI9FXrh+Nr9Bh/j/zdgFK+KO6GageYimP3AQ=; b=TAlkm9eu1j/k/sQQWufyA+BRndFvknMd8K8RPkMBJ7rPnCGwy07nNVk5ekJuH85GoL Mh1LIc5E6Hs8WwlLJMbQAMXHAUF76bBi695tlj+rcIWFMZMgeXDTAKLuxQ9ndCNfyGzZ ls5Bww734jwrkuZBLWrHoTtFHALSrUMyH6eQQ= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=25zyE7xtI9FXrh+Nr9Bh/j/zdgFK+KO6GageYimP3AQ=; b=AxRApZGA+iJOTbWSae2Lk9VsZxS/LSIX3BuXxwfWQLMn+fvgat2DeG8KrICwpqzjoZ Rn8M6UzYD9ubKm0tkUxzXf57/SXrPzvziPc3FVnxcD/7LYVMnnKPHlUHRRtU0X/tw7qi I0lAJxbmq2ZXBTO4JhSyhKUe4TEkzsR6X20ZdApsogAaflSqX3vXUiwkLtOvi0SUbX+H rLgSuV+W1QbEVkOo5Y0bAKMPRnhktvzMRoWkdxJGRi1tcVSTE1ZG6+U/nHrp3KAycHYt 6WwBJPZNt15bUICwBCWw6sPEwf55MNmMHowLQh+Y9fbzLD26m/gEp2T8Tr5kpjGuqz3j Itvg== X-Gm-Message-State: APjAAAUI1RLAdMpQqm0vpqzg1Vu8uBVEqSAbgRvE/0esgqYk7sIdS/WK s2ZINFCi2IVEJf2zOCHtmtg+yvAr X-Google-Smtp-Source: APXvYqw4SBeodoCtcjFxRE7+uXx2S4SQG00yKCT4/sJJE+IkXlh/R26Sh83CFsvL7+TLf7iKu+D9sQ== X-Received: by 2002:a17:90a:bd8c:: with SMTP id z12mr5931608pjr.60.1560265043518; Tue, 11 Jun 2019 07:57:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8614:: with SMTP id p20ls4496939pfn.14.gmail; Tue, 11 Jun 2019 07:57:23 -0700 (PDT) X-Received: by 2002:a63:2160:: with SMTP id s32mr20823236pgm.431.1560265043032; Tue, 11 Jun 2019 07:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265043; cv=none; d=google.com; s=arc-20160816; b=Mr3PgbzqNHHGI02ztQXR2iTkprOV7pEdwkNwFy09MQHoP/szFTaDN9SX5lnbfHGAlN ALof0NAp8qu0TPTmxfWR18jwy0fTKTgE5NnDSCxY9xSx8aSyvOHiWhfwXDJOiXBKpi/n 7zL5LCPwtpRVr/2zXXM8n/29429cQa0fvhKbWg7n487FyzUzH/oOv8crI/qB/m3X/1sI QhOOnWgq9kTe8JUqJTOBiVVhC/bsRrg56uKKWr2jP9Ek900Ez2/n5e/+nYA9NYRkM+y/ zHHq6C5v2Wnxgf3uFBbaXFMAtMPL3hJY1/nBHLDZVa0EahjH/FcXBRQYlIojDgdcXGrE AOhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Nyw/bYu9Igahjoolz14nJnXp5tnu0fCuX9sROc/IN48=; b=SunIRK0RysI1lhKVWhNN5ZyFq5nPx3QWhb2K50BvOoF0Vk0t+KgtsEWc1o7slzPa8Z J+YSgglREEe2g3wNgIQlLj7z9mEYtDVfh40ZvZErN0fQtVe2BPFLMSNhNu10Qpa9oB49 B8RiNOHewRlgAKhgFIS0JhMCuzENepoWotfVL+cSL5US8vtd4UtSo52iJ6CUTZWCgm70 USZzqDf5JJzXAHTpMiL7VevZTIbGtekIMpiUv/TRqupxBP/y8prirHRyrnSXzZJySnGQ DDeiaBczCFuSsqM2Bky2jYSZRP1PPYqxNs+mNb/ldA4SphPyd2qtZMMBvxEwIfLdtuNw K64w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="nSg/hdL5"; 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 w25sor13256044pfg.23.2019.06.11.07.57.23 for (Google Transport Security); Tue, 11 Jun 2019 07:57:23 -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:8817:: with SMTP id c23mr13416666pfo.146.1560265042609; Tue, 11 Jun 2019 07:57:22 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:21 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 84/92] ram: rk3399: Add lpddr4 set rate support Date: Tue, 11 Jun 2019 20:21:27 +0530 Message-Id: <20190611145135.21399-85-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="nSg/hdL5"; 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: , Unlike rest of dram type chips, LPDDR4 initialization start with at board selected frequency (say 50MHz) and then it switches into 400MHz and 800MHz simultaneously to make the proper sequence work on each channel with associated training. Here is sameple log about LPDDR4-100 init sequence in Rockpro64: Channel 0: LPDDR4, 50MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB Channel 1: LPDDR4, 50MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB 256B stride channel 0 training pass channel 1 training pass change freq to 400 MHz 0, 1 channel 0 training pass channel 1 training pass change freq to 800 MHz 1, 0 This patch add support to this init sequence via lpddr4 set rate by taking sdram timing parameters from 400, 800 .inc files. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 402 +++++++++++++++++++++++++++- 1 file changed, 393 insertions(+), 9 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 5a0872c23f..170743b88c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -62,6 +63,7 @@ struct dram_info { struct clk ddr_clk; struct rk3399_cru *cru; struct rk3399_grf_regs *grf; + struct rk3399_pmu_regs *pmu; struct rk3399_pmucru *pmucru; struct rk3399_pmusgrf_regs *pmusgrf; struct rk3399_ddr_cic_regs *cic; @@ -186,6 +188,11 @@ struct io_setting { }, }; +struct rk3399_sdram_params lpddr4_timings[] = { + #include "sdram-rk3399-lpddr4-400.inc" + #include "sdram-rk3399-lpddr4-800.inc" +}; + /** * phy = 0, PHY boot freq * phy = 1, PHY index 0 @@ -213,11 +220,30 @@ lpddr4_get_io_settings(const struct rk3399_sdram_params *params, u32 mr5) return io; } +static void *get_denali_phy(const struct chan_info *chan, + struct rk3399_sdram_params *params, bool reg) +{ + return reg ? &chan->publ->denali_phy : ¶ms->phy_regs.denali_phy; +} + +static void *get_denali_ctl(const struct chan_info *chan, + struct rk3399_sdram_params *params, bool reg) +{ + return reg ? &chan->pctl->denali_ctl : ¶ms->pctl_regs.denali_ctl; +} + static void *get_ddrc0_con(struct dram_info *dram, u8 channel) { return (channel == 0) ? &dram->grf->ddrc0_con0 : &dram->grf->ddrc0_con1; } +static u32 lpddr4_get_phy(struct rk3399_sdram_params *params, u32 ctl) +{ + u32 lpddr4_phy[] = {1, 0, 0xb}; + + return lpddr4_phy[ctl]; +} + static u32 get_ddr_stride(struct rk3399_pmusgrf_regs *pmusgrf) { return ((readl(&pmusgrf->soc_con4) >> 10) & 0x1F); @@ -579,10 +605,11 @@ static int phy_io_config(const struct chan_info *chan, } static void set_ds_odt(const struct chan_info *chan, - const struct rk3399_sdram_params *sdram_params, u32 mr5) + struct rk3399_sdram_params *sdram_params, + bool ctl_phy_reg, u32 mr5) { - u32 *denali_phy = chan->publ->denali_phy; - u32 *denali_ctl = chan->pctl->denali_ctl; + u32 *denali_phy = get_denali_phy(chan, sdram_params, ctl_phy_reg); + u32 *denali_ctl = get_denali_ctl(chan, sdram_params, ctl_phy_reg); u32 tsel_idle_en, tsel_wr_en, tsel_rd_en; u32 tsel_idle_select_p, tsel_rd_select_p; u32 tsel_idle_select_n, tsel_rd_select_n; @@ -740,7 +767,8 @@ static void set_ds_odt(const struct chan_info *chan, clrsetbits_le32(&denali_phy[928], 0xff, reg_value); /* phy_pad_rst_drive 8bits DENALI_PHY_937 offset_0 */ - clrsetbits_le32(&denali_phy[937], 0xff, reg_value); + if (!ctl_phy_reg) + clrsetbits_le32(&denali_phy[937], 0xff, reg_value); /* phy_pad_cke_drive 8bits DENALI_PHY_935 offset_0 */ clrsetbits_le32(&denali_phy[935], 0xff, reg_value); @@ -930,7 +958,7 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, copy_to_reg(&denali_phy[512], ¶ms_phy[512], (549 - 512 + 1) * 4); copy_to_reg(&denali_phy[640], ¶ms_phy[640], (677 - 640 + 1) * 4); copy_to_reg(&denali_phy[768], ¶ms_phy[768], (805 - 768 + 1) * 4); - set_ds_odt(chan, sdram_params, 0); + set_ds_odt(chan, sdram_params, true, 0); /* * phy_dqs_tsel_wr_timing_X 8bits DENALI_PHY_84/212/340/468 offset_8 @@ -1317,7 +1345,7 @@ static int data_training(const struct chan_info *chan, u32 channel, if (training_flag == PI_FULL_TRAINING) { if (sdram_params->base.dramtype == LPDDR4) { - training_flag = PI_CA_TRAINING | PI_WRITE_LEVELING | + training_flag = PI_WRITE_LEVELING | PI_READ_GATE_TRAINING | PI_READ_LEVELING | PI_WDQ_LEVELING; } else if (sdram_params->base.dramtype == LPDDR3) { @@ -1812,6 +1840,357 @@ end: return ret; } +static void lpddr4_copy_phy(struct dram_info *dram, + struct rk3399_sdram_params *params, u32 phy, + struct rk3399_sdram_params *timings, + u32 channel) +{ + u32 *denali_phy; + u32 *denali_phy_params; + u32 speed = 0; + u32 mr5; + + denali_phy = dram->chan[channel].publ->denali_phy; + denali_phy_params = timings->phy_regs.denali_phy; + + /* switch index */ + clrsetbits_le32(&denali_phy_params[896], 0x3 << 8, phy << 8); + writel(denali_phy_params[896], &denali_phy[896]); + + /* phy_pll_ctrl_ca, phy_pll_ctrl */ + writel(denali_phy_params[911], &denali_phy[911]); + + /* phy_low_freq_sel */ + clrsetbits_le32(&denali_phy[913], 0x1, + denali_phy_params[913] & 0x1); + + /* PHY_GRP_SLAVE_DELAY_X, phy_cslvl_dly_step */ + writel(denali_phy_params[916], &denali_phy[916]); + writel(denali_phy_params[917], &denali_phy[917]); + writel(denali_phy_params[918], &denali_phy[918]); + + /* phy_adrZ_sw_wraddr_shift_X */ + writel(denali_phy_params[512], &denali_phy[512]); + clrsetbits_le32(&denali_phy[513], 0xFFFF, + denali_phy_params[513] & 0xFFFF); + writel(denali_phy_params[640], &denali_phy[640]); + clrsetbits_le32(&denali_phy[641], 0xFFFF, + denali_phy_params[641] & 0xFFFF); + writel(denali_phy_params[768], &denali_phy[768]); + clrsetbits_le32(&denali_phy[769], 0xFFFF, + denali_phy_params[769] & 0xFFFF); + + writel(denali_phy_params[544], &denali_phy[544]); + writel(denali_phy_params[545], &denali_phy[545]); + writel(denali_phy_params[546], &denali_phy[546]); + writel(denali_phy_params[547], &denali_phy[547]); + + writel(denali_phy_params[672], &denali_phy[672]); + writel(denali_phy_params[673], &denali_phy[673]); + writel(denali_phy_params[674], &denali_phy[674]); + writel(denali_phy_params[675], &denali_phy[675]); + + writel(denali_phy_params[800], &denali_phy[800]); + writel(denali_phy_params[801], &denali_phy[801]); + writel(denali_phy_params[802], &denali_phy[802]); + writel(denali_phy_params[803], &denali_phy[803]); + + /* + * phy_adr_master_delay_start_X + * phy_adr_master_delay_step_X + * phy_adr_master_delay_wait_X + */ + writel(denali_phy_params[548], &denali_phy[548]); + writel(denali_phy_params[676], &denali_phy[676]); + writel(denali_phy_params[804], &denali_phy[804]); + + /* phy_adr_calvl_dly_step_X */ + writel(denali_phy_params[549], &denali_phy[549]); + writel(denali_phy_params[677], &denali_phy[677]); + writel(denali_phy_params[805], &denali_phy[805]); + + /* + * phy_clk_wrdm_slave_delay_X + * phy_clk_wrdqZ_slave_delay_X + * phy_clk_wrdqs_slave_delay_X + */ + copy_to_reg((u32 *)&denali_phy[59], (u32 *)&denali_phy_params[59], + (63 - 58) * 4); + copy_to_reg((u32 *)&denali_phy[187], (u32 *)&denali_phy_params[187], + (191 - 186) * 4); + copy_to_reg((u32 *)&denali_phy[315], (u32 *)&denali_phy_params[315], + (319 - 314) * 4); + copy_to_reg((u32 *)&denali_phy[443], (u32 *)&denali_phy_params[443], + (447 - 442) * 4); + + /* + * phy_dqs_tsel_wr_timing_X 8bits DENALI_PHY_84/212/340/468 offset_8 + * dqs_tsel_wr_end[7:4] add Half cycle + * phy_dq_tsel_wr_timing_X 8bits DENALI_PHY_83/211/339/467 offset_8 + * dq_tsel_wr_end[7:4] add Half cycle + */ + writel(denali_phy_params[83] + (0x10 << 16), &denali_phy[83]); + writel(denali_phy_params[84] + (0x10 << 8), &denali_phy[84]); + writel(denali_phy_params[85], &denali_phy[85]); + + writel(denali_phy_params[211] + (0x10 << 16), &denali_phy[211]); + writel(denali_phy_params[212] + (0x10 << 8), &denali_phy[212]); + writel(denali_phy_params[213], &denali_phy[213]); + + writel(denali_phy_params[339] + (0x10 << 16), &denali_phy[339]); + writel(denali_phy_params[340] + (0x10 << 8), &denali_phy[340]); + writel(denali_phy_params[341], &denali_phy[341]); + + writel(denali_phy_params[467] + (0x10 << 16), &denali_phy[467]); + writel(denali_phy_params[468] + (0x10 << 8), &denali_phy[468]); + writel(denali_phy_params[469], &denali_phy[469]); + + /* + * phy_gtlvl_resp_wait_cnt_X + * phy_gtlvl_dly_step_X + * phy_wrlvl_resp_wait_cnt_X + * phy_gtlvl_final_step_X + * phy_gtlvl_back_step_X + * phy_rdlvl_dly_step_X + * + * phy_master_delay_step_X + * phy_master_delay_wait_X + * phy_wrlvl_dly_step_X + * phy_rptr_update_X + * phy_wdqlvl_dly_step_X + */ + writel(denali_phy_params[87], &denali_phy[87]); + writel(denali_phy_params[88], &denali_phy[88]); + writel(denali_phy_params[89], &denali_phy[89]); + writel(denali_phy_params[90], &denali_phy[90]); + + writel(denali_phy_params[215], &denali_phy[215]); + writel(denali_phy_params[216], &denali_phy[216]); + writel(denali_phy_params[217], &denali_phy[217]); + writel(denali_phy_params[218], &denali_phy[218]); + + writel(denali_phy_params[343], &denali_phy[343]); + writel(denali_phy_params[344], &denali_phy[344]); + writel(denali_phy_params[345], &denali_phy[345]); + writel(denali_phy_params[346], &denali_phy[346]); + + writel(denali_phy_params[471], &denali_phy[471]); + writel(denali_phy_params[472], &denali_phy[472]); + writel(denali_phy_params[473], &denali_phy[473]); + writel(denali_phy_params[474], &denali_phy[474]); + + /* + * phy_gtlvl_lat_adj_start_X + * phy_gtlvl_rddqs_slv_dly_start_X + * phy_rdlvl_rddqs_dq_slv_dly_start_X + * phy_wdqlvl_dqdm_slv_dly_start_X + */ + writel(denali_phy_params[80], &denali_phy[80]); + writel(denali_phy_params[81], &denali_phy[81]); + + writel(denali_phy_params[208], &denali_phy[208]); + writel(denali_phy_params[209], &denali_phy[209]); + + writel(denali_phy_params[336], &denali_phy[336]); + writel(denali_phy_params[337], &denali_phy[337]); + + writel(denali_phy_params[464], &denali_phy[464]); + writel(denali_phy_params[465], &denali_phy[465]); + + /* + * phy_master_delay_start_X + * phy_sw_master_mode_X + * phy_rddata_en_tsel_dly_X + */ + writel(denali_phy_params[86], &denali_phy[86]); + writel(denali_phy_params[214], &denali_phy[214]); + writel(denali_phy_params[342], &denali_phy[342]); + writel(denali_phy_params[470], &denali_phy[470]); + + /* + * phy_rddqZ_slave_delay_X + * phy_rddqs_dqZ_fall_slave_delay_X + * phy_rddqs_dqZ_rise_slave_delay_X + * phy_rddqs_dm_fall_slave_delay_X + * phy_rddqs_dm_rise_slave_delay_X + * phy_rddqs_gate_slave_delay_X + * phy_wrlvl_delay_early_threshold_X + * phy_write_path_lat_add_X + * phy_rddqs_latency_adjust_X + * phy_wrlvl_delay_period_threshold_X + * phy_wrlvl_early_force_zero_X + */ + copy_to_reg((u32 *)&denali_phy[64], (u32 *)&denali_phy_params[64], + (67 - 63) * 4); + clrsetbits_le32(&denali_phy[68], 0xFFFFFC00, + denali_phy_params[68] & 0xFFFFFC00); + copy_to_reg((u32 *)&denali_phy[69], (u32 *)&denali_phy_params[69], + (79 - 68) * 4); + copy_to_reg((u32 *)&denali_phy[192], (u32 *)&denali_phy_params[192], + (195 - 191) * 4); + clrsetbits_le32(&denali_phy[196], 0xFFFFFC00, + denali_phy_params[196] & 0xFFFFFC00); + copy_to_reg((u32 *)&denali_phy[197], (u32 *)&denali_phy_params[197], + (207 - 196) * 4); + copy_to_reg((u32 *)&denali_phy[320], (u32 *)&denali_phy_params[320], + (323 - 319) * 4); + clrsetbits_le32(&denali_phy[324], 0xFFFFFC00, + denali_phy_params[324] & 0xFFFFFC00); + copy_to_reg((u32 *)&denali_phy[325], (u32 *)&denali_phy_params[325], + (335 - 324) * 4); + + copy_to_reg((u32 *)&denali_phy[448], (u32 *)&denali_phy_params[448], + (451 - 447) * 4); + clrsetbits_le32(&denali_phy[452], 0xFFFFFC00, + denali_phy_params[452] & 0xFFFFFC00); + copy_to_reg((u32 *)&denali_phy[453], (u32 *)&denali_phy_params[453], + (463 - 452) * 4); + + /* phy_two_cyc_preamble_X */ + clrsetbits_le32(&denali_phy[7], 0x3 << 24, + denali_phy_params[7] & (0x3 << 24)); + clrsetbits_le32(&denali_phy[135], 0x3 << 24, + denali_phy_params[135] & (0x3 << 24)); + clrsetbits_le32(&denali_phy[263], 0x3 << 24, + denali_phy_params[263] & (0x3 << 24)); + clrsetbits_le32(&denali_phy[391], 0x3 << 24, + denali_phy_params[391] & (0x3 << 24)); + + /* speed */ + if (timings->base.ddr_freq < 400 * MHz) + speed = 0x0; + else if (timings->base.ddr_freq < 800 * MHz) + speed = 0x1; + else if (timings->base.ddr_freq < 1200 * MHz) + speed = 0x2; + + /* PHY_924 PHY_PAD_FDBK_DRIVE */ + clrsetbits_le32(&denali_phy[924], 0x3 << 21, speed << 21); + /* PHY_926 PHY_PAD_DATA_DRIVE */ + clrsetbits_le32(&denali_phy[926], 0x3 << 9, speed << 9); + /* PHY_927 PHY_PAD_DQS_DRIVE */ + clrsetbits_le32(&denali_phy[927], 0x3 << 9, speed << 9); + /* PHY_928 PHY_PAD_ADDR_DRIVE */ + clrsetbits_le32(&denali_phy[928], 0x3 << 17, speed << 17); + /* PHY_929 PHY_PAD_CLK_DRIVE */ + clrsetbits_le32(&denali_phy[929], 0x3 << 17, speed << 17); + /* PHY_935 PHY_PAD_CKE_DRIVE */ + clrsetbits_le32(&denali_phy[935], 0x3 << 17, speed << 17); + /* PHY_937 PHY_PAD_RST_DRIVE */ + clrsetbits_le32(&denali_phy[937], 0x3 << 17, speed << 17); + /* PHY_939 PHY_PAD_CS_DRIVE */ + clrsetbits_le32(&denali_phy[939], 0x3 << 17, speed << 17); + + read_mr(dram->chan[channel].pctl, 1, 5, &mr5); + set_ds_odt(&dram->chan[channel], timings, true, mr5); + + /* + * if phy_sw_master_mode_X not bypass mode, + * clear PHY_SLICE_PWR_RDC_DISABLE. + * NOTE: need use timings, not ddr_publ_regs + */ + if (!((denali_phy_params[86] >> 8) & (1 << 2))) { + clrbits_le32(&denali_phy[10], 1 << 16); + clrbits_le32(&denali_phy[138], 1 << 16); + clrbits_le32(&denali_phy[266], 1 << 16); + clrbits_le32(&denali_phy[394], 1 << 16); + } +} + +static void lpddr4_set_phy(struct dram_info *dram, + struct rk3399_sdram_params *params, u32 phy, + struct rk3399_sdram_params *timings) +{ + u32 channel; + + for (channel = 0; channel < 2; channel++) + lpddr4_copy_phy(dram, params, phy, timings, channel); +} + +static int lpddr4_set_ctl(struct dram_info *dram, + struct rk3399_sdram_params *params, u32 ctl, u32 hz) +{ + u32 channel; + int ret_clk, ret[2]; + + /* cci idle req stall */ + writel(0x70007, &dram->grf->soc_con0); + + /* enable all clk */ + setbits_le32(&dram->pmu->pmu_noc_auto_ena, (0x3 << 7)); + + /* idle */ + setbits_le32(&dram->pmu->pmu_bus_idle_req, (0x3 << 18)); + while ((readl(&dram->pmu->pmu_bus_idle_st) & (0x3 << 18)) + != (0x3 << 18)) + ; + + /* change freq */ + writel((((0x3 << 4) | (1 << 2) | 1) << 16) | + (ctl << 4) | (1 << 2) | 1, &dram->cic->cic_ctrl0); + while (!(readl(&dram->cic->cic_status0) & (1 << 2))) + ; + + ret_clk = clk_set_rate(&dram->ddr_clk, hz); + if (ret_clk < 0) { + printf("%s clk set failed %d\n", __func__, ret_clk); + return ret_clk; + } + + writel(0x20002, &dram->cic->cic_ctrl0); + while (!(readl(&dram->cic->cic_status0) & (1 << 0))) + ; + + /* deidle */ + clrbits_le32(&dram->pmu->pmu_bus_idle_req, (0x3 << 18)); + while (readl(&dram->pmu->pmu_bus_idle_st) & (0x3 << 18)) + ; + + /* clear enable all clk */ + clrbits_le32(&dram->pmu->pmu_noc_auto_ena, (0x3 << 7)); + + /* LPDDR4 ctl2 can not do training, all training will fail */ + if (!(params->base.dramtype == LPDDR4 && ctl == 2)) { + for (channel = 0; channel < 2; channel++) { + if (!(params->ch[channel].cap_info.col)) + continue; + ret[channel] = data_training(&dram->chan[channel], + channel, params, + PI_FULL_TRAINING); + } + for (channel = 0; channel < 2; channel++) { + if (!(params->ch[channel].cap_info.col)) + continue; + if (ret[channel]) + printf("%s: channel %d training failed!\n", + __func__, channel); + else + debug("%s: channel %d training pass\n", + __func__, channel); + } + } + + return 0; +} + +static void lpddr4_set_rate(struct dram_info *dram, + struct rk3399_sdram_params *params) +{ + u32 ctl; + u32 phy; + + for (ctl = 0; ctl < 2; ctl++) { + phy = lpddr4_get_phy(params, ctl); + + lpddr4_set_phy(dram, params, phy, &lpddr4_timings[ctl]); + lpddr4_set_ctl(dram, params, ctl, + lpddr4_timings[ctl].base.ddr_freq); + + debug("%s: change freq to %d MHz %d, %d\n", __func__, + lpddr4_timings[ctl].base.ddr_freq / MHz, ctl, phy); + } +} + static void clear_channel_params(struct rk3399_sdram_params *params, u8 channel) { params->ch[channel].cap_info.rank = 0; @@ -1943,7 +2322,11 @@ static int sdram_init(struct dram_info *dram, sdram_params->base.stride = calculate_stride(sdram_params); dram_all_config(dram, sdram_params); - switch_to_phy_index1(dram, sdram_params); + + if (sdram_params->base.dramtype == LPDDR4) + lpddr4_set_rate(dram, sdram_params); + else + switch_to_phy_index1(dram, sdram_params); debug("Finish SDRAM initialization...\n"); return 0; @@ -2007,6 +2390,7 @@ static int rk3399_dmc_init(struct udevice *dev) priv->cic = syscon_get_first_range(ROCKCHIP_SYSCON_CIC); priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF); + priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU); priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); priv->pmusgrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUSGRF); priv->pmucru = rockchip_get_pmucru(); @@ -2025,8 +2409,8 @@ static int rk3399_dmc_init(struct udevice *dev) priv->chan[0].publ, priv->chan[0].msch, priv->chan[1].pctl, priv->chan[1].pi, priv->chan[1].publ, priv->chan[1].msch); - debug("cru %p, cic %p, grf %p, sgrf %p, pmucru %p\n", priv->cru, - priv->cic, priv->pmugrf, priv->pmusgrf, priv->pmucru); + debug("cru %p, cic %p, grf %p, sgrf %p, pmucru %p, pmu %p\n", priv->cru, + priv->cic, priv->pmugrf, priv->pmusgrf, priv->pmucru, priv->pmu); #if CONFIG_IS_ENABLED(OF_PLATDATA) ret = clk_get_by_index_platdata(dev, 0, dtplat->clocks, &priv->ddr_clk); #else From patchwork Tue Jun 11 14:51:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 536 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4A6E83F08A for ; Tue, 11 Jun 2019 16:57:28 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id r142sf8485025pfc.2 for ; Tue, 11 Jun 2019 07:57:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265047; cv=pass; d=google.com; s=arc-20160816; b=gSKOn+gCF3wcEiZbquFugJPyyHLJvI6/TCIQ2tEkDoIxpod1K25Y+K5pOAPZftFb7N GAWpjLM3ynJorSIPXNu7U7k67Z8NTvE9olad5sq6B8pJvLQuml7uRVBGnqzDa4E1Hs7H dym11U+fFUP1FYy0N/6bqv8ib4jsIEjjDJdqxqXf1tBC0ZRUFFT1DhGCdduLyQ63OB/J QJusIGrKWeaMlwtZKAp6us1wfwzDCP1sOBGGLatW6po2Kxb4a77dq+affcOXdg+uomaN EMePrA746Rmq3fGwVgv2l+35zp+RV6WDWFNAhpHJutDozbNmlpP4vE37pfVG1Ej0ZkV2 ceHA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TuIkNaOG6WQziKBssjTwAi/XtnMCApTf7h9q9mRSIms=; b=ctbPGmq32P2pjSrRJsu0b/DCOcwOg5rNRyoewTRy3OJVhUMLLyfyBrcRf2b7icheuv 5cjd5kTPN4I4M0tuHwF+2RvY/o1xxQR9v6h4DiMGdqq5zwgetyPgoiS9noah2XF+iKDR 4iuIpEnr241mhhFCFoL+4wbLa8qaEYUBiO1z37BNgwh2+LsHWxb9XuuXB2oXKxYRLCOH f5WCUgkpv2nPvjWxwS/u8PKJ8B7mI6OrpWaCjrMWITfHA3SbWEjBtyzoD9bFK4DRi96L FrD2OWOwpOw6kogQ5fT6ZXRjyIXI/zD2niybMUyVOr0p5IjG2PmBwTx+Lg3xDfqnhwCq dR8Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HHpuDAN9; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=TuIkNaOG6WQziKBssjTwAi/XtnMCApTf7h9q9mRSIms=; b=eIzx7SfCX6T31eXM7PZWF5OjMDCeC0L7mic3OoeNsyI+3jeYhq8YCruNi589M7kCAO Mc+cC0ex+1wQ0kRBJXZEXGhcYx7TI65SGanauUY8cVj5M51TMJjQKdnXl9DOX3AHtfSa R0Tbi8FWpalOPWGLM5zq1ybpwZ3cS4xkRGT+g= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=TuIkNaOG6WQziKBssjTwAi/XtnMCApTf7h9q9mRSIms=; b=KN95ISZrSO8NU6Pw1/QaxDZ6QHSB5c2AuKjcD+OZO8jec11KJhZNlqSwMu+1mFy4A7 OKUWIceETMK7qsEJ96X2ahOjDdcMdQWbZrfS7uUc/fe+CLuS2g83EAhAwyIwcf+k1obV T+9zFMraiUgChJb10Q3+jRIVacUnW2BM6v47krYxfdVb0Bxm+kawDzyUZSzw20Vj1gix MYBNpWO+mWu9K/K6PsyBD016fFQSwkcOoWBN7SGqAFyFE7mC23F7DEe+ykfEFMDQeNVk Bt3t2mnSsFZGY5RKz1uCMzcW8yYMZE9VBGXn2uhEUdZp47wKItygRGSjqN3up3MrHk7N an1Q== X-Gm-Message-State: APjAAAWmwT9YXPU/4TMrg93qw2VfzuEaTdxD2/FBzzaSo2yPJYlmBwLc sHN3xW1sCQ202bdivDp8gTFoudSl X-Google-Smtp-Source: APXvYqzDSYkTl7H986CSVT7sY9BNB+bNyraiFJArP8JtGsr2cIZAR02DkSv+m6c7NWmQtcNiGWZz+g== X-Received: by 2002:a63:1d1d:: with SMTP id d29mr10652992pgd.259.1560265047029; Tue, 11 Jun 2019 07:57:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a986:: with SMTP id bh6ls4899464plb.8.gmail; Tue, 11 Jun 2019 07:57:26 -0700 (PDT) X-Received: by 2002:a17:90a:22c6:: with SMTP id s64mr27678765pjc.5.1560265046696; Tue, 11 Jun 2019 07:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265046; cv=none; d=google.com; s=arc-20160816; b=ZEGzZN5N/Qe/ZzfeofaLEZCyEYZcM5E6SXg0/LoqhsnBxjtpBihKDSM2z+7Y+Z9ceI RA9soJK7bvlhzaJ0ekI7AnlEhi6FY/ZzRTwHx7MUPA0o8Jel6e0jq7COL3OxJl8FtpF/ PUbSzIJ1xm3K9b9hVYcF4rLM5Ys0YN2N5Qb9atCEOTsJN97BZLprQ5s1H+FSqBnH8FAz HeQPhEQir3nmgUDI6X/upqY8K3SwPEMXNth63t/3j/GNux+FUUpuqx9WtN/gOKgucgtl sOasAQFaqJ4JGp02aYlR55AKZ1A15LJupxgPbAX+MJoS3oR0iyMWlPQe/drJu+LfUXdx lgzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=UVRL2lvN+p279wEcfIbu5WA0St4e0Lg4BnrdGwXHOO4=; b=eUAQdHgrineYMcjZe5cx0VmkRU7lAvaqVZndpi+WZ1+16/FqOoNS0eq/J2+wOMTw92 Fw8y0Bf1Akh2nmgQd1dwBSon+Ur6iMVUPtLnXAyQB/G4hIlFM1zRJW9UL81VCr+x2JV9 vPYRE19fhtn3ue8RTu+xoQpJBPQyT2pc7LGq+f3zw8G+aPDRsWLck5ATTy+iF0n9pQs/ 6vfVx7guZaxbgenqouVJjtxI5HWHxFUE45epBTGvzskaOkH10Zsf7xfjUAl0j5xxwFiV MOTpVlD9nDoDK1HjATGJRd1N2QMKt3yd6sJOyx0FNdCAVQOStD1LslGAvvjvR35vFFi0 jTpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HHpuDAN9; 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 f32sor2037806pje.11.2019.06.11.07.57.26 for (Google Transport Security); Tue, 11 Jun 2019 07:57:26 -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:a17:90a:37ac:: with SMTP id v41mr14311701pjb.6.1560265046258; Tue, 11 Jun 2019 07:57:26 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:25 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 85/92] ram: rk3399: Set lpddr4 dq odt Date: Tue, 11 Jun 2019 20:21:28 +0530 Message-Id: <20190611145135.21399-86-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HHpuDAN9; 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: , Set DQ ODT based identified controller in lpddr4 as part of LPDDR set rate initialization phase. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 80 ++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 170743b88c..fc9958de17 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -220,6 +220,12 @@ lpddr4_get_io_settings(const struct rk3399_sdram_params *params, u32 mr5) return io; } +static void *get_denali_pi(const struct chan_info *chan, + struct rk3399_sdram_params *params, bool reg) +{ + return reg ? &chan->pi->denali_pi : ¶ms->pi_regs.denali_pi; +} + static void *get_denali_phy(const struct chan_info *chan, struct rk3399_sdram_params *params, bool reg) { @@ -244,6 +250,13 @@ static u32 lpddr4_get_phy(struct rk3399_sdram_params *params, u32 ctl) return lpddr4_phy[ctl]; } +static u32 lpddr4_get_ctl(struct rk3399_sdram_params *params, u32 phy) +{ + u32 lpddr4_ctl[] = {1, 0, 2}; + + return lpddr4_ctl[phy]; +} + static u32 get_ddr_stride(struct rk3399_pmusgrf_regs *pmusgrf) { return ((readl(&pmusgrf->soc_con4) >> 10) & 0x1F); @@ -1840,16 +1853,65 @@ end: return ret; } +static void set_lpddr4_dq_odt(const struct chan_info *chan, + struct rk3399_sdram_params *params, u32 ctl, + bool en, bool ctl_phy_reg, u32 mr5) +{ + u32 *denali_ctl = get_denali_ctl(chan, params, ctl_phy_reg); + u32 *denali_pi = get_denali_pi(chan, params, ctl_phy_reg); + struct io_setting *io; + u32 reg_value; + + if (!en) + return; + + io = lpddr4_get_io_settings(params, mr5); + + reg_value = io->dq_odt; + + switch (ctl) { + case 0: + clrsetbits_le32(&denali_ctl[139], 0x7 << 24, reg_value << 24); + clrsetbits_le32(&denali_ctl[153], 0x7 << 24, reg_value << 24); + + clrsetbits_le32(&denali_pi[132], 0x7 << 0, (reg_value << 0)); + clrsetbits_le32(&denali_pi[139], 0x7 << 16, (reg_value << 16)); + clrsetbits_le32(&denali_pi[147], 0x7 << 0, (reg_value << 0)); + clrsetbits_le32(&denali_pi[154], 0x7 << 16, (reg_value << 16)); + break; + case 1: + clrsetbits_le32(&denali_ctl[140], 0x7 << 0, reg_value << 0); + clrsetbits_le32(&denali_ctl[154], 0x7 << 0, reg_value << 0); + + clrsetbits_le32(&denali_pi[129], 0x7 << 16, (reg_value << 16)); + clrsetbits_le32(&denali_pi[137], 0x7 << 0, (reg_value << 0)); + clrsetbits_le32(&denali_pi[144], 0x7 << 16, (reg_value << 16)); + clrsetbits_le32(&denali_pi[152], 0x7 << 0, (reg_value << 0)); + break; + case 2: + default: + clrsetbits_le32(&denali_ctl[140], 0x7 << 8, (reg_value << 8)); + clrsetbits_le32(&denali_ctl[154], 0x7 << 8, (reg_value << 8)); + + clrsetbits_le32(&denali_pi[127], 0x7 << 0, (reg_value << 0)); + clrsetbits_le32(&denali_pi[134], 0x7 << 16, (reg_value << 16)); + clrsetbits_le32(&denali_pi[142], 0x7 << 0, (reg_value << 0)); + clrsetbits_le32(&denali_pi[149], 0x7 << 16, (reg_value << 16)); + break; + } +} + static void lpddr4_copy_phy(struct dram_info *dram, struct rk3399_sdram_params *params, u32 phy, struct rk3399_sdram_params *timings, u32 channel) { - u32 *denali_phy; + u32 *denali_ctl, *denali_phy; u32 *denali_phy_params; u32 speed = 0; - u32 mr5; + u32 ctl, mr5; + denali_ctl = dram->chan[channel].pctl->denali_ctl; denali_phy = dram->chan[channel].publ->denali_phy; denali_phy_params = timings->phy_regs.denali_phy; @@ -2084,6 +2146,9 @@ static void lpddr4_copy_phy(struct dram_info *dram, read_mr(dram->chan[channel].pctl, 1, 5, &mr5); set_ds_odt(&dram->chan[channel], timings, true, mr5); + ctl = lpddr4_get_ctl(timings, phy); + set_lpddr4_dq_odt(&dram->chan[channel], timings, ctl, true, true, mr5); + /* * if phy_sw_master_mode_X not bypass mode, * clear PHY_SLICE_PWR_RDC_DISABLE. @@ -2095,6 +2160,17 @@ static void lpddr4_copy_phy(struct dram_info *dram, clrbits_le32(&denali_phy[266], 1 << 16); clrbits_le32(&denali_phy[394], 1 << 16); } + + /* + * when PHY_PER_CS_TRAINING_EN=1, W2W_DIFFCS_DLY_Fx can't + * smaller than 8 + * NOTE: need use timings, not ddr_publ_regs + */ + if ((denali_phy_params[84] >> 16) & 1) { + if (((readl(&denali_ctl[217 + ctl]) >> 16) & 0x1f) < 8) + clrsetbits_le32(&denali_ctl[217 + ctl], + 0x1f << 16, 8 << 16); + } } static void lpddr4_set_phy(struct dram_info *dram, From patchwork Tue Jun 11 14:51:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 537 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 725A63F08A for ; Tue, 11 Jun 2019 16:57:32 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id a125sf9773066pfa.13 for ; Tue, 11 Jun 2019 07:57:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265051; cv=pass; d=google.com; s=arc-20160816; b=VNsyGios8N2b9boTBFJKFV05C56ly8sodXOkneWplnTYxBD9kQ/A+BEtAuZl7itO3D xaYGDWljHNlGetpUap92LPK0R3F6pb2wD1bN9OStAMIvuzttRa2Y6E71mw3GPDYXqKXe 0fSFIVTNQwM1OP9loA1kppWtsYcwU/D4sFs1tKTUdf86DXmXaaj2Mhlua9Si0ZCxQKyZ vHjRoG4sDDVpgMgRq0yBXyFrRGJ9LPms1LTqpTN1EaBn+Yo0N0dND9Zqa3k1VNRT0PzG DSp/OXlkBByz0eCMyfd2J00HuqCiWlQiXnPwJbsUAfbj7dNSrn/k12idEToxpNKX2zuo /79g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=8n+APpNrA1wSoYtKfqjEaJLGwiaIQ6995MjJFh31Imc=; b=Ou4k1kQbhC/MFQY7bz1YIhX8k8c+DbHGA5r9oIXo8uGPmEjRR8cCxPOxN/a1Npd7Xb aVGjWAJp8ed+96uY812lKhpKh9j+T4GbFeEZwyOel+9yjcpUolpAZQcDjFZMLuBnmP1T VrvRR22+g9uGwkGXHut+DP1sniWnRpTv6yx2G3mX4GMS6K0RjtICj1BGKSu7ADFOnNU1 N7YuEYYGqnx320jXJxpv/CRYovyBcKWQuA6Hx09tdBvG84ufL5G07p30QAYEAY7E3StQ a/umbI+PKmstImaG6jdUsZqIhTkpSfWf0SgQJ8nWm+JOP1FT+0TQRu0ej+Q6Q5mA4jvL mkKg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Chvo+ClQ; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=8n+APpNrA1wSoYtKfqjEaJLGwiaIQ6995MjJFh31Imc=; b=VaOL6HjFHKXpPax5v9UbA+ktncXQIMQhjUtiKSHEFqS6jAvnCBHNGdbdg/vV1c22ND wJf0dczhNAS430bLlZ9qFZPG5nwOprO7s6+Of9xKqyc7rUoI4LuBYjYk3t+4u3lUCE9f pT00lemTSAph8SIxZiwAkjt7r/xQVooxWsdfU= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=8n+APpNrA1wSoYtKfqjEaJLGwiaIQ6995MjJFh31Imc=; b=e3r8PHlfbjkK9Y+D+gdRxKejw6u3oMcrKH77Im6Hpf4x9rwzw4v5zTvh39DBDw5oMI q8P38s1DpjBFqYTuDt4ykZmxHlCG4Ilh35eREXuznjVxBzXHoDFgLuVx7ET/Jo9IXfng X1Mt7WaAJ/z9nJwbCm7A+vQ88oxm9ZLkCJOheRwqPX+0lNuF2A+xURlwe7KjIlVm70Pg 3fugU7tnuS7IlQ/+hR//ftcXRimUFAL1nFmn9sARdtaI31Xhpd3arWN5XV1vaQVFBdk8 Fis3Ly5OHeAEwG0beshNB9F5rSBFAG2CprLsCwphyzZ/SZ3OoVWKJFoO/ZTN2Kg8A8Ji 8lvw== X-Gm-Message-State: APjAAAVumCo6FsXB+GGShDnjEIqNV+5CWJxMIb1Wl8hwTv42tQrtXDhF n0WSQw6KLEu/HzNznhCC80pPCmSC X-Google-Smtp-Source: APXvYqyF10OJG7VKIUjIB5ncsAMy1XHnRlRQaKWvqqGjzIuW0xEspftDyYs24Sq+JqqIYP5Sco9qew== X-Received: by 2002:a63:d70b:: with SMTP id d11mr20694500pgg.178.1560265051162; Tue, 11 Jun 2019 07:57:31 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:3483:: with SMTP id b125ls4498968pfa.11.gmail; Tue, 11 Jun 2019 07:57:30 -0700 (PDT) X-Received: by 2002:aa7:824b:: with SMTP id e11mr79339375pfn.33.1560265050824; Tue, 11 Jun 2019 07:57:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265050; cv=none; d=google.com; s=arc-20160816; b=JZeund6fjgbMjrCrqKTf9NYgCQkqtX/n7aKrUwh9p9b8Z+VDEAbERx0KdaEUP+XqLS nqf0hwY/D+axac49ooJ+Tfm7dnL8OgxSTxif2Dro5+P+j2ndHzLoakVjm38M72pORe/L Ki6EYy8QJ/l8dEVw9+rGpxBXEDVcdPKXdACKqBK04j3KZ1MTGJKOonv7ubQfkud0vbs8 1e2cxC5sr6afZPiftSKN9ZD3Uo26J9n3Tk20oHQRtDT19bXcVDuuWNBl1joUI+/O8Iza akYH2zs+sADA+45o6EkSSecojJTJPQX6/2fK/b9+JZrNPFQ8HyXai0ZMUuPdCCxcdSt1 vJHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=qzOgM63ZXtgnBHMJkUfmyhq4zTJWFZFmUikkPYBSeZw=; b=nlCUAn+WWE2pJdYB6jM9XtASV7YC/jT+2KXx7QnJczo6PdblVv1Khk55PzJVtPqpIu 09OdeVEal7o5v5ELC9rquxlJEzdGwYQZsIqKlsNDudsxKwMY2XU5CN9V+W1NqkXNShMt D10mG2UcqdOk8qZem0QyVyxgtcNoshYWHz3SImK4nLX92Km0HwzK9nyok07hFAK1xdtR bA1hwiDNcQSqPrguyxVuaKXLYqX7SIEeF0Bg39ftmXrXdNw/91fAltSmePn3la3uzwBt NJrap/nPwGUC3lvAYC13ML9wPlLMLdywQ5gtbrd0DbE1A+iBJ9M7rXquBPLYGgl0yjAd VhOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Chvo+ClQ; 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 t22sor3212928pjq.20.2019.06.11.07.57.30 for (Google Transport Security); Tue, 11 Jun 2019 07:57:30 -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:a17:90a:2244:: with SMTP id c62mr11234181pje.29.1560265050500; Tue, 11 Jun 2019 07:57:30 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:29 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 86/92] ram: rk3399: Set lpddr4 ca odt Date: Tue, 11 Jun 2019 20:21:29 +0530 Message-Id: <20190611145135.21399-87-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Chvo+ClQ; 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: , Set CA ODT based identified controller in lpddr4 as part of LPDDR set rate initialization phase. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index fc9958de17..2c02c51fdf 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1901,6 +1901,54 @@ static void set_lpddr4_dq_odt(const struct chan_info *chan, } } +static void set_lpddr4_ca_odt(const struct chan_info *chan, + struct rk3399_sdram_params *params, u32 ctl, + bool en, bool ctl_phy_reg, u32 mr5) +{ + u32 *denali_ctl = get_denali_ctl(chan, params, ctl_phy_reg); + u32 *denali_pi = get_denali_pi(chan, params, ctl_phy_reg); + struct io_setting *io; + u32 reg_value; + + if (!en) + return; + + io = lpddr4_get_io_settings(params, mr5); + + reg_value = io->ca_odt; + + switch (ctl) { + case 0: + clrsetbits_le32(&denali_ctl[139], 0x7 << 28, reg_value << 28); + clrsetbits_le32(&denali_ctl[153], 0x7 << 28, reg_value << 28); + + clrsetbits_le32(&denali_pi[132], 0x7 << 4, reg_value << 4); + clrsetbits_le32(&denali_pi[139], 0x7 << 20, reg_value << 20); + clrsetbits_le32(&denali_pi[147], 0x7 << 4, reg_value << 4); + clrsetbits_le32(&denali_pi[154], 0x7 << 20, reg_value << 20); + break; + case 1: + clrsetbits_le32(&denali_ctl[140], 0x7 << 4, reg_value << 4); + clrsetbits_le32(&denali_ctl[154], 0x7 << 4, reg_value << 4); + + clrsetbits_le32(&denali_pi[129], 0x7 << 20, reg_value << 20); + clrsetbits_le32(&denali_pi[137], 0x7 << 4, reg_value << 4); + clrsetbits_le32(&denali_pi[144], 0x7 << 20, reg_value << 20); + clrsetbits_le32(&denali_pi[152], 0x7 << 4, reg_value << 4); + break; + case 2: + default: + clrsetbits_le32(&denali_ctl[140], 0x7 << 12, (reg_value << 12)); + clrsetbits_le32(&denali_ctl[154], 0x7 << 12, (reg_value << 12)); + + clrsetbits_le32(&denali_pi[127], 0x7 << 4, reg_value << 4); + clrsetbits_le32(&denali_pi[134], 0x7 << 20, reg_value << 20); + clrsetbits_le32(&denali_pi[142], 0x7 << 4, reg_value << 4); + clrsetbits_le32(&denali_pi[149], 0x7 << 20, reg_value << 20); + break; + } +} + static void lpddr4_copy_phy(struct dram_info *dram, struct rk3399_sdram_params *params, u32 phy, struct rk3399_sdram_params *timings, @@ -2148,6 +2196,7 @@ static void lpddr4_copy_phy(struct dram_info *dram, ctl = lpddr4_get_ctl(timings, phy); set_lpddr4_dq_odt(&dram->chan[channel], timings, ctl, true, true, mr5); + set_lpddr4_ca_odt(&dram->chan[channel], timings, ctl, true, true, mr5); /* * if phy_sw_master_mode_X not bypass mode, From patchwork Tue Jun 11 14:51:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 538 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4BB013F08A for ; Tue, 11 Jun 2019 16:57:36 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id i26sf9747833pfo.22 for ; Tue, 11 Jun 2019 07:57:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265055; cv=pass; d=google.com; s=arc-20160816; b=shTPPKAWUfJR4ATLzxK8V5JODW5aGAGSZyzzPHzpXkO6Y2ESmWaiU9v23MmstPzJno ufulYjH++SwrwT8lhxJPssTmmH88x6SimHUAokL32CfA9cSWwUNouNs/FzfyDHL7w2hM THDUY4jX3FAFxPJQqK5xGwwl/5/+WxgR/T4/N059BdA0HEJxImrZ9nQBIo95i3+wQYMv f2NZjCKSsI235qXDdnw+dFd3uyWiSdTpDw1U9dvUyRLpuENYHQZ93B7G5pAOdguG2LVv xYj+SvGstzB08pmfocTnpZYlAnsx+l6uh9etxT9BXF2znFAYgfmOkoljmwo00AV6qBNJ vEIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=bafLK7qNlJ1VlcaclVFESzE5ctCtJurwho3mw72fDxA=; b=pKpmoW/psOBmGu/0A6esR9AGPE12FmgJrJg/5XrlNOqyhDFqcAeDNJDXNi/Nu4WHiv M39b2OEDft2ZvhLrynFkeAzxI2KK7zaqI5nJjSrQGaF0a4Zdoh9D024Evxzrk5v11BK9 wDFgpKT0ulxWFNEP0oyr1PcLbHfsp4PTwaYogXnis0Zdhl8sICJtipwCRC99COpa3I4h G1mhbpPOVP8itibYEloHo+0Le+5nbNHe+X7U6TBMmtwIxdoyw+E9OzHZhklaa3gGX+WG 1dv5FUgn40SiL2Pv69vpnoMAH60rsUxDevr2ipEjo9AzadEEJv+q/RHUBA7W4wFluDo/ EoVg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EE3CBxFU; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=bafLK7qNlJ1VlcaclVFESzE5ctCtJurwho3mw72fDxA=; b=iX0M07UW/QWk/k4chLAQcZJg4yhMw2wQg8QIjISxScU5ruy72E9/XLj+g6QUlZ0giY Lq1iRAE7mVgt69HTuu67ox3oTH1jxT2hEtbiofrHKhFoRPEfRZ34h72c88l25fBGPEyF LOyOfnBnQyIKee1yQUmxfQfOMj6Tte2F9YuLM= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=bafLK7qNlJ1VlcaclVFESzE5ctCtJurwho3mw72fDxA=; b=OuihxjFxvePChRELGFYnfOEMlctvz2i9Y8FPgYH/fwGwy/G34TbB76lxh2NsuxvB7Z AfgZOrk/qVLQOPDvudVJza2FhVhFKE0nUVVgzx8qkU7xeHrHfO80b81aJ0Syh9CmMo/0 e2y4oOHwTkOD1TvbKCtftNdpelLh5tbPoVU1xe+V/WqaeDI58oLyuuv2c/lmrDgsbpDp wnGagqCPUsHXaKj4jCAZutd5c8Wak1Vkf/r8Py8kkBKZPyzJkNrtd8n6tIZv7MInBnbY BpQpUH3by0WaxQPU+Kn9U2so0rwVgZTwoBHdc6LqU0sO6xiwN/XTCHXxDSjOxrvm7RXj +4uQ== X-Gm-Message-State: APjAAAVNaisTHvIcvAZjTJ2t4YewzDfBboyAbzDFAzYWlKRTQ0NicVwF uldDLG76RUJ68QxT/KqCvPwRgfEk X-Google-Smtp-Source: APXvYqzL4gupD3BJfX+3y/y0sb2KhudNfUzf+AC00cRtm+4q/zCbrzbjA1y9L3OJxd2YE2bq7ydxmQ== X-Received: by 2002:a17:902:bd0a:: with SMTP id p10mr733322pls.134.1560265055121; Tue, 11 Jun 2019 07:57:35 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:d0c2:: with SMTP id y2ls860704pjw.5.gmail; Tue, 11 Jun 2019 07:57:34 -0700 (PDT) X-Received: by 2002:a17:902:70c4:: with SMTP id l4mr40767416plt.171.1560265054817; Tue, 11 Jun 2019 07:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265054; cv=none; d=google.com; s=arc-20160816; b=Sf28ZDz7d+7aLUEtsQbw95PYThknrZ9+oR2Q39BgOklukoZxe8DTJ7LoAthHZ0aLNk bugz4cfXQn7YpGODIVI/D1zR+VP+boxgv/dl+O6ESL1LiC5pgXKXebb1LpTYXfPbOqHk vuQ3GHkIif9HmLJc3HE+2GJYJ0lMoZlHBBcyj5Z/hJi3qM5+GH7DLLaf9yX0vHPZd3V5 JJAy9ngja3bof/4+oqeVOp98Ggjwl+fqSVXzGgxkAHaFsotKpF53Va68qXbn5psJkxeU 9vL89bqu/ECsEKGJw6/IqJUenNAEjBINx2Kx9MoEWSqiuMJSKh5Gh6s/ZFVWuFdOs2Fs vlXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=8+JP0INzqg+ea+/5UHLEH3B7og17tnRnO3V2nQVLGMY=; b=Hla52Hr21XCxr8H0buzh6pqrL0deVBVLrqKoz2IYZmNh2wwpyCgjQyEa+u4ZKZohDF IoewdXo/pItqhdm1IiJ9BuyBMpDW8oBJYXZtpDKDdX+7qXs8A26+TsnClSgRlGvqr3wl hrmQqOzQ28dVrKHXSmEojZmf3WUjKF0j8L2c6qaOvM0QL1shV/ADnzq5HM6ol+N5jKvE P5K21ai80HVLGvQOIW+PzS2KARfsTVX4majmGGHG+Ek1Xvdkfttv8fTTVq15zFfQv8VR 1T+cOwjDuwI8l2KCNQehemCpLKzT7SM0D/xMeEVlRJB8LJ2vhhhSGo3i0BO3mH4Tc5Jl UXeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EE3CBxFU; 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 s10sor3201718pji.2.2019.06.11.07.57.34 for (Google Transport Security); Tue, 11 Jun 2019 07:57:34 -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:a17:90a:4814:: with SMTP id a20mr27930090pjh.62.1560265054458; Tue, 11 Jun 2019 07:57:34 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:34 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 87/92] ram: rk3399: Set lpddr4 MR3 Date: Tue, 11 Jun 2019 20:21:30 +0530 Message-Id: <20190611145135.21399-88-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EE3CBxFU; 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: , Set MR3 based identified controller in lpddr4 as part of LPDDR set rate initialization phase. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 2c02c51fdf..f1fb16c130 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1949,6 +1949,53 @@ static void set_lpddr4_ca_odt(const struct chan_info *chan, } } +static void set_lpddr4_MR3(const struct chan_info *chan, + struct rk3399_sdram_params *params, u32 ctl, + bool ctl_phy_reg, u32 mr5) +{ + u32 *denali_ctl = get_denali_ctl(chan, params, ctl_phy_reg); + u32 *denali_pi = get_denali_pi(chan, params, ctl_phy_reg); + struct io_setting *io; + u32 reg_value; + + io = lpddr4_get_io_settings(params, mr5); + + reg_value = ((io->pdds << 3) | 1); + + switch (ctl) { + case 0: + clrsetbits_le32(&denali_ctl[138], 0xFFFF, reg_value); + clrsetbits_le32(&denali_ctl[152], 0xFFFF, reg_value); + + clrsetbits_le32(&denali_pi[131], 0xFFFF << 16, reg_value << 16); + clrsetbits_le32(&denali_pi[139], 0xFFFF, reg_value); + clrsetbits_le32(&denali_pi[146], 0xFFFF << 16, reg_value << 16); + clrsetbits_le32(&denali_pi[154], 0xFFFF, reg_value); + break; + case 1: + clrsetbits_le32(&denali_ctl[138], 0xFFFF << 16, + reg_value << 16); + clrsetbits_le32(&denali_ctl[152], 0xFFFF << 16, + reg_value << 16); + + clrsetbits_le32(&denali_pi[129], 0xFFFF, reg_value); + clrsetbits_le32(&denali_pi[136], 0xFFFF << 16, reg_value << 16); + clrsetbits_le32(&denali_pi[144], 0xFFFF, reg_value); + clrsetbits_le32(&denali_pi[151], 0xFFFF << 16, reg_value << 16); + break; + case 2: + default: + clrsetbits_le32(&denali_ctl[139], 0xFFFF, reg_value); + clrsetbits_le32(&denali_ctl[153], 0xFFFF, reg_value); + + clrsetbits_le32(&denali_pi[126], 0xFFFF << 16, reg_value << 16); + clrsetbits_le32(&denali_pi[134], 0xFFFF, reg_value); + clrsetbits_le32(&denali_pi[141], 0xFFFF << 16, reg_value << 16); + clrsetbits_le32(&denali_pi[149], 0xFFFF, reg_value); + break; + } +} + static void lpddr4_copy_phy(struct dram_info *dram, struct rk3399_sdram_params *params, u32 phy, struct rk3399_sdram_params *timings, @@ -2197,6 +2244,7 @@ static void lpddr4_copy_phy(struct dram_info *dram, ctl = lpddr4_get_ctl(timings, phy); set_lpddr4_dq_odt(&dram->chan[channel], timings, ctl, true, true, mr5); set_lpddr4_ca_odt(&dram->chan[channel], timings, ctl, true, true, mr5); + set_lpddr4_MR3(&dram->chan[channel], timings, ctl, true, mr5); /* * if phy_sw_master_mode_X not bypass mode, From patchwork Tue Jun 11 14:51:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 539 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2A52B3F08A for ; Tue, 11 Jun 2019 16:57:40 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id z10sf9267266pgf.15 for ; Tue, 11 Jun 2019 07:57:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265059; cv=pass; d=google.com; s=arc-20160816; b=LMMZL/Ii7tousnCte/R/0FmScsNO2yLVVF99afF+31suUPJdJQ8IKWPVQsU4V7UCYN yRbtzLjeOD+cpvOf22XmG2WZaDUPcF/8EJ7lagQy9Nh3jQ43Anq4x2i4crzS2cVmXSZ4 mBDfm2xjzu3Ume2Bqgv/twzu2IvoPqMimBVH1KoeYk0XsoBQ2pw8U8mBfEkpCASt578C JAVp6xP4s7yY6OqN7W1RKakhiLy+Wi0gLgyFrpBjsFUr1UUVn13P1clRxdKLdjB+OYD/ P4bugLTHKqaiqVvT2NmHwxhXvp8BYdwbKehz0OunPALHYL5bQbQg2EuBSYxRIKsHTJAk eJGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=tUjA/fyPjeCeto7YS8lKB/q4rmVKmpWSbeW3CwVa/WU=; b=jZnlDw2TrbPuqRElIW1EaafIhAaUefrEkFlXjWs8xBKTHMVLDTgWy9IHWAKPMFkPau JBeaMYk+aO5sumRf+6k1sgIpkvaKdWTe6QBMMU5iPFLfLS9lgI/anMR+gB5Z6r9j4050 4vBNiP7VEN4MKI3GtD9zDlkhQL3Qo+Ccp2wF85b6pcbG+qaaYjCcw1gMsSiT9qg03RaT 7LW2CZs0DRfITiib5RDujzIUfgwvS1slrT3EONe1ZYc+KrwyiauhvTLoHI56bbq2kSUa jzQzP0iRALgLLGtgF1ZpK4br129FZuF2vWyQieKttrdIS+YW74sHfUbFiQyJ+XTWjT3t 7gLQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MewqXZZd; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=tUjA/fyPjeCeto7YS8lKB/q4rmVKmpWSbeW3CwVa/WU=; b=I6wwmDKBS3IA76h9I6a84lzr2/hwf2oUMecRbvJdnSQQppbJUWzoOu9aLgbuoKzk46 uRSK3YMlvCDdiMaLYn2IFMSZRVdKbD0lJPTNtckwoNG5prY0PONcn85CT4PYihD8+wxy G26ndTwKClB3GxcCH8JUi8oCBWxGTWXSx9v28= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=tUjA/fyPjeCeto7YS8lKB/q4rmVKmpWSbeW3CwVa/WU=; b=QUoHAwlmviF2feF+G8hySANxhGLPYIspsMWHZAhyY9HfXApath6iSUHqr5jAnL6THY D2opf9/67ZtiDN1kIauv7z+v5qf3oxGdPV3KjvrFw6R8HR66x2rKOcCPMHJEEpVXAa4A NRGSpfkdOEb7wCFz5gaC1v6XAOu0goHwG7zxRn7EDvWmWrDhLFeUdT1KdMKTzNZhHeWb Um4yQD2/hPc++noJ4ZeRjbtMyxEa+ARAazkWjAhhYEaOGSEKyQ3a2v/Pmhb2HOsFkflN oVCPNAq7JJQl34hGqEDZQjXqWTkB+y6w8kCBi3G+ujBxhNXmc/ubpqlGppAft81JHpKp fSWA== X-Gm-Message-State: APjAAAXMlGFYbPnANO8t6hLMtZxwquSxzu79d6/HcZwcpW2NrhZEgQr0 5sxb1ER8HzPTpt/YkCWWox++VfIH X-Google-Smtp-Source: APXvYqwFDQRk+EXGcouadJD5rn+WAOwZM86XWTi6G+8sPG0ze+IkuviDHQ56wD6C1JKSrHGnJMRYwg== X-Received: by 2002:aa7:90d3:: with SMTP id k19mr78461373pfk.1.1560265059029; Tue, 11 Jun 2019 07:57:39 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9694:: with SMTP id n20ls4899047plp.6.gmail; Tue, 11 Jun 2019 07:57:38 -0700 (PDT) X-Received: by 2002:a17:90a:26cf:: with SMTP id m73mr27009629pje.90.1560265058683; Tue, 11 Jun 2019 07:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265058; cv=none; d=google.com; s=arc-20160816; b=B6AIvFCRoZyFbhzomwpVEuLpf4Dic7T2r3oB+3n+g1+ZJDOzJTb32DsVbZt+5NWqwb gKAV+DZqdxPdp89fzYY1AQet0WuoVel3lSSx67o7fN1yCIRUWg++HoigxZk9i1qEL89o /FRxUshrNb9ATD3pdHcGr96bjz5AnKNA60w7L8odRVQn4U6vILrzWAFB7fApPBU5OQcO jyNY2thA3h3JvhMFKjtVwytWSzheyJwLaGqLbvoxmjeSE2nnmxrjEV2eVFfv8GYFGUC1 Vpn7IStxGvF3CDm84Efg4U+UX/c/01CRl40IsY1329Va0S0B8PP7Zbq7barDPsrROb1v Br9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=veKQnxdE/O+afSbAdRG6AVexyoeVeop4zur5cBaAxQY=; b=zxZIjdVBxlWWR/SIgqkW0ujHuV7fE8D5vKtoOYMdIvijRF4G5eQuGa8Hkvohq+cH/1 rKPJiMnzbnONX/x3x4UJtR/OYpIX0sc7AfE0uUWlY7daknzmeWmMptjGFWZHSGcruNBy 78smvTbH+p908SWTueu1MHVL5SvXnkR4YofR0IKgjcF1crnibQtmFFexaZcUru1Z7vgO aTFT66WTxtOLOUmwolGUzrO6QEy/KBevCJ7x0g6L9EmR5Cz8SjAYOCM0BflPoeMxLryw XYs8QPvsWizkDBsp5VdEThvsTERQzgGLQ/VLohLM3cJ44aENe5ucvVUMR9hmPy/MJoKJ qnCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MewqXZZd; 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 m9sor11733067pgq.33.2019.06.11.07.57.38 for (Google Transport Security); Tue, 11 Jun 2019 07:57:38 -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:a63:e24c:: with SMTP id y12mr20610711pgj.276.1560265058277; Tue, 11 Jun 2019 07:57:38 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:37 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 88/92] ram: rk3399: Set lpddr4 MR12 Date: Tue, 11 Jun 2019 20:21:31 +0530 Message-Id: <20190611145135.21399-89-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MewqXZZd; 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: , Set MR12 based identified controller in lpddr4 as part of LPDDR set rate initialization phase. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index f1fb16c130..38fc8ffe63 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1996,6 +1996,55 @@ static void set_lpddr4_MR3(const struct chan_info *chan, } } +static void set_lpddr4_MR12(const struct chan_info *chan, + struct rk3399_sdram_params *params, u32 ctl, + bool ctl_phy_reg, u32 mr5) +{ + u32 *denali_ctl = get_denali_ctl(chan, params, ctl_phy_reg); + u32 *denali_pi = get_denali_pi(chan, params, ctl_phy_reg); + struct io_setting *io; + u32 reg_value; + + io = lpddr4_get_io_settings(params, mr5); + + reg_value = io->ca_vref; + + switch (ctl) { + case 0: + clrsetbits_le32(&denali_ctl[140], 0xFFFF << 16, + reg_value << 16); + clrsetbits_le32(&denali_ctl[154], 0xFFFF << 16, + reg_value << 16); + + clrsetbits_le32(&denali_pi[132], 0xFF << 8, reg_value << 8); + clrsetbits_le32(&denali_pi[139], 0xFF << 24, reg_value << 24); + clrsetbits_le32(&denali_pi[147], 0xFF << 8, reg_value << 8); + clrsetbits_le32(&denali_pi[154], 0xFF << 24, reg_value << 24); + break; + case 1: + clrsetbits_le32(&denali_ctl[141], 0xFFFF, reg_value); + clrsetbits_le32(&denali_ctl[155], 0xFFFF, reg_value); + + clrsetbits_le32(&denali_pi[129], 0xFF << 24, reg_value << 24); + clrsetbits_le32(&denali_pi[137], 0xFF << 8, reg_value << 8); + clrsetbits_le32(&denali_pi[144], 0xFF << 24, reg_value << 24); + clrsetbits_le32(&denali_pi[152], 0xFF << 8, reg_value << 8); + break; + case 2: + default: + clrsetbits_le32(&denali_ctl[141], 0xFFFF << 16, + reg_value << 16); + clrsetbits_le32(&denali_ctl[155], 0xFFFF << 16, + reg_value << 16); + + clrsetbits_le32(&denali_pi[127], 0xFF << 8, reg_value << 8); + clrsetbits_le32(&denali_pi[134], 0xFF << 24, reg_value << 24); + clrsetbits_le32(&denali_pi[142], 0xFF << 8, reg_value << 8); + clrsetbits_le32(&denali_pi[149], 0xFF << 24, reg_value << 24); + break; + } +} + static void lpddr4_copy_phy(struct dram_info *dram, struct rk3399_sdram_params *params, u32 phy, struct rk3399_sdram_params *timings, @@ -2245,6 +2294,7 @@ static void lpddr4_copy_phy(struct dram_info *dram, set_lpddr4_dq_odt(&dram->chan[channel], timings, ctl, true, true, mr5); set_lpddr4_ca_odt(&dram->chan[channel], timings, ctl, true, true, mr5); set_lpddr4_MR3(&dram->chan[channel], timings, ctl, true, mr5); + set_lpddr4_MR12(&dram->chan[channel], timings, ctl, true, mr5); /* * if phy_sw_master_mode_X not bypass mode, From patchwork Tue Jun 11 14:51:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 540 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C915A3F08A for ; Tue, 11 Jun 2019 16:57:43 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id a13sf9265795pgw.19 for ; Tue, 11 Jun 2019 07:57:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265062; cv=pass; d=google.com; s=arc-20160816; b=pzMKwZOvqXDIEvwU50yeEgpH+/Ja+0pt3B5SxKnwhpwoFeSMAZeXKawFNoiM8wNgX7 /5sXp/ncChxhatEDOF5/TU8rDfVEMeRkAgZVTEoCAS+vmMrBqsykyvBPaZkOWCa89Vxt husWN/cy+cTkhO1VfAIZ1EnE3vw3vMkjI/roohg3ZrpedznGCsUJAYxmb5SCtgycn0nx EWKq8bnVEHYLEL9Qpmg+GB3Y7He15smiqgrUVthKQyLMUa5jCvIYi/6rSBEaUyLhVfj+ 9WxjKYD1CPOhyUvyntDDVgSa+bMNhX9xqIaQUvb6wEDBF00ZPE7zxKqXBuvvoAOaujL6 mMbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=y+we7UcQ83ih4nPnSx6PJ6ValKxjVGetLDJG0j/TbFI=; b=LKTiwSFDvdfR5X6A943FPL1mF1AFdHxOhijQBq04dYk8xhU1QKQv5t8U+PE7x4MYos 0g0/h8Zhb3vjpaYtwO0daC8udOjtNE2qhbs30m6fFD+kMquHrF+m6KcR4ithfF8tFTp9 uf8rUicgdJyawhjPLHIAYlM2cDTE1TxsmrrihGOSQaCTibOkwTw/6YLGVd/IZJUNyFjo k9mRzNlMFjoJU2qXVe5UZl3dGZVUzFRJGxgx/J0E54C+rl7fp1GW3h3A1lZoCmvvMQEB HUMYlQe66JmrNgs6qm6AkoTHje847yRIioi4xaRfAOzuKOlj9/5v26571SuDdJdrsKjk njSg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kCyPcKSr; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=y+we7UcQ83ih4nPnSx6PJ6ValKxjVGetLDJG0j/TbFI=; b=FfJwxhsK1zCQqLjQY8CeWRyhJPvKp/iDeksZsmnqVFU+oN9xJUhtkOs5CYt5t78EFP X+e3DHLMf2O/mWNV01a5GzrWNDA6K30Z3+I/0fIAhqo5B7vvXYw3HCv1fTsWOhmlTf9c OjfY733FZsJJWDZPFWibYLo0vDYoibWpKu5BU= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=y+we7UcQ83ih4nPnSx6PJ6ValKxjVGetLDJG0j/TbFI=; b=KDCaTBkfQP2NuEDVJc5Yk0lBKihO7DR3Q0iovOcygzZv+Uu3jqYSxlpGzcmWI6ip63 lY1sbGGHgQo+u/tGyndeK5H1CU8Rnv+uvb0mdZLmsghk12rktEaJYTRHoJ344cLjmRe8 pRZUwhAUvSeNZeHigUYCPEadUwKv9aW+AmHLvG3/pkHveehBnxF8oSSrlvgdwB/gVMXO kRXIfYx6RHjoYGzNwIYQHF31bdlH6f2gNZ5nJbRKD/dr3e/5YOWVFAnZQ7h/a5d0WHC5 bhIfXDXI4U/ZoFWWUU5AJFXiyhyXICPWMkuiwzcDToo6WHWQVkpW1fK68I40JrXlxQ91 F+Ig== X-Gm-Message-State: APjAAAWnTJ5ZSdzL02ewuo64Z9+MRRVoxQN32kXohfBeD61B02PO4ksz Ml5zRiCYt1Uo6ewtlceXAJgmryjC X-Google-Smtp-Source: APXvYqw8J8LoEch91uljE1z4y99ezFCT7dshR/6x0MHPGLfgAZB2GaDM9L16JTdxUEw9haGPwCpUTA== X-Received: by 2002:a17:902:bb90:: with SMTP id m16mr9757645pls.54.1560265062626; Tue, 11 Jun 2019 07:57:42 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8115:: with SMTP id b21ls3289957pfi.12.gmail; Tue, 11 Jun 2019 07:57:42 -0700 (PDT) X-Received: by 2002:aa7:8007:: with SMTP id j7mr16592853pfi.154.1560265062382; Tue, 11 Jun 2019 07:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265062; cv=none; d=google.com; s=arc-20160816; b=U70eXZO+y8VTQ7IRiKNBTebXgmlq5yolYzOOP5+8MuTlnTfg+SNvvnncTmFY25yrgi fLNIfIJmaqVchPh0gUkQU3A5WYhj3aWllHfSJJ7iIXZAZ5rErlruIc0n4GugrQI3r1T9 YB+BvCZQbff8rNkBG0nvd5u05JRBoqwawUo7u7EwCcp3yg3i4Lm+P7GcWVBOZ7PtaiTZ J5S9vYI6jA6YAbWmIeGXu4ixWNE7eCGvHb4jSbZG7QiCT/BKfdJrUqoUGmqjMIqiI9Or cjc8DzxD9JkqWnE9HqEKCBecCgEiBLPRIlFhcMBUmH+8Ug1fTBjN0lrenPcPZH9frPJX SfaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=EGZ8QbOC3Lmpsm4GK+xadppvBx7oC2rPSb4ZO01EuV4=; b=OEL4pi2rS4j/jmMaWbYfMYrPHyv3umpfZ6bxEt/R8INPzNGUDFG1EqVPSzPG3fm0NJ 3DeJnlKGYhAtzvwRN1EVR7Y3DhiUbj79x+tcqJ2Eijtp+VUMFKw9d3AH3jYM7mGKU/Cg kq8ZFUffXThHd6BfQ7KwaCEV7S+/oonec/6JQEo2SbywcyKMccREBpOZTBVkhNci4gdT moaF3Nx23DBLYMpeTBNHLjoOioFqjWR1eQl7b6DyJin4aU20MA1oTFoQ1zfcmPbGD6w5 SxQddKyOhA6lkUkK1YxtLWXCMotuCGnGbWraDD8Zr6d4I3sjwbUTtCauszRvYuK/HAgm WPyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kCyPcKSr; 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 ce5sor15340705plb.17.2019.06.11.07.57.42 for (Google Transport Security); Tue, 11 Jun 2019 07:57:42 -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:a17:902:522:: with SMTP id 31mr72398477plf.296.1560265062043; Tue, 11 Jun 2019 07:57:42 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:41 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 89/92] ram: rk3399: Set lpddr4 MR14 Date: Tue, 11 Jun 2019 20:21:32 +0530 Message-Id: <20190611145135.21399-90-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kCyPcKSr; 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: , Set MR14 based identified controller in lpddr4 as part of LPDDR set rate initialization phase. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 38fc8ffe63..859f26462d 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -2045,6 +2045,55 @@ static void set_lpddr4_MR12(const struct chan_info *chan, } } +static void set_lpddr4_MR14(const struct chan_info *chan, + struct rk3399_sdram_params *params, u32 ctl, + bool ctl_phy_reg, u32 mr5) +{ + u32 *denali_ctl = get_denali_ctl(chan, params, ctl_phy_reg); + u32 *denali_pi = get_denali_pi(chan, params, ctl_phy_reg); + struct io_setting *io; + u32 reg_value; + + io = lpddr4_get_io_settings(params, mr5); + + reg_value = io->dq_vref; + + switch (ctl) { + case 0: + clrsetbits_le32(&denali_ctl[142], 0xFFFF << 16, + reg_value << 16); + clrsetbits_le32(&denali_ctl[156], 0xFFFF << 16, + reg_value << 16); + + clrsetbits_le32(&denali_pi[132], 0xFF << 16, reg_value << 16); + clrsetbits_le32(&denali_pi[140], 0xFF << 0, reg_value << 0); + clrsetbits_le32(&denali_pi[147], 0xFF << 16, reg_value << 16); + clrsetbits_le32(&denali_pi[155], 0xFF << 0, reg_value << 0); + break; + case 1: + clrsetbits_le32(&denali_ctl[143], 0xFFFF, reg_value); + clrsetbits_le32(&denali_ctl[157], 0xFFFF, reg_value); + + clrsetbits_le32(&denali_pi[130], 0xFF << 0, reg_value << 0); + clrsetbits_le32(&denali_pi[137], 0xFF << 16, reg_value << 16); + clrsetbits_le32(&denali_pi[145], 0xFF << 0, reg_value << 0); + clrsetbits_le32(&denali_pi[152], 0xFF << 16, reg_value << 16); + break; + case 2: + default: + clrsetbits_le32(&denali_ctl[143], 0xFFFF << 16, + reg_value << 16); + clrsetbits_le32(&denali_ctl[157], 0xFFFF << 16, + reg_value << 16); + + clrsetbits_le32(&denali_pi[127], 0xFF << 16, reg_value << 16); + clrsetbits_le32(&denali_pi[135], 0xFF << 0, reg_value << 0); + clrsetbits_le32(&denali_pi[142], 0xFF << 16, reg_value << 16); + clrsetbits_le32(&denali_pi[150], 0xFF << 0, reg_value << 0); + break; + } +} + static void lpddr4_copy_phy(struct dram_info *dram, struct rk3399_sdram_params *params, u32 phy, struct rk3399_sdram_params *timings, @@ -2295,6 +2344,7 @@ static void lpddr4_copy_phy(struct dram_info *dram, set_lpddr4_ca_odt(&dram->chan[channel], timings, ctl, true, true, mr5); set_lpddr4_MR3(&dram->chan[channel], timings, ctl, true, mr5); set_lpddr4_MR12(&dram->chan[channel], timings, ctl, true, mr5); + set_lpddr4_MR14(&dram->chan[channel], timings, ctl, true, mr5); /* * if phy_sw_master_mode_X not bypass mode, From patchwork Tue Jun 11 14:51:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 541 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A181C3F08A for ; Tue, 11 Jun 2019 16:57:48 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id y5sf9750067pfb.20 for ; Tue, 11 Jun 2019 07:57:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265067; cv=pass; d=google.com; s=arc-20160816; b=Gb9ertbyu6Q4gw/6llz+hsNPRSZh5AVpaof/67cE/ZBJgy/59Y6RfoY+WqJ3zKp4WA 853zEdcLDQqSeRqmRABFa9OdVugHjayxOBtnnmdE0PiOyOTSBcAgXUns8/Hcusp5+0gN hAmRdXGSDrrHq0TMmAt6uNDFr/vhQei9ZOxo7/35oBAJArI8dCzHxZZdcX8GK8ke2Iui S+Q2wx9pMFlcuOlQN1TEfx1t7B+gIgZqun1yxPX1gtfTHd4olEdM2SPLqHVNt6NLBNh6 pSyaZc1wQUq7qbF7RCOxrBld+UWAXRd+I1VUDwVdj1+KNVt3glxqO4d+hE27Kyf///iJ xs4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jQM6PioSEXT5gc80VJ0e6cYBjEzv7nJLcHWtm5W+N/4=; b=p7VqfNqeqxKMxR82UX2eX8LSFR3q46i1JPmiAsZcPlV96LrSNWsxu9AFUidV2BsA9R Va5gE1nxG6l/Wz/M3oOibggN00G5lJ1Eqetbn6Wdsd987CYJHumFeWPXCU+wGD6n+hX6 LaNlW9yNAvrQ7t3bJGLNGM+F1kVi7z7UEK5UvW7LSZ5aDJBXDSjPWNWFwR722bohVs4Q vsdW/s35DG/uR3nq+qP7YwW6kx3iLTMCGk64KCLewaZjW9KMwVnZb57IQqgCnmDWqkPS GX8ST9eNOIQ5GRfSEZMOM5Z1z0zPZbvs+ReBFFn/fghtWVR3CwB74cBXwCuY2bv0JwEe HDLA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HCYTCW7W; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=jQM6PioSEXT5gc80VJ0e6cYBjEzv7nJLcHWtm5W+N/4=; b=DGF1+EeRFVdhvtXkys6TTl25r4osFvsaXYdYcEnRVhYkMCFEpYYqcoGzHUm1U3BHfW ba5eKUN/BaaBMp8GYVr3t82DEBpAyKn4L+eQB99rRh5mZsNBDrTAjMSHzmzeJXZNpWKW gWxda0eovwQ7A+/QenjiW5BW8kATofF5CQ0mo= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=jQM6PioSEXT5gc80VJ0e6cYBjEzv7nJLcHWtm5W+N/4=; b=JWMcPoFralFAgBq2bw1KaZIAc5084o+rDo6VQ6litOEtMfzPozKOq3NK0d2atC+G+Q FWBWcrwMaO02LQ7TA+1z+lEGbGOxSNb9hQxGMwY3UnTxAwxSqV/M4H22JzNy9TZEmL2i hzTrd9yTdaR0DPtiuPjW4qDXsrwAJsr2jCAx6Qt7MmW5mnBcfZ81MqbvbtGsqXSI9TFx xvlh0scGnOqzKmoNGrYV8Hdh2Q/fAjkIm3LpQbZ82wNJmzOUnnmglFlNDFlteWTFKoSo iljgmJ9X5a/gco132UjI44NrqnAhbntcfgAjCoVK1KUw72HvabqLWEZmA07wGlmY4jIV 0WYg== X-Gm-Message-State: APjAAAVuRklqes+2q1iAkbWQU2R4Xh23gDAVVrZFlbqjNBdvq3vKqjvg Byd+ro/IylZ315uxQSEsZqQTFtkO X-Google-Smtp-Source: APXvYqwjVKIOq/1tzZaOZhT5hU95EKxXzmimJCmGtAEqciCEvAeGRAEE6GjE16k5vj3Ql3i2aMktnQ== X-Received: by 2002:a17:902:aa95:: with SMTP id d21mr73602833plr.32.1560265067437; Tue, 11 Jun 2019 07:57:47 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1b8a:: with SMTP id b132ls4500551pfb.9.gmail; Tue, 11 Jun 2019 07:57:47 -0700 (PDT) X-Received: by 2002:a63:649:: with SMTP id 70mr20883497pgg.445.1560265066960; Tue, 11 Jun 2019 07:57:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265066; cv=none; d=google.com; s=arc-20160816; b=R59rBMNzhu4XM+9FTKeyrIMatfNLz6FG7J6j95s7Ag8CObw9lYQUtLhjICMiCjTMlt PosojppK0hPNeOP7G7IGWSNJzLQFzZVZTaLozPviAc/omGJHTnH8xSERNOHfw82jY/jJ pbx9zXGEdHOLTGXROySrouVvkq4PwoF6Xl5qzwlLnXHy1zL8DLy9xdzIhu2vhr+LPMsy W87bLU5ig0XBtKFv+BUMgEWtietrcFhAOOUTCELV1AmoYyWXJaC3qSpHGlzK4yjvGkb1 CaL8CdHTiKm1rCLZi+QTGv6mo8F8uuyyX+Aw+gwiMs3uNw38WS8jmmyRr2JjvCv0z28l mRCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=o7Afceb4K9C0FZcUKbkuH8ytydb6w3KVe5yMqY4mffw=; b=k6/PlbUsz05aRoefnQtpdhiOLubR46wY/ocnDGFHSoh2kf/FT4woe56BjNJ/xeJ0ic lS5E3lV+Sv2g1suXvwFJKuW5If1xWgI6p7krTeQyKwY0bo97cXaifEIIdvAggU9F0nzc p/dCj14CyhCIDTrTcXxF6JHhyxIvCo+3ABreE32y40rfbYrF7IRylB3RUGzbfsXo75Yd AWO0Zd9eUJReu4cv8TgTaKbWFf4AIzMJ/Yx8BqCm69NzhzHdUtywHLtQzQ3TH2sZNVkx XX7/y8rmR/EapOVR+sR2ayPYqf4i4qlmctYfar14lHTueCv5rwCIhFL3ltds/+IGkWn4 KA9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HCYTCW7W; 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 w20sor15603580plp.27.2019.06.11.07.57.46 for (Google Transport Security); Tue, 11 Jun 2019 07:57:46 -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:a17:902:70cb:: with SMTP id l11mr15511788plt.343.1560265066193; Tue, 11 Jun 2019 07:57:46 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:45 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 90/92] rockchip: dts: rk3399: Add LPDDR4-100 timings Date: Tue, 11 Jun 2019 20:21:33 +0530 Message-Id: <20190611145135.21399-91-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HCYTCW7W; 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: , Add sdram timings for LPDDR4-100 via rk3399-sdram-lpddr4-100.dtsi file. all timings are dumped from rkbin/bin/rk33/rk3399_ddr_800MHz_v1.20.bin Associated LPDDR4 board -u-boot.dtsi can include this to make these timings available during SPL or TPL stages. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi | 1537 +++++++++++++++++++++ 1 file changed, 1537 insertions(+) create mode 100644 arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi diff --git a/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi b/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi new file mode 100644 index 0000000000..4a4414a960 --- /dev/null +++ b/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi @@ -0,0 +1,1537 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * (C) Copyright 2019 Rockchip Electronics Co., Ltd + * (C) Copyright 2019 Amarula Solutions. + * Author: Jagan Teki + */ + +&dmc { + rockchip,sdram-params = < + 0x2 + 0xa + 0x3 + 0x2 + 0x1 + 0x0 + 0xf + 0xf + 1 + 0x80241d22 + 0x15050f08 + 0x00000602 + 0x00002122 + 0x0000004c + 0x00000000 + 0x2 + 0xa + 0x3 + 0x2 + 0x1 + 0x0 + 0xf + 0xf + 1 + 0x80241d22 + 0x15050f08 + 0x00000602 + 0x00002122 + 0x0000004c + 0x00000000 + 50 + 7 + 2 + 13 + 1 + 0x00000b00 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00013880 + 0x000c3500 + 0x00000005 + 0x00000320 + 0x00027100 + 0x00186a00 + 0x00000005 + 0x00000640 + 0x00002710 + 0x000186a0 + 0x00000005 + 0x01000064 + 0x00000000 + 0x02020101 + 0x00000102 + 0x00000050 + 0x000000c8 + 0x00000000 + 0x06140000 + 0x00081c00 + 0x0400040c + 0x19042008 + 0x10080a11 + 0x22310800 + 0x00200f0a + 0x0a030704 + 0x08000204 + 0x00000a0a + 0x04006db0 + 0x0a0a0804 + 0x0600db60 + 0x0a0a0806 + 0x04000db6 + 0x02030404 + 0x0f0a0800 + 0x08040411 + 0x1400640a + 0x02010a0a + 0x00010001 + 0x04082012 + 0x00041109 + 0x00000000 + 0x03010000 + 0x06100048 + 0x0c280090 + 0x00bb0009 + 0x00000000 + 0x00060005 + 0x000a0005 + 0x000a0014 + 0x01000000 + 0x030a0000 + 0x0c000002 + 0x00000103 + 0x0005030a + 0x00060037 + 0x0005006e + 0x05050007 + 0x03030605 + 0x06050301 + 0x06030c05 + 0x05050302 + 0x03030305 + 0x00000301 + 0x00000301 + 0x00000001 + 0x00000000 + 0x00000000 + 0x01000000 + 0x80104002 + 0x00040003 + 0x00040005 + 0x00030000 + 0x00050004 + 0x00000004 + 0x00040003 + 0x00040005 + 0x18400000 + 0x00000c20 + 0x185030a0 + 0x02ec0000 + 0x00000176 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x06030300 + 0x00030303 + 0x02030200 + 0x00040703 + 0x03020302 + 0x02000407 + 0x07030203 + 0x00030f04 + 0x00070004 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00010000 + 0x20040020 + 0x00200400 + 0x01000400 + 0x00000b80 + 0x00000000 + 0x00000001 + 0x00000002 + 0x0000000e + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00500000 + 0x00640028 + 0x00640404 + 0x005000a0 + 0x060600c8 + 0x000a00c8 + 0x000d0005 + 0x000d0404 + 0x00000000 + 0x00000000 + 0x00000000 + 0x001400a3 + 0x00e30009 + 0x00120024 + 0x00040063 + 0x00000000 + 0x00310031 + 0x00000031 + 0x004d0000 + 0x004d004d + 0x004d0000 + 0x004d004d + 0x00010101 + 0x00000000 + 0x00000000 + 0x001400a3 + 0x00e30009 + 0x00120024 + 0x00040063 + 0x00000000 + 0x00310031 + 0x00000031 + 0x004d0000 + 0x004d004d + 0x004d0000 + 0x004d004d + 0x00010101 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000001 + 0x00000000 + 0x18151100 + 0x0000000c + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00020003 + 0x00400100 + 0x000c0190 + 0x01000200 + 0x03200040 + 0x00020018 + 0x00400100 + 0x00080032 + 0x00140000 + 0x00030028 + 0x01010100 + 0x02000202 + 0x0b000002 + 0x01000f0f + 0x00000000 + 0x00000000 + 0x00010003 + 0x00000c03 + 0x00040101 + 0x04010100 + 0x01000000 + 0x02010000 + 0x00000001 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00010000 + 0x00000001 + 0x01010001 + 0x05040001 + 0x040a0703 + 0x02080808 + 0x020e000a + 0x020f010b + 0x000d0008 + 0x00080b0a + 0x03000200 + 0x00000100 + 0x00000000 + 0x00000000 + 0x0d000001 + 0x00000028 + 0x00010000 + 0x00000003 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00010100 + 0x01000000 + 0x00000001 + 0x00000303 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x000556aa + 0x000aaaaa + 0x000aa955 + 0x00055555 + 0x000b3133 + 0x0004cd33 + 0x0004cecc + 0x000b32cc + 0x00010300 + 0x03000100 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00ffff00 + 0x1a160000 + 0x08000012 + 0x00000c20 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00000c20 + 0x00007940 + 0x18500409 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00001850 + 0x0000f320 + 0x0176060c + 0x00000200 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00000176 + 0x00000e9c + 0x02020205 + 0x03030202 + 0x00000018 + 0x00000000 + 0x00000000 + 0x00001403 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00030000 + 0x000a001c + 0x000e0020 + 0x00060018 + 0x00000000 + 0x00000000 + 0x02000000 + 0x00090305 + 0x00050101 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x01000001 + 0x01010101 + 0x01000101 + 0x01000100 + 0x00010001 + 0x00010002 + 0x00020100 + 0x00000002 + 0x00000b00 + 0x00000000 + 0x000002ec + 0x00000176 + 0x000030a0 + 0x00001850 + 0x00001840 + 0x01760c20 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00001850 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00000c20 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00000200 + 0x00010000 + 0x00000007 + 0x01000001 + 0x00000000 + 0x3fffffff + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x0f000101 + 0x082b3223 + 0x080c0004 + 0x00061c00 + 0x00000214 + 0x00bb0009 + 0x0c280090 + 0x06100048 + 0x00000500 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x04040100 + 0x0a000004 + 0x00000128 + 0x00000000 + 0x0003000f + 0x00000018 + 0x00000000 + 0x00000000 + 0x00060002 + 0x00010001 + 0x00000101 + 0x00020001 + 0x00080004 + 0x00000000 + 0x05030000 + 0x070a0404 + 0x00000000 + 0x00000000 + 0x00000000 + 0x000f0f00 + 0x0000001e + 0x00000000 + 0x01010300 + 0x00000000 + 0x00000000 + 0x01000000 + 0x00000101 + 0x55555a5a + 0x55555a5a + 0x55555a5a + 0x55555a5a + 0x0c050001 + 0x06020009 + 0x00010004 + 0x00000203 + 0x00030000 + 0x170f0000 + 0x00060018 + 0x000e0020 + 0x000a001c + 0x00000000 + 0x00000000 + 0x00000100 + 0x140a0000 + 0x000d010a + 0x0100c802 + 0x010a0064 + 0x000e0100 + 0x0100000e + 0x00c900c9 + 0x00650100 + 0x1e1a0065 + 0x10010204 + 0x06070605 + 0x20000202 + 0x00201000 + 0x00201000 + 0x04041000 + 0x10020100 + 0x0003010c + 0x004b004a + 0x1a0f0000 + 0x0102041e + 0x34000000 + 0x00000000 + 0x00000000 + 0x00010000 + 0x00000400 + 0x00310000 + 0x004d4d00 + 0x00120024 + 0x4d000031 + 0x0000144d + 0x00310009 + 0x004d4d00 + 0x00000004 + 0x4d000031 + 0x0000244d + 0x00310012 + 0x004d4d00 + 0x00090014 + 0x4d000031 + 0x0004004d + 0x00310000 + 0x004d4d00 + 0x00120024 + 0x4d000031 + 0x0000144d + 0x00310009 + 0x004d4d00 + 0x00000004 + 0x4d000031 + 0x0000244d + 0x00310012 + 0x004d4d00 + 0x00090014 + 0x4d000031 + 0x0200004d + 0x00c8000d + 0x08080064 + 0x040a0404 + 0x03000d92 + 0x010a2001 + 0x0f11080a + 0x0000110a + 0x2200d92e + 0x080c2003 + 0x0809080a + 0x00000a0a + 0x11006c97 + 0x040a2002 + 0x0200020a + 0x02000200 + 0x02000200 + 0x02000200 + 0x02000200 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x01000400 + 0x00017600 + 0x00000e9c + 0x00001850 + 0x0000f320 + 0x00000c20 + 0x00007940 + 0x08000000 + 0x00000100 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000002 + 0x76543210 + 0x0004f008 + 0x00020159 + 0x00000000 + 0x00000000 + 0x00010000 + 0x01665555 + 0x03665555 + 0x00010f00 + 0x04000100 + 0x00000000 + 0x00170180 + 0x00cc0201 + 0x00030066 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x04080000 + 0x04080400 + 0x30000000 + 0x0c00c007 + 0x00000100 + 0x00000000 + 0xfd02fe01 + 0xf708fb04 + 0xdf20ef10 + 0x7f80bf40 + 0x0001aaaa + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00200000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x02800280 + 0x02800280 + 0x02800280 + 0x02800280 + 0x00000280 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00800000 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x01590080 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000200 + 0x00000000 + 0x51315152 + 0xc0003150 + 0x010000c0 + 0x00100c00 + 0x07044204 + 0x000f0c18 + 0x01000140 + 0x00000c10 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x76543210 + 0x0004f008 + 0x00020159 + 0x00000000 + 0x00000000 + 0x00010000 + 0x01665555 + 0x03665555 + 0x00010f00 + 0x04000100 + 0x00000000 + 0x00170180 + 0x00cc0201 + 0x00030066 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x04080000 + 0x04080400 + 0x30000000 + 0x0c00c007 + 0x00000100 + 0x00000000 + 0xfd02fe01 + 0xf708fb04 + 0xdf20ef10 + 0x7f80bf40 + 0x0000aaaa + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00200000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x02800280 + 0x02800280 + 0x02800280 + 0x02800280 + 0x00000280 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00800000 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x01590080 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000200 + 0x00000000 + 0x51315152 + 0xc0003150 + 0x010000c0 + 0x00100c00 + 0x07044204 + 0x000f0c18 + 0x01000140 + 0x00000c10 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x76543210 + 0x0004f008 + 0x00020159 + 0x00000000 + 0x00000000 + 0x00010000 + 0x01665555 + 0x03665555 + 0x00010f00 + 0x04000100 + 0x00000000 + 0x00170180 + 0x00cc0201 + 0x00030066 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x04080000 + 0x04080400 + 0x30000000 + 0x0c00c007 + 0x00000100 + 0x00000000 + 0xfd02fe01 + 0xf708fb04 + 0xdf20ef10 + 0x7f80bf40 + 0x0001aaaa + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00200000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x02800280 + 0x02800280 + 0x02800280 + 0x02800280 + 0x00000280 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00800000 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x01590080 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000200 + 0x00000000 + 0x51315152 + 0xc0003150 + 0x010000c0 + 0x00100c00 + 0x07044204 + 0x000f0c18 + 0x01000140 + 0x00000c10 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x76543210 + 0x0004f008 + 0x00020159 + 0x00000000 + 0x00000000 + 0x00010000 + 0x01665555 + 0x03665555 + 0x00010f00 + 0x04000100 + 0x00000000 + 0x00170180 + 0x00cc0201 + 0x00030066 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x04080000 + 0x04080400 + 0x30000000 + 0x0c00c007 + 0x00000100 + 0x00000000 + 0xfd02fe01 + 0xf708fb04 + 0xdf20ef10 + 0x7f80bf40 + 0x0000aaaa + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00200000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x02800280 + 0x02800280 + 0x02800280 + 0x02800280 + 0x00000280 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00800000 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x00800080 + 0x01590080 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000200 + 0x00000000 + 0x51315152 + 0xc0003150 + 0x010000c0 + 0x00100c00 + 0x07044204 + 0x000f0c18 + 0x01000140 + 0x00000c10 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000002 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00400320 + 0x00000040 + 0x00dcba98 + 0x00000000 + 0x00dcba98 + 0x01000000 + 0x00020003 + 0x00000000 + 0x00000000 + 0x00000000 + 0x0000002a + 0x00000015 + 0x00000015 + 0x0000002a + 0x00000033 + 0x0000000c + 0x0000000c + 0x00000033 + 0x0a418820 + 0x003f0000 + 0x0000003f + 0x00030055 + 0x03000300 + 0x03000300 + 0x000c0300 + 0x42080010 + 0x00000003 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000002 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00400320 + 0x00000040 + 0x00000000 + 0x00000000 + 0x00000000 + 0x01000000 + 0x00020003 + 0x00000000 + 0x00000000 + 0x00000000 + 0x0000002a + 0x00000015 + 0x00000015 + 0x0000002a + 0x00000033 + 0x0000000c + 0x0000000c + 0x00000033 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00030055 + 0x03000300 + 0x03000300 + 0x000c0300 + 0x42080010 + 0x00000003 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000002 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00400320 + 0x00000040 + 0x00000000 + 0x00000000 + 0x00000000 + 0x01000000 + 0x00020003 + 0x00000000 + 0x00000000 + 0x00000000 + 0x0000002a + 0x00000015 + 0x00000015 + 0x0000002a + 0x00000033 + 0x0000000c + 0x0000000c + 0x00000033 + 0x1ee6b16a + 0x10000000 + 0x00000000 + 0x00030055 + 0x03000300 + 0x03000300 + 0x000c0300 + 0x42080010 + 0x00000003 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000005 + 0x04000f01 + 0x00020040 + 0x00020055 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000050 + 0x00000000 + 0x01010100 + 0x00000600 + 0x00000000 + 0x00006400 + 0x09221902 + 0x00000000 + 0x000d1f01 + 0x0d1f0d1f + 0x0d1f0d1f + 0x00030003 + 0x03000300 + 0x00000300 + 0x09221902 + 0x00000000 + 0x00000000 + 0x01020000 + 0x00000001 + 0x00000411 + 0x00000411 + 0x00000040 + 0x00000040 + 0x00000411 + 0x00000411 + 0x00004410 + 0x00004410 + 0x00004410 + 0x00004410 + 0x00004410 + 0x00000411 + 0x00004410 + 0x00000411 + 0x00004410 + 0x00000411 + 0x00004410 + 0x00000000 + 0x00000000 + 0x00000000 + 0x64000000 + 0x00000000 + 0x00000000 + 0x00000108 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 + 0xe4000000 + 0x00000000 + 0x00000000 + 0x01010000 + 0x00000000 + >; +}; From patchwork Tue Jun 11 14:51:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 542 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3EBBE3F08A for ; Tue, 11 Jun 2019 16:57:52 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id f10sf4313477plr.17 for ; Tue, 11 Jun 2019 07:57:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265071; cv=pass; d=google.com; s=arc-20160816; b=IgOsaZxgMW1yWVS++Wc50FJ6umq+e0rQUF8zUxm7VFodtYmsR5Jlil0aRsZteHqlP7 XHjiZnxuOdrdZSLdT/K6TV3Ze5vsSbYeY/91omddyyzVg5PYG3Ca/LM/ME0HS2LXMjdH hW8/36EaYT9KsS8zrB35HJkivafTV33qRekZSIDJ+4VbcWG/LbDJiB1e22hV055bQdxu ebw9BD5s6yjn3iYM+Gtj6nvmuw3xtjd1sOFDUYeJnZtOTmKw7hOlPvSKxsP0Q6bwmGrD EA/nSu4V2JM87zbOYhe8S6Dx1a83WBXbbnXMCx8jCGCTLC7dHELQhVYzUv3Bab7tYazT PLRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=orgktRu+ZykfO5QbVsIhCS6AHgXuOeBO2kByRiVipBo=; b=mFvTXgbN0FEIuCbkHCl7UGBnBCWB/Y6iftWVJ5vPH2lVy8OhDg6RfKZYQFV2378t0x cgU0Y8tPCF+JIdb2Ciic4r60gpJLeCARWS5PafwBPEf/su4kGIh5q9HNAYlb8JBrBDPI 1HKyGsqkadFnJLbD/8UCGHNVvOBnoUjON/6OPcR6pA9xgXBFcCacQ+zH35zOZaCcdb0L xnqoFUzs+St6Db5Sk2oiYZgx9FTJ1JZjgHbTOyYqi3ynCILo6Nez6VAX7Bwhm1I12NEw bTZrvPFevqBKFrR3GfPdfdYsnh+/zUfXIeNzhIJ/bLQsAzvkyiAZcKINbEjJslSt4G4o Olsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Sh9CQ04R; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=orgktRu+ZykfO5QbVsIhCS6AHgXuOeBO2kByRiVipBo=; b=o3xSlKT+gE0wZ02mklJJQfPhZKK8Uy5QejKayTTUSNwSCXwIUEiI+RH9QdlxRUaRrC 0OC7dVNCYylLTr8x6u/PreavxQHIwn2n1PJfGWsncZaZOi/1llkqIDmXVvY6ycMLWvDw uVnRKSdZoTCUcf+wEvgtZGwhfkFHFL1yLUkuc= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=orgktRu+ZykfO5QbVsIhCS6AHgXuOeBO2kByRiVipBo=; b=o9R0gHkMHHh9ZSrE6ePnhrMAab/86hvuFVYd7kAxRpeVEVTE1nOwdO5i+jUvpWA0qz TVsxKbCu3KaMnwbX9qYVRy4NPg5QXnF/8BH9YB/o1ORcu5c10iiiFLu5/L6SQeojgSLK 72aKJ7DbBtAzAKKO/albRIVM6q7XPqO6wyqouTN7uGJKDIU9pHA+BaJkiE9rvSqEMRXI GuplWdFBhHL64wglGjQRjoTt8v/wHkAZb5Cinfw89PmfL6eR2QFi0imNtHMJzoacn89s 3temvbtb0Y9+BXZii5W8wNhwXhdRwCZI5698f7f4EEkpnVnqGShCuq9MP/nhPwFheZDC WQew== X-Gm-Message-State: APjAAAWah3hFK/6ROHuo3XQUQmETNS2+0U4jzE5nT/xnPvnDg66jyz3W pTp19b2GfxN2j44d0GxsC2I63Wy5 X-Google-Smtp-Source: APXvYqxU0SYy3iLCRvDSwu/yBXA3zjvayx7gYzvPhdJKrFcpRPwEd+MUHSuZBBPw8XccpKdp2sTEAw== X-Received: by 2002:a63:2a06:: with SMTP id q6mr20555538pgq.290.1560265071039; Tue, 11 Jun 2019 07:57:51 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bb8c:: with SMTP id m12ls1461364pls.0.gmail; Tue, 11 Jun 2019 07:57:50 -0700 (PDT) X-Received: by 2002:a17:90a:d582:: with SMTP id v2mr26406205pju.22.1560265070690; Tue, 11 Jun 2019 07:57:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265070; cv=none; d=google.com; s=arc-20160816; b=uZQ89AMRL4bZw6CBFUBXNSgPcDnUjl7cGDiBQFrh0yC6zpobc4TDgbWOlyoSk8U3TM 49WZLmamhx2+TXNzvhlf/iZ0zhAhjiHTOmm6lYci6G4eoo/fH8z+zbUiHQMbjJTZ4OSg //iXxG4/SLyhYF/si96uFfiybinzKQp+BDpZ5wTe4KEmotCrmE7wJmWWAk8Xt8f3Xob3 5IA28itQKtNLLG8nsKhjz2m57bHq1EsVCJP9gPTmOMa6gkWtasrYu8Fqw7sXJIY2Ro5i Tv9sH2FqF7ZWppuLNrL25yc1auyg9E7dQw9A3y4btBJdY8htOePrGBvKt6aLKyzqXNwW n8gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=svPyKMC7agKotsKXgXx/yVThlFKQ4oONT41qq6LCJJI=; b=onnrBVumWM9Sk/+UXkdqAgZFMz5Lfz4cTuh++e7Hy8rLd8DpyFDfVWNveVVWAv8NTZ WGkmtEeZ0FnvAeBPXE9yi0IHJMlppm1HjJbqTvTgwVVpk7f4fe5pCzWSg6h4wOoE4nrZ 1oPZKvLqBmyTSQy/7/LWEfdSx/r+EcT9BoaQG2BYKZpv7Q8pwWIfYx+uuTCrgxsCvezJ XIxj2OSP5dko6LEkATHZwal/rXc8hgHXOX3H4IbbXadhTF9BSA6eHnQAnnZoH4Sa6uT7 +8uKTuNNM3q2e5KDqeZTg8QFTZG0dxeRwAnqZdugH0Z/872zPiU74hFppuNxMNv3sonS EZUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Sh9CQ04R; 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 m10sor3109649pje.25.2019.06.11.07.57.50 for (Google Transport Security); Tue, 11 Jun 2019 07:57:50 -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:a17:90a:22c6:: with SMTP id s64mr27680172pjc.5.1560265070339; Tue, 11 Jun 2019 07:57:50 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:49 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 91/92] rockchip: dts: rk3399: rockpro64: Use LPDDR4-100 dtsi Date: Tue, 11 Jun 2019 20:21:34 +0530 Message-Id: <20190611145135.21399-92-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Sh9CQ04R; 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: , Use LPDDR4-100 sdram timings dtsi for Rockpro64 board. All these timings are processed during TPL stage of rockpro64 board, bootchain. This make TPL would replace rockchip in house rkbin in current bootchain. Bootchain after and before this change: TPL -> SPL -> U-Boot proper rkbin -> SPL -> U-Boot proper Signed-off-by: Jagan Teki --- arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi index 7bddc3acdb..dbfa4ba9f8 100644 --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi @@ -4,3 +4,4 @@ */ #include "rk3399-u-boot.dtsi" +#include "rk3399-sdram-lpddr4-100.dtsi" From patchwork Tue Jun 11 14:51:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 543 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 036713F08A for ; Tue, 11 Jun 2019 16:57:56 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id e16sf9277938pga.4 for ; Tue, 11 Jun 2019 07:57:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560265074; cv=pass; d=google.com; s=arc-20160816; b=L8EuyHKdwYzoLp+twxvLdINRxYt4PK4NWtmrj5+q6aJQrTpMKrWr5n//B3HZKfb2rL jLRJJ522ph+5ltcirKekleP/WhsvQUHXhlsQjfHgFiptVsGSJLBPmOIdhYibnUJLbTPR ylfTorNMXx/rOTwGWbccV6y1FLFCcAT/6LCde8hpmtRoZaPp8V3OmTl1cs83eLcj9ZcC q9exo6eY5yI3hpc307ZPCE+6CFUL1jVS46ACFVD9t+o6Oj6REE8dafU8TEa486cRvJGo KH5sVhPpSPTb/WENI4B0KUV/2+779Zwt4bawacQERhNa5IozdUK30kh5PG7Y4xFzjZrX QrrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=q33r4la9hsiFnpyO82EOLeD0twuOq76OcOaIIT4q3rs=; b=sEZP5V+W7KpAP4jDUDpeRbVqmrzw4LVdvkM05wcciiAEVmJ4i3xy1pKZbbIoV9TKFG F0BuR4pDMYwxwanBs8UsVWQPSVcamqHKqfEa5hjgi5XFN+uoPecjEA/6GgQOeqAZtfKE lNZHST8YndFW4QB1WwkniTHRCndOVnFtLQuAoywDoNAXB1CkM+GL2HS4Q2Y/oySC2iaT 5gpnUZcekXxe7v3OgwXmECFQIbL1OBs+B9qG0niiCEk6zDUDLslBClEY4KdvolImXh2F wDrcTtOG+JNQADXA05sfXxbRPLlWyvecFgXHeVCvq8rp3OY3GJ8JQOi2aUOEvdRPlrTO SrHQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=M6jDtJGn; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=q33r4la9hsiFnpyO82EOLeD0twuOq76OcOaIIT4q3rs=; b=p3NRNzk6Av2DG9Pl8DXWbE46R83deBoP7ggDBzKGIHwW6AfCTfPzGLzUdcEyD+EywJ RDPhhnDXtf8q0N2A+l0EPmOHWcfQ5QU8HiCZDJcRsmUjny/KjPWH8ceYp/4kth54sVKW 4Ose+lCBIYf0PFiLx2hEWPOzNXy+v5tXpe09A= 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=q33r4la9hsiFnpyO82EOLeD0twuOq76OcOaIIT4q3rs=; b=F50xnYZJbwLjpkL3BWwdCLDOXVV9DZYR7UZ2lObAB2Gc578c4UDEWPkMD3Kwg5K0jd EsZ5hREntnqV1HIyPa6gD13kyC6rTQ+8W9SzK1nZljxY1viZ6gOaKlDkv/W4YkV1//ZD 6WT1zLT1C0x1Tybh8IxIGedK3hqDmJphU4+QDUdGLAaumcgukImXqsgwCDLlU33fuD9P pwqD0OSkzlIOnicHHZe292Eez029QziVYTapcF484vXRgfo2S42/hT4ccgC8WMvfNf5G OPlDpYrOQCcV0NQUEBq4KAicwOe7FivJh7Cj0gT5yv4QN2cCdpbkADY98xflw9OJ2Jnz Kd3A== X-Gm-Message-State: APjAAAUzmt7oZb5DwEOeJQUWseGdOheZdNj186LXnJ6WN7QklzeN7fO7 4bw5Qn5OaIldXvAcP1B9HpR649I8 X-Google-Smtp-Source: APXvYqwgp6za+ptrTjRh1BQqD9tJWkZQjy60QgSnl8JnFM47eSFVD8UOqjVJpUIHrVgJge+iB9SOsA== X-Received: by 2002:a17:902:7891:: with SMTP id q17mr20444493pll.236.1560265074797; Tue, 11 Jun 2019 07:57:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:f081:: with SMTP id go1ls4899249plb.3.gmail; Tue, 11 Jun 2019 07:57:54 -0700 (PDT) X-Received: by 2002:a17:90a:2446:: with SMTP id h64mr28539514pje.0.1560265074415; Tue, 11 Jun 2019 07:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265074; cv=none; d=google.com; s=arc-20160816; b=cd8A3T6IU7lFXXnalt6K7V+36bE9jcixVsbYNyIvALhjFYE5QpZcC3ytM9OCIpWKU0 GBqFQHu07zH9+m6VfV/jo3ViFX0h9wIGEqapzNcYD+lUSzd80SGNTbPlxsZ2gEreXTEY cBOs0WBXNQ7BlIiYBhqZV/nwhTxjK+vfPt+HHB0gK8efbbnbLnfHJh4oLpanHzZtaFhH +9jtapyvHnnQSjSAAFMjeobVy/NJ1N7OA2aJQ9D7SxEiK9O2IUnRs7XRMxVdUJPeQT9j D2W5IzfzjeUGtfvVzA5T0+k26VSOD8coJCZH/I+CiGwWhtW8RbehSdLdNEhimu8g2xQp /SNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=eSiNIdWprSTtLeb4eEp8uQJ8QGoY6tivwLSGPJNvRoA=; b=KJWYOmmGSRLgNnSwuG8vRXO5wtfwkAkEkEJK54e9ATKlJ7h+zH9ysoD95ffLgfqEWS GQ4jkwSJTE3aciaRaGVtRD17VKgl4uTzLN7xHPITmv9b7qnSdfDB1LOfjsBug7y7sCPw pzH03oI6FrqPKb7rAGjQs6hJijbB4Ahc8wjFs6pRlVE/v0+Rl0b0TuSCFa87eLN17NaR ykePj0+2aPP3XXOs47AHA5CvfMmfHqUpIXyQfhUygv2XXoLqUDSwVgd6sEOWoAp4RDj+ DduaTHe9gCS/gpTSKKDfx53OUJ2zqq9HMZ78wMPRZJamhISH6TzDeS9gpnOswvZT9zOi EdDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=M6jDtJGn; 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 t21sor1000118pgh.85.2019.06.11.07.57.54 for (Google Transport Security); Tue, 11 Jun 2019 07:57:54 -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:a63:f54c:: with SMTP id e12mr20771000pgk.62.1560265074026; Tue, 11 Jun 2019 07:57:54 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.57.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:57:53 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 92/92] rockchip: dts: rk3399: rock-pi-4: Use LPDDR4-100 dtsi Date: Tue, 11 Jun 2019 20:21:35 +0530 Message-Id: <20190611145135.21399-93-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=M6jDtJGn; 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: , Use LPDDR4-100 sdram timings dtsi for RockPI-4 board. All these timings are processed during TPL stage of rock-pi-4 board, bootchain. This make TPL would replace rockchip in house rkbin in current bootchain. Bootchain after and before this change: TPL -> SPL -> U-Boot proper rkbin -> SPL -> U-Boot proper Signed-off-by: Jagan Teki --- arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi b/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi index 7bddc3acdb..dbfa4ba9f8 100644 --- a/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi @@ -4,3 +4,4 @@ */ #include "rk3399-u-boot.dtsi" +#include "rk3399-sdram-lpddr4-100.dtsi"