From patchwork Tue Jul 16 11:56: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: 750 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 C3FE63F08F for ; Tue, 16 Jul 2019 13:58:02 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id a5sf10070539pla.3 for ; Tue, 16 Jul 2019 04:58:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278281; cv=pass; d=google.com; s=arc-20160816; b=Lq2pDXTOKdueK9KA9G7kHD1XWzl9duYgV5EskmTzLh548K5uRg+tIh5+UxplPT2bLZ tjs0c4csCbco4FsFF9WV1Hzgp3o4/gy8siegvgp2+KdGZlKszKoJryp47apetRZXxvQA QrhihDhIT52GB3DzHX4waJ1tP96bZmVrAfCd1UBQotp2xiN0AF1yYoz/8mm0YXAwG2bc y1sJRsYT+CL2DNKo4kTk5dGvEM1idDX0DRLRz4XsltuQxri8Iipj2Vx26eNaIwrSUi8o KlZn6VOo/SI0UPH9O/ECbvpvHN/lUW2aoJDvcZuyPhIMpKXRtnpU8HupweTUT5Ny/v0O 2BBQ== 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=AsrwrAPeico+fuEb0O6zuw+w5D1PTveQKj49KbvgOX4=; b=mjiq8ZDFbAr1Fmfz1yVm/jQuTcXYjzmdb1Kn8sD8IkBjlCB3osBve2YpoaPKGkPZZD KrN+ZvudNIvMFqjviAWghSShDZO2AUraU4KdWHAjt4vEgcFgHkFXmjwJrZWF0QKnwmWB x/0mmFgbvj3aZK3wR7mI800nBGUZaZKi562xDjTTHVRGN2vQpjT4JteVyewcJOcDb1Xf mBirsOJnDtOmTGwPg2Fcm4NR5brbtF2CwjY4Qk1Vqo/BiMBHfUXBNQ0wZx4dQjT9+11i t9kCl3u3xRHc+Zv+YS/NWGoe0n2fnyCO6VnQwXoOpFBMWwiMO/YksfhyxZGTjp0eU4c6 +aFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="iVIx/jB2"; 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=AsrwrAPeico+fuEb0O6zuw+w5D1PTveQKj49KbvgOX4=; b=mURdwTbXvz9BtELSU6C/a/6CFyqLMRFoxliLEIBiSTca3izKhcIUuzCm84/ggG6KmS tp3upjVAwMw8bhrC1usgEU6jsYAR86VvN5huknSAA4AVF2JkVxLlz/ddwFJVisAcsAnA +V+EEpbYBezXyWmmGjjU5bRiC+Os205jtHU2Q= 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=AsrwrAPeico+fuEb0O6zuw+w5D1PTveQKj49KbvgOX4=; b=Hg2wCa71wfihAZep9gRv8nYH3rTVqZFPmosra7OcY7g8deX2a3rYf1G3/4AtPoybf3 XnCxTv0EjJkQWi0hWsxN69IRZGSpz/eWuTlTu4Zt0x80SbUIE1kLY40EqVEJ8qdLqCn6 rhc3J0m1gltnXEbFa98XT4Fkp7SzB5pMUwmgXh9om47RxDymQfnGgU9Bmq1Vt+CwB0Pp flJXsOegTLYm6waVfnVXGZ1IyueENwcVrRLWYxD8MeVkIB2uk0scPHzF4vBPNnl0Xe2i SkVOKFvK3yodxaP3i9Hk4ZmuZj5BSNhYbdqE9cSQTWCbkuWrw+DLuxnVs7FkvBkXAMDh idlg== X-Gm-Message-State: APjAAAVwQL5Nd86Vh+/Uy/7CJLDXSEvx4wTtd6/sQjM/LDd0FuBFUAQe rUT3VU9GMdW7JMX52xac4hWGNeeo X-Google-Smtp-Source: APXvYqzipbzV/MpwG/nmIPOGCKRVQKJHW1IXx97rI/eGFnV3fex9i2FeRcmZCV5qRVeLVR9R90PfZQ== X-Received: by 2002:a17:902:2a6b:: with SMTP id i98mr32947054plb.75.1563278281080; Tue, 16 Jul 2019 04:58:01 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a60b:: with SMTP id u11ls5463229plq.8.gmail; Tue, 16 Jul 2019 04:58:00 -0700 (PDT) X-Received: by 2002:a17:90a:384d:: with SMTP id l13mr36247649pjf.86.1563278280763; Tue, 16 Jul 2019 04:58:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278280; cv=none; d=google.com; s=arc-20160816; b=PN0Zozqq7SJDiIiKQtAliflDZ14ZfuF1mZWuLDXZyGi2awNtmVSbkNsf08ppCn7VZp tIEqZ12WROuI0A7IptVlD0nOE4KeEP4jHFo+ZzzZD1DYQQO5f1AkJW0wOdegikCeagQD ESKYEabOzTG/6d3HcGD3hS5xX2fUmEPSjzTi34yELRcM9/aGr1XCHS/ZMGISaRaDYUtX 4Eb0horzgskv1+Ur20nbpPpXaxj2Q+aIvFwSwoc9vk4AZEbaQQg7ngOds3rtna85hs+i xaDZA144fbiPXAFV/5RzVGQfqwWTBsdA8SsjpHBsJR30H2vhbKrcRw2kmeL7ekUdGqU2 tWWQ== 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=O5x4OMbaIqox/kteHap0vjhkRYIdbYmgiXXORgFTXCM=; b=Vmwz6B1qgmkA/EFAXy9EPogH3goWH/xHLZqXB+hYOv2WP9guBDjBPi0dw8eq4tDGLG IA3KF6W/5oMOd+Jtdka+izRXKK3RveqwIC3oHdEUUTv8d0bqg8MvNiKtS/kGOmvxwN3e iKG8H1kDpkD0O7Q5HJ4qnfJk01Phvve3BkGaugE3AHp14pANFdM/rF2K4R+q3LOeOJQ4 V65hKd8E4azivRZrjPVkGGufNi5S89EVVYhRWHTR2COz58/nr6vigWKLVRxnaA1SySr7 3GNiApBnq3H58fO8bgOzYI9AzFOyz4H5eWMvxPrsHjZadfRg6nV/CEbGJ1fIlbNqERDi mlJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="iVIx/jB2"; 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 j39sor24711593plb.22.2019.07.16.04.58.00 for (Google Transport Security); Tue, 16 Jul 2019 04:58:00 -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:bd94:: with SMTP id q20mr23824951pls.307.1563278280217; Tue, 16 Jul 2019 04:58:00 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.57.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:57:59 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 01/57] ram: rk3399: Add ddrtype enc macro Date: Tue, 16 Jul 2019 17:26:49 +0530 Message-Id: <20190716115745.12585-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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="iVIx/jB2"; 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 Reviewed-by: Kever Yang --- 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 b7549f5d8a..92a4c485c2 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -72,6 +72,7 @@ struct sdram_base_params { #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) << SYS_REG_DDRTYPE_SHIFT) #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 9a60c24135..f58836c037 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1076,7 +1076,7 @@ static void dram_all_config(struct dram_info *dram, u32 sys_reg = 0; unsigned int channel, idx; - sys_reg |= params->base.dramtype << SYS_REG_DDRTYPE_SHIFT; + sys_reg |= SYS_REG_ENC_DDRTYPE(params->base.dramtype); sys_reg |= (params->base.num_channels - 1) << SYS_REG_NUM_CH_SHIFT; for (channel = 0, idx = 0; From patchwork Tue Jul 16 11:56: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: 751 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 E844A3F08F for ; Tue, 16 Jul 2019 13:58:05 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id q14sf12247650pff.8 for ; Tue, 16 Jul 2019 04:58:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278284; cv=pass; d=google.com; s=arc-20160816; b=dEgGIl0VB/phfhWUqAI6kHtIzBi7RhX2ICjR/OCDFVZrzH3P1OSN8RYVGLqd//Fnv3 aUbp9SlgFlGOE3lkKM4/UP4MOeEETZCs+GDmzv6u9NjyA3jnQWbaLs796DX4tWoswqgb jatJZGyHBD08CduIjBs615ejt5m77wMaYthDGUODEtuHrB19s/KlagU6mhsiGRuurHyu X+16piuzhsfcgTH/k2Z5fKxPwIdWS4hbB58W/2a0FtR/www7jDj6f1YGxQLmFNoWE9KE JedPl+ZQB4EOeYfqYjbcpJWszBkwowhjzw+XHSJ82rePZKmjXnFVDjQ7yMq2H+j/FjSH XZ3w== 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=BVgLA0d8XBpd7bokOkuqioYsSU5nu8dA87XtA3bv9uw=; b=KE8EBknvcofZfndL9ioUSWWHXhDz5x0/pvjauVEnyLMzmneoAOrQ1CfdaI4cMCcnEA D9IGaVn6X9UE4JrXUaegx7NkujAhOAt+206+SQdkY5JwfbyIIFcvKklOSSvksvLdoddF x/ruq+I/ICqwpJlBur+2ZLDFy6OicNL8qAyxC5N895DhIDxCxVvWiMX5+hxhQM4M7GJF S1xbgnt8v6te3/X1aMpjtWfIfZBo4aEflkrTuub8wlCPCKa3S1qEefkWlc75XYjMj3xu RrsdrAG89fg+gBDgZt4U0XU3sYB0kXt28liSSrOuixPjzhbDVzfnJc5zOSmuTGrJjAQQ gY0w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=P4sArob+; 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=BVgLA0d8XBpd7bokOkuqioYsSU5nu8dA87XtA3bv9uw=; b=BEE38grOjKAQKBWXax4H42nOrVU2bd+z4Pai7rWQasPmozp6d+H9S21K75OO3LLC9S fyj+oQ+m+5e4cCstguV31zB5h3yEh63eQA2j2ohKWXk7bxnTaAJ26Hv3OT+bBNQLih7w E2HCRYf7uXc0oJB/xOqWpVuCVQ/HGrKouNJRI= 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=BVgLA0d8XBpd7bokOkuqioYsSU5nu8dA87XtA3bv9uw=; b=Zfs+PCU4EfGMj289cPUyTzxCwAfAEduyYViQccuZ04y5sz4HXWydmCP9kiu1YtS4I+ MC7/oVQ7P5b/fRG9s2AB6LVWplzd4qXA1EHmPOCXJvpMAEnamFsxZUv7i+kEHf2r1qXG 7AmY8cgvRfWsl7nH3aSr1xLv5hgXgPpFW16Z5DGVL+uTzFf/WBeSi9itEXyzq3SAOh8W vv6NiXugw8cICAqx+KYXMvW5GtAS67AFquD5VaAhU7guGOJelUl+P6q+kEYSSGYP4h8B o/TWOR7UzHzAEuPogxpXB/u/lpQ97h8zALo69BaLUtQSNC1ldCdmHUoaOPG5Fic0iVQr ckMQ== X-Gm-Message-State: APjAAAWmF6yXvITS1l1FtqUVBE9zS8DR1QAQaR1VVypYY3QlpX6eOTOi uPDWfDodZhmgi4uiwG4SjXrIqp0d X-Google-Smtp-Source: APXvYqw+oKK9Qcm96do3a/j04TSiD99dDt0EsGosWWeRUno0YYMnhIebV+eguJ2uZFHy/lnbxWAC4w== X-Received: by 2002:a63:b1d:: with SMTP id 29mr33099446pgl.103.1563278284721; Tue, 16 Jul 2019 04:58:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9895:: with SMTP id s21ls4340123plp.3.gmail; Tue, 16 Jul 2019 04:58:04 -0700 (PDT) X-Received: by 2002:a17:902:aa41:: with SMTP id c1mr34471804plr.201.1563278284414; Tue, 16 Jul 2019 04:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278284; cv=none; d=google.com; s=arc-20160816; b=nApNveXa5C0UQMJuNVKLQkNMHxAOUJHTP1WNfXyXylJ0MoS9yF9Zr0RVPq2ROwNF/k QdYe+3JZryiaos+pKb1J6abu7j+l6NvxGHJFbTjpH+xq1YvLNX/K0/3mIxyNqWxfB+SX jxYcbPbqF0w2E/DfLDouUTqUmxMciaKaE/wL6QwEO8vqP8U6zVbSdpC8NpcyZTS/lqK9 ORx86YMzq7Za/nIkNKiqJKee7FC1yjv96wRF7zIS50kTqc47kxhpwXiYKhD7uv92zFFb LQKzvUPBVp1Rm1jtxb7k9HtvNzdmHk0OlpOFntQCuGNancafXoHIPKpKlrT3DUoZZ1pc Vq0w== 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=DSJh4I00v6P/DYPfUgYi8SFwSbharXXL/nmePhcC06o=; b=B6Xr0+CQfWRynobEEef48qYw5TA3B9jB5o6bq4aFruUocPaxTofdJPpduG2kH89qNR AKx60r5HtIhBRh/QH3hse/yguyyftMLrabbPO3GZB+geDZ4tWg2G4Scn9XFJdeu2SZv9 ohofbVeMnjrgkPIs4J+YPCxkFIMN0+Ag+Xe2IKeQ5mTQQjw3s3DYLKR7seeMlsvLWQLT 5a0J9JGC7XZFzsEFljn4sUEZBiYwb11twC0OnO54tAbGzNelMLyE6+QvL5q7tFvWNgZO 0ocEEVKe6DyRrlHWWLTXWnh/giCNiOD7IXs5WVyYcWXWYYRW2HFZIipt+YJMYJIEcO9e J82w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=P4sArob+; 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 b59sor24867015pjc.19.2019.07.16.04.58.04 for (Google Transport Security); Tue, 16 Jul 2019 04:58:04 -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:2228:: with SMTP id c37mr36120778pje.9.1563278283835; Tue, 16 Jul 2019 04:58:03 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:03 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 02/57] ram: rk3399: Add channel number encoder macro Date: Tue, 16 Jul 2019 17:26:50 +0530 Message-Id: <20190716115745.12585-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=P4sArob+; 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 channel number. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen Reviewed-by: Kever Yang --- 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 92a4c485c2..076afe2ae3 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -73,6 +73,8 @@ struct sdram_base_params { #define SYS_REG_ROW_3_4_MASK 1 #define SYS_REG_CHINFO_SHIFT(ch) (28 + (ch)) #define SYS_REG_ENC_DDRTYPE(n) ((n) << SYS_REG_DDRTYPE_SHIFT) +#define SYS_REG_ENC_NUM_CH(n) (((n) - SYS_REG_NUM_CH_MASK) << \ + SYS_REG_NUM_CH_SHIFT) #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 f58836c037..830311ffa9 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1077,7 +1077,7 @@ static void dram_all_config(struct dram_info *dram, unsigned int channel, idx; sys_reg |= SYS_REG_ENC_DDRTYPE(params->base.dramtype); - sys_reg |= (params->base.num_channels - 1) << SYS_REG_NUM_CH_SHIFT; + sys_reg |= SYS_REG_ENC_NUM_CH(params->base.num_channels); for (channel = 0, idx = 0; (idx < params->base.num_channels) && (channel < 2); From patchwork Tue Jul 16 11:56: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: 752 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 9DF223F08F for ; Tue, 16 Jul 2019 13:58:09 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id o19sf12465012pgl.14 for ; Tue, 16 Jul 2019 04:58:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278288; cv=pass; d=google.com; s=arc-20160816; b=EBRFU5jHzyuBpJh4It3Em2z1ExdzqN0nX8WZp25IaPkAOBPLgW7FArqBr4CxEeF9eO SF/bzDAI5yAnUSJZQJBpOwV9OKYJrYMP2/Edx7h5I9MEhEeoGk7m3fi2OqULOkZz5IUm nAJ3AGWXiy40deIUhPOH7OGjiNoTciOuoHCNQZCB/MUxTN4mLAtnQ4XnRlTSe5gD7fGR q1aEB77e0GAVjqQUMLsQIBduqrtubPCrImBOz/2N1v6gMVPtPiQZ+ohhyj3iTGvfh/c2 tiRFkn2WeiT8j+6v1r+v/uJ+3tqvZZy6kuOVNUzoocw9qpVTMwVrM8UaV4Aklw1YHora AcNw== 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=MWlHZrQyRczU+06EiUl3vgd9NOXrYSmpGkeiwff4R5I=; b=I6zwMYsio28Un3Bye0mcttEEIqcmjzcTM0AT7rVXcmJGZxU/jo12XtPXWjtwFyUn7S eG+mLOaFd3cYMbdXeT6i+2cBNazqhII2/SsgKWAqhL5G/qXWYOswYTj+craxddh/Jr+N OkNyX8yDEDbHsVGiRc7BE5Gl+qvovjHAh3mS1ChtEUt/EX4/6oK7+VuhwhiPQgZTKawH B2BL5fOPTPBgLHprScfEwPmAufUtKW40b4OiTpjUVo3TBbTg1x36cS/8zESS5mL79jSj UETHylITFKUpsrbcwnmsKvIwdZN1h/Q+xGB8bIZXedL0kTZh6472qdIWVAviMBwCCWfJ 3veg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QZmjDZ+s; 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=MWlHZrQyRczU+06EiUl3vgd9NOXrYSmpGkeiwff4R5I=; b=RbB4x7FB22NgZ7BkFYyWe46lpZT9WAOVNPMOX0TvmRhC7Q89Ohayus/ej+zU2kOC1w USFc7w0vpxZMBCF/zim2eh7W9ly92aEn5XTJsruDfh3UsmqKGhKV6u0er6LOqmDpWJjd AqLr14Qm/YzVqb7OBlLgLNJnTNtusKE7oot+M= 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=MWlHZrQyRczU+06EiUl3vgd9NOXrYSmpGkeiwff4R5I=; b=lk5aJCAN01gfFE5Z+MHfQMqhZoOkpQIG+bcnx76YC3NnwvHBaq5VreLZajVh89MWAN 7ZI7wjMoh7eSXpA/1xxTaghghamlsgSQmk4H+ShRMM7nCQgdZUac/nLdKSVno3TOTzBP b6/I9r3Jbnk1k1v8Q11kGoOrAdX+uIgJA+UG2r8yKLfyNEWxcPS2Cnod3L1Ez6OdjxBS Z8p+ZKb8AzVnc1o+MUnXx0ybwRc7X9ZN7JpaPcsfyh+aDZVK+NG5P9tHIpGfgWA4XF/h HRUIAOledhBJ9LEwdD2Ez7OOKpcV1xU4hytF8GRJCxy7gQIdrNDyxXqersY9cBYz6UKl G0UA== X-Gm-Message-State: APjAAAX1sBkm0cbiT+4Hv0+zP7tkj3Aecjbm6mRvqkzRWO0IeggRNyLh ZJIVHqd34r4ZX1KcTuAQqh6De5uf X-Google-Smtp-Source: APXvYqwZXxbUufZbVxUzFt4APsqeomqrZi+QrJWIVMW98ESs1x2uo4FEVD/+WxdJGyf9m95mhtopgg== X-Received: by 2002:a63:c20e:: with SMTP id b14mr32109557pgd.96.1563278287956; Tue, 16 Jul 2019 04:58:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:905:: with SMTP id bo5ls7080853pjb.0.canary-gmail; Tue, 16 Jul 2019 04:58:07 -0700 (PDT) X-Received: by 2002:a17:90a:bd8c:: with SMTP id z12mr35835343pjr.60.1563278287588; Tue, 16 Jul 2019 04:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278287; cv=none; d=google.com; s=arc-20160816; b=AUG1MgAJ4zlHosKM1jup0+DYYDSrrIgd3AZqG/F8vwk7hW/9AnFKtA6Zcd8qGZE8Ob ThMIC08X7wA9m7sqg+uhN5IP2wskGUhuIEMKz9Tk0kl1IWXTGSqoy84Goy+splcyjL3E RpkssXRUOo9w7aowQPaZLT0HeIUvbFlxejpgqFPPTfwr7C8uxDsgjUwVRQUBuu6pesvT +tezK/NykLkSBNwz5ST+tp25547izLO7kpjVfNgMVKtwJ4ONZrY4ajyB+NlSLBikuiP6 fAEgU/yvDPv976lUUn7JA6RTj6BwjJdAod4OyWR6Dfmt7XNzZrQ7XujRchEYzEePLrLT 9Fig== 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=R2Xvx+xaEN7GG8Ut0L1/mXHTaQYOC5n4Pflx8rX6nbg=; b=J8oim/QiGH3ZSa6gfLRiaphNBcsN19PFe+NJNjvWlDk258e/6IUsawsgVJlH+Kxhl5 3JT7bbAtSTg/T2Z/cP4oXxK9nSE0k7qUXlC/zfeeqF5GdyuF27OEurLJJm96RlqilSaO euNnjGA3rfNGAZz5I6TGTPx/LAvOLq04XpJCYqXqgNEjWmupC1YoSnkInYACw4ca7qxq WhfYxCkf8soCAwbJonvaPVTR+NUs75Xd8G4RTRqjs/JardOnuQw1s0M256LfpyYR3L0R zmf8SlFW+GlrBgYSpl2GHGLn89vVmhAvVUEqvA6O+ty10ewF6I9j2CcAvoN74sCYzlDM sk9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QZmjDZ+s; 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 73sor24450903plf.60.2019.07.16.04.58.07 for (Google Transport Security); Tue, 16 Jul 2019 04:58: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:a17:902:846:: with SMTP id 64mr34833017plk.265.1563278287322; Tue, 16 Jul 2019 04:58:07 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:06 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 03/57] ram: rk3399: Add row_3_4 enc macro Date: Tue, 16 Jul 2019 17:26:51 +0530 Message-Id: <20190716115745.12585-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=QZmjDZ+s; 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 Reviewed-by: Kever Yang --- 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 076afe2ae3..e5af3eab7e 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -71,6 +71,7 @@ struct sdram_base_params { #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) << SYS_REG_DDRTYPE_SHIFT) #define SYS_REG_ENC_NUM_CH(n) (((n) - SYS_REG_NUM_CH_MASK) << \ diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 830311ffa9..d97efb6996 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1089,8 +1089,7 @@ static void dram_all_config(struct dram_info *dram, if (params->ch[channel].cap_info.col == 0) continue; idx++; - sys_reg |= info->cap_info.row_3_4 << - SYS_REG_ROW_3_4_SHIFT(channel); + sys_reg |= SYS_REG_ENC_ROW_3_4(info->cap_info.row_3_4, channel); sys_reg |= 1 << SYS_REG_CHINFO_SHIFT(channel); sys_reg |= (info->cap_info.rank - 1) << SYS_REG_RANK_SHIFT(channel); From patchwork Tue Jul 16 11:56: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: 753 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 A6BDF3F08F for ; Tue, 16 Jul 2019 13:58:12 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id i26sf12194200pfo.22 for ; Tue, 16 Jul 2019 04:58:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278291; cv=pass; d=google.com; s=arc-20160816; b=eEyHsxUSVzkmFum1TSzoK2/f4ayD/MY6R1bhqqeypzolITDBybSPd7F1dmMRx1EVbM s3XmaMND2kQxxPsi94HRKL1TfQanzw0Lod5BbT9iXn8MYXGJZxfCVAmJAafQ16HcHriA Nw5jYv1bxtkcfP7ZaB2iIJledCYhACE/Aqa58B76E4eczrPsUQAkjvZ6vw3sUHiktUTM U9NRDS8/z7OiHdzEEf2vRgigq23ejfJ+jTJc8yEYd/PduCMzeaADZSbkB+/UUIju/Zkg DC3tv6WVlrrJ6WMvVWZh4EY0OrcxOVzpms7krwmtuo+8s2h3Fm0KKCeVoYo5WQg8qHTM fCmQ== 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=BW1fJQT26G6KTcslGBvNCSPJI2LralhU5lMr9JnLF5c=; b=NNvQe0c5spuMxeEW5v5AMnA/ICa1IxDv+UhXhPSffJ5VmnzNyQkEFPvdKN7M05y4XM CRe3KdwUPodDCKVsx4uLUOdX+AlA/pJmFqygP7vYr0qqRY+o65n9krhlJg1EmGJKmwgC WRl4VqYiIh9BXkSgQCvOl+jyGnQkCSC+p5nM4G7AOVum26uksizgsJUBziY3A5j3RAXx FHl9Swz6YAQsw99ILadH2EbIYQzvHqQmNIqmXdprGmHUzfq27S8Pf1r8qKfYma4ckgtN hcV9f2xSrRv5arDxYZrGgQvQk5uAS4zsSktLdDFD3ONuE6wmeNh3uxqTaimhsrQrAtpy /2jg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dCY0FXfs; 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=BW1fJQT26G6KTcslGBvNCSPJI2LralhU5lMr9JnLF5c=; b=S/Ax/0Zk3kp30pXhGTV22Ni+asP4ZT8ZjcOOpGzdVLHkOD9ETZW8lzcv/YQOkLttia Gnj9n3GyyIqLDRdmmAtuXeF+wkhp7TlDHvqdeViDrwBDCizrm+ey6l7lCaDiavCRSvBD CF8SSW8oxEXOteuvcTMHPOT6/ZeRyBBw4lzBM= 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=BW1fJQT26G6KTcslGBvNCSPJI2LralhU5lMr9JnLF5c=; b=Xv+X/QJIOs8hLV+Z67hGiUNYJfZ/pLc7+eZ+ndEHfMZGPARqVvVwfoUYOxxSzzu2WX OUVdV7FtdmZHnNKepcU7G2lJPXMrLNpQzYMd/TmEn9mgRauJy4/nCdr+5gk4ojTkW99z Rweumoyg1KvvLF9CTufe89XYS1vIh0VOUkhk6sZ16BTGaNJnYfp+2YZMWY0Q+DgqvEtr BZY9Zo/5021AKdYX/QM44/eQ624T7AdgfXxXjMMyRW9xyUyaxBProDOPmtOcRjBRt6Rr ae2dEvkcdxarh5eCEj1PgqF4QkD30AvrEDw+jNYf6S3Ly97fnQGuxKnq6ubR6+yObZ38 aPMg== X-Gm-Message-State: APjAAAVwP7hNHdXnMYCGC5NTUTpaioHyd4wfn9IUEXR0UoScozJZaw9G O7W/5RQ1zeuMxq8hgB4VE5dtp8EY X-Google-Smtp-Source: APXvYqxOlxcspeNRZMr3KoFFAKkaBzb9MnJBN/tpp6eP4nOgpYP4DUnCQwYyTBN6jH/5+M89TV10cQ== X-Received: by 2002:a65:5144:: with SMTP id g4mr33095833pgq.202.1563278291374; Tue, 16 Jul 2019 04:58:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b402:: with SMTP id x2ls5462765plr.14.gmail; Tue, 16 Jul 2019 04:58:11 -0700 (PDT) X-Received: by 2002:a17:902:da4:: with SMTP id 33mr31836290plv.209.1563278291036; Tue, 16 Jul 2019 04:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278291; cv=none; d=google.com; s=arc-20160816; b=Z95203l3oDtw7AG3rNkW9HS5Y76/cTIXscpAMKlLpbE+qvV+Fq5NFnrDu6gFYBclzp y+QJ795NbOuPgmPP0OoXZ9Qcw2dCTaDTFFxc+Fqu/yXHahjLP73dIlFjma1pa0tQpsgw /tFCdDAOcKpRT1skqE6os/kvO0ChUam6kwYEpaQNk1DNUYpWqKOcJsEKebd5/P01219D 4kF5JT1dlq+xuM7QNQEZR+AF/ikXVJMx2Ssic/jpZ8gusQuHN8FnBaN9SQ4/DpLGWeCP jTERC75UGVj3fCAYGHvS8ozCcDOAet85GsKsPU2wYcwS0sXxTVuMO/1JD4lEWkFR6a8R qVUA== 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=8BogZbqP3R80fB7AlTvCAG5t45Neo/pGqiO9GVcYGEA=; b=ybyNOlTlcnWlHwXfZiZOclWtyOOsnB/kYJ7luTPjTdHIwObjOwSTOWPbPOZ89cs8Nb zpnl8cG0VvOulG7fFgwptMW/s0+LOZmI7X9JcdezzLj34kgY1zQmdS9q4ysasfCTni1L Q4l2d169BFPxcdG7YguDTJx5/4/Ksf+A44WU/mXkzwWFLrzXXb0RCqb0DiRj/jLJ16gd hXK8eZx/vwLrBdU9T6GP1L3njWwMTDDBAkuN0F6JpRAYVODf/zYknTEeaCLMZ5BZsrOv fVQZIt377hs1jZQ7Wn49iTI5qPgltrMcXF5AqZgiVXvaSUazNnqeSWoijliGMI+93ZSO 3gAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dCY0FXfs; 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 t21sor24992528pjw.19.2019.07.16.04.58.11 for (Google Transport Security); Tue, 16 Jul 2019 04:58: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:90a:8d09:: with SMTP id c9mr36387626pjo.131.1563278290740; Tue, 16 Jul 2019 04:58:10 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:10 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 04/57] ram: rk3399: Add chipinfo macro Date: Tue, 16 Jul 2019 17:26:52 +0530 Message-Id: <20190716115745.12585-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=dCY0FXfs; 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 Reviewed-by: Kever Yang --- 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 e5af3eab7e..2d0be920d9 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -73,6 +73,7 @@ struct sdram_base_params { #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) << SYS_REG_DDRTYPE_SHIFT) #define SYS_REG_ENC_NUM_CH(n) (((n) - SYS_REG_NUM_CH_MASK) << \ SYS_REG_NUM_CH_SHIFT) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index d97efb6996..874e896369 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1090,7 +1090,7 @@ static void dram_all_config(struct dram_info *dram, continue; idx++; sys_reg |= SYS_REG_ENC_ROW_3_4(info->cap_info.row_3_4, channel); - sys_reg |= 1 << SYS_REG_CHINFO_SHIFT(channel); + sys_reg |= SYS_REG_ENC_CHINFO(channel); sys_reg |= (info->cap_info.rank - 1) << SYS_REG_RANK_SHIFT(channel); sys_reg |= (info->cap_info.col - 9) << From patchwork Tue Jul 16 11:56: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: 754 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 574A13F08F for ; Tue, 16 Jul 2019 13:58:16 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id g21sf12219195pfb.13 for ; Tue, 16 Jul 2019 04:58:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278295; cv=pass; d=google.com; s=arc-20160816; b=pzQ81JOVyZHyi3ZOQHPGURsq+FtH0VXf4Pa8WNFmFiWbQPMWeI3DEuhxk9U9o0Vydv IPH6k2bvDOwXyEfEFnLQUzaiYlM0AYqDkAT2LjfChA8U0XAGLCNQgBgX9cZvaRnrtrWV crMmehV0WVR2Q+SbYYb03LdoHVQ6R6+W3MgoZhd5dNMaeEG0IIFJM3SMOheXTWb2SpLG FGeDsbVsuxSqG0dqlFpjJmdSIqBrq2+eJGf1I9muVPnOEbChKktYId4iWrnWOL3FTIvX ENNocq0rg3mMaow2uBA6gLHv2Dy2IoGM73zr96cOrdv6iWG7gDIF5hidJux+vhpDhwU2 MJyA== 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=q0PCbqvjUrLOYkmo27J7A13X4EmtpiPHr7wm5UXUROM=; b=UKMh3i7fg6NJ6aTcgOr36RcJ20B7wXiCw0rxl2SdYV8OP1TcST/ELJ/WjM/ntEvyM/ 3UP5/6iTeyzDdLqZr9QNRIdgh4t0lFnZKmXHZRS1ezKnAGCVIC+mmyYv8cror5Iyew3t kbsLcoRKyL5oq9j3hKrN+O0iMuD8TUfp+2yZYaiP61S7QP7pd+JD9QQXvRomc7l5g2gH r/DqSCepttLp+7QB9s6/r8yHkQtjTWud1sk+dNtXMwDZBPjAhYoO0BuynxI8VbFHMtcP SFRShs6LsfxFE/mQZCtOPCG4E1w2AHrVju08RGTocFIqylrW1MZ/f2+jOsXl3fkNfEwU MG8Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kfFDM4CU; 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=q0PCbqvjUrLOYkmo27J7A13X4EmtpiPHr7wm5UXUROM=; b=cDpPsYbylgp0wB4oAOPzdH0XFIsYy4ZADHBMbNHio8dElEH16x5T+Y1YQgtceWQh97 WNTSdMubnIaxOcGkN0ib4q93h0SZQtBm/3rR7sHMenhTK2gg9QbvHP9Jc/J2B4imAWtO +MImyIUUVlcAL5+Qm5T+4QlXKAKg9p2vo2hCE= 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=q0PCbqvjUrLOYkmo27J7A13X4EmtpiPHr7wm5UXUROM=; b=aGB4sgtqL60dwp1SjRUl6MP/6uTevaKd3qRv/e+t6Y7oTt3L3aYdLkneutUSD5ipDO B+TP7fyVlK0D52Yk+uT3OPU/D90oST3Z3uIz1sRcj4VZ8WPmhORbcCy2tWu5kuH+3pSP JfLLh8uOt69KilM3gy3I8kFgfsaGbZAjT0wbgZWc0MZ/ukIJ9KVigPhpXaCOuerd8FCk biGZqQuWTj/mo9pSuC5oJiqYonjtFaVMrHpl82Y0hyk2b4gZBoB6ojGU1e5WPpAUJdkg f+oYWPy29T/j3vDt3pBEbrc//5C1duTZHPE0ZmOoNx98/lOQWrprQhV112IP3WZr/V+n BMEQ== X-Gm-Message-State: APjAAAV58TIMSg6D//Ua7Kcg9n/rJlChTmJgkp4Q6SvEmEu38uudPb+J QLu1AYpdLqSFTeDVGIkhhiC2jbRV X-Google-Smtp-Source: APXvYqwEMIajlDLKSP7GkVPU8jXh0Dqn5LyxKn60CMasHwfddEgeJJ1fw431K1QLWNnHfdbDKw6oFw== X-Received: by 2002:a65:6081:: with SMTP id t1mr33497530pgu.9.1563278295063; Tue, 16 Jul 2019 04:58:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9895:: with SMTP id s21ls4340242plp.3.gmail; Tue, 16 Jul 2019 04:58:14 -0700 (PDT) X-Received: by 2002:a17:902:7448:: with SMTP id e8mr34829040plt.85.1563278294780; Tue, 16 Jul 2019 04:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278294; cv=none; d=google.com; s=arc-20160816; b=BuroH4Pikys+77GJBoEJ9Fzo6dtyTLwxMEEB9o87rxHaHkvGkXHvEpHbia7Z566gU4 r0B5eHu4hY9rm0E9ODPLD9Qf0PQvEmVj40SAWcvU0NuWpb0GsbbWKxdYaiXCqfBzCCeJ 6lHOWlhI95mddsnYI7l+Xb1+jQsf5/a3/mHVox9mU/rXGub/DGFPW8WxHHKoNn/d/zdw k8YKi0FfIpnCbmtX6l4b+oc23VTxr9BV4so26AyXj+WIjDO0iKRPvrSijWYUwVBJhfkv Lb8RcwokxcJY9V4lcOY7+4DXazmIAMGFvgfhtopMUrBuDZbyzeY7buINQVhdULH4DYMH YshA== 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=z3Lk8qTZYKqG9EuBV9bI00XJEHWQHcKKp+DGT0GYOXk=; b=NmarUBNSS3M45Otp8UgWneUR4dl2upZXf0I4lXEqVSqQAAdy8gPVNuDBytJC84eG11 YyKXw5VCF0bQhUC7qADIsiewxXD6VERC3CA7E9g/mCA8E1nDJ1nEdWkQiOsT0Ks/JhqB 6qAZ5Lgp38HInRDKPdGjnYGqsNeo/c3Vk9eRwWbuVGNfsW707RqMAwuDTq79iLHJrKRP xNSTbY8af6SJty1BauYsxsN/07xZT6EGIQ6EJbK0V778aZhYL0mdPIGNP5TNyptgna+t cgNhI1ZZuBJS98DooofA5xE2Gf30tqkO1m1oF9uLcsNJTjd8CnoijQuzfbYu9ah2/+NR 7PjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kfFDM4CU; 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 o2sor25037966pjp.26.2019.07.16.04.58.14 for (Google Transport Security); Tue, 16 Jul 2019 04:58: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:a17:90a:380d:: with SMTP id w13mr35059640pjb.138.1563278294439; Tue, 16 Jul 2019 04:58:14 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:14 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 05/57] ram: rk3399: Add rank enc macro Date: Tue, 16 Jul 2019 17:26:53 +0530 Message-Id: <20190716115745.12585-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=kfFDM4CU; 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 Reviewed-by: Kever Yang --- 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 2d0be920d9..db9e30126f 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -79,6 +79,8 @@ struct sdram_base_params { SYS_REG_NUM_CH_SHIFT) #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 874e896369..c2390a771c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1091,8 +1091,7 @@ static void dram_all_config(struct dram_info *dram, idx++; sys_reg |= SYS_REG_ENC_ROW_3_4(info->cap_info.row_3_4, channel); sys_reg |= SYS_REG_ENC_CHINFO(channel); - sys_reg |= (info->cap_info.rank - 1) << - SYS_REG_RANK_SHIFT(channel); + sys_reg |= SYS_REG_ENC_RANK(info->cap_info.rank, channel); sys_reg |= (info->cap_info.col - 9) << SYS_REG_COL_SHIFT(channel); sys_reg |= info->cap_info.bk == 3 ? 0 : 1 << From patchwork Tue Jul 16 11:56: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: 755 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 101693F08F for ; Tue, 16 Jul 2019 13:58:20 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id r142sf12218926pfc.2 for ; Tue, 16 Jul 2019 04:58:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278298; cv=pass; d=google.com; s=arc-20160816; b=V3gYuoHzZVMnXzOoU6BaJrIdgOqGBWM5JTRPTK/ryq71rNjp7F0lINFYN+smspj5jS ihjeJ8kf8KPm5bDkMrHD2n1WO9m055K01WewwgVgkBNKfYVgCqMnxlWfMbXGVDejp6qI ELC3yL/w40xnay/dTejsrRGCZI5fIOyOlEj+tAHyV+O9qpjjhwhqzCn+ozZv8+PHfp4y /Pw/409YyaclPYmKzqzftPiLbA4Os3UY57+c1I3w8pjqx8bFtlEj7GLAtzXI2XsjjfML X6ESYykxy5magtkzlg1C5L89bMOlWzda+lW+unI6HTiZghCLDxKnwGfKpSXrSsES1b2v SjBQ== 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=Ni3hDwS3rUU7livqtpt+XGU5+i3XeGrFt1UvG5aD5Bs=; b=sREiqmziry6OPeqRwWzunkhHF/Iyxe3OlAcektw2GYgcBFEtrX0WSoDRmK6wH9lzlb uZMh1XNI3XK704ekrLjrFG1yk8lL8NI+/BLBIGs51hR6xbfUwPlNglmiuyLZQFiXpcA7 1crAz4mZA6DEuD747PD0NjtqdMAvJkYOWxod4wt9aBGdW/687wfXgjyPbRYO8SpM5sRi 59EWqK4ZY3R+cnjvGnP8MyAgbcTFAcJnQGwro/9jQ5xujf44IysjRAUV44uItyRsfG/z u3nRn0/ybYAvyTyRWYITFyPaZSyP8wVW4PYk+8NWJWfKNZp52gKWJdQS6pfzgTEagweJ DKtw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ePYDBvji; 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=Ni3hDwS3rUU7livqtpt+XGU5+i3XeGrFt1UvG5aD5Bs=; b=FyYmthrdDrZomAdHHodgNy+9geVHC2xVMDjFb2yLvNgCh0sioF9xk8m3iLrAeNEFBA i9DnltBhB1f0/+Q6eShngrZFMFTM9ej7Q1CKXrnheP0FFUpZtE6sdKh0rkbpFrF3H/KK 1SwBN3iPFpDx5jmFhj/0VKF1Huj2cxgHP1LPk= 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=Ni3hDwS3rUU7livqtpt+XGU5+i3XeGrFt1UvG5aD5Bs=; b=gu7DCkRLHEfBysXlXK0lbg3FlFrAV0GRj9SRL2osBLQgrmzMgOZQeoe2JR8cI14inl 5XzVfJcin4BoyxBwmvE3n6EpfCzUVg5KuXRZfkuQ57xpzMy8iFU4lwc2oz18rcOMWQI+ SbS0NvHbiAPrVk6fFG9+oI8dcQu+BinEwVPmosPzheLlTC/0fpF4cOWV0wtSXE5Tocqt 2ycHqI5BrZLu0JsyUDBrnoXCKI4jqmyRkQmIsw0ltH1TriVxa+Yg2/zunowQVKJJ2JQN TVHrIiGxk8v1HEjxjuss0qStvozry2qqQhuXtexE/rC5p7g8+zjXgmRXF/5ZVyKIpo47 Pt7g== X-Gm-Message-State: APjAAAWFhn7FOpiMxVgcZucgKMzVuaKk4lw0fdEihgotHGiRalPpo8Ch S1NWsbiCHWvt8zLwEWa6PlbI5/ef X-Google-Smtp-Source: APXvYqxw0p+fqjgAa6yAlGxuF+aNrhqrnJafx/L+znOpEaplEzQ8Ux+TV8SxWeAERawd3Pir4Q+xrQ== X-Received: by 2002:a17:902:e306:: with SMTP id cg6mr34753507plb.263.1563278298861; Tue, 16 Jul 2019 04:58:18 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b48c:: with SMTP id y12ls5464275plr.4.gmail; Tue, 16 Jul 2019 04:58:18 -0700 (PDT) X-Received: by 2002:a17:90a:8d0d:: with SMTP id c13mr34460266pjo.137.1563278298498; Tue, 16 Jul 2019 04:58:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278298; cv=none; d=google.com; s=arc-20160816; b=PSyeRIWAu70po6+V+x6AjcpfjVE8Lt0mSe1Gzq5FH//0aUtLHafw0Pk59I3I9/29IW B0RTcH+0p8j0VV2N8ZUVr3HDi60yFWo3iV4KVZBtX4UC1DHJnH+zBBas2xupRYryUr7j XTlj+cNDehnFcK7YVfx6LJHvOSbZzP0DD7WoCZPETGLAp9jxBZidSGjyRz7wqSHS480i 3hTbXdlj8n7lWvRrB14RQ8nAOMrdeU+Jgc979+6Xi8P+e4WUyCS2F7ADEk8Hx9HUxR3D uGY5SO7ou9sRc9/MDvZcm53rsuywIngTwEC3JLPRrVMFBWTbGuPYeXOsWPh9P+cmLxix nQpg== 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=TFvI0S4CfWwHtbl2JqDL7FjN6lCMyy3zZu+VBPL6t3Y=; b=Ecp9e25fTeRRcVI7m137eTDMhdb/28vTJ5SuFK9y/PpoPRNw3PIcfAmjQJu3hPhRo6 DEtOfFHR2HMBjmwR1HSxnZt6t5UM+bHFDgknPsNg2Y/lgJkx/dB/C2hSmw7fVkPdMZ9x qhzsRZhV1Vlgw6CDlLVHPoU0YdKhogbeppZT3TnaYcj09s7bSVwD6Cf2/qSsgS/TP9e7 /UeG6zvZcGXGBjniSKegtpDClWvig6Pn7E5xjgBNW1t7q6oATzBz32xMZyDFYl4+oTdk Rri3OAhLOgzHXWk3UnDjzYE0zX35Jk8IY6/RF8hHKWV2heN+4+BK6J34CpzdXMrdfhAS NYhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ePYDBvji; 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 x27sor10770650pfo.43.2019.07.16.04.58.18 for (Google Transport Security); Tue, 16 Jul 2019 04:58:18 -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:7a06:: with SMTP id v6mr33364967pgc.115.1563278298200; Tue, 16 Jul 2019 04:58:18 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:17 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 06/57] ram: rk3399: Add column enc macro Date: Tue, 16 Jul 2019 17:26:54 +0530 Message-Id: <20190716115745.12585-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=ePYDBvji; 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 Reviewed-by: Kever Yang --- 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 db9e30126f..e7f15a7cf9 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -83,6 +83,7 @@ struct sdram_base_params { 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 c2390a771c..f6a83f2acf 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1092,8 +1092,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_ROW_3_4(info->cap_info.row_3_4, channel); sys_reg |= SYS_REG_ENC_CHINFO(channel); sys_reg |= SYS_REG_ENC_RANK(info->cap_info.rank, channel); - sys_reg |= (info->cap_info.col - 9) << - SYS_REG_COL_SHIFT(channel); + sys_reg |= SYS_REG_ENC_COL(info->cap_info.col, channel); sys_reg |= info->cap_info.bk == 3 ? 0 : 1 << SYS_REG_BK_SHIFT(channel); sys_reg |= (info->cap_info.cs0_row - 13) << From patchwork Tue Jul 16 11:56: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: 756 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 AE38F3F08F for ; Tue, 16 Jul 2019 13:58:23 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id h5sf12484827pgq.23 for ; Tue, 16 Jul 2019 04:58:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278302; cv=pass; d=google.com; s=arc-20160816; b=tyxxphT1Lbkm1GaJq0HiqmaJ3fGmINSCXeiIk4/YvzxfgSkuJHWHwzXzPrYRz+Mhhd vsfwGRK7s5AcWG0l4EQCh1x8O99b/nLbOoz4HfwiMpDNdKp0fnSTID5hHXC7dwmgMW8m UKnVGy5NoehmzOFF/+HAEnUA30YhDQ5YYZwW0v4S9hj1kxG++RgJjBPJcBnN/WbQcryA 3gvpfEMJp8iKnav/6UjhLZlVUfQlR0a96cM3VxWT1mK3U/07l7CX1kgkpuPeC+1FapC6 fmXkGnJK+KRaUQ4No7HLSB5xAtWFOP4kJiyi+YVAkX0QDJwE8AXqCz5KBtwog6jyCBEO uBDg== 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=ScPb0zDoG7tFmS9fQmz3UYnf0xWQ3kEcvaM5aoygrIY=; b=uoBNK+h/XpRYfFYimVUg4wr72Zvi6gowls0e8DvYGuMEi38JuEFAMtjNrI9s0V0A/o 4PZodrz0ZEwC1WgR3/F+eeNk359ay+J/mfyz4KYzkn/E/iStHRWsxfQXh8kyMKwJdGZV RlfI8WDdG+LHiSX1dbanK1171ZAEJMyEZS6mDxgUWVrYi4co9cI/yWuVGifbHN5HtUZz TEUq55hEB9wnseOwc4BEoYGVUSMgT6GEgo5jNVrnskGdrDHfctvdcjCi09yzaqlCt9Ua BUGmkneZI2snlrUMoFKHr8HVtpsksz6ZlMsW6Y4qeYK1N6m4Ss5U6t4kbaXi9yItd3qL oNTg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jNpnIVKw; 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=ScPb0zDoG7tFmS9fQmz3UYnf0xWQ3kEcvaM5aoygrIY=; b=X+Zi6LVlU2ELELpPv/5RBsPr7XghG8jWunb2+oxymabUZ4NDV3/DNEvlF3HYmLSmQb TA/WmeyjpGCvJg7cWbLqaheX0yS0V6PqHwYpi43uoUJAm3tm+MmQKHRx42ZyhMRr0jWv 2uWPuxRdIx7MDT81vAAErj5dHjCXz56OwZRV4= 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=ScPb0zDoG7tFmS9fQmz3UYnf0xWQ3kEcvaM5aoygrIY=; b=PNbpNpNoEsN7C79wjR7Tl+CBN9r0K600ctK9pYbHnxf6ZNwrw7VGHi741Q004EpJ0X EdXnRHkRvnkpp5OP+01C35/IoEoBpPl/shq7G/+l8w5U00dVfgVh+p3sv78onHOYDrNK 49IWem9kMjNd4/0HjxyUBgD2L3xEaWGKPcvOWmzmfNIqDkBWYl7gHJnikrla9rc6Fmex PdQ5xZFidCkVxLrjqRoF+9xDpT/XDW+8HHvbyuHQVavbrouX420rCgIoWN1QeIBBY3yi vqcA9SJJWK4XeOc137MZfLRyN8efq8RiYs7OYPfvXuLl7rpO4cTqmzRY+RASPUWt3b5N MPpg== X-Gm-Message-State: APjAAAVElaWhQamx6xTEPN2umAIAxm2HHj98GDpgy49CVuRoVUs61B/5 7eGn4dejbYJzRHc3tHzT50JNmGwS X-Google-Smtp-Source: APXvYqxpM/g8Ms5brwHedpHYyT4suHBCfYNYdJOr2ix7U1qq3Jmqw884jg+ZyaqNwOCU61WEYEznzw== X-Received: by 2002:a17:90a:cb87:: with SMTP id a7mr36797998pju.130.1563278302487; Tue, 16 Jul 2019 04:58:22 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b402:: with SMTP id x2ls5462882plr.14.gmail; Tue, 16 Jul 2019 04:58:22 -0700 (PDT) X-Received: by 2002:a17:90a:1904:: with SMTP id 4mr36644453pjg.116.1563278302186; Tue, 16 Jul 2019 04:58:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278302; cv=none; d=google.com; s=arc-20160816; b=1AKGLvVhRruXsmUUw6pXlNGCMVIXX1WunjwYkvo1bWgQcZWppBL4KvJJ5do1JPn2mm YyDEWxNdRAwOFk0Rjzy80ucxk0bUFUB7oggwPz/knCisZ9DRVu2ZDhzUJAMwn4rfN0xR yUzH+aj/ZXaD0Ww4Ddke0Jv387mcC/8YyBZ75orSGziiYLZ7jichTfMEsvIrnB+1cQhv 3T9KctdAORT06Ckcemjw89MQXyuRsjP56FrYn03kp1HW0WnW0xQmCisl+QUtD6V7hlvS UQ4vqnNfO3SApIjBptSDK3SPQA8rLDpSTioqHDDSB9/ieJYSjeoUCfAzfAaDCIJhsTdg cS2A== 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=xFSBaPoLEgv3bGdkt8E0ZmIHJeSdBwXN2dF/hzci7V4=; b=upc6iRdaDFEUMrMDgpRkqZrrGbWwJFOHt+qsWywV1W5T/VbR/xLSjQ6Sn74Aw7iB+7 wykax5fzpi1Sw1SRENz32Kms+Mv8ioAiWpTrYevcSrb5V//4HL1HbXd/6jzbZJKPqU5b yIyPCKoNwy9QbDgfWW9GB8n6OtzX/GpLhH3d44Ht4dYsb4FQAByNYZ7/EfiKAnlGgf5p mswoCsowegJEzz3bUXLVyEYbo4038OibDMrp8iqEnLhjYJbKE1U9riPIkk8Z23sn9lSL EXsR9zCW6bwqUFkNJj6TCeMG/hlxqgCZ/y22Yd2GIBAo0ccF4I+VmeXyHgP9T1rfkVbU rIjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jNpnIVKw; 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 l10sor10499630pgp.54.2019.07.16.04.58.22 for (Google Transport Security); Tue, 16 Jul 2019 04:58: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:a63:6bc5:: with SMTP id g188mr2108600pgc.225.1563278301786; Tue, 16 Jul 2019 04:58:21 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:21 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 07/57] ram: rk3399: Add bk enc macro Date: Tue, 16 Jul 2019 17:26:55 +0530 Message-Id: <20190716115745.12585-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=jNpnIVKw; 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 Reviewed-by: Kever Yang --- 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 e7f15a7cf9..71062e3e71 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -86,6 +86,8 @@ struct sdram_base_params { #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 f6a83f2acf..b93a6c6c44 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1093,8 +1093,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_CHINFO(channel); sys_reg |= SYS_REG_ENC_RANK(info->cap_info.rank, channel); sys_reg |= SYS_REG_ENC_COL(info->cap_info.col, channel); - sys_reg |= info->cap_info.bk == 3 ? 0 : 1 << - SYS_REG_BK_SHIFT(channel); + sys_reg |= SYS_REG_ENC_BK(info->cap_info.bk, channel); sys_reg |= (info->cap_info.cs0_row - 13) << SYS_REG_CS0_ROW_SHIFT(channel); sys_reg |= (info->cap_info.cs1_row - 13) << From patchwork Tue Jul 16 11:56: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: 757 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 3BDED3F08F for ; Tue, 16 Jul 2019 13:58:27 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id o19sf12465398pgl.14 for ; Tue, 16 Jul 2019 04:58:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278306; cv=pass; d=google.com; s=arc-20160816; b=jW1vWLjuVqOz5kwx8rZqQx9flSPIRfeafldEq2vj0D5EmJ+aPKkZ/gQFIPnBmQk6MX uBQCtdciHKmT6mN759MHZhFJ+QoTthcrni3pYGk8bgB38QSRftcNIPiJUKCcyG1+8wUG eu36e9kjLhb9baKd8qrq3kzoSuLOAVRAR2bmZ+pHZnC8VeOcnrKxzp2+x+izIpunpL0A 3QqMIzV1iYJXamvN8q6/p9ZUJpD89vm4rzdzvSmMRxst9RybS8rYev8jdx3HoFHtZYh4 6D3M1M0wgkfz6M1rWXFwk29EmT5FZsqf1g2xGtlIE84W2/W8COEJ5p7lg1qfICfM15sp MBhw== 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=ohQEaA1qLYx/BDAwx14sGS59VkUtK55xaZopfDHDT0k=; b=IhLfwl0i/jpA+ywC6U/j1q89czbOXvnyoeR3JDZL+0S0LKiwSuQabF+lUcPUyPKz7H GjnTDiB1qvRebeIQj0P9Dyx7UVwiAD0W/E9Hkjy1w88SFfPy7XXqn1IE6f9kVJuUwwbD tjI71WqlmoXpwWEGviJTLhzAoj8SP6sKB9o51iLVTUYuxmtI/JRZ25Np6xaTgYjHdMaD ns1SIalzIPKPdFhD0Y5OhslZhKWy5AtpoPS3Ly7k00u9fSJgD8TW3ikjavOGXQqhaeSd 5AvOlQLSqQbDiFTM8/Siwq4F360GmXRke5x1OvhqTMK3KD/08/uF2DEqFcfFAQnC79JM yP6w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Cd3cJPq3; 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=ohQEaA1qLYx/BDAwx14sGS59VkUtK55xaZopfDHDT0k=; b=P5IPpagh934oNliooTgr5vvD+Us2WRgat/P2N3PKGHJ6xCC5EaKgtKZaFKv17AwfoM GRfYma0bJmxgDl+kEPij8LLEWprNtBV7Xr/CWZUtfAYEnRvNsuLcdNhEDAg+osR4bNS+ VOpHUsu42U2FyepNb9O/BtFIgBF6R6ObF6XiE= 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=ohQEaA1qLYx/BDAwx14sGS59VkUtK55xaZopfDHDT0k=; b=TaWqxEGn7xyY+OCpjZJqttrPx8SFAjl4NG29DC46rN7aieMX6PbqKQ/mmPmU/gpq9u OJ5dVFveB8EjXgF9Fm/ODZp1x9Z2mKJ8/vjUNtCn6FCDBoyzNd2YOOfvi5A6PL9Aupbv /MOL2XEohrrutjfOgMzkECnAWhpAgWe0z25YCQPt5xBf7reOHPCxedaGFvj1k8/UAuSl d5i/A6aPnNpXqUMlzByo4Roi4rCIBJWs2tojalQDQBkVPPB8yjjDlNAqi3F6gDXbYeWG DiV4UYKxFXmsK6f8KX324koI001nlhItVfSJe9FA8h8Mz852lvif1pUbdvds/gE2ZUk8 A71w== X-Gm-Message-State: APjAAAWUW3JTOx12EGEmJCW7U4+ABzWpwqJLqICTKERcdZWL0V/X0ksU k/ZP5U9Yv3iswrdn3WFowrlIi0rI X-Google-Smtp-Source: APXvYqynT8P/QcIOFdbj1ISKxuQOdIIdwpIzxshyNFZItsMwzyaUwPd0g9qxxqdrbkwPZ0PZiY1CrA== X-Received: by 2002:a17:90a:1c1:: with SMTP id 1mr35782774pjd.72.1563278306078; Tue, 16 Jul 2019 04:58:26 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a70f:: with SMTP id w15ls5461692plq.7.gmail; Tue, 16 Jul 2019 04:58:25 -0700 (PDT) X-Received: by 2002:a17:902:b206:: with SMTP id t6mr35316782plr.195.1563278305725; Tue, 16 Jul 2019 04:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278305; cv=none; d=google.com; s=arc-20160816; b=yx0Ghh0ic6VzCQpFhVYJ977kBwujedFavgHp583ZgZzH60JCZSBRh2Sa2YveLwZiTY 4XMxhPVv8StV4LJfPLb3ET6NI3wF13bpUOJgOGmOtb57f7HZnXenGd0MkYI/NyPMpFi/ pnt8Tic7ce/UkDntw5yl9QUNgHvctAZAc0Ni3XD1UHcLJVqbn38gPcK9syNlOExZ5IZM lbaFJTWCM15rEBoxNzzTW0dCHRP+4/+eks3qvOlTkcAmT/YoYefmIRqdKpkf6Oydv8q0 e4pS8tAiSPXYcSZGPKZ2KOnlZ+3m1zHaQxFFl2860MpMTUgwSe+BZPQ5q8fd4HGwgLRP vkNQ== 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=Pz3uWBLaKvlci/tn17NEquWR/zeQoVQMRytHfnj7YZ8=; b=iAf6eKmXIMDWSChkgfBWsJ3s6am2wsuhZTfFTFDF+DaPgYF2r+tPvvx6Y1Yr2vFBsS 1DuSzTeFbX5DXyeug7TdkGHP0cIU/m73AAO0ayZWeLMsubDvKol/qDOO6stCo/Vc/QDx 06478iiumOfwxvqxGwJ/SX7FS1wOGMapzteZFOsNCjUoIRaSZEBL2qCEWiVcsqLBhqll Ouw4X7ZaMZrMBfKr1LGJ2L1Q4zqZVyCb2dYVWhwCjJY3AYmlB5MFVT2xVb1EUCsrRcoD SQZBELcJ8moSQTCCafb3d4YCLhyn3AQUZ9D31ZQcCs0Zy0QsOpMo/fGf1HEjMS+CtkXT QHdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Cd3cJPq3; 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 196sor10343516pgg.26.2019.07.16.04.58.25 for (Google Transport Security); Tue, 16 Jul 2019 04:58:25 -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:7d49:: with SMTP id m9mr21862723pgn.161.1563278305321; Tue, 16 Jul 2019 04:58:25 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:24 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 08/57] ram: rk3399: Add dbw enc macro Date: Tue, 16 Jul 2019 17:26:56 +0530 Message-Id: <20190716115745.12585-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=Cd3cJPq3; 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 Reviewed-by: Kever Yang --- 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 71062e3e71..338f4043e1 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -96,6 +96,7 @@ struct sdram_base_params { #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 b93a6c6c44..b994134fdb 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1100,8 +1100,7 @@ static void dram_all_config(struct dram_info *dram, SYS_REG_CS1_ROW_SHIFT(channel); sys_reg |= (2 >> info->cap_info.bw) << SYS_REG_BW_SHIFT(channel); - sys_reg |= (2 >> info->cap_info.dbw) << - SYS_REG_DBW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_DBW(info->cap_info.dbw, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = ¶ms->ch[channel].noc_timings; From patchwork Tue Jul 16 11:56: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: 758 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 F352C3F08F for ; Tue, 16 Jul 2019 13:58:30 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id s21sf10064297plr.2 for ; Tue, 16 Jul 2019 04:58:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278309; cv=pass; d=google.com; s=arc-20160816; b=elMLOxhFC+f44VK6wO+4fcwCoEJ8sj1YPZbKIfKL80DITLBFDo4IB4+6RcaWrBitEO 2VsRji8xiAPFV7CcSiTfl+css/aofE+i6TKF4xGVlErV+DPv2iXwIbF45VTqhQm0QO92 9cPgWPQb16EhvxTSpEI//cWVArVM+DQ8xYeBSs6UOb6hdz3nw0QfjG9nb6Hcsp6B7bOn zsEjV0W6hgZt1q5pWlKxhxmDoSrxFyllUgTvXzTwJxUumZS9p9b3bPxg2FNSqnBUsoGc LZCpaRNErAAmKiw2HPY5dFXhrzuLPC8U9YpS1yoVxAj/8EQH13gOfoXH4//DVBa7RGHz 1vSw== 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=p6wr66Mz+G1boxJMJbNplms28b0SOxVmxvRCj/P/o7g=; b=WGWcraNinbWWfqMdP29yKx3lINu+ZS0Z3mbAM2WYEwwtldSeY7G1vhFMlZJxz23Gfy yAMAv1ddH0vcPIFXDvcmrcMgZDmv7E4PaNoV0YnLgcSCTH/Fr8r2QIXwWu86qTVjIFDp VAytS6hQO0IMkUPUhCnNGNYD7jo/xqVlS8HD7dnUP0jPjzVGqonEzJlTOkMwe8lAxu/A fau1WiLfRot0IDrfRTToRVMMXvwRPfMgId9RcmaQJONu644wFDZiGE0epML2QeWxOhp/ Gyc19hFenF2Lh0IIe3OpfJ+h/kepB0ZcWdg5j8pNYD/6g1Lf5U7PGT9AXbXCTB9fh6eR jDWw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PcmLxSbV; 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=p6wr66Mz+G1boxJMJbNplms28b0SOxVmxvRCj/P/o7g=; b=VhMId7rHHdLXHWkD4pYDWDsPIKn+jauHMrgj5rPwk3FsL9evaL7UeIi/8+GN/fOde7 ZlswyC7ZM6uMw++J/SSqIDJDJwXwu6qoz5KmIsw8CM6p1alusKQYLjyIzhcGezQTL+Q5 +ecORHekmXlazbGYX1vJa0wR7ZmURA7x89kuo= 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=p6wr66Mz+G1boxJMJbNplms28b0SOxVmxvRCj/P/o7g=; b=As2GUiMy7tdO3TSWYorKnW+RhmbKuWkw4zYtbc0kXu9LJf82jsoBIS1kWSl8dzg2bA 9JvAgJG4A3ml4WZ7Ke6yPhknDOqTSntJgQh3RPTpxl78zhrGNNCPa8Zbv98zFRikxs0j T32GORAPTN9rWLYEJPJMg8qS2UHtQGwABYQZBfDWMR1UQFaSfQbmUYGngP9EzsknnywZ EIqQ8jRKglTnUZx03bVH5oNMOM/WbR2lX8L5s3Sc0SvYiGatDlV81AVDrGrtab2b8ab1 hWV641COxBomiKBzjmVc1hobA0glniRAAETApbUDzEqeztr62MvWWr/6NT32Q7xzKKfL lwCA== X-Gm-Message-State: APjAAAUxr2ouV6aegtDJJJIHK/Rkd34zDcA+Tu/xDp7h+lpVLWtHmndK 9B9eoOlg59Eqz/iWMKGw05134Ok7 X-Google-Smtp-Source: APXvYqw77Ag8xh5pXt6hmKnMC54/4SLD680V8JHX9YGRkHN9MvqokPYH84doSRV39H9Dn0Euf18C5Q== X-Received: by 2002:a65:5202:: with SMTP id o2mr12070161pgp.29.1563278309731; Tue, 16 Jul 2019 04:58:29 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:3fcf:: with SMTP id m198ls77578pga.10.gmail; Tue, 16 Jul 2019 04:58:29 -0700 (PDT) X-Received: by 2002:a63:5a4d:: with SMTP id k13mr32070781pgm.174.1563278309249; Tue, 16 Jul 2019 04:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278309; cv=none; d=google.com; s=arc-20160816; b=kLgQgsN6Ww946D1Ja8Hl7X0084rogsDKJ0UTATQ9PmZSXMkTQWp3kzDaHpl11qghKg oqHPfH9xIrbTDswgjAH5KLqI3Rxzpys7ujonuLRjXRUtIqNgcOm4/uvQ5MHzQXtxmWcq 7aYs/XlIJX7uatMDULhkaywVhpyupp3JkwknTGrJmP6mRFEsoTlGaWVdMHPkik5Re4X6 0W6qRyYX+lx1RStxiflB0czOEvZR8LHPxo0nbG8CQVTR9ByIWOsFxjbBi/pU51A7fWc3 3zGFYy11erinNnp09aKcynShtw93HnuU9+5rCZHfcOnvungZ8uf34T55vxMn76cFmCNX rxFg== 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=MaEdnzisi5q4eMpgFmSgOHmtpsLKiq2clGF/4OGDslQ=; b=oqZo1EG2Co1GmBJnlljwv8v6D7D7nMCOfnNNwhRFfAEDq+1zD903RYUt5wctTXOQIn XUjRmpwSp/OMOLR+mX5D3V4MkqLagcncNCuJHyHdSGX6Tx2VM/fylAWpBVsCyW3a9GqO nvDBwhXrpYR5Lkd+SOdBjPRCtHSBVKyMV10vVHkpl8k2D9gQBAD/+DFeqprfD5242Qtt QCpzzB54ZyDBrxkAKJUYKaWHXzTv+yLMFC7l1QQKFxKDqI+q0K9nA4wfGMDtu5NQaCik 3lVe4Ahq2SYk1RBOhTWWgTuj8M+eCANWLXYGT4+dVkFiEvDxmqdSFy46kv46XaG4rUxv Kq0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PcmLxSbV; 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 c9sor3495699pgn.74.2019.07.16.04.58.29 for (Google Transport Security); Tue, 16 Jul 2019 04:58:29 -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:500a:: with SMTP id f10mr2092494pgo.105.1563278308911; Tue, 16 Jul 2019 04:58:28 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:28 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 09/57] ram: rk3399: Add cs0_rw macro Date: Tue, 16 Jul 2019 17:26:57 +0530 Message-Id: <20190716115745.12585-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=PcmLxSbV; 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 Reviewed-by: Kever Yang --- 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 338f4043e1..ad9726a57c 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -90,6 +90,8 @@ struct sdram_base_params { 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 b994134fdb..43cf597828 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1094,8 +1094,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_RANK(info->cap_info.rank, channel); sys_reg |= SYS_REG_ENC_COL(info->cap_info.col, channel); sys_reg |= SYS_REG_ENC_BK(info->cap_info.bk, channel); - sys_reg |= (info->cap_info.cs0_row - 13) << - SYS_REG_CS0_ROW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_CS0_ROW(info->cap_info.cs0_row, channel); sys_reg |= (info->cap_info.cs1_row - 13) << SYS_REG_CS1_ROW_SHIFT(channel); sys_reg |= (2 >> info->cap_info.bw) << From patchwork Tue Jul 16 11:56: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: 759 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 5B7A83F08F for ; Tue, 16 Jul 2019 13:58:34 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id m17sf3562754pgh.21 for ; Tue, 16 Jul 2019 04:58:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278313; cv=pass; d=google.com; s=arc-20160816; b=R8klu45v8NoF4gt3P04usmASTwPsmplNRCBKMGG8m0/faLZ1xCmEgJeAEVTW/6fQbz 8/IifuIKSNv7g4LKOS8aS4G1hJvQCMhNO6JVAweZ3uAJ676M682zf5lKw2j/Qee/9sdo OTno+QxFJPaLbGa3k8/vwk42BSy09cKOwP/Kdsufowy9gKuReF8lFdxEwCK25GS3NMEs yBcpDIDDBgQRPvYxBrsBMY3FqUa0mEw8Qjj4kkPy/6rA3DBtbz/DZsM6ZAoqVneqIL5j vRBB6z87yC3fVeMzdoRB+CGuCv8oqr6G0OAVlkCFXIjqUH2QwJbyOA4onaAhIhK5r+T6 Nd8g== 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=MHTvnEVNyIcJQJwTg2KneMepAv/pcjfCI4L7ZJPlsZk=; b=oakx+GacqEY/3m4H1emqwtJL4UJ45kXHTidvLq4YDUhyDgK5f8UfWUPdywBL2/ao3M ETzOONF02sWZDUPbt5zdwR6KqT5yNbBUHyE11bDFHrvacLn9huf7k6rCNqLDsG82Gw2m FB/Q4FPpn3ERB0AHju5CF9X67LF8gjevQgFJ3UBQOcIXduQVdTQKDkPlEJdTxzPVAP/p hcbRZk7Nro5vuiMB4ZZ+F6DWdTlWXP8Ppm+VlO3GCxpO5Z0eEThHke6nlxq9npA8H0YP O2XSxASO9FOepeUplYDFsWUd0Vu7amPL4s86he3sXl7tkCkUd3mbeaJ+IJffUEYL1Lal nZyQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iVDPnhBP; 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=MHTvnEVNyIcJQJwTg2KneMepAv/pcjfCI4L7ZJPlsZk=; b=GdxNviTEiAgxzvwEeBMDE6STzohnY4mJOitj0hM0FguGczZxTriGdXOKQwXn359x+g aSjHScXDyPrUM70LcAvdXPcy5ZAzuAR2gV8F2ul41IPDPREutlXZ9Qa1IuAEZzMmg8w3 /h3CIdA+koKwk7ZEHhFa7k5TkzC96WfSD6ZBg= 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=MHTvnEVNyIcJQJwTg2KneMepAv/pcjfCI4L7ZJPlsZk=; b=hkDbPabL7urXhCt/oaDyv8JtSdQrCcGV5swyVrO3oCrHU2IWiYPR01vvx2XEYqMsu9 dhUvO3f84Bq6S8qKb9RuvobeunFmE3wsPP5BizmjRTOdCEI+BtRFInzrk5UCTWltsGh7 LK5Nk3dQfPfB6V2+Px8/kIUSyMggFsDN4BBTzRrvW5tH4qV9grW1D5Kc2H31JvY6Csxa Te2wfUtTQ3nveZuvY35miFG0/G6LoRkHYYB6hMBsuFg1jM/DUo2Rull9GArwANB1MK+E 0t8T7oD10xiArNp8PJOAdnbYWVrT2cYSgktjOvmdVczmyzecRchBkcXzmOuA3AwX7lcV Qd5g== X-Gm-Message-State: APjAAAVmqvqjqvu+iPWiLcJZZTsnopPftsbEkBUPQJkEWbwO37Ef0/qR MdK1Zo69TdwmyGVEzO//bM2G5UVx X-Google-Smtp-Source: APXvYqxjqJ70yhhdpkGaBcHWtX4tswVs/vcsL7872HlBAn5YFnjX2WUiCaDzO7/nyKPjU32EtsXmxw== X-Received: by 2002:a17:90a:360b:: with SMTP id s11mr35298322pjb.51.1563278313120; Tue, 16 Jul 2019 04:58:33 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:d705:: with SMTP id w5ls5469120ply.12.gmail; Tue, 16 Jul 2019 04:58:32 -0700 (PDT) X-Received: by 2002:a17:902:20b:: with SMTP id 11mr35240893plc.78.1563278312747; Tue, 16 Jul 2019 04:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278312; cv=none; d=google.com; s=arc-20160816; b=vQ8rfoJ89hGc0BoyrtMhdKtVwg4gATKCtA+lc+vogt6VvM/YtPpCMthPmK0Z7+AiDZ kUshMHsbPPZ/PIAQTTe1Wrqmlo95zeEDeQfBXMhLevgtabqRO4i0jXi10SfR6tLM3/T5 AXqXjO7E1vOcAaQ7x6ZbaR3OQ9+o0mNRX57OVl2ESWB7GBhz7pRj2XQ+GzQKT3TP578t vtqJStBTHBRb7fZq+t62SZfNZdM73PCaYMA5I7mS+Igoq8Mp3MzbSHVxVSFE9ckh9vvE zo/tg71e8Iq2xHp2LszSnss31so4DR7g5aidXeRtApX3fcCgfTc6dsJtgDL3O/Qeca6T XqEg== 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=yORN6ilDAH50AgvnfaFSdINdGaiaAQ4jirdj9cxDI8I=; b=yb4HREO78RT8tQ3IZChmk8ZI+84gqajOCmpi35V09cEzoSl9IBb0h38bCV+eDy9zHK ANyHf0+PkNqC4nINkPF8vAkQT7JWVUu0AVz1wBA9qpzh0EXLGg5iBpRzRv6arluYd9PP nsD6V/X8p3MPK2xkkwwkfmWP2aJ+EPkAY8o4U3CAjnrxvwXQ/ehtrvaKJ76Ht87jRyWs v4C3EEKTzYPBbts/MZZWull+wIaNycB6vTaJqit3sMeMOU+opNrdRVdUiNUfDTtk6Wc/ SvDj04nmveTFxGvkIQ0E1A8ST3RSsfdGXXN0Wg8n+4Hs6xOSYRtyTdt138AZkb9Y4EiS Vvtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iVDPnhBP; 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 z23sor10674730pfn.3.2019.07.16.04.58.32 for (Google Transport Security); Tue, 16 Jul 2019 04:58: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:a63:3ec7:: with SMTP id l190mr34218273pga.334.1563278312405; Tue, 16 Jul 2019 04:58:32 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:32 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 10/57] ram: rk3399: Add cs1_rw macro Date: Tue, 16 Jul 2019 17:26:58 +0530 Message-Id: <20190716115745.12585-11-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=iVDPnhBP; 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 Reviewed-by: Kever Yang --- 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 ad9726a57c..578db90241 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -94,6 +94,8 @@ struct sdram_base_params { 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 43cf597828..a83709f271 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1095,8 +1095,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_COL(info->cap_info.col, channel); sys_reg |= SYS_REG_ENC_BK(info->cap_info.bk, channel); sys_reg |= SYS_REG_ENC_CS0_ROW(info->cap_info.cs0_row, channel); - sys_reg |= (info->cap_info.cs1_row - 13) << - SYS_REG_CS1_ROW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_CS1_ROW(info->cap_info.cs1_row, channel); sys_reg |= (2 >> info->cap_info.bw) << SYS_REG_BW_SHIFT(channel); sys_reg |= SYS_REG_ENC_DBW(info->cap_info.dbw, channel); From patchwork Tue Jul 16 11:56: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: 760 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 BB4723F08F for ; Tue, 16 Jul 2019 13:58:37 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id s22sf10073145plp.5 for ; Tue, 16 Jul 2019 04:58:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278316; cv=pass; d=google.com; s=arc-20160816; b=AqrkHznS9IU/0j6mnMFvkcrIe1VHyv3VSPjL/VWAzskYdKN4EqEY4+XQAgbb8ZrsfY iMPQVFT2owCqNwmqle4Sga5N9/RpNnknIQwHbbQGoacGy0GVR7KtlQr8/FaGus3EJBZa XmAhrV1O0lLtcNFwXAURGXVrhbnBnoHn4Dkx16kUZrPXk1zXmWdg3xB0YTe90nB2SK0C mYwdy6VBek+4NaXrtT2s4xyCjup5cSvKaFhDVnev66Wl4HsltdgOlD8wUytC0FHVUJoJ 6tCshjqis/zDVsg87ufpSH9CBK0dUcJvM41PIPsf6GuuDDlIbnFRj+s+FtZExy3x5bRV KM2w== 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=nOgI2VyzvYGZh3L+P9WZW4FcHrvYSqKGB2qbLzXG3oc=; b=IzqiAnSEWZnmM83ICIoWpCzji8AUqYDnGsH6v7lwvdNhejZSmmPr3n17ABXx9tXAP2 5fz3WT9EmgQdxC9InnuhajwqubSzUB5Defp5bDrOCnlmc5A52+1Zqmakx23uOUmyhyWI X7XFa28GNH4uIDrI2tk8bNAnUonkESE/JjKO2LgZJa9OqtGfJIChf6E//w7X1bsvSxUY ZzFzQPx5Eb2ecHISDglKz6TTFR0kn6VuVmhdP0hoMiNtMLLYEW5FHLT+/iV5yWHOBNVC K9t3GO+lmiztTV8QS4FLZoNWtEQfBEH32KTvfwoX6+MZEHdpOFlz4dud6AAw7KbQwRB/ QENQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Q225OtBk; 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=nOgI2VyzvYGZh3L+P9WZW4FcHrvYSqKGB2qbLzXG3oc=; b=FdP62CdD4LhHEFi2Kpfi/u/9SvTLGwWJFHZIwnXeOZc4x0BVH+SOYuqFNFd45Z8axq DmgvdGe3H9+04Dt7uNO4tZwc/UWGMS+Ehv3y08J4yz7KHy1SCkrWcgwrZVv/4CHPg6MT IEh/+jWXxNgZEvOcjbKYdXlAa28Wc2D+PDDTw= 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=nOgI2VyzvYGZh3L+P9WZW4FcHrvYSqKGB2qbLzXG3oc=; b=EN9Sndm9l2i89LR8CSxcMUNc55m1yDA3LRcfXGkMeGHGCGmavdwCteBrJ2Tymf1U4y plCu021yO+YAw7C9s93CBQ8ADmSpHr4Co9YnUFtAs1YdLwFwZrmdExkAtkYacWL78p6M 8AdMkAg5flS2Kgei8eoS2UkTCqxQfNjzglSnHTDClBGfivJDWKN8naiwN5Xz9GJy2H85 2c6ygcF7l6/Cuin0VmSisKZGY7Omh+BalMnPl2CcwQsEoMnJKD2JDabKEAg/rtxyYbAR fCbjU683A0ZFW/Vnwtsqq/Z5t9cfWFdswIrZcy5/UHvan7zn7Nn5TEZsGgU5Tak+RDGC XeFA== X-Gm-Message-State: APjAAAV5YIbLsRKTn2B6IxkOMVaYs1BswfFl1hK6v/YzRNAeRnGKA9Dh CdhRfkH1CAOKPZeLRVKaX1KlK/LB X-Google-Smtp-Source: APXvYqwHcNNTp3AgYAwd+WlHsWzcwcTG2HvMqdDWhKXb7u1QUdn6EjNhOlmQ4kW35ZzOgSRA4G8b+A== X-Received: by 2002:a17:90a:8591:: with SMTP id m17mr36317465pjn.100.1563278316584; Tue, 16 Jul 2019 04:58:36 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:1c24:: with SMTP id c36ls3432007pgc.14.gmail; Tue, 16 Jul 2019 04:58:36 -0700 (PDT) X-Received: by 2002:a63:6d6:: with SMTP id 205mr33897143pgg.262.1563278316178; Tue, 16 Jul 2019 04:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278316; cv=none; d=google.com; s=arc-20160816; b=1ItIg2k85NRaelZdpAnU9mVL3gZve9tiJuF8MJEa9uiVam9y7IEqiuEtVg7h1xUuYR 9v9xgIRLzB8iW2J3xF9n9lUFydgfpjCgpQ65qy5zKEMhyKV+eGyMeX/x20PvDoJxLFsE aBfrsdmVCl3nQP9LUs2nqFadEa2XQ2lpP3mhdiQwr0farj/tXqRacTOy+Z3X9IUO3C3w OA5hPc9+wIEk1hfk9cVStjQGETN5uYuMKlEd87PvWXE1V7ryk0WZ9q4+dHOWm4i/jamH twsY9fAKkLZUpxj6rdYplfOb4+O92pcVup3gvb7kVDcXBXr6fSBjZG/v+HCy6vp8nCjj 9mKQ== 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=zH+syothlLNOq/YNX9qJOZLAz+UszqSo5fMmy7xQGuI=; b=S1I1FUJu6Pkn3Ahg7YSOnOqvw6DxS3fEw58QJ3Z+so3C4eRXe9Q6UpQFK71BbhNjFQ uFo6rtAAnCCRLM0o5p+n5QmMCWgbRAk9mPocmu/4liIhgGL1vWphXsBnrM0/GqZqPZVn /GTVWD3l150gbMQ/IQ9+lKvuLieuYg9EyJixtr3A96PK0kFX0PCerhSmvnnljS0WV2s7 5Ny8iTDpo8sko8XB1pl4m/qRfXu/hz4kQJdHON3ZYqtGDTt9D8BjFLKA8A1yyvYsYUfW +4KPXuD9utIyt4ZItQ8gFbvbsyGO8aefzRruP5R6ej1qkja046KxvprVNT7TGeW4/Jbo a0ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Q225OtBk; 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 73sor24452294plf.60.2019.07.16.04.58.36 for (Google Transport Security); Tue, 16 Jul 2019 04:58:36 -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:846:: with SMTP id 64mr34836019plk.265.1563278315917; Tue, 16 Jul 2019 04:58:35 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:35 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 11/57] ram: rk3399: Add bw enc macro Date: Tue, 16 Jul 2019 17:26:59 +0530 Message-Id: <20190716115745.12585-12-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=Q225OtBk; 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 Reviewed-by: Kever Yang --- 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 578db90241..4749233226 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -98,6 +98,7 @@ struct sdram_base_params { 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 a83709f271..2d3f0f6902 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1096,8 +1096,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_BK(info->cap_info.bk, channel); sys_reg |= SYS_REG_ENC_CS0_ROW(info->cap_info.cs0_row, channel); sys_reg |= SYS_REG_ENC_CS1_ROW(info->cap_info.cs1_row, channel); - sys_reg |= (2 >> info->cap_info.bw) << - SYS_REG_BW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_BW(info->cap_info.bw, channel); sys_reg |= SYS_REG_ENC_DBW(info->cap_info.dbw, channel); ddr_msch_regs = dram->chan[channel].msch; From patchwork Tue Jul 16 11:57: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: 761 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 4C8A73F08F for ; Tue, 16 Jul 2019 13:58:41 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id t18sf2521037pgu.20 for ; Tue, 16 Jul 2019 04:58:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278320; cv=pass; d=google.com; s=arc-20160816; b=YyxVWmw59aBoCYUFZmShGExV2+iMQMviY2JgPfcfkUr2Ia4WCqTnBSa8TQUPsvs/JI Dfsd3tJvyH2PUx2gvfEB84oLX9pkjAR39fuFW+QAduOfb79Zz/qrHaBqgkb72RLxZ5ux dxJPxiptEjRvWsYmU65I6WraeLkNTfLyL4a6cwjdm356BESt7Q0CFZqMa4UhBY7Zf02R BXPgWxjxyga4vTUWd6JVwExlYsH0MOYyiSw4eVEEfeMUYDjBc8ra5gX1ubbo+lcxcaZE ZloNUzxn1X5uSP6cq2MAgRrfkDIKLqTGSyuoA/LY5OnA5PSvn/++H3PxMusloh9Y9zM9 KZoA== 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=LMGsIe6fEhhW3itVRXKY55YRtaYPnf+0RbVrOOIMdqE=; b=kw7hfOs4+yX5x+Ci9Ei8ZMz8xZWMKHMnFAkMWs7HU2WDrzBmuupmsXsW3ogXNbt3P8 1QDGWDRkAxpEi/nVSBk1DJEOZ2nm+HPWsSzHPLJangfwVQtIeNhy93hMnE/du2gZYSh2 WZOT9xOpkqX9prYM+r+z1IYLEhDw4yzOPzKe3KblFxqZKhPp7j+YyLPzPaJs3YqKRs/r CbYxhR85mkTVwSYAAucubdbl96DgvqUgBhJ/BjjFgNTCrVELb13AU0zcgeyk99FPbh4c eVAvbZE9wahHAj3tUpMzQaUhA9rf2EWIfindxXHOtgN7Pto1N63ZEhffLtjBl4mZYe2g iuWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=L1qyMjdE; 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=LMGsIe6fEhhW3itVRXKY55YRtaYPnf+0RbVrOOIMdqE=; b=T50gHKBP6gc6r5gomX7Ha89sUoMLWCLv+HrLWsH3k5h0VrTLIgGonGrd/pD0zZz59E O9nSeg3wx/ualcdA10OsyFKxb18MCmESqUmiGMb0uD4fcbScLYTsAC4+X784Zb8DuNyo o/nh5epN7YiNrf0ugz3CUPSfpO/RSzO8Su6wc= 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=LMGsIe6fEhhW3itVRXKY55YRtaYPnf+0RbVrOOIMdqE=; b=aqhW7+pMJiWNuJ5jaNj1tj6ynkj7U1mfrJ304FXmEIjsUjM8Bz0fOLSRCtRi98jMqE uMrciv6Zxbzsth3PBe/lgp8Q/Kw0onlEjRoOjC+uDap/n6a8pEgDMAzf6suBQU/1SgK3 F4cT+nX3BJNebRd2+YbD3wjzkF9QUHDSAJbWTppdZWKLqx/nyM6usYP/KAzc0tYRlTZw XygKlER37WFvixKjwJRQwPCiKDZKYK6clgyxHiEERfyqdaLux8RZ94lpbb58f7Eys5Pz 4cFEIwdb79T6cgYJYfE8r2ESL25834e1trJAWf3x/Aphn1S7BUmK8oGIKHCV683tPkqf ikUQ== X-Gm-Message-State: APjAAAUxTcFk+IGvRCkMzrDADGPIaGbuRp8Rq8ADJFRvP2XpV2L6ntJT KVZnLXGubvZKDGirhhqJatKkj5/l X-Google-Smtp-Source: APXvYqzIqPEjw1erCi6/PPiJtHDm6t/xGIYH+GJPbaqqRwBs9m5JIb5NmQic5F7H6v+f4LxEr3yWZQ== X-Received: by 2002:a17:90a:a407:: with SMTP id y7mr35716915pjp.97.1563278320156; Tue, 16 Jul 2019 04:58:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5ec4:: with SMTP id s187ls3482624pfb.1.gmail; Tue, 16 Jul 2019 04:58:39 -0700 (PDT) X-Received: by 2002:a63:124a:: with SMTP id 10mr32814709pgs.254.1563278319726; Tue, 16 Jul 2019 04:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278319; cv=none; d=google.com; s=arc-20160816; b=Jj0Y/O8Bqc9puYFnchLLq30w5tKslG3QAsHcZqK9xuWuolTCa7SC9nqiHA3bSXA+go g6Zhi8nucRUdxnMI+oSCShs6634vlsbauf9hQTyvnxlCpNhkNUXJhZaI4Ga3In7HmQVM zEtn1hJbEofowYOoXyLszGJVv3kiIrk47Vv8kBmo3kMpqlNxsKPxqZlEC6eTjN/+BKq4 VrTWCyS3FHvw4pt7IFM5Zce933ftmVETwtLZ3N/FMFm9pejvMgLpCquO5vJKsIbmRxUB nCXsOzxVW8yR+Zs+X4RPcseSLeYu9ss+TiiYW7Z8dDjr3Z3ZMt3jnOzGeCoTGF62WwKE Jqlg== 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=kFNo/GXViEG9p7wSNdfRyO+MY25YONaeT6MWxgn+4Hs=; b=erU6agf71ymcAJGwFogxvW3lDdlT99TkthS4eMATrLzjwO3UIR5v9z8HS/q5uB2Sfw Lsp4pYtYk2Xyxfr27AVrST+jl5q7c6l3Ahv5wApA7gjDsjoaHS0HhsOrYuNqaltqELfF MENc64QR64/BH9auVi36k6qw3w2sMEgr8HjNvGd27O6MI/UYhES5u1cD4YaWFd6C2PNv ld+Wzjlo2eqOQsRPcB7cYH1nVXrFKEU2SEIAzy8phbYrGdKHjf6hajTu4eJHyrTHREU7 +beKTGWALmciqm0QarQkt8OIS+D+5IL3HEehvX3xtCUaZOiUp5K8+bNYLlmePmFpghDl DzGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=L1qyMjdE; 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 k4sor10547489pgq.8.2019.07.16.04.58.39 for (Google Transport Security); Tue, 16 Jul 2019 04:58: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:a65:500a:: with SMTP id f10mr2093572pgo.105.1563278319397; Tue, 16 Jul 2019 04:58:39 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:38 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 12/57] ram: rk3399: Rename sys_reg with sys_reg2 Date: Tue, 16 Jul 2019 17:27:00 +0530 Message-Id: <20190716115745.12585-13-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=L1qyMjdE; 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 Reviewed-by: Kever Yang --- 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 2d3f0f6902..2ef969c07b 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1073,11 +1073,11 @@ static void set_ddrconfig(const struct chan_info *chan, static void dram_all_config(struct dram_info *dram, const struct rk3399_sdram_params *params) { - u32 sys_reg = 0; + u32 sys_reg2 = 0; unsigned int channel, idx; - sys_reg |= SYS_REG_ENC_DDRTYPE(params->base.dramtype); - sys_reg |= SYS_REG_ENC_NUM_CH(params->base.num_channels); + sys_reg2 |= SYS_REG_ENC_DDRTYPE(params->base.dramtype); + sys_reg2 |= SYS_REG_ENC_NUM_CH(params->base.num_channels); for (channel = 0, idx = 0; (idx < params->base.num_channels) && (channel < 2); @@ -1089,15 +1089,15 @@ static void dram_all_config(struct dram_info *dram, if (params->ch[channel].cap_info.col == 0) continue; idx++; - sys_reg |= SYS_REG_ENC_ROW_3_4(info->cap_info.row_3_4, channel); - sys_reg |= SYS_REG_ENC_CHINFO(channel); - sys_reg |= SYS_REG_ENC_RANK(info->cap_info.rank, channel); - sys_reg |= SYS_REG_ENC_COL(info->cap_info.col, channel); - sys_reg |= SYS_REG_ENC_BK(info->cap_info.bk, channel); - sys_reg |= SYS_REG_ENC_CS0_ROW(info->cap_info.cs0_row, channel); - sys_reg |= SYS_REG_ENC_CS1_ROW(info->cap_info.cs1_row, channel); - sys_reg |= SYS_REG_ENC_BW(info->cap_info.bw, channel); - sys_reg |= SYS_REG_ENC_DBW(info->cap_info.dbw, 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->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_CS0_ROW(info->cap_info.cs0_row, channel); + sys_reg2 |= SYS_REG_ENC_CS1_ROW(info->cap_info.cs1_row, channel); + sys_reg2 |= SYS_REG_ENC_BW(info->cap_info.bw, channel); + sys_reg2 |= SYS_REG_ENC_DBW(info->cap_info.dbw, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = ¶ms->ch[channel].noc_timings; @@ -1118,7 +1118,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, params->base.stride << 10); From patchwork Tue Jul 16 11:57: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: 762 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 D1EB93F08F for ; Tue, 16 Jul 2019 13:58:44 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id f25sf12207139pfk.14 for ; Tue, 16 Jul 2019 04:58:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278323; cv=pass; d=google.com; s=arc-20160816; b=VXX8VjrE9E97FD1Mp2oc08QKZk3vfTHOuA10Y27Deio9iE2dRw439oct+pAfQUVN+b tTf7fji5Pvo1X2tUB5ltmfAEdAi7TocOL9NDNj6cgxKGppa0k1Nqc4Tt5w8ouegeWKQJ Kx5bT5KCB+JrkcYTP1OT+PeHyo+4Y7x1XZNrC2bt/ydfCLMexsAvyqGceGu2eYdOoGWs kS875QICulXvA2VIOiNBLaD2yNyFIdfj8ZaDR7uFOBfXGUID8uJDmvZypjM1cIO6jx6Z jXTEPuXRMKraKLzZB5mpFa+o1CMiXK4pfFGr3bduvAvrmpDG46vzgGtIthfxjBie8GQG E/YQ== 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=PwUydgjD2AGDvUh+dZ71IHh4NDjR3TcERSbLDYNBbZk=; b=YIw/1mD3LW6QCpLHwBCHKB4FPdvn/2p8UF6cT+EJUTGpqlWu++rw/Bjo8fg7KONeyG iW9ALILjJOewWcxp5bXPZe4IeCNHd4ZAmpA4mMf5oYc+eywcOu4RlQOyn9ZgJpUQEdSF r1/xnbTUbafVnv2Tq6GAZHrzrwDBGdGJhCSSw/Jg6E7E3QGwh3MqdcIU7ZKbmIwL5UhK IoalIMtD8l7vOjMzJK13xu+spQVIct22G/rzv6MuG8oXZUf4eFrxb1IGEAuIe9tDxWZJ lb6qpdQh+bRDoigCKn8sm3pjYseQkF/Tv5rC2rFQSRvLIDl7aw2wI2e2ZLE8ESL8XYks HWYQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MEbkTo6D; 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=PwUydgjD2AGDvUh+dZ71IHh4NDjR3TcERSbLDYNBbZk=; b=HN1+AmLo70NEc9PfDp30IDe10fN2ARxERdleEQEzrDzWFyyqdaiNQjrnGiPVK+jTui e9Cu0Nbvfc4KScVFBCanBo4T6c0edOa9sb7bOglZa5S2CkLtG5VScXLHJs29tBBZMeCx 88k0yeznC1wtoSR/ZeDivve8aMJ1ijqcCdr+o= 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=PwUydgjD2AGDvUh+dZ71IHh4NDjR3TcERSbLDYNBbZk=; b=FdoSXTkQvpUBrspX1kxwYBQmiT5PqYY/kK761XKpoEKD7PsDgEhFHgR6lXUXT9kgtp AZ3y3bGIfsjPxJYzCMhf1idxpJ4WhwU6s0YtG/419Zs5FJyvsxWzXVJPo4f1vrMbgwKA qh4IfwpAAGPq5owyE/upOlM/eMje7Ihb91fYGFebl8AYnUAu5vdnrQDQ9FFNT+XwMzWG i6tr25jdZLI4gX5qWcQ36KtNKW48F/k0UXvZzMRKP6M0MZ47+mdQg+hbRPp79gRvR0Fs FLR6ya89lulAd+OsKQfuO+pm/0aKC7E4Vo7NCTdgVZw2UeVBvaH8cWAOAG7u+JuZQd91 9A0Q== X-Gm-Message-State: APjAAAXt0trmiO5TGZOLwXfVz2xSTWlN4OR6OxxYiMiunvAI7qA4aUeb xIN5H8YdlGNNmN5EMITZZ1bIQGVG X-Google-Smtp-Source: APXvYqzriMUfZvu/UMkTmtXWhkzDV33mru8SAO1gUJ8vAVrUZ1sL2F9cWUdnbjDkXUzsZOeF3qT95A== X-Received: by 2002:a65:6294:: with SMTP id f20mr33972290pgv.349.1563278323573; Tue, 16 Jul 2019 04:58:43 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9684:: with SMTP id n4ls5474005plp.2.gmail; Tue, 16 Jul 2019 04:58:43 -0700 (PDT) X-Received: by 2002:a17:90a:77c5:: with SMTP id e5mr33671188pjs.109.1563278323260; Tue, 16 Jul 2019 04:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278323; cv=none; d=google.com; s=arc-20160816; b=x3diHXsw2tTE1jcwhxRM6lYfZvUzEpNMQRxXnjNoJqUZx0tQJwQZOIdnnuHm+ynw7E 8SnPZQ1o6APIueYXD7GyvcRfxYecCxTV78QQ9Soo9W/qwkyN3QXn/ct9Gvk4IOf9LvgL DmP6pdT7kWU4o1Or61uc+FXz3PdS9S8zLPo8h7SE+Bj/uQz/mfpZsqdui0zY9a2oiqYm c18vH5CyYv00bUnXaQee5jYK4ntDyssp3S/bKwz8hu42hIq4Vf45RDkJtBSX7o3cibKi 7lXCaJbbyZFyEeK+Fqot7UPuQdniGyjAQ6qzslGBe10/MkfZK9vftRoYDcjIVNXu5qE9 avSA== 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=43sD5Z96vh27+wf/WQOiweRgDb1Lo5puQaDPhdLvep4=; b=mrSWPrreTCL2nmJmhP1PvtOw+IiHfvNZh75MGWCIlMiJZOC6X35q9qNcRPrD4StpAu iZta8hJhVsDOq3Lhf7o2jcG1RXmNIvmBEVmxxmObSwI31RAV5HfGw097VZXkSVyYA6qx r4ZpidT9an+R6v5m923ejQz9aBpBoTJPN9B6jNUoLx32lLWO1OAHJ2/HvgdE5ulYmpIy UbsJ//6Ah2gRhQas+jn8pBjAGzQciNp/5UmSQ/p+Mk0rEu/t6e9EIkYR8p7tOaUITJTW /qAHOw4igoVL08xHMBRffm8j0qfg6JI/Tw7S3cbm8ka6X8ihiYOVso0miCwefTJAfdf8 Ap/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MEbkTo6D; 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 h3sor24648658pld.23.2019.07.16.04.58.43 for (Google Transport Security); Tue, 16 Jul 2019 04:58: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:86:: with SMTP id a6mr35230478pla.244.1563278322972; Tue, 16 Jul 2019 04:58:42 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:42 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 13/57] ram: rk3399: Update cs0_row to use sys_reg3 Date: Tue, 16 Jul 2019 17:27:01 +0530 Message-Id: <20190716115745.12585-14-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=MEbkTo6D; 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 Reviewed-by: Kever Yang --- 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 4749233226..f74377225c 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -90,8 +90,6 @@ struct sdram_base_params { 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) << \ @@ -103,6 +101,12 @@ struct sdram_base_params { #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 2ef969c07b..70867cbd5f 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1074,6 +1074,7 @@ static void dram_all_config(struct dram_info *dram, const struct rk3399_sdram_params *params) { u32 sys_reg2 = 0; + u32 sys_reg3 = 0; unsigned int channel, idx; sys_reg2 |= SYS_REG_ENC_DDRTYPE(params->base.dramtype); @@ -1094,10 +1095,10 @@ static void dram_all_config(struct dram_info *dram, 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_CS0_ROW(info->cap_info.cs0_row, channel); sys_reg2 |= SYS_REG_ENC_CS1_ROW(info->cap_info.cs1_row, 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); ddr_msch_regs = dram->chan[channel].msch; noc_timing = ¶ms->ch[channel].noc_timings; @@ -1119,6 +1120,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, params->base.stride << 10); From patchwork Tue Jul 16 11:57: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: 763 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 3EB053F08F for ; Tue, 16 Jul 2019 13:58:48 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id u10sf10055391plq.21 for ; Tue, 16 Jul 2019 04:58:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278327; cv=pass; d=google.com; s=arc-20160816; b=Zn3n1ulAddRyNSZ4+rIxnJeCns+k9JiDvuQORI0N15n9HPISLbdwFaClGwngQ4uw90 ikA9t6zkwMpfJjee44B+byGfsvkaYG891crTSouM6Vjl6gThrqz/Fv0r7E8C964ZyKVy Bovx5Cf7XZJJ2Y6vpDfMLXydQ6PHgD5jvlNiYDhSHKK9BV2DoPqQAo9Zqav4knpqzCLq jD/o52N3jhCe4/RhskMXM19ljs4kjvD5LUMGpiB65m2DIFnT6P1Az9JP+ekrF+uyxODe ThboPX26OnVHVWlhZhz0zuPBjRfGvVH0UafLC1YFBrMv1uEuIkjf6kgJP/+bDh4xh7SX oXMw== 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=Ot4ICm56lvx6YSD925zQE+w9BYiyNnQKA0VrFHDJHzQ=; b=JsVtKjGTuKqTvFz/m0MgYSiSG4C61qlRmA1UR4xb2w/UYAEKN2POgwwBg3hmKXXj+U SsFoj9hv2Lvrj/ZpoAzjQI8u4iVE4fqs20w41SdL1PzaeIMp/5Yt08DPM1sQlIpm7QUA 4fRr499MUgqCD/97geWyFzSGgpb6YIfY68iw0yt5N8KeSPk14pOT/ZaH5twgLeaL+qpT nbLQwSiaG5IY4j11Lt73BuuYVzsgrqMuFN/4ujLDEBmhPVDloQ8vFx+qCnvSYJ5HUAye EQFvx/jb/DCSTdaR34yW6mJ3kQ7YjQFWOIBCaQ3DtfgKEyxcaFsQUs3MTVft49lCQAI9 +/bQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kZ+O8VoQ; 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=Ot4ICm56lvx6YSD925zQE+w9BYiyNnQKA0VrFHDJHzQ=; b=YvSOhO5uMz6+ZSRUI7vziqLzqKiKS2tTfmgWYL6q3IHre4z5fuD07HKhel+xswAlCm L9c3lDbrzuzOHb9FSydCqu3cSHvs74T1R6oeF1pC26fs0aSNRo6YakTHOlr1jRyDVe9j FCczKSmBzIXXosO5+jUEohz8PMZspBkBWBXIY= 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=Ot4ICm56lvx6YSD925zQE+w9BYiyNnQKA0VrFHDJHzQ=; b=doKuZU6OZQpDNPG9a6kZtR8CdTn7YpcCrMHZGTnCoAhtJbYdNHDkbGxQM9G7vw32Yv 1GExKzb5wyPQdAL9E9Y1p9dZOAK+r8wkUiZyL1YUBhrHGRldFvA1FJ9Vv/zmxFIWPjkV iMJhgZ8T1KeDm7jBo4CDi7WejkquEmMkWxSQbNYD47LklRaCrDBplURq7dVa5IOwEb6x X2VCwzXNqDaCYUsjswEdzXaWvcxqCMjLCL1wWql9d7K6QKHjofO1E4IVriZocZ1GWIpf 1kBJ3sq3PIj1uQqbIKejsjbcxWHqjnt0ZZdXOxu1BbpH78YIkNe12BItjUDjdHBoszF/ ARBA== X-Gm-Message-State: APjAAAWPe63GSICfIPddAmmwyjNPfkgVvq0J1VHpAeufDC05VZjurD0a 9R2VTERmoOGA+eGLZWtpcLSYSdf+ X-Google-Smtp-Source: APXvYqwtpQ2KA3VJDRQFyPaw235o0vgS2vGetSOZppVQ8D99t7g2elTEt48uU6ZXXFPVRMVSI/COxA== X-Received: by 2002:a17:902:f087:: with SMTP id go7mr34693676plb.330.1563278327038; Tue, 16 Jul 2019 04:58:47 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:26ae:: with SMTP id m43ls7077038pje.2.canary-gmail; Tue, 16 Jul 2019 04:58:46 -0700 (PDT) X-Received: by 2002:a17:90a:8a0b:: with SMTP id w11mr35483182pjn.125.1563278326745; Tue, 16 Jul 2019 04:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278326; cv=none; d=google.com; s=arc-20160816; b=z/JG9oyo5z+26emQYjagMOU26s16ku7u/sT/rQhTV+I3cGuahzwJm4YC1m3WIHQlTk Gdj41FDQtGXEbwycVCE2ju0/62MzuGBEn2AfYJ3hi/QMnxiyT/lQ2FLy13MBFLqWG9EL b8/gV8Qmb6uzBFIE4Viban6Ur5I6XkU2dnyxbQa4D6brBKvyeJfzPM3qRPiZvWEEfWaU hYY3Z3WqDA20IhxL6+Rx/r/RZbHql68BoneH74LzL9CVFS6YgMAtq/SkwF8cfYIRXa0F NCYw8CTouEIG+IpSYxHqcJbm5Uuj6jvAscfikCsPMMHlG4SYtMM/fvKE6m0HK9oGvG+M 5lDg== 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=MG4eQXtYLyg/bIVFfwfDOqnsbO9ZxzwLez61zLxFaqQ=; b=O6RkGcaGqcDvVyQ1tPPH9rwWHVfqhyTGw2OfJuqkEIcEilERB81QxDOGPJedcAtMTE VDfglWrqgP4J8BB/Z6wh6Alee+U+B++mj0WGGVKM40S6J3HMVJssIAmgsRdjZUdeAjBX 5d2YpWXDOb3i41881RTi8orpsvdZD/RhLjU/Fc8a/O3TcPrpmd4iRP469rMebNsen35Z TuFis6rTYx5CpMBvHfkgFfv/QyvH05aJM67vT/uVJRShGvG75ahDHe57t7V+rsJmNaS4 XzmqrUFRjQAaQbJwydS1h+I63+LmXTEDKB3StlSQ4P/rmO2rgMgrLV6fVBlAznVe7I7n 8IVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kZ+O8VoQ; 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 p1sor25509965pjr.9.2019.07.16.04.58.46 for (Google Transport Security); Tue, 16 Jul 2019 04:58: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:90a:30e4:: with SMTP id h91mr34302115pjb.37.1563278326416; Tue, 16 Jul 2019 04:58:46 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:46 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 14/57] ram: rk3399: Update cs1_row to use sys_reg3 Date: Tue, 16 Jul 2019 17:27:02 +0530 Message-Id: <20190716115745.12585-15-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=kZ+O8VoQ; 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 Reviewed-by: Kever Yang --- 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 f74377225c..9cd9f3b969 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -92,8 +92,6 @@ struct sdram_base_params { #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)) @@ -107,6 +105,14 @@ struct sdram_base_params { (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 70867cbd5f..1222da39c2 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1095,10 +1095,12 @@ static void dram_all_config(struct dram_info *dram, 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_CS1_ROW(info->cap_info.cs1_row, 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); ddr_msch_regs = dram->chan[channel].msch; noc_timing = ¶ms->ch[channel].noc_timings; From patchwork Tue Jul 16 11:57: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: 764 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 A1F8B3F08F for ; Tue, 16 Jul 2019 13:58:51 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id e95sf10060658plb.9 for ; Tue, 16 Jul 2019 04:58:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278330; cv=pass; d=google.com; s=arc-20160816; b=hKYt+iCYLYq4E5txcsuazhy/2C6aX/NpZSjk7x819EiFoSHXPT6WmDqLZXLq3DlvR7 0L3ai6swybt97eUXY567A3LPV1m1NmDrKOjD1PkNt6yvc38SYTbBuAgPwotpVokl1b+b ma0NFEdF/MCR5NgZoc1wD+vG8h24KaHO26OAgQxf6VWH0+jl71EdO73REACE4NnlxjPw dfekz7XTWYre4YnFDeFoE9sFaPcztARLosI41RG8pGmb9wwsMjoVbLNC8Ms6+BPnBUFB ymYuTi2+deg2VsVhc3S3RPwOg/Had3pi9J/HoZoPWB6HfOXKiXwxP/fExLN9J4xb8ou3 te0g== 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=W+vRQdUFVKGlgC9yqkMeiwVC/tTAw+69c8lPlrR//kU=; b=LjjE8DwWyNVwegKI4MPor7SyzQObntAPRYfLPVoLYCC+rBl13ej9nUKUkTAFxHzMPd 3RsiNfTtM/Ncb4FwhRlx1bxpUh6feXDWpC3KoncV3AStxJT2XJSAV1WgHdYbQf01OCCS LNx4H4wPntDKlGf0I5zKYJ8qC6UkYYovPNBfFz2RMTguIiyP80RvwQIDBstZ/nTsv80H zIivl8A48feOl/3/EXKIHfY7iVn2GTEjMP/TdV1XwxSaD9G7D1AN9ut00Bb5Neeudit7 eV2LJixM+wWHPGnrS/qZCIWMvxUjB85WhKShrAf48ykp+QRNoKJ45rnl0BTOr6KKrlJt jLsQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Hr02iutH; 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=W+vRQdUFVKGlgC9yqkMeiwVC/tTAw+69c8lPlrR//kU=; b=gAPllDl/weG8/E96fXQifxxJ1C7hr1LhMKd8mHzHQILDEUI0mj954EB2XVp3JuxbyK a4UjByTkPXXsE41wBo21B7exHr1yHfWtM2BSNe35nNNHTa7WTCWCOqPNp7pHo5jMEPB0 lh/WUCqJfNslKzeqcETwMWKNx2JsNllPAtCaw= 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=W+vRQdUFVKGlgC9yqkMeiwVC/tTAw+69c8lPlrR//kU=; b=Jmt309f0zEvYsPgC9U8kcwxAV+m1j8LcROHM/rxmOLXpzrOBqrUdxo96xJTDbu5xxO hy+grhoNOcC8mvQcDNEF2Y3FK4lv0UPxI+yI5XN8+bRSqznSbROieORIbG2xaNoDhb3M +LofihkAgkCgLohKkmCl/w17gY7rYcHXJp14eUXMMo4n/64/LFt0HV6WgBdXFPe/cSPe 7jkVmnR0TKjhTSAYuCxiUXwF98wBVidpbz2d444syECM+5Np8t6igPKC8NeRuWDDQW6o YQ7naynFGmfuKGLJKjDoB+BtKEK0oMav4DEOdwOTOaLAR/eOMbGH6G6mlvMnw+W+6ulk y4QQ== X-Gm-Message-State: APjAAAXq8PpzsTkIsK/F2rkG2AZUGq1xfmmmEwylimUWMRepjgGYH37+ zeB+hDEvOsALJ0dFxeTXkoEq4LBw X-Google-Smtp-Source: APXvYqylOa8Du4pZwKS7RjIrr6rMwcO3nHgzPu6cMvvVOltqh/7Dz1kcGIBenz8jiTr0AMDKSuq74w== X-Received: by 2002:a65:6709:: with SMTP id u9mr5028644pgf.58.1563278330442; Tue, 16 Jul 2019 04:58:50 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:680d:: with SMTP id h13ls3343842plk.13.gmail; Tue, 16 Jul 2019 04:58:50 -0700 (PDT) X-Received: by 2002:a17:902:8203:: with SMTP id x3mr35092692pln.304.1563278330102; Tue, 16 Jul 2019 04:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278330; cv=none; d=google.com; s=arc-20160816; b=rxMVkYe+75MD2mWefSdp2OC+jYxMkECHNuZlxwgLMlMk6WbszxXXiWN8gh8sgupz2w YajjPtcuxE7lGambuIdAcaNj+bk9HlLjxnN8FzakzhiouvMil9MfAl6f8jQXnMXaCrdX tkRCIOwpw5ziCJYx1D2xR8vSIo/YvZCD+lX9Hic9jGBcgjpCtQ4B0sb42LV/syoikg1C rR0u8RBZZgzJ99YaMl0g9WC4KeVOuonFnYs0xzNokqITSlkVkx4ipn30GhnVDLBXTaD2 /hRpY5e/It9ncOZvUDsP+GrSr5tum5CxUTFSUrzN1k33cuJWyahttbFJ5H7I61fCYnW9 Sc/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=JD+bh41d7NawJXyb/7y4jJU2UarR0jnLwzqs/x1xT2o=; b=FLYlovv3Kiwl0Y+l1/qeenb1ShzKWUF0LBCRm4f9W4x3spxrC5ScdtF1ku5Ioyn/9i zhuYfqklSGdAAT9sXC+OI0Zy4lehKF0Li01y4UW1bnP5WZdMX1jvsC5pcG96RwsrwMoM ej696zpwRyeEQaWIdTRanvN0xMEmGsZDc95fXNARfES1omvsTlIxXRRNKJ6+d7OgC/NZ vdutL0Nh/6zO1oMAMCRWxfuhniy3j9YSnWCNqdw5r79/blXSMTzDyhPJbWyflT6m+BDa IrWMqf9FsFFRDXxWCwbPYs6tqsyM6URTvxykYo95VwYPsWLaO3OXc1s+Jua+Yf6DtkMR +6pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Hr02iutH; 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 c4sor24648093plo.34.2019.07.16.04.58.50 for (Google Transport Security); Tue, 16 Jul 2019 04:58: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:29c3:: with SMTP id h61mr34394554plb.37.1563278329823; Tue, 16 Jul 2019 04:58:49 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:49 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 15/57] ram: rk3399: Add cs1_col enc macro Date: Tue, 16 Jul 2019 17:27:03 +0530 Message-Id: <20190716115745.12585-16-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=Hr02iutH; 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 Reviewed-by: Kever Yang --- 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 9cd9f3b969..f5c99fea8b 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -113,6 +113,9 @@ struct sdram_base_params { (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 1222da39c2..0f28163d6e 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1101,6 +1101,7 @@ static void dram_all_config(struct dram_info *dram, 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->cap_info.col, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = ¶ms->ch[channel].noc_timings; From patchwork Tue Jul 16 11:57: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: 765 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 376193F08F for ; Tue, 16 Jul 2019 13:58:55 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id i33sf10059921pld.15 for ; Tue, 16 Jul 2019 04:58:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278334; cv=pass; d=google.com; s=arc-20160816; b=QrXgUtIYSlQ6gjPHWPlFJRzKl3iVDTdeBXdIp21Yb9ytmqlvvq5ABBoZDJYsm3mC6m anqM0Vx20yd38gkhxpSOjxZXtHAeSSOShxeTTwADuyoVmT4YyPJyDQPsbijCfSp4uCG8 /6E/hc+knhF+eXFDu2pCpRiczwYrYSqM59RmPlkH9kpmgTtwA5YQPnaxVR/i3ErZEPsF xws6tWh1mnD/b6MwXom8B10z7ss0yxVTjbzgJaYMopQzzBp/QNSB1p3BmR6JizjLsNIW kTYZmGTnEMcc9P7I5df1ZsWBuZCPB/CvJx4S8lRL9shZZTqLYCBGEiPmRq5MLTuSGsfr MzIw== 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=shzlnvB1tKsUDm4TWvvahaie8SzBefWqp/KYlBiBN88=; b=D+q66u5K/37nFiO9/gCaJjAHy0KxwesJa7+A4bLQ9T8jzsv7mis9iwQ/nz0Ehx05TH 5VbUYGXZ7f2JWd1DSmwOZ5BVV3coYYEa5IWCoUc5fDSyMV95Q97aKXG9ypNLP25vKCpN VhWaiVpCsZ/Sp7ADIuhGJSB1Qj/2wZpfModZPbWXa9Z9t+Se6Ct9ZYiNc+nyRgLhmxm9 xQ/VhC01v+M0iCIGyUpXHrC73zPlrm/gIj8zHlTkZLXLZjupbT6kqdqlguo0amS+KHsb wT/q22hAK+ZIwdAcvlGLF5Z2eypHbMCHIAY9+v+t+XRO7V/rLnS9jtofIFbl28lTiGfi 8oHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="BB5+fUg/"; 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=shzlnvB1tKsUDm4TWvvahaie8SzBefWqp/KYlBiBN88=; b=iVa9ZocsDBUaHB+syqpgAMzs9Doqj1vIbgvNvjIvLLHJqGsqJWvMyO8jfroa3L7YSZ EDwY9LqpDE4YpLS/kDwybGwToJzs0yvVZnyXhHjoBRkEgMzCZfGgljKilIhwYISKar4u I/AlsVOUMkGw1KUH8GKbp93OSQzJfXeXO2NLA= 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=shzlnvB1tKsUDm4TWvvahaie8SzBefWqp/KYlBiBN88=; b=BbW+ZjQzMnbxhbc5cdBuBt8aIWNeezRcZE607jnF0Cz/bX0QZm4kDkz9GNyHnj0By0 89nII/u94gHGCm1T9Wvki0nM1n9y+MrB4U++etUxKt+pU8UShFCju592uk+SLktwWAx0 Y6EWPyIZDUZr4NjpLbFji0XjO0HjPhj/DThI9GMfBRGCOi58FHDQZMZPFub0V/otMlBg gDtNBygen6ITfGlMyVOUdH9rQjGeIGgwA8hiiYu3DjxTUv1Y2uLFraXWuTrHDJnYUC+5 BL9gofu1yn0BE9FQREvBiI8Gr3C8319/HEtH3PEy0BpYNGHNj3sZOBaeLotHznKlTzsj wXXA== X-Gm-Message-State: APjAAAXdNzqd8EUQIess0c0oh8TcHvlAXshQg7G2lRZTxJArqISDMtnS fhErpcKMhaAmhSwFnvwYtYVx8kBZ X-Google-Smtp-Source: APXvYqzn8KkE+MRQ7grKjfBuGVDyhIX/K7iBtnmF2+nAUQSEN+aQc0cljdl0FXUaGiW2oRGrRTzK6w== X-Received: by 2002:a17:902:5a2:: with SMTP id f31mr34354652plf.72.1563278334012; Tue, 16 Jul 2019 04:58:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3227:: with SMTP id k36ls7085753pjb.0.gmail; Tue, 16 Jul 2019 04:58:53 -0700 (PDT) X-Received: by 2002:a17:902:a9ca:: with SMTP id b10mr33839744plr.69.1563278333714; Tue, 16 Jul 2019 04:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278333; cv=none; d=google.com; s=arc-20160816; b=C3klN3mbQsf4N4bQvtTAORL/rZdUQTjfuRNCX9RZ/6J9GnoAWn8yUPtYELoXl7EnLv i+uUM29QbT/OFNQaPF1P7zi1m3Nqrf1Uc7nWxIDvJDGSJXFIY/O/wjdIn6thhYlpeULr MfZtLr5afUgGIbN0JttTke6hGAEm7gPYmDfq9wzjznzn0kyBlhySJ9L9kuNIElATYNwc JEcfI5pg8QN9fEH88qzsuB5xVAlqTJ/ue1ODYJGM4CJAQOU4QbmHS5g4+Ma8f1gRm1Q2 olQSrnT950PWlQ4lz9HzvmKIlW3C54OK9meGmbm+ZgfvE7nsB6NsusXFgcf+NqIXbrPr uxeg== 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=I1cEsNh4mNq3M6cYDF3QUJY54q+jdm52RlOVjMiFP8k=; b=ZVFIJfeOYPGL5z6mOJr2srPi2UE5mB4vxrc9Tdq/CXEMFtZdHpt595QCahY0h9Dgiy Qo/IxLZ3hi82C/Pwe+Yfuq2bDrTyE94giIsePNRbjOb5bsjmv6Nf9jBuW/f/jotSISQP /UbecwvpSaiV07aTo4/mleJP7cNvd9cHpGqoklbCdNyGoeXM2oe6PdAfdkmLbW9jM1LN mZbnbH51MRY0Xt/rtXLoIb8yYXPlOYW1PkVJk2XdjWMOcUong2dkrFOzBQU5fAoR25Yk 6fqBpU7gCUlcudI5Va9Tiv6rLg87Sik8NJhSSrODjl4cHUGrZsLlVejsIylwj2qgdOPy 4Ovg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="BB5+fUg/"; 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 o21sor24660583pll.8.2019.07.16.04.58.53 for (Google Transport Security); Tue, 16 Jul 2019 04:58:53 -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:b109:: with SMTP id q9mr24807859plr.176.1563278333388; Tue, 16 Jul 2019 04:58:53 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:52 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 16/57] ram: rk3399: Add ddr version enc macro Date: Tue, 16 Jul 2019 17:27:04 +0530 Message-Id: <20190716115745.12585-17-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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="BB5+fUg/"; 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 Reviewed-by: Kever Yang --- arch/arm/include/asm/arch-rockchip/sdram_common.h | 2 ++ drivers/ram/rockchip/sdram_rk3399.c | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index f5c99fea8b..8027b53636 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -66,6 +66,7 @@ struct sdram_base_params { * [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 @@ -99,6 +100,7 @@ struct sdram_base_params { #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 0f28163d6e..7f6f7d8a9a 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1102,6 +1102,7 @@ static void dram_all_config(struct dram_info *dram, SYS_REG_ENC_CS1_ROW(info->cap_info.cs1_row, sys_reg2, sys_reg3, 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; noc_timing = ¶ms->ch[channel].noc_timings; From patchwork Tue Jul 16 11:57: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: 766 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 B4BCA3F08F for ; Tue, 16 Jul 2019 13:58:58 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id d6sf10042342pls.17 for ; Tue, 16 Jul 2019 04:58:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278337; cv=pass; d=google.com; s=arc-20160816; b=bIUXwNNMtt/P/SCWw3lieoT/pwpUY83h9LOYp1Wj4ln43lx30CRZaZCPGRZQv8yzU8 KkjyeFR1F4UbuUkk5nWWdrNPkTwGHNdZIY9cuABupjtCWEZ5gHQvaLs/XR1ZSkvsoAP4 RAortJxZPuo1VOLSDyoMQZxYt++vuqlbldzXFXf80sySlLV8lhC2KFFR6bsWz8VVi/az TO59UbU2BjMg1hiwEPxV+eYxJ0RpGqJ8JmPaGJxyWDYYOvmozlvI0D3X5SmG6xqdI2Vy t8tV06ATYCoiq6EogIDU/BipU48XWuJI+5VOFjIfk1AwpaJlXXdwwxihf1xLq3rQGznG Ytfw== 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=viPdYhV5R/jz8qsnM2jjWbJ6mi/VtyqtONloAA8w6uQ=; b=I9aOxV4XQHcvnOeYbiwWLzDC1/xDu93GAghYYKJTHDljkQgh2T/qVMQSbJt6p1rooc 5ARiFYJhzefaLY2wO8tUgouoUGzKalPLyb062r4mNX1hLHgpPJ84CBRY0mK1pgC50IhT lOk0PAYWfHq+ErEyja8He5158c3WwrtddMycHW1aE7qsnUTx08sn3ZmovrJw2zHQAnm9 pOaQkrw9W2env8JblkBBlQF4wxOzwoDtvkCYhJvWg3LciQwTI9WCv9cvgJ2Ybz/kUk8R ske62LYJ4FkHE/6+VCtlCquYGMc/if1x2+tEUHiYrhE+jyE/bQmDkmnAhnDV0yUlNi8T jwdw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="EO/gVMfP"; 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=viPdYhV5R/jz8qsnM2jjWbJ6mi/VtyqtONloAA8w6uQ=; b=Wsupshq1NBpuSAYuoSZ5eilNtd5llxvKJqRm5pBRBfA8ndIceGuHQl2/dvAqz2Byr5 8Z8V2/9qgiDpW+Ao8zwOD1eCYR11Utf2+Hx9zL5VSqaHaxsTMU9aI/VKJ5CHo4ZDS2vV qhbJrG6oDaAGxawPRU70plQlU0zNmAThXmVBM= 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=viPdYhV5R/jz8qsnM2jjWbJ6mi/VtyqtONloAA8w6uQ=; b=SCFG/geNTgyS2prCZKVLamKDi8qm+HeYun4/zTeRRrqp1rq/gZomoPrk09U6Xcsp7h xF/kjg0QZEwpU9U5ScAeHxuC2wPxzRJyhRbCNAUUDTztKPczafrsGQTITBJQvZcUafBi pNx+BmgVfCeHB/gcIVGqE21pBNWYDtKQ5IsLNfC0fEuT+22h0W549uURZGvdfRXxxXp9 p6XiPj5sHA6Qyw2FXd3b5nxQO7IlMaD28CKNlDV0SWt3KTbg22fa5dSDpi3FZucrsn9v S1UUVTm5CGc2tb9sSVEV3eUexsurRqA5LqaSfRGEejmYp4x/qcwLqfjaXrwq6BVJsT81 ZsGA== X-Gm-Message-State: APjAAAWCmyExHrnfDQ2FasYzNLqu1ia/djoTNkLrO/sjwRo6ibXCU5I+ dQ/eMrNky03zXMJpItIFc+bngZi/ X-Google-Smtp-Source: APXvYqzsT2Y5eOJjzSf7Pp/9Wq/GB4jSShJY2/fx9vzuyPfL09oOm1k/2GqyTULsqrewyxih+/DW/w== X-Received: by 2002:a17:902:8205:: with SMTP id x5mr35312062pln.279.1563278337585; Tue, 16 Jul 2019 04:58:57 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:680d:: with SMTP id h13ls3343911plk.13.gmail; Tue, 16 Jul 2019 04:58:57 -0700 (PDT) X-Received: by 2002:a17:90a:d58c:: with SMTP id v12mr35052676pju.7.1563278337322; Tue, 16 Jul 2019 04:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278337; cv=none; d=google.com; s=arc-20160816; b=duUDqYv79OYwg2yFoKPdiQkipxbkzXGQWzgi0Kopa0pSg3U1a44fpJ7r1Mc6SKIXKT fOq6W4ZBBYC0FgaP0jQUtSdYB4ZyNEavp5aIDJn0DjamMU37dFkBj4YYfSWjpm+MWBmA 32CO5AlwWpOFdsUsO2x6DPANRnzlR6om/DgtnnXrIKTGDzJB+bEcNpCFabmytjeWph6i 3iua5PMoKNiVEqrFKD8nnH9R7OubEO+C54ET+ufF0LZT90xjlO7qLHP5VsJOwU4cw/z6 DMLOOEri+hjc2wuV+wK8CK7IP5dH44GRa9CmiyBzmAUgdusFFeZUb6ZkeQ3wBQkHb/Mr LqNA== 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=G9X4zZvYI0+z1juOsggDVzjoWCoJKJscHi2dgdYyHhQ=; b=nmx9ZUk/eMn6jK0YZoeL26xyvA6Kp1Cad1XxvVrjpz4zXIxi8W95Mbb/2VYdfquv2W Uee9kywKUs05/v1UY1CuJVYrZVKfSr5BPROkEfNrkQoEZpb3KyTra0/4IaHXErRP9CG6 iPv4xM/NKGytSfxDsJIiuk6Rj0dVoVNVcGgVOod7qFvBaLJbdb1gI1bNRF7NPYUh9tPI jLWkDUVVBz187lcHmdrswb1UNBPUMVE+7W66kVH6vULkCK4nyU3m1Ar50RAx0SbrJP/I 3MiXqaV+f5O6Pdo0hVLIryvnB6IVU9zhiaIVow4bteOhvgTw4Mpyc163iuw/cH/KYTB6 qKsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="EO/gVMfP"; 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 h4sor24449513pji.23.2019.07.16.04.58.57 for (Google Transport Security); Tue, 16 Jul 2019 04:58:57 -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:d998:: with SMTP id d24mr8962017pjv.89.1563278337035; Tue, 16 Jul 2019 04:58:57 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:56 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 17/57] ram: rk3399: Add ddrtimingC0 Date: Tue, 16 Jul 2019 17:27:05 +0530 Message-Id: <20190716115745.12585-18-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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="EO/gVMfP"; 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 Reviewed-by: Kever Yang --- 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 471702f935..7f41a67242 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h @@ -18,6 +18,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; @@ -36,7 +46,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 7f6f7d8a9a..e916448fc0 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1110,7 +1110,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 Jul 16 11:57: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: 767 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 36ABB3F08F for ; Tue, 16 Jul 2019 13:59:02 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id t18sf2521424pgu.20 for ; Tue, 16 Jul 2019 04:59:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278341; cv=pass; d=google.com; s=arc-20160816; b=jIWYZbIihut9OU7OO4CMMxNouLlnte0uUpu4bEwahhtUt30o9YVjd5RN0m26wVebOK URzCfbz9POEF8KQ+db5ZwKJIWUnnrSIBQ/RWTEx3XRz/F2xKQn34RYs94SEG5+BvqbMq dk7SxFpzYsMyKhI4wtwoalQDipFxL8uRALJovOKpxCMtDphWzLZVoIjEn/qdywR1FjuM +cOdhjrfn0RGDjVXY/mJiLFe91UyO9Njpamye2TFfzyL6bCgzxZaE/UgQiar8Zd8Rox2 kI5qyZQAjPOZNfXKalKTdsJOuGVQiXB9LukKK1XLnT+JHU9MN2A0d6PbaO2pqfczjg3V XdAw== 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=uwKjF93EOn75Pm4SPcyFdXqO+AdTvm4hGTYaaQA4ToE=; b=HRw2e9JzTLFc5QNYXvwZ6jFtwvoZMxvuSX0LU/dN5dOQTIZtjxCO4465In5s+ogqzl tTIdFecnrWWvmXwnGSfZ3rXQ9k+kvjBa14Y7h6cn7u4E9TLwNAppkmr5bESNHsK/L3W5 u7yCfJ6y4f16x9DhyLBncrewFLpChwhh5EgJdx6K+r1um58tj36AMs6WlLkF5zziWL+A aS5EiEjdPmcjpSLleKqYiiUm64YlSFJJm7rw10Y0+RpvHYOxdaCq9V9nx+SsixB6G6s+ kkbRq6FVO0tOwq2Pdw1WxC9QU7ZD1/uf5uB3aHBUSFqXn7bUY2N6kugQIy4goTKyCdzk 9sZw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mWXJia57; 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=uwKjF93EOn75Pm4SPcyFdXqO+AdTvm4hGTYaaQA4ToE=; b=kxZXmRQJk0bm17eEUbeJWeYf82p6qKiiS9nJU1jnmj7ceeX5xkd8qvRHWmtmhOet/Y cqol51Rkiamsv24H0QmjZzOMin4AAQk9SSOR3+0VqPiS+v6HACkVjEhqmMUL3FbtKsfn x2ST3DzYCJEvhRKDnOYw+Pg0EpNB6M+2HnV1Q= 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=uwKjF93EOn75Pm4SPcyFdXqO+AdTvm4hGTYaaQA4ToE=; b=hILHNrFA3RAWMqozcAANX5oupp3tn+dOoB793v2wh7hj75P0S3vp5/QTHzlRaznpMP yHWdCNwPf/QKIHURBDMxk52ARlVipgweFIpv+MTFcNtGPZ1C6ES/L5tioXbbrxkCYYo3 34kgedLVYee3fRDqtKKtaxNmrkNEaiZ5+jXwCPkk4tdqCOgB9P3/NWWzc508U7jUKwL4 fVNeox5ugmpav7NxCztXN6WkQPs6SWxX5gjAWaPUQtzIRYFEXduARloPy5Jopw3lVd0O GRAxLlX6w6Tk1T3Zi6xSBTTfa8Kp+Dls4FUtMwfG/zNOJ2IBmmSJTZNxIc+Yr8+Q0yN6 itlA== X-Gm-Message-State: APjAAAXEBHucBH5c+1erfcmPEUhrifJuZrT6m6vKb7vIsAW2RiOEb/HZ r0N/sGo5bxpRWC+pxS2s9/kL1Gci X-Google-Smtp-Source: APXvYqw2hHib3AgC2VQS8mx73MDipYWYbWXF1JWH9HwAiJUxCEG5Q4qJM/BVjpxXyq8vcA1uJaqCZA== X-Received: by 2002:a17:902:3341:: with SMTP id a59mr34159848plc.186.1563278341086; Tue, 16 Jul 2019 04:59:01 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3662:: with SMTP id s89ls7081670pjb.1.canary-gmail; Tue, 16 Jul 2019 04:59:00 -0700 (PDT) X-Received: by 2002:a17:90a:fe5:: with SMTP id 92mr36177225pjz.35.1563278340767; Tue, 16 Jul 2019 04:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278340; cv=none; d=google.com; s=arc-20160816; b=rxfqIbHszRrWgDyUGGipj0xBtqIyUfZMmb999WWbFwKwcZ6cq/IvA88+zxl1FNksB3 DE85Ok1YMH6s58dv2pUX0bZW30+Isqud32OzGndOe59dmPV2SOrfIIUt/cHfGGbkRkIn P5NhGvWXLK5B09yPMaMixfyQAmcNHGrfcDJmpp99c0xGw/8uIBOaSl/gu/bwHl0gDrvQ 3AI8MnDd0xHTJTc4N0dJSD0AWN4fVoQ1CgBni3NC6MeDL1iXphT0zMR6RIS1Wki+uQmd eacFlwTUIl+D35uwsR5N5Y47euPhj+MAkyxYzXaqZnRlsMvF+gb1lHAfTeqUrQU2yCiB ROZw== 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=OBBqxzwZk8zFsYhB5wViSonLKwBtWoREpqgXCRrl5xk=; b=W/UYeR2X90Y+pZWp4r18PLerYkhIVU8tCEfi4Y6CeYjAQGM1JTvRhJdtf9g0lBQdqW QttsrGaR/DBzctxUzt+w9+2nGqEXKbEh7C6GyQkCTrB04wthK5mLteLQ9y1ZT4qY4xqv ZVkl9cq6RMmgNCqDfPOrBYid14WV85qbugNmG8tHAXaMMZ7Y+Ms+d0KyEyA2fplJwt0A zV3jUZQQOGKA65AVqfFJew42dCqvIidiNz45Q6803lvOh42W9Wl5FtDvSZcPSmaQIUHC DrOo3lDp8mWkUGHRdTb+ARXACSLZ+HbUoMXcFXTs2UiZRkOAMdNUqI4fXm4kceDawQt2 S14w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mWXJia57; 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 g4sor24788216plt.30.2019.07.16.04.59.00 for (Google Transport Security); Tue, 16 Jul 2019 04:59:00 -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:2a29:: with SMTP id i38mr35053781plb.46.1563278340462; Tue, 16 Jul 2019 04:59:00 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:00 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 18/57] ram: rk3399: Add DdrMode Date: Tue, 16 Jul 2019 17:27:06 +0530 Message-Id: <20190716115745.12585-19-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=mWXJia57; 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 Reviewed-by: Kever Yang --- .../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 7f41a67242..dc65ae7924 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h @@ -28,6 +28,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; @@ -48,7 +63,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 e916448fc0..e4723c7d59 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1114,7 +1114,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 Jul 16 11:57: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: 768 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 3D8B23F08F for ; Tue, 16 Jul 2019 13:59:06 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id 145sf12236024pfv.18 for ; Tue, 16 Jul 2019 04:59:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278345; cv=pass; d=google.com; s=arc-20160816; b=NaTJ/gcVuqMZVB7HjtyruY50lXgF5F1C7/WPrbqckr8zCunDr+ZixU4+qf+e8gA51g /SNb0J1Db/ZDh4CC4/sN7XhJkaCMba2fPUlEzwhgVnMHGz4/cYA3aHusiwp+VVw64kV9 wVJkpQ0dVdwac8eJzUnRSCIcoyENsBhqC+b/K+BZ3XG18osbBCyfshGY55rMYYnWST5D A3ErL6o2pYbhg5TabGIi3AKAGS0HrvlB3VNK44lnXuBgXiFw48JvHSru0fD479v+dbU0 TEa/zefRTI4R/HyfU1Jjs6uhXsUD3tDtsNzqRJgif0DFptx/DQ2LBykKAir5tGgoefAp e9QA== 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=9F9haTpICfjTiujs8L6ybLyCF+H9EafhAVCRSIJwCbs=; b=AQiUNfOETwf/25b4U6haLqjAoW+MsoOdrSVz4TjC2sp5sG44nUpV3we1jQEMA9mHO3 2kgQmwGlejh3VxZt0A7dFjN+m2kz07gm5j7tTYti293a6km5gvMfJbhxqEiVUmeQh4Hz 3sLvj7HKjO4DOC2RhMrdhibksiop01l5VcYuDYU1/MMhAYJ5o2pgl+qrV8q1VvFt9CFD 1rAPS3gTm6Pu1Pf462emFfPjAK3iFLpPTH2k8NLdnVplUAOxAa2bpmjwQS0zPNKAELdc SwReyuLyUYY0dAQZZVFg549X1GXU+rvp46F3MzXQG5ZykYSEVtF+Wcv+MSPgSgETOPEY EXqw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jCoUEpHv; 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=9F9haTpICfjTiujs8L6ybLyCF+H9EafhAVCRSIJwCbs=; b=lN587gZp+OGldyxPS6cmqNrSRJx+0hy0wRhLtwxoWig34CRnJRsOwJyPlSjjtC8Cvu +yorR/O5TQ2JAYxc+N4wbo0QFtisRpj08dibH4noZ0nrtp+vb2ekV6rnb8J7JinlrVzR E8OxL9ZAVaSRkwqdwN4BVYwRCBmtaMZSz1y7g= 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=9F9haTpICfjTiujs8L6ybLyCF+H9EafhAVCRSIJwCbs=; b=L0aw80wD3iXWgNTjQ6l1IiroZG+59A9kLTBOlFvVVdt2R59mP3mNDqQUluuCkcMd9y 3n+Us1PQEu6jJ3otMnTFjPiHukm5Bgy7/t8qjr2SxiewIvCeJ15RL/pMuyiGZxhckqZ8 4+evdPea5yz6W0XmLC1uonv4eAgj1j6IQBvMUJFlHa8fh9cc3fX9UIisa6m01VKXmJ3i E5oagIk9GRLKPWz5Gffm+hZSPDOM6qXe/SAv8yA7RL2+9GUf4WCaIqEMJvJ9rdeFHd2n JFBmPV77o7SSKPoRBs6EOy/R8FFRzXWzJlgeYEjI+LtKpZLHuBjPLUIKStKC1++mnQyf teFg== X-Gm-Message-State: APjAAAV6K0fUe4ThCmn0IwhWSwaz+LbB09PLPqMPyyOqBg6QabpwZsY/ jilS9vgypLlPHJD06X6zIStfe6GB X-Google-Smtp-Source: APXvYqzWLUvAiE7wT9wwL2wamfuFYLTcwzcB1x6dmS4K9iLKPqOkstqM/9mJ46Ejw9Mq0fXfHFf++A== X-Received: by 2002:a17:902:a612:: with SMTP id u18mr33743170plq.181.1563278345039; Tue, 16 Jul 2019 04:59:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:b518:: with SMTP id y24ls3475021pfe.14.gmail; Tue, 16 Jul 2019 04:59:04 -0700 (PDT) X-Received: by 2002:a63:c750:: with SMTP id v16mr16852283pgg.320.1563278344440; Tue, 16 Jul 2019 04:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278344; cv=none; d=google.com; s=arc-20160816; b=o9drwMLYTzJDFykKMtB9mIIttSkOtAERPCeJCiIh0hmY8PFru6+4WafOisMnwFqPY+ pV16HyWst8GceyCYjODsDpzAS0yLp73PCeWSBP+OOpyd5YBzBrjpoxgC1dkfIuzap5w9 Xpql1533hD1aH1yAA2okAJEZCzrUO5QmcIeXsHFntNzWwKfLKz+qDK6kMYuSzZQmslhM G1GVklaEEok7z8HK3qxhG4lO4erD/drRPUh75AGO45HHX4KraByuQmLuJPVs6gptgr5o ZIzuvO/6mvhn9sVBAw/uRRGwuNuEuALYt+dlEAd3eH2bXsESOOjy8xZuMA77s4DL//gc W9jg== 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=iUvWjq1BPXXrVhqOCtmAWyZXv7hBktL59XaTbIUcq2E=; b=OhzxG0xEYEPJQFK/kZpUYqfZ7iSTxbKnRBEwsSD1/Kh9vZMqEb3Azos2+qSp8hmlC+ 5t64tICY/1O2PhVG1IbgVHiwvKYj5KR+E6b5H7CgoWMKkreFr7Cru9Fahhdhn5hJvklm UGEDO3M7rL87NF3edWdfVQqV6n8KDKBRDr2Tc5Fa1o3yo0GxKJbxkM32+P5r0drUZVwW s4lDDQnClAq7bLwyiiop6zDhbS78uJCqIVGdtEwBWZvvDSt1qoEegJArYBd6Qb92cAjD swx6/3394Pf5METpEDDF4DxqJASBjaoixYPBtZ8gyptSWk6Yl04fav/T25FnnxYAm6EE fAJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jCoUEpHv; 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 b17sor24568421pjz.4.2019.07.16.04.59.04 for (Google Transport Security); Tue, 16 Jul 2019 04:59:04 -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:8c0c:: with SMTP id a12mr35678317pjo.67.1563278344023; Tue, 16 Jul 2019 04:59:04 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:03 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 19/57] ram: rk3399: Configure phy IO in ds odt Date: Tue, 16 Jul 2019 17:27:07 +0530 Message-Id: <20190716115745.12585-20-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=jCoUEpHv; 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 Reviewed-by: Kever Yang --- 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 e4723c7d59..a49677285d 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -188,6 +188,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 *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 (params->base.dramtype == LPDDR4) { + /* LPDDR4 */ + vref_mode_dq = 0x6; + vref_value_dq = 0x1f; + vref_mode_ac = 0x6; + vref_value_ac = 0x1f; + } else if (params->base.dramtype == LPDDR3) { + if (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 (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 (params->base.dramtype == LPDDR4) + mode_sel = 0x6; + else if (params->base.dramtype == LPDDR3) + mode_sel = 0x0; + else if (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 (params->base.ddr_freq < 400) + speed = 0x0; + else if (params->base.ddr_freq < 800) + speed = 0x1; + else if (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 *params) { @@ -332,6 +492,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, params); } static void pctl_start(struct dram_info *dram, u8 channel) @@ -376,166 +538,6 @@ static void pctl_start(struct dram_info *dram, u8 channel) dram->pwrup_srefresh_exit[channel]); } -static int phy_io_config(const struct chan_info *chan, - const struct rk3399_sdram_params *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 (params->base.dramtype == LPDDR4) { - /* LPDDR4 */ - vref_mode_dq = 0x6; - vref_value_dq = 0x1f; - vref_mode_ac = 0x6; - vref_value_ac = 0x1f; - } else if (params->base.dramtype == LPDDR3) { - if (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 (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 (params->base.dramtype == LPDDR4) - mode_sel = 0x6; - else if (params->base.dramtype == LPDDR3) - mode_sel = 0x0; - else if (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 (params->base.ddr_freq < 400) - speed = 0x0; - else if (params->base.ddr_freq < 800) - speed = 0x1; - else if (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 *params) { @@ -545,7 +547,6 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, const u32 *params_ctl = params->pctl_regs.denali_ctl; const u32 *params_phy = params->phy_regs.denali_phy; u32 tmp, tmp1, tmp2; - int ret; /* * work around controller bug: @@ -623,10 +624,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, params); - if (ret) - return ret; - return 0; } From patchwork Tue Jul 16 11:57: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: 769 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 B04C83F08F for ; Tue, 16 Jul 2019 13:59:09 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id i3sf10075400plb.8 for ; Tue, 16 Jul 2019 04:59:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278348; cv=pass; d=google.com; s=arc-20160816; b=N37UzUsyWAJ1U6DECN8KmCcNcv7GhIeuzfJa18kfZogM8hVZP4odipAD+HQzClbZpS Qw11MJuwcl+1vo9m/t+k8RyD8wGYtiSteHv6/lqVQ/r9yIOx8E6lowwQ3rLVaofbIvxi 3D9iHLiUcj5Aq0kOkAHFT5T4znw+pgWTvi3Cm5gK+HRSKV7XVErEughYenQB/cuXvTUp Jipcem7KJ/AaA4CE0kIjobaGYgDxqfKngYGmJVmzrxQ5JWpN4eENCidJB2a68qsLgu33 asnl+pQ8EpGTzCCR0Du0RzBxtmhWKho7JiBpb61KGiw0fY+Zgf2zu7mslmNOq/x6HqWW O1vg== 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=qMwT0NjYU14zQFoNgcWYwjlzAS0XNN6bRDa0Equ7oTM=; b=dDJM8fzmbChD5ByCMqAYXxqPevAN16yUBF85Bpwh5jMNXZN/LbIHm48XynUSz5DyuA 9XFJdVm1Fyjti1y1OCrdX5C8b9JW85QFPo8g1NwQiRIeh/nZ3abZdF/fyvoSbS61rtIX zcwZGe1p9qSRMEWTXOYU1wX6yU1RSnG+orKJ2kyFqYWNHEOgeXV0ve1xqyUEOOY+Mpm3 +b4s4NnFyqLZrVxpZidJ9aizSbFPG8UMVL4iSMBF4T8PDGH7NTX8FDOQjRW6vhj0MzRY CpFkovUmCnRwSinNFeKhiALcSct7shWnNYpDsTl+N63BzBWtctOSQvFScnqdYeFX274r xptA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=k94BfO4a; 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=qMwT0NjYU14zQFoNgcWYwjlzAS0XNN6bRDa0Equ7oTM=; b=pwMXn+HdBn3vCM5daPCIIEXRyh0v7xIELd2HgDINoRvw/noG4xvFoz6VANRzsvy+Lt zOTd9ZOIFLg5GE20cOXafwIu7O3pIGJgpKRLf2FJGxw9JxnnDyadLTNhwkVy+Gyu//Xx 0sFNGUInagbyKUrtlyu7LXWjBGK6LkZDuA6Gc= 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=qMwT0NjYU14zQFoNgcWYwjlzAS0XNN6bRDa0Equ7oTM=; b=mZEsCp0cS7ZGEX0tbM4Y8j0lYGSmnq0mRNhjUgdzKNGtC9UIsAtmziarsMx+zkMNX1 vvtN+0Ukqjs0heH6nm3CfFaRsr3gLZqzBSHDDWyK8Euhehv7Kaqyz7H+GM4+EwOWdlzf ruzrlzBcLb/YO4w0Se8Qh4LDv5wkafeVzdz53dtq1nB68XrSaqhw01+zj/N01JxuoY8W jpDBleNWGQ5BTNXbW104rDCSlZzV8bQd3uTZnbwh0Ko4o/lzK/SBxisXAb212q8flZ0z 8BMn0pzU129jd8ynpgPnV2ZtELRRgbYzOwnZv8QCGhHiXuUPWOXuUPBoNKljhxPkR1nV 3zrg== X-Gm-Message-State: APjAAAWqkY5Q3u+QU0BX6TkZD6hGdCxYEGPOyIb7zgT5YQOP1bai+wR9 XpV4odQD6ykTeuJY5mfiGxzSZA2h X-Google-Smtp-Source: APXvYqxLVw05U3pGXm9yhwJ+Ll33qwx+RwvzXuDtHMx7viBDupRck9DYnWRroAiC/bn6urtBnoZRvw== X-Received: by 2002:a63:7b18:: with SMTP id w24mr32871905pgc.328.1563278348423; Tue, 16 Jul 2019 04:59:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5f87:: with SMTP id t129ls3481122pfb.8.gmail; Tue, 16 Jul 2019 04:59:08 -0700 (PDT) X-Received: by 2002:a65:500a:: with SMTP id f10mr2097051pgo.105.1563278348039; Tue, 16 Jul 2019 04:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278348; cv=none; d=google.com; s=arc-20160816; b=xplbfgCk/YogZcY1Jv1HDbL6W9dxAVVCMZZy0qZCtEqFb8umRkL6LsqILbmQ9klA8v Cg4CNrjhxxPYCPyjTAaU08mRGFWhkWpIlXPPhAqmL4c5zH74Az7b1YPWwefHtTIhVgJB DI5BO9vIUw3khOkbFHh4TefpC3b+C+3c0M0NtELEfo3hMIzHLZ73tqbpcpGqbyrY9tjD p5iiA6yQ5kng380nJSg4QRPTeolmPF5QHQknmS0rs7gqxPCixvATLUIyAD+a7bbIuMQX 0udlBaSnq5tpiGhJ8GFUK2lRzAQ5XEOEIt/AUcMefjEc0SwwdAOLIr3rRl5biK2OEATA TYsA== 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=LGQ9bzA9T07Z4PCboB8dYXm0DbVJVBbSF3/XKR5AacI=; b=gKaZDVyTL3sw4TQoZ+4vG+YQ5UATvOlkB8mIpIJGLqotY6bEsSKLzS6bhNIlvid6pg sTAe+I0TBZ9sU7D8pkAg+OrVASP8X3g0nhC1Csc2JjJEak4ZjOatWhR6VoQ2nBeEfIej +1/kSSLwKp+MDD7oxzvYq0d2oDYI/vU1Dm0dBwOIQvYrqA0226ka1V4yziFDBwTuCrC/ xK8BdR3bNiZX5FUYJVRsJ1LeLHFSfIxfF57IZZKpNZcqoMQllGUz4inZxaTjppXniwRg pKF1bC58Mz8e7bhrG1MDrtbmCG3Tt+/4ho0HPRd8RO7Onp3aqdl5h+BPXFXRd+DoSq24 mhwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=k94BfO4a; 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 m37sor24746570pla.6.2019.07.16.04.59.07 for (Google Transport Security); Tue, 16 Jul 2019 04:59: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:a17:902:b109:: with SMTP id q9mr24809641plr.176.1563278347493; Tue, 16 Jul 2019 04:59:07 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:07 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 20/57] ram: rockchip: Kconfig: Add RK3399 LPDDR4 entry Date: Tue, 16 Jul 2019 17:27:08 +0530 Message-Id: <20190716115745.12585-21-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=k94BfO4a; 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: , Supporting LPDDR4 code support in RK3399 would increases the size of SPL/TPL. So add kconfig entry for RK3399 LPDDR4 code so-that the boards have LPDDR4 can enable them via defconfig. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- drivers/ram/rockchip/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/ram/rockchip/Kconfig b/drivers/ram/rockchip/Kconfig index 151ffb684d..4f274e01b3 100644 --- a/drivers/ram/rockchip/Kconfig +++ b/drivers/ram/rockchip/Kconfig @@ -23,4 +23,11 @@ config RAM_RK3399 This enables ram drivers support for the platforms based on Rockchip RK3399 SoC. +config RAM_RK3399_LPDDR4 + bool "LPDDR4 support for Rockchip RK3399" + depends on RAM_RK3399 + help + This enables LPDDR4 sdram code support for the platforms based + on Rockchip RK3399 SoC. + endif # RAM_ROCKCHIP From patchwork Tue Jul 16 11:57: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: 770 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 D8E7C3F08F for ; Tue, 16 Jul 2019 13:59:12 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id k9sf10058829pls.13 for ; Tue, 16 Jul 2019 04:59:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278351; cv=pass; d=google.com; s=arc-20160816; b=hojLZo4wLqG09hvDv/DnKZZ2ydaxClNVVE/k++5F4oxCSNZfHeSWcdMNU91Wlqwfs3 28VM3IhAOtSCDXShe9ozUcKPJxT3kDL3IKkgkVlFA0v7dZFZtFAmxbSoXlpmPqjNvsBA m1uhpxDl9ifyUhkdQOmsnumvXGSHfRhpgQNv2MihRXDxTPHb3ozlIf4ZfZTy01sPDC/F fePumCKRLW8acVBbp2wEXQ4+dASNz3J3wOMNuPyrfF+nnuZzKjoXIpddURSYI1Jvl1Iv L67XUKG3FOSZJ3EpzbP58z4HROPDX+FaNWG69RJUTUd28s1UyL/G8Yt0QL0e5waSkzyC u3Pg== 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=XyqG7FAFyGKUFol+PT10qjiI9WRvGw9YOxTWjgUMYtI=; b=UU5f3BodhAR75ga0Ty8vIMMKy1EbyoRT2YAhNiqlM1l+ghCjqjeX2TgHKqFkzTBa81 aLbpxyRSlj0vzo2lqHsxkI7G6xe0pLtoNSk4hgaTH/k4vD9k1X+6FfJ+ONxj0TcqdSQY 2JvK+iVpv6CIirfDhBN03kr+odDRoqSOQhJOVONJ61HxlgfAi62p4gxuITnvPmLX+J2k NeK7GI2pimqECH+NqActG1sCP2f1e9yBXaW4w5mYhbGCa06v8qshjiqw0wlQJR1G2axU Nr6wOumLsLLH0f7jPGdOAa1MBTwSUKugW6NiG5vHzRPcU2PnpKFbv2rxBNCXrJXMPimi hemg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GNUk3RW4; 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=XyqG7FAFyGKUFol+PT10qjiI9WRvGw9YOxTWjgUMYtI=; b=CN5g1G9mWXblhMZlgrVlH00ACojijksi0x0J9Gn1t9W/e02vHaY0Lyxn+xRJriGFTk yYjU4w4scO99BM6emyclJQ9lVVmCw3hoVYjtcDr41/B/Ft9nCcLRz43AfgDXs7k6k7Bm 4Kwt/MQuf4G86C/4vt4Zl80Nj6yeFP8lAn014= 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=XyqG7FAFyGKUFol+PT10qjiI9WRvGw9YOxTWjgUMYtI=; b=DcqsSwjof5t6nYy0Bdr19jYf0Sbjaf+o11loa76vcSTTTRK5Aam2ZfAKfQ5TlvSMk4 l0CWZqRvyefB0DvogmQME/Auc1IdENnmnr0iZBW8QkpQzCt6hUXr2qjbYVJ2Lx7byHIT GsdpPqJL/B2oEu7gnHSyjJX4Rc0wEr3Se06uHtG+h6oycAIW7HFVJEYU/cYygcSdgcgV kpcbJDoIcwnrpQoF+aBLLhmSlEurEzBesw49g+Mqk17V9VokdvCC1iT6ipr4wB7dpkZP JMC3aghEQjmiMU+NCUW628l2a7yjE4r+xDbI/RqP9BImSv47QyeSwJ8ODGW5nVKsoWRu Bg8w== X-Gm-Message-State: APjAAAXPFcNGiIoUPV67tfar7Z0XbwO29kQqOqk2LYg+Lp0twSHSWHBF p5pAMPrIq0/dSX6mZH8yJyCsL6R1 X-Google-Smtp-Source: APXvYqydofgmQezvIvxH+XL06+VF70v3Yy79up/sbnH1ZfbpRcIYexILEKsGSqDh0dJUzhUuwHeQHQ== X-Received: by 2002:a17:902:8547:: with SMTP id d7mr35420716plo.171.1563278351725; Tue, 16 Jul 2019 04:59:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1654:: with SMTP id 81ls3485360pfw.2.gmail; Tue, 16 Jul 2019 04:59:11 -0700 (PDT) X-Received: by 2002:a63:774c:: with SMTP id s73mr31510376pgc.238.1563278351289; Tue, 16 Jul 2019 04:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278351; cv=none; d=google.com; s=arc-20160816; b=XyqGsAq0ipWaRW9Nj90HRkqM8s1Ao3izhSdUvGYpGZjfnDjaifb0BwWQYK17QERhRO X42mvnowbIXMrbrB54WoXgzVWhCGkwdBvdLOAoLgTSlvOcudgPDrt3qOa+YlBd4vfni8 1njPUviIEX0gIinnZgb9lK8duv7LMHeGqz/Zo6X/J2Ib6Dwjb0l9peoWYw8dJ3xRuMZx jqRt2x/iI72TKFvMqUdh+6OJ1OnbwYU29wOT+CK9IFp0tYEi2sGdkicYkhZ8lOS3d1+e 5ziZ7HflCXnNev3y6OgpNTZYUvajnwmL8eW2do1jwVKoCzaHhutFrHkQpLUghGPyEX1E jrMA== 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=bflvW+JotwkqbODWpg7GKUWBSsmpB52BPlZ06Am3kg0=; b=zJ8YP5YisB+CTpsEOlhdEYV35yMPQ+exXM5aSfCwKPbp1cSwNCr1iJZdMYD6qv2amp Qc8FBVHu7IeqP0D9tlUUKZNY7eaXJ3OJJPWcJ+1+7DQfgIRqFqBpdSEkS+r2ThEXiIhK Q6lNyFHDEoE+JSzLkfgDLfEyMKmD7Sg4WarNutsbRpif4SHhQd3oUugGttXwD8KNvYEB b+0VR5XeUTDLEGfEP4GyDHyKlFXyJaNKzXV6hVoaKqg4M/F0h44d7MCch7LbLiK9afSm tyUrA6m6QzTfY+Ers6j0RcQM4rSPtJbfaeh2C0nMEqYAskLrIGPAZ/1/XjPxnN72lieR MKuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GNUk3RW4; 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 ck2sor23961197plb.1.2019.07.16.04.59.11 for (Google Transport Security); Tue, 16 Jul 2019 04:59: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:2a29:: with SMTP id i38mr35055086plb.46.1563278351007; Tue, 16 Jul 2019 04:59:11 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:10 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 21/57] ram: rk3399: Add lpddr4 rank mask for ca training Date: Tue, 16 Jul 2019 17:27:09 +0530 Message-Id: <20190716115745.12585-22-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=GNUk3RW4; 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 Reviewed-by: Kever Yang --- 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 a49677285d..8ecc3a1b74 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -687,7 +687,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 (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 Jul 16 11:57: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: 771 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 724B83F08F for ; Tue, 16 Jul 2019 13:59:16 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id q11sf10031917pll.22 for ; Tue, 16 Jul 2019 04:59:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278355; cv=pass; d=google.com; s=arc-20160816; b=eK9gisbpjkjGQrNFcvlF+Bc/OKf/T+LPjtpq/F7KrGsHnvcsBMGncRYD5fEYyElbXg CPC6GMbEWJrcyNs/ujo64xz891MloaY+kp1eGxbSMbVLWSU0a7vHsw0j8abhLL7gptV2 5wFeZc/Er0uX2cVOqzeJs1l5WxsQFaRvswMoXF3w61bw8YF7vJB3rZWMXxLwPH6s106/ WdS7QFHfde5vD+sET3T+H3LG8Awc+UJ7BRTtuJKYLCShQclpjkHdlVXX8Lzz9mcYZ3lP 84PQajli2Je2C3EKa8DT+jYApuXoHS9+SfEe2349F6TJxL5lUNs/Rmi9tJ+Snq6e4SWA Sz3Q== 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=ut3MFIj7Ofa+ooZFS+4LLeXUzTr/ZlYfWxnlEa9JsGU=; b=Kl2tx65u6rdn2I8BW6TLkZYy7fvF/G3q02YemCyojFto95YdJ//zay08r7X1+nd4PS Sew0YGCzqP1InvghM3zpG4FxBCusRTqlgVLydH6C7Dnj4CdZE+TvM4M0dp2aAvBG8Ywe AiipIpdGg/FUS25fPUTEnJDxq0ut9NBFQPR/QfOGHAmN2d3LKZBC1DqRFHkBtexUHjka eFNvqkHv42SVVmqyLky8yF3Mc86NNzYa5cHS35mg8n4LMHiV7Oqr3/dBl+B+ZGWFBduM LjNt61ujEETbBclI/auyNBqAvnGywnNxrhXc99UB+zNO3dK/mri81OhhfTwKOus5ELMv yzBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DMoTToEV; 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=ut3MFIj7Ofa+ooZFS+4LLeXUzTr/ZlYfWxnlEa9JsGU=; b=mlXqOeVLaTdmfr4gl7VyXux1kiNxD81WEn0rGIsQBa6tWiQFuGAk1TM7kurOFVxRlc dprXzIxngB5EEf40WWJA94mLSIAmdsZhrcQsKpUxCKEJ84xi3DXmKh4z/k16CgZTnG1b bObPlRBbKyAHZxZaWiudUyBlH1/w/WrEFSbTQ= 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=ut3MFIj7Ofa+ooZFS+4LLeXUzTr/ZlYfWxnlEa9JsGU=; b=Jv/S49W3e2WwIcWxHM/HGMYvAuYQtyMehV/PfWcNHt8TT7LxG4Y8w1UuuPdP3fgATM iCVoBzx2bWt8Cu9oWrMs5XYIwVLI3xKpCR59GQo2V6uMuYmP2THUJy0k/jc/KceTf4i7 kWIQLryvk9hlZm0D6JdVJ4NvGj+HCAt8zqqjOmqGWdeszbbglkoaStv8c3Fp620jFdXx 4tfc+ll7Kx+flsJOi9MvSSHe8Iz89cixMYKbOT7JpWGvBoWX8SAFCm5NroyV9UsEKcdu w323BpgML0IP7F189jsSYJ4bmN4NZynyh4GiuGr18CZeqQUMfheXJ4r0ToVSChr86vjC mMtQ== X-Gm-Message-State: APjAAAWj0f0uPTyMbEd4B0CtWsFbZAatFdq/eie8LWFeDKlILi19Htdz lORNPhaSE9zIg77PH+aV+zL5Rrg4 X-Google-Smtp-Source: APXvYqwodqAu5lcBoGwTIfSOenq5FeCjteWEjgSe4d6M2AFABL7o2YrvUgH08hWSf3OWiJnW957r5g== X-Received: by 2002:a17:902:f01:: with SMTP id 1mr34596405ply.170.1563278355307; Tue, 16 Jul 2019 04:59:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:e444:: with SMTP id i4ls3433575pgk.13.gmail; Tue, 16 Jul 2019 04:59:15 -0700 (PDT) X-Received: by 2002:a63:8a43:: with SMTP id y64mr32765502pgd.104.1563278354911; Tue, 16 Jul 2019 04:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278354; cv=none; d=google.com; s=arc-20160816; b=0xPsd7q+589HRk8QTrXIQiKNHb15U/ygx0OIZiCumySeK2zs1SUbNZcJYHtlPwe0kR tMvBgZ5OgrSzSnTtZX2vfLOpGIYLZACaqtuPNmChejUSHYEO/G2zcNFgPYN83cvePuxf NAoctTj2/7XQaL1umehGR1HBk9l2+lUPT6EFbsAR3l4xGIsMN/9wTUA/lDuNXvdFHFxT HslOIMTedsOQjVbA+rIoEaO2HEanZ3G4606eHH8o9GGsAmYO+lCEOjky6lpjxo96fdR2 BYk7qUrJsTqkZDYrJq76pzRnZp2BwlE3r8u6YvuQjpHO255/lR6iKJ4wERUhIX5NYOL/ eHqA== 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=aylTmfkqtJF+7tnDVUrQIwHiwDYUMKBZKCeVtVEHmj0=; b=pJKidwldYgbiyrtKVEOxHcnCHccTjngbK3i6bEyxwH4IdWTVN2Tk+T7ykj+54nijdo 94Th3OBZJl0rC7naNsqSCA2JIBde49d52wuxXGqir6vfU+RXZSv3lDH82f4jfe8ix7uf aj2Tr8nL0ndCe1ytQ7WoBS/Au8N+dqxGwdOsRWB45FNTGcjzSf85rzP5oQrpoQ5z0RWl jGiZPR+5g3k+EHUpOUtA3Y7V5d0scTSo7vpdHw+LSDUT96rCL/MXKhbpndqp77pBwebh xpeglyvNCHYMYturNxXVb2KdUitqBTC+oKFGg76Po0Z9KUVOShmCyHweWJ1gAakdBWdQ dFzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DMoTToEV; 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 e8sor24335773plb.48.2019.07.16.04.59.14 for (Google Transport Security); Tue, 16 Jul 2019 04:59: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:a17:90a:380d:: with SMTP id w13mr35066590pjb.138.1563278354606; Tue, 16 Jul 2019 04:59:14 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:14 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 22/57] ram: rk3399: Add lpddr4 rank mask for wdql training Date: Tue, 16 Jul 2019 17:27:10 +0530 Message-Id: <20190716115745.12585-23-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=DMoTToEV; 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 Reviewed-by: Kever Yang --- 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 8ecc3a1b74..711477188e 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -925,7 +925,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 (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 Jul 16 11:57: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: 772 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 ECFFE3F08F for ; Tue, 16 Jul 2019 13:59:19 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id m17sf3563627pgh.21 for ; Tue, 16 Jul 2019 04:59:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278358; cv=pass; d=google.com; s=arc-20160816; b=mvvaHl4GZnG35TKtZPT3DrPro+/Bi/M1J5eyfXCfVrmDAkdGhBDI+/Lohr/mCT1p47 WkrSuUQqptutHvtHlggASkl/3W2n7Yz8w4eBHtAna6xnBDIMaAoWaWD79KJ+CbZMyZfp 58dMrNZ/FmbeVDu5DYtz1mWa8aMBSiLA01hkerDCIaSwCTVXngw4mj/VPVg56usP57Aq /WBu4v4v0DZVK7lHtqcrQ5k0KnYNuEf6UmEaXalXmyQ4Uu3Cdn5yPujzWt+ach0sj4k/ SVQpHi/5HK+0jpCbGLpvp72lZeiRfeAx5OczPg0kJ6rSmqafpiCHuFYdr3PytXAjNIuK pFkg== 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=nMut2PEJQMvNeJEnH8fdIiXtTltSuBYv5+rXoAih02c=; b=kMw1lag+fJIJKzgMf4jyzy5sY5zElkCJMPNZrV/UOKn5HhvgjQGLelmorz9dW36Cqy zuwJlhUgfOu8xOeg56fm4YDoEGMTW3t1owLQ8MIkM2WnFFGCjvLzWE2OVYej1QB3WRoP LL/Du9tT9AnE0/gLpP2H0fI/4hMz5MDgXEtJ9WcKSlauyniqj7i1J3IhLsJHY5v95YCg rPEaSMi1UXKMtWzI5iMGvWCwtwDXPmQfdYO41KyvgKnG7wlgDO7uxaaDDvx5oDg+iQvf Gzja6DFXVicfoUiCLpoyvYLcwjVQkxfR+5uxN5q1rd0qFlRmZRlKA11XllWlOab9E0PE HB3w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eMdikiLI; 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=nMut2PEJQMvNeJEnH8fdIiXtTltSuBYv5+rXoAih02c=; b=SLKgaEEODJP9JFO3aRU0M13AhBtcA5AFtICjh+MpHq2aXCQtnAN0Al+tl1oluPO0KN FSCH1XyVVMvZB35bzKxoZmnL6YGZiLAiHwlebjgAfmYZ+Qms+00eDGfoz+BFsct0fUvO JkAR8KB4b9rJ9Wkl1+9GQ3so1iSvZSAKDeYw8= 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=nMut2PEJQMvNeJEnH8fdIiXtTltSuBYv5+rXoAih02c=; b=tpAa7ti9LsS9xDdvIMykBuT8KyFq0B0bhenDz/thcmXsDtQAq/b2TLxdxZgBhGWrDf FzIJ4lGOnwUxMgGSpFr89gZUlDNImGwlcy7l0+4dBzCMKzDsExL3PVaKh+tRpd3Gl6eJ AMewRq7IyKmn0IsiTmMqRqf9Iv8rL/FT2a8zEqECd8NwoItfymcMBmTgV2vcIxagNos7 hmb1kDTDhCNqPAcMWGdUb09TAKU2DZqHGiOv0oUvHDT0qB+vD7Sxsx0htv+pWsCv1BxZ JQJwsFo+JpRtdgNY6f62tP8tDfff88KoIK4TYvlnX1OdMGzo7WolM5woSA/XiCJqJtaF D0hg== X-Gm-Message-State: APjAAAWjTBweBNFxlQehMkQsb7CvZdoobXdTJpl3WcPEy9XwipWUH189 ZwyJLv1QzUSvJUqz1RaqxpVc8YY9 X-Google-Smtp-Source: APXvYqzS6Yyr38Dtv8twAhNr64p0GUPd1ANyas0LTGFs6zWh0vYwYWgCjn5P762R0PGSP04K5pg33Q== X-Received: by 2002:a17:902:9a85:: with SMTP id w5mr34838060plp.221.1563278358771; Tue, 16 Jul 2019 04:59:18 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:18c1:: with SMTP id 184ls3474039pfy.10.gmail; Tue, 16 Jul 2019 04:59:18 -0700 (PDT) X-Received: by 2002:a63:c24d:: with SMTP id l13mr33439155pgg.330.1563278358380; Tue, 16 Jul 2019 04:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278358; cv=none; d=google.com; s=arc-20160816; b=AhuiaSy7VrIFanENGEZpxtKfWbkrI0nDFCf9TnTefjh7YSpBCEw84Mwv0eCDzG0HBm v2TdOaG4LN5Kz+nvnkEg8gIqJKPEsTpj4E7fvBWm4xoWgSXd837IkACgNVksAw13eo7Y DW5unZeY88MmxT1wKyCN2t2RZimGp0gUzbCEsZcHE5PDDp2XIuwtZB9o7dIS5g70hbPn P/b7rlwn8HSbl1bNUDuN4Ng2CxQULQ/rLgdnLKfFikCOvSsAMZhEQfVJzstR8BCYwn4r BlGh5UmO6QxO+vW9fpo4mcMM4PtOHuCC3J205uoiIagqij3lyMOMLGMKywvyXgY7usFt I99g== 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=Xv7hs5BBvaJWXNOawbd4P577U6W22vvaUZK7CZedUbs=; b=w27F/O7x1w+YDzkO0InbHG8H8jZuRwEggSRUhIOv6ouuV2y4UaK80yEMS4VfSsHaSQ onxCnMgtxzArHfXdF+KnjWFN8yVOMm7p2KCiTA6MMywa3JYvCTelsCAtSrm5/7CKxntj BC9xU5A0M+QAZVdjC6VFUimHbyxB3NzJEY9oG4vNbH9bBG4h4s8aI+EVMpKs6Vwfo/AQ E9njq8f0W+mjhDBzrahgEJ3eBOEwX5iAzpw0NA26e++aaBvRHguL5tTOh/HoprjmFmMH g/kYNNuyUDcuvADEC3ZjqYsTDcj4zcv9S44OsZSi9dF6QCheGVR/In50WUJSbIzBz0OC nApQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eMdikiLI; 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 r69sor24819870pjb.8.2019.07.16.04.59.18 for (Google Transport Security); Tue, 16 Jul 2019 04:59:18 -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:d814:: with SMTP id a20mr35839248pjv.48.1563278358060; Tue, 16 Jul 2019 04:59:18 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:17 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 23/57] ram: rk3399: Move mode_sel assignment Date: Tue, 16 Jul 2019 17:27:11 +0530 Message-Id: <20190716115745.12585-24-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=eMdikiLI; 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 Reviewed-by: Kever Yang --- 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 711477188e..88fbfa440d 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -205,6 +205,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 (params->base.dramtype == LPDDR3) { if (params->base.odt == 1) { vref_mode_dq = 0x5; /* LPDDR3 ODT */ @@ -265,12 +266,14 @@ static int phy_io_config(const struct chan_info *chan, } vref_mode_ac = 0x2; vref_value_ac = 0x1f; + mode_sel = 0x0; } else if (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; @@ -292,15 +295,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 (params->base.dramtype == LPDDR4) - mode_sel = 0x6; - else if (params->base.dramtype == LPDDR3) - mode_sel = 0x0; - else if (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 Jul 16 11:57: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: 773 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 7809A3F08F for ; Tue, 16 Jul 2019 13:59:23 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id 91sf10051669pla.7 for ; Tue, 16 Jul 2019 04:59:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278362; cv=pass; d=google.com; s=arc-20160816; b=UKVa7uxHzotNN17JdzliCXigrqKR2adVpteL7IeQIZTNGFGsNCQNTQbLN0ZSG1FRm0 XptYa2ll2DivcZOKrHzWsxyhjjXIVUBHhNZwJIGRWyIRsr0YKHkhPJPq+Mfq7sPdx7TJ AfLhiYvi3Rp9ETvuMJr271NOuaiaAGvnyhet+o9CxSr/aZTxAlKABj6M5DJBaRCM8Xm8 ZtZ4CviFGry+aXrjdam/sUHk4ozlplyTqg3D2MxisACCAFdLv5e0OExk7x4YN4QRYuV6 2fCNNF2zCXVj64A67ezj0nx4BWSYqHDXdBMBPxJ6Rz9i5VNIZS4EJ/vnAX72BJoDi7tu WKGg== 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=2Fulb5qHSSddhBVjtERi1NCViDJ6IrUELxPhZp9HHvE=; b=Wv5r13ixDSO4jdVTguW2cZMP5DF4nr8mRDgb7ffhGNPM/pvxHydj8Ef9exaF01q2D+ wstToTCN7ws5xo0UCM+2CzP/7Hwjlns+PY8UX5ltVCSVzrer69EqYtDsplHC+e/pYbkc 8bgAyTH/4xd909Pokic/YUu3+szZsQFoOi24Fm/j1n4nNzyv+Jq6McZnycIUXjpyh0/a rxzIdy/0+9QWLaf7XPFV/ixHyNRlsOdt03XMKLNBoIcgDhPAHoIG6DaJWQ5QiBPXVm5y KRxnmD5E1q6m67971otHmpjNiRTBXi10e/3vH19iCfJ+TuOR3qYZkgKqSF0AiEoNNZGt 0EmQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=G9GmkIyM; 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=2Fulb5qHSSddhBVjtERi1NCViDJ6IrUELxPhZp9HHvE=; b=eqHSc9l/0zBYNna2yAWFXllr732tmrTeAXQ9Ggtb0wvcS49KQxXil0VOTI5xmfRiea y3wdFej+MAoArPEE4uMRCjzXuMpItlB/BsTeC2e18+nkxk9EiDx7Mmpr9LUnwINUKo/4 Psx5QXlTJEnNQzo80pdJaeLQJHmNi7JTYV3SY= 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=2Fulb5qHSSddhBVjtERi1NCViDJ6IrUELxPhZp9HHvE=; b=gPeolRWIQwRn6hZnqi1tEoAb28igskn6TtzbtjSRphHrtLEmq2UMz6+yeiDbar/E6M 5i9fdGy1NM1IuqjwTJlz9MQAfwpqzMQ4X84yyQCpJ9oDozzI1Nj+FFIgZL15QHjip/UD 1lt6XONRxfaTzIz1yjSCsTGDo7I2EUrDc4htL1qpfx1DB2yvt4kauW/k86sPJ4svLHzA Rl83MGmm9c/ufJ7/RS7/UROFgdqMzcDPkZJgRrmxMe1isqSQ2nV361J4qxX9wKfhYedb 9KrxyFov9TKCDrRK55ZmstgYDDHAgqppvrsV5t5TnVLNrHI/1XE8CgYNWD++cABrgiIZ Alag== X-Gm-Message-State: APjAAAUgo9y6DaoLb+BxR/azN4srQvlBWnw+0G0YLYFzlD+RBJ8+6rb5 yvfV/SDpisqfgG+NktHbT4vCoJCc X-Google-Smtp-Source: APXvYqyGVQbPaDlS/b+ka5QYvnmJwa80lEnOdWU2Q3X3jNrsTiWIY4WZ/pCU/QJYNdLwZuE9aWgb0w== X-Received: by 2002:a17:902:694a:: with SMTP id k10mr34515369plt.255.1563278362350; Tue, 16 Jul 2019 04:59:22 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:18c1:: with SMTP id 184ls3474069pfy.10.gmail; Tue, 16 Jul 2019 04:59:22 -0700 (PDT) X-Received: by 2002:a65:4045:: with SMTP id h5mr33994141pgp.247.1563278361860; Tue, 16 Jul 2019 04:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278361; cv=none; d=google.com; s=arc-20160816; b=gQ512YLWkeyqHq55jfCTCjaaILo1dHUidsiAhzByCpQmX5Ke3DhWsl4+Hl05c1xDwK K/QffdLpB2VhuxHNK1IzKfv21o3tUY8M2FWw5YLr8r4D7mCIySHN/iPSC9x71hMi7JnM LzP+Yjw3Mi/67hsSnlWMIdC76/0apPhlYw6XfyMz5gFpBDR87zmyzwxo82jehFlPvFQ7 ZkGQJScoPAzJt0MnM01f88CJ6+c+h6iy76iVzBMWm3+sjeB3HNehypPXV7TAkEl+nnc8 1T/Yn8qMPuIn4fTomBLNNoGULNlNsbUQpdzOjEEyIwY2vkwN1luoAbyWQrNx9qIfNH0c /DTA== 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=QafmgbriflDoZckEsWmBvRP9dqWRhbWXJvx5leo6fWE=; b=vP4esVW95zXyInpvox462+mbYIPvOFyaZUagV87oKyy69//z5ChiC15dsFZRXVLQRG TUhbJHTvfTyYoE2djwD9UmMLrg6kB+XGbCRziC/wFlXjfIXzJGTfuc2+wjl9Y6sXauv0 0rZBUAHKy6kOi3sWTVa1rI1R1F7QN4kN33V+3/8GCv/P1jRYorwfk0kcAIAJCv5uQmAx 1/FO6WmqFxz0E4Nst6WhDgbQ8Ctc0ctgWE2/vaMx2+wD5z1oaptCsFhjPl/Wz9TVxvaH fbr358r1HYVMzrrpURgcG3JlNYOuRu/8Lvn3FYQPniHCXGBL3f7lhAYtSFWs+J5Y0ZKF PXtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=G9GmkIyM; 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 f89sor24622947plb.5.2019.07.16.04.59.21 for (Google Transport Security); Tue, 16 Jul 2019 04:59: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:a17:902:8c98:: with SMTP id t24mr35697603plo.320.1563278361602; Tue, 16 Jul 2019 04:59:21 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:21 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 24/57] ram: rk3399: Don't wait for PLL lock in lpddr4 Date: Tue, 16 Jul 2019 17:27:12 +0530 Message-Id: <20190716115745.12585-25-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=G9GmkIyM; 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 no need to wait explicitly during pctl config. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen Reviewed-by: Kever Yang --- 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 88fbfa440d..023838a301 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -570,16 +570,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 (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 Jul 16 11:57: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: 774 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 C29C33F08F for ; Tue, 16 Jul 2019 13:59:26 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id x19sf12507324pgx.1 for ; Tue, 16 Jul 2019 04:59:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278365; cv=pass; d=google.com; s=arc-20160816; b=RDK1l6JZmp8YqlGc6PBVhyY//FTlRF3b8tDECJNSGUxtkLACrFyUkshXSy/XPjJTOK 7DaIkUPa4ILlCrPk9PGQhJFmPMlpkYKt+m5vuI1JQSNfJTAm5Rpo6pN8nD49h/yTKjel cLc8F7+xI2o0qHt5ZS5LG19rWzQDSu6V9/Xh6Sc1tnXhtaAbeutGG4SM9U0k66DWMS03 yS8Os+EHuBEZkY2Rqxj3E0fAjCUriBa3UJFqdj4NJ3h+huUkwRRUDflv/TEi8AeRLYxL uB0IjM1GpdQJ7rXRgEWAI9dOcDvNQkSJPFv+CFfSdRO5XsBNvB9zSKa5k+DwsSpg1rYA TB/w== 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=dJnqJCgfaLixGC0xWqtu4uSdJPBFd1shXOEOGwgrnew=; b=SyRhFN8Ly7PZ75Ecy3uU5jIv0jgCrDGbmkP13AaSOndLtCb/9ahljWXzcnm/XOkU41 R4e1U5+dCtd59n30dUj4KdnHrySpNjtXMujqGVeoy3QJUuGLa85Y4g+VO9Ti2vyEKzB6 PiWli+DbjVvhsDopUqr3bZgXqLp4GqkP0C6P0c6K/W3R0edEoi0n1xNJTuX//lBjV15R FT4cBsu/ZqBpVsDGT8/xO48IEvB96t6lotHstdv2JBrF1j+CfcFsYQtYuR7MUJcowT4o 1V/vGv8lCBAuxT1U0bSA4tpTmoheq7NJFbx8M5gWWGzHMmOnmTuf/soKb+VkOzDkf5hv OOTw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=A0wocJqo; 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=dJnqJCgfaLixGC0xWqtu4uSdJPBFd1shXOEOGwgrnew=; b=UuhIcqSnsjqmXwexSlIIcV2iTk2bzJg2LbR5hWkrUazyNGMDc7MuRfuNxjExJRPJzj G1Fv1C1Jq6rKSJsoLrqG6Fv47JUDwY0s9XzNG9ICyQqdhJ4+BU9Jl0f+Cq297q324azr X4LNdn5t8EzuI53CTIvcOUwhdgVixdsHXfxpA= 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=dJnqJCgfaLixGC0xWqtu4uSdJPBFd1shXOEOGwgrnew=; b=TT82nWCEf+QfZiNG2u+bBFnG4mNgauWpkYnGgDcO19YjmfIQHvLsVfEQl/hUUBK9T0 weSPtOA5CvEo1PeKPjM9cX6TH3Rhnz70m3WPAft04H9uEjJPkB7GbQQC+bwar/hcqqnw tfoWpWFjxhvXLp/wvOTqIav+Bu8tWO4GUJNBdMMnt2mM6tDhoV2PhmPyPaoITGp7xu6J 0fyg4xgWGd7hvM2xbh7+9cXhgrh3mWWWFggMFsUmIIu+QgRlRQp+a6RUb6sNheVm5apk QMzNM4nlLjVBMDtZbedQ6a+kNdps6Tpn9/gwF2IRQo/CeF93EZLGx62luF9RNNyCBXzW Uc/A== X-Gm-Message-State: APjAAAUJ8oaHjc2zmnm9AO5R//w09AE/0oilDQVFWPf9UWvrbgTUH0jB BXGcBR9Bxal2JJduiRkR0BkqNk5E X-Google-Smtp-Source: APXvYqxaM9IhIQqzBFpp9ql3oRb3p2wc6ueGHkPf/xa83lLf9ncD7dPyhzk6/SelUFO2RQRxtZZrGA== X-Received: by 2002:a17:902:9689:: with SMTP id n9mr35239230plp.241.1563278365612; Tue, 16 Jul 2019 04:59:25 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3662:: with SMTP id s89ls7081990pjb.1.canary-gmail; Tue, 16 Jul 2019 04:59:25 -0700 (PDT) X-Received: by 2002:a17:902:2a69:: with SMTP id i96mr34458404plb.108.1563278365351; Tue, 16 Jul 2019 04:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278365; cv=none; d=google.com; s=arc-20160816; b=VT86XFaKXU1JXcxVbrdRWZaX0c9YXEr+EurxHZAlWesH835grYxBpCIyoRom1IzoM3 s1jPsjbTb0meGECsN36+MlkJrEraPKLXl72NOTZz+8hcpHU8Z8JcSCbYk3cEbxYF2yMl 1r4xFZjOl91KPp9Z1fjl80hxT30e47rt+vrwmr+O/We8C6cinIYGpXMx9zf1t3v47hnf LzVpiHa7neFM6oaOspTDM/QDwSFwciAIyjMFdkkuMBqByyucR1/5MSR97RqtWh3GqGFy YBCdJgkLIQs67RtMPiHInpi0nfNdG1B1M7ZpXEvs72sHSttIIkB4lNU+MUvBcYNm3p2h 3CfA== 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=Ytkg3u87YIDa47ShbV1haeOc0wg13Q/l2pqMvwhDtcY=; b=URewa6B65/1DCGgrrKE3Ff2oP5SeOIYC/bVH5/v8MxHYCNRRYkLZjXHWR53ATQlw9M tLlVAk/Y2nX5IsvnwX2T43svY9mbllDKRGEn199az4mhnmpg+8JissILRWwwp6IvES20 k07C2n/MrcXUtieX9JTgn46h1sS7sOA1ZqqV9Qbx9T5FcP6rH46m2vbbsX3mIx4x2Lwu c98BtUyMF5CInJqf4S9SaoymaRi+ZFEaWkNDu0onen9i5B5ZrfjyA+GP340em8ozJIMY 4Lcttq3sTF6PaimBR5Fq2PcBXmsdDWFUbBp89suqMc7GrVVfkBCZAmYW2+zZ1faRyMyf w2NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=A0wocJqo; 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 j2sor24298229pll.35.2019.07.16.04.59.25 for (Google Transport Security); Tue, 16 Jul 2019 04:59:25 -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:54f:: with SMTP id 73mr34128376plf.246.1563278365055; Tue, 16 Jul 2019 04:59:25 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:24 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 25/57] ram: rk3399: Avoid two channel ZQ Cal Start at the same time Date: Tue, 16 Jul 2019 17:27:13 +0530 Message-Id: <20190716115745.12585-26-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=A0wocJqo; 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 Reviewed-by: Kever Yang --- 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 023838a301..beb4f6de54 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -550,6 +550,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 (params->base.dramtype == LPDDR4 && channel == 1) { + tmp = ((params->base.ddr_freq * MHz + 999) / 1000); + tmp1 = readl(&denali_ctl[14]); + writel(tmp + tmp1, &denali_ctl[14]); + } + copy_to_reg(denali_pi, ¶ms->pi_regs.denali_pi[0], sizeof(struct rk3399_ddr_pi_regs)); From patchwork Tue Jul 16 11:57: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: 775 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 844A03F08F for ; Tue, 16 Jul 2019 13:59:30 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id w5sf12495022pgs.5 for ; Tue, 16 Jul 2019 04:59:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278369; cv=pass; d=google.com; s=arc-20160816; b=CKnLhRSz4SbsovhoN67qVtt1LBebpN5M+mktHSWPsyRVEUU6EgfROaa96+ekgHcGkc IVsjqEWEnVDNVR1gTVzBFyh2dtpCoCmoBqizczPLdSE3+5xPhhFabigvt2Cp3DOLReLd fjgZTxDVcE8FPYKIA3MsSX/qglrjXeC//Md5cgDiLsM9cNnbhCILF3XSklbS/mBmPUT1 M/wfgTplHPThT9xxxC1ghS6e1CblEaoeiu7A1Fm77lMlFSI81Olvpoti/NfWp+eaDwFY t7cGjIaV+eB0hErIGPBOYgbXrYd7aLhsNoNb0EKRsULZGgDbp5yYGo5W2/AGGg87RBCT 1QwQ== 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=R4GRoo3Upq+rvmJl3xxpBjTkZJqPIqPiQtazy/mxx5c=; b=ys15UQyLZUuASvSsP7J0BNWfdgF6WvyrkeTJvqiGYRMrUEyrFZvfyFfFzdTEULLnpF q6BNtb3POpykaH5PW6mzHSJ7KabRQITnk5A7QB0K2iIwn+fHQ0h242Z3XH7Fq3ZWR0pU +WvooQF78mnQ0uGokqaCeHb49aproxO78pX688hUlYXdlHWrsn4Q4nWNjBcRQYM29eSf NNlwZK9oC7jjMrW/zQ8aPT9g6xiRj6BffwjbiaNXD4/r1Byk5lGABHI98FkKlZ5hqPX1 EUUZDJxH3VtnkYr2WoTcVXKXDUe4AWPSZIA0PxV7U2NGrwD6ZS8JcGMgqDsLWArNpgS9 7k1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OMtEuoLB; 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=R4GRoo3Upq+rvmJl3xxpBjTkZJqPIqPiQtazy/mxx5c=; b=jlxbmF0aqf8FtyQI7mTmhH+0ZeOzZZMR81O6XThn+yMFQMxheQfnUvCu/25s92Mtgn p4UUqCyOozPI+ufwCq1yzdh44NtvG3DrGfPTl6aMmHPs0OC/7gdhd7cw8mvg9LWNhLs3 6eLLfHDEuaoxqLWnrnoJ6OIAWQTIbQDhfwi9E= 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=R4GRoo3Upq+rvmJl3xxpBjTkZJqPIqPiQtazy/mxx5c=; b=USjmq+MNrwWT9JwmomeJus2DpINM8k1JdtuwAQWv9D2NkZBExZY0ZUndJ88Z50koam CC9XYd5Ps87+qBMg7uiKk24Q/DWAHsr05pm43Jb5QaiiA36JkAzwlWBodCf7DLyeOkSh +9V83BcI54gCmiFauiDw5CIrgfjl5LEbaUdLdb9n7iM2VdoYQuushfmSCauYVpoNHQab xIYbyFXZ58JWpablDZKiJ+sv+8ZoGFRvrPXV6VJ+gLfHcB2ZEsyCsG3YFtapMu+GsJr2 AUkF6lmthGT+00AHL/bSJbAu+dO9bXjRbssSpWdsRpQRWjYQesVyg4SsXNUliLJi5ACa PxRg== X-Gm-Message-State: APjAAAUiaL79HCKtjsiW1fJpPeMg2d+Pg+9gPuwYLExB7oqNIv+QR5C9 kpU7bmaYhE/sTIlznJ+4Rayq/nkO X-Google-Smtp-Source: APXvYqwbpAxE6h/+PcM04KT7+R/MkcIIMJkOiM+m35QKtBc90kRBrgq3Ynl701qg0qbcuKfTStLQfA== X-Received: by 2002:a17:902:8509:: with SMTP id bj9mr35071638plb.79.1563278369384; Tue, 16 Jul 2019 04:59:29 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:680d:: with SMTP id h13ls3344311plk.13.gmail; Tue, 16 Jul 2019 04:59:29 -0700 (PDT) X-Received: by 2002:a17:90a:5288:: with SMTP id w8mr35894107pjh.61.1563278369057; Tue, 16 Jul 2019 04:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278369; cv=none; d=google.com; s=arc-20160816; b=enR8PgG6YF3+hEfZPMgTIukkNRkhrw1cGBluKM0f0cyZWn2sfltf0nWnDWrHtGYC1Q 1kMQ+Ulfp0lU+RICLUSZqiaY4NLBb2pgTZ1wSY/uxG8+xqu+RhTV5J9AIw7NWnJ4GAMM BCuHbeIfJCWD+ilVkwp6EImyGHZ2qNvF19YW42segtwZuaPOmwFYs2kJSAyiHuaqTAac T4710njF/7mOZoQqi1eQ3FypdqiF5ooFlaT4Nqh2HpTRUE0hAdBuF5K3pyOmPR0xJ+Z6 Qc6xFmIOkl5OdHecU7pIByaevqmdB6pQGZ8Kw4jpnvFcMOJyOeqXCfCx4u0AR59qQUFt GMpg== 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=uqu7PB29bSdtqH47pAusxbjypIHUbAZ//ch+/8e+yqE=; b=QqQ5fFm9rFQA4sf+Qn9fK3S9N3X6WVhie11GgKPpcPZk8HUfbUrag/Emo1Xo62a8av 5CgLZnV6vi2m0+8bVpQ4QCjTzBqa6CLio2hOi/whMLQH98gUVjoiW/qrLWZIPq2Cjdjf gSwZxDJN7kB4PlMiHCZ4mbaV1+9duOHnijO3yEUgrwkFBltzXTUNHyaDEShg4qIi9Gg8 kpFOZTzXHU2uwP+OXQ8McJBTH5gV8d2x25hVhIudbnpggUpMdLvi64vc3jm6dJgor5dA 8hbJaaLqWQMFyiWN0i68NJV5lMe47f0ntj2ec2m5A00+aRNgbeWk3ORhWAkeUhPb0tBR qpDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OMtEuoLB; 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 r39sor24694373pld.65.2019.07.16.04.59.29 for (Google Transport Security); Tue, 16 Jul 2019 04:59:29 -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:2506:: with SMTP id j6mr36804665pje.129.1563278368728; Tue, 16 Jul 2019 04:59:28 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:28 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 26/57] ram: rk3399: Configure PHY_898, PHY_919 for lpddr4 Date: Tue, 16 Jul 2019 17:27:14 +0530 Message-Id: <20190716115745.12585-27-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=OMtEuoLB; 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 Reviewed-by: Kever Yang --- 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 beb4f6de54..7625506458 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -574,6 +574,11 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, writel(params->phy_regs.denali_phy[911], &denali_phy[911]); writel(params->phy_regs.denali_phy[912], &denali_phy[912]); + if (IS_ENABLED(CONFIG_RAM_RK3399_LPDDR4)) { + writel(params->phy_regs.denali_phy[898], &denali_phy[898]); + writel(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 Jul 16 11:57: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: 776 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 063A13F08F for ; Tue, 16 Jul 2019 13:59:34 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id 30sf12479494pgk.16 for ; Tue, 16 Jul 2019 04:59:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278372; cv=pass; d=google.com; s=arc-20160816; b=mWV8/B7RGCup5JujWq2GGbUoO0aiyY4TQYwDFQ95ZF8MuD7+ILyM140++m+GCP+pm9 5ZrR7/KhSNi55EFEI4W0B7KI8CLQvBB7U3R5gxeAhpPUvSYdBsAL19mFi8LP+FQbqRTt JwxzGymDNCWVubiczo7JItF7IIif/GFWrdvIWHZEI0jA33Qh9pka/wQzBk4ehv+PP7Vd xBsHwOBZpIUkna+N86Bb0RuCA+BQT3fK0iunFStofpAhRD40wWUXdupJqJyqoqV7mecl k4pLQNujb/TR8UtSMCm/2M5LPDmtvtUAGt1ZYu2SgrqGKFqiTBSVASYYYJMkl+rE5E38 fXFw== 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=8dit06MLkVsRKgKg2kiSs+NSoas1cap81DcQzcwlU6Y=; b=Ab+/OYa0JWerux242WTJlmhLLvy5y4aeaSpDU0noEocOxdGFi0ho7q6R2kU6VdKUum ctw9oXYrJOKFz9hvJkDnblXDlhHalc1/cb4DJ+V4W3vtCZC0P3WK5RmOx58FbppLwn0E Mif/3zZ9jXlksRQAeK7s31V+y3tgMnjE3/XU5meTCGSG4Lm/tsBJjLBQdhCQyp5M+xT8 KkaSzzCxBjdkp4IZq/pkzQh+zrfLzsXt8OnMCg5sJ30wjytFUCG0LiUcVAQfsJGUKIDe JJKSI8PwV0nigSquUXHVr3WDf7s/YPAZwS9FZMt9jGHAiURVO8gzFL0fHcTMY5gC+4El YIeg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=phtH2Y5z; 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=8dit06MLkVsRKgKg2kiSs+NSoas1cap81DcQzcwlU6Y=; b=MZS8SVmCe9s0m6QQGMiep33c/NnC2hvtpuRJu5KeWH3ztnL+lA0Fonk5aLR3j5feWn F9Hchf0pBSvcX5lF3SmxT7ErFEMoy9BE8jYhGYjrNDI9/Xk/x5+ojpmdMSWMk85GYZnO 4aqyZmjIy+J5P7zqauiVV+87mRBdn/b4CqzBA= 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=8dit06MLkVsRKgKg2kiSs+NSoas1cap81DcQzcwlU6Y=; b=lfvb3jtF08XG2LaR74tEJwMO1W5r3zZldCRxI0q/okq3Mf1Rt82lRZHZWeb8R9tROT HDvs7J+chTFP3SZ21X9jcVk6rGf9Gj1JaA3+U1RTp+Q7cDmnAOsnZ4XEmHY1vXWPVPE4 GedMjoO5Y4SZTd/xiavoOH9QUASbcxYnckK6OI5jfvpPc5RTyzqcc7f8lTqQ0bYU46dg 0TcFvgd+iDGlyk9pJIVNikDcmBJDJ+xr3aMDCUU1AcL6kqlbbJPxh99Hzt0M9/6K9C5d N6WwXPgdxdbXSM/SHbEqmifzriMJ81+pibxpPafTu7Xhl0C/l2DZy0XR/msZNfR8EljE VT1A== X-Gm-Message-State: APjAAAUGyC1BJoqX/m2P6z1EhASENPXwTj2S2OUR0KAAD8makUOBtt7o XnNOE5m6p2uEyKvNMqsXcPOaWsMO X-Google-Smtp-Source: APXvYqzP7g2qY9fff4tH8oyfLJ4uhoSY8rG2Mto3CtRIufaUlWMHKOb4ZAwvoOB7uTkxriKwxCqq1A== X-Received: by 2002:a17:90a:19d:: with SMTP id 29mr36443033pjc.71.1563278372875; Tue, 16 Jul 2019 04:59:32 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9684:: with SMTP id n4ls5474546plp.2.gmail; Tue, 16 Jul 2019 04:59:32 -0700 (PDT) X-Received: by 2002:a17:90a:3225:: with SMTP id k34mr35244428pjb.31.1563278372617; Tue, 16 Jul 2019 04:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278372; cv=none; d=google.com; s=arc-20160816; b=WpEE+XyOC/bCjRymoj7y6MukVnG8z3+Du+0EXOapjMSAEt8gzxDLkHdzdzutDZKAnv boJsmExZ0DCnC0oFHPAhsnv6erfDS6mh3eKaOz+HJzKLB/noTMenqxysn1TT2u77u2wo 94RLNfahKMOgY/IH1mYyP+cWDvnaKK/Z5uSGRhRQRgsXGj78OGndtQyK3JvpjBqqWbwb iy5m2MP2aO1f+vD7gFiSKJDlOmal9ETYJMOLPEpZY0ih/b9WGof9/1W6iM9/fd3TMRuh zf1KazLxhrmrww/DN2/9MXHN0AaZD1dh9JCjLtIXI+6mHlJKg0IBeuSJZZAiSxCVO/Bq 0quw== 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=ZHqXR/rfvXNWUhdf9JppdKSegbEAyVwI+s7vLkLDNcY=; b=SqntUptCpgcGC1q6fBF4M/3Sur5pGWxoowofQTf1cWMw5jlCueSyWI3/shoJ598aDM PcjKdx90vS1MxMOgkfkiRjox4jDguxZtB4YCqGBSaD1vCt61SEqvVZTGN8iBrntEisY+ yTo4r+6oYO4H2Sq+YfmtgcqINq9wdKKqOD5tcNV81bM3fFRiVVP2RSd/d2fyoNS88PSF JZIXumQlJfigH3P7Fe9M01oDfFuVI7zTTAu/PXWrebLyczlOg4ESE9O8a9Sx5XmhJKBC Lzz0rmpqCW0b4SFGSiRFrSbGfiNt3swvPLro9bV6E27TPKik0U6Bj0K3XPDjh52H6MW6 v+rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=phtH2Y5z; 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 x18sor10336829pgh.47.2019.07.16.04.59.32 for (Google Transport Security); Tue, 16 Jul 2019 04:59: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:a65:500a:: with SMTP id f10mr2100018pgo.105.1563278372279; Tue, 16 Jul 2019 04:59:32 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:31 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 27/57] ram: rk3399: Configure BOOSTP_EN, BOOSTN_EN for lpddr4 Date: Tue, 16 Jul 2019 17:27:15 +0530 Message-Id: <20190716115745.12585-28-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=phtH2Y5z; 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 Reviewed-by: Kever Yang --- 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 7625506458..a9e092c39f 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)) | \ @@ -312,6 +315,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 (IS_ENABLED(CONFIG_RAM_RK3399_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 (params->base.ddr_freq < 400) speed = 0x0; From patchwork Tue Jul 16 11:57: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: 777 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 DC8FF3F08F for ; Tue, 16 Jul 2019 13:59:37 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id h3sf12479404pgc.19 for ; Tue, 16 Jul 2019 04:59:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278376; cv=pass; d=google.com; s=arc-20160816; b=GSOUagflq5HJgZLVLnplXvmwNb2nv7LNaUMzHcVLz7J8xijxZ/P4bJA29G7X/6IQsk 9gCa2r3aVf5GOvTJJO5yAzAfMRFR1CI9C5D2D8/beFRMf1TtaziTQiExy1EzhgRAnEDL VMIwiHB03c0g1wV4ih339OTua22rwRdOoEULc2ipcAqchQzpY5bYcKEQ+f7iL4LVm8PJ fj7i8DJvgeYSC8CrbE4P9l7wHO0lBGjH6CKOB0XoYGmjsF4C9O/NfrYhJmwa7Bv4GnGf WBSM3kMmGRKpGTlYePOKWRzTk0C9Hc7W8+MA2U86KdxEDp3az8p9fGFnCG9yOfODz4Bc BkWQ== 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=b7917kqYcgsYYZgjebbliYP7U+HLy7qXz6yVLNZLwb8=; b=sFEMQE7jzWZP8Aqh8U6Ta917P+LjomaVOTDRxzXc2Xq8xQ53TnZoTG/uUJ18U0WitC I2sq0yx/vJEto/QtgfSRfdQRqIhK4CSda9mXSy+mW+DmLTKrf6FNOjw+mpWhH4oobxEM jnBo/BAnYEo3e2lpogrLBdcpQMAwVNaDUgkTE9N0BswsWzfVPWPSBjCtcNjqqemNxv4S Vz0hFGneMxSzpPY3IqmwxnFIVvAg3sCRuoZUw/yoj8aa/QdDNGP5QTTFlUCGIcmnYmY3 t9j2oCsCYBSsUhS/xiYiTomG+WjOxWiANE2Bb9VOiGXX4RciaBZJsw5TY0u+ORQ9nlCN Ohpg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=l9YG59UT; 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=b7917kqYcgsYYZgjebbliYP7U+HLy7qXz6yVLNZLwb8=; b=IqpQxKMPzn/q58XhRk++k0sLPUZsR8L/TLqtAsKjeAlIOdchRULraPB6Fv7O6ixtnx WqXpVcnELgNjo1ADjs/GRt/7xgzpnGqHYeq+/aNfChV/bCJwkbr+2olR9uHegxjs7hf/ yrPQs3ry5wRL4jCkft/Bbngl4GJOukEbNFu8I= 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=b7917kqYcgsYYZgjebbliYP7U+HLy7qXz6yVLNZLwb8=; b=QIMInN7VKwwp+uFIt2I9Tm1rYJKed3vsl1BaMzLvIzAWjp199Iq8nF7oSSLd/lUOdd Z1xyWOM6BwjljTWckty+5k5nDsudD5S2cEIQOJ7ExMhi1az9lg9Nkk15AO5GN/SFcXrS 0/Iypn8dAMExazOnf1PkFV3gfEAHcuV6s3eBLYJuyRl4MLZIjN3YLCX/X00gjee+h7sG inzCVDMyK9YUiOLUhsdoUjLNoDcekleil25dTRIYGc+15UCgLus/gQuk2JMGEa+z1zjp HoLFbqGQqkr3TKV+fFmqN0di7C5+agZvfkShu5u01lUiEW6UkXUJBQtGeJBNJFZi0qki fHnw== X-Gm-Message-State: APjAAAWMooM52bCXrRqo7rmpV62HsYgQmGD7eSYbhGT80DF+CuC2PT/F hm3Xww24wAuyCZ3Mj6rJMWWsWQvI X-Google-Smtp-Source: APXvYqxnWNDmKB/3W6TILJtZ0nMNrsh4TCoNW6JmrL9SJL2lPKxbiGy4H9w3uITZ3Zq8UKrFblVoaA== X-Received: by 2002:a17:902:b20d:: with SMTP id t13mr33091779plr.229.1563278376735; Tue, 16 Jul 2019 04:59:36 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:ce4e:: with SMTP id y75ls3475852pfg.11.gmail; Tue, 16 Jul 2019 04:59:36 -0700 (PDT) X-Received: by 2002:a65:5304:: with SMTP id m4mr32757153pgq.126.1563278376289; Tue, 16 Jul 2019 04:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278376; cv=none; d=google.com; s=arc-20160816; b=rUIHMDOKFjJMN6I8kiByq1gfjXxpke++Wvu9kkdYc7Xwxq+tx993Ts5hT+e0nV7A/R x3idUmv2I73HxqeAxfRlGg07EZHHAQm+OfIp+457k8KJtVeIyZ5R2foFhlp5S7WX85nt y3HyDLNmo8FMOosG7FD6/9BtcUORIgPP5uFJ19Pk4bH9yGdNpTp3I6+1C08Mom0WlC+4 5oMlt+nZv6PCAMaktqT2kQngVJ3CyqU2nYnbK7FSGqi0VujUvhVxPWUE7Xs6WX7w5kjB m6Bvh1/jTBEkRkDuccQ7GUE3HBSD4iqKqBo5/HXbQfTGV+Rwc/pynRTlfzekAss4ccLC TDwg== 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=Rbj7gTTpO1vnkKzf5lTMy85sQ0s2pKEpNhM65tgL3dY=; b=t+9aDWXq2GtiqgcJb1yjOpGNDGwc1FRvX8II+S8lAc72I/t2fT8Zimvd3rYLvInsrF gLDRXYIuEzA6Sbwwmyp4SGcL4HhfIlHyxtbI7CxKD1ASQ2JneMXjeGnL/lteehS1Ierf aCy2BWyJcQF32Gv9GeMqAiORHN2MKryv6JPf5Tt4QKtwvIRs+B6n2GszJoG8I5cC4gw8 PhwRfAxgL24rjN29Z1F2gLMD2qSnDTSJ8NXOju8VhBX0QyEquAN+4ztvw95plxHvyddw B3OJ4v1/PyZbzyt4cFmgc+samfg9A8EE1eIRvlnSHabQCisj/O3n/K/R6Rm332Tafcfc ICzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=l9YG59UT; 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 g5sor6280744pgs.55.2019.07.16.04.59.36 for (Google Transport Security); Tue, 16 Jul 2019 04:59:36 -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:d755:: with SMTP id w21mr33333475pgi.311.1563278375831; Tue, 16 Jul 2019 04:59:35 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:35 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 28/57] ram: rk3399: Configure SLEWP_EN, SLEWN_EN for lpddr4 Date: Tue, 16 Jul 2019 17:27:16 +0530 Message-Id: <20190716115745.12585-29-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=l9YG59UT; 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 Reviewed-by: Kever Yang --- 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 a9e092c39f..c02f936f2a 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))) @@ -334,6 +336,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 Jul 16 11:57: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: 778 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 5D23C3F08F for ; Tue, 16 Jul 2019 13:59:41 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id x10sf12224090pfa.23 for ; Tue, 16 Jul 2019 04:59:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278380; cv=pass; d=google.com; s=arc-20160816; b=EAjk+PuFvo9KmseQ36NcNacMGhPgPhf4u4TFAR/SzdDe7g5Q+aUb40FZ7e+Q4uqTmg Zx9Kx4ZjDHauY/q0oGKv+35mAkNxSftVOZ2qEGUoHvTVAcBQqtmQI668qJ/ShePkiPeb f/9F26AJ2BtZ2i7lP8VATEooENvkz1Rp0e+o9C9UtN6mZ26BQRHGaVkCmUUNpI8hDELz Qa7uXD1Vupi0BlF07Uwr832y6/mpKS6JHBpnSZa3hGZxPJu+uY4RiqViL6rF74sddU1n q8cIAv+g6eQ69pg7owasi7Cijs6W2L1TWAUqqjucAHKWx/S5sb+4Bo60N8kWQlKrvh/E jPiw== 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=/0WHYrOvNPom82yif4YUtVg0eK8LadM8nqNfKHagPLs=; b=gHmhJncuMBCM/Q5Q0D9aNY+M9d0/We+eqdyGI+RKkdFFPKLZi5gyn22jx4MEfoN1qb KjGFtseL8yGXwEUjJ43542UrQs/ErnpwihxLfna0LY+ls4xljXcm0SdDbO/bHkN/39L3 ZbeKcdIC619yQRjLSXb5b3NO6KRiRYZ37asT1YA0cGGSwr6KO3vtAMQr3bPgLdwxJN51 T30tjlhJMn4EA6nwnuwozT5SPgPMiwiInHuhW7VOW23jV1rEaKUp5/Zz2cDPgftTBN8T 5uRgBvhWGII/QJNBTl/Z5473s+if8tFZXreaS2buSYxSOIJ8GdYXkNBJmUz35GeYStBA 0fTQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Itj3aDGO; 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=/0WHYrOvNPom82yif4YUtVg0eK8LadM8nqNfKHagPLs=; b=auACvZvrlAfBZCG5XoQVfW8Atbcs2zzuKSUitiBwXUan2IqTlnkUslnfKzhovg8SIw 8H2rG6vcGkT8xPx0/t5q3Q4qVIX7uRQSa4tfb19e9FAKNCMK+9Sgjdqx2pDlr2rIJKt6 /NgxXRS/Mzadc95vjC4CU9IX2mmUMyDLhyWJ8= 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=/0WHYrOvNPom82yif4YUtVg0eK8LadM8nqNfKHagPLs=; b=JOASExDvjh2UpAjRmw66AUXFNcXsWyoCPj05BXsmFeQVPBbniTqPDopeBIHgWPrRb+ lsG/rri3UK+poHXXmNtBnR2j148O/C5qyVb/vYqlmpY3bXzlZOZT3s1JX406fWNGlpye V5ybfG5FjaGnDIRshHKEbQL7gcAfoxjo44OBL/O9SaIg/+l85PSniFmGXlfDkld9F6NO uPPfqyGNVVFryotRxOt5WtvGccUvXAFHVEIslvqwmD9SHDFuiFohzQOrC9kcEuGeK3a3 LTyL1UnBDKVW7lu8ewPZPgT2/IlJKy6ruC0P/SynPm44C8itauJemCzXbpZ6jZePuLG+ RDtw== X-Gm-Message-State: APjAAAVWCRsjiu8VVyRJy/6RIqqCJeJnn7UqqaTDxVUhdZJgCrxbofvC GbQIxZf2kvFBCmRkHABloSRdWfTr X-Google-Smtp-Source: APXvYqzwu46w8ODI7U6ePwOI3SxzpcOWKoZNNRHDKoZUwi0GbHNET68aUUb+O+H3+M4ZfXlub3aEpA== X-Received: by 2002:a17:90a:b387:: with SMTP id e7mr36871099pjr.113.1563278380148; Tue, 16 Jul 2019 04:59:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:740a:: with SMTP id g10ls5467126pll.0.gmail; Tue, 16 Jul 2019 04:59:39 -0700 (PDT) X-Received: by 2002:a17:902:e58b:: with SMTP id cl11mr33951466plb.24.1563278379841; Tue, 16 Jul 2019 04:59:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278379; cv=none; d=google.com; s=arc-20160816; b=UHLwMgR9RuoO/38qIlsHpmdc8JvqDmb1IudiqnnHBrbtjCzPeQxpchSl73QNyK9KFK pSdi0ANfkF14okUadFgD8MLK5Zsc7bShd5gZ863PzeGW/5fRUd7yB5ek7y0/7ol2FfMn sIrhCZREAmT+zsA2IAdHe+QTkVsQLqD/m+5Ec5S0Oh7H+xs5qXRLDRnHyXVqSCSC89Jq oAq9dUVuZhnGfr/o28Rao46cRawHoKg3whY+vAI/kdpmYazg0qMezWv7fUqhiwbgFfTS XExoeACgFfmYhHY1UL/IV1AOOQmIpnKjyx7jnNvwU1o/hHEu+r1TvyEozvQrv1R2i/Dp SocA== 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=RoiJzXN2kGueDRn1Z7nVcE+ruU+rxsmtLatjH9HI/xo=; b=AhZDgIwx43Qfww7K8HVDMdvjNWmMJut2lwEfFENpVVfIZPxXs5gxqkmZKAkf7Vyn15 Tf2pEZmS7UfoGj63eAK9INkoj4Q8qpF1cYkOEqYWwefxH59uLVZVyxAlRWD9o6SfvYGn kP3/uN45rqEym17azMOdZvi5NeZfrnpgvzqe2RqLuVfDHPD2ifLBPE25d7VDtwKSS1cu O67hFkl1cMONK7H1EuiB4HsxJUnz4IVDWTju/8zfxBZAk0XrMY6tCzYGrkHyALMFUBCX uUQTbvdCrE1WW8PhB9R1q+3cp9r8HyiEfWTowZPGwtK5nduR+dgJ6R+NXTN/ejF7oR6j yjaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Itj3aDGO; 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 196sor10345226pgg.26.2019.07.16.04.59.39 for (Google Transport Security); Tue, 16 Jul 2019 04:59: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:2606:: with SMTP id m6mr32924627pgm.436.1563278379515; Tue, 16 Jul 2019 04:59:39 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:39 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 29/57] ram: rk3399: Configure PHY RX_CM_INPUT for lpddr4 Date: Tue, 16 Jul 2019 17:27:17 +0530 Message-Id: <20190716115745.12585-30-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=Itj3aDGO; 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 Reviewed-by: Kever Yang --- 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 c02f936f2a..2ab10da53f 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))) @@ -384,6 +385,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 (IS_ENABLED(CONFIG_RAM_RK3399_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 Jul 16 11:57: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: 779 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 CCA663F08F for ; Tue, 16 Jul 2019 13:59:44 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id o6sf10057974plk.23 for ; Tue, 16 Jul 2019 04:59:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278383; cv=pass; d=google.com; s=arc-20160816; b=QrHr4oYW2uAZ1ZzdjsI0gGFgbLtpDoPlUFbs6M0N/H+L1H58mmjWD/rO+rxjx1sJe0 OfcJ5HhV5dmimGqPAk9EG3pZ5vu8PsquVE2XH55YIfOLjAjgloM3/GA3wlIxiLrnN+dJ 9ucEl58XfuapXaIsm5KPDMM9ZLSJjS2qaG1xbNfc6+Y6vaoAlbsdDmVolFZbY4hpBkon hrLF1uogaQEe5hc1LvQQ/XVG1PX3zvD/+0ijC1QOJroJeW4o3wce5dpWJfjXG9D7zrbZ RjLhQ7zwO2/xOa18FFeVzMtLq5MaYVeGeIogk661fH5hGYChAdv3gMkERtNIvPua/S2n hu9Q== 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=CbtwC8bD/FPXFOmPbHqV+EEfmyHcIPKQ0r+kr7UfG5g=; b=SgaRyqiUHQ+ZJTyvSQDUMwS4hy8VF4YKQRUWEHTOoV2PDZbAw1t+e9Mi1t27mlFuM4 oMHfmU9b+AdttKBLU3FfS/8gV5Z1vQfBZ8LA5zP1yJqtIP9TmN6mMg51xLoHrQd3xFWg s/Yv3VRfn07ca9AoYL3TZ0sD4prLjxvNzNjXmQw9iV865isWDuW0B0XuzK6Dod00kXxR vPzHK+lBKdEi01uaoAj5AG3q3x3vOtZEydRbeIwhUVBH/+o4WjHNvdBqKCbVsmV4u74f rOoucwowd5NCOTbVJz9bawCPN2RcWBdejq5MpeyQq9mvLv21/Uyzdx3vq/+8a1PsOd+p vxtw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TDMpdvzh; 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=CbtwC8bD/FPXFOmPbHqV+EEfmyHcIPKQ0r+kr7UfG5g=; b=i0+UopQBAmBFGUE2InWedmu53AFxjb30LjvEvzJQhq7uEzcYzZmA2aFzKK8NWRcWzJ +Wdik2WiAQznXrMdHxgbyOfrEYYRHVcl4FGPQHB+al8hnYFHyCEftyvStx9b+oB11XSX 7iTmBhkJYN9CF+d6LVZhVmmTo4TqseyhH1RJI= 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=CbtwC8bD/FPXFOmPbHqV+EEfmyHcIPKQ0r+kr7UfG5g=; b=jkqF6DIra6SJaRP1f6w0CY55e/lvrqtOxJ4bgzHHWb3oSIa7GqgCZRRt1kYT68zOqD Ls4YVF+wCc0NBygjz3GQX16qfbFWFoM0j51scJ7MdkQSjanXJjWJYUyC4SXJeGon3Du3 +9fJn8QpJIrb0qfyIbYcSPx2Aui9Nn3U2wbLeRu+3EggipNDLa5xK1FASIe2p5fsUOLu 0fTOmm3741e5nVS8seC8ll80Gpq9M0zx1LjAdWzv2XVGWZQ1UhP1iNbR3GykI+fRG1Io HbDV9z8N8SHdNO87xAhWTCvBaCZ3reQzJK/Fj3QTFGXIy73Vsw2PQraV750PR/o0X42F BboQ== X-Gm-Message-State: APjAAAVsUFvpE1euqeFI+9bUtJBEeHhatnt0APWZCANsrvbsGvAlI3ye MgIvQI1aTa4OLQdULplRg0Hd0Xyr X-Google-Smtp-Source: APXvYqy6md1sjAK08B8yZP4TOygje2JR5/vJFn3OJX5TNca77OntUQY6LrCnuG3HT5D/YdR10DHUBg== X-Received: by 2002:a17:90a:26e4:: with SMTP id m91mr35793933pje.93.1563278383647; Tue, 16 Jul 2019 04:59:43 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3227:: with SMTP id k36ls7086417pjb.0.gmail; Tue, 16 Jul 2019 04:59:43 -0700 (PDT) X-Received: by 2002:a17:902:f01:: with SMTP id 1mr34599851ply.170.1563278383385; Tue, 16 Jul 2019 04:59:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278383; cv=none; d=google.com; s=arc-20160816; b=TF/eAmvIR0Oq2lo5iaLQgcLgxgvHDo68WA6XhXEJU4Mk5trRB9hDDzPvnyVdTt4+1R N9/y0q8fGypt1SSMAH/scU9sBHsDg2B237TsT6o/mFpcodS9GNlaLmaQmClnQxsvJUOc YDSXc5QZ+kSxxsdatO9uqJAvuVbEBIHrJEIua9+5D+9iKtDEQcAQ56LeYt6Son63iKfO BiGTqbvZiXPumXXeEHsoSF4Aek3yJ1GO3NJwrey5rOaa5+8+ecGNcXms29UzVG46U6sy JOSt4y9eGW1rmghofBV2rXT1gs1edAnYNR0hYSrIIbaG/ilGIKz6zuAkpYhWvwkZbxDa de8g== 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=35O8lHuctuEuK/510PsjVw9EI596auqTMOJ6mksNslA=; b=YMv3Gcroen4rOug8Z2jFpjWjT2g6o2hevQw3op7JF6cB19R22ZoGTbkVK3qhWB1dK7 1omuibG0nyzdhx7WfI1aCzooADLU/OIVU0m/IBfQbBF/wQl/q5RZT+BzxkVFd51KD/gf +uWNS2zWi0xmKqQsd02Zx0KH0jyZecA21DH24ieLQlYm8e3J2RbgrSd0CXCKTULsVJ46 2JL4BjQRmuQzgZ3ftvhoTTZFgXp6cKjToAHW7zcuBWqLJKvqjIgsxC9M4pQHr8dBkc/O HB/NbrUfXDXOnzHcbyD0k4KVKo9GByxWLVoHUpOUaqOtCjosusZqvWjGQ2WvDXpca8t4 sdCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TDMpdvzh; 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 q30sor24709092pjc.13.2019.07.16.04.59.43 for (Google Transport Security); Tue, 16 Jul 2019 04:59: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:90a:a613:: with SMTP id c19mr36426805pjq.17.1563278383051; Tue, 16 Jul 2019 04:59:43 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:42 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 30/57] ram: rk3399: Map chipselect for lpddr4 Date: Tue, 16 Jul 2019 17:27:18 +0530 Message-Id: <20190716115745.12585-31-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=TDMpdvzh; 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 Reviewed-by: Kever Yang --- 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 2ab10da53f..7689711a99 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -188,6 +188,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 (IS_ENABLED(CONFIG_RAM_RK3399_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 && params->base.dramtype == DDR3) From patchwork Tue Jul 16 11:57: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: 780 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 704D73F08F for ; Tue, 16 Jul 2019 13:59:48 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id t18sf2522318pgu.20 for ; Tue, 16 Jul 2019 04:59:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278387; cv=pass; d=google.com; s=arc-20160816; b=YSGLN1+vUbHvdWu27QKL1tF8+mEUFaS5m70EzR3t4hbk/Dj3d4oFMqudRkvuPyjvQO 5EXaGpYVGzWd3Jf3gqubAZt2ey8BIygYfI/DDtMk4PsWP+1tg6tz0M59QiFy18vdpnGO B/gA1/Gk8+Na7Yr7ewIA1b9TNTVAV8nV2YsgacjLwK/ZasI7w7cCDxcMasZsN1YzM9u4 WAf9b8aR0fIAcgRawIhK9MoYX7JM+76n33mVCmRBEd3a8/HwoLnVRC0IlDTvgu4haSPq 0zj3WZJWoUO+8a3WILnG5J1YLozUF5uSXyIZ9f1Flsu+WxP8FrsgSzanwf8O66LzHnym S8CQ== 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=6rSP7m4rPeJcKquc8xbwsbBzsPrLyAWxOvs3Y8BsxNE=; b=pQX9ZRMCq6b+u2WhLSrs2OhpzHsC/CBnxQvlvNsJUyn9yzgBLM8DIvrxuDtjHy+lQ+ N7knb6A3Sal+0zprXzP66oZhfAraB/mUaHKiu/jPlhCYDxYFjxbE/BqCd8uXMfS7vftS 6FSPPUBwn1yuCn2lMXt32+jUrX9mYlx40LVyWw/NZuye7ZclMHyuTxwptD7C+Wt4jzZQ WuOl96LnsRGd/+5fgF5wx2ckp5FB993XucCx3bVyXbJqAxAZ0wr7+oHPNGF0VFxcCS+X Eo0K4gGAi3AQfDzzQV98wNyeZPh/Oo5vE9eplB4LeJxXzziZbfgpybasfQBMOhCoZy5z BQww== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aX9gVM3W; 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=6rSP7m4rPeJcKquc8xbwsbBzsPrLyAWxOvs3Y8BsxNE=; b=CSnZaqqD7gEXBJiRQQzlbpIAdQN2iZhZB0RGixx3ivd2JpkDA7foGeHvD9aDS4c7DJ Kk3FdGDlQ2ppAMLVBxiPGGRahIN9khjqTuWyfOGaOEaSc4xMYlo8PuRwSs6OGS/9WnDo ZQwkrNu7reryzOvGEnIGNGkJx2a0ffM+nJea8= 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=6rSP7m4rPeJcKquc8xbwsbBzsPrLyAWxOvs3Y8BsxNE=; b=YO6N2B/L5fm5i53hihcN0Vv9kH7qheA9wMskojxfE1KhTu/vjcwXub/QvmA3A/wOiK vXB58sEZ8gXRtEqzV8oui9tIoZEdAkDY43xyvPRH56NgasM4MmnkpayqJwOjB8BRihFL wIDsdOkpHq7J8INzf8UvthlhSb/WrmpKVJKSp19zAegulJeG0kw2i09Ysd3ACiAHU2Rb pFutalEgyMegKKxxCJJrQK7AOCCF1xo8ragJVpnf1izTgEYGcgNlGkdpBeavv+x8S3ri cc0kjW1TzDLda802F8LqrILVo+8q1INPhWL+ugssI5MVHZkglVq2FQm9rlhnv4rAnsws Bo/A== X-Gm-Message-State: APjAAAWgsPCvrZaDWAy8Oleyyy0J781vGY11ksxJy7pwdyZ1l/MJsWL6 KucVFvISRa7Otd/M4a87OlDfwrnH X-Google-Smtp-Source: APXvYqzgaxEM8xajkHgT0OqjqukXHoIhc/Pd32Us/RSAOFjmwekcMkZL6aMo1Hc3U6Ni5mVmqFFwlg== X-Received: by 2002:a63:d4c:: with SMTP id 12mr33745868pgn.30.1563278387213; Tue, 16 Jul 2019 04:59:47 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3aa7:: with SMTP id b36ls7080423pjc.5.gmail; Tue, 16 Jul 2019 04:59:47 -0700 (PDT) X-Received: by 2002:a17:902:324:: with SMTP id 33mr33971937pld.340.1563278386912; Tue, 16 Jul 2019 04:59:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278386; cv=none; d=google.com; s=arc-20160816; b=oOnv95Xzs9rea3NgInZn7HAtksA9R70cmXAehSmT6ZhH2OSsWB/6aUVwtWPuR5tNBL hYrZ99UjJRna5V/ZlAifDGgUAO89AciumKh0brHKsvU9eSLTCVWxQgDwJs14UR+ns6bm ///HNk0OW0TX62XNW5LqkybLbvAyKvhOzwDDSILmgotXoZ0Y6Dq/S2rMyt5GYDf+G3lH 1yWr9sCMUSzKbqsVt2Fk2naVibtedLYWLjLLxw7Rp007+h1p+eOnoTiBZT921uL5HauF Dkr7WH6JU/gBbb92YnpIKTKol5nEz1lhyQrGoLFBLE7UxfLiUxvi3srYiJARjVQEYRdl +Q5Q== 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=ShnizxVOFJJJ3jmxPzb0Nn+OAjZ/FrAS/NyUepu9UZE=; b=DIN6yfI1Hft+9ypZ6gS/7iJ+2t+pT2Qp901U5qngoz0M54ZrlxBjXnUlkdl0cGkH9X 33I78BmAXHi93WL/Ix/hOdYJcARCKzb6i9Wkant1nh7r9LcgY4GuNMiPMDcsAjtmO42J iGafz5ULuIVY/X2dr934xD5pAUi8t5O+o3F2cx/XP5xMkdyoP1cTW/BX9cAgQJClSu5J BqQV49gq6EyzYI1+1H+tgCI8K0rq+kN0/lZgp6/61bS4QFoerY42ZGGJoE0gbkbpC7/D KCvV4tcyw2Qmsz1LRxDKlFtMGDw5VFlqOhRHJ++JO6YyGDc7+Ig8o2HRxCETm7NJfZ0D t/Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aX9gVM3W; 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 11sor15727396plc.47.2019.07.16.04.59.46 for (Google Transport Security); Tue, 16 Jul 2019 04:59: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:8c98:: with SMTP id t24mr35700706plo.320.1563278386651; Tue, 16 Jul 2019 04:59:46 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:46 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 31/57] ram: rk3399: Configure tsel write ca for lpddr4 Date: Tue, 16 Jul 2019 17:27:19 +0530 Message-Id: <20190716115745.12585-32-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=aX9gVM3W; 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 Reviewed-by: Kever Yang --- 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 7689711a99..1050cbdb07 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -502,9 +502,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 (IS_ENABLED(CONFIG_RAM_RK3399_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 Jul 16 11:57: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: 781 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 0B7B83F08F for ; Tue, 16 Jul 2019 13:59:52 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id u10sf10056622plq.21 for ; Tue, 16 Jul 2019 04:59:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278390; cv=pass; d=google.com; s=arc-20160816; b=dVpStlaWXrSuUw4j/mokEOzdFWVI2X1uFeW414Ij5cYvo2JQoRDEMbdtoZ1D37GJCh qlhkA6UcmjMj9nfrVBtbefcuZKjYZlslIQuJQzBYwOcKuT2Bl5DBxl9OrIkJO0F+5f37 j6NngrT+tK3+kDGyty6UXZQNPt+jvaiYlnYGLuWe1/oOEz8w9Mp60fIBpdLWjiLKZQFK nYPVBNPOSpLq1Xvs0/ajn7SnUW2rMp7RG1tY2dqlMvcmHtFwoDr0GmaLuhMO4s9c+khE Ynl1ilwTfcqEzXiIEcqu8tW9mytHIXe4i01sEdBP8R4E3wAKVhWjeoiMfExg5lJYx+RZ 8/2g== 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=H9VQVb91gpBG3CRj2ck9MoYbYTQPlWOWg4oO54ekEc0=; b=DI9qndNnV4c1rmTu0+DsW9pv5y6iXtndpFmQG+N0T60xESFZ6o/o3dkL0Sp8BY1mq7 Jcd0PMszTSwjvgwuLuhvxrCJRDJ6ZBkM6TUTRQztwXOWxzM90b64O/WdCx7D8rxr+Ftm 1zRgwykZhw14amDd0QvIopS22zcglLKg8sM+TbpSAew7LxA/GueT2iDs6yz+v5jQNOeK WH0FAy700FxPaGoaUbDEkYeDJKRjcuqfCtjjb/plz28eZpVjUAnNTmk2hpBs+RKk64O2 vWNNDDO2Q2hXY3d9EjTSWNpl6pcySg1YIVrRvWxgT5Bw3JcoLnaRzk0xh2KIYBrHOZq/ 7X2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j4Ku2On3; 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=H9VQVb91gpBG3CRj2ck9MoYbYTQPlWOWg4oO54ekEc0=; b=eHNmbbZDd7/Q0datUfLzVZDNQC5e/IVtp8iH0xQoYyQbmdWFj2/NUsLiAa41WjsobC b0kBTewSOUkUdgOQ92b98PgC17W9J/z2IMnMp8X04jT6oAGl6ewDj153t+tk5m9u/ndJ F4pHc8Em2dho34XDRe3TTuO0/fET5PPlHD/wY= 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=H9VQVb91gpBG3CRj2ck9MoYbYTQPlWOWg4oO54ekEc0=; b=WDDmRfxtp2a2mIZT4ISI+H2JIcUSJOFq1MEx8oXZ3EDVVcfgkIO3nodlQAjJ0IrgGZ IZb5VUyUZwHcmhE7fCQcqLytoHO64HNEPLEi0jHOLP9mJtDOuGRBMM6QwQsLXe6df+W5 vciDnhzBndz4RlgbQOAb/KSnyaRPcXAJk/fNnnlW7+FqhYD3qVfauIzFAhup68BxtQ9j IPSQ0MvZGiT+pUzUAkxFYdEplIvc3/qpnjTv4FkjFj0D8rHdxqp5wG77DBog4uYOuKNo BlJRb8zpGE/Wbb6Jy9t203Ap2OdzJntlqPygYd/RtHMWyForvH9c7bPM9ycy56Axxe1n NZzA== X-Gm-Message-State: APjAAAV/zhvRtGyo534WiB+VpV34R7fv9Zjogcx5KLNB+KpJ5ztAj+UT RTE0KW4Its2odJWb89BN2xiB0wlW X-Google-Smtp-Source: APXvYqwssF7a8JZ7YRZwsDg1RoAmY17bD6AFqG13UpsE6Dxr6y8NHw8FjNblJ62jHaZqiCuCYe3jRg== X-Received: by 2002:a63:b555:: with SMTP id u21mr33698249pgo.222.1563278390774; Tue, 16 Jul 2019 04:59:50 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3227:: with SMTP id k36ls7086496pjb.0.gmail; Tue, 16 Jul 2019 04:59:50 -0700 (PDT) X-Received: by 2002:a17:902:4643:: with SMTP id o61mr7077742pld.101.1563278390503; Tue, 16 Jul 2019 04:59:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278390; cv=none; d=google.com; s=arc-20160816; b=NcwKjp3m3xZiWFShUE5FdvR91hQXe6/QZ950yQ0eJVgJ2yfANgbzTig7D1SHJCa2eb wXf+f9wTFoTRZGdLOMk8Ju+6LHJjXHeVwbWRLyKpky/iCTS3BYhbKRsWgo4sHhCezzGO zis0cunI6U+FU3LH+w2St/M02ITEQI86HJ6o6nyzhEQn8j8e6SMLu8P/sM0/0h2U/K3R 9gI2Vx3O42to8klMT7CzTL2J0MIzQGRuvRnK/eErGq2MJx2o6vsC4spGNvDD5WL324nr nWG2/c5CLXFOVkHQa/WookZqnBMreX8A7lKkzGALgJLR6iA9vBc4RqZf/vdn/KKAydma nYBg== 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=pRdXh1cKmOxDhyJeNVB4/lTa5Z+Y787ANmhkfv74kgk=; b=yEWIL/jbJTD89mqIllU0cNKbjXpptoEQUYD7YKqrlG3ZYenu3VHl09DBfnYORaTpSe +fYgKZ+ur1VVO0eNPHvRY720i5SikyzCwW9hIvRn4JqUiye0l5IPuawTXT1UG34V133d IfCwvTGAHL8FmoyP685LAeI7CBaxJsYsFCCth8dlmMogHego6sP4x5cRJ13xp7+hAl12 TKMpLQwQOEshTt8W6JH0nnsu/KJx+ILm4Sj9101sfX3cNa9bhhWdnWpoH85UjrsjUrcK Kc4sDZ3R5fhadc7RO21OtbqktGA4un3Ugxv15rQiPdOMTFv/DV8ThM2x28yCez4UnbP9 4NSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=j4Ku2On3; 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 cp19sor24662640plb.63.2019.07.16.04.59.50 for (Google Transport Security); Tue, 16 Jul 2019 04:59: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:7791:: with SMTP id o17mr35240785pll.27.1563278390221; Tue, 16 Jul 2019 04:59:50 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:49 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 32/57] ram: rk3399: Don't disable dfi dram clk for lpddr4, rank 1 Date: Tue, 16 Jul 2019 17:27:20 +0530 Message-Id: <20190716115745.12585-33-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=j4Ku2On3; 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 Reviewed-by: Kever Yang --- 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 1050cbdb07..359ab0b826 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1225,8 +1225,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 (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 (params->ch[channel].cap_info.rank == 1 && + params->base.dramtype != LPDDR4) setbits_le32(&dram->chan[channel].pctl->denali_ctl[276], 1 << 17); } From patchwork Tue Jul 16 11:57: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: 782 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 0BAA73F08F for ; Tue, 16 Jul 2019 13:59:56 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id q14sf12249967pff.8 for ; Tue, 16 Jul 2019 04:59:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278395; cv=pass; d=google.com; s=arc-20160816; b=HgdvgbOcZ4BIAip1Feh6dK46RI5g1s9HUwACMnqyYLwBwI+Z7vLDamUQabVjHhdNGr Lqpaz2fRH1jHB+n4oyIwGB6LuN9UFXUYqXaoN9hhK7d2cQgJ79Uk8dssPYXlWp0qK67x dVA9nooGJqoSFYs4MhyeftTvdLZARR8qq0QW3NZiPCPH+KKZ4VvBvKTUtBdCLxkC1R8C 7DODC52VIDCSA26P+yiZSVqlQXny2oQ6qfz80+yiUaWNyVhqiwF2TsQkFztPeChdl6Ho UVgZ9CTYHVDFdyqK+EfrWXCER5anfM8ttXeGG6VVaREfXD830D78jMogdXUkxr/egn2W LTdg== 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=ZLc5bxMwpNQs8ldSacaKM7XVFBWbd3/nNUeKbiG84Xc=; b=ptUtxDwfds0EXd2IwU7iMp8AQYhly/zIe9mMnPoffDopFiv7MrJpSRebkU0CdP0gvK qUwd9yHa2kpUVtlf86Zy/EwiP49Bx1cNKs0RtCJlmlpT1urNmuZiDzNQRkhw3OXy8Z/i 0CBXn5fCXljmjVmVhKaBU6F2wvG9GczkJWGZB79EWX8VkIXUVsp7mpS+SZt9j9eUe9a0 6IcjYwNPGpKZDimwE770N8G9pvon+lTvY3zm8QXgR3wyVn7Vw5103Q+5ALOGsoSlb2Ga 0X7x4nNouDu9iJUtsXmBCMMVvhOonMPPwDzY/BsvwBAq/1J4yBNiq/Le3Qf6EIZOlhyF VBFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="j3b0/r3f"; 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=ZLc5bxMwpNQs8ldSacaKM7XVFBWbd3/nNUeKbiG84Xc=; b=OkwWdD0vZfj7YOq9sXCnf9u4qz/SsNA/sMPeriNp4KxUkqalHbCYj/dWrjsbvnOg6m /HkEDC6kIi46nk1ddIfb1kk91LIseYjj13IEWvOHmSvNJiNcohXj+FHnMTUzv3A6tB3G sbVkhlEQkJ963GghRTWKhrWLOkI4EVSRaZSMo= 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=ZLc5bxMwpNQs8ldSacaKM7XVFBWbd3/nNUeKbiG84Xc=; b=oYwHqJNgKdpthjzl4D3egJp9YQal5XwGshiEuRNHiWNXYzETXZU8ZvllTTzGmtdq7k 5RF2dBwaRVgoOYkzwKcYWkijr/f85htdO94in5kbOQLaSm2dCpBU4MFsWoqVNzt8Dxt9 9kGpIFnWtCUd7WIAncogywUNKsQHhSpya2vG9JMFTpbnsxcDJXm5SS2LFYtUIiXlwNG1 CxtfIin4+cmq6ACAK7yyGbF1hJpD2fL9e2OVZgGcMfXU3MLCbZZ/J/UZfsCuBtoUWM4q E3MS4ADnejV8IT8uYJsiFLLPt/Go/WOUsIdo5PzusutOsoMFpaj4k51yN7lOyAvb/jz5 oUTg== X-Gm-Message-State: APjAAAUbs/6hg69Yc5eWYFuSL4lflD7UOMwbKxq59JfZC8BJwJm+2+XV hxTVKxZoFr3FbFhyajfIlGYRKmHE X-Google-Smtp-Source: APXvYqx61rlQEoJzHMITf/rNHCckrR5w2HjlSZ5CF0lrUmPqB7g2970MDJjah7OrFCkgjuBs21gxbQ== X-Received: by 2002:a65:500a:: with SMTP id f10mr2102745pgo.105.1563278394778; Tue, 16 Jul 2019 04:59:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:6b81:: with SMTP id p1ls4221883plk.6.gmail; Tue, 16 Jul 2019 04:59:54 -0700 (PDT) X-Received: by 2002:a17:902:b582:: with SMTP id a2mr35334043pls.128.1563278394422; Tue, 16 Jul 2019 04:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278394; cv=none; d=google.com; s=arc-20160816; b=VruMOsUBbVdFmfCCKx9CV9DBSrBJmYktL1Gqp5w/qF/xXDGYzb/VExUfu+QTPxjK25 ax5I+dg1q1tuPCS/SALJSOOddocGuX4RaodhHpBgvMGfBBdYiTZYu8Jh5AA/0JwthCvn ab0av0awBB63RpHB6IbR6bEBS3dWEfSpwNs/jJfj0+deti/l2vDr+Z2f/34pQcw9Dw9d 4lDEx+CBzN+cNi81nyvFxABaJsxvR5UZ4bJMQ5yCh6OajIR0AaRE6kiqzgHk6sHuOa2z u2RgFzmkQH6/95sHROUDTuALr5TXhJgbfMuxQ8SOKtpHTxp9Za/h7FyoIdCGfL7opZCc HejA== 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=uemF/St7hQ0ruGO/Xb9kgNrdXpJ27IOAI3pTbvufdX4=; b=PMVhVAO5ybFGxE0AVHBiVv5rHg86xgzJaftY6ngiZpQDFh9we2jxRDK0jPcxTDuhEn LaFEymhIBvzw3vOnfVX8qAytCQ+Ve2snTHOilS+fMAHTLE/1gcqpOX9Div6EG4zdaJ+m 54xOxYwqcHfre2FWAHj727jKUFYmZnZ1dUnyTHmmpKD6RYmOOWf4GGPv19Ct62FSMJv5 V457w0Eme436E0MDRmXWyReshRP3u6fDLN14uQujSaR9PJv9yxxnzxha8MC4rZYxglL+ hFcV6U7fw1fEkcOGKt6wJeRxHNlXjeM7/0N23RaKQfwkuK727B7LPPbk/SeVW7ZuCjwN H7aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="j3b0/r3f"; 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 k5sor24754448pjp.16.2019.07.16.04.59.54 for (Google Transport Security); Tue, 16 Jul 2019 04:59: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:a17:90a:8d09:: with SMTP id c9mr36400136pjo.131.1563278394106; Tue, 16 Jul 2019 04:59:54 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:53 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 33/57] ram: rk3399: Add IO settings Date: Tue, 16 Jul 2019 17:27:21 +0530 Message-Id: <20190716115745.12585-34-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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="j3b0/r3f"; 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 Reviewed-by: Kever Yang --- 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 359ab0b826..95d9f3a88b 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 Jul 16 11:57: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: 783 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 770493F08F for ; Tue, 16 Jul 2019 13:59:59 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id i26sf12196385pfo.22 for ; Tue, 16 Jul 2019 04:59:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278398; cv=pass; d=google.com; s=arc-20160816; b=YZ49bN4LoscPtlsmJVhUSg8o95IXs1pt4g2Rt4D41hqUrhJBNkKiClfC/flOro/xyS KS9FY7D3NwVGTEgo5MXuQtFOMDj2i9ITzr6ULwUbi52+j2EEbz4gHrukWBhI9qiCl5TR Cjn9BQWt8LBMCmDj2JtkdWUdVf0AZBAIGYFphyl1juKP6e6kaWjgT00b+kfvBNdjT/RT r6K4YpY4uPyvAmXDcuCIs8cfqXHTLkbqn2FH/qNXDAVrwLmrXAiRS2e++413m6PuhVVd j87HshAYByiv/aaCuycx8eAmYYzfUtaQCjcHPogZb2DNn4pJ1WM6PgxipdKLUqZHFaAq pVpQ== 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=W5GQ8zhav76bfx1nHJIGZlYbeChaBjiDlQIifrpnooo=; b=zq7fK/XVfwIBXEON2yUKIFm31gZ3xyc1yBk7q4ek3S9hqwb7WLulPWd2zzI5xjHFCz rozQFjWKnlQorwLdK13KUc7wMf499vj9ehE712yfm3OVcfkfnuKZ4R0JKrqU6aDh+wlc ZQALOo7UKSv9yt+DD1bQQ45qH+4aU7ZKJUDrVLmeeHImwsv94K/r7Fo0R9tdEMqraQ5W lafz/FWDzQzXkHTuMBEhYkWg4yg8ffpQoPfg7AJoc9ZyPvMAK2itc6LaoB1sUMGmH7gg OOlWHBuVnnCAJjnDVaRWZWntSZEx45hdY5XdsaXocKbZyMLOWTf2gQn/5s7DOT9CvuRA UkUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YoO5VsGt; 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=W5GQ8zhav76bfx1nHJIGZlYbeChaBjiDlQIifrpnooo=; b=bcZhAgvgco7ZYgN8gyRmfTOS7LbvCjltdwlHIfzSWzSOQZZLNDMGEcHC+GCK6sPjQO hIyLHw2I0RQnz1texyixZxO3umbOu5yHr4TOnqUYsxdJ+1YSzYpH2edIazGTslydaj+t X4FHX1qeMfjTofOmPGp/2rq1KkaXFoSLR5xp4= 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=W5GQ8zhav76bfx1nHJIGZlYbeChaBjiDlQIifrpnooo=; b=nFP3aZgRoy2teHEdHdQfdUWFrHrU+ipFAKn8QT5YdeS/y0aI9TLyMcbWvyTbrxNK36 731lU/hzNjTc65ckn3AvhbGG9QExGtaQS6e5GtvEtYnXLw8R20AT+302sYYdnz1B+g6l bwEK2GqlpWMrwk22BPDReF8P6kw3kt47YARhDXreDSAcCY3pZqzzSzYFPF8tDPHjU23L KMHa7+P5GiqiIu0NiV9yZo7RpZQsdLsD9J8Z5OpjdzgsvkZ+B1v2J//hdZYx5S2ZSKDS wPIEN8sRQ/ZfzeF0XEqYUweWbaK9XPH9Rl5yhfeSHH1vzbt04jvd4qpFyYazpRc4+UDk 8FUg== X-Gm-Message-State: APjAAAUIzD8dVU8bd9iT4ShuFQjtpOamalrmGS5OEw/hzAtnpkTxDa27 m3oQI4CuiKRuimr/tvOP3p9j0HFY X-Google-Smtp-Source: APXvYqzgl1oBoGktg7V8JFzJHZR76V4jK9A8tMI1NzZQ1STaz32Tn9aPBoWAcAaI2TpD+0SjNggoEg== X-Received: by 2002:a17:90a:de02:: with SMTP id m2mr35634391pjv.18.1563278398326; Tue, 16 Jul 2019 04:59:58 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1d91:: with SMTP id d139ls1118736pfd.6.gmail; Tue, 16 Jul 2019 04:59:58 -0700 (PDT) X-Received: by 2002:a63:c106:: with SMTP id w6mr33347297pgf.422.1563278397913; Tue, 16 Jul 2019 04:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278397; cv=none; d=google.com; s=arc-20160816; b=Mbe3FUu2WjwxZRecsuCt3WnrjLfbAyuHGkumiCBaPr08/kecOP3xRxPrx3II5uZRtz EoLJWnjp5Uh1TesPpe77mQ63HX8pyAYWSYsp313T1mELUQqabb9aTycPm1DPGaw6oZDq 1eXcor/qC+fkpIl47vS1xFwdCDDr7QfSSDgjOMowvqKxanJVCgL2kRhOz8jMhLwAW4YM Ik1EhtQVbiXY14P2Gz5f0L/60/UHdlgX9ARLySE7v6Pk8gJyQHlG9I4szEf17ICOaa5v jzSvkVKfFAACMLOnHqj+N+UZeb3AvjUG2vvp6uenJObaP79wOK/eqY5N8E5v5vPHaERv QutA== 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=JMHA9/oGc0uz7sXCCFBrC03P2fQlwGuty6qYiMMD5M0=; b=dnUFvidRAv7VdlJIbkinJJcjUwK12i8Rv8J8B7I6/uK96BrSBBRraCXstonlt0/UTT 9GZrmSDzynGNgB7yYS9W2sW5hx/Euq6YE1cKqO0XUVoGbkHuH8zes/fr0W7rS3YHaMJB XJxO7MEonNalM37V3db3qykMsRW604uPRye+JwhNMc3bCglVzZ0/q/woeuOdMLLU4Ojy dOKt0utTsfRo83+g+LUx4JAK0WeIY1VbPOa40KkVaK/Og1GHfnnRP5xLS/eTJ0w9/E2r ibhnvLeCS+c+a9HG4xu47gCYgM90YDd68HWxw5lSKB92xNcfQqmhoou2gVmGMuRfHv47 no5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YoO5VsGt; 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 t6sor24472346plo.20.2019.07.16.04.59.57 for (Google Transport Security); Tue, 16 Jul 2019 04:59:57 -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:2aa9:: with SMTP id j38mr33237354plb.206.1563278397609; Tue, 16 Jul 2019 04:59:57 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:57 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 34/57] ram: sdram: Configure lpddr4 tsel rd, wr based on IO settings Date: Tue, 16 Jul 2019 17:27:22 +0530 Message-Id: <20190716115745.12585-35-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=YoO5VsGt; 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 Reviewed-by: Kever Yang --- 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 95d9f3a88b..1b8ce5160f 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; @@ -524,7 +551,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 *params) + const struct rk3399_sdram_params *params, u32 mr5) { u32 *denali_phy = chan->publ->denali_phy; @@ -533,19 +560,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 (params->base.dramtype == LPDDR4) { + io = lpddr4_get_io_settings(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 (params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; @@ -723,7 +753,7 @@ static void pctl_start(struct dram_info *dram, u8 channel) } static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, - u32 channel, const struct rk3399_sdram_params *params) + u32 channel, struct rk3399_sdram_params *params) { u32 *denali_ctl = chan->pctl->denali_ctl; u32 *denali_pi = chan->pi->denali_pi; @@ -805,7 +835,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, params); + set_ds_odt(chan, params, 0); /* * phy_dqs_tsel_wr_timing_X 8bits DENALI_PHY_84/212/340/468 offset_8 From patchwork Tue Jul 16 11:57: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: 784 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 E80953F08F for ; Tue, 16 Jul 2019 14:00:02 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id 65sf10057615plf.16 for ; Tue, 16 Jul 2019 05:00:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278401; cv=pass; d=google.com; s=arc-20160816; b=x4/O50NOH7Fn1QtzTCrkv/4h38wSBAW2dexht8YDURcohnUCezcjbFTtJSjBn7+EQS feKowhmncG4CyOI90JRFZNrKYBt+LL2n3g4zc7TmVWfT0FutLtg/CdxGmUjql9Q6gOgj K3Ff40Nc6PF8ZQFdgUmDTAUIcbV4ZB8LrgmKLODXDlqm2c02zlQP7/0QcYqDGxkV+O1A zonRgoG6IHF1jzPaUZ3/sB80/UbMHceS0odr+fLqVO1eoMd1QxWqQ9mEypJKy131ysV/ Y76kJ+vQx4PUnwmdSqIO1oEIfMXMJ00+luzdbJfCb6BVt4Uq8IY8hNMTIiOWj2t5dg1j lp2w== 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=DmrROdBtvJjFEYt8dl+7/aW7ZmdwWLww13i1/3N2mh8=; b=jgziWeP8OcouKlLoxsoPf+ittKpvQR3ffpAa0EKfdKHODFzWzpPVEIwOnZGPHtO6PF 6fpri7b01zwfMbu/VctmDM3uQew5iBBlgIUFZnXAYlfju9sXV1kGo5krhaK0VT/m3rWN rxNYdUPgvek45WdIpyCVZ2dG7aq+EMJbQLkO14a4PL+xmG14twYfZg7siBa+6tWI4Nh6 y6dMh3CbMFEoLLIEzR01gHMaPMaBFw+EjVglX54O6hFalJjLR2dF1OS1Qz0Bj5EBbqgT wFbzRP10RQMbuP0N6ShAD4plHldpmJgdYBnWbK5xduPZXVTQnQYhMt8do7ZCT91gVP9Z 7Vtg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GKyNTgUx; 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=DmrROdBtvJjFEYt8dl+7/aW7ZmdwWLww13i1/3N2mh8=; b=czIKVaE5EAzF652gH7kuocgKCD1lOmx/NSVPIQFYAbI8DJQoGNkI23WV/DB4c36B7J Aq0kBGyPJ2QYCdtk6OKhdv/qAZgF5ZkO+Lp9ahIU4vYiZmJd+PSGFlc0QAUqxRHu+f1S +9cCYN/b4A79iVzEq7Vb7OsIKgbddkoWHSad8= 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=DmrROdBtvJjFEYt8dl+7/aW7ZmdwWLww13i1/3N2mh8=; b=SezkOrQrV9YrT2YC2OADJBk/HO5ACETRyHSDabD3AH/QodE6fYnbAe2qwq3mVKnvpS N7ehHsmxTbkYlNmbzJEizhx/gCgiZfJiqf9CTJN7JNnz+xgdbD6l7qYGrRJfZ9KKpuPi FiqDYtcg1mAGfIL1kzRG4tBpGFoSHwXhNs6mTnkOunyLaVr8VMmX0/DVy5flGDsb7c4A yFSbhuT+QrszvMjBUpM2FR4StZQdnWLOCn4WGWzzv04lDHeh5R4drIr9aMsiOT6vUYxu lWoOUJoKzK+VQrLYMUvXQ4jFtb0iDC5RJnCElBzU5iMlhSFPm09//fUl93PY6Q/zyOZ9 M0RA== X-Gm-Message-State: APjAAAVksq4JC5uk28Bw/VCF9t+Em9QyXxU+MWQAB4B/nKjqJxmJXPTa tkgMZD5kTUcEVE1OWnA1+cqNjX/X X-Google-Smtp-Source: APXvYqzcHJ+0QNzgbJIjEoOW0Pr9iVLOKvesKddDN+nGtO/K2PfSg1030xJiWQ/DdaqYrFlmSRH7Yw== X-Received: by 2002:a17:902:2006:: with SMTP id n6mr35563978pla.232.1563278401736; Tue, 16 Jul 2019 05:00:01 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b48c:: with SMTP id y12ls5465328plr.4.gmail; Tue, 16 Jul 2019 05:00:01 -0700 (PDT) X-Received: by 2002:a17:90a:8a84:: with SMTP id x4mr35087827pjn.105.1563278401440; Tue, 16 Jul 2019 05:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278401; cv=none; d=google.com; s=arc-20160816; b=Bp0nVTSVRqhm86m+bYY2bHlUttp1ZevK4pTBWsAJ1IFULYe7n+2NsallnrppTtFj5D YaVtQDmlMDtFsT2cGnRiKMNLJgzFyEhzWDKPkVDDxvLo6Vk7ijrOFYr3XwPJFH3Pq1rb W6HgBDCX3MNoViH6Qk8N/djp1Dqi0puT7gPPOJP8NjiNLwsmGLXSpK7dr+QjgJiJK9s2 2drLXFjKcJob868H71dmSdBo0tzXuQINNtVeNTtvAF+pk7mYjqOOGU60gEdPzzUSpLs7 IeFKwXQIeJ+P/tFYaFtGfIKxW6OeNFBrzTlQOR3QLu6nJDm/G4Vy2IfiylQOjpbrW6SH +78A== 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=TGL2vZAdQiuNUHRO4mTXKyX2zgq3XTrcqwdNqg+WCgA=; b=FbdQI8CcR7jsiHoGAno4wNzvLE8B5GiMNU8Y/wtgM8qJxcJBcC1++7ib8Ei899UInI HQRzY/B4brRHDSBgMIwZyPDtZQYDCgelHj+zSTYG97WN+5aQbYWOMNlZL+j0Pe03gFwE 6xnwuDTrzoKA1EGNaWD2QpFEvgW+wClyC+jdmX4rz7FUbH+pN/EKQQgwNoeWr5NZ4FRt Zu9b5cPr1o8/NVL+K/HeUg+kQCJRrRBWMkWLIypzbqEg0+WOHEAQPDJzZIKAdpIbxram nVoCCjBq5cuaH32Oc3t97MQAn8LmB3f45ew0KlULSnhMWJe+U6fE3esbWwPcI8oa4Wsl USTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GKyNTgUx; 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 p1sor25513716pjr.9.2019.07.16.05.00.01 for (Google Transport Security); Tue, 16 Jul 2019 05:00:01 -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:30e4:: with SMTP id h91mr34311060pjb.37.1563278401129; Tue, 16 Jul 2019 05:00:01 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:00 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 35/57] ram: rk3399: Add tsel control clock drive Date: Tue, 16 Jul 2019 17:27:23 +0530 Message-Id: <20190716115745.12585-36-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=GKyNTgUx; 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 Reviewed-by: Kever Yang --- 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 1b8ce5160f..c38ea1d284 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -560,6 +560,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; @@ -577,6 +578,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 (params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; tsel_rd_select_n = PHY_DRV_ODT_HI_Z; @@ -589,6 +593,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; @@ -601,6 +608,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 (params->base.odt == 1) @@ -659,10 +669,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 Jul 16 11:57: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: 785 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 9A04F3F08F for ; Tue, 16 Jul 2019 14:00:06 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id u16sf494001pgj.7 for ; Tue, 16 Jul 2019 05:00:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278405; cv=pass; d=google.com; s=arc-20160816; b=o5xAeHhUOpzIkLUi6SUJr210aIkmAnurybj/o6IfipmkePsiUeOfPJjtbt5e58UK7V ihJTvlnwUzf6xh/cOxxEtdPH4Qqk+7Z90n+IFXMzDwVnb/R5/HDycD2694DTY/Kug47p EQ3KX8D6viqlzvjIYzDLjoB3D4uDqkbX6wmYCm2Sp+nP9qW2npYA9DCKcttfcqT0kfgd Ixb38MnU86S9A6y8eJXdoXuhJqmps1h/hsRRtfDty8WnQg2GZANaxEWjo/FUaY+oMQ4x UjUuh41QGp16AvZ6TvDxuimHt9g2vFr/2GwCHme+fPsdpaBDJWS2Qt97XusOjLisnIpJ 1TLw== 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=XzN4r0wjxDCF3r5wXjn3Urd0X/ba2jQ7y6KguElUcFY=; b=P3ZaHTXRB4/1cqu+MlfCyFXuh+Si/E9tYQTW/ibHCY9tYBVo3Fr6w5jqMSJMJRLibp OLGBsKv1A57X6uc6z1nmnZIdD7KwrjNizawPvv3c3kK3d5BOc6bBAk7GnHUXPfVExl1O ecXZI7zYRtaUFEGWtnpa8xDfSsmnN4UVpmjgtPdvfRFYfdM251xZDQv3ASUZcphi1ldh T0TcIitIuX7tP+MBWE0t7wuwtYqMC6lYwVvjb6oZKoeKDp79oE+ey5KfIakdilcQ98vY 9wa7HZTPrJR9bv7E5QUMeZ5W95niUOyLmBqHPIMT7kwj7jnihXcrl0Z4gYNxwnM2K43a SSJw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fxMyMKHQ; 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=XzN4r0wjxDCF3r5wXjn3Urd0X/ba2jQ7y6KguElUcFY=; b=mVoDPJDyI8uw2IXhQ2V31OFCZYwpz6p/nb5q5ErQzpOBywZdYURQSFX/V4bv38h78l EI3J7rlJHvTCrp5bu1SKDi/RvKczlDKnG1t0bgopgiStNhxDDk+Rpuo3/yA3vzAb0qK+ Cn1VxYQkIz9V/ZCDhaoNT2CZqxjNwF9ldjwPs= 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=XzN4r0wjxDCF3r5wXjn3Urd0X/ba2jQ7y6KguElUcFY=; b=T9sMF/FCVNyiBdHTMwKfCKo1dKPym7nZXB3chEC0YZ28hEYoQWMvHt12K+x2JsMphl u3XjQc2m9JbAbCpqVSgS3AO+w0Ks7/kx44SSTYLDTciKRidHV18IK7QrA8j+Ebhq6UEB masxhbU7ZohPS4MRtP4z0zHMjDK89nQgkR5Ifjzo90W0VNXGXB1J0LW2bPgTY8Rlereu EynsWqaALIquTYlS6VygrYlwcd9cVn/fqmOPtTmCvcBLxK06EOp3TIGjZ0NSQoQT+3KU O8LJRQBx3+Zlqdv5keck6j7U3O7Huugxoi2Eh8ALrNIU9f8QXTMMhxZnyeb94atkNR3e wfIA== X-Gm-Message-State: APjAAAUZTnPidfi2ogL5iM1Sx09EU2ObF4OtmNGqgzN/ymB+D3osX3NS TJPEIlQuiSlDEuZ8jWpu8vu3UOV+ X-Google-Smtp-Source: APXvYqzjPQFfBEqFIdMICdD2C4a1ZkNlC2UZTecX5ckpDo4QpW97ElRyoWb67bVPh8qXW1ptI0nL8A== X-Received: by 2002:a63:c442:: with SMTP id m2mr33550821pgg.286.1563278405353; Tue, 16 Jul 2019 05:00:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3662:: with SMTP id s89ls7082576pjb.1.canary-gmail; Tue, 16 Jul 2019 05:00:05 -0700 (PDT) X-Received: by 2002:a17:902:7202:: with SMTP id ba2mr35278092plb.266.1563278405030; Tue, 16 Jul 2019 05:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278405; cv=none; d=google.com; s=arc-20160816; b=jdV64JBwrE1MrUMNi5oXGjQP0AGJWZskGZMiLtSmkw6zKXh2XvkeRlY+xRF5r7QZO6 6z4xdoKtPonPbYo7V0+NcrO+F89aKVL5CXNJRDiEh3clUCimDeUpaQm+5/hlqedFNDU8 BLm/B0+PItBPh4FDJGxvOfYuafnHUP3iPdzu4ZPxFij39I0NbsWdzJPhUiud6Z9mDqk3 S4A5gsZrxxiR9Oi2/L0fAKsYWt6t8iQPBqLkb4JpK7zxFBDlQDrq27i99iQfRA7QQ5+C 1uBun60iGJQ7DKpwVgOK4IeNF5LbuUzhVZ3gjtIinLMSCp+E25rUeEqEnaMlFdLhBzUO Q9sg== 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=uJaha5qbi/fzESpsHy2ICJEbRyPTEVDRBKY1OAzcEjI=; b=eYoTf+t8M85dw1hn+Ato+uBI3qXf3WVAD0N6Lajp5neNmzD0dT1Z1ncZmf3X54GrOr 11UOCZ4kJQUTPo/x2t5uI5bhRjsnprfrymqMVJ9S3G9wppu+llEzEEjpENpmJZPMcEEU 0f+vCmmExztWGeLz/FmmyV2LGjjOu+jI4W0mbd1YbHXPlaE9bBZOzgrVoRqjxe0kl/Xu 59vcou10nasDQTESomJhVVy6kvP26NMm84fx9Xnz2rtUTKae8mHgdodgzhfMwCsolLlh ecIepgotcYFruNMPN+7O4cOy4ZCaMKofiQeCn3Mnj6KKbgOJLjQCTtyOdHoKPG20unpx rksw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fxMyMKHQ; 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 k6sor10653174pgs.79.2019.07.16.05.00.05 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:a63:2606:: with SMTP id m6mr32927678pgm.436.1563278404676; Tue, 16 Jul 2019 05:00:04 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:04 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 36/57] ram: rk3399: Configure soc odt support Date: Tue, 16 Jul 2019 17:27:24 +0530 Message-Id: <20190716115745.12585-37-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=fxMyMKHQ; 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 Reviewed-by: Kever Yang --- 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 c38ea1d284..e0be9d2485 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))) @@ -554,7 +556,7 @@ static void set_ds_odt(const struct chan_info *chan, const struct rk3399_sdram_params *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; @@ -562,6 +564,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 (params->base.dramtype == LPDDR4) { @@ -581,6 +584,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 (params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; tsel_rd_select_n = PHY_DRV_ODT_HI_Z; @@ -621,6 +653,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 Jul 16 11:57: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: 786 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 2B80F3F08F for ; Tue, 16 Jul 2019 14:00:10 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id 91sf10052766pla.7 for ; Tue, 16 Jul 2019 05:00:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278409; cv=pass; d=google.com; s=arc-20160816; b=PwS1b9MCojIxDv8DYk36tK8bG5x4Y8g9RQTQhrYtClYm7gma80ew9ajzO2HooOVFIs RMNEDj8EwEVa0aHcuuT2l6pe2rube1nGSa+rEb5K0P2oHMlKkESuK5pVdUJ4coiEZSBh op+O3IeIzJLQfKl9/yajM962EmNIlbnHc+lNWiO4FOzqBBXkeHF7aKju5DDuUt4Hl4mk aImwD2ZKWRr2kGMMV0Y6dGXWYubyqdhvJt2j2jA/CYkq4YiX9mTji06xS2Mnk5PYqUkE dIqJjPk4tl3sYO6oLvcDZU3RnkrmOwfLMpMiNpOAn3E44zSGbbNa2NJXDuXYovB9H6Tt R5Tw== 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=vH9uZ9g8BsVTpw55n03iOXtyS0j9FmBIzW8VrSXJXPM=; b=07xvE1bOVBkFbTQF4zEoP5/EM0JpRbnUQcksiQ4qCvuzF/WIhToxJwlNGhPZN66kMd X4u7Dt5JC45Vd4q/mJL6OkCCueVwuF5Bt29ItsdSpRklJl3ZB2zHEvD7lL3GHj+CTll/ la7pZ1djTfA5PmVwtmUT+QtwvA+Xr/TjUE0++mb3upAk6aBtHfSVpE5MZ2PyD5hf0Riq 9+ultQK3o8y/Ypll34y2Oi8iHpfezgWAfFbRPnEyXF2ZEBvbcbaDnncOI+mjmW1mFd3V 0BwJPKflzhTlSauEW6WZ8dqPqCAONSTgqIxI2LXYFLQw5jmpBXEuWYTB1MuAWYZ5GpJi UH7w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jVR8wFlm; 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=vH9uZ9g8BsVTpw55n03iOXtyS0j9FmBIzW8VrSXJXPM=; b=cM6BqOYBVCqhT6Pur7v5zkNNaBvMapzZnC3p7Z9QEPvmkzTBNH1Wh1Mg0iyV6XMAVh HbJ94dHGlP5qN0Vi6Ik7ry9x3In4slFMDPpx76xhtSXoPQgnPQgdl+RjWZ74awu9C5eG Hui5Vwy61aslGomAY1xCabmW+M0F4ABsAspxc= 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=vH9uZ9g8BsVTpw55n03iOXtyS0j9FmBIzW8VrSXJXPM=; b=To0BYNq9/gRyq1F6e216LxaNYOgBWOdqO8UbEWQGOquurACenrVHUvopkHBw5wqWQu 6RCRK6br3thvg9hyq1QrUxawzf5VZaWtujgdaoUP+hCAnMEzTkLqyzKFcO0vrUTRb0dl /hsu6/krnarf2zt/npRE7R91IZHubgTooae1kGxT4nSXzMkvpSSPOe1oVUoGm4HfIXxJ O9Cy5qhTklJfR95WT+IcZX3UXnXgqI5PveVkMk3iTiniuG0KmEF+mL8TEPYkTYGIgEqa zrYZKZLkGc1qVbrXp8aDIt7ZFFN16FI7VNgGP5vWXHDlCUMA/D9ncexeXXCFo8SJiU4p LPhA== X-Gm-Message-State: APjAAAWEM/RuUoJO58s7fzDTKsGB06ihfhRHk7X4JBl+z1+3VO4OU/ii v6QKH3t64laUd5MIGNrxA90pnWNk X-Google-Smtp-Source: APXvYqyc3Jk3QVCnAKgTzpDrVaVtSiurjfrdT2iALsuiX2UzLJpzTl4l+65uRbqK861yvsl+nzN+PQ== X-Received: by 2002:a17:902:724c:: with SMTP id c12mr34179917pll.219.1563278408961; Tue, 16 Jul 2019 05:00:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:31c5:: with SMTP id x188ls1131114pfx.7.gmail; Tue, 16 Jul 2019 05:00:08 -0700 (PDT) X-Received: by 2002:a63:db45:: with SMTP id x5mr21340649pgi.293.1563278408454; Tue, 16 Jul 2019 05:00:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278408; cv=none; d=google.com; s=arc-20160816; b=chdQGtj7e8d2METZAON2dZfEGuhQ3OSPDSGOF9e0cRUOnnkeVXaWNxvE832LlF/ZCg vmoIjADyYqxIsaCQFFGVONaEW6gNAZ4AvvyuN/kzOte9A8+sOAfNrTVNY2dr1FRjH34e kjd1q4BO8xlEl/su9oW3KdE6MDc9KMnShN+3fg9aJApXnTu+Fzx8DRxFx0DMc2Jecy5s dlcSpvrsj26Z6mXGbErC5V56YaQ+ZC7mg/rI4N+6xZMgtbzjBMWzY1EKl0OxgIoV31JZ 7szgh0AKzIejiEP1/B7wEb1ZquPF9staiUo4aaCayv+MlSXK1LFN51jXMFEnI406o8NC m22g== 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=58XLNuDyUTU9lKLmcFIrRJzh/d2o9C03p3D5LTCflwA=; b=xc6RZcENrxww8Zo4nZ9AzB4WgmsMO78UfJ62XR6MQ1MNf6NBrPT/iplZkrw+uGz+DQ r1X476+NePgyEEdV+t4uRIuEObP6FD/iYCFLknj/JZ42FnxDCq2rlaeXsNsO5YwYwq4w 9AzgDWZEuw137eR3Rh5GesvzorKfRirVpd/WPtUOpe++4FFYvJrHxrxyIUY3VNihemlH DPtVRjY01oqIAhkGrNsFiflLMzEoan1oNA3R7ardDZeGxSqTngUcZtyAc0EMKyknORwi ZiCtgjyJOxbXqPmLYGjod6Lfhbs2vmRy4BKKYtiLWA+oC6Oq0T/gQQx6Q3m8DpekReFh 2hYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jVR8wFlm; 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 b9sor24631697plb.21.2019.07.16.05.00.08 for (Google Transport Security); Tue, 16 Jul 2019 05:00:08 -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:8509:: with SMTP id bj9mr35076461plb.79.1563278408205; Tue, 16 Jul 2019 05:00:08 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:07 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 37/57] ram: rk3399: Get lpddr4 tsel_rd_en from io settings Date: Tue, 16 Jul 2019 17:27:25 +0530 Message-Id: <20190716115745.12585-38-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=jVR8wFlm; 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 Reviewed-by: Kever Yang --- 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 e0be9d2485..9e40880835 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -645,10 +645,14 @@ static void set_ds_odt(const struct chan_info *chan, tsel_ckcs_select_n = PHY_DRV_ODT_34_3; } - if (params->base.odt == 1) + if (params->base.odt == 1) { tsel_rd_en = 1; - else + + if (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 Jul 16 11:57: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: 787 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 933DF3F08F for ; Tue, 16 Jul 2019 14:00:13 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id o6sf10058883plk.23 for ; Tue, 16 Jul 2019 05:00:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278412; cv=pass; d=google.com; s=arc-20160816; b=x3i11/JNLIwC2cvUnp1QQraQTfGK8LbE8HHLIlQxEKuYfh1EQpyWt5nW9WCnY7f/M1 DxMI7kv1aRFUy3hMrCOXyhYJHz8bXoArjsvSWM2W0adU5ISjsB1AYGE+9kEMAhsQFEQi /l1W+gP8VDd6hyyhQ6adZNKgwHe15v5BPQSG8TtlOruAtvFAxOG1+Oo6q/fwvs7RaDEx 6sSn21RzwYvTyCUY77w+Jbi+D65pgpLWtcHbvlv48/LGZjU5D6aQM+9HUkKb2wASvldS 0ZJCaMKLDmjBGm21AreSqiViDV7b+GJBOIepyi/afz+EiXDuO5ZLCcvYYGrQFfzSYkS1 ep9g== 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=0FukqGSpe5UvH0exWSZO1h4uqcLDX+r8tulJlR3Wk08=; b=FKbQIEAE/yaSY/FsMY/og24wYaPIdfmyxDUTJDkksTdk19pqLybmYS2xXM5abblv8O bx5ShCu30YHvJbAROpR2GoUKesvpXa/UeskOp5XaYTHD7jhYZ0JP0/RV24/qfa8uN/rM 7yv8nm5nLr20aWf8h2zyP4d8K5YkoOPNmYGJkF+HLSVJ2rfn0QwVhc3DL4Rb2rlSzNxY XCzOwnKp1+nee850DQTY8X3LMXe+8e86Cl1GR8p7tPdxATBzOdhJEcXYayU4PEBXXYpc YlJUz8y2rzFrhmiE6dYTcrJXd87Fhl1KJCKvRFT3/Fesx+UDge6d9lAM5fYUekepZAPM CQjA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kvnO2h2S; 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=0FukqGSpe5UvH0exWSZO1h4uqcLDX+r8tulJlR3Wk08=; b=mRg+3o/HrcSxatUxYQtoLFBfhgyc19UNpaOOwic40FOyBls8TVPfRNm7yceKJXSG+e umYEbatzAlPllwAv8VPMqHM/alxFcr+u/sQXa7mo/6EeMNLynYml4lFUAKe8EoWWcQ2r JJOjLG/8qQoy/mbUIb7/b23Y06e1BmGOAyi9o= 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=0FukqGSpe5UvH0exWSZO1h4uqcLDX+r8tulJlR3Wk08=; b=eZSZOhU8klr7idBxS7iGDZCffPbL87DDc6foNzP7eZiE4vxBZdSAvErA86abC/n4V7 rSANnmjXGZpSrAuGHNHPDDAUrEp7F6romY/lhAe/e1xz6SuXQND1cEXKwAuaaExySIoM t4jYJlbtG9Tu2fHdAD2HVpmjusLNhJxyrbS+/ueJWCjmXM7TfrXwbBkkRxvo0AWEZxfi XqmbZZ6mKrTsIhCtEXe+dwRf5mvemXVIPPpQO+J2fhw/0RYicXesNXwDjiqJJVhFX6Yc efRWsxwLsX+geOvKikzHNwWdKprimzlT8jpVqYI986hziad5r5jhOx2Lvw673xK7yMM6 n47w== X-Gm-Message-State: APjAAAWFMd8jttsQqy1R1tuMXnd5ui5UIJoFA2mqAtfFcQ4xNTXfC0Oj U7zlYylTMna8rESgpHIsCJpoPRQy X-Google-Smtp-Source: APXvYqwjMTYX6fqN1Yj6UARaHbr0xfYPC+2iumSc8Wf0eN2SVNA4q63jeH+cd32JeeyBvZFW0QJCPQ== X-Received: by 2002:a17:902:23:: with SMTP id 32mr34815121pla.34.1563278412385; Tue, 16 Jul 2019 05:00:12 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:32d:: with SMTP id 42ls5470080pld.11.gmail; Tue, 16 Jul 2019 05:00:12 -0700 (PDT) X-Received: by 2002:a17:90a:21ac:: with SMTP id q41mr36313991pjc.31.1563278412044; Tue, 16 Jul 2019 05:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278412; cv=none; d=google.com; s=arc-20160816; b=Qm8H59hamTkk6vNQ6UF1txrgudrLODp/+nEiipweHnTXSwYU0RrXemShS4JEO0GeGL iGeh9kvfH9el5VA6+Pd4rM8fqN7Eo1SkoNF8CrFVRHwGGxnJUWArbVF8Hi09zgLs6xVO KpZI03JGyvUuLbKofEk86sSPj/SM0FWxjm2rUMMvE/ucA5RY5mleEgY2osKB66Sz8PNK iZb0TUDS9yOEH9UwZOyqSw5ntQf+nHvm9DTmdW/A+HoVddxhMvOD5liv6OB6bWy6fAfJ NUI4PuarOaoUhr3lLPG45oQOAHx8gjs74V4Me2Y4D981b7M0vUNp2qjpqJ9nVYQusnEs qAww== 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=mh5Pf5jjoLLteLnqId9idbQ7tEs3dWgvjmHLOwZoIVk=; b=TF0j1gCShwtS7Vqqt16G86XKsmV/dz2dN1nDS3jDgel4sqifBdHoPZRi+dp2qHxt0D FEXaoOjMj8MnHwE43v1tfUrYPhnEQqfMLItniwyIjYwgGwT1vvDA9RkcKDWYF4rx8QUP RM7BI4vXiSPiUcetQuYzf44Z9l5p7AOfkniETA5iyuqcydxieajDXE47O9axyma+TyPn cmGgTJavy6GPmkM3H7ssxAPJ81NjsFR1t31A+8W779NaS+w7TogHmZzF3fQ6WrhE0R82 Nigd8/ZEEMCCjueZS3ad8yVAJIX1eL1DnNgT7PHnKtLLuI5fPKtdml3AGZNKjMQLxhJB VQUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kvnO2h2S; 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 m9sor10379811pgq.33.2019.07.16.05.00.12 for (Google Transport Security); Tue, 16 Jul 2019 05:00:12 -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:2606:: with SMTP id m6mr32928694pgm.436.1563278411660; Tue, 16 Jul 2019 05:00:11 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:11 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 38/57] ram: rk3399: Update lpddr4 vref based on io settings Date: Tue, 16 Jul 2019 17:27:26 +0530 Message-Id: <20190716115745.12585-39-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=kvnO2h2S; 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 Reviewed-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 9e40880835..4a2622a440 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -338,7 +338,7 @@ 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 *params) + const struct rk3399_sdram_params *params, u32 mr5) { u32 *denali_phy = chan->publ->denali_phy; u32 vref_mode_dq, vref_value_dq, vref_mode_ac, vref_value_ac; @@ -349,9 +349,18 @@ static int phy_io_config(const struct chan_info *chan, /* vref setting */ if (params->base.dramtype == LPDDR4) { - /* LPDDR4 */ - vref_mode_dq = 0x6; - vref_value_dq = 0x1f; + struct io_setting *io = lpddr4_get_io_settings(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; @@ -770,7 +779,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, params); + phy_io_config(chan, params, mr5); } static void pctl_start(struct dram_info *dram, u8 channel) From patchwork Tue Jul 16 11:57: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: 788 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 3D1C43F08F for ; Tue, 16 Jul 2019 14:00:17 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id z1sf12218900pfb.7 for ; Tue, 16 Jul 2019 05:00:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278416; cv=pass; d=google.com; s=arc-20160816; b=I9LhCiplUzP11CPf6BL/vkgdXQPUfnU+l/t52//00SVkkarOcrziOjdbNeOwz3JHIH SRPN/zpdxIZTNzwDouY3YdK8/GF9yQSo7Mj5nJdg3DUdpzJTt99Ee1ANzv5Bj1nz1TIv +F5GKvTSVH3KNGU6J01hMA+OMtqBujYNfbLK8Qv6MaZaFUIEm1H9xOoM3BNQO7uMmgRH ta2GfQ6MwvO+BAKt3Gq+qDAcDVKh8JqYRTuULT50y7C5X0KRjvtfep/SjWPRxddIBwU3 THmrR16rSf8txAbZ4inhHIEXDvtfoYYymaV2AQoUfj+RnN+6Kv0AqW/PVvDb3F2Pfuvf 0obg== 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=m0r7sUwRVeH9pW+xTLW6InhOJuuQe8JNt2pT1N8rJAI=; b=IhdvSUAemrKPmUuo9i9Oq5pAugeFsES2vNgxYseJUEiaocjD/Ywg5bPDVbxB0m0iXv aizjQFBohD5xGQeNnvy5DvVvYYhSzEdxe24Ii61fo3Crs9QL9g7WWY9oQgKNP26iY3qT 13wlGkqPBeBlJerYVe01CVIsxv7eFOBkBT8WwEJGN4XtYy2Jh9l3jqeFm5RRRcwDd8po fDh6Qt3PB5XzlgD4wNufM5kDGd3Fb1elgPSAhJAvRKnoBjB2l7b9LGuVZ/knr894IvcD p1g9NU/idzTXP9i+B04MX/0Q2NmnlN/zcF5IQoQ7EZc+kImmmBBpz4PSgCe3CB58UXg0 znLQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="iW/MVogV"; 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=m0r7sUwRVeH9pW+xTLW6InhOJuuQe8JNt2pT1N8rJAI=; b=NNa6wsz4hrpYc973G1TR+mO0CjJ/lNnEU7px98CjOqjpp/d1vY+81tRTUCUKuUa7w9 HYFJZAoaGPP1swXZQ+ZNQeQ0kZYgCkp0Xz1DwdwTVAT5K1Z7x/4yaZvdryj8CMm15IhA /IQWe0SYYwga17ztXeXQmD/luYEo1SLc1rFe0= 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=m0r7sUwRVeH9pW+xTLW6InhOJuuQe8JNt2pT1N8rJAI=; b=Wb06uEsgYuQaqlXlLhSbZRkSCJ43g5VDA3yvQ7Pt2h6ziCP+n1Z71I26zktfbN6fXC o90pM2tvwlwLv0AsGY9rLpElkIL2Od9RAlRGBhBJnhz+j3vkjUM/hUxZL6CG7LiZHa9r DFACeL/h2JwkzdlZmKSUBCUvQsh6VX2zsC1aQpr7ek3hKNT7lUVpNq9uZHd7p6WniBgw MnLSUzJ69oUDKRisvjY1aIQ+huUIL8sV9/gzHSMSvKio6kBwG0F/8gF9x1w0j5XUvUca 6UI3OlTh4y+SFsjrX3x+HyoPr2g+BF3Sa+rmDBNsZnqtMhWolawmukKNRjn2bdUh1OXA JwHw== X-Gm-Message-State: APjAAAXjlC0jaHS8UohtDHIiSJzrX35Lpywt+/ItLqLea+hvr5ywcv76 MGL8zOMYG/5j2SGLLSyTxYjc9Jxq X-Google-Smtp-Source: APXvYqxqf/EgQASScujS4gUOAZWrXkK9cs1yWYMpC1q9oARov5I3S21hta2unzCg8Il/ZJdoLv14lg== X-Received: by 2002:a17:902:106:: with SMTP id 6mr35557688plb.64.1563278416089; Tue, 16 Jul 2019 05:00:16 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:7a43:: with SMTP id j3ls1755948pgn.0.gmail; Tue, 16 Jul 2019 05:00:15 -0700 (PDT) X-Received: by 2002:a63:fc52:: with SMTP id r18mr32909662pgk.378.1563278415616; Tue, 16 Jul 2019 05:00:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278415; cv=none; d=google.com; s=arc-20160816; b=ITa4qA4hBvaSbc1Cm0TVRHnEbefAKRLTe0PE9NQm4bQnZeLzgY7+/836mBgU3S+O// cWy/WqPjkARGQkB1bbez1ebs0CA1i7PmOorpZpvJadenmc9+3oAkePhlKdNoYzBQt56I iMq0vhWfUcmPD57Tlp2dNHnAUHah39ODaC1z6sk7HWvr5Lew4gXtvFj4fVMGQV/Rfg4g m/dDBsghw6RpYdjgSU18Ddy2t8qEhGeUKsoRuD33zUVyvyFascFvWpnIOuCa1tpNCJ0P EN+9pbwJnNafoKp/RHUWIOq39xXOVAPSZd7/NaVVhL0aZieftYuaO7dA/DAaytrr5ye/ TY3Q== 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=tI7Xr7ZfX4sDLFzoWb7sq8otoJ97peIqf/+DbSw/Gug=; b=Q145bVe9xDaRgWxJljMoilKeXRDRJq4maOphCD85ktw9+oVc20dwgjxf7Hsl/b7Hil qnGMM+5AjgAkyqyJq2V/Wq6OFxRPr/ugg3f8jFaoDXXUxFaZkWXKfjTspCr+HnTKSPZE pq8W+tVJFRNj+ORMlXTM1qxFk0gFzHh2YFN0QlhnceG0vWfZzaCbzQlap8CGZVtUUYw8 C7+sRETmY3HYZB++o3v7J1wMuMLfUQBBZWYe+k913iNStaJdZcgDLfA4qmJEGkfdmlFE SZTwfA9/Q4zZBv/tex7R1tQW6RrloegLWNkl356Mgzuon6V3l9JU8/LBAUAwwH/jODSm vpqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="iW/MVogV"; 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 e7sor10571567pgs.66.2019.07.16.05.00.15 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:550e:: with SMTP id j14mr29995154pgb.302.1563278415278; Tue, 16 Jul 2019 05:00:15 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:14 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 39/57] ram: rk3399: Update lpddr4 mode_sel based on io settings Date: Tue, 16 Jul 2019 17:27:27 +0530 Message-Id: <20190716115745.12585-40-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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="iW/MVogV"; 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 Reviewed-by: Kever Yang --- 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 4a2622a440..63763062f9 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -347,7 +347,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 (params->base.dramtype == LPDDR4) { struct io_setting *io = lpddr4_get_io_settings(params, mr5); u32 rd_vref = io->rd_vref * 1000; @@ -355,15 +355,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 (params->base.dramtype == LPDDR3) { if (params->base.odt == 1) { vref_mode_dq = 0x5; /* LPDDR3 ODT */ From patchwork Tue Jul 16 11:57: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: 789 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 9396D3F08F for ; Tue, 16 Jul 2019 14:00:20 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id 71sf10080243pld.1 for ; Tue, 16 Jul 2019 05:00:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278419; cv=pass; d=google.com; s=arc-20160816; b=Qo1htgf6ZGGeR8BTbt2N9GBFb1njP417hXEMsAHFawZ6EeHb1r+lSNJ4NVjo0mgqX1 gxD62c8R5goNXhewFX0/qmM75gZDpBOJKX848YvBSCO4wssFB7xrtR+GCCe24OZLG6WA 8pYfuNQDNNI9eOFLsOpZ1cfvPCCmBNz4RpbPVwgGIIlTGJbUi8+z0O55UcYiwi6HZpzi 6Htvh0wOCbV3IE/dT8j1yu1DK3bPuFA59/vnaAzjr1WJWz7jAbH/Aq3HCUqDS3x9wIbL WeJpul6WkeOOgmAFhhAMlpzL5JTbxGjRPnAh5pdrxm7dpYvOJRi/TzwIMa4yNdVrk8WS C50g== 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=9vGDoR0MoVlP0W9z2yofwxTazeuwoZN8dFx5ydve2FA=; b=x0QXSNHFy/5XIJna6UkXT5+fCqjUme1x6a9Q+xHcoLoiBjXkuVT6hXhcttntChwMv3 xDSonRsynLA0pfjX2YbjI1bY8CYNYU7LP44WnPZeK73rREP0UL9F8fXeVBNgcbI7hq5X 3kfRw1jK1kESCsjtPWZKKMOVxhc0C9vGTohJuXqPfESgjePGwtV4U5Bm8za4xqoyJ238 lybnaPwxNiknVrFZ4JdbGASUpNeBIYUdTfOTFew2SoJS7tdYh9tA7OCKaazEm1NFZMIS PcYM57LkuyMk8x11kYlNI9w0X6mToER3Q2PZFXIK7Dw26TtNiupmR7TH6xUYnK7eSSbV QiAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ETcPqIG5; 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=9vGDoR0MoVlP0W9z2yofwxTazeuwoZN8dFx5ydve2FA=; b=Rcj9DWSesB9C1og+427cc+Vx9DC2IejJ7+a4VDHOI4c7TlFJp5RKPuTS9RKPp42I4y pRW3a1Vi7FPY6+kSR9o7ITG+2Wmj8rWJOei6Pv2Yz0CXMX0c+sXt0lRIdRZWFzensbp7 mI142fgCjVqi564FZY6nqB3oh5sGpdTtlCuL0= 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=9vGDoR0MoVlP0W9z2yofwxTazeuwoZN8dFx5ydve2FA=; b=ZJGkMp2qyA4gh10T1OD8gJ3KawjJA5ayTfux/T2RtcJD91UdTWJzzEj64B3QUxHpL7 sz6+ZhPc3zG1TfYR6GFnuo1Gu0wqKg2OCeslAuVu3Go8rp1vL4yaYndx/83PeXTEn/MH cnbDy59311ygx5LwOt52jeGQLEhARI+Bqj8M9LiXMpzW/zwl+RMwGMREsLTr1gNfl7Ib nKeYOSY+ZHXAQJ4fX4lswOo8Ya/4InHHnMJoohpAClEZNmMERqy9bPNFFevB83DiJC2N 4LQMpiYCFOnneJj1C4NQtSUflRJjoZaXCo+cCQaIUykJrtP+3sguIILD+6OiY6yye1n4 B0rA== X-Gm-Message-State: APjAAAVckblbcYsdFZjKLf0/H2YrIwPa3YtEICqcJ3+v3C+eHBNzA7N2 Yojzj7IyUYuCXDIC0lBnB6X4ZDhf X-Google-Smtp-Source: APXvYqzT6O8fC+q3wKnhxbYHgxGsqt/zQdNkGukuslAhbrBK1uq66b2JTRJYgPp4R94xjHUUEfzArQ== X-Received: by 2002:a17:90b:8c8:: with SMTP id ds8mr36322650pjb.89.1563278419430; Tue, 16 Jul 2019 05:00:19 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:680d:: with SMTP id h13ls3345393plk.13.gmail; Tue, 16 Jul 2019 05:00:19 -0700 (PDT) X-Received: by 2002:a17:902:70c3:: with SMTP id l3mr34167011plt.92.1563278419167; Tue, 16 Jul 2019 05:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278419; cv=none; d=google.com; s=arc-20160816; b=iWfeI71pxE/9DV/A3OL1sZxLzb1hK6qbXpMQUo+pcqlr3lL9S41l06ORJZuFy18s0D fIZqSN30zFVAT+ktqJjkXCQWTMboDV0DWpWiG4il3NZXWs/8HBFAKx5cLQM1e4+/IiNf gcHqUZW1iacOsH6I3xmnAVzYGKVdc9RSPHMgbO3Af3cOIYbaG4+RabJpZHojskA6af42 avvpxu123wc1QFGkeCjKggg3E1+w4KQVw2tTkqeXFrpwxZkpuTuHzFpMkYZSQe91ie9m 7cK4HTSIUS764XSKZY3zMSkJmDMuQD7T1XxWkiTq5uBfi8e7gRH47gvir7xpkCHIPovD yKpw== 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=SzmNE6oRJq62Qe1EaY6AldKbjHb0i1Rbf/HXA3VbVEU=; b=mp2fAMNwVVaAPC2d2UQ9BmHpR2rg43D2G/mBXSgONbX5Hm8TsBz5/2OYvunSdSCKOO /+F6cnDLU/0yxvhhIERSbqQha9MQc6UcHgmRsZLmnjfECXAEIZULvnAR4J+wvAfWZ9w1 UqdKeyD54AQpD/yM/K8lGCb0FvF8N+0N67wCUtxkrlZrEoLXJem8hREcZGgzzJt9plYB d1G2yBQgRWVVUFYoamFTjwO9VXeRb6pOdcXAh9gPl7L1eIesvPDF7qeR0pSqYCjSnKE2 La0pzTTTXnRa//FSpbF5yZZq/+Y91rULuBz2LI0HJrghxfI5J+si758ihXRJNCxx2117 macA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ETcPqIG5; 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 s14sor25328106pjb.11.2019.07.16.05.00.19 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:90a:b00b:: with SMTP id x11mr35937142pjq.120.1563278418823; Tue, 16 Jul 2019 05:00:18 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:18 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 40/57] ram: rk3399: Update lpddr4 vref_mode_ac Date: Tue, 16 Jul 2019 17:27:28 +0530 Message-Id: <20190716115745.12585-41-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=ETcPqIG5; 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 Reviewed-by: Kever Yang --- 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 63763062f9..e3f1abf7e7 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -366,7 +366,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 (params->base.dramtype == LPDDR3) { if (params->base.odt == 1) { vref_mode_dq = 0x5; /* LPDDR3 ODT */ From patchwork Tue Jul 16 11:57: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: 790 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 623F73F08F for ; Tue, 16 Jul 2019 14:00:24 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id b18sf12497620pgg.8 for ; Tue, 16 Jul 2019 05:00:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278423; cv=pass; d=google.com; s=arc-20160816; b=rlXpmpe8k9AmnJoHUud93N3B9hTtD79wo9oPgb2UPl82MR/dgQ2lR1XbKuC9EknaEg NAfa1X07hBwn12vewfzIjPZh1nh0lgVYSnFHu3FEtCLlvbGFrQFS5sp6hUr5lLIdyO7W 7SYYovOB7R0Q2tunShZnO7pZPpfpELlO8H9YNHr1p8c637A46qzY2/yoTGFjb+2WSZs9 mGtKv3u7xYACZToKz/jm3KluQYFw46fcpFjZHBzbV/3fbxP76GNCL+Ccip4v7o6sH0+U sNRy9Vza49P8obyE7B49ktIqqxPvQH9A3V493iTLQ4p4YPaH4PUvpWzY0O0QjaKfIOy5 5KNw== 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=SwKOYTRw/Iu7qgJ6NSXAP9k2VZvH/zsX/v34+m67bPc=; b=oqU4oNWZqolpPxXv6qYcJ78S6NicKFd7eFV1y9HjZn81opyQ1nPd5aRp+kHW8JXFAc WxnPaJjS5gr262EbhTtKRmxmXxjlouwV0i7sMWAX08CowbvRqrArJq9h7HxoqcgP3znd 5+xdflv+I0qm+nlZkPNXJ2tu1A1qDGoi52kFLS72DdOFQb/KEdACXbEcp56cc20vwZMv 8gdcZwtnA0M0gsF5g5Es98f3KPFVKT/4z3oIsllkjgSFTLEG3tEzz3a0ZdBqs9xtnJV6 UDhg3kYeMoS5DgU8DTnh7liwWmeLVROMpFl6DPcasL/zydD/+jMAZYbp30SsgMj+7nh0 KwCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HYCN8itO; 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=SwKOYTRw/Iu7qgJ6NSXAP9k2VZvH/zsX/v34+m67bPc=; b=AndSOvsCDWLS4/jH32bs2Rj6DDx2ANY8Nk/t5YxZLOaQ+M/Mv19zihLloTEzwVFbOM 3VCe1A3NlG5ypju/yP21Gp7Uf+ezoB7xGWgN7bZ/vQJpoR86yDa5moBLtaiir7MFDOto C6PVklJzgu9K5mBGJqAu2CqKnNPis1KxWKpK8= 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=SwKOYTRw/Iu7qgJ6NSXAP9k2VZvH/zsX/v34+m67bPc=; b=FVKXBknGQDY39XYFPwVkedQxch/vmigC8KmM6pj2PTtZwEN+DXgI5yR2cRpXI+lxCH BLrbMCvqycewfQ97AJcT0Igk4ia/DpqoPNI24G2NPlHoHyWuSqmfVUgb+Qmx75cixl/X /todvnq8L+8HDsGPTBXI//4MPEtW8rjWE2bDUxhH40dF2ta0P5z3vYI/QkuIVbm3M9TR idJkada5aUoMboO6bF9Je4s4Z73QOm2fTnKLiNJolpGxg7DCNFOvnJ+AOLxUf3xsTkiS qhVRxAMtFapyLvkqezWrV6Nb2qOT2FOd8zHY0W+PJDElojfDzPnIMtGgk7YLBhF0XMGA GqWQ== X-Gm-Message-State: APjAAAVlSV2g573dgiDb1b0sSet1BGBNNtUfOvwVYB/eYnmDgMwfZAB4 dUlt42Sb/BHcPNHKi8sHGm4rxGnA X-Google-Smtp-Source: APXvYqweMG2LbdDeCp/ECKrV9zmYBCnHmjHUZ5lo+ZHDvX+iV2Kfs1G+L3/iRVF6+RSQwZtxKH2aBg== X-Received: by 2002:a63:204b:: with SMTP id r11mr33090117pgm.121.1563278423154; Tue, 16 Jul 2019 05:00:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9684:: with SMTP id n4ls5475686plp.2.gmail; Tue, 16 Jul 2019 05:00:23 -0700 (PDT) X-Received: by 2002:a17:902:b702:: with SMTP id d2mr35909700pls.259.1563278422878; Tue, 16 Jul 2019 05:00:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278422; cv=none; d=google.com; s=arc-20160816; b=MQEvwFNXZkLfKr9MiLyuk9/d/m8spoVtaeA0xrVUpvuAy+BOHgTZ1FfiwDRVCVjVJ3 QZ2LYbmWgoD6Yy9z7I9ludXkAGToQZ79A2cH65UCQxSFZZ2iMhYcFzcvfkiNcyr4FUzd pq5vZDfrKwn4FGwFObxM12AMv0BsBn4FGy3HHfby9/pp1Vzbc5Rb0QEsDUKNCJWEBUQc f2nQWd6rbvvqBN67BKB/qAq3HKmmDJ9uPGj2EiY8fyfagAwknX6/vc1Wl70usjyVdZDj sBYlkU2+Q0w+VKhZI5VUUqaj/q4kp6jV9MudCRdWtqqIEsrirpTQSuoPZkRAj0MUWfkQ jRTw== 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=VvWydEF9oVgUS+CUD5vS0LDJwAA7MW8cQAg1qTdiTb4=; b=ZszUYhyY4ocYeFhCuLZoEmRQye9g1RCUz3U9RRWsrlQI5mgU7HFxBAVb7ubb6an1KC o18HNGHjdMKnnfOSwu0KuJI/Pl92/vIggHOev637kym5sRlKpGAVVhM4obxepGh05n20 npsvLKLkyv455gStCPQNq98aDbafCb43G7ItX/JnaBkqJHF7VLPZl7w4f9kl8ZGPsZnX TVm+GwwHnL3rESMeeGlmOcDElM92WOGojqCmg5/KqDu7Z01yfnLUfkNfNAiezKgUlQhM 2MM1KGaolVk1JBbvbd3bUgKncuJBXJ/8LmIywDSekaexvIzoyG5owWtYZa2GnPdnA0pa eZVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HYCN8itO; 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 70sor24620997ple.41.2019.07.16.05.00.22 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:a17:902:f46:: with SMTP id 64mr35065008ply.235.1563278422580; Tue, 16 Jul 2019 05:00:22 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:21 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 41/57] ram: rk3399: Simplify data training first argument Date: Tue, 16 Jul 2019 17:27:29 +0530 Message-Id: <20190716115745.12585-42-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=HYCN8itO; 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 training is using chan_info as first argument with channel number as second argument instead of that use dram_info as first argument so-that we can get the chan_info at data training definition. This was the argument handling is meaningful, readable and it would help to add similar data training for lpddr4 in future. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index e3f1abf7e7..1aaaeb5b88 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1286,10 +1286,11 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, return 0; } -static int data_training(const struct chan_info *chan, u32 channel, +static int data_training(struct dram_info *dram, u32 channel, const struct rk3399_sdram_params *params, u32 training_flag) { + struct chan_info *chan = &dram->chan[channel]; u32 *denali_phy = chan->publ->denali_phy; int ret; @@ -1498,8 +1499,7 @@ static int switch_to_phy_index1(struct dram_info *dram, for (channel = 0; channel < ch_count; channel++) { 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, - params, PI_FULL_TRAINING); + ret = data_training(dram, channel, params, PI_FULL_TRAINING); if (ret < 0) { debug("index1 training failed\n"); return ret; @@ -1662,8 +1662,7 @@ static int sdram_init(struct dram_info *dram, if (params->base.dramtype == LPDDR3) training_flag |= PI_CA_TRAINING; - if (!(data_training(&dram->chan[ch], ch, - params, training_flag))) + if (!(data_training(dram, ch, params, training_flag))) break; } /* Computed rank with associated channel number */ From patchwork Tue Jul 16 11:57: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: 791 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 2A9573F08F for ; Tue, 16 Jul 2019 14:00:28 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id n3sf2651791pgh.12 for ; Tue, 16 Jul 2019 05:00:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278427; cv=pass; d=google.com; s=arc-20160816; b=A5ULVJx9BqQU8jYrMDvSEm2/gL0aPbID72WKv/DmAsuLSdG7xGkDatgv/X6UeO2+W8 3gjydedqfsoWA4obj5SVG+BB2Tp3NkZHwTJNLwNSZY4DlxtQmHM6JP+nk7tB3jXQWYsP Rg414FyzwP6KT5V3u665tfINIl8fuS1VX3ajE2S/hLhxpUXKt0WfvIuIUDQwAAMrmInv 74lsi5nRbluWgBX2XKB9nPFhzFj/dg6cRli/AvZRZ10cb4FQ98DnICbGPaXZJrt4QMdn mz2qx68GqArtrh144MuL2o2e9gVmrOOciUbZloX+OITdWDsjVHaCSIeihBoUOmrUA2f/ fkvg== 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=q/ehQE8all5+P1L+nIvRkSesM1Z2R4BFBHLRFrKLpn8=; b=Edh8liNlvWea5Dl5z5ySFJGcxQNdwUIfCWAOHKhO/YDl4IcK86yQk3ox3OUMdevjJM JRXDF4FDmHqWUE9MDVXNq9vx1PfzGBN+rwzQR//ro6l01z8el+raTfTyBj8nHAzuA4aq cjrRYmOcjq4IyQQE1DiiRQe6XgBAP3hJgucyjM6hAiK6mvmX3rnrP0oN4Ev/p3cCwaAd bZvr+Chd0CrojxDagxF3hzZRbQcxpq9A1xbh7jaKn6QaZq0yu56pL60thM0PutgJ2fES Ghx6I/JY8TRhEw1c4gohLmlhp66vCa7JIGN6sw6mDLaWKdqOrDLsGFxkTTRr2BRomnWW fNOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EIdIpU5F; 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=q/ehQE8all5+P1L+nIvRkSesM1Z2R4BFBHLRFrKLpn8=; b=IaNxRUVBCB8cHuPrrzUZZmP77mP8I/LWuHw0wSUOZmTEzpHWXH7yB0U/H5l7Ye5Xda /TCvdP4n2z/Fmobx3BQv1ByFqaOUBgi7PxEn7I4co5N0AgkmyWK0MloE5sdpXydafOtq Sl+cyuXR6S91hQcWp7G5U0THkOGWNjvrauv6s= 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=q/ehQE8all5+P1L+nIvRkSesM1Z2R4BFBHLRFrKLpn8=; b=mZfF3Hgsbmmu3litiGEV5awna57/N5ZXoB+D1fUBU65Qb7Hc56gGJBpQWsBimTMr54 76sBYSHl8e1xUVnVlJA32rSmkQOmtvaabZkZBdTdBcxzLVkR6M9g2fXdxQ0aFKIjvOKM Jc+X/SjBZDfYmDOPPlykSTwVkvhPdVqeMy2u6cf4IUkC3wLT5LhK3h0criHyhaRDKU8C tWnAxMvfZOCP4lNyHpIK++lvGtoEuo70ETgHpmYJ0wfIOXs1r0MkHWImWE5Ey0HTPxB9 V7q+A8zfVRjzBgEu6zP4r7NCTPK6FdckHwxvS/ZTv4ADKZXjo4/JnIj1a8FXX7pLCC1Q zSBg== X-Gm-Message-State: APjAAAVapBbjAtJmXare1EIFBnkdT+GlTfe5Ay6QoUU+kMGPLTxZ3hPT MyzEsOVMXUp9/yG6nPqyJhQhQkFX X-Google-Smtp-Source: APXvYqyOpFhAbs+tVIZCB8WfmgKQ0wKzVXiv3/65s12oTxnyYZmcZrHHjX085WzUD4qYOBIfJ7yKvA== X-Received: by 2002:a17:902:968c:: with SMTP id n12mr36496097plp.59.1563278426979; Tue, 16 Jul 2019 05:00:26 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b402:: with SMTP id x2ls5464907plr.14.gmail; Tue, 16 Jul 2019 05:00:26 -0700 (PDT) X-Received: by 2002:a17:90b:d8b:: with SMTP id bg11mr35694742pjb.30.1563278426677; Tue, 16 Jul 2019 05:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278426; cv=none; d=google.com; s=arc-20160816; b=vqL1ef2ONXlMwXMAEw4UoQqSzRBXThlkILptU2sgTDnTCnmRI8bwCrxfQLNgtmCdCy zMBGb4qciM4UnR2/TMlKbbF/pvKSfM2uU8s32OGHZug+iohHqmVvwwF1WfT6u0ppj7k4 8XbQPAjIjINcCit5SReSczSuI3YU7AI0giJC/rMDtwu6FPKfOUsvR1GVaGdnLgCa0FJ5 X/MhyAw2BJAx/sLqWkj27Va55kN6gkBF8ZRmRIZhoYTPGsBAtrZAaujBMykQNS7XrGli 84yfl8J3pAK5cGvsfl307iAZI9q2Lm5PfottU7IHryGnzp3qm9yEh0lxJqvK7dm0O4hi fvOA== 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=pvEnnrz0lb6LWaNsBzHfmbnfvu86FZMrrMpEWA2uhEI=; b=ZIy4svpY2cZHv6+qlKa+O6GPoRyPxoXGSKQPxxAZ+5fKFUGXahDwm22ofRIil6pJWc V5uAlSGFXIiI675RbvKJs2k7P5q6ChJznvxguZud0mVmBcZVtN1lvS3TVT4DkmMf7sFu y/oNWmEU7lG6G/3sDbF3XGfsc8Ul+zHUfSDBNHYK76YISqzgTdwBvKmrEzYfyMsk/GHC 2C05/RuL2FwTDAgO4vyVSRSl2CdOOYPzLI0UvRQzSjy0LAeTWtGRh5u4CzCOXk4/v2gZ tbSZvpCMhSMA5/Bh7TsGHsAbQlg97swwYo1F4h5CPmao7H42ZsAzAqz6+4Qpmog5W71E mZcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EIdIpU5F; 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 11sor7618541pgh.67.2019.07.16.05.00.26 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:a63:550e:: with SMTP id j14mr29996532pgb.302.1563278426206; Tue, 16 Jul 2019 05:00:26 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:25 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 42/57] ram: rk3399: Handle data training via ops Date: Tue, 16 Jul 2019 17:27:30 +0530 Message-Id: <20190716115745.12585-43-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=EIdIpU5F; 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 training can be even required for lpddr4 and we need to keep the lpddr4 code to compile only for relevant boards which do support lpddr4. For this requirement, and for code readability handle data training via sdram_rk3399_ops and same will update in future while supporting lpddr4 code. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 43 ++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 1aaaeb5b88..da01f08732 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -65,11 +65,17 @@ struct dram_info { struct rk3399_pmucru *pmucru; struct rk3399_pmusgrf_regs *pmusgrf; struct rk3399_ddr_cic_regs *cic; + const struct sdram_rk3399_ops *ops; #endif struct ram_info info; struct rk3399_pmugrf_regs *pmugrf; }; +struct sdram_rk3399_ops { + int (*data_training)(struct dram_info *dram, u32 channel, u8 rank, + struct rk3399_sdram_params *sdram); +}; + #if defined(CONFIG_TPL_BUILD) || \ (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) @@ -1464,6 +1470,23 @@ static void dram_all_config(struct dram_info *dram, clrsetbits_le32(&dram->cru->glb_rst_con, 0x3, 0x3); } +static int default_data_training(struct dram_info *dram, u32 channel, u8 rank, + struct rk3399_sdram_params *params) +{ + u8 training_flag = PI_READ_GATE_TRAINING; + + /* + * LPDDR3 CA training msut be trigger before + * other training. + * DDR3 is not have CA training. + */ + + if (params->base.dramtype == LPDDR3) + training_flag |= PI_CA_TRAINING; + + return data_training(dram, channel, params, training_flag); +} + static int switch_to_phy_index1(struct dram_info *dram, const struct rk3399_sdram_params *params) { @@ -1626,7 +1649,6 @@ static int sdram_init(struct dram_info *dram, { unsigned char dramtype = params->base.dramtype; unsigned int ddr_freq = params->base.ddr_freq; - u32 training_flag = PI_READ_GATE_TRAINING; int channel, ch, rank; int ret; @@ -1654,16 +1676,12 @@ static int sdram_init(struct dram_info *dram, params->ch[ch].cap_info.rank = rank; - /* - * LPDDR3 CA training msut be trigger before - * other training. - * DDR3 is not have CA training. - */ - if (params->base.dramtype == LPDDR3) - training_flag |= PI_CA_TRAINING; - - if (!(data_training(dram, ch, params, training_flag))) + ret = dram->ops->data_training(dram, ch, rank, params); + if (!ret) { + debug("%s: data trained for rank %d, ch %d\n", + __func__, rank, ch); break; + } } /* Computed rank with associated channel number */ params->ch[ch].cap_info.rank = rank; @@ -1743,6 +1761,10 @@ static int conv_of_platdata(struct udevice *dev) } #endif +static const struct sdram_rk3399_ops rk3399_ops = { + .data_training = default_data_training, +}; + static int rk3399_dmc_init(struct udevice *dev) { struct dram_info *priv = dev_get_priv(dev); @@ -1760,6 +1782,7 @@ static int rk3399_dmc_init(struct udevice *dev) return ret; #endif + priv->ops = &rk3399_ops; 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); From patchwork Tue Jul 16 11:57: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: 792 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 CC1C63F08F for ; Tue, 16 Jul 2019 14:00:31 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id m17sf3565954pgh.21 for ; Tue, 16 Jul 2019 05:00:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278430; cv=pass; d=google.com; s=arc-20160816; b=L0ljKCRk2dNCACyShZZIUvhbsmShtzE8ltQoLUS6LuSU+57HVHZWcMXU/gMWxapVw1 nPBN/FQKRzq19gl9bAtC6te1PqdQFOOwCH10m5akaFyOMEykIrV/wMHcTQ6cDGObkCBu CpCUcbFQdMY7h77Hz0Smty45pyNynFc15FbKM4UPLZ+TOwU6NGVh+DVOnF1jjk01uQHo FBFhILjbSlfdsfH/hHl5i6czu9jcj7REJhWOzbBeO/BrvUOiJ5hbOzhv4eX2bSw4giLp 5lKc8fKHdDCqA3AbF6vlmvX7I0aEsEM9Ior/1x89E+bjRRbQ9GP3HyRO7DQyfw76/uWV ARnw== 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=WTImTGXZkCrVJ5J8B9P1bF1u5QoVR6Yw0eQZVI+EvUE=; b=MLRvt0/kfe3rKp3A5UGAB8ymOQTg1RDaOM3ohh+1jB9L0ttGKgTkFOXY2Q2XtFtP4n MaGTSzIFqCeX6yrmVwRx5dDSAScb8dbyukFIL37dpodk9Ob5szVkc1uoo72Dj144f/TO rc5bLddVMK+3DFT1D/iCvUhbAcFNs+LZd4Z1nqX3+A7bNANQkYmy3A2hAP1uV38hT1Lr C55b1Ri+1Cul/++nXuiZ8/MwSQxPyMu1yI3LZP+785+WhEzyZsgePDVHZyyrbQE+cElK BwOfwS1Ge9BVBXs1iLpIPQPBSfDYxVIvv5w/XkaLJu33BD5m/2wCW2teFJMCNvjVNPTd g1yQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=K3lhGmSn; 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=WTImTGXZkCrVJ5J8B9P1bF1u5QoVR6Yw0eQZVI+EvUE=; b=B7uhgbCfP6ysDuH3h1zZgchQGHU1k/Z1sFZFszucbzsoYfH+Zka44uhsBHwdE4Mie/ InYwQMlZkkpA1qn2MfWFAW5NRJ24UMGBZ3jIE/kKANMT1Cfp6Mmq21bWsR3CKtXLMVKI RDoyU69sBqlRe77edoSM6CiqP+9TcsAYskqOA= 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=WTImTGXZkCrVJ5J8B9P1bF1u5QoVR6Yw0eQZVI+EvUE=; b=HN2+MvJFuBTtZCCMMxgQH+VBNMWp/gi91suWTJEAM1HNVcazzRXKcAVlBJwaWrhIli CiNJkLnOYakxoEsdd867AfERlTLZHC8qfpoO4W4wHH50UNhOnjHmnOr3AmC0ZKrPIcZ6 uLUZgf/XDBUcT0+KCVYaHsOj+uFb/PfkVzhUNDaWgDN6m183VEbV6vGlguaHXvyhWB51 ZKj80+EnnCqqZUAlZ1kYeW1ksf0mCy+WFcY6ReXufTYgNwf135nowGviQqm5uKthzn3e Zq7mPTMRGnflC1LEwM0UOmeiaWa7d8WF88wFeAneV544uPJiPv+QYMIG9vWJTao0dqXy Q4+g== X-Gm-Message-State: APjAAAUnX2E4YqnV1Sct5mli+oJxLC+VWY+Gt36YIdHDIZfCK8Q8k87w /GLSaP+Lv+VVnpfoy6Jbo9UJSN6N X-Google-Smtp-Source: APXvYqyfrnyKdzFMkJ8IDVEeSSDxtZQkrR7Bn3TsXBGto2V/G6g46d2Mjhe7rRi4ukdvF82EhNKZmQ== X-Received: by 2002:a63:4e5f:: with SMTP id o31mr33740384pgl.49.1563278430537; Tue, 16 Jul 2019 05:00:30 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:6b81:: with SMTP id p1ls4223002plk.6.gmail; Tue, 16 Jul 2019 05:00:30 -0700 (PDT) X-Received: by 2002:a17:902:9688:: with SMTP id n8mr34057796plp.227.1563278430216; Tue, 16 Jul 2019 05:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278430; cv=none; d=google.com; s=arc-20160816; b=zyInX64ZTCUh6RzUjCNWUMLd1gMG8+varmCA/iqOndVcoEATGQhLUJEEXbHBOGvQ7o CClO6++kOHHd7jIyFf1KCNyjHuqIW3U1OTaFj1rYJVCuK5td0dRuqK4iL1ZMuzg0IVkN mYvp5WBvuuoEJlPvE0SuB+wB8Qeim3+N3HuRg5PBMFbbSg7pd/PBmke8U7LSrwST4NMF yYD4OFm4NohHQBrlxtC22jIK0HECeyb3ENVofalyp2wlD7lApIf3N7aD0/0HRLt/BBKJ i9U6IXUvV+/VjvCPsNJYqM4YJbDrR8jhzuv+RsGMBLvqaHZ6c4ET5oz3idYii2gq9Vsj rZgQ== 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=b4BLaekI2K9GhOfNexihMzKGNJDUcPNIWa3ew4v23qw=; b=b31Rzhk3cOiycOun7csxOYK/8VVWtMlaYZJxwMJZCkI7CCdmZReb3UZiu6rPbkn+rk Ag9o8nbRK7ek9Ci4rVJ8al3+5ifqiCdhx3u4v9MbwlaULnsgfIGUHTC1xGORfuTt8++l 9jfH4uxFtPF8FCVrd+AkbdqEYrpiUnfgXKPi0hwtEpsYeSCvfa0oOAKE8ayvLw/MlK/B tF2oqLrGY0t36GgVl0eiHpsctTr7MJBTa3eQ2f+UcK3Dl3OX62Vr5EV+OxfBMrigFP0H lxsIkBA1K9mDmWWU7ZPFqGYlat2uxSxMSjKdPBIedVPKnd7/LrOxA5iD7gqj/5hawd2g BqkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=K3lhGmSn; 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 r140sor2081432pgr.22.2019.07.16.05.00.30 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:a63:fb14:: with SMTP id o20mr22137271pgh.136.1563278429813; Tue, 16 Jul 2019 05:00:29 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:29 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 43/57] ram: rk3399: Add LPPDR4 mr detection Date: Tue, 16 Jul 2019 17:27:31 +0530 Message-Id: <20190716115745.12585-44-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=K3lhGmSn; 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 Reviewed-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 226 ++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index da01f08732..623685e3c5 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1470,6 +1470,7 @@ static void dram_all_config(struct dram_info *dram, clrsetbits_le32(&dram->cru->glb_rst_con, 0x3, 0x3); } +#if !defined(CONFIG_RAM_RK3399_LPDDR4) static int default_data_training(struct dram_info *dram, u32 channel, u8 rank, struct rk3399_sdram_params *params) { @@ -1486,6 +1487,7 @@ static int default_data_training(struct dram_info *dram, u32 channel, u8 rank, return data_training(dram, channel, params, training_flag); } +#endif static int switch_to_phy_index1(struct dram_info *dram, const struct rk3399_sdram_params *params) @@ -1532,6 +1534,226 @@ static int switch_to_phy_index1(struct dram_info *dram, return 0; } +#if defined(CONFIG_RAM_RK3399_LPDDR4) +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 set_cap_relate_config(const struct chan_info *chan, + struct rk3399_sdram_params *params, + unsigned int channel) +{ + u32 *denali_ctl = chan->pctl->denali_ctl; + u32 tmp; + struct rk3399_msch_timings *noc_timing; + + if (params->base.dramtype == LPDDR3) { + tmp = (8 << params->ch[channel].cap_info.bw) / + (8 << 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 = ¶ms->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 (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 *params, u32 channel) +{ + unsigned int cs0_row = params->ch[channel].cap_info.cs0_row; + unsigned int col = params->ch[channel].cap_info.col; + unsigned int bw = 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, u8 rank, + struct rk3399_sdram_params *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 (params->ch[channel].cap_info.col == 0) { + ret = -EPERM; + goto end; + } + + cs = params->ch[channel].cap_info.rank; + col = params->ch[channel].cap_info.col; + bk = params->ch[channel].cap_info.bk; + bw = params->ch[channel].cap_info.bw; + row_3_4 = params->ch[channel].cap_info.row_3_4; + cs0_row = params->ch[channel].cap_info.cs0_row; + cs1_row = params->ch[channel].cap_info.cs1_row; + ddrconfig = params->ch[channel].cap_info.ddrconfig; + + /* 2GB */ + params->ch[channel].cap_info.rank = 2; + params->ch[channel].cap_info.col = 10; + params->ch[channel].cap_info.bk = 3; + params->ch[channel].cap_info.bw = 2; + params->ch[channel].cap_info.row_3_4 = 0; + params->ch[channel].cap_info.cs0_row = 15; + params->ch[channel].cap_info.cs1_row = 15; + params->ch[channel].cap_info.ddrconfig = 1; + + set_memory_map(chan, channel, params); + params->ch[channel].cap_info.ddrconfig = + calculate_ddrconfig(params, channel); + set_ddrconfig(chan, params, channel, + params->ch[channel].cap_info.ddrconfig); + set_cap_relate_config(chan, params, channel); + + cs0_cap = (1 << (params->ch[channel].cap_info.bw + + params->ch[channel].cap_info.col + + params->ch[channel].cap_info.bk + + params->ch[channel].cap_info.cs0_row)); + + if (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: + params->ch[channel].cap_info.rank = cs; + params->ch[channel].cap_info.col = col; + params->ch[channel].cap_info.bk = bk; + params->ch[channel].cap_info.bw = bw; + params->ch[channel].cap_info.row_3_4 = row_3_4; + params->ch[channel].cap_info.cs0_row = cs0_row; + params->ch[channel].cap_info.cs1_row = cs1_row; + params->ch[channel].cap_info.ddrconfig = ddrconfig; + + set_ddr_stride(dram->pmusgrf, stride); + + return ret; +} +#endif /* CONFIG_RAM_RK3399_LPDDR4 */ + static unsigned char calculate_stride(struct rk3399_sdram_params *params) { unsigned int stride = params->base.stride; @@ -1762,7 +1984,11 @@ static int conv_of_platdata(struct udevice *dev) #endif static const struct sdram_rk3399_ops rk3399_ops = { +#if !defined(CONFIG_RAM_RK3399_LPDDR4) .data_training = default_data_training, +#else + .data_training = lpddr4_mr_detect, +#endif }; static int rk3399_dmc_init(struct udevice *dev) From patchwork Tue Jul 16 11:57: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: 793 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 9EE4B3F08F for ; Tue, 16 Jul 2019 14:00:35 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id 145sf12238846pfv.18 for ; Tue, 16 Jul 2019 05:00:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278434; cv=pass; d=google.com; s=arc-20160816; b=Yj8KkEmIdlMsV7yn+QN+0bmOkxQFGn3dQXWh4vhq+rkwqoX8DgaB0llDjI5tNbnEvj Ebqe6fcjKwLelkjk70xdZtSUmG00z4VhAGrn2T74BS1EtSQ6aQrnhi+AYg4Kk19qt0Sb WTRlqeq03waTVhi11cE5K8jDl8XfdxiW1FDjvJWuBZHc8p2xlM8JqeVH/ZZCw4ajoSXe M1gowa8SS3kvFRq6G/RYDJ0ajoAxf9/lJ3sxq0UbnbPmPI8YmEx5JpDKHh2mpDefh8+o mUlf1zAfi5AL7eEzk+Mxlfcwt14Fyxr2+VqLQODDG/Csn5VWdnqSHu06xsXGecaeGtb6 SQMw== 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=FfUjA1lsqeZ2PHkqy2JK2RcQR8KLxL1BB+AC1lYaDvPSPseLTekIZpZak1wXf2ynxB mnZVhNRE/o/uSJ0v7dJtyoUnljzjhOmB8c0k7ujC1sE0p3YPhfzTf+6ZUu1YgXKGr74R fwW/vPT6fGJ+HRqfm9eZYCAtoQCEACq79OZuVwZ6mfxlF79dy3y0UlDNYZ5t2qYNsn3E dJNTeMTgR+hTC9yhh0v4wS/BzBsiJ6Ykpxw+ONKBhsFHjypv5H+68emVvkKzDXuH1IqI gB+rmbrV0DW/vsiLF5rxt/Bg5h3dB5txSRSdTAAyFVcU5cZKxjXoKksdGHKfSQ5gxXa7 Tmrw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=INi12PAP; 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=lWt+KE0QPIJqHBqAosXhE0MVhvrk6myh4oUzqYa9pQc7M9tWQCdcii9h3GF0jbABCo Watl2D4xRAaYj8u+uaGkNU26Py54AtfgdOYjMWC6NMTuode1EAEMTh5qEHply8IjCPxa zTmtoSNGSF2rWFlvADgd5dT29DtU6qQsR0kmo= 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=Vj7oqWgkt02m3YTQVeEKO5QnvEPA8FIibeG3DhKoEdEQUFbHQ3uqi8c4dKNOU16wG9 yc/a5m678IJrcBmeevqEYhB18KiH691GJXiihbhR8uOOLevOLxdeo8qR35avLZz2ue0s TV+QUaCOUmbeqQ49vUPus9FNV2Spq7omco/cKF/zefaeXklMZ/y0uMO49RTK6s26hnVE kngGxbPmlwPxRqVnvbO/ksGeK6I7iH/bE+dvmNwoLIWaMcKcVqmJ/f4mUAfXGd6GjJJ/ wgCaWpHrE38LJ/9Lnm6woWJDPsO3RTzBQTSDEyXNU1/PR2UWmfpTFL1nfoewWMbtx033 +zjg== X-Gm-Message-State: APjAAAVf3G7XCS7FNlPLUlY/eEXLVVSMZZStJJjz2QoI7Yt+BRYaEjrJ CAMB5cSO4WoCaIZXQjo8A5xs5P8p X-Google-Smtp-Source: APXvYqxHmbmUcmTuinWvFhCoC4tbxa8wIdfkzOINNY3uhE+e9ENGCFKI+Y6C0CS1m3usyiBjk+p51A== X-Received: by 2002:a63:1045:: with SMTP id 5mr32929795pgq.165.1563278434390; Tue, 16 Jul 2019 05:00:34 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:3fcf:: with SMTP id m198ls78632pga.10.gmail; Tue, 16 Jul 2019 05:00:34 -0700 (PDT) X-Received: by 2002:a63:20d:: with SMTP id 13mr21096037pgc.253.1563278434029; Tue, 16 Jul 2019 05:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278434; cv=none; d=google.com; s=arc-20160816; b=DctJhihFrjnhaQusS5UICcExoGHkBvZY7omjtUozupPwMVsTGanKIVOeDfRUZTchAG 7sv3GZQjeElh0BYD9zhmbhNb2IP0Wm0+QgUAwrrCRkzfSJfGIlg4ItQ8YKng+hDClCVk vHRqtmagDdFrx7amR6M2TOA7mfO/JX/NkhhzZwZPJ5xBQbKNUNiwxlRmAb2HtTjS2B68 J4HcJW42x0VISyu66mjjgSAPr50g7313c91uudaar352RV9pR7fQJvncqq4VUnUWusaM G1xWoO+YxGydqp+EKtRljYFwnqNntzJhhJCPSwmjzBEMf37ns4bHvrttHoEUuU7Jufzy 05FQ== 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=aljh7NqYEbdXmutvp4yyxxZOY/egIYLWnupOzyrnbqiJp9rLZCaOzK0jWnu4Bv3KYb vLgNSJZ3LDP4aLuNFNmUWQjRTV42CPkIZ6wg36xn0fnRd6axZ3Bk+TaQOS4waX3AbP1t L/R/sAzLlJJ++sSy7x3dwnceLCjKkCbYvw5VqH4bLNNmx2MUZpmO9Ca3o5JwEeMELxVp L9YvaMWzD/Sn3jPLJGbabfCTueNCOhnTBIWXuyQneOsb9F2ygGPqC/2hWG//bRore3Xe 1Nv1rZ+QRPKqmsdJMWVY1KoW76TeFNSmeMi0vv0raUk7otHcJ1LR9NtwA1jFdDENtUiv gxCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=INi12PAP; 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 b3sor10335601pgc.45.2019.07.16.05.00.33 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:a63:5765:: with SMTP id h37mr1332189pgm.183.1563278433373; Tue, 16 Jul 2019 05:00:33 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:33 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 44/57] arm: include: rockchip: Add rk3399 pmu file Date: Tue, 16 Jul 2019 17:27:32 +0530 Message-Id: <20190716115745.12585-45-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=INi12PAP; 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 Reviewed-by: Kever Yang --- .../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 Jul 16 11:57: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: 794 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 C37C93F08F for ; Tue, 16 Jul 2019 14:00:38 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id x19sf12509756pgx.1 for ; Tue, 16 Jul 2019 05:00:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278437; cv=pass; d=google.com; s=arc-20160816; b=qgUdGK2TA+ePKVbkSgvKODG5h7sMW9by8A9j4CAnumpKq/CABVU/xsc75SmZMIMdKt gAkggXmPJ32yQni208v6OveSoc0IXAvFqmTixzTlYib1E3Pf2NzEtBr8OG//VoFL6MM0 I8idgR0iYVXye44SHFdKkeMh89MTMfZDl+ZP9VzwF899Sy2wmxkc03M527jifFSKNMY6 9kLRnxnZiVwdIvPVtlG6r1T7GSKdZQNF0gYZUkJdFmyGC804YByFLGaXhNIcbQQ98hrW OnxghxLuxkE3inywZ7t4IiYdDX+gsb72yu+mRW09BPaAQ1N1/8IkV2uBlqczDnIGc3zI /JWA== 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=QJIAUbLBPL+ILHcZ5/+pAJ5SZHU4lF6AsSClom9CVGHJQiU17YzJU/BfwDNFCi9Tpd nAI9aeObkBOxhUr+7AT8tSjTW5U6bVTrbyBuQGJaibRkochN0lHoIraJzoKSwHRRkmQM HozCvJ50KM70tTGF//tUa+yDehcuWwDKw1lS97Xv5/LomU4Xoo+OV6yhYZJohupMJQhi 9B5h3+MzHXI/556Lv+r1jXzQD1rAe79OIiXM1dXO4Si+jc3BZJcfOW7O/EsFDxXKwPMs nGVxpdlkuNJ+6K1xmV/eaVLfmROcR8KbMdPNQV2HTpAo7CxszhXoqA28I8OprxbBSBPH /6RQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YLmq6cnq; 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=QUqoJ2MbXh6QpWmKj5KhLq49yPc0yTmasoCoLAaG7ZVnLOnW7aMjPwLCRIzwP7ZXKM eb1aeXBtWWrvLNu+xBgGVDlACw0GKn8mufvuDDN9F++hD+MVGSK1Uh6VB/lQnn/2lsd+ YEz9t+NDCJmpisEIzu/1rlGHHfYfd68hxwTwc= 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=IL84Rs89ZuUpB4H8qtrXp1kGE1L9yGRX0kNus7/gw8ftoyaLCa4YoyxLNcyVUfyZf4 +gP3C80blqfCcYjpTvJftuEJLwd6bS5uR61jgFfUEOteLsbRUs8QvDhtbtO7N/802zB0 p1LtE3bMmgeCgrfhLS3Cm6yt92sh+l7f2/a7ZRgpAibmjs6+aIZm/xpgE/cE9IATa3I0 Xvoomrj81Wh0RK5MGHdT87HIfp51XUTkg1yfHJQ9cXnGVfPJKpNusmWzfH+7S2s8s+0I Cnw0huzwZREqeZ/VEjmqQqT0mmPakmJbzLEmxEUxodqrWZg7dLA1YGZBzGw1hiZMRo8h vhpg== X-Gm-Message-State: APjAAAXFVqxg0zGjN4tgm7Pgj03SkS+lfR5CFKmP+QhZ6nvEvaYMwoW1 5RVXqs2ko4Umnrb6UZEvC6Ie1Pa7 X-Google-Smtp-Source: APXvYqz4Cu1xYfd7JiRrTggVfKK7BBVV2P9md9PeoJ+sZ6fOLPn0TKUKMNVq5XgUvHZi13rpF7i+gA== X-Received: by 2002:a17:902:744c:: with SMTP id e12mr34580461plt.287.1563278437635; Tue, 16 Jul 2019 05:00:37 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:614e:: with SMTP id o14ls3435970pgv.7.gmail; Tue, 16 Jul 2019 05:00:37 -0700 (PDT) X-Received: by 2002:a63:e1e:: with SMTP id d30mr33037258pgl.100.1563278437172; Tue, 16 Jul 2019 05:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278437; cv=none; d=google.com; s=arc-20160816; b=qx0DOrBwY7pVfcFO+4s4xgVMlL2d89vq4OJGcE2Adk11+qFfcviNZrdUkurAPDUrXo xtWvsA9qYncbUMo9znNIWrBjybggnGl4Eu1DJPkCFa3oHelL8C00GDt3SvDyfrGHYalW pUmkY+fKU8t/logx+9uXKlsUe97iCjgpFd4yaoUgbzOWbFpRMfjEtukcHvJlimk2Psjf zIehMO9zXrpIAEt1tKLMhfL7fi+85Xs4BfEpec0A7tyw7S053kznDHv8daab8GpaDVnt mvcVAUvJSnA5VSalmKrEZBEjsSECHp6PaCrrQsafgXrJJ0mLnCUhkn02jk5BaPg/MtsJ hgXQ== 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=fhnLj0GX6jWs/ERYtPx/Uxq9xpZ35MOxjOyCb0b0r6T9sPTDwluoksLax1hgC7aFC7 SUVmwBg3ogoOeix6BQY28AtQ++0ADk9xjZFc/ImsUspJUmZ5suY9Lk0CBccoRP8+chI2 jUGLxDMk188yWLpBiclg3SerEGImqFGZYQ9c5UU1KEaM4Je9sqIhUgblpq1QJXmQVHeM jkcj3S9pOMRkaQbK+xTDauN/mCN8mv1GzN3RTjwMZzZnmInCQYrKlwUVeJtUdR27mCho QmctOOUN0yjAMmbNP13UXWXNz2zgg74+o9Tnob+/Jgf2epYOjgA8NwXTqw9MMkWnGvLJ hyXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YLmq6cnq; 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 l98sor24748665pje.13.2019.07.16.05.00.37 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:a17:90a:898e:: with SMTP id v14mr35652467pjn.119.1563278436875; Tue, 16 Jul 2019 05:00:36 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:36 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 45/57] rockchip: rk3399: syscon: Add pmu support Date: Tue, 16 Jul 2019 17:27:33 +0530 Message-Id: <20190716115745.12585-46-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=YLmq6cnq; 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 Reviewed-by: Kever Yang --- 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 Jul 16 11:57: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: 795 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 34B853F08F for ; Tue, 16 Jul 2019 14:00:42 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id x18sf12225487pfj.4 for ; Tue, 16 Jul 2019 05:00:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278441; cv=pass; d=google.com; s=arc-20160816; b=suHi5VMD9QpwX759fp88uVDQU8K03A8Sv39tz4R1wYD0ZwGCyRz9cANJol3jWyGQ/m Tfix+eOUf+k7pQWAGGO2h4Fx5X2VdhWBU8R9ChCd1hfmLIn5qZzHqyPWl0dOdotTc1ka JZudaJviHudEE+zF6BOOvAiVxdSsPzBVFUqgsRbTd00u4Y9EPbnllvZ1EyVY00cnHpBI HyXY7VpqDomj9d1bPEPMZO81GfheIAmNpiBkgVlhIXduNDmJ+6gARVIx0mANv/qStlAN FAAld6ZogDsiow7+TX2qYD1gFcVCwqejzisS7wNKKwvcs9iMH589WMNzR9LAWg3YasdR X2SQ== 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=d7DcdgArMphxlUk5B9TcGlWAhVRjknXWFmet94Vyttc=; b=Fxj4GpPTfeW2Ozjy0AMex3Fq1/bFpk6+9mvABr6Af2CnA2W2wKhQ8dNrmr6+Rl2KYy E/TtfTzGxnlU5RRJ92wJfbbszlOjhzIU4Wu5LuQRy+4Nbr04yxm9VkZiyzOtVa7g00C9 yR92GT0oArxr6V3s8+Jetuwtq8VfOLdTVnB5Z1rqcUJDG0NnY9Ia7I7Mf8tw+bzRofVK O8H5XCmFbF2ENvZUXqYEv+iVbNhM6wRHRpF8Nu2gubcxsNSIdCujLB43yPFeOlBTXmVn EgEyitixqUA7Arwhd6Iwj4K9FRyIgqWcGHCGYSOFFYkNtBGtGz/1maIFAI1SL8u25PmE 5YcA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kNpxNCdG; 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=d7DcdgArMphxlUk5B9TcGlWAhVRjknXWFmet94Vyttc=; b=a/yKVsbRjpSiBBhKFu+REwVa4CIj41fnP149Rm6+9KBVErmVNCgCccVNHeBP7OHlOt ZiMskLkY4myDMSKxAAFrj0Cf4btUG2HeKsQzxmRRSFiPlccAxnmGUiaKfL0dwfqUsGn0 UWcyI/gFgIB6K+u87AXdLA6MU0yG7AdkWBLl4= 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=d7DcdgArMphxlUk5B9TcGlWAhVRjknXWFmet94Vyttc=; b=t/PdUdYEM15xHuzTjRr5jug3wnzzpi9s560Qgp1hBbRLAFTTM2MlQmcDaukwUMH0SF 96qQYM9GGJrIPRpmwLyy/WZ+/Vt/jbX7vxVio7JLdx48qEuLD1zQzaeZM/3AHo9T85Bo shcnXXPmAAT3qVyt93MsFymbwznU7rAj9Dr0SSVW30CY7bmhvoMfa1a10tJuP1sHAhzJ jcFQgyH77g196vQTRwbja4Clv8/ZM13HyZCriTIf+Nnxh4FKqD6IS+q1SHfo0yJiSpu2 k4E4XS6FyZLIj+O6/i13VqWOKcDWslGMLgG/znLGpQzihdNLksQtxXTelXMbAz5rK8QI BNDQ== X-Gm-Message-State: APjAAAWEkCJrNkle7PhyvGtRkO5HzUdVKEjje/plCuL9L4vIgOcUaKP8 VlANRUHDA16HW4XhWKSOVJUZdniz X-Google-Smtp-Source: APXvYqxdjYe5PSxDgbuKAB/cfCCbZNp58ONLjSe8OyRWX/GDQc/hmc6Fci/SYPzd186BXq3zLhX1UA== X-Received: by 2002:a63:3d8d:: with SMTP id k135mr33905130pga.23.1563278440947; Tue, 16 Jul 2019 05:00:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3467:: with SMTP id o94ls7080916pjb.2.gmail; Tue, 16 Jul 2019 05:00:40 -0700 (PDT) X-Received: by 2002:a17:90a:9386:: with SMTP id q6mr35354607pjo.81.1563278440633; Tue, 16 Jul 2019 05:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278440; cv=none; d=google.com; s=arc-20160816; b=TrhTDPGWjQF48HnFJ+LeV+zhmtJrJtRe64AoyRewLRGqTcR2XdB1/rbDlhRwP7/Lxo GvZPVweRKUCf+dP67+9MldrBXjslSHOsauRr3h5HuAoJCioObFrEZw+JdL89Cde/rTvu p+kbEsjvNYRCoqjp7kQiyAxpJckfn9YMc19EN4fpJFJhtrjkx46p7SizdVnTkZhdOd7D TpJ6SJAXUwqoefW93e8YG7awb+AD6HDrTvNKcU9yAyvBbZkXDQg/JMpgFrAztvEAAyY4 LtT4AZLfgWY+EccqGiJRghpTGeVcRMu9iX/Hc4Rvfbexv6jEZAQUQ3TZWQRkoAOyUaLc 0rPA== 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=ETG3xEjNDypYz03EYFcthkkYJBiD0np0jTY6XmiuUyo=; b=g/APVXtTVja+joaaIeHqBRx5LyZxcGx9cBa46/vreanCq4cUUDV+D1Hh96oAbaokXU 3dbj+2drlUP5z0pCzIyFG0MMl6dZkP6NPgg0hU7EdZ17Lb0OdBJmWorQeXci6vzNuQuE rIOtC4PugCMpNB3ewzDUKL9rqFtLlr4+/m8SR7DrDv6Jc7btdtFpjm03vhhw78h8cGyq MqU+xgeERoC94ZDA9FNKIF2WrCIOkYcXyHey91nMSNVCjUGfDYEf2S71UtFx+OUNjeqR 5ZyvePiX2yCOpOumEs/Jf5ssit0lViw63YTiVHrwwd2oUAhl1jcqjBDY4e7W+rW7ns1M hzsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kNpxNCdG; 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 m39sor24586345plg.49.2019.07.16.05.00.40 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:902:6b0c:: with SMTP id o12mr33760251plk.113.1563278440364; Tue, 16 Jul 2019 05:00:40 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:39 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 46/57] rockchip: dts: rk3399: Add u-boot, dm-pre-reloc for pmu Date: Tue, 16 Jul 2019 17:27:34 +0530 Message-Id: <20190716115745.12585-47-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=kNpxNCdG; 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 Reviewed-by: Kever Yang --- 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 fcfce9ae02..2738a3889e 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 Jul 16 11:57: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: 796 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 9998A3F08F for ; Tue, 16 Jul 2019 14:00:45 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id e95sf10063758plb.9 for ; Tue, 16 Jul 2019 05:00:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278444; cv=pass; d=google.com; s=arc-20160816; b=wddU3V65hAR/hSFek15X3KG7W4d2rftxII5ur3EdtVSwL9L6Bx/U3rBLvodnAhAsel MDt+yc6UsERWfN6BpgdHKBlrgPbguXaAPwyus4jiM3a69gBDEuIplFbASFpahFI8BxsI 8z5mWI3lFjCy74Jd4WH2qt+ckxCpNwYjIsN/5cpTtLeHhNwsBUXOUWMjC75BxOcPRQdZ 2+fSgtnqH4rYtTRlCnILZSAqVkG2q78aGCwGa2v4LihjRCVc3yEg+6XrOfSc7l77ZbtU D4RhYGGMGOLKzf01ywrSpgGA02EtOYPyJCsqNaOJF6FF64d5P3u04TYPZScqPZb00kop JXqQ== 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=ds09EAo3CdYXDgFWyKIR81k2/MQbI9Qp35jxpf/Zu6gHADBaFwFj1ZT220QpHLjtjK WU3DZc5F9ZJdlldf2h6fIjKMmDl8/7sSM/Vv77mBxj1vM8XV2SzlsDyHKbCkiYKXTB3U w+EVZj+Tdw078ebV7PYP31/ZS4T5vNEbiF0Cv+BLnwb9hB5kz08ZiC9g+M3hbs7H9AiE vuyXSsFMywqxwV5Li9wQVw/w91N/e7/vcuKeoYWVpS5oCeCzj2whFaQAiLqVFA83LUXG IIfdIjdLDCaLYUbJPutHQHvzCqkDYH6wu7CV0h87tn/fhM9h1e3VUMNHPTYy0tHC27Ne 8ueg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="q+tnB/7S"; 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=R7rB7M2X2KPGY51GH/e6GGAvRa+iBO1rACt0UfxKwM4UUHgpqtGRWhm+sGtS0+gxtV n8svah0coEwd/T28FFAzGXPB1JEOXnedacQIAFS1OtbYCGZXMfzbX3Q5QUMEZ3ezzCh4 qbAvnJ/4XS3dKibm1RB8JOdtw7FvTruPtOd/s= 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=LIoJ1fNl88lUz/BEqLG4nsSvw3rLcVOLcMM7QgDQQ1+IFxztbTiMUoaH1EQWhrAzFt QvrUg4WLTCCnONiyO38ux0dz+mCc7t2NF6WYZOizJm+/v5CuPapTzw0HyKVYeAuHqFli 2m9qEhc6LrVLxWIzrmow3adW1rtdaDVqNssNTXEQTuUuC4e9E4ttzSTKpbV+jWcdvi9Q bpfW5dRDsTfm9ympZHOlzkqYh+awcvo6n6/RyBDnwxG3WuRl3dTBuJXh7G+eIfsCxvD6 oZOvDDOX1vKLw5dJOYV23FtxMWgIs10inspOMw+pyYeyNEl/1pKhhWWbnfHcZhDiv3Hm bajA== X-Gm-Message-State: APjAAAU4VEHKyxqSjgze0i2Fn3zYEyE+EietzT7Vaxqd7oObFqzruC+H s1eYOk8T/OX79LvX73Qyv6r3bnzp X-Google-Smtp-Source: APXvYqx/+z0oAeMX3Lv85Ti35Gzd3fNhYklFh9bEIf0xyoZnt+8+WRRu+NmsbP/A4biI5N7YUUOCKQ== X-Received: by 2002:a17:90a:d814:: with SMTP id a20mr35850854pjv.48.1563278444458; Tue, 16 Jul 2019 05:00:44 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:32d:: with SMTP id 42ls5470865pld.11.gmail; Tue, 16 Jul 2019 05:00:44 -0700 (PDT) X-Received: by 2002:a17:902:1081:: with SMTP id c1mr35283927pla.200.1563278444183; Tue, 16 Jul 2019 05:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278444; cv=none; d=google.com; s=arc-20160816; b=NVzuoZLjcrK6eMrbzd4yvGFvaSYcrEb3xIbbmk2EgvpipUtj6d5ilBXwZDIhwiq+RC i6SYXGkHHR4HSAVNoP81YX05K0TcGbVTzCl57FUirh2kLSq5q2rnVZTDmyWMuqgMugyI GnPft8/HdGDw6f2bqZHDRYX3xbIZNh82Cn1dwOypWs1y50HiEIJlphldLmHnSwE3XVv7 sv+//iOw5QSk2bV8WT0D4+EVSu8efEJJfS4DgSQXQD0SbFZsD6ptmHe1muN41gkgevZs SflcEb6pJcjriKbEKFJTR238s6OxXe8VQDdkdN9LcuTKEGaxc7129pT6JJdcwCw4bA/r /boA== 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=tjtdcienebecDMrAksT7N5rQUHfIBMW3T4Y8DrwPBxaKdis6Esye8RI+UIB8anWgoK suA7x1+oUbCIF0NB0eIUb01FmHalhcKg9wACey0Toos/nRVNSVgX8/+uS4GjkMrhs3DN tiFwvWthQ5/pCgYPk6tPaMB/+6oxe9bVr+AS5r5YGfAJ6GPc27VFBnP33MHh3uhzk9ic 4rd1e1Vm2Hhkq00GweY1bFKNfH9G+Ebho9XsGjTrGFR7u4mqWAvn5WX6glzkPMpvmS/C kRixSQ8G62PkTCfdMiZAnCWYxJMn2AIHZajHGgMth2s9YCYVGph8UO8vGOazNIP9nO8I DKAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="q+tnB/7S"; 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 z2sor24870602pjn.1.2019.07.16.05.00.44 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:a17:90a:cf8f:: with SMTP id i15mr34293782pju.110.1563278443889; Tue, 16 Jul 2019 05:00:43 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:43 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 47/57] clk: rockchip: rk3399: Set 50MHz ddr clock Date: Tue, 16 Jul 2019 17:27:35 +0530 Message-Id: <20190716115745.12585-48-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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="q+tnB/7S"; 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 Reviewed-by: Kever Yang --- 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 Jul 16 11:57: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: 797 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 3D2373F08F for ; Tue, 16 Jul 2019 14:00:49 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id 6sf12243260pfi.6 for ; Tue, 16 Jul 2019 05:00:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278448; cv=pass; d=google.com; s=arc-20160816; b=O010wLFKHJIKvaIuEwxbRvVoNr+b6+vA3RjJ/r5reltUR9K1SreUa8COnzIHO+Fe+B xgcKKRBbYtBOKf9Vbvsr02mkoPj4bKsbl8Jy2Rrasd/tBuAcBdmPMyXg45dbZlSZOkiD GJt8spPw1BWSTO5sT48AhYzZofuWUHqmHfVXiwU7R63y8CtB62Qr1jLESMG8R54DM663 VEE07OAXXhjV56tSdCuAhUmRM9JVLBEwjGmLCfZNkAX3j+XNvLrDhKRmDUn6mRwNEG51 eWJ7QWb5M+gwMfgynHNimlryCk4PRxCmR9BAzQ2lURZTUZep9ZYLHR6B1sw+YeM0JAlJ H+YQ== 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=sph0njJ1okzPo7IBX9k4Lnvdvk7uU0ppL6vP1cBieqLbMmTUSARyYnBM6OakuYYEBm 3nGKsdjVTeWhbsSns/zDr9OpWFEGnJmid/Pf6M5pgh7u9BF3ZQx59BshUXlg5/beTzAn Z3cr6X7TyRSN0vrQjB3IczSoN/17ShtkOZxnPAkkL0YRFDfecPsLWcduqWeqPtQuaAT1 d6TT2b0sKzXYJM18EVY3INwgaW0jBC44egwKVrRuhsk03F3UEBK0Qg4+CGb2i6V1KfpH uLBR4grS0xovOKGONHb5ni86ilWlqNfmqwz5b63/JY2+5GJGX8vchjxYrpbc3MYiRGk2 rcSw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JNz42c7m; 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=VXHiHJqIj0uzjVrP/Quv9hTxhTeheWHjaBfCdlZZLlS+X5f0HFvPwUeGmZla8UfLOu Vvb6hOVj8UWpeeOq4BnhQNS2dC11vfa5vhuKcPIvDNKL+Fbgew68BtJYq5KRSDd5IeRA KwmhzyEzBsKpBrDc6KeunkoWfQ3OWP83jVzqE= 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=Lmu+SYhd39h+r5luKoa8NKCfWqMBi4QaUiwANvtYmq4JzQNo2SLQYGlXjqUMEIabuB XQbq/20KBke/1tJP7OSNXyd/WTudjiVGbsGRpBwMp3Oz8NoZZ34Fpc+k1tCM6qOLevAo wlZqRPKWYuLMoIlKOIiuSA+LePd2FGwli/FmPB9gdFkky196WFJH5nLdzop499XK54/6 6yA9hx/AHrBZ++s8hD9WRbY7hHV2HkB9Wnyo8WcVKP8nFHlZrkwDIGFGZMvPO4QS534j R53TU/CmNGbVTjrsqyulLOlEYvvqen+VGVVtnrgAkC3+jGVilCv5pVLdlFhx4z82QxzY GMJA== X-Gm-Message-State: APjAAAVmJgDlgsjcyFEO7QZuHv3hEw2HEg8w7zWVSN/qAiUsAKgPmtkw uWOsqy8fER62dFblm6N6jo9gic5z X-Google-Smtp-Source: APXvYqx2gs6MQbUxQ1Hqv6+jmCCGjllA8McEQqR4hjHD3cbzSX41kPrgv6toI2zQKznob8EOMZJZiQ== X-Received: by 2002:a65:4841:: with SMTP id i1mr32911984pgs.316.1563278448038; Tue, 16 Jul 2019 05:00:48 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:6b81:: with SMTP id p1ls4223371plk.6.gmail; Tue, 16 Jul 2019 05:00:47 -0700 (PDT) X-Received: by 2002:a17:902:5c3:: with SMTP id f61mr32344090plf.98.1563278447720; Tue, 16 Jul 2019 05:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278447; cv=none; d=google.com; s=arc-20160816; b=luNYhGP9AXYVE61cSpJDUqkgYAHLVFau94Fs/pK0+nADpkP/+j/SnvI1Fletkd62l/ wjHFQt3QsOwFzfujrVrBTfbe4gpo0AUbIeQIzX1ccgK/BVn3FP7Kdxi/Bqwuj/4VDRmy f1wWAKLkf/7mLhUih0eV3PS0LSPf1NwPaWfwCKESExZu6j6h7rBFs5MypbwoFoHlqUt3 9wdaPzKWbqs4kYeacqH/lbCOfOhuUznrbFMfPP1gnLfj/bvJrGzXJlZxjHbe+Ytb/bem SVEVPvlKvzPCzwGt9HCBqS+sSRC3jfcY+Cjay4VHKIt2ainmy7TrCOdogqDXlpJJkkDU SAcA== 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=EK0lZQDdbKQ4Q62+48kTOOWy5o3ZuJHBkv3cf3MBk6bmdUDUoAhVNXJZcgpvy1i6iV iruGLqxCcjkJvF7BVFaQrmr5rrKnrI4H8hdulAAB7i7+0mCS9s/gOxcUG7sxi3mJN3My JBD6DGY+elRAh1gTYBFTMx3GqeR1/OVhArQCE0IGYD+0EHA8Az1UHwg8Z4XqRSFBZFcO ATnApIoCv9xiVZwbHd0EPctIHvFsmqW0dYHS56/UVuWzAdwPaoLI8skLSUR3cnRETvqE 7VqqDUHQtCJL1lKVjIHi7aNp8/a3GFUaZnSK1pbbvtfYAw9haIP7VDC5p0KoLNeZWDJt +r1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JNz42c7m; 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 o6sor10412393pgp.76.2019.07.16.05.00.47 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:a63:7a01:: with SMTP id v1mr33887212pgc.310.1563278447333; Tue, 16 Jul 2019 05:00:47 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:46 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 48/57] clk: rockchip: rk3399: Set 400MHz ddr clock Date: Tue, 16 Jul 2019 17:27:36 +0530 Message-Id: <20190716115745.12585-49-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=JNz42c7m; 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 Reviewed-by: Kever Yang --- 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 Jul 16 11:57: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: 798 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 BC2893F08F for ; Tue, 16 Jul 2019 14:00:54 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id b18sf12498786pgg.8 for ; Tue, 16 Jul 2019 05:00:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278453; cv=pass; d=google.com; s=arc-20160816; b=gMbJnabYXUROG48cx1zFjjAa3ry8GMRX9Kje7SNkLTsjyTe0UvAbFIz5IOk5unScRN rnXq9dFxrrawfDiErnfRQ9KF2feUsC5PQ0S3IaJjxCI4JvXbPtxWYrb5ITQMxAeZnCDt fk5jAz7I1zJN/PuqK8U6mro+VmfiLY82crS7DZkm8GodWE9ax2LXYNybVIEIvjxp3yzm VOSf4IXpWpj9EaZatDiySdm9o8Im/olzlW/XgKa+05JUei3P6zQHKvsfpwd4d6gsx3NA c7//ObjUx2OHJHKPoN/+sK7Jqn6lOGE3QTUXsOd6q9Pik4iwnPFJmi6I55QDRqw7osgn DUGQ== 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=kGnoWXtE44iAo2kA5vJyx1ip+C0LZKYLg2LnwzVMA66t37LOMYXDues+XD53SI0X29 s49YsmpLYP/PkFoE44JWZtI0AwMaddMMVmh5EV48U+z/eQBFCZnN/uWIUUDjy5SCRjZ0 xUTPq+PaMYD6IiDeysRUkVlRJaLGGoe79SOo6EZFK8xV9QHSlFZrV6ocyjZzx9C06S57 EFf6OCosDK4L0oP+olcVDft4sUJrQ0AWqqvz9X/AnU/d6ykC7BH5l9sjDW2brlMAG1BX xB2YruXlJIjyvoLUZH3ov2Lud9McqQchMHzO2osd2WekMJMxW+qvpffSnnblDG+dA5V0 s5ng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GA5nERi+; 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=e0dfipl3zTch1a0+slZ9tKkK7zUbgBhOUWLWIh8K4bjkzVbrZoUWHrGlfjVCN8l2yk /RYadrL7lajgYqKTLlJ1pQkcaWwmHWHA6R6xwlOuQ3ljaippjJVGZxzYCa0ANntCIqjJ 96RIZkZF9ZSqaKJ7uhXAx4AqYgr1SJAcWnmbA= 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=Tom4MSe0FQHbI7JAPF8jOwzHvPWV/crLauUcl504QhJ+VqPZJMeXVLXKodF/ykhlyE CAAOWJSUckV1wPNJCpaz/Cp7fN0BesTIttaYQnPu+0Hfb7N0IM9z0V2Wlm03ooqdVZID Inl307K6L0rbDkmIvDvskoL8QTNFSvMq38BASfjXGz1FQbMnBq1hqLdhOlzYxmpaLBcp tUPNZMZgg80pl8KJ/QtGTD9M5aWjJ9rrTmSFmdtvkLWGXSlHFWAMMRYMLInoX3orWGYZ PVSs6IvIlmzRv4pOPkOJUyhWyv5hqY8fW8fXoJRHf0LGwOA/H5wL07vtj4PlDItcqeLY 80fQ== X-Gm-Message-State: APjAAAXtREivrtyqeOTQWlyAa8Y4EqNH5az7Sneo+VxNjqSh+ZI11AHG 0OwU0md8l71d8TuHG98wSEhvW4OG X-Google-Smtp-Source: APXvYqxHW3yW21dikRW3P4OINgV4CS/Iy1c4RdMMcymjA33l6Jfp91756LOv1B2mMq0PBLeZ0DumVA== X-Received: by 2002:a17:90b:f0e:: with SMTP id br14mr35633592pjb.117.1563278453455; Tue, 16 Jul 2019 05:00:53 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:954c:: with SMTP id t12ls3435303pgn.12.gmail; Tue, 16 Jul 2019 05:00:53 -0700 (PDT) X-Received: by 2002:a63:1847:: with SMTP id 7mr34033722pgy.204.1563278452857; Tue, 16 Jul 2019 05:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278452; cv=none; d=google.com; s=arc-20160816; b=tY8bQ0yetppXA24ntX/b7v87lnFANpn5Ob4aFWP0r+By0O2vY8JZornXv7JNDfdn5b xG+8hnTxyFePelLeUnqBMQwvn45DBoTj9Jq/VGTUAARIy3ActgVzIpK/kqSUDf2zWagb +pW8YWd2R3bL26JrzVQRBRqkZihWiIbxhDDxMYN6p9NtVXrrq5elERdNZMmsACjs6VPz n7UPYmH3BXksVIMWzCFjvTZ5rZZ09MvSaKf1SmoapiGUdg3j6R12dqjhzdULEGouUnd+ cdfJaIfuvWKOdo4RuYbCzpXrRStMhs0BcPYVd1BfpthstJMTgX6RXv/CwVcNKOmEK/5r 4Q/w== 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=Y0X9gxZAVW+SK8DO1cwdbmrxeaVuQG75d43CNMowGXNWrYl69CpgHQlPwlrMaduMsZ 8vP8vo4ftarb7bS8XRmQhLDMPq5N5jzuZxIXd8v5f7cGwhRH/Ex3qT12qYtx9lMz0lxF td1UaXf9MOfuQ/fdr0xhU/PqtwOOoZgbhlPAMAUobzgi18tYxSXcVgJc0+QldjNrfB85 fvJzC5VClV6vMKGnGhFmI9wIQtkqh4dVf5kAEwD8SVsBrfETuJmJeqdeG53g4+OKVe6P b8sf+AEJ1PvO5Amh9uOHHluoYbV3+d4VdAEt6wMyLwq454kGUGxs6cOI+HqrYOKZajFk X44g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GA5nERi+; 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 b12sor10505971pgm.75.2019.07.16.05.00.52 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:a63:1918:: with SMTP id z24mr31671594pgl.94.1563278451512; Tue, 16 Jul 2019 05:00:51 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:50 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 49/57] ram: rk3399: Add LPPDDR4-400 timings inc Date: Tue, 16 Jul 2019 17:27:37 +0530 Message-Id: <20190716115745.12585-50-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=GA5nERi+; 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 Reviewed-by: Kever Yang --- .../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 Jul 16 11:57: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: 799 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 B2D643F08F for ; Tue, 16 Jul 2019 14:00:58 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id n23sf663138pgf.18 for ; Tue, 16 Jul 2019 05:00:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278457; cv=pass; d=google.com; s=arc-20160816; b=OFRavUWFKuHktKrfPt+M4XFYrH4a/xa/PLG7nIJsc/CJ3jLMb78BJrzHznS0TlMfXn bGTXT9B7vVBh5VID4k7FsycEQAE4ResH1r1EjwxqExYQtVWtvvBAq/+EaiW2lO4PCP07 sfx41RYnpj1kd+Hj4G6fBYDy8PtVDWnUbC4UtREr0bpgmusYv+yXEMZcV7164tF5QzUB JmXY5HAiZJvTSYF44sUzYnI6fLLCSUABSKLnl1IiYYQhoe7VtTH1+gDdxijxibQYPXjB Ww6hiSrL75nl/RszBhjLv8/8mSs1675V0huo6HpanoJjTGiVSWn22LbrgaxG+/0SZHRV WsDA== 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=rUYGEywG/PcUQPbgfK4TifQGEe/cSUFzlFV1noy/Xm3AixwyKNaqmK28986LWKWBWb jo7JjdH9QoNNsZFr4EIPmMuQ3/AF+SZIHMudDDxXZb8qwDk9M1tdo5HNXChIdvZmcIjI /khSrOHSkwQ0jYEq47/JijVfpR3rYlc9H2u7nfzi70eXGMff5LVjUVyDYU3WD1B+OUYG R9l8GYZxFdAsSCQkSzlj64ZEkYo1osHups+yBuNXv0Kt5vpZGyzTdwE/lXCvAFnuWF0+ D2PuU7eifHmhHdpkaDiUN0cFki2adNbBe7YdB+QDzF6MQwkwEvQUE2Df5p8hY/RBHX5H fq3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KWVdTadT; 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=eP1yy++oYLe0preqiDxnFbMIw0GMESjdfeq8yiisDh4hhiwUVt+B7nG0vMZemxMiq1 +v3u6yLyba2SNQ7sGkVdfNgqpYxZ+SQD5rKIzY+PF1ZU4wYwuo+10QzLQoHwSV6m5v0Q km5GJ2LQ6yH6Php6DmtCgXa2YAsH3d9heJz48= 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=GzNw0VjlfKmA+aFjC1uO65VzXm+9YyS6Xv4vXfkhHaOCAdEe4aNw04XecnezrMjBh4 6wSRSQ7mGtgCIMBGTqEnjHWYH4N6qQmysF6XRTGja6uGqXwM5Yemn2Uv+eP7tCgLxKd9 zr3y37Okgu2ZAMludwVDdVoVVuxVOkBE0twpf8MVRdzsgBbKA7p+a1aIetmX8IVf2ajv i/epdLUPpCp3Zt2/82o1O8KACHOcERiihQCuTMZLJT76eHBuoY+Pc1hn9ZTNhV7u6EXG LtseydP9m0BOh/mlwZFEnF0t1AWERalWyYz791DCkiIE221oDZ/Yn3axL+Voxakv3q/D rg7w== X-Gm-Message-State: APjAAAUYbglTST95khK5YynOjlDF2Deqh82Z4TA4OTGrQO3MGR2Qi8an efN3uFpj2sqTiTDc4/dvg9QYvqw9 X-Google-Smtp-Source: APXvYqzy9pFwNssA+rYmCG9Trbdqqw29X3F0Y8qFmzN7AlnUElMBglUUGMR6L3ZWvqqlapyftzrPEw== X-Received: by 2002:a63:ea50:: with SMTP id l16mr33612101pgk.160.1563278457357; Tue, 16 Jul 2019 05:00:57 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:18c1:: with SMTP id 184ls3475488pfy.10.gmail; Tue, 16 Jul 2019 05:00:57 -0700 (PDT) X-Received: by 2002:a63:30c6:: with SMTP id w189mr31920244pgw.398.1563278456767; Tue, 16 Jul 2019 05:00:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278456; cv=none; d=google.com; s=arc-20160816; b=lj88+PxsoauODpidsuVvTku7wsUFHGmUNiZ5axm5RXfRja4HTtxVas/iepG0Az1LQP peNThQXrstvOwWnjyRcgUTGy/HN7acQjpq2WCdTLyaf/YyF5wY1DrbkBdYI5ixPGmqUc TcNnSvE5nb/IIWjTWD79s30/xlt2U3g7vOKlS0AEkSkI0QyfWnRmrZHIjVfbDUX3O0eT 4mComPXEkjf+5gZp1tD+/Gnmay2JrgFiDRHCbbaGO4XmX17qBeX7QWfKp6nJkBfG96Y6 VIKD+9DKCJYsH8cTI4yAaOLJkIW0tLPNS4ptWYD7LR/6siAfMS6ZZ2mhHq/KgOwCRNR0 PUyw== 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=XQ7ZysgsSoJCNJ1BcuhOIUezUiljCegv1cg7G8KhlUzXAuw/vLjNgrZFCiZcXOpFDv 3sLuY6Sl2oc9nraZToQmS0m9sTSaKWFxKGNtNXqIQp3+5pZUbTPm4xwv6HmKVrJBKtEn a484z/RWSS7tga39FvbAUE3GAbCo5TH6m6GsiuYL375GACPQXvPNefvt8pML+iaJYg6E xMH7g9gGiTIUuKbBjcY7/VFXU2GU0tqZ3OAJg5WIJyPkyS/TT8HeYcU+bFe83cbz8Kt2 UfhcMYIPcwZzRJepKpxJiLegeYGqhn1OdvyX/f4MvDlDubqr9YQn/6a/1BQn2YWPxojp BItA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KWVdTadT; 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 f10sor10827386pfq.72.2019.07.16.05.00.56 for (Google Transport Security); Tue, 16 Jul 2019 05:00:56 -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:7d49:: with SMTP id m9mr21882336pgn.161.1563278455463; Tue, 16 Jul 2019 05:00:55 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:55 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 50/57] ram: rk3399: Add LPPDDR4-800 timings inc Date: Tue, 16 Jul 2019 17:27:38 +0530 Message-Id: <20190716115745.12585-51-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=KWVdTadT; 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 Reviewed-by: Kever Yang --- .../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 Jul 16 11:57: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: 800 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 ED7EF3F08F for ; Tue, 16 Jul 2019 14:01:00 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id d190sf12229089pfa.0 for ; Tue, 16 Jul 2019 05:01:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278459; cv=pass; d=google.com; s=arc-20160816; b=q/PX3buZB/ClouA4qaCJ8Ot5yJtAcz7TOyLt6ANLGz5kjp7pM8CpLrTjvC0Z603JUp d+xlyubSB6JSwAUhwTkhZwi6PdmybgWhqqN823KnurntbYe8MfOLmcsHXaZ1QyYohfC0 Lc3y+niSC0a2TVEEILI7HvXzNioXwfqYccgTarOEj7QPoFEHuXw1KF+2B0Mqpu3P/dux G0zH1tM6Ul9Ux4y9xBeEMacOzej35793sXedZ+9K6E9YKjtkrwnB+638u4NhZMoi4Uzv sNx9XRDz+d4wCyMQhNxwtZTMYfqabi9PsLUTHUUS6KbB/GkRisUFbcCpJl1ua0Ia9Rup 938Q== 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=bS1aZ7AkBN4OVQ2WFFjxbmUh9ERf4SkjMJaZacAYQlc=; b=SoaSgCXKeBtD17TB02Oy6NAuDAcD6QB8sCBdP/C6xqdM+iwGI6BW0bqWYXPlT3IvmQ VUkhFKUdF4SSlQEr07qpkRtDzp5839oHzcmPR4lZja1k3eDT4nL/Bzwera8lDP3oEXkJ 0BnCbW5tCy+1j6K1JbdPrpx0l41rAQy2MhmNwK5XY3FXKlINfatf8pi2IFa1Ck7rbxdx CCRFXzjMOwqXsdTRwNSGW9u2Bk9RfNSCfNLnoUxCwDsTGJuiCX9tgZePHABTYrgnO4iq eiKapHG0Sqyuyb8bflmo490j4tFWLvjFKgoyk1YHSLLf7xlQWfQXdRjUasbu4rp/wgwF f2IA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=di7gqCHb; 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=bS1aZ7AkBN4OVQ2WFFjxbmUh9ERf4SkjMJaZacAYQlc=; b=Rqb38z+7i1S8cYi+1vGkMBCF+jERkGuuSjBf9pFhCaUbDOQ6RIhIa1FbOxkpro5y38 iVaoAgTmbZCAVd1BUZ+8oalcxe5qmlxcnuRkZA7L6BRtx4zWNuItIWhasTUGhM6aRFlv +3MoKU5LzBkO1bDPYgy8qjdeTNp5V3Ii/xhAc= 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=bS1aZ7AkBN4OVQ2WFFjxbmUh9ERf4SkjMJaZacAYQlc=; b=VnIcwa2eIMYknJKZ/T5SXhJznv39b/VSbiO9zbH6VkGyZPiBDSYFLtuhpf3UxQUSJ8 1X5W58GCH29B91Ybh0rGhhQlTR2PQ3mV3BLkOwfQic5BQ24bBlM+o/9O83COncKUHS/o /9oKaHjV3YjieSaKitXmHghWqu+BEZ6dSjeT+IwzjH+OoG87OnfG5hUxIcUdW7bpTeOW 3vNfi3CrFgQdgf8YS08qZgbi0ZrRjtkdn+7YtIbW3/cPqgQ0qJXcCaNtyENAgLymh10z JvSrxpla418EHx6W+UGZ3Makg8ctsSrR/kE+0xA9EaJugHVBL7vyCOX1RzE/PMg0wmqy PnXQ== X-Gm-Message-State: APjAAAXnKYoLk/G9WdZfwn/nCPolHLLhyrKplDr0eBRFd/Z1NBi/5+8Z xWprFeBF0on6piB6XQLvj610+aOQ X-Google-Smtp-Source: APXvYqwq+/GWIPvXX3kN2DrRFkhi50g3gUXh7vfBvDBebQ+kJgMqmKKrEPWF0zRa5iwLPmtCmDLW/w== X-Received: by 2002:a17:902:6b07:: with SMTP id o7mr33963990plk.180.1563278459794; Tue, 16 Jul 2019 05:00:59 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:6b81:: with SMTP id p1ls4223601plk.6.gmail; Tue, 16 Jul 2019 05:00:59 -0700 (PDT) X-Received: by 2002:a17:90a:20a2:: with SMTP id f31mr35417806pjg.90.1563278459469; Tue, 16 Jul 2019 05:00:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278459; cv=none; d=google.com; s=arc-20160816; b=pal/rfAz6ZeUVPMjFbgwAkX98bVxfusaBMped4rg1LwtFiqOjAkTxELSQ0Zxa35g9y cUwFgq6TNJVHcj4wbVlxSyqs60NQbdK6M3zGHH9h73ke2qwk5/ndy1RS3KsjRhZocTWv kAFXlg3WDcFm0jWWyAndXP9EwQvP5sPOVPTWxeG9CJa4NAWpWSGxXospxLwvaBQAb+7d fU5UaPV4lLt8L5kZNaHWHeoBSY0ffSYR89VLNl79DwiWB6T7uqA1Xh3i22/B0xrlHVDo ipnGN5q0lnIM2aMDSFaiBtFOZbORzyGMOox1piPFugJYblA2+Lj7PkLku1FjwbRvvhcr 6k7g== 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=tLU23iC3mbZxkYNZeu/wIpO3JnN1O59AxLAw5YnqE/U=; b=iA/82n7nMnQEcMLCNzTT6+NL1c9rgHabvHNA4DEOdgrGQj3a7C++ZWg24ToAbxYexd 67mATJuq8V7bY6ruMk6Y++GAJfs9sBiPzuMpT25KlqN4cerzBjmOSlY0EFnibVKBRFM3 2+vdKz3Iu4RqPrdQQV36gW0oelBF25XIrXD+FY1DwkV8Wex5X3qabPq0RXGcHi+OpanX Klv/xAtkBjAX28oQm8ICjFiOF0+eybulu8bvnsb84VFX338xspoN/MIHspZqTlICcZC9 cko56X2k+5kf0ociV6MeDx6JG+vGw6n8BiTqputlKMd6pwyi+bWKQMyd+x1V6zopdZje 1I5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=di7gqCHb; 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 o11sor24085487plk.18.2019.07.16.05.00.59 for (Google Transport Security); Tue, 16 Jul 2019 05:00: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:90a:fa07:: with SMTP id cm7mr34723259pjb.138.1563278459147; Tue, 16 Jul 2019 05:00:59 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:00:58 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 51/57] ram: rk3399: Add set_rate sdram rk3399 ops Date: Tue, 16 Jul 2019 17:27:39 +0530 Message-Id: <20190716115745.12585-52-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=di7gqCHb; 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: , DDR set rate can be even required for lpddr4 and we need to keep the lpddr4 code to compile only for relevant boards which do support lpddr4. For this requirement, and for code readability handle data training via sdram_rk3399_ops with .set_rate and same will update in future while supporting lpddr4 code. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 623685e3c5..c3d7665ea2 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -74,6 +74,8 @@ struct dram_info { struct sdram_rk3399_ops { int (*data_training)(struct dram_info *dram, u32 channel, u8 rank, struct rk3399_sdram_params *sdram); + int (*set_rate)(struct dram_info *dram, + const struct rk3399_sdram_params *params); }; #if defined(CONFIG_TPL_BUILD) || \ @@ -948,6 +950,7 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, return 0; } +#if !defined(CONFIG_RAM_RK3399_LPDDR4) static void select_per_cs_training_index(const struct chan_info *chan, u32 rank) { @@ -1368,6 +1371,7 @@ static int data_training(struct dram_info *dram, u32 channel, return 0; } +#endif static void set_ddrconfig(const struct chan_info *chan, const struct rk3399_sdram_params *params, @@ -1487,7 +1491,6 @@ static int default_data_training(struct dram_info *dram, u32 channel, u8 rank, return data_training(dram, channel, params, training_flag); } -#endif static int switch_to_phy_index1(struct dram_info *dram, const struct rk3399_sdram_params *params) @@ -1534,7 +1537,8 @@ static int switch_to_phy_index1(struct dram_info *dram, return 0; } -#if defined(CONFIG_RAM_RK3399_LPDDR4) +#else + static u32 get_ddr_stride(struct rk3399_pmusgrf_regs *pmusgrf) { return ((readl(&pmusgrf->soc_con4) >> 10) & 0x1F); @@ -1938,7 +1942,7 @@ static int sdram_init(struct dram_info *dram, params->base.stride = calculate_stride(params); dram_all_config(dram, params); - switch_to_phy_index1(dram, params); + dram->ops->set_rate(dram, params); debug("Finish SDRAM initialization...\n"); return 0; @@ -1986,6 +1990,7 @@ static int conv_of_platdata(struct udevice *dev) static const struct sdram_rk3399_ops rk3399_ops = { #if !defined(CONFIG_RAM_RK3399_LPDDR4) .data_training = default_data_training, + .set_rate = switch_to_phy_index1, #else .data_training = lpddr4_mr_detect, #endif From patchwork Tue Jul 16 11:57: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: 801 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 24F783F08F for ; Tue, 16 Jul 2019 14:01:05 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id g21sf12223893pfb.13 for ; Tue, 16 Jul 2019 05:01:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278464; cv=pass; d=google.com; s=arc-20160816; b=XRAp9CJaj9xBa+B+YPaJDV66GJFx9AvAtZcdX4pfYZLyliY001LMOB+VUMWlWWr/ks Sgu49fzJt45YG0KO3LKU+uW/nA2bp8xqEq4OVwCxi2GtgRivZ94Ey9TipJslZ+E71ki9 VeRduLor4NIgCBCYn4X0RorHrCuhz7+Uz5Ca+OiK45w3wwdrnImYN8NAUJqhU5ejzwZF oHnTEjfvTgsBYvwkI6V6h0TXuLJBxhHgTQAg4v6it3O56gOgB5sTDkrj8J0QkmA+MKxv +t2Za/NXwXI676JYXL3UOo+a9cGR9L24Cf/USon6TSlU9ue1JEK8Q5+M4W5sEvbuWtpW 9Omw== 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=z3xAF8nJB4PYH2ClQxpJ/zFb2LkoLJe1+ag5pCz3YxY=; b=KvZMjGTfzVH/lyG/K/CqekOmo1DMBu1uxV8eWx0aRiwdpCcv5RY0MF06FPEx3Fa7K3 8H+J4Ozpw7acOT7cbkGp5+we6PwmdrZ07mZKf7DD7jXiQ2yzeHxM/SWIBJLwyWWwi3p/ jTcAcOPW8Gug8G6suVA1MRJA96nT4r8z6ARvxTO658IkWiLq3du1jhMt8V1OEsgwMs/V L8MbRIpMcxEhwjEXKbVc+Tq68IUKjGfcah3nIGWjulQYI06mQsYr+ooDUQQU6Y6E3n2G iLkMXz2cPr2E23hYAYfeaKeF51+hr02kanPTZUu5/nUNCuSUxkz+wYWPLlfdAqd2mqHt IciQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bVH2R1mc; 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=z3xAF8nJB4PYH2ClQxpJ/zFb2LkoLJe1+ag5pCz3YxY=; b=rTd9JIAW9m+dqfeVWqVIfInXkS4VndDXqOZMz9E0O9h4qHYJrPsS4EHbNpiNrDv4Rr kms10rhNjCiR7BtPsLiiLjgNGX72t7otAzBqXLVEz2YcZykO1M+x4mJagzLDutBGyQkL aWCpcCNqBKFv+lRhjuCZydsAD7m460xrriYuk= 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=z3xAF8nJB4PYH2ClQxpJ/zFb2LkoLJe1+ag5pCz3YxY=; b=pMVtOlnB7ymtmu8qzCg1IGPMQRoLh/h4pZ9HSxmT5sWSj8NC3ZAuml7pE2sV7wTJ5x JeTxN32J+aTZV9amrn41eJfqAR1cXYD+Rrcevbp7ADF+hUup/4ckwE2sVsesCeQr2vl9 VdPLemua4OmrtU8G6kaUn4ucBRxlzWPaLoXWr5K+BiUxpGeSB3GgcVY+xHSISDdY3byT v+FIFQOo090tHI8pM/5m/AyzuQvRXel1SOCtdp2866unFt+6NjMf4+orzHnHExDIDFcn PLsGVIVVfrFKLfvryLrcw2oQqNEZ+Y0h4pKpOKa3VciEIbRLL1YLe/iwocqawqodwIRQ O9Dg== X-Gm-Message-State: APjAAAWXx8YK8bhWsjEP8rCgbHhuzaOWlfmKi4VDyoQg7VFMykIVtQqN 40kRRWshAL3aPfkcv/T7NqVlscDB X-Google-Smtp-Source: APXvYqzRJxjeS2KpQ2N4SgYU8gzqslnatfiBcCusaWmvkAjTlNpHAUK4ReCfWY+1GDfkHk81XzRYig== X-Received: by 2002:a17:902:788f:: with SMTP id q15mr35431748pll.236.1563278463908; Tue, 16 Jul 2019 05:01:03 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b08e:: with SMTP id p14ls5463541plr.16.gmail; Tue, 16 Jul 2019 05:01:03 -0700 (PDT) X-Received: by 2002:a17:90a:d58c:: with SMTP id v12mr35069136pju.7.1563278463412; Tue, 16 Jul 2019 05:01:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278463; cv=none; d=google.com; s=arc-20160816; b=EhBRfKVlcd+SKpYUUDqpwTLD/alQ+J3McFD86iwB828600jGpfuP6jHJqTGm6tsmtj MjMwkAXynz+j/GC5ENJcGdVHsPWBO7AfNYgIJEu4y6EL7Cybtc78MxV9fXGl9MPkBQUu DuFLDbXOLSCuBfWeBMwESzyj8PqO0M8O82q+g2n2IKqZyRoa0lNXPGtnQIKZWyIEGnzr w1jeFvsgeeqRqphnqudUnovyb5rgal//gtI8m3uZcDijcBPFJNt5vsOyapZKTNhr+YDk 6DXGmiVBCI67e4bEpIxdRd7457CZdW2mzogXBHwqc5k4OKtRwgnAXKOlS6UY7wQhDgex Iv+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=VYlEm5rHh1utuucvpfabgypx14dGISV/IEDkNAeLzHg=; b=hAnFhw5dGV9iiMG+FPjryJj/i2ndYnXdtCut8yRkck8gTwQT/bxZk7p9SOz3UrJYiH SAcY1YqdWcS/Bxgp2CwHp01hmSSj48TPRE7SLoYVV7oTX/PP+euLGXa1khqVnt5OTpHU cIZYHKEUmxarhTY+pC11o6LqBMOx/+YHvTMcgC/YhOFLjQ5D0TpW357oD9ivw+Mje2Bj 9KMC7kIthZDyQUuFy4XHSnFKhRinkYAVq3rL54TFmmAa1clObWwTv9wb7pMENtSJYrJF GzZiyS0rcP8fxGR0SnU8TwwkX05sq5cYo+k75Zl3U8BD8VU8PVxUrdN3UuWkOls+y6Eu fr0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bVH2R1mc; 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 bg9sor24544644plb.73.2019.07.16.05.01.03 for (Google Transport Security); Tue, 16 Jul 2019 05:01: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:902:4401:: with SMTP id k1mr11449482pld.193.1563278462764; Tue, 16 Jul 2019 05:01:02 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.00.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:01:02 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 52/57] ram: rk3399: Add lpddr4 set rate support Date: Tue, 16 Jul 2019 17:27:40 +0530 Message-Id: <20190716115745.12585-53-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=bVH2R1mc; 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. The lpddr4 set rate sequnce will follow by setting lpddr4 - dq out - ca odt - MR3 - MR12 - MR14 registers sets in sequential order. 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 Reviewed-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 677 +++++++++++++++++++++++++++- 1 file changed, 665 insertions(+), 12 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index c3d7665ea2..3f29b5e0e8 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; @@ -75,7 +77,7 @@ struct sdram_rk3399_ops { int (*data_training)(struct dram_info *dram, u32 channel, u8 rank, struct rk3399_sdram_params *sdram); int (*set_rate)(struct dram_info *dram, - const struct rk3399_sdram_params *params); + struct rk3399_sdram_params *params); }; #if defined(CONFIG_TPL_BUILD) || \ @@ -221,6 +223,18 @@ 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; @@ -574,10 +588,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 *params, u32 mr5) + struct rk3399_sdram_params *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, params, ctl_phy_reg); + u32 *denali_ctl = get_denali_ctl(chan, 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; @@ -735,7 +750,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); @@ -919,7 +935,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, params, 0); + set_ds_odt(chan, params, true, 0); /* * phy_dqs_tsel_wr_timing_X 8bits DENALI_PHY_84/212/340/468 offset_8 @@ -950,7 +966,6 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, return 0; } -#if !defined(CONFIG_RAM_RK3399_LPDDR4) static void select_per_cs_training_index(const struct chan_info *chan, u32 rank) { @@ -1308,7 +1323,7 @@ static int data_training(struct dram_info *dram, u32 channel, if (training_flag == PI_FULL_TRAINING) { if (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 (params->base.dramtype == LPDDR3) { @@ -1371,7 +1386,6 @@ static int data_training(struct dram_info *dram, u32 channel, return 0; } -#endif static void set_ddrconfig(const struct chan_info *chan, const struct rk3399_sdram_params *params, @@ -1493,7 +1507,7 @@ static int default_data_training(struct dram_info *dram, u32 channel, u8 rank, } static int switch_to_phy_index1(struct dram_info *dram, - const struct rk3399_sdram_params *params) + struct rk3399_sdram_params *params) { u32 channel; u32 *denali_phy; @@ -1539,6 +1553,31 @@ static int switch_to_phy_index1(struct dram_info *dram, #else +struct rk3399_sdram_params lpddr4_timings[] = { + #include "sdram-rk3399-lpddr4-400.inc" + #include "sdram-rk3399-lpddr4-800.inc" +}; + +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 u32 lpddr4_get_phy(struct rk3399_sdram_params *params, u32 ctl) +{ + u32 lpddr4_phy[] = {1, 0, 0xb}; + + 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); @@ -1756,6 +1795,618 @@ 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 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 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 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 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, + u32 channel) +{ + u32 *denali_ctl, *denali_phy; + u32 *denali_phy_params; + u32 speed = 0; + 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; + + /* 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); + + 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); + 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, + * 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); + } + + /* + * 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, + 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, 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 int 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); + } + + return 0; +} #endif /* CONFIG_RAM_RK3399_LPDDR4 */ static unsigned char calculate_stride(struct rk3399_sdram_params *params) @@ -1993,6 +2644,7 @@ static const struct sdram_rk3399_ops rk3399_ops = { .set_rate = switch_to_phy_index1, #else .data_training = lpddr4_mr_detect, + .set_rate = lpddr4_set_rate, #endif }; @@ -2016,6 +2668,7 @@ static int rk3399_dmc_init(struct udevice *dev) priv->ops = &rk3399_ops; 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(); @@ -2034,8 +2687,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); From patchwork Tue Jul 16 11:57: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: 802 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 D5A1C3F08F for ; Tue, 16 Jul 2019 14:01:08 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id x10sf12227217pfa.23 for ; Tue, 16 Jul 2019 05:01:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278467; cv=pass; d=google.com; s=arc-20160816; b=KIeDYev2CbFlLa1e5xJ3yyZshK+34LlUCHVHcYvnzGfZMazV7SDbANQ9KCvmrHaYgE SgdoU9J5ezrSfoaRkURDQ5lXI4sveQMiXFiEZz9TeRjhgjR8vQZ+wQBoecs95386aLUr kyt6jJgQ1SAc3NRU0fWeucv8hj6RwZagFCzeUD8SAdWFMZkYnroXJNWOQ8woGqkazkH+ pMlAoA5lCWGefbc24uOsmsTbPVrsWYoppY4cwUDytkikzqP7+3b/ch6EM/2xj2jg4N63 Ym9pDRpCArCnydh3HsSqPa1ZIOHMC8wqgCF+4dpgt3KPxoxuoF8rduyUc3Z53dTtcFR8 KiLQ== 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=REH/qXhvUzzMre4jY/glnNiYTLZKdHeP7xa2A1ETEAk=; b=msg0vMW+cgPfGzmNySp6GxDlrncPnHzDyLO+8KAD9l4lW0UmxEsUeFY4xZrPMv6Br+ ezP54+jwqiNMLroOTSWO3x8MSj6Y/y/WyNetKE9QztyYm5tGxX8O3OcCNYOtJBU6+qDq FnU0Kx3XvyQd/IBH62FZrMhnJNjsISZnkO+I7XyUrtuEdMUr2cgpCtpsNCYWmMUUVrdq Xm+3oEDZa7qeRSNvQexwK1fdr2ZLJbl5R44ZxfgoNx+YgugxGYvdLGRdgEz9BUyMg5Ag B5wEhj4s9gUBiTTzPtEDdOtwKQ/NI/Rdrtq4TuK8AONeGFH8dlcTtwjgWp5CQssCx/bW GiCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qU3wJa+I; 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=REH/qXhvUzzMre4jY/glnNiYTLZKdHeP7xa2A1ETEAk=; b=GlS29p6ytV1TinxqLShlGQYJ9RrVLdRZUugpjVPPhndD5wBop/TOBlRbHK8GvqfzrP s2PXyaVTSPNfeiSIJlxfMAtit6FiScRh3mSLfVnTwdSWT6qPbNr2v+pXQDqakFwTYcMC 1GgJIa461pDXBoSAr/+CXsh+fYAB+wnW0YJO0= 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=REH/qXhvUzzMre4jY/glnNiYTLZKdHeP7xa2A1ETEAk=; b=d4kwAYPFcVUO8qukw4zrkq5OW45Nf8yLWABIvoVBBUnhvsZQPgR6CdxxGF0rYRc9wb PrNBx08Jr/eejXJhvadAv1exvUCn591CRjpzW5vq2zgHQQKdMBz9F877cScJhBcYicK1 a0+TiJbON/YebB0gvmSlsLX/DX1vOFOvX7u10YF+2N1jtSOOHjZRxvelDv5e09TG24uU qWoWQ8gF2WYnfyeCWypqCTOaWWiLM9kvGXl1MAMi0CCjp/ukMShri67OBwmglyprTmu4 cByVgdT2K0wBULWFhnR3AD9B/odblSrhMghC2SUE6ISBgtDOaSQ7zodrU0julSVkBLVN MCXQ== X-Gm-Message-State: APjAAAUA0Am3ZSUwhWssrS3SAPbcViNsyhLadDz7YmAwMar4fGdpqihy pzLQj5wb0qH6I3CgDdW/7AZIAsy6 X-Google-Smtp-Source: APXvYqy1uhxN9g9JfQlDW/4zEqhaPrSE+n5DMWMQ35BxPIPekl7FAAL6BCVUTfeDZDkGLtTysUg+SQ== X-Received: by 2002:a65:5a44:: with SMTP id z4mr33129361pgs.41.1563278467666; Tue, 16 Jul 2019 05:01:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:954c:: with SMTP id t12ls3435482pgn.12.gmail; Tue, 16 Jul 2019 05:01:07 -0700 (PDT) X-Received: by 2002:a63:231c:: with SMTP id j28mr6308391pgj.430.1563278467316; Tue, 16 Jul 2019 05:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278467; cv=none; d=google.com; s=arc-20160816; b=OA2tsmsY3zzM/Lsp86zrLLXxjZLFQVzrfPwJOd1nI9SxI5TFQuSwmimB7TBB3V5dOf u8jWve0t4fNZReJW/Ow2jQ5c9BfJOL2C1SnYNbMYxIHGgs7nx9cFAl70uV251OjEmygh 55JeDgIFLtzFWP9OT+teQ5X9pyumgsYQ2361tOio0hSa9NJq/VqqnlJUqBi22aoHkUZL XHvchvOodIQXjuDkgKOrJ1JdsRQEFMgg0ut+ljt3oRsQujoZNB/g3f6z4r5dOESEAo7U wu0GMPpadVZPyttmkVzhhyidmNz7cU8Ey1UPA6hAEnf/7Ip5WTI4jJgQs8OvnOZ/bd7W 4egA== 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=n0VrQpo/c7bOTsSmilS75A66hSQPZjmuXkAut/AU6vw=; b=KCstaPxmiF1t0eqwC3k8ri0q7xWCgenxyIiMcHBUBfhHca5m27kHnYB2e/evA50DgQ 0ctC703cpSwzP0YiKGfA+DET8tygEGCqYbFqiBoynWM1Pmddi0Rn9W4wmFbqriO8M8iL QajYtnv4zPUUkCkine652F/WKxLxaNpF2beyJKQmgEwdlOV73Oy+aMCGmV05xPFHo0ZS DX0CRs3/7vy3K4zhuxnI/3twiFTHKA3cWSn13DcMC9vDoCj//7ljlEPRIavzHNdkXM4M J0z2/F4a4ruuE0v6DT44S+sTsUEzQ7QwLdWSKjlM8jLdpa6vtHdGimlGxaCjIyB996Tp rhSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qU3wJa+I; 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 u64sor10726555pfb.68.2019.07.16.05.01.07 for (Google Transport Security); Tue, 16 Jul 2019 05:01: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:6bc5:: with SMTP id g188mr2129578pgc.225.1563278466359; Tue, 16 Jul 2019 05:01:06 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.01.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:01:05 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 53/57] configs: rockpro64: Enable LPDDR4 support Date: Tue, 16 Jul 2019 17:27:41 +0530 Message-Id: <20190716115745.12585-54-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=qU3wJa+I; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Due to foot-print issues, we have LPDDR4 code can be marked as CONFIG_RAM_RK3399_LPDDR4. So, enable it for Rockpro64 board. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- configs/rockpro64-rk3399_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig index e8fc7ae141..39e68aad82 100644 --- a/configs/rockpro64-rk3399_defconfig +++ b/configs/rockpro64-rk3399_defconfig @@ -28,6 +28,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="rk3399-rockpro64" CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y +CONFIG_RAM_RK3399_LPDDR4=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MMC_DW=y From patchwork Tue Jul 16 11:57: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: 803 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 389493F08F for ; Tue, 16 Jul 2019 14:01:12 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id t18sf2525511pgu.20 for ; Tue, 16 Jul 2019 05:01:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278471; cv=pass; d=google.com; s=arc-20160816; b=g5yI3kUTbrRl4R9NZrbAnQD3OgczgE0RtxVKPX60d5FsrbVE3Gq4jYyeG/trvQUjXU IM4Wmo4GgiinzcQwOfkIhZzpuUhB4jX7azeC1HTIOJbvvYhyTRmsATCjHO3WAbF7fptt 6bNHbgoqitNRTnsqL9R61VplipW4/FR9l6ZJWNVziyNxmZYqd8AdfUi4Bds6k8kSBR8c w6NZY1r8o0yRbjwNn1railCXPCDezGqm1QsiI99JzZKL+Qf91SIFF9xmMsW1I5Wcyoif N15nLBybHAj7F/jA+WBX2JuQvAWM5wHR2oWFvjRjxRr0g1/Cg1E3Ek1bS6MsXJ2GHgH3 0n5A== 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=d1h03GLkBkyziuQ+TTDPoJR0ZUyD3Zb0E6rfaXABhZU=; b=F7sTwG1GN048T0FruFYACW7OpIJVvTyuh/rN0Mn2qsGv9UzJ0nwfS0S2NR3h+cRTL+ DH7m1eg0+R0fLt6Fg9nZzh/nOFdztL2tzxsF7fB6toPHdjfBffKJGX7hfIRoJSCKx6lg wXNLfx+kmidippObQ0oQubSQpJUfunfNNBF79ZRcS7viT0lGdhk4OkMLes9kpTNPLaZF 8aiZOe8tNbEXCbBsgp0fsyvB2eQzwc51TBeyIxm7EqeoRU0SyII34ytk4UnoxUWpTDLd Vss9sOXAIPWjR2eZv5GbPhuUGcepUWwlR//f1MgYxgNwImtTVUHWHrZ/+lvBbNx4L753 8aTg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lQgdM5HC; 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=d1h03GLkBkyziuQ+TTDPoJR0ZUyD3Zb0E6rfaXABhZU=; b=l9mWpkAjcSuT/3+OPvl4ZYWsdpop5boshudK7y6O3sgB5c9Se57pZ2Jz9NzGbfBa9J LHYt8joAJi3090Z2XOmNbId9Csx04br/kbeYJ86vSBZ/NwjwcZg1nn5U6JatlMSYCn5N u3RSkVmh0PjzPkMl/UY+spsqp7W+3mx3159yg= 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=d1h03GLkBkyziuQ+TTDPoJR0ZUyD3Zb0E6rfaXABhZU=; b=Ou4psnX4+g7mj61ygd7PrwxgSZbeofY7yH071rwa83BQQtc5fxLZbW8JohbIDSXq0U KWcHEo+96zmTToEXnTxi7px443U8mH2RmS7UMpBRshJ9XLD+dGinokPWuXY+zn/p341K HR4ZhYRCXMLe6a86/nMJUbkcE4T02D+FS/apo8a6RMXmiTWnJkduDWaIvI2iNZA+4Kc6 PuyLrViO47ey7Ej9XfpAcw7dgws8cVNFqh5l4B5k/syHsPedHX3IZGA6yqLNK4frVEL7 WvHYbyfRfZERtCnGSJhtp32BkHuV93tFXadJxhyDwJa6Q90P98aMnRm7AJ8PAGuqtO/T f72g== X-Gm-Message-State: APjAAAUInwBxGOx/yyiBNMmlIUHcQ5nJ9A+AxSzYUmcUdBq+npZiPON2 g5fNcX6gDn1i8bMh/dP9sFP9ahez X-Google-Smtp-Source: APXvYqwQbCPl6Aa9CydLwCWD62YHIg3sOwp8vai8odJITzEuXRVmmfIbD9bs8mRhUidVCueJPMmOPw== X-Received: by 2002:a17:902:e40f:: with SMTP id ci15mr34912255plb.103.1563278471040; Tue, 16 Jul 2019 05:01:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:372f:: with SMTP id u44ls7081517pjb.5.canary-gmail; Tue, 16 Jul 2019 05:01:10 -0700 (PDT) X-Received: by 2002:a17:90a:1c1:: with SMTP id 1mr35804348pjd.72.1563278470652; Tue, 16 Jul 2019 05:01:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278470; cv=none; d=google.com; s=arc-20160816; b=YQR6wKHVSspta5bYk+OWsHbNqfG55vjPutJbRit2VersBMt7W6NeLp56WudQWUjpJ9 n2izYQhTB3MWeYWLMs8LkgeawQ3VUPkMGIiM6GLRRJw+xokfq8E91JRIAnqQfBp6vvAB jq8mLL6dzxj3/LcNM7Thh4u63pTzZGDxuQR4xXDPJt/U5aaun/kt6CH3b/Z66ghzpmQp 00n/bwtMBoq9JCx9RgQjeAFG0bliuQ1o1t0uVVH0+ihMVZg/hR605t//pCkY0pmsHk+f L6I4x3ngxPqsueKylTIb8IpCxFg4ix+oOWQN4SrEOThDyFZQ60QI0aBM4n3vJP0/UGW/ kHsw== 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=bRhil/NYHQnUOi/tLSERAyGO+6cDsKMuNXt9MkG9t78=; b=x8Rv7cy3cS2Tfvr4gFTvUhyJTG/D1EBuoU3kqmVikNzKq3859U1bFcj2N9YGjhK0lS 5KrF4TQZHLX7bDInTWadV8eJOkJX7LmMzV1tD2xS/+9/hQ3gFjqs8VzzLmsdfiEQ47cz O2z2rdb124/qHdL+1Zl/sw/E1BqPDNptdphhp37Lc1DRTPGHSeoQF7knpYrB1Demng0v 28b0RPjkEN74Qgsdj2FrmiLZGDeuDyrn5gXUrIkofZgilxJuzBei35xf9PhzEdJcKn/b bGHoBVYNni40VfQUEloREpVLCgHnBvZI94QCltMKI+ROXuXuDEZIfoI9S2orW9qUsSbn rbIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lQgdM5HC; 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 cu6sor24613714pjb.22.2019.07.16.05.01.10 for (Google Transport Security); Tue, 16 Jul 2019 05:01: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:a17:90a:22aa:: with SMTP id s39mr35500168pjc.39.1563278470362; Tue, 16 Jul 2019 05:01:10 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.01.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:01:09 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 54/57] configs: rock-pi-4: Enable LPDDR4 support Date: Tue, 16 Jul 2019 17:27:42 +0530 Message-Id: <20190716115745.12585-55-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=lQgdM5HC; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Due to foot-print issues, we have LPDDR4 code can be marked as CONFIG_RAM_RK3399_LPDDR4. So, enable it for Rock-PI-4 board. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- configs/rock-pi-4-rk3399_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig index be670df23f..c6fc9b995d 100644 --- a/configs/rock-pi-4-rk3399_defconfig +++ b/configs/rock-pi-4-rk3399_defconfig @@ -28,6 +28,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4" CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y +CONFIG_RAM_RK3399_LPDDR4=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MMC_DW=y From patchwork Tue Jul 16 11:57: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: 804 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 3EB123F08F for ; Tue, 16 Jul 2019 14:01:16 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id r142sf12223985pfc.2 for ; Tue, 16 Jul 2019 05:01:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278475; cv=pass; d=google.com; s=arc-20160816; b=pTJbs/Lt59bpglUza3Ykb3GT0QN4VC/dPKxhjeDl96Ux32oMEmOHSboJgpqKappLEN /fH/XujaWwq7iuKMrHJmAKHxP6vVm6OWczEI00tpomSnfb5gu5K86r1irRco+z8A2MSF 0RaoDmfYiv+AP0+S6BB8Am7bCYlVH6z/mtt22BurUjVOk3TG343MLJGXH3SpX9EavbWS /JXcnuiGwL6ZXGUXNNGdFzNwm5q5GC4Ih0gB8Hla5KvrPW8jokTRRsrX81j8V3dJtmSv M+gMPJW1dt1i4oHSp6nlwUCfJV7IchkFW7hVipJpfCTlfIU9z5JE8fJa+YWrL520SpF6 NSdA== 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=M3zmEumrd8AcjvF7wigHfIT0/e3lzxBaRBaXS7QBadeXe7gpxxgUtwwM86a6n36syO 9gUVX11+EWQk8Cm7AplfDj1YjQpUCkDRvgeGUPNRIKYTj5gtnkpLT6ib7gylo5R+KRVj /ZtmllwQBHlbc3oH6tP8N+x6xeSYjSSzW3ZQIdvNCqQdxKcOuGjQqlpVHWSgbydak6Y5 s8DLsCR+CK4sIfE1sR0yQycc+uF4kE4A59wp9C9wkDNDq+z7CvvWQEL6Im9ku6oIB3kJ EYxMj7/Wm7bR66h3mGPkWgWgwmuc5KbicO8lSfIA9mUdVSMEN2z6CA+JVog2Z2OzGTPi Tx4Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=h5tVd91Y; 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=FX3JxlXEBZMiLLCxVI2GeixL6gs71KeWt6XmM/n16k/E/Vkej6KMzUBniZC6yIafLL FEPpDmsE+2/wIEwh4/BnQALGQEFqqAzC0SeWaBwMefdP+4K4XE7GN/us30CWUv6mjRqb QWdZqVPz8WvalK57BOQqCnk7/HPFmwMpnFHZs= 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=NWqNC9r1SCtutH1qgm09YU38v60aoJAOWj7pfy/kZ6felON1aSrysRS09DQOJPtJss lGVyyP4iK8cob7rf2sgbiSGfnhwyox3xnmdEKp6AiggTnAaXU4QBRy4wOZ2VyhT4eIoo A4lscCeasBKnkvhxJcpKE1m4If/cFOYktmf0WTs4Ds0ZkCps6lvjWdVkOi+uQ+gExikk 0Jus5NEJAHjk+JjN7473U8+9RcaNQVFPvF1P2oMSGOZwHjPWz3YKzJ4bjd9QeSY2/s0M 7M5yzEcLZ/JasuQi2dKlkI0Qy3euk6RZYdVpb40za6sa7jNf8p/sdNZUnoJW7RAqSAL5 mUzw== X-Gm-Message-State: APjAAAU7EiKcc7E7R16OV4XaUF6A2X48ahlMeIOhyuElf57IADZgS4g2 Bd4tatSFJp4rncPpAavMYXPaJUds X-Google-Smtp-Source: APXvYqxxOQJ3TIA4c407F3ULmjXTCa6BJnI4R1aF8YqTAD0rgo92J8jZNtDyLJmyJWNgwaN/3lEuyA== X-Received: by 2002:a17:90a:3463:: with SMTP id o90mr36492996pjb.15.1563278475067; Tue, 16 Jul 2019 05:01:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5ec4:: with SMTP id s187ls3484732pfb.1.gmail; Tue, 16 Jul 2019 05:01:14 -0700 (PDT) X-Received: by 2002:a63:4d05:: with SMTP id a5mr30874681pgb.19.1563278474663; Tue, 16 Jul 2019 05:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278474; cv=none; d=google.com; s=arc-20160816; b=K1OzImSC2fHr9XbCN/7OCQu6pPFmbmzxvF+8NVZ5f365O98swfzWw1gh/4y9LeE6aP TaxrJcY7W0N6yIx9szxuI8+Ju8EAPIe2RQ8+Flwc5cqoxAy365aFMDGvg1D7i0FniotN qYhg89x0tYW9p8g4+m/YOO5Oxy3wFRyK8hb9fjIYsEx13SHlV9+Vol2RgT7yemufii/n ZDu8/O5D+VsQu2celeijMg69kr5V1YP0biz0Fpf06GYithL20ObnDp6FglVXtuPFsAEc ype85Q1v60vJBKZ/3lFU75achjRwg7qaZDo8/3JnMlxkYHaED9KVGW4Q4MhdNJTUjqTR aXzA== 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=fBl+roFrEB40RMpqKC8k09A3LtkdynLa8TE2zuMVzFSuoaEe+92ty2dwS90Nnr603J v7QtNABIZufNiTFBaLMDC0F+0gon6yvZ9e9SOyez+9K5T12cCGsvGekvPUsggWZg1f8F 8XMe9nw+rxR3hlJtrqMgdQKpywHRBkLG5qrAF2bjlTanTMtTt1eLfMUBMb1lQNSnM5d7 bD1vfjDSreyeDjimxSvu6JXkLv31uHkjJSTLuSixHFKlJCoFm7MVDrJXE61tvfIsCdGT ecHCDiJSx+jStT3ey53QAl/8BPNFKx9hgf4pSv3lLjCjWJk2Wa4nw+36G9CxL5vWNbTa ZMWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=h5tVd91Y; 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 z25sor10436034pgv.71.2019.07.16.05.01.14 for (Google Transport Security); Tue, 16 Jul 2019 05:01: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:a63:2cc7:: with SMTP id s190mr21300976pgs.236.1563278473991; Tue, 16 Jul 2019 05:01:13 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.01.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:01:13 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 55/57] rockchip: dts: rk3399: Add LPDDR4-100 timings Date: Tue, 16 Jul 2019 17:27:43 +0530 Message-Id: <20190716115745.12585-56-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=h5tVd91Y; 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 Reviewed-by: Kever Yang --- 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 Jul 16 11:57: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: 805 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 77EAC3F08F for ; Tue, 16 Jul 2019 14:01:19 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id q11sf10035693pll.22 for ; Tue, 16 Jul 2019 05:01:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278478; cv=pass; d=google.com; s=arc-20160816; b=B7LrbFlt9hqgkx7zQwNBX+h4aa6Dk6micCBC6TJZEUTC2pLorUogNcF2GTYbWC8n1Z hKHyxUCuuMohFYnB8hosXt4Nx/zNmoARtNzO2saODAj3Ci/0RmLP4x/PGM1++mGRr7/v aU1lIe3FxD+Bd8q/tmFlfMTe+J1Wb1GCkvAIfawkwQpeL09HaqfND99tkb/PfnMIhlrC 7dOvQrqDPHa1+wgv2r2GHT37xaLouEK32BtkIzzel0A+UCd8UqKjnxthklk3C1oMWEBx NPNda2JD0uI5/fAWnmaDlI1tPlRno4veLBpWmpNw0CC4c21Ehz846jM98/RL9MnwCJ4a oXkA== 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=gbSdUmbY/ZDYMfWTr3MPUrGEi3FslYNwJF0BOLaaKXg=; b=C8Cva1DA4X6+bkGVMTXZZWdL/jJzNr9x998iyD/4fSIrqpUauZSjs1O2SkskbL8Tp4 EUWtLA6J0d5YvMgdfZKAvz02uwlsa9DcXwBWLUBG4vOCdbQvOnm6upG2SxXdKdGBaZKa ry60eg3eeBMb3/DVnRXD03+21BvFBMxNPJGuCyaIg5s+NKVWiWbok3cb4QtIhA8K2GN1 JoWYanp8FdTs+hVOY/V3Eo3g5KlBu6byUo69gseT+evqyvBA4SU95yEsgK4++re8Oues m7d3ZYeiIbnn5nkr4djA3pMqG2WAIZ879NdcTGXF2hPmrihM2aiZrEFldmW4HJXyrh5b cdOA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iCTgdrLo; 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=gbSdUmbY/ZDYMfWTr3MPUrGEi3FslYNwJF0BOLaaKXg=; b=e3mFfItGbkkW8dhqpp5RA6xos4dMc8wTgmZaz6r5DPsvH2yXw+z6tqC3N0MTAiEG+p dbER44+TOKTNqJrX6gZfzLGXFgkQxOxMmm0cxRCv4XzmenQnC4ERP2eSLQ6KNCnSDmsA RVVcX+i9tTZ1X/A3R93nzSsNZql24A2pPOBks= 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=gbSdUmbY/ZDYMfWTr3MPUrGEi3FslYNwJF0BOLaaKXg=; b=S2lBteEQ24rCXSNR37bjC3hLHHQvQNboX7WxcvyZLI6WTKkBXm9mZSO53/kwYhkJLA myfX5N1QdkC53rpwUku+T/HvSRCIDv0v0CUaHGbGaU9qQep+mPeBmB66R2FBW3pN8uEZ 8An0uyM14Ec1X6V2LZY1VmLsbXXNZXMOf4UILYrijDyDmAw6LGUJvDWKlNeY7aq1UORV zf//El/9w8Ai+PoCoj4pStzKUXi2bDz/cmxMyTmghBx9PR1Yz9qJCxo89Li8jb0iV667 94A90Nb/Zx+GWQs2x1Nm3SNAA0pGcRridcEMtyreAqJbEOUw7O9XmCZxL4J23f1fEeHD Ej2A== X-Gm-Message-State: APjAAAWoAJSPmHFF5QsOHDp9eM+gF/equQ9UAHf2ZXgy54ybtN+CtESC G38lEQeHJYhop1gbpzZ6HwUYqLc5 X-Google-Smtp-Source: APXvYqx5JbW72vvTGOx7ApqQgm2/vRNg0GqgNyu3vH3rfywRXj95BwyArPm4Bt7mWHlJX8BGCS0i7Q== X-Received: by 2002:a63:c442:: with SMTP id m2mr33560909pgg.286.1563278478209; Tue, 16 Jul 2019 05:01:18 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:1021:: with SMTP id b30ls5471140pla.1.gmail; Tue, 16 Jul 2019 05:01:17 -0700 (PDT) X-Received: by 2002:a17:902:724:: with SMTP id 33mr34068976pli.49.1563278477868; Tue, 16 Jul 2019 05:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278477; cv=none; d=google.com; s=arc-20160816; b=gnchCGQcU/zb/E9/CYZC4GcaN4W9MjaAxA5ZqEnivXyM/nvQ+EdqkAKGU6Cv0pBMI6 /rHjF1xEKKMxYT59qOyCmmv2rGibQy3aLdqfE5tlwiM/xbmxG8RQcl93mSVuo/KvSd2T zBpToD3MDHZnEynoZsRuJidraFGwPD8e6oIunqQqY6ahsUnMTRXldgTHhFwidp7uY0mo 2N3S3bP9zG73yHj8/K84UitJquOGe2Ifjq/rqsZQBKtQxS9Nko+qWezmHjWPig9T0cxx dqvjsCIaRjsE0zCNDzjSIzBwrSk5Ard/uMPiQVeC13LXMEEKX1gvQT8dKPmwf95kMyNB M3+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=fpDCUTq/uMeL7qOuwamH4FPPN3zzEe4BTd5pNTFMd+8=; b=iIa8Ivjh+EptLrORiuKYLmEHbmr9R0ZcL1v69iV3w5nZ2/0r4c78UmJoCryeQSC8qj MVoTCZRDSAkK2+TKnHV+DEy+RNsXYMMX/nR1REhWikO0dP//EgrkrrjPLahE1EIK8KUO aQvczb+aidtd74TEXorvA9/gb9CuxFnH9f9ZHjvcJjU+bv7yT8BVxfxf9sW1bzoxmnh5 GW+zi37xr+R0ztYlO0cYblZhDPMcPXA8Kohg/VGCe7+QSkstDdgtNbz5eNtMTI+jUxHq 959+qceiniB0VXRzEqiCsBrgKJMbdLxT1z1vTrJ4PB5bM5dhr+xcKZTl5gq6AeUyi5DN Y3bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iCTgdrLo; 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 f7sor10417828pgc.20.2019.07.16.05.01.17 for (Google Transport Security); Tue, 16 Jul 2019 05:01: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:a65:62c4:: with SMTP id m4mr32274025pgv.243.1563278477532; Tue, 16 Jul 2019 05:01:17 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.01.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:01:17 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 56/57] rockchip: dts: rk3399: rockpro64: Use LPDDR4-100 dtsi Date: Tue, 16 Jul 2019 17:27:44 +0530 Message-Id: <20190716115745.12585-57-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=iCTgdrLo; 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 Reviewed-by: Kever Yang --- 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 50b0ca0df5..f7f26d584f 100644 --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi @@ -4,6 +4,7 @@ */ #include "rk3399-u-boot.dtsi" +#include "rk3399-sdram-lpddr4-100.dtsi" &vdd_log { regulator-init-microvolt = <950000>; From patchwork Tue Jul 16 11:57: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: 806 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 EF8873F08F for ; Tue, 16 Jul 2019 14:01:22 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id 145sf12240462pfv.18 for ; Tue, 16 Jul 2019 05:01:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278481; cv=pass; d=google.com; s=arc-20160816; b=CkvuaDGSy42waJpwR3rQWwAG75Q2I0RHSrFp7xf8q+7tLtUbMZVIbHqSvpDiE0tbM2 YKJxaLOI7sy1LXrQmCUwO215BZZQL+2JVmTdVBt5Pdn1ZVkbGnKbScfkpNjBgBR5WlRv X1hfdUJg7xJ+nWpm/zqramJfbcAOvKMU48i5rMvTPtc5TjYRwRWJZQXzo5zkgqN+R1dq tM5Nt2he4jCypMvjg0CejMkYyaGd3Ogcb0Ap7tFzLS929Ej6H3YlPNN0z1AvXmlzJXAa PVYaIjVCtCCo7VxhU/7gvP/EZJM2kxM4t8vK8nAv1QwW1l4NCGbh4jocxHuFSYA6qonx J7Rg== 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=vibwhDCHoOv6Hc7aq782QUSUKjioXnI0HboWk3IsxnCxTaM3zL5DWmKOFTH4NLmfbJ u4cp+8MrqmBKIPUTckuSW08AZwS4lET2MLRI/emGSoGgjOb7XWAFzfWXTHl4cOohxkmD IOBIGKeV2LEbn/y6giTeEGLEbL5s4pfPIm6nHgLO4MGv+A2TI+DzqeH8mRWR2CnWnCoE +zkLUvszquXEFgbUq6SI32pmwNVv200hrPHAX4bh8nHsD1urS8UQq0xPV+CSHmAv0gtD laT0ehKqFFInJBweefrEq7jrNOuMgh7AN1fWaqA0gppUscfDGNHKw0vKpFpmYduU34rP liUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hYTTtbSP; 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=kzeBilx3TIKQRXDXRvogYUs77pLlmmY7OsdrHTxQssnM5NrWN+4d41610diuS+s9jV s9sUaLMUEuT3VtPTDxleIzoNKhARcwQtBR+PWF511apmpXOLbQgRpoB8wS6GgBZJ6y8y xm7GoZo5H3I7TIr7+5UZdto8LMjLvXlaPVlmg= 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=HDtefNt+rX4gjQFjJ8qWxOO13B1zZmjf3ftRZyypSgDd4gE/ac09Dwu4s/38DlLtcF IiVNTpa/PYeEs47a/+ynB4aStAIrn9Ajc/o9dxC8g/quAjOpCZTS39BOFwkk6VtrsNnb ua6o8vq67mcdpTL1IbMRSgg/txvlO3L8Ob9T7eauvu66CuCvDbwUwLNGVtGGhyoImYzv zuV3HX9xHwOcrAO9UsYV+xmbAPh/Ng8MJN6I2siR7bFrVTbPIOVtGPF7veIb6pkOHZKd c4AFAn6YGrRjOeyazvrDyxBAbqCc/xGKUg9ULINiKuRrPukBOTF9zg57uEwGWiU/zYP5 yTeg== X-Gm-Message-State: APjAAAUjcANrTKgiUiH1mN6l1ra3OAMCDGKEmGOJMDhEOpHvx/1wfR68 IOst4ClXhxIcMf/Rivnc4/oQymuR X-Google-Smtp-Source: APXvYqwxsKHoww9wN9f0MwTHH7n7tVKD3qwqchrHIcG4GAKr+BcHaNfWypUoZS8anjLlARP0o923Qg== X-Received: by 2002:a17:90a:fa12:: with SMTP id cm18mr35619592pjb.137.1563278481816; Tue, 16 Jul 2019 05:01:21 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:26ae:: with SMTP id m43ls7080288pje.2.canary-gmail; Tue, 16 Jul 2019 05:01:21 -0700 (PDT) X-Received: by 2002:a17:902:f213:: with SMTP id gn19mr35842036plb.35.1563278481480; Tue, 16 Jul 2019 05:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278481; cv=none; d=google.com; s=arc-20160816; b=DSbhqovMVWoNr6klS8iq5G/uBrNXn+S8c3juzsKUSEewM/5dWxBjIOuAhyv4X5GQO5 77nqvLnCsBPoHyD9V6ZPV47AD2GUNkNnRjVFB9v/a0BsLMSFHlW1FcKOkxXi4POXPomI FaRdkvkuwgexwaH/iqzBkyrCustw85cHOsaBQSOl9DKGziL/N8CDuLYdhkYfKLGzcHeA exFOWj6pbU5Vt0e7SwggpSEFdOK0PVucwXxJFdEq1rXJ/RymHPtVi6en7K6lRKGU1h6U FeClrXFWpqSukKxp35IAnTGwUSIjNShpii7Ukks97Xkn5rmwL1JgNEwjpNH7OvTvgb+b Vx7w== 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=RKB8taKRjtIWQtSGQlma8pXezVtd4JrT13LHvLVdyLRnapv2CEGIMr7Qt8zDBdVLr5 yuCUojOOktlxICRvjhWwueE6e3QjIuInlh3xRpGiKPc+lkOF3YXMpkPMr9TFsJSNDiSs Fyw/K01wkjiUBYJigRgNBxcJPXUSJBmOev1PKVumSdoaWa5pajpzTQhdPZre8AoHsiOO n/2bsK8osok9xY+Zb5RfkKs/ugBdNoDuC2BdO0lDHWttA+rFjiJfm3roDQ+JJNKqDTEp v8iVNRDtp0vlK1G/HclSXbzvMBn+GHmSS//IwYUdbTc6u7PEgMvdomSskW+d2hFh9LXc D3kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hYTTtbSP; 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 p187sor2316970pga.43.2019.07.16.05.01.21 for (Google Transport Security); Tue, 16 Jul 2019 05:01: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:8c0e:: with SMTP id m14mr16708414pgd.219.1563278481106; Tue, 16 Jul 2019 05:01:21 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.05.01.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 05:01:20 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 57/57] rockchip: dts: rk3399: rock-pi-4: Use LPDDR4-100 dtsi Date: Tue, 16 Jul 2019 17:27:45 +0530 Message-Id: <20190716115745.12585-58-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=hYTTtbSP; 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 Reviewed-by: Kever Yang --- 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"