From patchwork Tue Feb 28 22:32:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakob Hauser X-Patchwork-Id: 1749704 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rocketmail.com header.i=@rocketmail.com header.a=rsa-sha256 header.s=s2048 header.b=GLkQ1YmZ; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PRC2w6RV2z245t for ; Wed, 1 Mar 2023 09:39:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229840AbjB1WjD (ORCPT ); Tue, 28 Feb 2023 17:39:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbjB1WjB (ORCPT ); Tue, 28 Feb 2023 17:39:01 -0500 Received: from sonic305-35.consmr.mail.ir2.yahoo.com (sonic305-35.consmr.mail.ir2.yahoo.com [77.238.177.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3E822CFE1 for ; Tue, 28 Feb 2023 14:38:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1677623936; bh=DEPjcIA3533VAWySuEI9s7PPZDzVB5wbr8s5WByqx1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=GLkQ1YmZofqOFSU4HHlCBhXXvjQuAOYRnV+HNOEcJudjl5DblCXek1CTsaOUewsYZ42HS6LMkg7oXk726KgzRAqwIOo7wCDWExN/Ys5mojRtdm3HcG1UVlgaNArK+kIJopf+8J/i3YuqSSaziBG3wX7TgcmXjeC0LAcIpvvCfchyBefazGRDSiSvFqnO9QkfLlY3iz5EFtQQAuqzfYf7j2L9oVJcKCr7DRVB1ip6MEnk+NTnr2wH/CWDcE6f60zSy9rzV8abywp+yJTfaMSbtRrz7DBbL76D23oHur01onHeEqbyfB6RPVTXEgKl+kd/dlwhjlMTNB9XHWz0U+f0pA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677623936; bh=puQJA0gdVym2HfwHj5egYqRerFeCvP4PggIFAAKOIRc=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=UkFbdaxEulnv5TVXl0qmYdrNbmFKncHQZE9Y2d5rpRbc82gA5kckJDBCEnUc4iUDUPXohaH9zAzBzdKlUNuxt8zis9lpmSSfvHISm2GMzylWYz4GQCEpnhKWWOQAwzyszazX1MwlWujGK7EvAnqJKMNFlVOTavQ9mphd/3QgFiOSrVePVGeCdZPw0vCCSzLwiBhKRg21f5kgP+38ztmThaEtGuEpIll2aRxBaDRrdeExPYCBpdkMA2CeruScCtFsS20o4peMNi//Cqv3QY1sfbVwrAKBl92ZYnLXJA16NIpujUnSuEpHRbWzSIEKIF8unZAm0Lix8hOavzGsKv6+5g== X-YMail-OSG: rktOehMVM1lApGO.db2VNB2jhLvPQpCZr5joCvujiq8YHDTbdtPtVrV7Nfwcib5 XvlaAMF5EpLsV__fJEFsX05Yjm4sZW8q0QcBMoLlCKqw4RSdrpsqDIuvSS48MV.xqqPTo2w9WCpu IMpEJdxff.NMzLTbLzUBkXUQdeXckzjIcW5N.dMbJS4L7l8oI5WwxQY6UYoBjr7b_yk1GEDGhLEb TTf3b5RNxUq8SkAl7vwPMj_jtwDH6hA0oMbmmWjfAr0xtN96lwdGyxjqEQKGgKfU7NZMkofjeGdT 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IxociotrdDeNLCv79WEAfg8I8J0mk8- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ir2.yahoo.com with HTTP; Tue, 28 Feb 2023 22:38:56 +0000 Received: by hermes--production-ir2-65c64dfd66-svnc4 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1052c26ec2388683ab738a7f87fce466; Tue, 28 Feb 2023 22:38:52 +0000 (UTC) From: Jakob Hauser To: Sebastian Reichel , Lee Jones , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: Beomho Seo , Chanwoo Choi , Stephan Gerhold , Raymond Hackley , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jakob Hauser Subject: [PATCH 10/10] dt-bindings: Add documentation for rt5033 mfd, regulator and charger Date: Tue, 28 Feb 2023 23:32:27 +0100 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add device tree binding documentation for rt5033 multifunction device, voltage regulator and battery charger. Cc: Beomho Seo Cc: Chanwoo Choi Signed-off-by: Jakob Hauser --- .../bindings/mfd/richtek,rt5033.yaml | 102 ++++++++++++++++++ .../power/supply/richtek,rt5033-charger.yaml | 76 +++++++++++++ .../regulator/richtek,rt5033-regulator.yaml | 45 ++++++++ 3 files changed, 223 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/richtek,rt5033.yaml create mode 100644 Documentation/devicetree/bindings/power/supply/richtek,rt5033-charger.yaml create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5033-regulator.yaml diff --git a/Documentation/devicetree/bindings/mfd/richtek,rt5033.yaml b/Documentation/devicetree/bindings/mfd/richtek,rt5033.yaml new file mode 100644 index 000000000000..f1a58694c81e --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/richtek,rt5033.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/richtek,rt5033.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT5033 Power Management Integrated Circuit + +maintainers: + - Jakob Hauser + +description: | + RT5033 is a multifunction device which includes battery charger, fuel gauge, + flash LED current source, LDO and synchronous Buck converter for portable + applications. It is interfaced to host controller using I2C interface. The + battery fuel gauge uses a separate I2C bus. + +properties: + compatible: + const: richtek,rt5033 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + regulators: + type: object + $ref: /schemas/regulator/richtek,rt5033-regulator.yaml# + + charger: + type: object + $ref: /schemas/power/supply/richtek,rt5033-charger.yaml# + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + + pmic@34 { + compatible = "richtek,rt5033"; + reg = <0x34>; + + interrupt-parent = <&msmgpio>; + interrupts = <62 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_default>; + + regulators { + safe_ldo_reg: SAFE_LDO { + regulator-name = "SAFE_LDO"; + regulator-min-microvolt = <4900000>; + regulator-max-microvolt = <4900000>; + regulator-always-on; + }; + ldo_reg: LDO { + regulator-name = "LDO"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + buck_reg: BUCK { + regulator-name = "BUCK"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + }; + + charger { + compatible = "richtek,rt5033-charger"; + richtek,pre-uamp = <450000>; + richtek,fast-uamp = <1000000>; + richtek,eoc-uamp = <150000>; + richtek,pre-threshold-uvolt = <3500000>; + richtek,const-uvolt = <4350000>; + extcon = <&muic>; + }; + }; + }; + + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + + battery@35 { + compatible = "richtek,rt5033-battery"; + reg = <0x35>; + interrupt-parent = <&msmgpio>; + interrupts = <121 IRQ_TYPE_EDGE_FALLING>; + }; + }; diff --git a/Documentation/devicetree/bindings/power/supply/richtek,rt5033-charger.yaml b/Documentation/devicetree/bindings/power/supply/richtek,rt5033-charger.yaml new file mode 100644 index 000000000000..996c2932927d --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/richtek,rt5033-charger.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/richtek,rt5033-charger.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT5033 PIMC Battery Charger + +maintainers: + - Jakob Hauser + +description: | + The battery charger of the multifunction device RT5033 has to be instantiated + under sub-node named "charger" using the following format. + +properties: + compatible: + const: richtek,rt5033-charger + + richtek,pre-uamp: + description: | + Current of pre-charge mode. The pre-charge current levels are 350 mA to + 650 mA programmed by I2C per 100 mA. + maxItems: 1 + + richtek,fast-uamp: + description: | + Current of fast-charge mode. The fast-charge current levels are 700 mA + to 2000 mA programmed by I2C per 100 mA. + maxItems: 1 + + richtek,eoc-uamp: + description: | + This property is end of charge current. Its level ranges from 150 mA to + 600 mA. Between 150 mA and 300 mA in 50 mA steps, between 300 mA and 600 mA + in 100 mA steps. + maxItems: 1 + + richtek,pre-threshold-uvolt: + description: | + Voltage of pre-charge mode. If the battery voltage is below the pre-charge + threshold voltage, the charger is in pre-charge mode with pre-charge current. + Its levels are 2.3 V to 3.8 V programmed by I2C per 0.1 V. + maxItems: 1 + + richtek,const-uvolt: + description: | + Battery regulation voltage of constant voltage mode. This voltage levels from + 3.65 V to 4.4 V by I2C per 0.025 V. + maxItems: 1 + + extcon: + description: | + Phandle to the extcon device. + maxItems: 1 + +required: + - richtek,pre-uamp + - richtek,fast-uamp + - richtek,eoc-uamp + - richtek,pre-threshold-uvolt + - richtek,const-uvolt + +additionalProperties: false + +examples: + - | + charger { + compatible = "richtek,rt5033-charger"; + richtek,pre-uamp = <450000>; + richtek,fast-uamp = <1000000>; + richtek,eoc-uamp = <150000>; + richtek,pre-threshold-uvolt = <3500000>; + richtek,const-uvolt = <4350000>; + extcon = <&muic>; + }; diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5033-regulator.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5033-regulator.yaml new file mode 100644 index 000000000000..61b074488db4 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/richtek,rt5033-regulator.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt5033-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT5033 PIMC Voltage Regulator + +maintainers: + - Jakob Hauser + +description: | + The regulators of RT5033 have to be instantiated under a sub-node named + "regulators". For SAFE_LDO voltage there is only one value of 4.9 V. LDO + voltage ranges from 1.2 V to 3.0 V in 0.1 V steps. BUCK voltage ranges from + 1.0 V to 3.0 V in 0.1 V steps. + +patternProperties: + "^(SAFE_LDO|LDO|BUCK)$": + type: object + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false + +additionalProperties: false + +examples: + - | + regulators { + safe_ldo_reg: SAFE_LDO { + regulator-name = "SAFE_LDO"; + regulator-min-microvolt = <4900000>; + regulator-max-microvolt = <4900000>; + regulator-always-on; + }; + ldo_reg: LDO { + regulator-name = "LDO"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + buck_reg: BUCK { + regulator-name = "BUCK"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + };