Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7698136rwp; Tue, 18 Jul 2023 21:34:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlE5VHnvMe2UOOl7xCdrNStcsQc64AXnUmKydM7P/cQNaCtUhiX2KsrpRPENiJxd0P1SGcU5 X-Received: by 2002:a17:902:b58c:b0:1b8:a4e5:1735 with SMTP id a12-20020a170902b58c00b001b8a4e51735mr16071348pls.61.1689741273819; Tue, 18 Jul 2023 21:34:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689741273; cv=none; d=google.com; s=arc-20160816; b=f416Gfr4aeSdMfzKPcXxy73jXBVbN5tT04CQW1PqdF9Je4UYoxLDjqBwxyAR0WDgy7 HFGnFQeIcZHwYLdyqzkmEDYCsIagdV/jTAWoPSwEcdfsxnUKX2aK3GzD8/iQCrb85Eaf 2MT3XfSmZieQAb17/3KHE849dnmvEAGHdM0JARjKU6heM1J/zjFzfvvTvWO72FIz6e0n da0eqPMJRvot4iqqzJ5bxtMhJIxMthYD7b5HeOV3UwJ4Adfp3ySrocGXihwHjDg9Byez qWlJReWi+N90wV5/V7FewV5vVHu+j+rCeyx8IBLBcFaOr7v2facWzkTXQHdCwOB/lt5v NPqw== 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=AgWjqSNoJuD5RVe/oQfBNctBXFBo1wDoTFqgAhthYH0=; fh=URTg7QUyL3MAeAYyfWnXjCZoH/RbWBmTfJiY0fFH9aM=; b=V3joNZLaZxJwHb1Y/6fmZGOzpxVkbU7Z1Qgn2n2uTmCL6wimYctdwnUrEYJy5Q5TC8 8cMG0Bj2VGIE8qb2d1/WN6TFmU7wGKPvQaIs2MR4GKLdEY8Cgn46c8AwgTiCUXGyiZ91 vrsSXjG35F/y/YlQRRq7b7hjEhreZabDfmo14AfTDEr2Uuqbk8fgLqL2Qc646cFMT0uP AkLUtvYE2+34NUhqrMU7Hl8JfJLlADHBaFk9pgFaVQC/KOaHT1BloUl9UJavYZcUwoPi F1iLXwBhPMy75XmjMgH9iIMpdmOHo8msxhU/hvxFF0H5oT5el3XdtQYsyYtUmUbL8jfB Mh7w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij9-20020a170902ab4900b001b5395382a0si2800875plb.212.2023.07.18.21.34.19; Tue, 18 Jul 2023 21:34:33 -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 S229636AbjGSE0A (ORCPT + 99 others); Wed, 19 Jul 2023 00:26:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbjGSEZ5 (ORCPT ); Wed, 19 Jul 2023 00:25:57 -0400 Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3B8251B1; Tue, 18 Jul 2023 21:25:53 -0700 (PDT) X-MailGates: (SIP:2,PASS,NONE)(compute_score:DELIVER,40,3) Received: from 192.168.10.46 by mg.richtek.com with MailGates ESMTPS Server V6.0(1455433:1:AUTH_RELAY) (envelope-from ) (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jul 2023 12:25:42 +0800 (CST) Received: from ex4.rt.l (192.168.10.47) by ex3.rt.l (192.168.10.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Wed, 19 Jul 2023 12:25:41 +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; Wed, 19 Jul 2023 12:25:41 +0800 From: To: , , , , CC: , , Subject: [PATCH v3 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC Date: Wed, 19 Jul 2023 12:25:40 +0800 Message-ID: <1689740741-29244-2-git-send-email-alina_yu@richtek.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1689740741-29244-1-git-send-email-alina_yu@richtek.com> References: <1689740741-29244-1-git-send-email-alina_yu@richtek.com> MIME-Version: 1.0 Content-Type: text/plain 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, URIBL_BLOCKED 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 From: alinayu Add bindings for Richtek RTQ2208 IC controlled SubPMIC Signed-off-by: Alina Yu --- v3 - Fix some typos - Modify the descriptions for "richtek,mtp-sel" - Modify the node name to lowercase and remove underscore - Remove '|' from description - Remove "regulator-compatible" from property - Remove "regulator-state-mem" from pattern - Modify node name to generic one --- .../regulator/richtek,rtq2208-regulator.yaml | 206 +++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml diff --git a/Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml b/Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file mode 100644 index 0000000..2fc92e5 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml @@ -0,0 +1,206 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rtq2208-regulator.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: + type: boolean + description: + vout register selection besed on this boolean value. + false - Using DVS0 register setting to adjust vout + true - Using DVS1 register setting to adjust vout + + regulators: + type: object + + 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. + items: + enum: [0, 1] + + regulator-mode: + enum: [0, 1] + description: + describe buck initial operating mode in suspend state. + + "^ldo[1-2]$": + type: object + $ref: regulator.yaml# + description: + regulator description for ldo[1-2]. + + properties: + regulator-compatible: + pattern: "^LDO[1-2]$" + + richtek,fixed-uV: + $ref: "/schemas/types.yaml#/definitions/uint32" + enum: [ 900000, 1200000, 1800000, 3300000 ] + description: + the fixed voltage in micro volt which is decided at the factory. + +required: + - compatible + - reg + - regulators + +unevaluatedProperties: 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; + + 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 { + richtek,fixed-uV = <1200000>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + ldo2 { + regulator-always-on; + richtek,fixed-uV = <3300000>; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + }; + }; + }; -- 2.7.4