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 */