From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B9D2CC433F5 for ; Thu, 14 Apr 2022 17:34:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6ECB083DEA; Thu, 14 Apr 2022 19:34:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1649957672; bh=/HJxWPL64CIY9lpW45FeqDRqU4z0p4GhHuO2pJJGros=; h=Date:Subject:From:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=yYNjFJgvBbyXi2X2yid+49ot1vbCfNnfdnykT4gLhErHNGI7/N+I+IbnAHviXG1XE YdmYUw1yIKOna5dpzYtUVlYrurXtOi6rv/TzTteBUnXHjMPFUGrwpSrp6TyIheFJ22 6f8vBvVypm2+JxjHh853u754pVqgytyrx0h8Y8z7MbxJd+8dC9zyvBoHZLWe9p5F2X zE87ptCm+ps8QUSI/fYvShEjWHOC5s3t60PSan1Mhw1yBfkEl2ybbZpBEfBMnxr+A9 x7Lsrh2XBDMHGrqRnyECyU6XwOhb2KN64h+TxLC1/z13wkQjeojIP0hn+1DACakdXx uPDAnU9BBZAQw== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 8527883DA0; Thu, 14 Apr 2022 19:34:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1649957670; bh=/HJxWPL64CIY9lpW45FeqDRqU4z0p4GhHuO2pJJGros=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=IRBkQfXzEy3pmZ9+GSGXxbUpF7CbhR6vg9Qnh4i5c1J+LPo2N90QIJ3Y5SSfD6cLG IscK9SEl8d7otaHeVoJdukKhq5pmakDFX5Vl2+dgQ+Bb5k2XTPCUREShxH3a1E/Wnm nI45wi9YcF6WqNYpwBYuiOrGTpUUsHdn7DPGH4GJrpalhi549RsOk4EhrrX3JaJmUp 1OtEV9KcMe6bjnCB1QK33WzVaRwPDns323YguUUpxtJxNnJw4ws4MlWQkm6FztG0l6 fwNcnjLo2jCzAmAV3kHG0DrF6+m+MCRYKpXXkSMmYtEn6v/J+/H6WICnLvMQulR442 mrrfF1XNRYNJg== Message-ID: <641bd43c-c2f4-d1a8-7a67-1a2f0039dcfb@denx.de> Date: Thu, 14 Apr 2022 19:34:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] ram: stm32mp1: Conditionally enable ASR Content-Language: en-US From: Marek Vasut To: Patrick DELAUNAY , u-boot@lists.denx.de Cc: Patrice Chotard References: <20220413024937.502193-1-marex@denx.de> <8e5ce23d-b43e-0c43-092a-3a1173bfe2c0@foss.st.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 4/14/22 18:48, Marek Vasut wrote: > On 4/14/22 18:37, Patrick DELAUNAY wrote: >> Hi Marek, > > Hi, > >> on ST platform the ASR/SSR/HSR request are already provided by the DDR >> settings with pwrctl register value >> >> it is managed in TF-A by >> >> arm-trusted-firmware/drivers/st/ddr/stm32mp1_ddr_helpers.c > > Sure, I don't use ATF and I have no intention of ever using ATF on this > platform. > >> enumstm32mp1_ddr_sr_mode ddr_read_sr_mode(void) >> { >> uint32_tpwrctl = mmio_read_32(stm32mp_ddrctrl_base() + DDRCTRL_PWRCTL); >> switch(pwrctl & (DDRCTRL_PWRCTL_EN_DFI_DRAM_CLK_DISABLE | >> DDRCTRL_PWRCTL_SELFREF_EN)) { >> case0U: >> returnDDR_SSR_MODE; >> caseDDRCTRL_PWRCTL_EN_DFI_DRAM_CLK_DISABLE: >> returnDDR_HSR_MODE; >> caseDDRCTRL_PWRCTL_EN_DFI_DRAM_CLK_DISABLE | DDRCTRL_PWRCTL_SELFREF_EN: >> returnDDR_ASR_MODE; >> default: >> returnDDR_SR_MODE_INVALID; >> } >> } >> >> no need to add an other property > > This is for U-Boot, plain, stock, without any other software partaking > in it. Note that this patch just reinstates the old behavior before v2022.04 release, except it adds a DT property to enable the new behavior with ASR and makes it non-default.