From patchwork Tue Dec 28 16:43:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 528786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBCDBC4332F for ; Tue, 28 Dec 2021 16:43:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231320AbhL1QnO (ORCPT ); Tue, 28 Dec 2021 11:43:14 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:49406 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232911AbhL1QnN (ORCPT ); Tue, 28 Dec 2021 11:43:13 -0500 Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 812E33F1A5 for ; Tue, 28 Dec 2021 16:43:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1640709792; bh=5OFsFqaSGsjPv5sIh7p3C4dzVLnGHorZakfLh7myIfQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z+ifqaxKWUPnEeUgUGnotji4zwpQVOjdmyVFkcIjfwtZgonLYzPFVBkmQjUvMXU/+ /ue3rq15HH+7K1OWhM6TA28Ov7rk+w8lPZK/Sh7dxHzqRmje7H3qhaKF57G9dsbYUH +SQ+IR/hds3xmOn2SqsrnjR3pcvspNYV9SRBAp6CjGf/IFwt4SIcuUxZLYSbnqKpgy vHzsNInq/jNswfNQWp4YY7w/Tx78TU28L0/mFVx8IEx3fzPay20l6s53CZNJsax7io EduAfXar313iBwicFlGx8AjkNMHMAY3qlWN3YbP8+L4+0eCSLoXnV8rkA0nAb9viL3 3wgLh0+itynYw== Received: by mail-lf1-f69.google.com with SMTP id b35-20020a0565120ba300b0042604bb4857so4200228lfv.19 for ; Tue, 28 Dec 2021 08:43:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5OFsFqaSGsjPv5sIh7p3C4dzVLnGHorZakfLh7myIfQ=; b=0c+Ruy6rHn0fenLgw05b35rH3mUG3PkKP9beI66hk1nMiVOnGN7lni1RZwnL2hVyik iWXTkltiNB8vTqrai3YF4Qva8t0e9X0VWJuuk64OjlaZClGWa//fL0FiPIU8UeSkJUJ7 WR+W6+h7+jxlJSU4UeEYXRoFGcw2gSy+sW/x6WML6OsEpOiyXw86H53z5RuEn58oSXkw 2lQu1LU5pJMIr/+Xem2IVpwROu/C+hnZO2YIQ2wV/JyGh0LUkHETfVMBR8hUbMQTJmIX OIjSrgFsFq+BpTUWvIcnGlsvZDeAtVmlhgh37fprRowYy4eueC0PCoaJHRfywVmJmRL9 n1Qg== X-Gm-Message-State: AOAM530685SqYcoFca0BrXw0u6ZF5/Ew8ADAvK+coAuYHHEO8rt46qlw jmb4pUzP8GRBfzY/HXtlYvH8JqiJOjn5YVTmHxD9iV2pRNeWb0Cuc/tMbpepn2yB1QPw3ShY6pa T58LBIvnWhHBHhDcI2Ziw9Ds5FsJ6f+9wv8ZwkPI2II49yh4H X-Received: by 2002:a19:7902:: with SMTP id u2mr19792375lfc.512.1640709791948; Tue, 28 Dec 2021 08:43:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQ/rn6qxMTI3Tjk19c1umU0DPNGMBgrso02fway7KgHERuxbrNFI343SLKCOLNwxZHtJmq2g== X-Received: by 2002:a19:7902:: with SMTP id u2mr19792363lfc.512.1640709791801; Tue, 28 Dec 2021 08:43:11 -0800 (PST) Received: from krzk-bin.lan (89-77-68-124.dynamic.chello.pl. [89.77.68.124]) by smtp.gmail.com with ESMTPSA id u5sm968701lja.36.2021.12.28.08.43.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Dec 2021 08:43:11 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Javier Martinez Canillas , Liam Girdwood , Mark Brown , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/3] ARM: dts: exynos: drop unsupported MAX77802 regulators on Odroid XU Date: Tue, 28 Dec 2021 17:43:03 +0100 Message-Id: <20211228164305.35877-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211228164305.35877-1-krzysztof.kozlowski@canonical.com> References: <20211228164305.35877-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The numbering of regulators is not continuous and the MAX77802 does not support regulators LDO16, LDO22 and LDO31. Signed-off-by: Krzysztof Kozlowski --- arch/arm/boot/dts/exynos5410-odroidxu.dts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/arch/arm/boot/dts/exynos5410-odroidxu.dts b/arch/arm/boot/dts/exynos5410-odroidxu.dts index 884fef55836c..356d5f15dbb6 100644 --- a/arch/arm/boot/dts/exynos5410-odroidxu.dts +++ b/arch/arm/boot/dts/exynos5410-odroidxu.dts @@ -394,10 +394,6 @@ ldo15_reg: LDO15 { regulator-always-on; }; - ldo16_reg: LDO16 { - regulator-name = "ldo16"; - }; - ldo17_reg: LDO17 { regulator-name = "cam_sensor_core"; regulator-min-microvolt = <1200000>; @@ -427,10 +423,6 @@ ldo21_reg: LDO21 { regulator-max-microvolt = <2850000>; }; - ldo22_reg: LDO22 { - regulator-name = "ldo22"; - }; - ldo23_reg: LDO23 { regulator-name = "dp_p3v3"; regulator-min-microvolt = <3300000>; @@ -477,10 +469,6 @@ ldo30_reg: LDO30 { regulator-always-on; }; - ldo31_reg: LDO31 { - regulator-name = "ldo31"; - }; - /* On revisions with ti,ina231 this is sensor VS */ ldo32_reg: LDO32 { regulator-name = "vs_power_meter"; From patchwork Tue Dec 28 16:43:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 529078 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C7F7C433F5 for ; Tue, 28 Dec 2021 16:43:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236067AbhL1QnR (ORCPT ); Tue, 28 Dec 2021 11:43:17 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:49424 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235800AbhL1QnQ (ORCPT ); Tue, 28 Dec 2021 11:43:16 -0500 Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id DE7313F163 for ; Tue, 28 Dec 2021 16:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1640709794; bh=PXpSK7Gk+6/hcCAmVYvr/ndq+kAoTS25mp02X+y/rRU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nj87sEz1X7r0Nsn9q+nQiddJpc2KCsaRp2IeRSHDqK2FgBixTDIyGTgMmBK/amDns HNMAovHFcEDJeCLxqOMRyF13JJnIx3PAWX0rQrol4q80c0ou0L/s9FZ4qocscbdbJl Jtw5CShnV12uABRm28N/QXUbTft+ePcuhOaG4gVVLOQt9ZcJJ8IGEGILr/qeBICQZy H9VBTj1roEhg6m3DWJs+kUOsIXrFXJyl6WVAPks8cIAN9D2R5cBelbT5oNb86nDRNv SUqOynqWW5SCPzb8ohdGgeq4v6rBr5ReBWDKY3ds4nSkybklzw1lEnOQ/YnEmdwxil jfT5tSglglGrA== Received: by mail-lj1-f197.google.com with SMTP id a29-20020a2e7f1d000000b0022d7438b7e4so6189034ljd.15 for ; Tue, 28 Dec 2021 08:43:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PXpSK7Gk+6/hcCAmVYvr/ndq+kAoTS25mp02X+y/rRU=; b=UHG5ts+V2sTC6XacUjIC5d+BDSc+CfqWujQtYen+eWoPmLM7XLy8MHQjUN5oeWddvi 9RlZYbn482qnauPi1CYaGNodZDQHqZNLkfeFMoSHYQI2KHoXdfCOHQ8p0buvbqmAX8Ll z2G7q7QYgvzNAgw7L8hR0Bm2FZOJxDh8CG60j4GGr/1CJ03/0e96jBIZ3e0uT/Cz/B5G 8h16Nb/qWv8m2POpKKM0vyo65ZoF0JKHz0UuJqMW8SkMs0Vd+IvkDW9VrpmqETkaujfo IeRTVc/h3Q7KRYjwx02LelVzlKOJ0GdpL9CHnxx+HOhiApUFAQO9lCf9bp3QQp2adw/g IhrA== X-Gm-Message-State: AOAM533UH/oupAYvEAwEGb2t/9azaeaw/nvVhJfLiexdKJYnvKCUIqjs gMsRs2W3kkLFwCy7FeIJWc+zPHNuAz6/JtyQGAv/iNBJpXvSjvNU5vIWfzFCehz026myTeh9CMQ 3Dveyo2tION36a2UkeWEZcwlfXPX5AYzOL3mmPuJrcYCxLGXM X-Received: by 2002:a19:8c4b:: with SMTP id i11mr19428261lfj.81.1640709794173; Tue, 28 Dec 2021 08:43:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMkrO0c6Qktsnh6Bxss/T9capyoRZHqzyXtd+q665OhnNCDR8GiSZQgCF8AWCfX+snS4KGKw== X-Received: by 2002:a19:8c4b:: with SMTP id i11mr19428239lfj.81.1640709793922; Tue, 28 Dec 2021 08:43:13 -0800 (PST) Received: from krzk-bin.lan (89-77-68-124.dynamic.chello.pl. [89.77.68.124]) by smtp.gmail.com with ESMTPSA id u5sm968701lja.36.2021.12.28.08.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Dec 2021 08:43:12 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Javier Martinez Canillas , Liam Girdwood , Mark Brown , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/3] regulator: dt-bindings: maxim,max77802: Convert to dtschema Date: Tue, 28 Dec 2021 17:43:04 +0100 Message-Id: <20211228164305.35877-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211228164305.35877-1-krzysztof.kozlowski@canonical.com> References: <20211228164305.35877-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Convert the regulators of Maxim MAX77802 PMIC to DT schema format. Signed-off-by: Krzysztof Kozlowski --- .../bindings/regulator/max77802.txt | 111 ---------------- .../bindings/regulator/maxim,max77802.yaml | 118 ++++++++++++++++++ 2 files changed, 118 insertions(+), 111 deletions(-) delete mode 100644 Documentation/devicetree/bindings/regulator/max77802.txt create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77802.yaml diff --git a/Documentation/devicetree/bindings/regulator/max77802.txt b/Documentation/devicetree/bindings/regulator/max77802.txt deleted file mode 100644 index b82943d83677..000000000000 --- a/Documentation/devicetree/bindings/regulator/max77802.txt +++ /dev/null @@ -1,111 +0,0 @@ -Binding for Maxim MAX77802 regulators - -This is a part of device tree bindings of MAX77802 multi-function device. -More information can be found in bindings/mfd/max77802.txt file. - -The MAX77802 PMIC has 10 high-efficiency Buck and 32 Low-dropout (LDO) -regulators that can be controlled over I2C. - -Following properties should be present in main device node of the MFD chip. - -Optional properties: -- inb1-supply: The input supply for BUCK1 -- inb2-supply: The input supply for BUCK2 -- inb3-supply: The input supply for BUCK3 -- inb4-supply: The input supply for BUCK4 -- inb5-supply: The input supply for BUCK5 -- inb6-supply: The input supply for BUCK6 -- inb7-supply: The input supply for BUCK7 -- inb8-supply: The input supply for BUCK8 -- inb9-supply: The input supply for BUCK9 -- inb10-supply: The input supply for BUCK10 -- inl1-supply: The input supply for LDO8 and LDO15 -- inl2-supply: The input supply for LDO17, LDO27, LDO30 and LDO35 -- inl3-supply: The input supply for LDO3, LDO5, LDO6 and LDO7 -- inl4-supply: The input supply for LDO10, LDO11, LDO13 and LDO14 -- inl5-supply: The input supply for LDO9 and LDO19 -- inl6-supply: The input supply for LDO4, LDO21, LDO24 and LDO33 -- inl7-supply: The input supply for LDO18, LDO20, LDO28 and LDO29 -- inl9-supply: The input supply for LDO12, LDO23, LDO25, LDO26, LDO32 and LDO34 -- inl10-supply: The input supply for LDO1 and LDO2 - -Optional nodes: -- regulators : The regulators of max77802 have to be instantiated - under subnode named "regulators" using the following format. - - regulator-name { - standard regulator constraints.... - }; - refer Documentation/devicetree/bindings/regulator/regulator.txt - -The regulator node name should be initialized with a string to get matched -with their hardware counterparts as follow. The valid names are: - - -LDOn : for LDOs, where n can lie in ranges 1-15, 17-21, 23-30 - and 32-35. - example: LDO1, LDO2, LDO35. - -BUCKn : for BUCKs, where n can lie in range 1 to 10. - example: BUCK1, BUCK5, BUCK10. - -The max77802 regulator supports two different operating modes: Normal and Low -Power Mode. Some regulators support the modes to be changed at startup or by -the consumers during normal operation while others only support to change the -mode during system suspend. The standard regulator suspend states binding can -be used to configure the regulator operating mode. - -The regulators that support the standard "regulator-initial-mode" property, -changing their mode during normal operation are: LDOs 1, 3, 20 and 21. - -The possible values for "regulator-initial-mode" and "regulator-mode" are: - 1: Normal regulator voltage output mode. - 3: Low Power which reduces the quiescent current down to only 1uA - -The valid modes list is defined in the dt-bindings/regulator/maxim,max77802.h -header and can be included by device tree source files. - -The standard "regulator-mode" property can only be used for regulators that -support changing their mode to Low Power Mode during suspend. These regulators -are: BUCKs 2-4 and LDOs 1-35. Also, it only takes effect if the regulator has -been enabled for the given suspend state using "regulator-on-in-suspend" and -has not been disabled for that state using "regulator-off-in-suspend". - -Example: - - max77802@9 { - compatible = "maxim,max77802"; - interrupt-parent = <&wakeup_eint>; - interrupts = <26 0>; - reg = <0x09>; - #address-cells = <1>; - #size-cells = <0>; - - inb1-supply = <&parent_reg>; - - regulators { - ldo1_reg: LDO1 { - regulator-name = "vdd_1v0"; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - regulator-always-on; - regulator-initial-mode = ; - }; - - ldo11_reg: LDO11 { - regulator-name = "vdd_ldo11"; - regulator-min-microvolt = <1900000>; - regulator-max-microvolt = <1900000>; - regulator-always-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-mode = ; - }; - }; - - buck1_reg: BUCK1 { - regulator-name = "vdd_mif"; - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1300000>; - regulator-always-on; - regulator-boot-on; - }; - }; diff --git a/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml b/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml new file mode 100644 index 000000000000..01e1c40685ff --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml @@ -0,0 +1,118 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/maxim,max77802.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX77802 Power Management IC regulators + +maintainers: + - Javier Martinez Canillas + - Krzysztof Kozlowski + +description: | + This is a part of device tree bindings for Maxim MAX77802 Power Management + Integrated Circuit (PMIC). + + The Maxim MAX77686 provides 10 high-efficiency Buck and 32 Low-DropOut (LDO) + regulators. + + See also Documentation/devicetree/bindings/mfd/maxim,max77802.yaml for + additional information and example. + + Certain regulators support "regulator-initial-mode" and "regulator-mode". + The valid modes list is defined in the dt-bindings/regulator/maxim,max77802.h + and their meaning is: + 1 - Normal regulator voltage output mode. + 3 - Low Power which reduces the quiescent current down to only 1uA + + The standard "regulator-mode" property can only be used for regulators that + support changing their mode to Low Power Mode during suspend. These + regulators are: bucks 2-4 and LDOs 1-35. Also, it only takes effect if the + regulator has been enabled for the given suspend state using + "regulator-on-in-suspend" and has not been disabled for that state using + "regulator-off-in-suspend". + +patternProperties: + # LDO1, LDO3, LDO20, LDO21 + "^LDO([13]|2[01])$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + LDOs supporting the regulator-initial-mode property and changing their + mode during normal operation. + + properties: + regulator-initial-mode: true + + patternProperties: + regulator-state-(standby|mem|disk): + type: object + properties: + regulator-mode: true + + required: + - regulator-name + + # LDO2, LDO4-15, LDO17-19, LDO23-30, LDO32-35 + "^LDO([24-9]|1[0-5789]|2[3-9]|3[02345])$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + LDOs supporting the regulator-mode property (changing mode to Low Power + Mode during suspend). + + properties: + regulator-initial-mode: false + + patternProperties: + regulator-state-(standby|mem|disk): + type: object + properties: + regulator-mode: true + + required: + - regulator-name + + # buck2-4 + "^BUCK[2-4]$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + bucks supporting the regulator-mode property (changing mode to Low Power + Mode during suspend). + + properties: + regulator-initial-mode: false + + patternProperties: + regulator-state-(standby|mem|disk): + type: object + properties: + regulator-mode: true + + required: + - regulator-name + + # buck1, buck5-10 + "^BUCK([15-9]|10)$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + properties: + regulator-initial-mode: false + + patternProperties: + regulator-state-(standby|mem|disk): + type: object + properties: + regulator-mode: false + + required: + - regulator-name + +additionalProperties: false From patchwork Tue Dec 28 16:43:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 528785 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D240DC433F5 for ; Tue, 28 Dec 2021 16:43:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235757AbhL1QnU (ORCPT ); Tue, 28 Dec 2021 11:43:20 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:49440 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236122AbhL1QnR (ORCPT ); Tue, 28 Dec 2021 11:43:17 -0500 Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 3694E3FFD2 for ; Tue, 28 Dec 2021 16:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1640709796; bh=LWpKLoE0BQYAlN39yeK9QxixT3GtLXrh/TOWUi443sk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UD10wK1l3fra7k2cRA4axQyRx3re7NECH5jbylFxBuwi2GPChUwJ8JArKF/S3/DAz 20iJK42Qfx5KzKRN1HoLspdqGipqnrE9j2Tv5zk/D70gXjE+8DHETcjWFzeHHGQHzF aoSCQbJc94wGtKlg0oHlEKUh+lqmMPA9pS/9UkSP4vI4xkGHo5Oj0MxvFL9CBLF/lG /VcO463VK3Au+LITw7RUQeX5tgxxh86hzd9VnPT9gGr5F+lLo4UNxLJ2/S9H2/u/fS UOmXq2yGgstIjT29Z6oLeKnF8wVnXv4tZp91njUYNbiRaOECXodynEapW3fyJJOtk2 nY6KUSkKMJXCQ== Received: by mail-lj1-f199.google.com with SMTP id l6-20020a2e8686000000b0022d9a4d18d5so5217739lji.19 for ; Tue, 28 Dec 2021 08:43:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LWpKLoE0BQYAlN39yeK9QxixT3GtLXrh/TOWUi443sk=; b=rfljQG6KFVYmRZVGuvUgdtJI6ojHHXz0M3BLQphwiFjNtjjUgpbtknTEmoeOTc5aGp kptfb2LSnD+XWOEy7wazPWoNZ9kImN0pEsFlFLq4fVPraYpHrnQqHyX17UBpLVXOm3Zt 2R3J+WZ6OO0xoZeRktikPedtXpYsZyZA718qMVlOG0BLM13Ybj5T/1jVk9DgWuZ2ZPRg LQ1Pbs7pN4AYVSfbxE+gh6hbSnX91LC/4ANOjJg9foK1GlSXPcRah7EBiaMhvQ1kyagy go3sUdS6qmxLqIy6A7d3xaA8+zd5GND8T8z0X9uEBhaeDzGzX6iwHQN8XXe8jqZl0noj XLBA== X-Gm-Message-State: AOAM531dH8hpYOOjcSetFoO/odSM4t98csXGzgSwB7ezwqTvLgyMhsGT Cb26hH8/X2MV8QjkELdins4+9ZKW6RBcl42twDGQsk2hBbmIiIjxVBCUBy/jlNk9EQTWMk3P72K IC/gQtoFOYSID6FrEuoG4AAKLRvM0l0AXj5TOw7s0hwx8dKmK X-Received: by 2002:a19:dc57:: with SMTP id f23mr19029406lfj.245.1640709795544; Tue, 28 Dec 2021 08:43:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqseq4Sp84ozRpaHHxcVhWgWfB1NTN6A3uTXObXh7HWRmTjja6ZjpvU7bvJhugOhfxG2UJVg== X-Received: by 2002:a19:dc57:: with SMTP id f23mr19029393lfj.245.1640709795305; Tue, 28 Dec 2021 08:43:15 -0800 (PST) Received: from krzk-bin.lan (89-77-68-124.dynamic.chello.pl. [89.77.68.124]) by smtp.gmail.com with ESMTPSA id u5sm968701lja.36.2021.12.28.08.43.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Dec 2021 08:43:14 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Javier Martinez Canillas , Liam Girdwood , Mark Brown , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/3] dt-bindings: mfd: maxim,max77802: Convert to dtschema Date: Tue, 28 Dec 2021 17:43:05 +0100 Message-Id: <20211228164305.35877-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211228164305.35877-1-krzysztof.kozlowski@canonical.com> References: <20211228164305.35877-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Convert the MFD part of Maxim MAX77802 PMIC to DT schema format. The example DTS was copied from existing DTS (exynos5800-peach-pi.dts), so keep the license as GPL-2.0-only. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- .../devicetree/bindings/mfd/max77802.txt | 25 --- .../bindings/mfd/maxim,max77802.yaml | 194 ++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 195 insertions(+), 26 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/max77802.txt create mode 100644 Documentation/devicetree/bindings/mfd/maxim,max77802.yaml diff --git a/Documentation/devicetree/bindings/mfd/max77802.txt b/Documentation/devicetree/bindings/mfd/max77802.txt deleted file mode 100644 index 09decac20d91..000000000000 --- a/Documentation/devicetree/bindings/mfd/max77802.txt +++ /dev/null @@ -1,25 +0,0 @@ -Maxim MAX77802 multi-function device - -The Maxim MAX77802 is a Power Management IC (PMIC) that contains 10 high -efficiency Buck regulators, 32 Low-DropOut (LDO) regulators used to power -up application processors and peripherals, a 2-channel 32kHz clock outputs, -a Real-Time-Clock (RTC) and a I2C interface to program the individual -regulators, clocks outputs and the RTC. - -Bindings for the built-in 32k clock generator block and -regulators are defined in ../clk/maxim,max77802.txt and -../regulator/max77802.txt respectively. - -Required properties: -- compatible : Must be "maxim,max77802" -- reg : Specifies the I2C slave address of PMIC block. -- interrupts : I2C device IRQ line connected to the main SoC. - -Example: - - max77802: pmic@9 { - compatible = "maxim,max77802"; - interrupt-parent = <&intc>; - interrupts = <26 IRQ_TYPE_NONE>; - reg = <0x09>; - }; diff --git a/Documentation/devicetree/bindings/mfd/maxim,max77802.yaml b/Documentation/devicetree/bindings/mfd/maxim,max77802.yaml new file mode 100644 index 000000000000..26f49fbace18 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/maxim,max77802.yaml @@ -0,0 +1,194 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/maxim,max77802.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX77802 Power Management IC + +maintainers: + - Javier Martinez Canillas + - Krzysztof Kozlowski + +description: | + This is a part of device tree bindings for Maxim MAX77802 Power Management + Integrated Circuit (PMIC). + + The Maxim MAX77802 is a Power Management IC which includes voltage and + current regulators (10 high efficiency Buck regulators and 32 Low-DropOut + (LDO)), RTC and clock outputs. + + The MAX77802 provides two 32.768khz clock outputs that can be controlled + (gated/ungated) over I2C. The clock IDs are defined as preprocessor macros + in dt-bindings/clock/maxim,max77802.h. + +properties: + compatible: + const: maxim,max77802 + + '#clock-cells': + const: 1 + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + regulators: + $ref: ../regulator/maxim,max77802.yaml + description: + List of child nodes that specify the regulators. + + inb1-supply: + description: Power supply for buck1 + inb2-supply: + description: Power supply for buck2 + inb3-supply: + description: Power supply for buck3 + inb4-supply: + description: Power supply for buck4 + inb5-supply: + description: Power supply for buck5 + inb6-supply: + description: Power supply for buck6 + inb7-supply: + description: Power supply for buck7 + inb8-supply: + description: Power supply for buck8 + inb9-supply: + description: Power supply for buck9 + inb10-supply: + description: Power supply for buck10 + + inl1-supply: + description: Power supply for LDO8, LDO15 + inl2-supply: + description: Power supply for LDO17, LDO27, LDO30, LDO35 + inl3-supply: + description: Power supply for LDO3, LDO5, LDO7, LDO7 + inl4-supply: + description: Power supply for LDO10, LDO11, LDO13, LDO14 + inl5-supply: + description: Power supply for LDO9, LDO19 + inl6-supply: + description: Power supply for LDO4, LDO21, LDO24, LDO33 + inl7-supply: + description: Power supply for LDO18, LDO20, LDO28, LDO29 + inl9-supply: + description: Power supply for LDO12, LDO23, LDO25, LDO26, LDO32, LDO34 + inl10-supply: + description: Power supply for LDO1, LDO2 + + wakeup-source: true + +required: + - compatible + - '#clock-cells' + - reg + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@9 { + compatible = "maxim,max77802"; + interrupt-parent = <&gpx3>; + interrupts = <1 IRQ_TYPE_NONE>; + pinctrl-names = "default"; + pinctrl-0 = <&max77802_irq>, <&pmic_selb>, + <&pmic_dvs_1>, <&pmic_dvs_2>, <&pmic_dvs_3>; + wakeup-source; + reg = <0x9>; + #clock-cells = <1>; + + inb1-supply = <&tps65090_dcdc2>; + inb2-supply = <&tps65090_dcdc1>; + inb3-supply = <&tps65090_dcdc2>; + inb4-supply = <&tps65090_dcdc2>; + inb5-supply = <&tps65090_dcdc1>; + inb6-supply = <&tps65090_dcdc2>; + inb7-supply = <&tps65090_dcdc1>; + inb8-supply = <&tps65090_dcdc1>; + inb9-supply = <&tps65090_dcdc1>; + inb10-supply = <&tps65090_dcdc1>; + + inl1-supply = <&buck5_reg>; + inl2-supply = <&buck7_reg>; + inl3-supply = <&buck9_reg>; + inl4-supply = <&buck9_reg>; + inl5-supply = <&buck9_reg>; + inl6-supply = <&tps65090_dcdc2>; + inl7-supply = <&buck9_reg>; + inl9-supply = <&tps65090_dcdc2>; + inl10-supply = <&buck7_reg>; + + regulators { + BUCK1 { + regulator-name = "vdd_mif"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1300000>; + regulator-always-on; + regulator-boot-on; + regulator-ramp-delay = <12500>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + BUCK2 { + regulator-name = "vdd_arm"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + regulator-boot-on; + regulator-ramp-delay = <12500>; + regulator-coupled-with = <&buck3_reg>; + regulator-coupled-max-spread = <300000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + // ... + + BUCK10 { + regulator-name = "vdd_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + LDO1 { + regulator-name = "vdd_1v0"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-initial-mode = ; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = ; + }; + }; + + // ... + + LDO35 { + regulator-name = "ldo_35"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 5ea5655a29c3..b5e4f14f6768 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11666,7 +11666,7 @@ MAXIM MAX77802 PMIC REGULATOR DEVICE DRIVER M: Javier Martinez Canillas L: linux-kernel@vger.kernel.org S: Supported -F: Documentation/devicetree/bindings/*/*max77802.txt +F: Documentation/devicetree/bindings/*/*max77802.yaml F: drivers/regulator/max77802-regulator.c F: include/dt-bindings/*/*max77802.h