Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1038969pxb; Fri, 1 Oct 2021 01:58:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZjmwVKmd4AmE63bNFr/L8l7arNCSGy5hGEmjoYlshlVKN5RAVXvybAyn6DpRWk3z2E1+m X-Received: by 2002:a05:6402:358c:: with SMTP id y12mr1959378edc.159.1633078739476; Fri, 01 Oct 2021 01:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633078739; cv=none; d=google.com; s=arc-20160816; b=QNDOWH+5AEfYULfKEWf+X2SSNx8fKjUR61qCzL4DZHTvdSN866IwUzoPT1d6zlecxf wPM4bkKft+yOL+eDqI4ehUqoQE8/YVOhbWSeR0knz8g2Ipfi8ERvA7/ou4zk/HrbayKc wYatrqij/sG0fCKPygeGRrWGQN8QdeX+hU5oeOd7sjtul8u8/y2J6iJf/L7s2UM/HVvZ m1puOD4k3ryeqqh0aPIv4t1laANDMAjoSpT6j9a0tqqHjmx/NAIk5OMRGADg+uLtjrZp Dw2m1uLns+3VQlp5f5cQAN3eDKY+JOZdWv83TfJV/GvZTgaJxmWA7OJwvGZB4+gXECkD kUmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=pka7QBOnoH/Cwn4fujjgVLOwp8g0FDP6lUZwoHaCsk0=; b=Ax3BcCSP88VKRSPSrLhWtPdN3j5+NA9qXDq8jN36b/DdyIZMbl5m5sq6t15ZkRj+Mf U3XZ4v0u/zdu/Tx5J4Ye1DvXnvcy5tGsQ/7NqXHWq+7dL3FCtGCDbiit1rRAOubKZVLu I7WLVkVjPXB6f+253NaClH/36/ORGIAsjlWeSDmTfIpusJxVx1Jmnx3qYvKJno/wbsAc v78quaVnEDf9zN2YH4vkKCQGEG9jR1S1sJeOH2Di4S847AFuqSp417tdMBnQFX3ALgFb 1zI0kQXr5pyTKTSAEQgEopQ63MeSwI3ZMarJ1StL4IrGDWf5DtTaaiZcLfYJBsQQWeX/ QwCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=Y0dkP3Yb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u27si2163162ejg.412.2021.10.01.01.58.35; Fri, 01 Oct 2021 01:58:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=Y0dkP3Yb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352316AbhJAI4q (ORCPT + 99 others); Fri, 1 Oct 2021 04:56:46 -0400 Received: from www.zeus03.de ([194.117.254.33]:42260 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbhJAI4p (ORCPT ); Fri, 1 Oct 2021 04:56:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=k1; bh=U0XYrY7BfpzXUDaE53ryLcZq8bbX xEwB4ugx+HOYEAM=; b=Y0dkP3YbmXab6WI/QAVhlO/cRwgLvXfKY5aQuEWMP9zi PIKv+vSUuxsBC3jPZ9vP1yWk6m7nO06Hk5J8S6+fL3tY0CUAD2Og/YocuD1ApjAG gc1vSVyFKORA8TwoVMkl+4ia5KluFN/Sj1ix4syqNvBJyUa8qby/WFR1+qPUX/8= Received: (qmail 2400745 invoked from network); 1 Oct 2021 10:54:58 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 1 Oct 2021 10:54:58 +0200 X-UD-Smtp-Session: l3s3148p1@mSSZt0bNQtAgAwDPXwmDAJN1R91E6vGQ Date: Fri, 1 Oct 2021 10:54:55 +0200 From: Wolfram Sang To: "Lad, Prabhakar" Cc: Lad Prabhakar , Krzysztof Kozlowski , Rob Herring , Geert Uytterhoeven , Vignesh Raghavendra , Miquel Raynal , Richard Weinberger , Mark Brown , Philipp Zabel , Sergei Shtylyov , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-mtd@lists.infradead.org, linux-spi , LKML , Linux-Renesas , Biju Das Subject: Re: [PATCH 6/6] memory: renesas-rpc-if: Add support for RZ/G2L Message-ID: Mail-Followup-To: Wolfram Sang , "Lad, Prabhakar" , Lad Prabhakar , Krzysztof Kozlowski , Rob Herring , Geert Uytterhoeven , Vignesh Raghavendra , Miquel Raynal , Richard Weinberger , Mark Brown , Philipp Zabel , Sergei Shtylyov , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-mtd@lists.infradead.org, linux-spi , LKML , Linux-Renesas , Biju Das References: <20210928140721.8805-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20210928140721.8805-7-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="POeIfeKI2d2tOV4O" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --POeIfeKI2d2tOV4O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Prabhakar, > > Is RPCIF_CMNCR_IO3FV and RPCIF_CMNCR_IO2FV actually documented in your > > datasheets? I am asking because I have a patch pending to remove writing > > to undocumented locations. So, I was aboout to remove the IO3FV and > > IO2FV macros. > > > Yes they are documented, you should be able to download the HW manual from [1] Great, then I will keep them! > > > + regmap_write(rpc->regmap, RPCIF_PHYADJ2, 0x00008080); > > > + regmap_write(rpc->regmap, RPCIF_PHYADJ1, 0x80000024); > > > > Can't we have defines for these magic values? At least in my latest Gen3 > > documentation, these values are explained. > > > RZ/G2L manual doesn't explain these bits. Let me refer to R-Car Gen3 > and define them as macros. Seems like we have the best of both worlds then with the documentation ;) > > > + if (rpc->type == RPCIF_RCAR_GEN3) { > > > + regmap_write(rpc->regmap, RPCIF_PHYCNT, RPCIF_PHYCNT_STRTIM(7) | > > > + RPCIF_PHYCNT_PHYMEM(hyperflash ? 3 : 0) | 0x260); > > > + } else { > > > + regmap_read(rpc->regmap, RPCIF_PHYCNT, &dummy); > > > + dummy &= ~RPCIF_PHYCNT_PHYMEM_MASK; > > > + dummy |= RPCIF_PHYCNT_PHYMEM(hyperflash ? 3 : 0) | 0x260; > > > + regmap_write(rpc->regmap, RPCIF_PHYCNT, dummy); > > > > regmap_update_bits? > > > Im a bit hesitant to use regmap_update_bits() here as some of the bits > are not documented. Hmm, maybe I should then update the patch avoiding undocumented register access beforehand? I will download your docs and see what remains and send that out for you to check. Somewhen later today. Sounds good? Happy hacking, Wolfram --POeIfeKI2d2tOV4O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmFWzNsACgkQFA3kzBSg KbYpCw/+IFCm4M9GxL7MN1VHz4q6kfkDKhe8TfEXrR2uOdjopf1//OvCjtch/I2F VmI7EvVLoXUb8fadtW5pYbJtaASC4PBTyhyOJR05YfH6DT3czamx0S95CFoi2b6c ZAeZ4V6uCyN97jBuAia2rFxuu+yIoavlrp/+VFGmP7O2dyw2MOTinezfIJMZnvhm RGEW79XjZ9zEvecBuyBNRnnkK+XwUsRFgod5dnxmoXb6VMsGlAEtiX607VqvfLI9 xrtIdtx6HLf/LqLLjzSBfmtF8V3rnaXJ2o3xNQLmVxMPtLs5JsQ0U1Ra7kYc9kaJ wN60H5LJ1jV5fn79oMp4HsxAAYuAhWjcTtnXwet3LnnMhB2dwcycjF+sqOt4oODH diVh9X3CV8OO821jouKtIOKw4aC998J4qgVsklyrP6fXQf+BUBVF0S6l3am9Zazw QBkSGc6wdzJjB3hLg66KZP8OuP/vim9KM2diuYvXptIGDzeD3AXTsvgKvtlfaW1v Xby3E0kQoNkg0WLfYfH5N5pt60Qtj32Y6ewXRntWqZ8HeSaDyLM00n6GMfyRV50I 4fdvwejos4Ub3j37pNeK8f14Ltd4jEQO/dsVX6IAOiMcxaZMLe4a1DN/45l+s3sk bz7FDrS7YldjhJMYv8TcI3MQJ0B+TW8pagl3j27ma19x/xtDKvo= =KZfF -----END PGP SIGNATURE----- --POeIfeKI2d2tOV4O--