Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3513256ybt; Tue, 23 Jun 2020 04:17:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8Ym3pK6PSHaTj3w67deI2Y7CWAgW9CFJv03tVtlbXCyOIdHLRbW9YMlySlSP6UTuprZcR X-Received: by 2002:a17:906:2bd8:: with SMTP id n24mr20866223ejg.83.1592911062927; Tue, 23 Jun 2020 04:17:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592911062; cv=none; d=google.com; s=arc-20160816; b=V6uQD+FzQL7Ai1BgpOGGyKxPO1JCzy9SEoF4gVvFAxIrsHI/5HvTjAqkRv+QKERRD2 Ua1ZP6oJ/OdM3NmdQrpdeMj7nvSzgmfQspmYPML0AC3H9/+XtOrdvyW0+tG/HT5k+49G cFyGcjSRouWWxyMTDBliE6O6B3KZDcFTl9r31qyafNQ6S9gSF1T2/3fQfMqnaA2RCFoa qRUeWoTh3inPP2vReP2nPyCifU9CvVoKhLeD/TXF2ikFGT1K++C3f0RVIoSWoaPsAlq6 spwyt5zXlHgXLQj2SGKP097Io5+1o1ZVPQTcZGNNBORezh6g2hcgVmiixfYyzQSt3Yek DCDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=hShFUqy8fv6CsIa2WQbMQB9tq9oaMvFRnx9SGKYq+PE=; b=OxA2acLxZ8Ipd3LepEl4zogiCfoIZpd1EBK16WmJExARRGEuIOmr2Ev0zohyGOgMp2 oFD2Mp06QvGRE+DFA1FyGF02SJozU0mq6A02IF7amvjyRLtWrQOAK3dIqsIVI126Clqp 2CnTf+ft6R8OkaF4xPrm+JuqWqKdlyGnIG1tTl2kE3rUCfdMN1VU5sXF3vveWrhQ6ipM yIml84VgJgcuxWEsMyeup+s9478YE83HtwdW0pWjQdlM9KGpIMZN+hrKiHA6bLRNs2ak qG/EWwYQLxK6FRdQqu/9Rm1UAGath5c7sBM3IFlYp9wA6qE6SapRqBtuq1LoBJrp14f6 PKcw== ARC-Authentication-Results: i=1; mx.google.com; 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 c17si11287957edv.2.2020.06.23.04.17.19; Tue, 23 Jun 2020 04:17:42 -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; 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 S1732451AbgFWLP1 (ORCPT + 99 others); Tue, 23 Jun 2020 07:15:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:39400 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732245AbgFWLP0 (ORCPT ); Tue, 23 Jun 2020 07:15:26 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7F9CAAEE6; Tue, 23 Jun 2020 11:15:24 +0000 (UTC) Subject: Re: [PATCH v2 18/29] nvmem: Add Realtek DHC eFuse driver To: Srinivas Kandagatla Cc: linux-realtek-soc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?B?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , =?UTF-8?B?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63XQ==?= , Edgar Lee , Rob Herring References: <20200623025106.31273-1-afaerber@suse.de> <20200623025106.31273-19-afaerber@suse.de> <4c137c33-bd46-2da0-01d0-5f52747be48a@linaro.org> From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Organization: SUSE Software Solutions Germany GmbH Message-ID: Date: Tue, 23 Jun 2020 13:15:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <4c137c33-bd46-2da0-01d0-5f52747be48a@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Srini, Am 23.06.20 um 11:32 schrieb Srinivas Kandagatla: > On 23/06/2020 03:50, Andreas Färber wrote: >> Implement enough of a read-only nvmem driver to easily read efuse cells. >> >> Cc: Cheng-Yu Lee >> Signed-off-by: Andreas Färber >> --- > > This patch itself looks okay to me, I will apply this once DT patches > are Reviewed/applied by DT maintainers! Thanks - let's give the Realtek engineers some time to review, too: * Driver naming - new [rtk-]dhc (Stanley) vs. in-tree rtd1195 elsewhere. * My other driver was previously reading u32-sized registers directly, whereas here I switched to byte-sized reads based on other in-tree nvmem drivers. Downstream driver seems inconsistent wrt .word_size: https://github.com/BPI-SINOVOIP/BPI-M4-bsp/blob/master/linux-rtk/drivers/nvmem/rtk-efuse.c#L191 * RTD1619 (RTD1319, too?) may need special handling and therefore its own DT compatible: There's a magic OTP_CTRL register write downstream that I am lacking documentation w/ names&explanations and use case for. https://github.com/BPI-SINOVOIP/BPI-M4-bsp/blob/master/linux-rtk/drivers/nvmem/rtk-efuse.c#L216 That might obviously affect the binding, too, requiring oneOf - could be changed in a later step though. I would take the .dts patches through my linux-realtek.git once the binding is approved. * The downstream DTs have nvmem-cells and nvmem-cell-names properties in the efuse node directly, which I regarded as unnecessary from reading the consumer binding, placing those properties into the consuming node. * Downstream DTs have more eFuse fields declared than the one I use in this series [1]; they are also inconsistent in prefixing them efuse_ vs. otp_; in the RTD1295 datasheet the block is called eFuse, so I used efuse_ for consistency. I have enforced the dashes convention for nodes, as I didn't see the node name get used anywhere. [1] https://patchwork.kernel.org/patch/11619643/ One more comment inline... >>   v2: New >>   MAINTAINERS                   |  1 + >>   drivers/nvmem/Kconfig         |  9 ++++ >>   drivers/nvmem/Makefile        |  2 + >>   drivers/nvmem/rtk-dhc-efuse.c | 86 +++++++++++++++++++++++++++++++++++ >>   4 files changed, 98 insertions(+) >>   create mode 100644 drivers/nvmem/rtk-dhc-efuse.c >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 1d0d6ab20451..02117fbf0e57 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -2312,6 +2312,7 @@ F: >> Documentation/devicetree/bindings/soc/realtek/ >>   F:    arch/arm/boot/dts/rtd* >>   F:    arch/arm/mach-realtek/ >>   F:    arch/arm64/boot/dts/realtek/ >> +F:    drivers/nvmem/rtk-dhc-efuse.c >>   F:    drivers/soc/realtek/ >>   ARM/RENESAS ARM64 ARCHITECTURE [snip] This line addition will conflict with the next line, added earlier in this patchset. Same for the binding patch. Do you need a v3 reordering them? This driver seems easier to target for 5.9 than the rest of the series. If you do not intend to take the dt-bindings patch (17/29) through your tree, I can queue it once ack'ed by Rob and you. Thanks for the quick review, Andreas -- SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer HRB 36809 (AG Nürnberg)