Received: by 10.223.176.46 with SMTP id f43csp568859wra; Sat, 20 Jan 2018 00:13:09 -0800 (PST) X-Google-Smtp-Source: AH8x224VppHUB9GS4dv40bg/IxAIwy+OlKyi00Ff/Yie3ii3NaR5uNJQeH+UdFQo0QEh3EDpT0+U X-Received: by 2002:a17:902:6e01:: with SMTP id u1-v6mr601307plk.12.1516435989574; Sat, 20 Jan 2018 00:13:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516435989; cv=none; d=google.com; s=arc-20160816; b=Ty/oZyLXD91W3oFPkjW+duG0EE8O27VG4CAih+XbS+TW06M5DfVssnBINZEqE1VxfN hMfz/B4mwixTaj6WWL3O3fbc536uN1+Z8UO59Tca/eoYEmwdWUSSlsn+4lQ3YLIhvcxe r9az2wt0jUPYWsvwtyyu9XtUw9HVw03nyLTTbLWjlUCrryGa79DISkDpBeH47Zmm8eWH f+3ZTVFHGtb2KlC/YsHnUQ2bR7L5HhU7SV9dluwqXXkg/O2NIYM+ldYonzadSS8T9oIf eJqlVNSHgwKBR4NloRkZYN28EfSQBn1SmbrQVOxgy382kKfGETT9EmR1dVM19uGSO3pm pJhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=CX/nd72GXTZrX0yoCQkB7DTwF5iATzDyEFASk15qBtI=; b=oq6H58XuD10fQcT/0glS/ll4PaFyGtLYKB+QqBkIOsU7Oxy1kti528UPQ4KjVJVp1S LOBimXTnoqxekVsZ15SGERsMKu3SkgsLTCQS3mpcQn5826oklDcGSjFEsBdpXnlJHDmS MohTx4ZGHZU0u6HaE1M5zBmod7Yse6XHy9ufP6pDQUzxheiYr8I0WRwG2M/qbZCwj1Xo FCFhcik7VLJo800oiN5dclfxqYc7Y9xlJDO/WE1+L9iml1xAkiSezinhHv9D+Er0QG+B 6X86Ycs91AvZnMj1Eitds+VtshbN1ShSl/FsiKAeHE+VD9TVXvg2S8+juhO2r/G9lR8w QBbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EqU0jSTQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si9628701pgp.629.2018.01.20.00.12.55; Sat, 20 Jan 2018 00:13:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EqU0jSTQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754666AbeATIL0 (ORCPT + 99 others); Sat, 20 Jan 2018 03:11:26 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:38451 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbeATILS (ORCPT ); Sat, 20 Jan 2018 03:11:18 -0500 Received: by mail-it0-f65.google.com with SMTP id w14so4666987itc.3; Sat, 20 Jan 2018 00:11:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CX/nd72GXTZrX0yoCQkB7DTwF5iATzDyEFASk15qBtI=; b=EqU0jSTQW5j8ZleRW1kY7/ee8qg+lmb5PACLJqCrPAk3kxeIQyzBc0NcrCyJYZKHnC 7YgsPIxTWx72/opMZPezL43S2LYCJeBZJN1KrIQcuq6XZT/QK8X7aq7h4J0qK1mqtjGV YQJsiz9+IXo9C7LBZHFje94l2vmXbnfOCEgBT2iiOKYnt421yr/JrKuShZ9ARrbAGPU9 DEzyeFYSyn3mnDjANO092ncUyxr8o/TD3WR7pUXciWLsnCBhveaesjngos0PJhxuMaFM lpf3ebLgwHVmmrYfbs5dOaX00Cr3bCzqrKoenON0q83tyZao2SvKONgPzXeXqC2Iet1h g4Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CX/nd72GXTZrX0yoCQkB7DTwF5iATzDyEFASk15qBtI=; b=o0daTr7BeBWhNTE6htS8ZEeKme1LQCg7zFtZb9fUSYLTrQ6QpqlA9b3cj+DG47kxs4 Azv8rBNI3ZpUOHMiX3eg/RrrJc4zp/x3YSk8QcjUK49t9PNTSBfZZbaXIYgAdW71ad1f cbdDOMAQK1IUv/1jiIgapxKb99fEtaXwQ8JKaHFS8qHMxfZuqvZAKhsle6CXfWexbIGi SWaaLlYa5/GGUDWmrj7EVqxnXtI8/1o7Djc2N2B4Q2eHkjzV8Bg4wosSE8kMSVFtTL0i ZJgUxQ82IpPdmN7C5viRitNaPmdldXdI68SS0QUrS5ltENHjebRjWpHuYN7rJoRabClx doGw== X-Gm-Message-State: AKwxytdDQLhepKqvPGpo7cae5QcdQx9Wnfm9zSnVUBvC651ag8D79Sz4 NSDtXIS1AEmxnkXqY98HIfMlQNUch0MDwtqa01nkXp5/ X-Received: by 10.36.93.136 with SMTP id w130mr916562ita.106.1516435877643; Sat, 20 Jan 2018 00:11:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.165.9 with HTTP; Sat, 20 Jan 2018 00:11:17 -0800 (PST) In-Reply-To: References: <20171228212954.2922-1-malat@debian.org> <20171228212954.2922-2-malat@debian.org> <20180103200211.u56tqesyumsofoff@rob-hp-laptop> From: PrasannaKumar Muralidharan Date: Sat, 20 Jan 2018 13:41:17 +0530 Message-ID: Subject: Re: [PATCH v2 1/2] nvmem: add driver for JZ4780 efuse To: Rob Herring Cc: Mathieu Malaterre , Marcin Nowakowski , Greg Kroah-Hartman , Zubair.Kakakhel@mips.com, Srinivas Kandagatla , Mark Rutland , Ralf Baechle , open list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-MIPS Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11 January 2018 at 20:38, Rob Herring wrote: > On Sat, Jan 6, 2018 at 6:43 AM, PrasannaKumar Muralidharan > wrote: >> Hi Rob, >> >> On 4 January 2018 at 01:32, Rob Herring wrote: >>> On Thu, Dec 28, 2017 at 10:29:52PM +0100, Mathieu Malaterre wrote: >>>> From: PrasannaKumar Muralidharan >>>> >>>> This patch brings support for the JZ4780 efuse. Currently it only expose >>>> a read only access to the entire 8K bits efuse memory. >>>> >>>> Tested-by: Mathieu Malaterre >>>> Signed-off-by: PrasannaKumar Muralidharan >>>> Signed-off-by: Mathieu Malaterre >>>> --- >>>> .../ABI/testing/sysfs-driver-jz4780-efuse | 16 ++ >>>> .../bindings/nvmem/ingenic,jz4780-efuse.txt | 17 ++ >>> >>> Please split bindings to separate patch. >>> >>>> MAINTAINERS | 5 + >>>> arch/mips/boot/dts/ingenic/jz4780.dtsi | 40 ++- >>> >>> dts files should also be separate. >>> >>>> drivers/nvmem/Kconfig | 10 + >>>> drivers/nvmem/Makefile | 2 + >>>> drivers/nvmem/jz4780-efuse.c | 305 +++++++++++++++++++++ >>>> 7 files changed, 383 insertions(+), 12 deletions(-) >>>> create mode 100644 Documentation/ABI/testing/sysfs-driver-jz4780-efuse >>>> create mode 100644 Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt >>>> create mode 100644 drivers/nvmem/jz4780-efuse.c >>>> >>>> diff --git a/Documentation/ABI/testing/sysfs-driver-jz4780-efuse b/Documentation/ABI/testing/sysfs-driver-jz4780-efuse >>>> new file mode 100644 >>>> index 000000000000..bb6f5d6ceea0 >>>> --- /dev/null >>>> +++ b/Documentation/ABI/testing/sysfs-driver-jz4780-efuse >>>> @@ -0,0 +1,16 @@ >>>> +What: /sys/devices/*//nvmem >>>> +Date: December 2017 >>>> +Contact: PrasannaKumar Muralidharan >>>> +Description: read-only access to the efuse on the Ingenic JZ4780 SoC >>>> + The SoC has a one time programmable 8K efuse that is >>>> + split into segments. The driver supports read only. >>>> + The segments are >>>> + 0x000 64 bit Random Number >>>> + 0x008 128 bit Ingenic Chip ID >>>> + 0x018 128 bit Customer ID >>>> + 0x028 3520 bit Reserved >>>> + 0x1E0 8 bit Protect Segment >>>> + 0x1E1 2296 bit HDMI Key >>>> + 0x300 2048 bit Security boot key >>> >>> Why do these need to be exposed to userspace? >>> >>> sysfs is 1 value per file and this is lots of different things. >>> >>> We already have ways to feed random data (entropy) to the system. And we >>> have a way to expose SoC ID info to userspace (socdev). >> >> Currently ingenic chip id is not used anywhere. The vendor BSP exposed >> only chip id and customer id. Should we do the same? Please provide >> your suggestion. > > No. Don't create an ABI if you don't really need it. Rob, MAC address of the ethernet device is stored in customer id segment of efuse. So only customer id is needed. Do you think exposing customer id would suffice? Srini, Only user would be dm900 ethernet driver (need to make changes to it once the efuse driver goes in). There is no need to expose it to user space. I am planning to modify nvmem core to not expose efuse if the efuse driver chooses so. Do you think it makes sense? The need to maintain ABI for user space disappears if such a change is introduced. Thanks, PrasannaKumar