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 X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3188FC433B4 for ; Tue, 18 May 2021 11:25:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15F3B61353 for ; Tue, 18 May 2021 11:25:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231255AbhERL0g (ORCPT ); Tue, 18 May 2021 07:26:36 -0400 Received: from mail-lf1-f42.google.com ([209.85.167.42]:42936 "EHLO mail-lf1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbhERL0f (ORCPT ); Tue, 18 May 2021 07:26:35 -0400 Received: by mail-lf1-f42.google.com with SMTP id a2so13559001lfc.9; Tue, 18 May 2021 04:25:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uHKmDiwNyBNFIsgiT1l8NXybQ8EdJLD4RtBDqUODRjA=; b=T1soqW3wy+f22REj4Zukiq2prBO2nXoPeP/iFDtziKSOmqqou94vUK3phdDls+fA27 uGFJvkGKKMuU8aMsZ8mQLhOkTZGeaAZwP+OR8awYVL84AZKs0WQwR8Qsj/iczFXe4m5V ajwo2yBEGTmlJAJKndwxpjmhbMLieJSlL2Gxo5R3bz7Fsnw1ehv1TDBa933s1lgGAhZI ft8AEk/oSXScc8jJ1XpLwLSVRqgXgmFmeykuHhrXTRh9mi3vZPy5ReBrX5AwjZlnwUog zms0KHKT4a/Om2KKlO1efjb++FSbYV2WHjfYw4NNw8l+uVq0YylDEtqge/0vftG7EWrr g50A== X-Gm-Message-State: AOAM532BseGI5ggRads5ruikX/RQsf3sLen99/UyogqzRsdVwnVyWgWj dji8VucH4Zgo46wcozDLOBqvT+jV6wsUlg== X-Google-Smtp-Source: ABdhPJzGQIKEV9VYC1FUccD++qb41nqErgBSFmz7zcc47ynetXFfHvqNnaIxHBHlnN3vfhLBITVekQ== X-Received: by 2002:ac2:4c81:: with SMTP id d1mr3919235lfl.130.1621337116549; Tue, 18 May 2021 04:25:16 -0700 (PDT) Received: from localhost.localdomain (dc7vkhyyyyyyyyyyyyyyt-3.rev.dnainternet.fi. [2001:14ba:16e2:8300::1]) by smtp.gmail.com with ESMTPSA id h6sm434143lfd.193.2021.05.18.04.25.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 04:25:15 -0700 (PDT) Date: Tue, 18 May 2021 14:25:09 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Mark Brown , Kees Cook , Andy Shevchenko , Zhang Rui , Guenter Roeck , "agross@kernel.org" , "devicetree@vger.kernel.org" , linux-power , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "linux-arm-msm@vger.kernel.org" , "bjorn.andersson@linaro.org" , "lgirdwood@gmail.com" , "robh+dt@kernel.org" Subject: [PATCH v10 01/11] dt_bindings: Add protection limit properties Message-ID: <2e9412946a755c9649c050f839e809eed6004443.1621333893.git.matti.vaittinen@fi.rohmeurope.com> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Support specifying protection/error/warning limits for regulator over current, over temperature and over/under voltage. Most of the PMICs support only "protection" feature but few setups do also support error/warning level indications. On many ICs most of the protection limits can't actually be set. But for example the ampere limit for over-current protection on ROHM BD9576 can be configured - or feature can be completely disabled. Provide limit setting for all protections/errors for the sake of the completeness and do that using own properties for all so that not all users would need to set all levels when only one or few are supported. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring --- No changes since RFC-v2 --- .../bindings/regulator/regulator.yaml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/regulator.yaml b/D= ocumentation/devicetree/bindings/regulator/regulator.yaml index 6d0bc9cd4040..a6ae9ecae5cc 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/regulator.yaml @@ -117,6 +117,88 @@ properties: description: Enable over current protection. type: boolean =20 + regulator-oc-protection-microamp: + description: Set over current protection limit. This is a limit where + hardware performs emergency shutdown. Zero can be passed to disable + protection and value '1' indicates that protection should be enabled= but + limit setting can be omitted. + + regulator-oc-error-microamp: + description: Set over current error limit. This is a limit where part = of + the hardware propably is malfunctional and damage prevention is requ= ested. + Zero can be passed to disable error detection and value '1' indicates + that detection should be enabled but limit setting can be omitted. + + regulator-oc-warn-microamp: + description: Set over current warning limit. This is a limit where har= dware + is assumed still to be functional but approaching limit where it gets + damaged. Recovery actions should be initiated. Zero can be passed to + disable detection and value '1' indicates that detection should + be enabled but limit setting can be omitted. + + regulator-ov-protection-microvolt: + description: Set over voltage protection limit. This is a limit where + hardware performs emergency shutdown. Zero can be passed to disable + protection and value '1' indicates that protection should be enabled= but + limit setting can be omitted. Limit is given as microvolt offset from + voltage set to regulator. + + regulator-ov-error-microvolt: + description: Set over voltage error limit. This is a limit where part = of + the hardware propably is malfunctional and damage prevention is requ= ested + Zero can be passed to disable error detection and value '1' indicates + that detection should be enabled but limit setting can be omitted. L= imit + is given as microvolt offset from voltage set to regulator. + + regulator-ov-warn-microvolt: + description: Set over voltage warning limit. This is a limit where har= dware + is assumed still to be functional but approaching limit where it gets + damaged. Recovery actions should be initiated. Zero can be passed to + disable detection and value '1' indicates that detection should + be enabled but limit setting can be omitted. Limit is given as micro= volt + offset from voltage set to regulator. + + regulator-uv-protection-microvolt: + description: Set over under voltage protection limit. This is a limit = where + hardware performs emergency shutdown. Zero can be passed to disable + protection and value '1' indicates that protection should be enabled= but + limit setting can be omitted. Limit is given as microvolt offset from + voltage set to regulator. + + regulator-uv-error-microvolt: + description: Set under voltage error limit. This is a limit where part= of + the hardware propably is malfunctional and damage prevention is requ= ested + Zero can be passed to disable error detection and value '1' indicates + that detection should be enabled but limit setting can be omitted. L= imit + is given as microvolt offset from voltage set to regulator. + + regulator-uv-warn-microvolt: + description: Set over under voltage warning limit. This is a limit whe= re + hardware is assumed still to be functional but approaching limit whe= re + it gets damaged. Recovery actions should be initiated. Zero can be p= assed + to disable detection and value '1' indicates that detection should + be enabled but limit setting can be omitted. Limit is given as micro= volt + offset from voltage set to regulator. + + regulator-temp-protection-kelvin: + description: Set over temperature protection limit. This is a limit wh= ere + hardware performs emergency shutdown. Zero can be passed to disable + protection and value '1' indicates that protection should be enabled= but + limit setting can be omitted. + + regulator-temp-error-kelvin: + description: Set over temperature error limit. This is a limit where p= art of + the hardware propably is malfunctional and damage prevention is requ= ested + Zero can be passed to disable error detection and value '1' indicates + that detection should be enabled but limit setting can be omitted. + + regulator-temp-warn-kelvin: + description: Set over temperature warning limit. This is a limit where + hardware is assumed still to be functional but approaching limit whe= re it + gets damaged. Recovery actions should be initiated. Zero can be pass= ed to + disable detection and value '1' indicates that detection should + be enabled but limit setting can be omitted. + regulator-active-discharge: description: | tristate, enable/disable active discharge of regulators. The values = are: --=20 2.25.4 --=20 Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =3D]=20 --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmCjpBUACgkQeFA3/03a ocXdYQgAgTPrUZ+n/BjZvjHiAAvRPj0ez8L0C+NIAwqLWlgjTT3M8pwVUjCIkGf0 2pmSTGln9v3uJJaXDqeHzYbgEt6e5OmwTvP2+r3DmpY5j1ss3ZytBf6K6dHyLWaq LzbcSFHX3+IsyUuUX7x5sVbpCUhpLdo9CahXD+4XKPl3EpnEKSGcUXG0UQqyni3A VrROv/UXrrAd2fYSWJuIzRlwfD+ZK0vP5Nu3TKUguomHwDHj6KjDYyONGFq/1NS7 oylc61tiy+Dd2rDUHKZNLRNPbUbUCv6tUD+O/y3BMcC9lnsyt1Zob5R+VtsLmy4B +W00qa7IQdKBUfbdw/SbuDki5D1YzQ== =+hxm -----END PGP SIGNATURE----- --WIyZ46R2i8wDzkSu--