Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1045232pxb; Fri, 1 Oct 2021 02:09:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLU+WK8li89F0lI/52FrmpQPuwnolxsd4lKw0HoVD3eoWXWbaMaQLRBDlMJ3b+cL5W4FGF X-Received: by 2002:aa7:8010:0:b0:44c:9d9:ecc with SMTP id j16-20020aa78010000000b0044c09d90eccmr5028359pfi.39.1633079342350; Fri, 01 Oct 2021 02:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633079342; cv=none; d=google.com; s=arc-20160816; b=j1/qyCnZZ6TyHSFKOD6a4bvP5uLW5hLdNUiXUgCjF/xhcr64hvB9vc7c9IQY2aId3y fAApxCZKdxIqXlgJ2uwA25+a7wKQv1w+Ns9O9jWM+A4SqtWRFebkadjOUmrWid/SbTof yjYD7+PWAfqWtZwYkgZdh6GSI/yA21iR+MIm2xt8/m7SM0Zy0rEOAzB4hsQfstU0ipZo 5Nx2p2oI8tIPm6FjyXGk5IbYttrcJxhjAOIU7A6RZyP2oJOUT0RkxtW61nkl3NjtEful rYSNxhoxZk3HqpgTn3RSDh5WMJQyG+e6+GvtKD4t8TISEL4g4ExkzCwI3ZgtGsHFW5Ga 2C7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sxJ7l8B7Ljw39q9CkARpipwcpIu37e5gtQDM+cATqHE=; b=FBnsyWXSAlJ6V6PY6kAEsuHK9KebmgEO+FNmtPx4XMatUPc69Y19mmoT3U1sbocBPr Xjo+R0J8xQ+2wZtfLZsTpTi549WnmlXnhvorkXYK5xehzpZ9jNG0QZSNu+g3mVT1zbBb BrruwzhiwyZxPaBbQvuEP2xvJCG+6zHrwPCua/2gk0duaZHvEd6/4PMVOb87NJgrPZX6 EJ8+3tw32wgTS2cQBLtSrDI3KXRJhjMQXYVM0q4GVIl9nakL9/N063Gmbk/YKFm3Kxci 7mw/04TazIKRL3RMA4sUXHbmBMqW53Cn99VIzRm4ovRtdTTyEcaOBl8KypbOVcasetnO wsHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ElWaZIBp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si7160510pgc.407.2021.10.01.02.08.48; Fri, 01 Oct 2021 02:09:02 -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=pass header.i=@gmail.com header.s=20210112 header.b=ElWaZIBp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352827AbhJAJIS (ORCPT + 99 others); Fri, 1 Oct 2021 05:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbhJAJIR (ORCPT ); Fri, 1 Oct 2021 05:08:17 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA219C061775; Fri, 1 Oct 2021 02:06:33 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id g6so1949404ybb.3; Fri, 01 Oct 2021 02:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=sxJ7l8B7Ljw39q9CkARpipwcpIu37e5gtQDM+cATqHE=; b=ElWaZIBpBrKhdeB7VeSlSnwX3ldr2KIWRlbDEFLg/2pZL1nQW3eUOG8slMcyFt4C5s jY09wxwXwzndohjHjnAsTnDwEhwPbhwj5V8QvrcYJwHtsGuNsE2EGRiyjaKQTwivnw83 8Z4B1U5GQc1gcCTmNAlugx5BPmWUMe7fPjtqyon4hm+tfeqf651n8SkcEJxp12bhbqC0 tztieSewqmlB1f+ejEfgFS5vjKax9sp9cbDuahW2dTAX9TzoVedzdl3xFI/X4RFN63DB d1ZBbx800WT18OTmZuI+2ZF8Zs+9gJjWvAXcvMtaulbtuKkrsnMMe66sbYvr+eJFjWU8 8zPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=sxJ7l8B7Ljw39q9CkARpipwcpIu37e5gtQDM+cATqHE=; b=kinfkd0p08KoYWJeZJMZiWrWbsczZaXj8zhC1Lhd7SctSoY45NCt/pgTB57qXwm5Zr U5mHEhk3fOLhugTvoTAx/wc9exFMmk1DLPT5WZf+Ozuh28YWBtnc00Ndfi47U87o4A6e nBR3iLz5Kahw4XFsB83cf809zwMPQPEieER3TJRrBJzMW9oLdf7dgyCCFWwh4UDNd/zj jYskXoKBKiCRUCY+svlc/zGPJijCWX2Tn92lnTWMQl1fTgBmdYOeY9iEVRVhcu6IrWXl UEVbZF5cEf+8wY9E3C3ybvGMatvRuOAYwuzcKC7CaoqwemSB7x8ZkZEstSoc5jCchgqE bKEQ== X-Gm-Message-State: AOAM530GTtumNrZ2rVo1KdhmPyxmxzCd/Oc5UZDWqsKdq/zjJwcjkjYe htRvleq5ngsz8ygzzcVT1GbS1z6kGFLWZFll1wAJI2Cb6VY= X-Received: by 2002:a25:1c02:: with SMTP id c2mr4943436ybc.218.1633079192918; Fri, 01 Oct 2021 02:06:32 -0700 (PDT) MIME-Version: 1.0 References: <20210928140721.8805-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20210928140721.8805-7-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Fri, 1 Oct 2021 10:06:06 +0100 Message-ID: Subject: Re: [PATCH 6/6] memory: renesas-rpc-if: Add support for RZ/G2L 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram, On Fri, Oct 1, 2021 at 9:55 AM Wolfram Sang wrote: > > 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 > ;) > Indeed :) > > > > + 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? > Fine with me. Cheers, Prabhakar > Happy hacking, > > Wolfram >