Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp727093rdb; Fri, 26 Jan 2024 08:53:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnfFkffFv02ZTwfamRyiZ/r1PJ0fqAKGZn0Px9vMg0J6FojdI/0MxakCMQ3ZaZL5/u157Z X-Received: by 2002:a05:6808:6394:b0:3bc:3ae7:37f9 with SMTP id ec20-20020a056808639400b003bc3ae737f9mr1469773oib.105.1706287984696; Fri, 26 Jan 2024 08:53:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706287984; cv=pass; d=google.com; s=arc-20160816; b=AxPKbCrgMpHoDpDAb2MQaF1lwNgbACjrVMHzOkeo7mmNXMsjLaCgg+7eofvCWFvCha f6637wbtyGo7Nv+yD3MkbF8nZFnxBmA7e2mCcQkr1UKsOi1vkHYfWvEQb1ExgVVPo7vr Bb1pG5xlLe2StpGW1zk/xcvXwhfMk9XXAIoe6F0hClu9r34NUX95/l+6s80s1BqYrcV6 3kQ+UC7cHxjnToeE6TZEw1V87Usm0nV6yr8CngRPuzC5uOZAIi24URMCvNv2ERkM5HQq X8nHqkNFvv+Yc51gyDIK5X3QlZ1wUIUWJ7WCC6/AinYXqgEPJBwiCiLm3sFOcKV/bAuc /low== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=b6WxQuYTaAMQCEBIFGx9j8LwO4QcbvoP3EqPj9O4NSc=; fh=GJdSMK2Qala06o/L/Yfhw96hH1h37A2qvC5Jqk0hruU=; b=PVgFIu3cacKiqvIQQZBVTA7ZSsNJ3ejFMH+oJDMRkuL+u81nY0T+ci6Ob5ssZtmYZl 3XxVvwch4XddlCuc3R8N5bvrbJaPtqD3BtP0XrE9xI/gA+SoJTY4QUnzJUROYjFr8Fuv qi5Io+6lgOLCiA4RBP7rzG7CnKCmKkZeh6R5cMgfiUvvuwdOphf938UcK7RKL55YKnIF oZVPqLxZsoo+xuPgIaNnhCsxBjGRallbC4Oym4rkDzyV4Tnc7yT1zod4JdEFQJP/hWZJ GAAlbSK7DhdZKH7wxKshDx8/2YInkFkxqiNWO3+lwabBacIJhHGDVAH4lXBuNLJcfwLf P2SA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-40378-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40378-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s3-20020a05620a16a300b007839eec53c9si1616212qkj.91.2024.01.26.08.53.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 08:53:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40378-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-40378-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40378-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 705151C21A75 for ; Fri, 26 Jan 2024 16:53:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CD821DFE3; Fri, 26 Jan 2024 16:52:13 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BB1F200D4 for ; Fri, 26 Jan 2024 16:52:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706287932; cv=none; b=uQwp2orvrFS9Nzmv3M3l/reVMHw6qSjMQDtwO8ngSej56xpnb/n7+N3Xlz+W8YBGfhIt5ouQJ5psjB1t/96EV+hg5ZXOOG+JjbIsaeAqvTjevkd8rcgi8QRN9jW9cSyKpYz0yCapeKFFUQbm7RBYg1txt7w8TL8Vs08GsKDFUm0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706287932; c=relaxed/simple; bh=W2rg+Qlv7l5DQXS9S0LSqEVQ2IDHN1Raczz6L69DN6U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bvEiH1HFS3HecaJp5PTh/XOlpGI4YjoV3DiFl/PqHU36RvsWRVAg03AVPCU4wU0gHYSB+3qhp3ygUXXNY4J2Ln7UXljqy6XucGV3SpI0YRVjKc8NDatZUOde7dvRQnW0MS8CDVxYjlf2rPUCP+fcH4/CsvB60v/PJA8R+myfKXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rTPQo-00021k-Um; Fri, 26 Jan 2024 17:51:54 +0100 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rTPQn-002YB1-O1; Fri, 26 Jan 2024 17:51:53 +0100 Received: from ore by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1rTPQn-001yTx-Kl; Fri, 26 Jan 2024 17:51:53 +0100 Date: Fri, 26 Jan 2024 17:51:53 +0100 From: Oleksij Rempel To: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org, Conor Dooley , Daniel Lezcano , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , "Rafael J. Wysocki" , Sebastian Reichel , linux-kernel@vger.kernel.org, =?utf-8?B?U8O4cmVu?= Andersen , Rob Herring , Srinivas Kandagatla , kernel@pengutronix.de, linux-pm@vger.kernel.org, Zhang Rui , Lukasz Luba Subject: Re: [PATCH v2 4/8] dt-bindings: power: reset: add bindings for NVMEM hardware storing PSCR Data Message-ID: <20240126165153.GA468528@pengutronix.de> References: <20240124122204.730370-1-o.rempel@pengutronix.de> <20240124122204.730370-5-o.rempel@pengutronix.de> <4e14b7c7-7f0a-437b-aa84-20fdc30a2361@linaro.org> <20240125171146.GC381737@pengutronix.de> <58d24ddc-4e8f-4932-ac37-c9a699d36425@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <58d24ddc-4e8f-4932-ac37-c9a699d36425@linaro.org> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On Fri, Jan 26, 2024 at 10:03:51AM +0100, Krzysztof Kozlowski wrote: > On 25/01/2024 18:11, Oleksij Rempel wrote: > > On Thu, Jan 25, 2024 at 11:57:18AM +0100, Krzysztof Kozlowski wrote: > >> On 24/01/2024 13:22, Oleksij Rempel wrote: > >>> Add device tree bindings that describe hardware implementations of > >>> Non-Volatile Memory (NVMEM) used for storing Power State Change Reasons > >>> (PSCR). > >>> + that stores Power State Change Reasons (PSCR). > >>> + > >>> +allOf: > >>> + - $ref: pscrr.yaml# > >>> + > >>> +properties: > >>> + compatible: > >>> + const: pscrr-nvmem > >>> + > >> > >> So that's a driver :/. Maybe Rob will like it, but it's a no from me. > >> Please come up with something really suiting DEVICES, not DRIVERS. > > > > If I understand your distinction between 'DEVICES' and 'DRIVERS' > > correctly, 'DEVICES' in the device tree context are meant to represent > > physical hardware components, while 'DRIVERS' refer to software > > Yes. > > > abstractions of these components. However, there are numerous device > > tree instances, like software-based implementations for SPI, I2C, or > > GPIO, which could also be interpreted as 'DRIVERS' in the context of > > True. Yet they are still for physical interfaces. There is no DTS having > some virtual I2C for a board which does not have I2C. > > > your email. Similarly, the binding for PSCRR represents functionality not > > fully implemented in hardware but supported by the hardware component of > > NVMEM, akin to how ramoops or other functionalities are represented. > > You don't need a binding for your case. Instantiate it whatever you wish > - modprobe for example - and configure through approved kernel > interfaces - sysfs for example. About using sysfs for the NVMEM cell, it won't work for my needs because I have to know about reboot events before the filesystem is ready. So, I'm thinking of using a boot parameter for the kernel. It would look like this: pscrr-nvmem.nvmem_cell_alias=nvmem-cell0. This way, I can set up the NVMEM cell right at the system's start. I'll need to use stable NVMEM cell names for this. Is it ok to introduce NVMEM cell aliases in the devicetree? Best Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |