Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2639596ybt; Mon, 22 Jun 2020 03:29:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznb/Ktb4Fo9betgxkb4k97EK3HHQ9f1PAWQDWOU/mZissiy9R17Lx3OzqvQSQu7Gb9b2f5 X-Received: by 2002:a50:c90d:: with SMTP id o13mr10206954edh.338.1592821748003; Mon, 22 Jun 2020 03:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592821747; cv=none; d=google.com; s=arc-20160816; b=Y3HqfH15OTLpbcWzeQ2tnd9TEa4rUvSQkUZCInVyFVXUMgM9gypaadN9/GbH0UW4bY 9B0SBR9gSGMj1eyBs5UQpWbbT6z9qIiDMdC5HnJCq5NnbpHMpo5Kv0xik5rNExCnHI3C jxBt2jbBVJzsu7ElYxmRX2ZSGUVLxZiwZEEucv+o2KLaCbiLKOnmavLWV/upx+YFVsiK ryF5JWP+dh0OmOvJUFNnRA9vWQjNyVz+EXWChyH1M2+7YuUuXF2KO8VUzD8ytUdoYVYJ HoJTw7Fgojh5KoYHsKJQg4Ij0bMizlMkZnOJN3P1ZUkuqNKToLJicV82R/ux4G7k3y7s 2yHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Yz9650V/ncbubBykBcytsySqbuuA1Aq+cvVGqOCH2jE=; b=O/ZHsLLxKB5fGgi6SSgO25PPmIvLYKpcjlh9GKN5g2gGj9PZ3dUITabXFtu+7P9KE0 YSvcTEE0jF1WfZVU99915f5GEUzZYP1M8XthrBrY8R7KMZnH1WVnD/CXJazjXf5FdAis 6PP02sR2SJuVjyOte5UCs+YBt77KgOHHwAioTyvpSE0Y1u+NJxSah5qgI36Nr8i3QcDX Dov0UcAyOJAKHhtbvkjAwQAB/yOJiP+0oaQf5d9PwZlo+uwhy/LJMr20WpszsnUtXtG7 w9rQGhGEwWat8xX2Ei3zSn1DWO8cw4FkqNbCcXv3oyg94yOt1ftbhikB3Txp9DAmILFr 5I9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aXBzIwmC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si8598163ejf.3.2020.06.22.03.28.45; Mon, 22 Jun 2020 03:29:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aXBzIwmC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727828AbgFVKY0 (ORCPT + 99 others); Mon, 22 Jun 2020 06:24:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726841AbgFVKYZ (ORCPT ); Mon, 22 Jun 2020 06:24:25 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4545C061794 for ; Mon, 22 Jun 2020 03:24:24 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id a6so14125006wrm.4 for ; Mon, 22 Jun 2020 03:24:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=Yz9650V/ncbubBykBcytsySqbuuA1Aq+cvVGqOCH2jE=; b=aXBzIwmCLIGhHF5TfxOryr8YGgBDUzHh6ODnXI2T1vtPc4RaKYkFgSmhlpBTLiDI49 dp99K8zbWaHRA444VRxW5psZqWIsDZ/KXRv+qVEWw2Pnquaw4ClK2bIN4JdNyMKy0a3j LjUWV+GiZnRKeP8mgvXFbDtl+gU6NPQmwBXzYamqn2SDyO/NBphGcnaVZE5ejSJhE0Nb ZwRPjiQTRZCpoDD+VH9J7C8k0Y8v9oBqltFgBrJ8vBh/m0lrtGHiwo+mLY1ZLEQFjcdB rw64IO5oG+5KgL+lZIQN10UoNyHUYYBqOySr8/FBdjylIfNeOggHwBK9IENRhy63Nm8D UEZw== 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:content-transfer-encoding :in-reply-to; bh=Yz9650V/ncbubBykBcytsySqbuuA1Aq+cvVGqOCH2jE=; b=TJhF3XsbKkZrsNEXMI476DtLyRMJVwD2s+O2yHnje7iZ6qmCgi3DDTwZ8mDxMqEG44 A+NS2wKlazXFOj7HOSr+YJldU+dk7X1v43NiR19IJ2yUNfzLXLSWT07Zqv0ldsuX9Srd zbX7xoRV86i6RLxgFz6D18w0NrBIctjkS+lkglk2mUOhk2x0lCXR1zlWDo9xJAicpfj2 zBzDXX9L8xT0naxsvfYUZ7Gi4LKOUv3ykvcz6mvW+hedpzqwF7lYEQ9yTqdZUBNSQf34 r3c21eTuTTd4iQFZtzGoXM7eVzD1OVFcqE3UoFGQOsJkEeL2aeOtbCXz1GlMjEN2qP7c 5cbA== X-Gm-Message-State: AOAM532n6EYTHyqXxfIa/E70FoaOPVF/vKciyHvLgzWkN7Qa/A/8Dbdc Vr3zy8TxlYQs4HiTKA3u06kwhw== X-Received: by 2002:adf:8b50:: with SMTP id v16mr14220275wra.188.1592821463432; Mon, 22 Jun 2020 03:24:23 -0700 (PDT) Received: from dell ([2.27.35.144]) by smtp.gmail.com with ESMTPSA id u74sm16509467wmu.31.2020.06.22.03.24.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 03:24:22 -0700 (PDT) Date: Mon, 22 Jun 2020 11:24:20 +0100 From: Lee Jones To: Gene Chen Cc: jic23@kernel.org, jacek.anaszewski@gmail.com, pavel@ucw.cz, matthias.bgg@gmail.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, dmurphy@ti.com, lgirdwood@gmail.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, gene_chen@richtek.com, shufan_lee@richtek.com, cy_huang@richtek.com, benjamin.chao@mediatek.com Subject: Re: [PATCH v2 1/4] dt-bindings: mfd: Add bindings for the Mediatek MT6360 PMIC Message-ID: <20200622102420.GR954398@dell> References: <1592567631-20363-1-git-send-email-gene.chen.richtek@gmail.com> <1592567631-20363-2-git-send-email-gene.chen.richtek@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1592567631-20363-2-git-send-email-gene.chen.richtek@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 19 Jun 2020, Gene Chen wrote: > From: Gene Chen > > Add devicetree binding document support Mediatek MT6360 PMIC > > Signed-off-by: Gene Chen > --- > Documentation/devicetree/bindings/mfd/mt6360.txt | 122 +++++++++++++++++++++++ This needs converting to YAML. > include/dt-bindings/mfd/mt6360.h | 15 +++ > 2 files changed, 137 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/mt6360.txt > create mode 100644 include/dt-bindings/mfd/mt6360.h > > diff --git a/Documentation/devicetree/bindings/mfd/mt6360.txt b/Documentation/devicetree/bindings/mfd/mt6360.txt > new file mode 100644 > index 0000000..7d7d349 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/mt6360.txt > @@ -0,0 +1,122 @@ > +MediaTek MT6360 PMIC Driver > + > +MT6360 is a multifunction device with the following sub modules: Sub modules do not follow this sentence. Please do not use the term "multi-function" in DT bindings. An MFD is something we made up. It's a Linuxisum and has no real meaning in DT. This device is not multi-functional. It has one function, to control Power. The multi-function part comes from the fact that we like things split-up into subsystem for organisation purposes and simplicity. > +It is interfaced to host controller using I2C interface. > +This document describes the binding for PMIC device and its sub module. This sentence should be at the top. s/sub module/sub-devices/ > +- ADC > +- Battery Charger/OTG boost > +- Flash LED/RGB LED/moonlight LED > +- 2-channel Buck and 6-channel LDO > +- USB_PD These should follow the sentence reviewing to the "sub modules". > +Required properties: > +- compatible: Must be "mediatek,mt6360-pmu" > +- reg: Specifies the I2C slave address of PMIC block, Must be <0x34> > +- interrupts: I2C device IRQ line connected to the main SoC. Remove the '.'. > +Optional subnodes: > +- ADC > + Required properties: > + - compatible: "mediatek,mt6360-adc" > +- battery charger/OTG boost "Battery" > + Required properties: > + - compatible: "mediatek,mt6360-chg" > +- Flash LED/RGB LED/moonlight LED > + Required properties: > + - compatible: "mediatek,mt6360-led" > +- 2-channel Buck and 6-channel LDO > + Required properties: > + - compatible: "mediatek,mt6360-regulator" > +- USB_PD Remove the "_" and expand PD. > + Required properties: > + - compatible: "mediatek,mt6360-tcpc" > + > +Example: > + > + #include > + #include > + > + mt6360@34 { > + compatible = "mediatek,mt6360"; > + reg = <0x34>; > + wakeup-source; > + interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; > + interrupt-names = "IRQB"; > + interrupt-controller; > + #interrupt-cells = <1>; '\n' > + adc { > + compatible = "mediatek,mt6360-adc"; > + #io-channel-cells = <1>; Where is the channel cell? > + }; '\n' > + regulator { > + compatible = "mediatek,mt6360-regulator"; > + LDO_VIN3-supply = <&BUCK2>; '\n' > + buck1 { > + regulator-compatible = "BUCK1"; > + regulator-name = "mt6360,buck1"; > + regulator-min-microvolt = <300000>; > + regulator-max-microvolt = <1300000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP > + MT6360_OPMODE_ULP>; > + }; '\n' Etc etc. > + BUCK2: buck2 { > + regulator-compatible = "BUCK2"; > + regulator-name = "mt6360,buck2"; > + regulator-min-microvolt = <300000>; > + regulator-max-microvolt = <1300000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP > + MT6360_OPMODE_ULP>; > + }; > + ldo6 { > + regulator-compatible = "LDO6"; > + regulator-name = "mt6360,ldo6"; > + regulator-min-microvolt = <500000>; > + regulator-max-microvolt = <2100000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + }; > + ldo7 { > + regulator-compatible = "LDO7"; > + regulator-name = "mt6360,ldo7"; > + regulator-min-microvolt = <500000>; > + regulator-max-microvolt = <2100000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + }; > + ldo1 { > + regulator-compatible = "LDO1"; > + regulator-name = "mt6360,ldo1"; > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <3600000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + }; > + ldo2 { > + regulator-compatible = "LDO2"; > + regulator-name = "mt6360,ldo2"; > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <3600000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + }; > + ldo3 { > + regulator-compatible = "LDO3"; > + regulator-name = "mt6360,ldo3"; > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <3600000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + }; > + ldo5 { > + regulator-compatible = "LDO5"; > + regulator-name = "mt6360,ldo5"; > + regulator-min-microvolt = <2700000>; > + regulator-max-microvolt = <3600000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + }; Why aren't the LDO cells in order? > + }; > + }; > diff --git a/include/dt-bindings/mfd/mt6360.h b/include/dt-bindings/mfd/mt6360.h > new file mode 100644 > index 0000000..6368388 > --- /dev/null > +++ b/include/dt-bindings/mfd/mt6360.h > @@ -0,0 +1,15 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * This header provides macros for MT6360 device bindings. > + * > + * Copyright (c) 2020 Mediatek Inc. > + */ > + > +#ifndef __DT_BINDINGS_MT6360_H__ > +#define __DT_BINDINGS_MT6360_H__ > + > +#define MT6360_OPMODE_LP (2) > +#define MT6360_OPMODE_ULP (3) > +#define MT6360_OPMODE_NORMAL (0) > + > +#endif /* __DT_BINDINGS_MT6360_H__ */ > -- > 2.7.4 > -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog