From patchwork Thu Aug 3 03:50:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alina Yu X-Patchwork-Id: 130302 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp902848vqx; Wed, 2 Aug 2023 21:26:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlEqL6BH19+FM9G0rmQK+qYhzgL1NMp1IaOLY3YbTGEGbGxdUsHvzUdes7KQVLpp/YcjY/FP X-Received: by 2002:a05:6a00:32c8:b0:67f:7403:1fe8 with SMTP id cl8-20020a056a0032c800b0067f74031fe8mr15380253pfb.3.1691036787570; Wed, 02 Aug 2023 21:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691036787; cv=none; d=google.com; s=arc-20160816; b=h+0nMiz+F/O1lQvGcuTa3N2aT7/m8f7+eJO7DZr5DKrBYlwzxU3RqpAS3DapTZAykt JMr3NYlNPm04WK8CTjyWo/GXwIGfWD9/4Gw9kLxn9vkz9IRrJIVJQ/s4CKjVYuaxA5dR 9dqyTwwC69QonlYMTEIli6i+L1TbdZyf66WQt8603WgUg8dDfwlbRX67Rbwz4A1SQYCB MWFE/GCx0pyrL59wdsHR7p8ab/e7F1/B0E74a0C7ZPQRsn1ca0aBB3raAOwe2Rn+s8jL 12ODqbGloFffRAfthC2s0t6N6qTf/HqwftPcaYNp4TTNHiBmhN4Vcz+1bebNOHGnqdJX Ur1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=iloqcHSHdGroR0OkicUc9Z5IkrFQoqQckD1a5Xc76po=; fh=EvXdj19NGG/oUhOd+waT2B+afVdafeAPALwFNqFsUqc=; b=vne33FD/kO8l04PAJ/sm8XrIAFinsqRagWZm8oQKOIsk+4vfntX0Gpzv/EPx9j5uFv bomJqLp/os8a5pk49NcGyItR40A7stt46e4xeCuw9oWZqBE7akzdv9uSSmVvVsEfkKNI OTQnRLjbhNikm3wfuxkuDgHuGf16xDBZCHFgIbqsPPRMehjQbgs9za7MmhAuOkK26M11 LlY69N4vwT50fChdVwvn/MDlra6cQ1RlccXBfmiID4NrTOwF4mX0qdzKIv25mLI4IjYi rvtCIa3dgW+aRXZ754KPb4HSyEIuVaa31SlmkxwdHMlMNlBragp1kktGhmti5rSP9URU VRog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w33-20020a634761000000b0055baeced15esi11630116pgk.549.2023.08.02.21.26.14; Wed, 02 Aug 2023 21:26:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231942AbjHCDvM (ORCPT + 99 others); Wed, 2 Aug 2023 23:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231648AbjHCDvI (ORCPT ); Wed, 2 Aug 2023 23:51:08 -0400 Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9782D30D7; Wed, 2 Aug 2023 20:51:04 -0700 (PDT) X-MailGates: (SIP:2,PASS,NONE)(compute_score:DELIVER,40,3) Received: from 192.168.10.47 by mg.richtek.com with MailGates ESMTPS Server V6.0(2305:1:AUTH_RELAY) (envelope-from ) (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256); Thu, 03 Aug 2023 11:50:52 +0800 (CST) Received: from ex4.rt.l (192.168.10.47) by ex4.rt.l (192.168.10.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Thu, 3 Aug 2023 11:50:52 +0800 Received: from linuxcarl2.richtek.com (192.168.10.154) by ex4.rt.l (192.168.10.45) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Thu, 3 Aug 2023 11:50:52 +0800 From: Alina Yu To: , , , , CC: , , Subject: [PATCH v6 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC Date: Thu, 3 Aug 2023 11:50:44 +0800 Message-ID: <1691034645-11595-2-git-send-email-alina_yu@richtek.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1691034645-11595-1-git-send-email-alina_yu@richtek.com> References: <1691034645-11595-1-git-send-email-alina_yu@richtek.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773180590344563201 X-GMAIL-MSGID: 1773180590344563201 Add bindings for Richtek RTQ2208 IC controlled SubPMIC Signed-off-by: Alina Yu Reviewed-by: Krzysztof Kozlowski --- v6 - Add "additionalProperties: false" to regulator node v5 - Revise filename from $id - Remove "regulator-compatible" for ldos - Add missing "high" for "richtek,mtp-sel-high" - Remove "regulator-mode" property - Add and modify "unevaluatedProperties: false" and "additionalProperties: false" - Remove "richtek,fixed-uV" - Remove redundant space in "buck-a" and "ldo2" v4 - Modify filename to "richtek,rtq2208" - Add more desciptions for "regulator-allowed-modes" --- .../bindings/regulator/richtek,rtq2208.yaml | 197 +++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml diff --git a/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml b/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml new file mode 100644 index 0000000..609c066 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml @@ -0,0 +1,197 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rtq2208.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RTQ2208 SubPMIC Regulator + +maintainers: + - Alina Yu + +description: | + RTQ2208 is a highly integrated power converter that offers functional safety dual + multi-configurable synchronous buck converters and two LDOs. + + Bucks support "regulator-allowed-modes" and "regulator-mode". The former defines the permitted + switching operation in normal mode; the latter defines the operation in suspend to RAM mode. + + No matter the RTQ2208 is configured to normal or suspend to RAM mode, there are two switching + operation modes for all buck rails, automatic power saving mode (Auto mode) and forced continuous + conduction mode (FCCM). + + The definition of modes is in the datasheet which is available in below link + and their meaning is:: + 0 - Auto mode for power saving, which reducing the switching frequency at light load condition + to maintain high frequency. + 1 - FCCM to meet the strict voltage regulation accuracy, which keeping constant switching frequency. + + Datasheet will be available soon at + https://www.richtek.com/assets/Products + +properties: + compatible: + enum: + - richtek,rtq2208 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + richtek,mtp-sel-high: + type: boolean + description: + vout register selection based on this boolean value. + false - Using DVS0 register setting to adjust vout + true - Using DVS1 register setting to adjust vout + + regulators: + type: object + additionalProperties: false + + patternProperties: + "^buck-[a-h]$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + description for buck-[a-h] regulator. + + properties: + regulator-allowed-modes: + description: + two buck modes in different switching accuracy. + 0 - Auto mode + 1 - FCCM + items: + enum: [0, 1] + + "^ldo[1-2]$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + regulator description for ldo[1-2]. + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@10 { + compatible = "richtek,rtq2208"; + reg = <0x10>; + interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; + richtek,mtp-sel-high; + + regulators { + buck-a { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + buck-b { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + buck-c { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + buck-d { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + buck-e { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + buck-f { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + buck-g { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + buck-h { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + ldo1 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + ldo2 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + }; + }; + };