From patchwork Sat Nov 16 18:55:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 1196158 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47FkvT1bhGz9sP3 for ; Sun, 17 Nov 2019 05:56:05 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727781AbfKPS4E (ORCPT ); Sat, 16 Nov 2019 13:56:04 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:34391 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727720AbfKPS4D (ORCPT ); Sat, 16 Nov 2019 13:56:03 -0500 Received: by mail-lj1-f193.google.com with SMTP id 139so14264069ljf.1; Sat, 16 Nov 2019 10:56:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mvEclu5vTGP+CKxGJKD3pjj9Bl8VLFVbSby9vh8jVlA=; b=Hx4ylZQnzJweldoY3JDcBhI4XZbXmrC1CEgxGxWcO51UpQe+GUHwLMO4SDJHXajLYP xL+e27Fsj4WyFizEdFefyb73AFTItH+AF16y01rPIEbrwPQT/xFzbgoYSI84SoLhE0pZ WLZsSO+iFO+IE4wvDNrDxSupQqfWRhdyVMfsqcbUbvOvkgPlUTQYxglc0WQvXMyDUL+k zJjwrLUahE/EbL9qZK+P5TtHWkCfi5Cap7Hh7GDz2OXtTmflaTs8UVkvx9KEnpry7Zj9 fVxN9Zp0X54qr5F06A5Czo2kIqU2FbcaW9HcaBmN9cSGBc3m2SJLVz3AoVD82n4y91SP QGRQ== X-Gm-Message-State: APjAAAUhS3ds3jU/hLvfmXkNBUGAs8fIS7lEpBpS+6xMH9XcoxIb4RQD zyQU78k4cipfji8izIW4oqs= X-Google-Smtp-Source: APXvYqxBzkanpzWWCj4GGeZj8fx5fJqGGW9rOAoXnzBZxyFsrDXaUHaPyGfsLRQOE/tq/p7OUZ4f2g== X-Received: by 2002:a2e:9b5a:: with SMTP id o26mr9191654ljj.174.1573930560133; Sat, 16 Nov 2019 10:56:00 -0800 (PST) Received: from localhost.localdomain (dyttqz39y2bkc1ryvyh3t-4.rev.dnainternet.fi. [2001:14bb:420:da5f:a0b0:502a:b811:1af]) by smtp.gmail.com with ESMTPSA id n1sm5766633ljg.44.2019.11.16.10.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 10:55:59 -0800 (PST) Date: Sat, 16 Nov 2019 20:55:50 +0200 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Cc: Lee Jones , Jacek Anaszewski , Pavel Machek , Dan Murphy , Rob Herring , Mark Rutland , Liam Girdwood , Mark Brown , Jonathan Corbet , Michael Turquette , Stephen Boyd , Linus Walleij , Bartosz Golaszewski , Alessandro Zummo , Alexandre Belloni , Mauro Carvalho Chehab , Jeff Kirsher , Wolfram Sang , Marek Szyprowski , Heiner Kallweit , Nicholas Mc Guire , Phil Edworthy , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org Subject: [PATCH v4 01/16] dt-bindings: regulator: Document ROHM BD71282 regulator bindings Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Document ROHM BD71828 PMIC regulator device tree bindings. Signed-off-by: Matti Vaittinen --- .../regulator/rohm,bd71828-regulator.yaml | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml new file mode 100644 index 000000000000..c23ec4d8584b --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml @@ -0,0 +1,122 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/rohm,bd71828-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ROHM BD71828 Power Management Integrated Circuit regulators + +maintainers: + - Matti Vaittinen + +description: | + This module is part of the ROHM BD71828 MFD device. For more details + see Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml. + + The regulator controller is represented as a sub-node of the PMIC node + on the device tree. + + Regulator nodes should be named to BUCK_ and LDO_. + The valid names for BD71828 regulator nodes are + BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6, BUCK7 + LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7 + +patternProperties: + "^LDO[1-7]$": + type: object + allOf: + - $ref: regulator.yaml# + description: + Properties for single LDO regulator. + + properties: + #Is there a nice way to check the name is same as node name but lower case + regulator-name: + pattern: "^ldo[1-7]$" + description: + should be "ldo1", ..., "ldo7" + + "^BUCK[1-7]$": + type: object + allOf: + - $ref: regulator.yaml# + description: + Properties for single BUCK regulator. + + properties: + #Is there a nice way to check the name is same as node name but lower case + regulator-name: + pattern: "^buck[1-7]$" + description: + should be "buck1", ..., "buck7" + + rohm,dvs-run-voltage: + allOf: + - $ref: "/schemas/types.yaml#/definitions/uint32" + - minimum: 0 + maximum: 3300000 + description: + PMIC default "RUN" state voltage in uV. See below table for + bucks which support this. 0 means disabled. + + rohm,dvs-idle-voltage: + allOf: + - $ref: "/schemas/types.yaml#/definitions/uint32" + - minimum: 0 + maximum: 3300000 + description: + PMIC default "IDLE" state voltage in uV. See below table for + bucks which support this. 0 means disabled. + + rohm,dvs-suspend-voltage: + allOf: + - $ref: "/schemas/types.yaml#/definitions/uint32" + - minimum: 0 + maximum: 3300000 + description: + PMIC default "SUSPEND" state voltage in uV. See below table for + bucks which support this. 0 means disabled. + + rohm,dvs-lpsr-voltage: + allOf: + - $ref: "/schemas/types.yaml#/definitions/uint32" + - minimum: 0 + maximum: 3300000 + description: + PMIC default "LPSR" state voltage in uV. See below table for + bucks which support this. 0 means disabled. + +#Supported default DVS states: +#buck | run | idle | suspend | lpsr +#---------------------------------------------------------------------------- +#1, 2, 6, and 7 | supported | supported | supported (*) +#---------------------------------------------------------------------------- +#3, 4, and 5 | supported (**) +#---------------------------------------------------------------------------- +#(*) LPSR and SUSPEND states use same voltage but both states have own enable / +# disable settings. Voltage 0 can be specified for a state to make regulator +# disabled on that state. +#(**) All states use same voltage but have own enable / disable settings. +# Voltage 0 can be specified for a state to make regulator disabled on that +# state. + + rohm,dvs-runlvl-ctrl: + description: | + buck control is done based on run-level. Regulator is not + individually controllable. See ../mfd/rohm,bd71828-pmic.yaml for + how to specify run-level control mechanism. Only bucks 1, 2, 6 + and 7 support this. + type: boolean + + rohm,dvs-runlevel-microvolts: + minimum: 0 + maximum: 2000000 + maxItems: 4 + description: + Array of voltages for run-levels. First value is for run-level 0, + second for run-level 1 etc. Microvolts. + + required: + - regulator-name + additionalProperties: false +additionalProperties: false From patchwork Sat Nov 16 18:56:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 1196162 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47Fkvv46Gcz9sPV for ; Sun, 17 Nov 2019 05:56:27 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727603AbfKPS40 (ORCPT ); Sat, 16 Nov 2019 13:56:26 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:41800 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727577AbfKPS40 (ORCPT ); Sat, 16 Nov 2019 13:56:26 -0500 Received: by mail-lj1-f194.google.com with SMTP id m4so9300784ljj.8; Sat, 16 Nov 2019 10:56:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XWuJNiu7qJWjgtGBqSOC0OBvtjKSmvsa3XLOIKFwnfs=; b=Te65iiDB2OJoJIcWuLNCrtcOR4F5A28CDCdUOCQmAarlr4YpVVndBMmKfH0ojbmIJw blBz8kNiVEcpWMX6lpM+8xRuB+kDD0oxuSMJLtbDnP8SYz1MWmbqnRrQd3yW88E6YJ1I PTTqN/dmv8h497nn0bHFRogAXcO80yVVeSjCBvpvQD9msUjR/wibwrOyti4qeX3FQvSt afu5Bm7wjZzvVaF6dj/BoX1Yj86+i5gztLGfrktDOOWQZ05uR1E+8nhyUqq2Y6ya0q5H YFxwBY4Z2IzPEsgKSKxGRdsgxhRd117QrM8TY6yeeM2FBoUnegQgEDEPixZK2PdzGr5t QVfg== X-Gm-Message-State: APjAAAV/ehx7QGOreJB+uqL28FqHFjIcZS1aVNGuVZvcpkKWh0zrJ8JK DM9xFOoPUFaIs4/50X5kMnI= X-Google-Smtp-Source: APXvYqwqXmwNEnllaIiM+/7NpknM0pk110fH7OliieYIS0fXnj7tp9SO71g+7gvgyAitjGVYf/IuLA== X-Received: by 2002:a2e:2a43:: with SMTP id q64mr15775437ljq.242.1573930583300; Sat, 16 Nov 2019 10:56:23 -0800 (PST) Received: from localhost.localdomain (dyttqz39y2bkc1ryvyh3t-4.rev.dnainternet.fi. [2001:14bb:420:da5f:a0b0:502a:b811:1af]) by smtp.gmail.com with ESMTPSA id u2sm6416568ljg.34.2019.11.16.10.56.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 10:56:22 -0800 (PST) Date: Sat, 16 Nov 2019 20:56:13 +0200 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Cc: Lee Jones , Jacek Anaszewski , Pavel Machek , Dan Murphy , Rob Herring , Mark Rutland , Liam Girdwood , Mark Brown , Jonathan Corbet , Michael Turquette , Stephen Boyd , Linus Walleij , Bartosz Golaszewski , Alessandro Zummo , Alexandre Belloni , Mauro Carvalho Chehab , Jeff Kirsher , Wolfram Sang , Marek Szyprowski , Heiner Kallweit , Nicholas Mc Guire , Phil Edworthy , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org Subject: [PATCH v4 02/16] dt-bindings: leds: ROHM BD71282 PMIC LED driver Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Document ROHM BD71828 PMIC LED driver device tree bindings. Signed-off-by: Matti Vaittinen --- .../bindings/leds/rohm,bd71828-leds.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/rohm,bd71828-leds.yaml diff --git a/Documentation/devicetree/bindings/leds/rohm,bd71828-leds.yaml b/Documentation/devicetree/bindings/leds/rohm,bd71828-leds.yaml new file mode 100644 index 000000000000..e72c9ae0fc2a --- /dev/null +++ b/Documentation/devicetree/bindings/leds/rohm,bd71828-leds.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/rohm,bd71828-leds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ROHM BD71828 Power Management Integrated Circuit LED driver + +maintainers: + - Matti Vaittinen + +description: | + This module is part of the ROHM BD71828 MFD device. For more details + see Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml. + + The LED controller is represented as a sub-node of the PMIC node on the device + tree. + + The device has two LED outputs referred as GRNLED and AMBLED in data-sheet. + +properties: + compatible: + const: rohm,bd71828-leds + +patternProperties: + "^led-[1-2]$": + type: object + description: + Properties for a single LED. + properties: + #$ref: "common.yaml#" + rohm,led-compatible: + description: LED identification string + allOf: + - $ref: "/schemas/types.yaml#/definitions/string" + - oneOf: + - const: bd71828-ambled + - const: bd71828-grnled + function: + description: + Purpose of LED as defined in dt-bindings/leds/common.h + $ref: "/schemas/types.yaml#/definitions/string" + color: + description: + LED colour as defined in dt-bindings/leds/common.h + $ref: "/schemas/types.yaml#/definitions/uint32" + +required: + - compatible From patchwork Sat Nov 16 18:56:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 1196166 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47FkwR69skz9sPv for ; Sun, 17 Nov 2019 05:56:55 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727656AbfKPS4v (ORCPT ); Sat, 16 Nov 2019 13:56:51 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:34288 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727577AbfKPS4v (ORCPT ); Sat, 16 Nov 2019 13:56:51 -0500 Received: by mail-lf1-f66.google.com with SMTP id l28so1083565lfj.1; Sat, 16 Nov 2019 10:56:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3Da2HqV3tWwdvaCs0J9MaUdJFtFu1Kwz0kL6JcNeicY=; b=e16jSaLaR8Ub1FNXitH1R0e9R2E/5rgAKRwQ3ajmloUYkAdfM2mjkuCL9ofCSNazov o/VtrJk+hOZdX/f6kP6a3dB9lNwYD11td/mvk0ihYlqAJaxuPZ20r7uur/RvtdSiojal 3hOh0erW2li91moxFUqcFNEZlPtaJPwpueJyP5VOzYcVCmm4m1hXdjv1wX7uR+4tUQVV zylR69pMQft00QP+X3251oy6XBnlw4pPXL/E3e4rgahZHOnFGaxtZBCz4h7rkuhad9g4 FInKDI5jipWQlqbg07y7QK3qpNpjoKkwTqi8tIKR5YLovwwFEMGSyQh35SosdFI+IeWW ikaA== X-Gm-Message-State: APjAAAUiugnBC2aM2LOCgLcpRXgda82DZ7JO+1N5ybsezGV43NpQgfSm 7RgK5gOCj8Mevmz96NNQI4c= X-Google-Smtp-Source: APXvYqyyfcZxSN4thMMhd4ZYsIotq2zi9BDc8BrzMq7tG8FtOivDb12JL1UJ65koUrFKN7lL9RVfqg== X-Received: by 2002:a19:41c8:: with SMTP id o191mr15347024lfa.101.1573930607625; Sat, 16 Nov 2019 10:56:47 -0800 (PST) Received: from localhost.localdomain (dyttqz39y2bkc1ryvyh3t-4.rev.dnainternet.fi. [2001:14bb:420:da5f:a0b0:502a:b811:1af]) by smtp.gmail.com with ESMTPSA id x10sm630215ljc.58.2019.11.16.10.56.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 10:56:47 -0800 (PST) Date: Sat, 16 Nov 2019 20:56:38 +0200 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Cc: Lee Jones , Jacek Anaszewski , Pavel Machek , Dan Murphy , Rob Herring , Mark Rutland , Liam Girdwood , Mark Brown , Jonathan Corbet , Michael Turquette , Stephen Boyd , Linus Walleij , Bartosz Golaszewski , Alessandro Zummo , Alexandre Belloni , Mauro Carvalho Chehab , Jeff Kirsher , Wolfram Sang , Marek Szyprowski , Heiner Kallweit , Nicholas Mc Guire , Phil Edworthy , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org Subject: [PATCH v4 03/16] dt-bindings: mfd: Document ROHM BD71828 bindings Message-ID: <00abd88e370ec155b0717413d324a1c96c01a13d.1573928775.git.matti.vaittinen@fi.rohmeurope.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org ROHM BD71828 Power management IC integrates 7 buck converters, 7 LDOs, a real-time clock (RTC), 3 GPO/regulator control pins, HALL input and a 32.768 kHz clock gate. Document the dt bindings drivers are using. Signed-off-by: Matti Vaittinen --- .../bindings/mfd/rohm,bd71828-pmic.yaml | 249 ++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml new file mode 100644 index 000000000000..17ea9fa463e8 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml @@ -0,0 +1,249 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/rohm,bd71828-pmic.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ROHM BD71828 Power Management Integrated Circuit bindings + +maintainers: + - Matti Vaittinen + +description: | + BD71828GW is a single-chip power management IC for battery-powered portable + devices. The IC integrates 7 buck converters, 7 LDOs, and a 1500 mA + single-cell linear charger. Also included is a Coulomb counter, a real-time + clock (RTC), and a 32.768 kHz clock gate. + + The BD71828 RUN state is divided into 4 configurable run-levels named RUN0, + RUN1, RUN2 and RUN3. Bucks 1, 2, 6 and 7 can be either controlled individually + via I2C, or some/all of them can be bound to run-levels and controlled as a + group. If bucks are controlled individually these run-levels are ignored. See + ../regulator/rohm,bd71828-regulator.yaml for how to define regulator voltages + for run-levels. Run-levels can be changed by I2C or GPIO depending on PMIC's + OTP configuration. + +properties: + compatible: + const: rohm,bd71828 + + reg: + description: + I2C slave address. + maxItems: 1 + + interrupts: + maxItems: 1 + description: + The interrupt line the device is connected to. + + gpio-controller: true + # Indicate BD71828 acts as a GPIO controller. + + "#gpio-cells": + const: 2 + description: | + The first cell is the pin number and the second cell is used to specify + flags. See ../gpio/gpio.txt for more information. + + clocks: + maxItems: 1 + description: + The parent clock connected to PMIC. + + "#clock-cells": + const: 0 + + rohm,charger-sense-resistor-ohms: + minimum: 10000000 + maximum: 50000000 + description: | + BD71827 and BD71828 have SAR ADC for measuring charging currents. + External sense resistor (RSENSE in data sheet) should be used. If some + other but 30MOhm resistor is used the resistance value should be given + here in Ohms. + + regulators: + $ref: ../regulator/rohm,bd71828-regulator.yaml + description: + List of child nodes that specify the regulators. + + leds: + $ref: ../leds/rohm,bd71828-leds.yaml + + rohm,dvs-vsel-gpios: + maxItems: 2 + description: | + GPIOs used to control PMIC run-levels. Should describe two GPIOs. + (See run-level control in data-sheet). If this property is omitted but + some bucks are marked to be controlled by run-levels - then OTP option + allowing run-level control via I2C is assumed. + + gpio-reserved-ranges: + description: | + Usage of BD71828 GPIO pins can be changed via OTP. This property can be + used to mark the pins which should not be configured for GPIO. Please see + the ../gpio/gpio.txt for more information. + +required: + - compatible + - reg + - interrupts + - clocks + - "#clock-cells" + - regulators + - gpio-controller + - "#gpio-cells" + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + pmic: pmic@4b { + compatible = "rohm,bd71828"; + reg = <0x4b>; + + interrupt-parent = <&gpio1>; + interrupts = <29 IRQ_TYPE_LEVEL_LOW>; + + clocks = <&osc 0>; + #clock-cells = <0>; + clock-output-names = "bd71828-32k-out"; + + gpio-controller; + #gpio-cells = <2>; + gpio-reserved-ranges = <0 1>, <2 1>; + + rohm,dvs-vsel-gpios = <&gpio1 12 0>, <&gpio1 13 0>; + rohm,charger-sense-resistor-ohms = <10000000>; + + regulators { + buck1: BUCK1 { + regulator-name = "buck1"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2000000>; + regulator-ramp-delay = <2500>; + rohm,dvs-runlvl-ctrl; + rohm,dvs-runlevel-microvolts = <500000>, + <506250>, + <512500>, + <518750>; + regulator-boot-on; + }; + buck2: BUCK2 { + regulator-name = "buck2"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2000000>; + regulator-ramp-delay = <2500>; + rohm,dvs-runlvl-ctrl; + rohm,dvs-runlevel-microvolts = <500000>, + <506250>, + <512500>, + <518750>; + regulator-boot-on; + }; + buck3: BUCK3 { + regulator-name = "buck3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <2000000>; + regulator-boot-on; + }; + buck4: BUCK4 { + regulator-name = "buck4"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; + buck5: BUCK5 { + regulator-name = "buck5"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + buck6: BUCK6 { + regulator-name = "buck6"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2000000>; + regulator-ramp-delay = <2500>; + rohm,dvs-runlvl-ctrl; + rohm,dvs-runlevel-microvolts = <500000>, + <506250>, + <512500>, + <518750>; + regulator-boot-on; + }; + buck7: BUCK7 { + regulator-name = "buck7"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2000000>; + regulator-ramp-delay = <2500>; + rohm,dvs-runlvl-ctrl; + rohm,dvs-runlevel-microvolts = <500000>, + <506250>, + <512500>, + <518750>; + regulator-boot-on; + }; + ldo1: LDO1 { + regulator-name = "ldo1"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + ldo2: LDO2 { + regulator-name = "ldo2"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + ldo3: LDO3 { + regulator-name = "ldo3"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + ldo4: LDO4 { + regulator-name = "ldo4"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + ldo5: LDO5 { + regulator-name = "ldo5"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + ldo6: LDO6 { + regulator-name = "ldo6"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; + ldo7_reg: LDO7 { + regulator-name = "ldo7"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + }; + + leds { + compatible = "rohm,bd71828-leds"; + + led-1 { + rohm,led-compatible = "bd71828-grnled"; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + led-2 { + rohm,led-compatible = "bd71828-ambled"; + function = LED_FUNCTION_CHARGING; + color = ; + }; + }; + }; + };