Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp679323lqp; Sat, 13 Apr 2024 14:40:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9fODoQtITKlAYvMmtl5kJpfghLSJ15FD02UdvucRv7YDBCwJwUs7uNSFX1hqSL/knP/NjfXzdd2WWtXalnQjZBkzKyq+O1bkFii4WDg== X-Google-Smtp-Source: AGHT+IEjJepIkDJij+I2s5k4KoKxBJy4r39p6JcwA4lSxejPmP/5fbBrfNdV+wSEZy/BHXssDsvt X-Received: by 2002:a05:6870:9584:b0:21e:a839:d807 with SMTP id k4-20020a056870958400b0021ea839d807mr7389019oao.54.1713044440634; Sat, 13 Apr 2024 14:40:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713044440; cv=pass; d=google.com; s=arc-20160816; b=fpnCgFIgL0GV0OvMe7+N+A3TStAI3fQK22lPWqh9DDo+TE4W6i+T85CDK15Dc+ru4r nyYz4Uxewpv7oTXjEP7+dIyUlr4LJelO7TEklb3/OHCGQAzzskDBOtx/8HW6HTvG+Bdw ioU12sm6hsUOCRDj0F7Hip0Dv4MzwC5xMKjVFdzeKzJhg0vdWe+5ijJqWhZBq30BND4E EbaNjt2N1e+oa9I+nuCRSokzNshVwhOdWCsxviHUkBfPy4fo71qXssXlObdSp4qAAKK4 o7w99C/J9jmIkASok6wmkvDWlSb0MDVg7vxQa+IsG3uUGev5DeG1qjw9yTX6VFgk8axi oDsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=TsP1lsXiRn/RZkzBq4oOf0PJNwtiiy3ixj5TpCE3HRg=; fh=PxlSEE780ObHd5O/aVAVKwMItKLVz5q07nbT0wFqR2U=; b=UBpD9nGGouCKen4nzdSyvWUXVrwsMpKHpLTaoRrxEjILFwTse2Q9q0EpgmhqFNCLxd o9vKNg+zzvGaoG7MQmyrWsdZBg2BuH6Fb1gbJZPm0hafuXuAC0tKw+Za9jwEG8wGyl2W rMNPIcUSbFJZT1sQ0u/CYugNcT/7KAWOK4txVKke4yXC0/lxQIVnC0vA98uA/yteG6hs QtBqpf8ofBu7o2Yyn9i2xpX5I+K0xNB8fTORVM6XJIE6q2RN4cgsYINI3DYSIEoS0zuT AmFoGeinTuV9vk6HZ/tAd1oIBob5T7FBOJHj2w0P6Q4YRtyLz7ythTvsRt0HVN35xcqC hZKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vF6N3i2Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id kq4-20020a056a004b0400b006ecff107a0esi3372156pfb.131.2024.04.13.14.40.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 14:40:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vF6N3i2Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C472BB21735 for ; Sat, 13 Apr 2024 21:40:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C88C75647E; Sat, 13 Apr 2024 21:40:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vF6N3i2Z" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B599556446; Sat, 13 Apr 2024 21:40:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713044425; cv=none; b=kNx7hTv1XDb4/FMviQxJk2/rAKPJZR8cHmL70+dDoxkCSjxaoMSdPWko/A1y8w5pB1nfmVPK70HIxp6rv0gecCaw75vmO3HQ9EBR1r5iQgGxdlTO9j3Eegh1OZcsw+PYwBtagLDt1wZGWcKQk1EMihy6lEvjyk5iStUMHvhoNLY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713044425; c=relaxed/simple; bh=qAyRbbo4f0GT87cxJNkINLjKBToCQVPwqC0z+spTdxI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=t8OoNp3XdJYqCga0gqDnkpgSnR/LWvQ5DweJixEWyffpK6VLoJygjDwtWHFvUQYYYc2Fn+3z8ADQath6Hwcpm+15bT7CaQH8RQUJLBGwmJty5zJIn3nyu8Kx4QJhjrmd2dRjBpgOqRcGRP2ZLhyoVMW9V/ICp2AW8x0VNqAmhOY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vF6N3i2Z; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86800C113CD; Sat, 13 Apr 2024 21:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713044425; bh=qAyRbbo4f0GT87cxJNkINLjKBToCQVPwqC0z+spTdxI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=vF6N3i2ZXMLHC7I1MqlPUj0ow1ivoLEcwDOmwUCjUhI/H8vtxhlplEL5khz4et7WU acMeiR+eBs9p7roWlz41+ZdhqD1/DggYy9leD+fu8oPU6n2pFG85g+NCBCHNllBhkd BosHxo/pHIdeBDLwQsVL5PMvTxu8Uuu42E1pRNsN4wIkHYL2bUzLk+UdsBcuIiew7f LRsVNP3FpSplN+BVmQ/TlvBvlTpMOROdLD5fPAOjSNLKvFe+qWrceEuxHwR0/IQxoV OddXZ9gWiqH5MEIR0UBxuGwJjqmt5AKFbBcyps6kWRh2uiEq4WMfowULhP2dphOAoU uYLnMJ8pd6FrA== Message-ID: <46fe43d0-28be-4acb-b0d4-dacd84fef8e5@kernel.org> Date: Sat, 13 Apr 2024 23:40:18 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/2] regulator: dt-bindings: pca9450: add PMIC_RST_B warm reset property To: Fabio Aiuto Cc: Mark Brown , Liam Girdwood , Rob Herring , Conor Dooley , Robin Gong , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Matteo Lisi , Mirko Ardinghi References: <20240411165801.143160-1-fabio.aiuto@engicam.com> <20240411165801.143160-2-fabio.aiuto@engicam.com> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJgPO8PBQkUX63hAAoJEBuTQ307 QWKbBn8P+QFxwl7pDsAKR1InemMAmuykCHl+XgC0LDqrsWhAH5TYeTVXGSyDsuZjHvj+FRP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Encoding: 7bit On 13/04/2024 19:10, Fabio Aiuto wrote: > Dear Krzysztof, > > Il Sat, Apr 13, 2024 at 12:58:35PM +0200, Krzysztof Kozlowski ha scritto: >> On 12/04/2024 09:21, Fabio Aiuto wrote: >>> Dear Krzysztof, >>> >>> Il Thu, Apr 11, 2024 at 09:52:12PM +0200, Krzysztof Kozlowski ha scritto: >>>> On 11/04/2024 18:58, Fabio Aiuto wrote: >>>>> Add property to trigger warm reset on PMIC_RST_B assertion >>>>> >>>> >>>> That's rather vague and does not tell me much why this is supposed to be >>>> board level configuration. It sounds more like a debugging feature: >>>> during development you want to retain memory contents for pstore etc. >>>> Then I could imagine this should be turned runtime, e.g. via >>>> sysfs/debugfs, because for example you want to start inspecting a >>>> customer's device. >>> >>> thanks, I spent too few time writing this commit log and I apologize >>> for that. I was thinking about something like: >>> >>> The default configuration of the PMIC behavior makes the PMIC >>> power cycle most regulators on PMIC_RST_B assertion. This power >>> cycling causes the memory contents of OCRAM to be lost. >>> Some systems needs some memory that survives reset and >>> reboot, therefore add a property to tell PMIC_RST_B is >>> wired. >>> >>> The actual configuration is made at probe time, anyway we need >>> to override the default behavior of the pmic to get a warm reset >>> everytime the PMIC_RST_B pin is asserted and this property tells >>> us that "something is wired to that pin" and "it has to behave >>> that way on pin assertion". Our use cases do not meet the need >>> of further runtime configuration change. >> >> What is the use case? > > I just have an external power button connected to that pin, it works > either with warm reset and cold-reset-except-ldo12. Moreover the default behavior > is cold reset and not reset-disabled. Anyway I thought it was useful for other > people to add a property selecting behavior for that pin too as was done for > WDOG_B. That's why I mainly duplicated the logic. If there is a pin adding a > reset source it's a good point to provide a way to access the register bits > related to this signal. I don't understand what is the use case. You wrote runtime does not solve your use case. What is the use case? > >> >> Sorry, you did not bring any further argument why this is board >> specific. And please don't explain how probing works, but address the >> problem here: why type of reset is specific to board design. To me it is >> OS policy. >> > > Why reset type is specific to board design? I'm sorry but I don't know > what you mean, as said my intention was to enlarge the number of configurable > bits in pca9450 register space hoping this would be useful for someone. > > All I can say is that is specific to board design for the same reason the > wdog_b- reset type was specific to board design. Specific to board design means different boards have somehow different configuration/schematics/layout/hardware meaning they need this property to configure device differently. I already said it implicitly, but let's reiterate: Devicetree is for hardware properties, not OS policies. I also said, so repeating the same argument, the choice how you want to reboot the system based on button press, sounds like debugging choice thus runtime suits better. Unless you want to say there are two signals and you want to configure them differently? But that's your job to explain it, not mine. Best regards, Krzysztof