Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1798715rwb; Wed, 5 Oct 2022 05:08:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6A9e2W4ZHXbgMVpU7RBvGmhNdFOS5rfJsXdMJ2f0QnwsN6fEInQMivGGqGmLBjkJrFWJsH X-Received: by 2002:a63:5f50:0:b0:456:88d1:a36c with SMTP id t77-20020a635f50000000b0045688d1a36cmr5844726pgb.298.1664971683567; Wed, 05 Oct 2022 05:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664971683; cv=none; d=google.com; s=arc-20160816; b=ILbaiClxIgcqamynS0W2SC0TP9gIWZ968ZadtGWweO9RX0/2kxOgxHXeZDIaC+FcQC o++vwh9Hlel0r1u623UvgMkTtVodVEDTNT2nfogkZaUUc7XpalkNeul/mOXw6vTgmgfn Iva79AfefSSB2StIlSdejrxobbe/HQD2lA9QxehXNZ3cIBDOE386oLjC1Hi1JHmDffNj sSignw0NPvHQ7au8JLvaeX4YgiVFbWV94FqPf6w8ZChjPBDiKgmJIZmkDRhYb06+0jvF aQe0oWtlVGWbYg+YL8E1bFN6S0W7L+CG8AXr4GOO6RwVZsTckx0aN3hkC0gGh/M92gqy MTng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OGQtGbNST61z32nTeyZWgElXzweJVoYL16GGInnSB6o=; b=lcyASyg1297zdpSepCCApXzss95K2qwcMOWq5WPMu2qIf/IMBZ8AaytqKQ12f5Jx9p YfHJQzayuArqnFC7LUkuRUJ+E0U88Rb78EdQjVyf7NuDykLXj/vBPbwyCypseJYsTBN/ hgw5MnQcaDrbN6XEz1yPjUae2XZE57cSRB1cPKQsdLbTWIKOGlJBumUdMD/VSlcSIoS8 2BvdExUic8gqp3xSJ1yEI4/vIinvKMo2wr/6inZYSgb7uOI/lPNDCAo+7BkFmWAVEyVw cvms6JQm1N1pcW94eWNKRAZkUaKMCrsxy2QVN+XW4abF1EW0eQiAaHcShyHFXe2mwRoR QE3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CP+PyIim; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a63734a000000b0045661cfb09esi4368888pgn.222.2022.10.05.05.07.51; Wed, 05 Oct 2022 05:08:03 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CP+PyIim; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbiJELoZ (ORCPT + 99 others); Wed, 5 Oct 2022 07:44:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbiJELnX (ORCPT ); Wed, 5 Oct 2022 07:43:23 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B54077EBC; Wed, 5 Oct 2022 04:41:46 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id w191so6159165pfc.5; Wed, 05 Oct 2022 04:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=OGQtGbNST61z32nTeyZWgElXzweJVoYL16GGInnSB6o=; b=CP+PyIimLQA1to17/ATwgBtIiXKWhfaTvUwF953+3P92zTiQS/XIwEkyQoRnsS60hY eCVzVq0iljT6L9VJl1Jlqgj9K/huA2+GoxU47p1kuFj51jt+ZQCmkhWhqvN7Rr/TXc1W T5UutWJj0iGAIydQSEWEhWZaxU6zHL01Eo48kIa5qX5oc8YAeMGIHxBJrzlmn2bbQkCu RGCV/sTAl4wxACCsc9zK675IrJXTTsI6Mt2H6o6X49vr1KiCsOl1YwMB7OFwIeHW8U5Q w2v3apqyBqn0/hWvOwHFbifSPSRFaCM+Mrb/emcLpU6F5e/HDtlF1JEhLfr6cCP619rU 0LNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=OGQtGbNST61z32nTeyZWgElXzweJVoYL16GGInnSB6o=; b=cnLC0XhFfAcJL90RuKIVdr9EQz75bbRTJeRna9RGtNcRIkOCPxwRrDRAWKgWJZfw0f H9G5p9veV/QoURBgBa71L35HRWOlpYPxX1yqGu15WJC90xrR5pmHDb1bcpTMJKrYxJnY XzR9JcUGtSx8PVSNzQkcuRKMaO8OxF4BRaTtFjpGfZwn6OkvTimxfxM+FBkUZv9BKiUt wml47PROFJgeLrWoTlp+kCw3QagnKXocZHHCgNxBFDs2PxM//ITKHb6Xdojx6kBOjpET KuVYh/UO0QS3EtmkTXw7WjMrVs9oIGbpAe32+Y4hvikF0d+xSvlHmQsrbU5ouX2lVsCn 9jGw== X-Gm-Message-State: ACrzQf1WBGeOPQ1kRuxr8SveTy6iaJZTAU2HFgpGCPHEbJvVBo2vZ1sm k7azSNhjW75gbkwVkHI6iCPt0h0q5Ndeeg== X-Received: by 2002:aa7:8299:0:b0:562:4c48:a0cb with SMTP id s25-20020aa78299000000b005624c48a0cbmr1447823pfm.66.1664969981230; Wed, 05 Oct 2022 04:39:41 -0700 (PDT) Received: from RD-3580-24288.rt.l (42-73-126-108.emome-ip.hinet.net. [42.73.126.108]) by smtp.gmail.com with ESMTPSA id v9-20020a17090a4ec900b00200b2894648sm979202pjl.52.2022.10.05.04.39.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 04:39:40 -0700 (PDT) From: ChiaEn Wu To: sre@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: chiaen_wu@richtek.com, cy_huang@richtek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v2 1/3] dt-bindings: power: supply: Add Richtek RT9467 battery charger Date: Wed, 5 Oct 2022 19:37:21 +0800 Message-Id: <0a4a6dfcec35160bb89a932ff73bc2cc0bbd6555.1664997251.git.chiaen_wu@richtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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_DNSWL_NONE,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 From: ChiaEn Wu Add bindings for the Richtek RT9467 battery charger. Co-developed-by: ChiYuan Huang Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- v2 - Revise the definition of 'enable-gpios' - Revise the node name to generic name in the example ('rt9467@5b' --> 'charger@5b') - Revise the example usage of 'charge-enable-gpios' with GPIO flags --- .../power/supply/richtek,rt9467-charger.yaml | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/richtek,rt9467-charger.yaml diff --git a/Documentation/devicetree/bindings/power/supply/richtek,rt9467-charger.yaml b/Documentation/devicetree/bindings/power/supply/richtek,rt9467-charger.yaml new file mode 100644 index 0000000..92c5706 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/richtek,rt9467-charger.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/richtek,rt9467-charger.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT9467 Switching Battery Charger with Power Path Management + +maintainers: + - ChiYuan Huang + - ChiaEn Wu + +description: | + RT9467 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for + portable applications. It integrates a synchronous PWM controller, power + MOSFETs, input current sensing and regulation, high-accuracy voltage + regulation, and charge termination. The charge current is regulated through + integrated sensing resistors. + + The RT9467 also features USB On-The-Go (OTG) support. It also integrates + D+/D- pin for USB host/charging port detection. + + Datasheet is available at + https://www.richtek.com/assets/product_file/RT9467/DS9467-01.pdf + +properties: + compatible: + const: richtek,rt9467-charger + + reg: + maxItems: 1 + + wakeup-source: true + + interrupts: + maxItems: 1 + + charge-enable-gpios: + description: GPIO is used to turn on and off charging. + maxItems: 1 + + usb-otg-vbus-regulator: + type: object + description: OTG boost regulator. + unevaluatedProperties: false + $ref: /schemas/regulator/regulator.yaml# + + properties: + enable-gpios: true + +required: + - compatible + - reg + - wakeup-source + - interrupts + +additionalProperties: false + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + charger@5b { + compatible = "richtek,rt9467-charger"; + reg = <0x5b>; + wakeup-source; + interrupts-extended = <&gpio_intc 32 IRQ_TYPE_LEVEL_LOW>; + charge-enable-gpios = <&gpio26 1 GPIO_ACTIVE_LOW>; + + rt9467_otg_vbus: usb-otg-vbus-regulator { + regulator-name = "rt9467-usb-otg-vbus"; + regulator-min-microvolt = <4425000>; + regulator-max-microvolt = <5825000>; + regulator-min-microamp = <500000>; + regulator-max-microamp = <3000000>; + }; + }; + }; -- 2.7.4