From patchwork Mon Mar 27 15:40:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Panis X-Patchwork-Id: 1761777 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=XpZz20/p; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PlcVl58PGz1yYf for ; Tue, 28 Mar 2023 02:41:35 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232235AbjC0Ple (ORCPT ); Mon, 27 Mar 2023 11:41:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232207AbjC0Pla (ORCPT ); Mon, 27 Mar 2023 11:41:30 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C47A55FD4 for ; Mon, 27 Mar 2023 08:41:08 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id m2so9257752wrh.6 for ; Mon, 27 Mar 2023 08:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1679931665; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OPzvzuvpmK6mdKAkMf0lpAwxvChSpk37xRLJ2bHOdk4=; b=XpZz20/pAuEQ5Md8qiiPdZnOu13Yp8mFmZXTj4VPKbUt5xrqXCUM+N3buxjZW4BAch j9KheRyjyboP8Y0PRVoNAIQH0hCJfmOe4+z9ItA0DF3Hgv7SOottAw+jmbp3Rcc0Bq0O ePdQG8ro0k8UvxJDvXxYqIjYN96a3rKye+26XZhK72kltU1GGydv5ry03iaNFgwVREPk U/rSdX9vuUXBlFQwQMqYCKqkkLiZWk+kDU0rWy0uaZ9qzUX6zHZuCvt5IhSDoCfh83yQ KI1tHqWrY4rnc213D8HbgFmI+8uhHoezoZ6iBfpf3WvLadUFwRdk6H9r7dp1a4ESZaXv zorg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679931665; 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:message-id:reply-to; bh=OPzvzuvpmK6mdKAkMf0lpAwxvChSpk37xRLJ2bHOdk4=; b=DWurMx2lI2jArmy/DjG2L1aHhtT97z+dXZVyXTF11Io9Hs9Km124DK51LCrTvNY88w csiUELjWcwL9NKHyLv/822zo6u/UOZCvBcXu8/2mKQqEQRhIYe6sFeHA0bEP0gzTPFtx KCcQiO2pN3hPpB8ieeMFOi+Z8Tw4DG1PWJM6JWxeJgCXDtYquevEE2Ko4TZ0BxCRW8Em Wc/ZuFINWexj9Vz5AmekpcLbuPYndzdyGoHlOPOKD5CEg6PWU3BX0XUMSra6/CwkbG5g Z5CGAAj++daE7EXFHNtpZb91vUToy8LLYMX1IqHor+M6LxRWqTuUdgln51t3xqsPULqn BN6A== X-Gm-Message-State: AAQBX9emXOKB5o44I6rhyKoBZ/rduwAd+oRFNWlM4WunzjpRQvtzqz9n 5Sfvl909Ie7PnrQ5zeVRHfjDHg== X-Google-Smtp-Source: AKy350a6zBABnqUxrmI3Lbtn30qVOt8YDcJE/Ji9bto3b3LcAPxHxDAH3FBjq/QrXlFiAJUdM3kZZQ== X-Received: by 2002:adf:edc9:0:b0:2ce:aad6:a5d0 with SMTP id v9-20020adfedc9000000b002ceaad6a5d0mr8388548wro.29.1679931665338; Mon, 27 Mar 2023 08:41:05 -0700 (PDT) Received: from baylibre-ThinkPad-T14s-Gen-2i.. (151.31.102.84.rev.sfr.net. [84.102.31.151]) by smtp.gmail.com with ESMTPSA id a18-20020a5d4d52000000b002d1e49cff35sm25277161wru.40.2023.03.27.08.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 08:41:05 -0700 (PDT) From: Julien Panis To: lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, corbet@lwn.net, arnd@arndb.de, gregkh@linuxfoundation.org, derek.kiernan@xilinx.com, dragan.cvetic@xilinx.com Cc: eric.auger@redhat.com, jgg@ziepe.ca, razor@blackwall.org, stephen@networkplumber.org, davem@davemloft.net, christian.koenig@amd.com, contact@emersion.fr, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, sterzik@ti.com, u-kumar1@ti.com, eblanc@baylibre.com, jneanne@baylibre.com Subject: [PATCH v4 1/4] dt-bindings: mfd: Add TI TPS6594 PMIC Date: Mon, 27 Mar 2023 17:40:58 +0200 Message-Id: <20230327154101.211732-2-jpanis@baylibre.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20230327154101.211732-1-jpanis@baylibre.com> References: <20230327154101.211732-1-jpanis@baylibre.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: devicetree@vger.kernel.org TPS6594 is a Power Management IC which provides regulators and others features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and PFSM (Pre-configurable Finite State Machine) managing the state of the device. TPS6594 is the super-set device while TPS6593 and LP8764X are derivatives. Signed-off-by: Julien Panis --- .../devicetree/bindings/mfd/ti,tps6594.yaml | 231 ++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/ti,tps6594.yaml diff --git a/Documentation/devicetree/bindings/mfd/ti,tps6594.yaml b/Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file mode 100644 index 000000000000..4498e6361b34 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/ti,tps6594.yaml @@ -0,0 +1,231 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/ti,tps6594.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI TPS6594 Power Management Integrated Circuit + +maintainers: + - Julien Panis + +description: + TPS6594 is a Power Management IC which provides regulators and others + features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and + PFSM (Pre-configurable Finite State Machine) managing the state of the device. + TPS6594 is the super-set device while TPS6593 and LP8764X are derivatives. + +properties: + compatible: + enum: + - ti,lp8764 + - ti,tps6593 + - ti,tps6594 + + reg: + description: I2C slave address or SPI chip select number. + maxItems: 1 + + ti,primary-pmic: + type: boolean + description: | + Identify the primary PMIC on SPMI bus. + A multi-PMIC synchronization scheme is implemented in the PMIC device + to synchronize the power state changes with other PMIC devices. This is + accomplished through a SPMI bus: the primary PMIC is the controller + device on the SPMI bus, and the secondary PMICs are the target devices + on the SPMI bus. + + system-power-controller: true + + gpio-controller: true + + '#gpio-cells': + const: 2 + description: | + The first cell is the pin number, the second cell is used to specify flags. + See ../gpio/gpio.txt for more information. + + interrupts: + maxItems: 1 + + ti,multi-phase-id: + description: | + Describes buck multi-phase configuration, if any. For instance, XY id means + that outputs of buck converters X and Y are combined in multi-phase mode. + $ref: /schemas/types.yaml#/definitions/uint32-array + oneOf: + - items: + - const: 12 + - items: + - const: 34 + - items: + - const: 12 + - const: 34 + - items: + - const: 123 + - items: + - const: 1234 + + regulators: + type: object + description: List of regulators provided by this controller. + + patternProperties: + "^buck([1-5]|12|34|123|1234)$": + type: object + $ref: /schemas/regulator/regulator.yaml# + + unevaluatedProperties: false + + "^ldo[1-4]$": + type: object + $ref: /schemas/regulator/regulator.yaml# + + unevaluatedProperties: false + + allOf: + - if: + required: + - buck12 + then: + properties: + buck123: false + buck1234: false + - if: + required: + - buck123 + then: + properties: + buck34: false + - if: + required: + - buck1234 + then: + properties: + buck34: false + + additionalProperties: false + + rtc: + type: object + description: RTC provided by this controller. + $ref: /schemas/rtc/rtc.yaml# + + watchdog: + type: object + description: Watchdog provided by this controller. + $ref: /schemas/watchdog/watchdog.yaml# + +patternProperties: + "^buck([1-5]|12|34|123|1234)-supply$": + description: Input supply phandle for each buck. + + "^ldo[1-4]-supply$": + description: Input supply phandle for each ldo. + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + tps6593: pmic@48 { + compatible = "ti,tps6593"; + reg = <0x48>; + ti,primary-pmic; + system-power-controller; + + gpio-controller; + #gpio-cells = <2>; + + pinctrl-names = "default"; + pinctrl-0 = <&pmic_irq_pins_default>; + interrupt-parent = <&mcu_gpio0>; + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; + + ti,multi-phase-id = <123>; + + buck123-supply = <&vcc_3v3_sys>; + buck4-supply = <&vcc_3v3_sys>; + buck5-supply = <&vcc_3v3_sys>; + ldo1-supply = <&vcc_3v3_sys>; + ldo2-supply = <&vcc_3v3_sys>; + ldo3-supply = <&buck5>; + ldo4-supply = <&vcc_3v3_sys>; + + regulators { + buck123: buck123 { + regulator-name = "vcc_core"; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <850000>; + regulator-boot-on; + regulator-always-on; + }; + + buck4: buck4 { + regulator-name = "vcc_1v1"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-boot-on; + regulator-always-on; + }; + + buck5: buck5 { + regulator-name = "vcc_1v8_sys"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1: ldo1 { + regulator-name = "vddshv5_sdio"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo2: ldo2 { + regulator-name = "vpp_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo3: ldo3 { + regulator-name = "vcc_0v85"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo4: ldo4 { + regulator-name = "vdda_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + }; + + rtc: rtc { + wakeup-source; + }; + + watchdog: watchdog { + timeout-sec = <10>; + }; + }; + };