Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1215313rda; Mon, 23 Oct 2023 06:14:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8qEo8DDxBla/JdcqiQoz6btK5wyjkQ5MnpFgY+S/ee5l2Al30b0NjdRhHJ3qDaGMFAD7u X-Received: by 2002:a05:6359:7041:b0:168:e453:c345 with SMTP id ua1-20020a056359704100b00168e453c345mr1655010rwb.2.1698066885372; Mon, 23 Oct 2023 06:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698066885; cv=none; d=google.com; s=arc-20160816; b=WEKZ5jTeqykt4QGKup7Q9lJCD+e+J/qp6sYY58DPF34sXpgnJnbGch/mbXfWI5xljE UqS+4MdqOeMoUUbRw2cz7iTP4+seKJ47mnhq77/PenJ3Rtrbj/IQz0iu5jaE4ryiJBX9 bZXu2AOY9Tj4URureq0jH1UpUd4enwCJJQGZ5EuElXw32WcQRR89+BeL71k3zTOBpgwV W52EMqHxDfFVdFrkVtmezojOzdh0rDSssa29HWlOTMNGgle6418vMbFNzPjOYqMtxm+z +pUE9Enq/bbCMt+BWthgGnUgfV7TCsgtkwVOEXyJQoi9crraBlLs1iffVy1RCLTUGUxo uTdA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=voYVjzvSWWgdDfyYHgnrYOstCFqbfwwSR2KRWOVgcMM=; fh=mKqIoVJpl1otVM5lHtTpCpA2Jq2lmMINiD8CjfSMB7c=; b=G3iIQs2fLZXX2THCPHyWx+aZ1GacEAJfMEvsS7GGZrjHt8A60m2pA5FMQSwqrWyTFB Nu3eQWf658fD4o5f0BEY801xHkh93p8WCuVNj+A0IoLHLD5eSYEUNA0BsJiw4vrBH5XG 9sUzraDkgms4yVEtK6E3X/EoBcVcoPPHTk6lEISK8Z0tT8lfT/VMrRxorJ1kk6QKsCVT CutPF3EgB237cZMy+yli5126ZD+ypBJGg2Kp7vcUT0zde7zFZ8E5lpgK8+RNt806hXMo ba1Fv7ZGEqlNk5U/BPy8Ja8SgdLEA7isANSAInlYsOXYeTCZRn8ncwXcv6NRcu22Tp0c Fz/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Bf7hu9t8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id r20-20020a6560d4000000b005ac8d44bad4si6066199pgv.592.2023.10.23.06.14.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 06:14:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Bf7hu9t8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id DB5838080EDF; Mon, 23 Oct 2023 06:14:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229835AbjJWNOZ (ORCPT + 99 others); Mon, 23 Oct 2023 09:14:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbjJWNOY (ORCPT ); Mon, 23 Oct 2023 09:14:24 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 744E1C4; Mon, 23 Oct 2023 06:14:22 -0700 (PDT) Received: from mercury (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id E0AC26606F51; Mon, 23 Oct 2023 14:14:20 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1698066861; bh=pj3VhyfFH6ErSwBdbhZsBJKn1hmYCYEaTcjA/2LT/4g=; h=From:To:Cc:Subject:Date:From; b=Bf7hu9t8ds8F3W5z5d9lLLMukJmnnj0UBlYLzZaquz4PldMp80lXdxA2f+OFgIxF7 QlCHR3uDawan1u+7Zhnsv52R66TxmULRndtqx0foRoWGoeeqmYFmH/sUx9w/3KhYNJ XiNJvLzFWR5AKxr2sQebqbHQ2WNj6NneH11K6+jw0L1TaMnHzDIwR3X6W84UeYd9g5 /wqfCYMzz0yMazh2wpVjO85ukLOEAi6aVJZ/3UZo04ucMsltTmY1KMqsGH4hMP38Gx zPcrZdOONFRtguh/ArPszK4DGHwozxYi2G13HFPhVu+dr/spvObKUdO0YvnfwbV70U fe1zgm87hcz9Q== Received: by mercury (Postfix, from userid 1000) id 7CBA3106052D; Mon, 23 Oct 2023 15:14:18 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel , Lee Jones Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , Rob Herring Subject: [PATCH v4] dt-bindings: mfd: max8925: Convert to DT schema format Date: Mon, 23 Oct 2023 15:12:20 +0200 Message-ID: <20231023131409.1796451-1-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 23 Oct 2023 06:14:42 -0700 (PDT) Convert the binding to DT schema format. The sub-functions of this MFD device do not have their own compatible string and are thus described directly in the MFD binding document after being converted to YAML. Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel --- Hi Lee, As mentioned in previous version, please merge through your tree. No need for an immutable branch, since further fixes to the binding will go through your tree. Changes since PATCHv3: * https://lore.kernel.org/all/20230930202743.214631-1-sebastian.reichel@collabora.com/ * Collected Acked-by from Rob Herring * Removed "power:" from patch subject * Fix mail address from Lee Jones Changes since PATCHv2: * https://lore.kernel.org/all/20230922233142.1479677-1-sebastian.reichel@collabora.com/ * Add unevaluatedProperties: false to regulators subnode (Krzysztof Kozlowski) * Use "pmic" for nodename (Krzysztof Kozlowski) Changes since PATCHv1: * https://lore.kernel.org/all/20210413153407.GA1707829@robh.at.kernel.org/ * Update License to GPL OR BSD * Add missing type references pointed out by Rob --- .../leds/backlight/max8925-backlight.txt | 10 -- .../devicetree/bindings/mfd/max8925.txt | 64 -------- .../bindings/mfd/maxim,max8925.yaml | 145 ++++++++++++++++++ .../bindings/power/supply/max8925_battery.txt | 18 --- 4 files changed, 145 insertions(+), 92 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/backlight/max8925-backlight.txt delete mode 100644 Documentation/devicetree/bindings/mfd/max8925.txt create mode 100644 Documentation/devicetree/bindings/mfd/maxim,max8925.yaml delete mode 100644 Documentation/devicetree/bindings/power/supply/max8925_battery.txt diff --git a/Documentation/devicetree/bindings/leds/backlight/max8925-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/max8925-backlight.txt deleted file mode 100644 index b4cffdaa4137..000000000000 --- a/Documentation/devicetree/bindings/leds/backlight/max8925-backlight.txt +++ /dev/null @@ -1,10 +0,0 @@ -88pm860x-backlight bindings - -Optional properties: - - maxim,max8925-dual-string: whether support dual string - -Example: - - backlights { - maxim,max8925-dual-string = <0>; - }; diff --git a/Documentation/devicetree/bindings/mfd/max8925.txt b/Documentation/devicetree/bindings/mfd/max8925.txt deleted file mode 100644 index 4f0dc6638e5e..000000000000 --- a/Documentation/devicetree/bindings/mfd/max8925.txt +++ /dev/null @@ -1,64 +0,0 @@ -* Maxim max8925 Power Management IC - -Required parent device properties: -- compatible : "maxim,max8925" -- reg : the I2C slave address for the max8925 chip -- interrupts : IRQ line for the max8925 chip -- interrupt-controller: describes the max8925 as an interrupt - controller (has its own domain) -- #interrupt-cells : should be 1. - - The cell is the max8925 local IRQ number - -Optional parent device properties: -- maxim,tsc-irq: there are 2 IRQ lines for max8925, one is indicated in - interrupts property, the other is indicated here. - -max8925 consists of a large and varied group of sub-devices: - -Device Supply Names Description ------- ------------ ----------- -max8925-onkey : : On key -max8925-rtc : : RTC -max8925-regulator : : Regulators -max8925-backlight : : Backlight -max8925-touch : : Touchscreen -max8925-power : : Charger - -Example: - - pmic: max8925@3c { - compatible = "maxim,max8925"; - reg = <0x3c>; - interrupts = <1>; - interrupt-parent = <&intcmux4>; - interrupt-controller; - #interrupt-cells = <1>; - maxim,tsc-irq = <0>; - - regulators { - SDV1 { - regulator-min-microvolt = <637500>; - regulator-max-microvolt = <1425000>; - regulator-boot-on; - regulator-always-on; - }; - - LDO1 { - regulator-min-microvolt = <750000>; - regulator-max-microvolt = <3900000>; - regulator-boot-on; - regulator-always-on; - }; - - }; - backlight { - maxim,max8925-dual-string = <0>; - }; - charger { - batt-detect = <0>; - topoff-threshold = <1>; - fast-charge = <7>; - no-temp-support = <0>; - no-insert-detect = <0>; - }; - }; diff --git a/Documentation/devicetree/bindings/mfd/maxim,max8925.yaml b/Documentation/devicetree/bindings/mfd/maxim,max8925.yaml new file mode 100644 index 000000000000..86dd810851ab --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/maxim,max8925.yaml @@ -0,0 +1,145 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/maxim,max8925.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MAX8925 PMIC from Maxim Integrated. + +maintainers: + - Lee Jones + +properties: + compatible: + const: maxim,max8925 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 1 + description: + The cell is the IRQ number + + maxim,tsc-irq: + description: second interrupt from max8925 + $ref: /schemas/types.yaml#/definitions/uint32 + + regulators: + type: object + + patternProperties: + "^SDV[1-3]$|^LDO[1-9]$|^LDO1[0-9]$|^LDO20$": + description: regulator configuration for SDV1-3 and LDO1-20 + $ref: /schemas/regulator/regulator.yaml + unevaluatedProperties: false + + additionalProperties: false + + backlight: + type: object + properties: + maxim,max8925-dual-string: + description: set to 1 to support dual string + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + default: 0 + + additionalProperties: false + + charger: + type: object + properties: + batt-detect: + description: set to 1 if battery detection via ID pin is supported + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + default: 0 + + topoff-threshold: + description: charging current in topoff mode, configures bits 5-6 in CHG_CNTL1 + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 3 + default: 0 + + fast-charge: + description: set charging current in fast mode, configures bits 0-3 in CHG_CNTL1 + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + default: 0 + + no-temp-support: + description: set to 1 if temperature sensing is not supported + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + default: 0 + + no-insert-detect: + description: set to 1 if AC detection is not supported + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + default: 0 + + additionalProperties: false + +required: + - compatible + - reg + - interrupts + - interrupt-controller + - "#interrupt-cells" + - regulators + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@3c { + compatible = "maxim,max8925"; + reg = <0x3c>; + interrupts = <1>; + interrupt-parent = <&intcmux4>; + interrupt-controller; + #interrupt-cells = <1>; + maxim,tsc-irq = <0>; + + regulators { + SDV1 { + regulator-min-microvolt = <637500>; + regulator-max-microvolt = <1425000>; + regulator-boot-on; + regulator-always-on; + }; + + LDO1 { + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <3900000>; + regulator-boot-on; + regulator-always-on; + }; + }; + + backlight { + maxim,max8925-dual-string = <0>; + }; + + charger { + batt-detect = <0>; + topoff-threshold = <1>; + fast-charge = <7>; + no-temp-support = <0>; + no-insert-detect = <0>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/power/supply/max8925_battery.txt b/Documentation/devicetree/bindings/power/supply/max8925_battery.txt deleted file mode 100644 index d7e3e0c0f71d..000000000000 --- a/Documentation/devicetree/bindings/power/supply/max8925_battery.txt +++ /dev/null @@ -1,18 +0,0 @@ -max8925-battery bindings -~~~~~~~~~~~~~~~~ - -Optional properties : - - batt-detect: whether support battery detect - - topoff-threshold: set charging current in topoff mode - - fast-charge: set charging current in fast mode - - no-temp-support: whether support temperature protection detect - - no-insert-detect: whether support insert detect - -Example: - charger { - batt-detect = <0>; - topoff-threshold = <1>; - fast-charge = <7>; - no-temp-support = <0>; - no-insert-detect = <0>; - }; -- 2.42.0