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);