Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp367844img; Tue, 26 Feb 2019 01:16:16 -0800 (PST) X-Google-Smtp-Source: AHgI3IYcOas4vTl1DY2E9KOD1jd3qzRL72POCgRWbviNeJr3iMj8gL9iNSPURwiDXQSTbNpmiRQs X-Received: by 2002:a17:902:2947:: with SMTP id g65mr14724629plb.258.1551172576470; Tue, 26 Feb 2019 01:16:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551172576; cv=none; d=google.com; s=arc-20160816; b=01jwaIWWCxYVgFSaCt7pvMtXPVvWLggruTe92m8udRfAqzM1rc12gsscJKebglaaQZ PIg6+CvmTXcwKHIYRl68JfFBYVJtnCy2eE5jJL+JDxKcf5WtDAlCXbczcAya8fUpeIJh Y5ROlT46ert5jDCMFeR2l0EnwBpHPIFNToMjOJZCWXGbjm5s8c8vOb9VaYkSJ1CmukQW tExpDHbOLDTrHOP2djH0YSGF2Rin6kizK2OYJH6BEOpEIcuAa36dXxGe0TfgFK/g7DCi /kILxz9W2ZcxYwM2zGuLc7Asm+5H18v/l0CWNpyhDtXVrDOIFdyQcLKMlLmDFdsIM2Mc 8QZQ== 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:from:references:cc:to:subject; bh=XM/de2lruXCpcxnts6wdnr8PEED4VL5EMUwD1jqbtrM=; b=R+WSDQknuQOvHTIWubU5/+BoPcuVtaeREJhv1EnezjfNyetZuAQi10ZZFmp6BQzbwl Nxh/39ckhkjw4L4iv1hPWkx7e6v05YQemGolayw3jug7I8TnpCnRxfNt4htBiSZTU2Ni nrBm6mlvVOU/uFhmrlFh6d5AG1n0g6dxKT7vLIleeN0cm0SpNxDh4QQRRXhwfIiZsq4R eWawv5y2s/xRTOpBSz79KFe64LtFSiQ69I8y4uiQz6s0vwPzfPPhUW2/gFgulmAPJL3H 30YqdzKUZauKoua3n/I5jKg0GFf++pkjAwHBk7o95dS7Jf9VnZ95sG7jt1NCGQd7f3CO 08wg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n23si5825752plp.182.2019.02.26.01.16.00; Tue, 26 Feb 2019 01:16:16 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727519AbfBZJOP (ORCPT + 99 others); Tue, 26 Feb 2019 04:14:15 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:17443 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725941AbfBZJOO (ORCPT ); Tue, 26 Feb 2019 04:14:14 -0500 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1Q9BJNm018319; Tue, 26 Feb 2019 10:14:03 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2qtv6cq62r-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 26 Feb 2019 10:14:03 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D622E3F; Tue, 26 Feb 2019 09:14:01 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9F1812967; Tue, 26 Feb 2019 09:14:01 +0000 (GMT) Received: from [10.48.0.167] (10.75.127.44) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 26 Feb 2019 10:14:00 +0100 Subject: Re: [PATCH 1/4] dt-bindings: nvmem: Add STM32 factory-programmed romem To: Rob Herring CC: , , , , , , , , References: <1548866336-14765-1-git-send-email-fabrice.gasnier@st.com> <1548866336-14765-2-git-send-email-fabrice.gasnier@st.com> <20190225165307.GA26260@bogus> From: Fabrice Gasnier Message-ID: Date: Tue, 26 Feb 2019 10:14:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190225165307.GA26260@bogus> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG5NODE3.st.com (10.75.127.15) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-26_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/25/19 5:53 PM, Rob Herring wrote: > On Wed, Jan 30, 2019 at 05:38:53PM +0100, Fabrice Gasnier wrote: >> Add documentation for STMicroelectronics STM32 Factory-programmed >> read only memory area. >> >> Signed-off-by: Fabrice Gasnier >> --- >> .../devicetree/bindings/nvmem/st,stm32-romem.txt | 31 ++++++++++++++++++++++ >> 1 file changed, 31 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/nvmem/st,stm32-romem.txt >> >> diff --git a/Documentation/devicetree/bindings/nvmem/st,stm32-romem.txt b/Documentation/devicetree/bindings/nvmem/st,stm32-romem.txt >> new file mode 100644 >> index 0000000..fbff52e >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/nvmem/st,stm32-romem.txt >> @@ -0,0 +1,31 @@ >> +STMicroelectronics STM32 Factory-programmed data device tree bindings >> + >> +This represents STM32 Factory-programmed read only non-volatile area: locked >> +flash, OTP, read-only HW regs... This contains various information such as: > > Several distinct types here. Does s/w need to know the difference > rather than just one generic-ish compatible? Access size restrictions > maybe? Ability to unlock and program? Hi Rob, The reading part is represented here as "st,stm32-romem" compatible, to simply handle read only access. I agree this could be a generic-ish. BUT the specifics are regarding the ability to unlock/lock and program. Access size can vary from one part to another (e.g. on stm32f4, reference manual sates: OTP area is divided into 16 OTP data blocks of 32 bytes. on stm32f7, OTP area is divided into 16 OTP data blocks of 64 bytes.) In STM32MP15, both the read & write access through the BSEC are specific, represented by dedicated compatible. Do you wish I update the compatible to something like: "st,stm32f4-otp" "st,stm32mp15-bsec" ? Thanks for reviewing, Best regards, Fabrice > > If not, then why even make this stm32 specific? > >> +analog calibration data for temperature sensor (e.g. TS_CAL1, TS_CAL2), >> +internal vref (VREFIN_CAL), unique device ID... >> + >> +Required properties: >> +- compatible: Should be one of: >> + "st,stm32-romem" >> + "st,stm32mp15-bsec" >> +- reg: Offset and length of factory-programmed area. >> +- #address-cells: Should be '<1>'. >> +- #size-cells: Should be '<1>'. >> + >> +Optional Data cells: >> +- Must be child nodes as described in nvmem.txt. >> + >> +Example on stm32f4: >> + romem: nvmem@1fff7800 { >> + compatible = "st,stm32-romem"; >> + reg = <0x1fff7800 0x400>; >> + #address-cells = <1>; >> + #size-cells = <1>; >> + >> + /* Data cells: ts_cal1 at 0x1fff7a2c */ >> + ts_cal1: calib@22c { >> + reg = <0x22c 0x2>; >> + }; >> + ... >> + }; >> -- >> 1.9.1 >>