From patchwork Fri Feb 17 02:06:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiYuan Huang X-Patchwork-Id: 58319 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp649256wrn; Thu, 16 Feb 2023 18:23:50 -0800 (PST) X-Google-Smtp-Source: AK7set9M44+GGawW3RKj17MjyZTCJrhHWNCjVysmsMJEb8vTTJaKOwNONm/0hoGvbVrMFIeXy/pG X-Received: by 2002:a17:906:54e:b0:8b1:3009:536b with SMTP id k14-20020a170906054e00b008b13009536bmr8233903eja.29.1676600630321; Thu, 16 Feb 2023 18:23:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676600630; cv=none; d=google.com; s=arc-20160816; b=a3FredCfJRr8Q6pejcAgveonknrnPqF09HdgcMF4zWcTEurGXp5e7Dg0vivqU9DIC3 1DYS2n76+ESVtunBlTwiR/2f7sAqJBE5OOoLUtkPknr9O8paW/dVBuf87HpNxcqrh+Co 7EintMt/jZpa2ukQYeakq6Vvm97ixccmhVTxQQOc62XImd8cQHUqJYDjz1lZSCj6Fz0U Erp3yqnoC4ozavg4aEN1FTgBXtx6DRYdjRBzYIiyMVlUnlyq2t1GUuiD1XP059rVG9Ns mM1oAodfv2YOCGMd7TYWPRxpXziXm63RI90P1MZFXMOMRS08Z53A4L/sHxR6pv0B+ZVf 143Q== 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=hVQ7XpKQQOglh6806rRwVaGtSWopvdoLR/6aMneO4n8=; b=Lz+D3JBMcq3PvW2RoW0Dtdnh+6L9xGRBIzFMrH6rrZ2niq3vZwdxl3DrX66nBYDdRY rZxUmnLTbqhhvaH7OvESWuePBgGMhNfzvAZOFutReXOV1Dj5ERswSd//Oy8Gxm0ojK2H WmeUfgWG3s7owTd4I7BU1zgSHGVn2Mb4335QDNWZWj3W6zzk/GYRG0geYYCNa+az3sxB 3s3ya2om2lfv6Dq1xbfRZTDsxwNyH1DjVC/IBkPsWB5d6dqstEV64sePRsbp6VU0y8px YUe3lun8r0lw5ooUU3irFuKCKDFnuuH/CgO9JCwXZg+1PbjqVa2e7jG+1zaBDN5CXm8A tU6w== 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 n9-20020a056402514900b004acbe83b837si2398160edd.213.2023.02.16.18.23.25; Thu, 16 Feb 2023 18:23:50 -0800 (PST) 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 S230295AbjBQCHR (ORCPT + 99 others); Thu, 16 Feb 2023 21:07:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229793AbjBQCHO (ORCPT ); Thu, 16 Feb 2023 21:07:14 -0500 Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BD50F498B9; Thu, 16 Feb 2023 18:07:11 -0800 (PST) X-MailGates: (flag:4,DYNAMIC,BADHELO,RELAY,NOHOST:PASS)(compute_score:DE LIVER,40,3) Received: from 192.168.10.46 by mg.richtek.com with MailGates ESMTP Server V5.0(23463:0:AUTH_RELAY) (envelope-from ); Fri, 17 Feb 2023 10:07:00 +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.20; Fri, 17 Feb 2023 10:06:59 +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.20 via Frontend Transport; Fri, 17 Feb 2023 10:06:59 +0800 From: To: , , CC: , , , , Subject: [PATCH v2 1/2] dt-bindings: regulator: Add Richtek RT5739 Date: Fri, 17 Feb 2023 10:06:57 +0800 Message-ID: <1676599618-24819-2-git-send-email-cy_huang@richtek.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1676599618-24819-1-git-send-email-cy_huang@richtek.com> References: <1676599618-24819-1-git-send-email-cy_huang@richtek.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758043182747317167?= X-GMAIL-MSGID: =?utf-8?q?1758043182747317167?= From: ChiYuan Huang Add the binding document for Richtek RT5739. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- Since v2: - Refine dt-binding patch subject - Shorten and refine title and description without too much marketing text. - Fix the typo from 'connecton' to 'connection' in 'richtek,vsel-active-high' property description - Remove maxItems in property 'regulator-allowed-modes' - Fix the wrong min/max microvolt in binding example. Must be '300000' and '1300000', respectively. --- .../bindings/regulator/richtek,rt5739.yaml | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml new file mode 100644 index 00000000..358297d --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt5739.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT5739 Step-Down Buck Converter + +maintainers: + - ChiYuan Huang + +description: | + The RT5739 is a step-down switching buck converter that can deliver the + programmable output voltage from 300mV to 1300mV with wide input voltage + supply of 2.5V to 5.5V. It can provide up to 3.5A continuous current + capability at over 80% high efficiency. + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + enum: + - richtek,rt5739 + + reg: + maxItems: 1 + + enable-gpios: + maxItems: 1 + + richtek,vsel-active-high: + description: | + If property is present, use the 'VSEL1' register group for buck control. + Else, use the 'VSEL0' register group. This depends on external hardware + 'VSEL' pin connection. + type: boolean + + regulator-allowed-modes: + description: | + buck allowed operating mode + 0: Auto PFM/PWM mode + 1: Forced PWM mode + items: + enum: [0, 1] + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@50 { + compatible = "richtek,rt5739"; + reg = <0x50>; + enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>; + richtek,vsel-active-high; + regulator-name = "richtek,rt5739-buck"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1300000>; + regulator-allowed-modes = <0 1>; + regulator-boot-on; + }; + };