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 2223EC77B73 for ; Wed, 24 May 2023 03:31:42 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pVRN2dRJ24WsWmqAXgk/V8JzWNBhCmkMnjGCNwwvMI8=; b=z213gGjHxksGe7 gpoZQwXIB/xsJkQoOoBMHeoKTjZcDK42Xudhlx/uImi5xGDiSAvlF3TplVFT0pW+KIH+rBpjl0hnO p77PIv4TIu9ke1AyK46LT2oKlUAMWx1QneueTkDpB8MD8GEwWf+tfd2oDnKIaQbtGXEJkcl2ZxGSV W8CE2gkOjLoznJK/CatOFtEeeFjrpza4u3hVIWU0rjQ59bFseNxcjANLFR/vpN9s9v1dpgV7kL1/n ZyawR9H8e9Y/erjnq75jk8VLGPpBMuxvv7vQOHq39EKOJm4U61skKZiCP1yOC0pPUbF5ByY9rEj1M sNco1XRoFnEifiX+VAFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1fDU-00CEE9-39; Wed, 24 May 2023 03:31:12 +0000 Received: from phobos.denx.de ([2a01:238:438b:c500:173d:9f52:ddab:ee01]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1fDO-00CECE-2K for linux-arm-kernel@lists.infradead.org; Wed, 24 May 2023 03:31:11 +0000 Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id E1E4B847C8; Wed, 24 May 2023 05:31:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1684899062; bh=qHDlFpFw1Neypm9hLIq1aL+ySQd6ptmW4GUYYp0gNAQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=bXpnx5Z9MmDwH67xZQE5zNjGoIutbqo9rq/4Vgj5JSE+xaeWO/+dB0eCDZMG516DZ oRi01H4exod/zAPQnyeP0qkaCRMUG+BLmRdvSywu3pxAVnKCBRIVR0ThZYDrrEIp0j xIqSA3nXPpos4f2bGRZ5Gfq6piZjYSqx/ChIOxDAihvQOPaKm7Teyewi+sLmP/0blA hLGXfKuzrOq17dPZul8AjMeKHdZQpRlnQ1mw8qjrKBXfWHSXJ08ex2rwpPjQ/BgJ8N gyGih5rqoJGQa0spX2oTu9kvpyopNRDJe/HCOSU5fQKBbzvsr1sYeK3xpEjIuqogP4 pWrQpOSXaoQoQ== Message-ID: <2aee9fc7-e0a8-b5ad-7362-8461bac618da@denx.de> Date: Wed, 24 May 2023 05:30:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2 1/3] dt-bindings: nvmem: syscon: Add syscon backed nvmem bindings Content-Language: en-US To: Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org Cc: Alexandre Torgue , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , Srinivas Kandagatla , devicetree@vger.kernel.org, kernel@dh-electronics.com, linux-stm32@st-md-mailman.stormreply.com References: <20230517152513.27922-1-marex@denx.de> <3951bf42-bf77-20a5-a343-46127b875dd5@linaro.org> From: Marek Vasut In-Reply-To: <3951bf42-bf77-20a5-a343-46127b875dd5@linaro.org> X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230523_203107_094007_FA9EEE00 X-CRM114-Status: GOOD ( 17.46 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/18/23 16:26, Krzysztof Kozlowski wrote: > On 17/05/2023 17:25, Marek Vasut wrote: >> Add trivial bindings for driver which permits exposing syscon backed >> register to userspace. This is useful e.g. to expose U-Boot boot >> counter on various platforms where the boot counter is stored in >> random volatile register, like STM32MP15xx TAMP_BKPxR register. >> >> Signed-off-by: Marek Vasut >> --- >> Cc: Alexandre Torgue >> Cc: Conor Dooley >> Cc: Krzysztof Kozlowski >> Cc: Marek Vasut >> Cc: Maxime Coquelin >> Cc: Rob Herring >> Cc: Srinivas Kandagatla >> Cc: devicetree@vger.kernel.org >> Cc: kernel@dh-electronics.com >> Cc: linux-arm-kernel@lists.infradead.org >> Cc: linux-stm32@st-md-mailman.stormreply.com >> --- >> V2: Use generic syscon supernode >> --- >> .../bindings/nvmem/nvmem-syscon.yaml | 39 +++++++++++++++++++ >> 1 file changed, 39 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/nvmem/nvmem-syscon.yaml >> >> diff --git a/Documentation/devicetree/bindings/nvmem/nvmem-syscon.yaml b/Documentation/devicetree/bindings/nvmem/nvmem-syscon.yaml >> new file mode 100644 >> index 0000000000000..7c1173a1a6218 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/nvmem/nvmem-syscon.yaml >> @@ -0,0 +1,39 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/nvmem/nvmem-syscon.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Generic syscon backed nvmem >> + >> +maintainers: >> + - Marek Vasut >> + >> +allOf: >> + - $ref: "nvmem.yaml#" > > Usual comment: drop quotes. We removed them everywhere, so you based > your work on some old tree. > >> + >> +properties: >> + compatible: >> + enum: >> + - nvmem-syscon >> + >> + reg: >> + maxItems: 1 > > Rob's questions are not solved. Can you reiterate this one ? I likely missed it. > The nvmem.yaml schema expects here to > allow children. This should not be created per-register, but per entire > block of registers. This thing works the other way around, I have a syscon register block already, and I want to expose subset of it to userspace as read/write accessible file to expose bootcounter available in that register (so I can read it and reset it from user application). > OTOH, using nvmem for syscon (which are MMIO and writeable registers > usually) seems odd. > >> + > > missing nvmem cells See above, I don't think nvmem-cells applies here. [...] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel