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;