From patchwork Sun Apr 16 12:44:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakob Hauser X-Patchwork-Id: 674422 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4742EC77B79 for ; Sun, 16 Apr 2023 12:50:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230477AbjDPMuk (ORCPT ); Sun, 16 Apr 2023 08:50:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230461AbjDPMuj (ORCPT ); Sun, 16 Apr 2023 08:50:39 -0400 Received: from sonic311-30.consmr.mail.ir2.yahoo.com (sonic311-30.consmr.mail.ir2.yahoo.com [77.238.176.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C85C126A6 for ; Sun, 16 Apr 2023 05:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1681649435; bh=ry1wdbINkSV09xVX5t7wSbuuNoW3ImeInKe2pM61If4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=Booa5Zq1c31RmSx4IxxAajr8qh23zdTe5Ey891xiJtQh6vvKujBID6m/nwGVBp3oTx2ZvncDPt7EytughQAevY/NPfuG04SwkPJ1xjT0lPX0jz8tsx7yxyxKVEdaoy2oactEO/3AxEShWMVdaIz3X0PrFS10spLuhYrb1BdKp8y8gl6YeWKxFP2oiApEPuQqMjcukVEjLn0YD6hgSywRqI8c35hG15Pu2At1Jpt5Ft3hiNp7X1+0hoDd/vlbEszAj0nOoGwT40eb+I+ftIsGhj8229hY+vT3jhHpob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2N7ALIbQ1kZw6cgHcbTPRD.y.G3Ws1Vus.h96xtNo5KwRIZCeLTmrQsSBqZwzPIQUhruI7ig7R1C z_A4K8bQjhvP5dKhPIHFoOjmNRk7lSCp76sCxuztqPeiuY4WUB5fYOhxGVDfyUxSqlqubBgqUPo5 MaJ1T1CkbcAbk8EDdiAZRriaP_mxNfObNrBfGBLDDlh3EPWzJ01aRl_2uicDsY8S12q1O.lZwlFz 71otxDUs0sdfathHEBHvDqnnm7Z7sAFnqr73sNuQaIum3bZuuEWm4Z7wEPQKUL.b6ZUVBNykpdfz w.kPKMUIMZMOOGgEl2MQ.YnutK2skxh9REancbLR8yumMrub0qClQmR3Mr7AD4El7C4F49KxAvce 7NGOPb653JbcHyO6IpCZVb79VFMU1RvHZFPCDe2p0ll1ge236Jxyh.kOvDlH03AVdwjG0QXRtYkl C8JbcwhHADeFlD.2MqiBeTVaetrHo_tRbbRrwcmWpYhabWpPsKser6EcFF8oLeFbBzpVI.616tDN y5.e2281.JTq2a5MpA3frgpdyb9ky9WF_nV6ec3.X7LDJbahmGjwrxlV9FOOA3DBQhX42ZbBMcv4 b8bOURSOU2oen8Hvsy7Hycmeikl2kv98LH3laSAUAJNqYGqdX8q17ns_jUxCeWsmb0qiNatWctM6 LVZK2DMECP8.mDmsI7pUFCqjpXeosAhFsjoXPUMOWuvDiz..sCPnUziN9vD2QVSO5J18GwlKAFJC ct93pLndcPmJ4Fnv5rlTQa0knerfSuFDKVKM2uA5WKLVZ6EsVSV3oBw-- X-Sonic-MF: X-Sonic-ID: c8ccb835-27b9-4f7b-a2f5-b718b209afcc Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ir2.yahoo.com with HTTP; Sun, 16 Apr 2023 12:50:35 +0000 Received: by hermes--production-ir2-74cd8fc864-9w846 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e1e6b4a18b1a30b9efb33afa6a04eb6c; Sun, 16 Apr 2023 12:50:34 +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 , Pavel Machek , Axel Lin , ChiYuan Huang , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jakob Hauser Subject: [PATCH v2 9/9] dt-bindings: Add documentation for rt5033 mfd, regulator and charger Date: Sun, 16 Apr 2023 14:44:36 +0200 Message-Id: <9275af790e6e21b5cf661a2444effe4caf2be02e.1681646904.git.jahau@rocketmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- The patch is based on linux-next (tag "next-20230413"). .../bindings/mfd/richtek,rt5033.yaml | 90 +++++++++++++++++++ .../power/supply/richtek,rt5033-charger.yaml | 76 ++++++++++++++++ .../regulator/richtek,rt5033-regulator.yaml | 24 +++++ 3 files changed, 190 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..158036a57291 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/richtek,rt5033.yaml @@ -0,0 +1,90 @@ +# 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 { + #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-microamp = <450000>; + richtek,fast-microamp = <1000000>; + richtek,eoc-microamp = <150000>; + richtek,pre-threshold-microvolt = <3500000>; + richtek,const-microvolt = <4350000>; + extcon = <&muic>; + }; + }; + }; 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..439e0b7962f3 --- /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-microamp: + 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-microamp: + 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-microamp: + 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-microvolt: + 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-microvolt: + 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-microamp + - richtek,fast-microamp + - richtek,eoc-microamp + - richtek,pre-threshold-microvolt + - richtek,const-microvolt + +additionalProperties: false + +examples: + - | + charger { + compatible = "richtek,rt5033-charger"; + richtek,pre-microamp = <450000>; + richtek,fast-microamp = <1000000>; + richtek,eoc-microamp = <150000>; + richtek,pre-threshold-microvolt = <3500000>; + richtek,const-microvolt = <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..66c8a0692e10 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/richtek,rt5033-regulator.yaml @@ -0,0 +1,24 @@ +# 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