From mboxrd@z Thu Jan 1 00:00:00 1970 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 281D6C433FE for ; Wed, 2 Nov 2022 08:57:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231175AbiKBI5r (ORCPT ); Wed, 2 Nov 2022 04:57:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231178AbiKBI5q (ORCPT ); Wed, 2 Nov 2022 04:57:46 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5316A27DFE for ; Wed, 2 Nov 2022 01:57:43 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id j15so23482329wrq.3 for ; Wed, 02 Nov 2022 01:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; 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=nPHDXBenpQy2nAswrRWBg2PHq6YhV0vGg41gmHXpPC8=; b=VW+EmARquWRj5bHCWN8loD6Bdyi+uhqfvSYeZBLQ1wjbiT3BydjhjxewKIkMJDWXOU wm0LVvILwahrJclM2AWhkeGZxF6V1qXA97M/z7cGq0VdfiwCuAq8wAA4DdSrwxN9PNzu h+ECqWJpM52nxcXpi8xQeM7gruxjIS0Zc0jhCW47PA9m5DJMtMUZF0gUx6LcwP0EerGA +qK3WSDOvG5LW/wWTHjQCXipcZgcEYYn1P1Jl9JrMTOr97ubzQ1y7FMTv8BZp6Jig8BY tXNW2BWZGBw1TXZaC/QVfUfIw80x4dczvR0+yPLEzJW+wlh6d8h1BqhRZvsZyIjiEzw8 Sx0Q== 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:message-id:reply-to; bh=nPHDXBenpQy2nAswrRWBg2PHq6YhV0vGg41gmHXpPC8=; b=Ou7QizpKOUZ8Lqk9wHtuSgsbSbazNXRULdlZ/HpkK8nER/L44qOOJM+CxH9t1Z5KIs xO5ID9BwdhNDcN/NQHj68HheHAOhMgmNSj5qr/lpQdAhZgNZBFyS+7VHSVp+7V4vKJpW ARIN03Gq/g08+nkCz07AGJYEMrxXZjc3k18cLr0IJAVjJkA6TiYxOfIxC5k6a3/YwXL7 cB5przmGJMWnwY4d9tuDYRIsB49oxhY9IOwXav6Ig442e9xMBX/XYMyeAMNfrZ/80JZ4 j4XSxp/HABOGBMpXFwCH63k3v3S7Z0aimPqCclRDHBv8BST3Czd7f/f+8QBk+aS+p4wt UNGw== X-Gm-Message-State: ACrzQf1WuGbudqD13geyzdwBszofNGV/PebQL9a70N5uZ+y8ROlqJ9+j wDtQIft49H85DlAsb2TMXc4eeA== X-Google-Smtp-Source: AMsMyM45csnsoaH0ctG3J0aV46O95uf1MIsqptHaLwkVK4G6volSlAlrgLFWkWJYUEXPWUEtCSdGCQ== X-Received: by 2002:adf:dd12:0:b0:236:6ef7:dacf with SMTP id a18-20020adfdd12000000b002366ef7dacfmr14117030wrm.204.1667379461881; Wed, 02 Nov 2022 01:57:41 -0700 (PDT) Received: from stroh80.sec.9e.network (ip-078-094-000-051.um19.pools.vodafone-ip.de. [78.94.0.51]) by smtp.gmail.com with ESMTPSA id j39-20020a05600c48a700b003b95ed78275sm1290176wmp.20.2022.11.02.01.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 01:57:41 -0700 (PDT) From: Naresh Solanki X-Google-Original-From: Naresh Solanki To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Lee Jones , Rob Herring , Krzysztof Kozlowski , Patrick Rudolph Cc: Marcello Sylvester Bauer , Naresh Solanki Subject: [PATCH v5 1/2] dt-bindings: mfd: Add bindings for MAX5970 and MAX5978 Date: Wed, 2 Nov 2022 09:57:36 +0100 Message-Id: <20221102085737.599100-2-Naresh.Solanki@9elements.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221102085737.599100-1-Naresh.Solanki@9elements.com> References: <20221102085737.599100-1-Naresh.Solanki@9elements.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Marcello Sylvester Bauer The MAX597x is a hot swap controller with configurable fault protection. It also has 10bit ADC for current & voltage measurements. Signed-off-by: Patrick Rudolph Signed-off-by: Marcello Sylvester Bauer Signed-off-by: Naresh Solanki --- .../devicetree/bindings/mfd/max5970.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/max5970.yaml diff --git a/Documentation/devicetree/bindings/mfd/max5970.yaml b/Documentation/devicetree/bindings/mfd/max5970.yaml new file mode 100644 index 000000000000..f5cd80c1a24a --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/max5970.yaml @@ -0,0 +1,164 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/max5970.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Regulator driver for MAX5970 smart switch from Maxim Integrated. + +maintainers: + - Patrick Rudolph + +description: | + The smart switch provides no output regulation, but independent fault protection + and voltage and current sensing. + Programming is done through I2C bus. + + Datasheets: + https://datasheets.maximintegrated.com/en/ds/MAX5970.pdf + https://datasheets.maximintegrated.com/en/ds/MAX5978.pdf + +properties: + compatible: + enum: + - maxim,max5970 + - maxim,max5978 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + leds: + type: object + description: + Properties for single channel. + + patternProperties: + "^led@[0-3]$": + $ref: /schemas/leds/common.yaml# + type: object + + additionalProperties: true + + vss1-supply: + description: Supply of the first channel. + + vss2-supply: + description: Supply of the first channel. + + "#io-channel-cells": + const: 1 + + regulators: + type: object + description: + Properties for single channel. + + patternProperties: + "^(sw[0-1])$": + $ref: /schemas/regulator/regulator.yaml# + type: object + + shunt-resistor-micro-ohms: + description: | + The value of curent sense resistor in microohms. + Must be specified for each channel. + + additionalProperties: true + +required: + - compatible + - reg + - regulators + - vss1-supply + + +allOf: + - if: + properties: + compatible: + enum: + - maxim,max5970 + then: + properties: + io-channels: + items: + - description: voltage first channel + - description: current first channel + - description: voltage second channel + - description: current second channel + description: | + Voltage and current for first and second channel. + required: + - vss2-supply + else: + properties: + io-channels: + items: + - description: voltage first channel + - description: current first channel + description: | + Voltage and current for first channel. + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + regulator@3a { + reg = <0x3a>; + vss1-supply = <&p3v3>; + compatible = "maxim,max5978"; + + regulators { + sw0_ref_0: SW0 { + regulator-compatible = "SW0"; + shunt-resistor-micro-ohms = <12000>; + }; + }; + + leds { + #address-cells = <1>; + #size-cells = <0>; + led@0 { + reg = <0>; + label = "led0"; + default-state = "on"; + }; + led@1 { + reg = <1>; + label = "led1"; + default-state = "on"; + }; + }; + }; + }; + + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@3a { + reg = <0x3a>; + vss1-supply = <&p3v3>; + vss2-supply = <&p5v>; + compatible = "maxim,max5970"; + + regulators { + sw0_ref_1: SW0 { + regulator-compatible = "SW0"; + shunt-resistor-micro-ohms = <12000>; + }; + sw1_ref_1: SW1 { + regulator-compatible = "SW1"; + shunt-resistor-micro-ohms = <10000>; + }; + }; + }; + }; +... -- 2.37.3