Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2556850pxj; Mon, 10 May 2021 05:53:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyACycH2HmOQn7sGJX2293EJxUhY2cX2CbbBfSofo78R9EfXBAUhdI0yEhrfcLHDq8pqlP4 X-Received: by 2002:a17:907:7b9f:: with SMTP id ne31mr25523842ejc.139.1620651180633; Mon, 10 May 2021 05:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620651180; cv=none; d=google.com; s=arc-20160816; b=ktFirOMcZRreZjIGX8JfVor+Ey1Oh2M0lQCN9LtwQysiq/1t5PgpOOKMO1jElvBQc6 vKbyLrnQXNZukehk/p5hFJcwO7SZkP+dxFJ2DliOuvtGrp8QINMf0/3V9fiGZjmjQBqO VH80WXS3DWFLesd+gggqcQilw5OwS+hXLBpSTMrWZN68+8yS1jVZJ+wniAtC/U63oxN2 A1VBJYV+V+yFmOjZKT7NQqVoU1Ic5dWkprRBkly1RZAZvdj6aJaU8iQUd9TeGj9vmNPR ja8vcxNdNiQGv2aYCgD3Z9SXoUykeuE6Hzh+x40cmH5E/rCY6qBX5scwRL6BtxbigH0x QJEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=M7MniA25rAvwMIIfCZ0fM0nnb6dmzOJNmUcGZG0zqr4=; b=nhk11EmjHA9ZrNyzMmX9JkxGGCessFzwXitlNdhA9n0jj1TN/bFDpux2AC1enbyfWF P7MVsmKUMTZvq7HOcW+h0HQsdZTpHgQ4kTnMt4u0SSZwQHi98i30pLp+oupDYxbYNP6r he6LHOFeSyxBQAyi6aghV6CuJWZAc6iTqseN3/0Fq1jsrRQr+QPCJguHIM7pJyOubN/T 6Hg0rLytat1AoPR8vPDkDkxnSE3a9vMI7PK/r/ViysGb834E+Ng3BqgK8OsBNdKrD6Wa Nlbkz7f7Gb04bgWmPmTybRZ5ODIK2BcfJpzbYOiBZo18kOS1j7/2X6je6vlkgjCY0ILA N/jQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si13412065edy.549.2021.05.10.05.52.36; Mon, 10 May 2021 05:53:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349182AbhEJMs2 (ORCPT + 99 others); Mon, 10 May 2021 08:48:28 -0400 Received: from mail-lj1-f178.google.com ([209.85.208.178]:36603 "EHLO mail-lj1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240022AbhEJL2S (ORCPT ); Mon, 10 May 2021 07:28:18 -0400 Received: by mail-lj1-f178.google.com with SMTP id o16so20372392ljp.3; Mon, 10 May 2021 04:27:12 -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=M7MniA25rAvwMIIfCZ0fM0nnb6dmzOJNmUcGZG0zqr4=; b=WaiVwwErZ0Zc0K0LQaCKFA4EY2lGUG3GKEzvnW6aR4gAXEMOQVhDJZw8+NVb2XD5QA ASurS1/FAXvKi195S6X3CRjo8Yl4oVXjYCAL90C7OwSfypNtIh+44ZR116w7XHiEsi6T DIqBxWIpnSfCCVs7ae/RiDlGJefSkHz5zg9KDW4s6/Acay0Laca3p1A4Wq2G26DgW7fk yEBK7S/K4eqUxzruCEYhUZsX/686eYyAyUe7uB1/DHRBomRdkrfs6j3+MIdqqdhEGUZF bohmXJOGu9krpQmvEQ+FrbVfA/xBzpTNj0ad+xAXYqvjgMzCnIwp43iezF42cdlWkSH7 +wtw== X-Gm-Message-State: AOAM5306+nYplGfF3i/ONwR1alnuhdO/nK9fHnvbEH1HDCAlaH+T3CdM NBkX+2+JUct5orqNRXBeTGM= X-Received: by 2002:a2e:9f14:: with SMTP id u20mr19560986ljk.53.1620646031447; Mon, 10 May 2021 04:27:11 -0700 (PDT) Received: from localhost.localdomain (dc7vkhyyyyyyyyyyyyyby-3.rev.dnainternet.fi. [2001:14ba:16e2:8300::2]) by smtp.gmail.com with ESMTPSA id y7sm2218254lfb.62.2021.05.10.04.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 04:27:10 -0700 (PDT) Date: Mon, 10 May 2021 14:27:04 +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 v9 01/10] dt_bindings: Add protection limit properties Message-ID: <05fe8d0089f1378f984cf86cb25caa5eb630e87c.1620645507.git.matti.vaittinen@fi.rohmeurope.com> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ibTvN161/egqYuK8 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 --ibTvN161/egqYuK8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmCZGIgACgkQeFA3/03a ocXT3AgAnv1/5aynajRmtTl56au/d6KD7dwQV3h8oC0Y+luavWyUI9kIcqexOLQI GknobXY5qoXjKcT8TmAOdxfUwPBCzwY4pYoOeL2CBWehmYQ7pFUt2QBw/pvKQgNB zq7Njp+rWHVyiGCaWW5xdzG5zOSFoYf0hOQUQeveAkUvXaWFLUeVSNfNpseap2yP kgMtHbQ4fKagreOfMM4OfXz2hMYe7b1acNQSTFqqSVHtDCBdB0/Ly1p6Dvqo4K8q caASmODE4tVBMD+Db2fYaRuCE9mLjpVAGrH9c+ifJlvdiNGjVSy7oYMVXCUyVSsL /HgfKYF2CSFm10kQOz2eJi2EqvRhQg== =DZL+ -----END PGP SIGNATURE----- --ibTvN161/egqYuK8--