From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CD62C433F5 for ; Thu, 12 May 2022 15:34:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:CC:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OuuTObnce10gZlzmiYYQtWkLP7RrFFPC+x/oDce9dsM=; b=LhHAqp3927D6mg cNfSsiWjOuRSbZx2fjuqxO5OD2hcV8whaddmkMvSaYcUQoKvGZ0XRHHeHRRRaIbkRb3aGuYrUQ8Gh yPS8Yuf5TIu1iushbtB12U20/YzA4j1jCb9K8LcckLJ+Z15aao6c9GrTKjcNtPZc+2BKI9Np8O/Fc dHQkR+aoZdrTAYZUaoTf2SEToJoA2fNVHovBfswlD70cMdhQzZGEoEth2WESlqPAco0G+XQJzF06F kCpWUON+VeDUq8nRyms8pKE/t1G0Xc4LDja5UewJhQCB5aE6PAvuDubA0MMEeeOrjOKUjx58qKaro 4NlMU01l8zbQAG6NV1JQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1npAoE-00CeOy-UK; Thu, 12 May 2022 15:32:59 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1npAoA-00CeN2-Tp for linux-arm-kernel@lists.infradead.org; Thu, 12 May 2022 15:32:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1652369576; x=1683905576; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=XNttvMuXR+n39o5Zk5pqEds1sM6V09mf7W9yX8GxicY=; b=p/J++DzUOL3d/Tm9EuRIGjVQQ9aMjSMyWLlZmVhhzoKIr/wfOrSFBCx2 Pe8+A5Mos0xuhgZ8P7FVPvvKDPa4ivAGhmkP1ta4c/iTPzrOSIC5y1ogm 1Tgv9YEsQX2EtV02ttsL0ZHD8AGtUNn8ZKAfgx0ckcRL0gxisR8k0hoiS QxypUQSMgZOZ6Kcaq+4yrfrv/rqxprsascg9DELWjQoZbzFIYRpjGy/X2 nrv+ovwK4nD6JG+8H/Ovr72Bd1BCkv7xL/WKq0ISbd0vgO6Tn3n7nkZca vW+HTbNYGAPay0KEj7ogBRkMKBwBDJrnsC2IXKqdX+8+464CbtVbfe1Zu g==; X-IronPort-AV: E=Sophos;i="5.91,220,1647327600"; d="scan'208";a="163417580" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 12 May 2022 08:31:40 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 12 May 2022 08:31:36 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17 via Frontend Transport; Thu, 12 May 2022 08:31:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H2tvHzqe2SPyn0JGpwHLwOytbgNrCFYVj2q63HHNjNIGLfvnpuqVgrMll7dncpBO4Lu1gJEP28F8qmWQ7ddjIsWryh2143Gjs0l+pJDU54TJU4EGL8kafZ4cEwRvjth9rsStR/MH+ybOpi3LdLMhJyojH34NrOxnVvrYYv5mxieYMOVYJLK2VKY18SFUQsbksV5auirGW9S5DjiHgHrZovXMgi3zk/pV8td2nbeKpM11a8+a2JRY7B56zlnMlfg0Sd7XbQBRUwe95/GnGNzmYgseUhkvzy7kiMDCtJ/QvKbthjbftke0/CsR+cloLCxwZCy3mYCwty7f8tt3nc/Nsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XNttvMuXR+n39o5Zk5pqEds1sM6V09mf7W9yX8GxicY=; b=Q8mcN+L9Pdaocqb1m9sXqOPRJNm6iPubv9DA9InKrL/qvAb32pP7UMesHETu/0AzVITAkX1ggTcZ9rZ5Bah7cHVEbmVUlgAjoMSJAGvW6NIPDCi/uzSXV/t1JlhKqEcSzeq+bVy/NukIZyKOrNBra7VkEuugViAuaK31zYKSppBdV9XPqF/UKRAK542tPTKJcH52jYKz7TjCjtmGYC4WeSjj+ub1kAenRHd9qaVDBsxAI4dNgsBmvcNN9qB+pxzB0Jw1JOvT8tzQTiy3p/ykNb/EDi16uvKgr5+kBIq6yzE2Vu/zq5CJ+CwEF84Vfllam+ZBDaUzBw1hSTrzal9h9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XNttvMuXR+n39o5Zk5pqEds1sM6V09mf7W9yX8GxicY=; b=nuN3vmpItluGC/xBc5eerFGN3mGZoK37uIlLyGoqTxZYEVN8TsFY9aL3ValU0GMKbu0YGy77GbgpcMPPyNjCKxbg4DSt3+aNa/5CIhsNIz+bePysAnyQ638igTsaRdHJUf0fQSjWXFg24QcKqfWQMJdqwtqv+n+n2SFElgF0Uaw= Received: from CO1PR11MB4769.namprd11.prod.outlook.com (2603:10b6:303:95::10) by BN6PR11MB1427.namprd11.prod.outlook.com (2603:10b6:405:8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.14; Thu, 12 May 2022 15:31:31 +0000 Received: from CO1PR11MB4769.namprd11.prod.outlook.com ([fe80::e906:3e8d:4741:c0f0]) by CO1PR11MB4769.namprd11.prod.outlook.com ([fe80::e906:3e8d:4741:c0f0%6]) with mapi id 15.20.5250.014; Thu, 12 May 2022 15:31:31 +0000 From: To: , , , CC: , , Subject: Re: [PATCH 1/2] dt-bindings: microchip-otpc: document Microchip OTPC Thread-Topic: [PATCH 1/2] dt-bindings: microchip-otpc: document Microchip OTPC Thread-Index: AQHYZdBf287PvcEoQUmQslcb1o7LPQ== Date: Thu, 12 May 2022 15:31:31 +0000 Message-ID: <59b47f0b-6201-3814-e17f-1435ce5c2dad@microchip.com> References: <20220510094457.4070764-1-claudiu.beznea@microchip.com> <20220510094457.4070764-2-claudiu.beznea@microchip.com> <75ce6291-77c7-c932-e8bb-a8bbae02431d@linaro.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microchip.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cbe84234-e7ff-4c06-e872-08da342c7d72 x-ms-traffictypediagnostic: BN6PR11MB1427:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yivKVFxPhmTHQnSPLD4srk2uTgqdSCZ9WCDkmNwS63Vu2J7gjnScL2Rrna/VLoFNvgfe+PCREwuz5sjs9P9A9yjzifEU8d68yuUFUAEd/WStJIL7+g8MdSsNsUiJXhVLIWP1hI9GaZ7tE8p0se5vbuyyxSMdtBcS1D9VbFDhzkIgbn1ft9T59wUOdHQruy/dJlmVP/7LRu0lm6Ofxc0phv+do0oQRSZEzEO0EOf+XnIQOQ5fydB2nk8UrT7UbsZkKjquv5D/iDi8/Wvqu112Ub3nHCeVyXf5TN+dxCpFw5iXiYd28ZRsp1MTbE5IoA3u0h782oHfDjN2f6lYTP2UpaJo3/zOth3oiSxyzxjqwEPR9JVQlDevRXyrkEx5V+hTNJSC0BuNQWM+8SfVOCSMasMLrJNXwoRNzGRtZRW0QUTCykvBH1kXeaJ82UNInSVQAoQHPMR+32G+8cG9klXmaSylv6h4W0w4CYrHBDs+OvDdo6KBiJZbKFIUCl2IVcvGAJRFauzmzxbAomZQwLWuV8Xxy6N1BFyy8FVDmSTMybMyIA8hn+Ce/iFQei7Hg43WD+5G5kSUoiZGG1j7uLnyhIBpbRo40sWjLrmvmxc4vYCUKTgv9/i3i7+1i/ZvowHV41Hne7wHiViMdNl1EK+R2H2grl6XNzfS1TJuieihPRW/15eKHR3w9n2jerkPoBXj7Mrrtur6XHnMDsFpQ3UpEgzgTFks/Uw5r6qDDTl58maq6AsXcpbKcJS0KLnAJPDsIsjCG7/tRl9ALkzWOxkB5g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB4769.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(6512007)(508600001)(38070700005)(2906002)(38100700002)(122000001)(53546011)(31696002)(86362001)(6506007)(186003)(26005)(6486002)(71200400001)(5660300002)(66946007)(8936002)(76116006)(66446008)(66556008)(8676002)(64756008)(4326008)(66476007)(91956017)(31686004)(110136005)(54906003)(36756003)(316002)(2616005)(45980500001)(43740500002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?dUNHUGZWajRqbTc5eTI4UDJBWmg1TFRDc2QyNEQyekwxRlE4b2lpMmdwbFpk?= =?utf-8?B?RWdrSE1VQ2lMUUVkMnBwMDV2anZjV3lJcTBhVVVJSm5ZRkFRWlFUZmFZRElq?= =?utf-8?B?NE1XSHdNV1pjcFh0aUExT1o0NXJGMFJQSWdqWmYvRmk2UE8xcDFKNDRkcWl4?= =?utf-8?B?UmE0T2F5VnJKMm5QOWpKa0dFZFdRWU45T2kxSnpTZ08xRUtBSVl2L0tUeFNO?= =?utf-8?B?Ry9BZkRhRlk4cU1vamR0NVJSV0M1TkNHNjRzd0xRQVRBRHFBSnMzam9TVXB5?= =?utf-8?B?aHdZUjlWUE9DUjV0ajJ6Q0dYcGhyNUlBc3BIS2JEZ2ZvODdQNWZzdDNtQjFW?= =?utf-8?B?WXVsYnIxNE5UczVGelZBMmFtWUhSNUIzWUNFWWhwa1VhQy9zUWw4UWdDZ2Uy?= =?utf-8?B?bVh0Q1BqTTFuek5EMEdnSEtNYmQranhrcFNsRDBraStqRnh4ZFpFU2ZlWmlO?= =?utf-8?B?RVZRUFNzVkMrOUowK1NSSVdNejZpckc3dTUyVnNoYUdrYkU4amE0aVpvS0VB?= =?utf-8?B?WTQ1cTlWZmVFZlc1aXE1N1AvQzhxMkJmZUhmWEprRzdTaHkzS1JaaGFENTBl?= =?utf-8?B?QisrSHo1MTIvc3FHZ1Z1bzQw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internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4769.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbe84234-e7ff-4c06-e872-08da342c7d72 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2022 15:31:31.3922 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: KDaYnU6tkxmZdnzqNVfw9D366tpXurIsxODFdFc76j2DGuWy/KsT74rdotxtlcRSI2cVpPYXcpMP1w5yAq0aFEIcMLBtF+BaEtsrMDsmN00= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1427 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220512_083255_236920_2B08B5AF X-CRM114-Status: GOOD ( 25.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12.05.2022 10:54, Krzysztof Kozlowski wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On 12/05/2022 09:17, Claudiu.Beznea@microchip.com wrote: >>> >>>> + >>>> +#ifndef _DT_BINDINGS_NVMEM_MICROCHIP_OTPC_H >>>> +#define _DT_BINDINGS_NVMEM_MICROCHIP_OTPC_H >>>> + >>>> +/* >>>> + * Need to have it as a multiple of 4 as NVMEM memory is registered with >>>> + * stride = 4. >>>> + */ >>>> +#define OTP_PKT(id) ((id) * 4) >>> >>> Do I get it correctly - the offset or register address is now part of a >>> binding? You write here "id", however you use it as part of "reg", so >>> it's confusing. >> >> I agree that reg should describe the offset in OTP memory and its the >> length for a cell. >> >> However this OTP memory is organized into packets (this is how hardware is >> designed), the 1st one being the boot configuration packet, the 2nd one >> being temperature calibration data. At the moment Microchip provides only >> these 2 packets in OTP memory. Boot configuration packet may vary in length >> thus it may change the offset the temperature calibration packet resides >> to. If this happen and we use offset based addressing in device trees then >> the solution will not work all the time. >> >> OTP hardware is designed to work with packets. For a packet being in memory >> at offset 0x0E as follows: >> >> offset OTP Memory layout >> >> . . >> . ... . >> . . >> 0x0E +-----------+ <--- packet X >> | header X | >> 0x12 +-----------+ >> | payload X | >> 0x16 | | >> | | >> 0x1A | | >> +-----------+ >> . . >> . ... . >> . . >> >> requesting from software data at address 0x16 (through OTP control >> registers) will return the whole packet starting at offset 0x0E. Same >> things happens when requesting data at offset 0x0E, 0x12, 0x1A. >> >> Thus, as underlying hardware returns to software chunks of 4 bytes though >> data registers the driver has been registered with stride = 4. The >> OTP_PKT() macro expects packet identifier (starting from 0), multiplies it >> by 4 to be able to pass the NVMEM subsystem accordingly, then the driver >> which manages a list of the available packets divides this value by 4 and >> gets the packet ID and the proper offset in memory for the requested packet ID. >> >> The intention was to have the OTP_PKT() macro here to be used in device >> trees for simpler way of describing different cells in this OTP memory. >> Also, using OTP_PKT() abstraction looked to me closer to the reality >> (although the computed value is not reflecting this, it is only an >> abstraction to be able to pass the NVMEM subsystem). >> >> Would you prefer to have raw values instead of using this macro? > > Macro is a nice idea if it can be stable. I understood that length of > packets depends on hardware, so this part could be stable. But what > about number of packets, so the OTP_PKT_SAMA7G5_TEMP_CALIB_LEN below? The OTP_PKT_SAMA7G5_TEMP_CALIB_LEN here is the length of thermal calibration packet. This length is fixed and will not be changed. After these 2 packets (provided by Microchip) user may further flash any number of packets and use them as they wish. Driver is in charge of scanning the NVMEM for the available packets and prepare a list with their IDs and their starting offsets in NVMEM memory such that when it receives a read request it will be able to decode the packet offset based on packet identifier. In case different number of packets are available in NVMEM for different kind of setups (boards) these could also be referenced in board specific DT using OTP_PKT() macro and with proper length (which will depend on what user flashed). > You wrote "Boot configuration packet may vary in length", so it could be > changed by Microchip? Yes, between chip revisions its length could be changed. > > Once this value is stored in the bindings, it is not supposed to change. I agree! > >> >> Adapting the subsystem for this kind of devices is also an option if >> Srinivas thinks like this. >> >>> >>>> + >>>> +/* >>>> + * Temperature calibration packet length for SAMA7G5: 1 words header, >>>> + * 18 words payload. >>>> + */ >>>> +#define OTP_PKT_SAMA7G5_TEMP_CALIB_LEN (19 * 4) >>> >>> Length of some memory region also does not look like job for bindings. >> >> I added it here to be able to have the same macro in DT and consumer >> drivers taking as example iio drivers that uses this approach to describe >> IIO channel identifiers. I can remove it and use necessary macros in the >> consumer drivers, if it's better this way. > > > > Best regards, > Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel