Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp451338ybt; Fri, 19 Jun 2020 05:55:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHFw402FW/z7LBwqCv1pEshbYz6yBPPn7jOpnRVrWBGU5PdrJ+ncW5+P0x7DpI5RF7McNI X-Received: by 2002:a17:906:3cf:: with SMTP id c15mr3460105eja.186.1592571355966; Fri, 19 Jun 2020 05:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592571355; cv=none; d=google.com; s=arc-20160816; b=1IPNWaI5enbLGSofWafinCVbT+W0+mNGO36Vz8uK922I2MPT8Fr0IsCw8N5VzSeAGy Ka2XX0m+hVndO61xQzY2NThS29JfoQ+QCKM9oB8nIfMyJhgFkrX86SJqaoBwoDvCp6rr IsWCJlSQjwoDolKDD5pyJeVkLnRMljkA9vy5uda7rzUfasJwYCJP2erXkc7q6HfN/+4a jDJnx2AeSR/rLN9AXgFs0oSlyv2dOHUOWt+dy5yg/ggmbWxijBKfx5TR0HUij5hBM+m6 s76KhWYJCyg0Z9rO46XjSHGeMsN74v+GYoZcvOqDeK1X9g+/noJ6IjWxnUqpxZevNuwB 6bcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=649vrouwnwNw8hZJmDui7hqgFQ4vaLHMeburQrpsbms=; b=xPf0TPStK3kj325AlBjo2srT+JXYpSI9dQc5pLp4LITSuH0Nr4Nt40aEpMUc1iOm2G PZ2IIsNJ7h2rhlYkIe5aKnheWkSPIcE1zqDorsMAlKPdOMkNI7a2tKWMpT8kqy4c7q5S D66+FiiWJIk0ifGcFvp0AzUm3vcAfc5ir3hhKQM5gS+2woxtuH1WvHQWYoXRS6+GV6+F xQQy1Cu1YhIaSGc9rOciNzxKFAkApDKGffZyozbZlJpbHeSzj4yTyKzme5SC93CTarH3 R/ajce/HGNwb0jwqMw7Rej9+wEulABA5ccjDv8WP4F5h8rpFSkF4Wx1heVibZTtk3tic zBWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="cEbG/vDa"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k16si3783087eja.149.2020.06.19.05.55.33; Fri, 19 Jun 2020 05:55:55 -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=@gmail.com header.s=20161025 header.b="cEbG/vDa"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732621AbgFSLyf (ORCPT + 99 others); Fri, 19 Jun 2020 07:54:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730957AbgFSLyd (ORCPT ); Fri, 19 Jun 2020 07:54:33 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5606C06174E for ; Fri, 19 Jun 2020 04:54:31 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id y17so3837265plb.8 for ; Fri, 19 Jun 2020 04:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=649vrouwnwNw8hZJmDui7hqgFQ4vaLHMeburQrpsbms=; b=cEbG/vDax/+j3lSPHK8/nHyvCjYB2tiiBwqR60bvfnEHJoxK4blTHPBKwKhBAp3cIp bsErxLaZ49/662w8ilOcd5ylWAwD0KnZip+va+BWpfAEaTVqCMOFys5qfpr5zz+5RCwf UsROPptozBcXt43gbOg+mLqShquDKaQIcnZK/gyT6r9fSOhzJ8HR+5QE6h+cOo+W2TQz NebvFnXFTQUsFEtTGRAvNMyzvTLJXsmAWG4MrT5BeYFI8sDxmEv23yVSWjTr8xtc6xav U/ZZB9WSMhh2+Vw20ZeVI0yUS+mJ0JW95JiNp2Q90n/JktQZ+m4IualUzUEyrhDAloI6 MZpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=649vrouwnwNw8hZJmDui7hqgFQ4vaLHMeburQrpsbms=; b=aj7/AwNJzZqDnhGX3My/Mu2Uk0C3VP3eF0DosoM9ABdtdf4LqEiIK9+1yMH2LNWmYn M04mR25DXrySAaZ6xtSh6O+HZhyTztyWNu4zvJWZhJnAJGzvOK2wHHTKgevj2Wz4xnYC JeQlODqYaGsr48f3L0JgnZTAktsjcVxDEFu14LFSFSAMvs/VY6u8voWKh/Hw+IBBno3w FowO7HXckLPu3KThykpy2hBId5faXnruabk/HlJowE3CAfsJSiXGU5GzKkv60hMOyczx 6bY2YauO2e0cUfCGQ55LXsM56sYy5IDdx+g+aShEq0coZgXuIGrTU7ZjSs0iBTXyLXI1 0Esg== X-Gm-Message-State: AOAM532m6GP1SLzR8XIW860e3Q1V/EUqWUYRMRU/ksqtv6QTjGLYMj3m DqU+a0BFlvsa5uelGL+thpU= X-Received: by 2002:a17:902:6ac2:: with SMTP id i2mr7667948plt.243.1592567671500; Fri, 19 Jun 2020 04:54:31 -0700 (PDT) Received: from localhost.localdomain ([2402:7500:46c:79b7:a5d3:5b37:1d99:175a]) by smtp.gmail.com with ESMTPSA id n64sm5026712pga.38.2020.06.19.04.54.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jun 2020 04:54:31 -0700 (PDT) From: Gene Chen To: lee.jones@linaro.org, jic23@kernel.org, jacek.anaszewski@gmail.com, pavel@ucw.cz, matthias.bgg@gmail.com Cc: 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: [PATCH v2 1/4] dt-bindings: mfd: Add bindings for the Mediatek MT6360 PMIC Date: Fri, 19 Jun 2020 19:53:48 +0800 Message-Id: <1592567631-20363-2-git-send-email-gene.chen.richtek@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592567631-20363-1-git-send-email-gene.chen.richtek@gmail.com> References: <1592567631-20363-1-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 From: Gene Chen Add devicetree binding document support Mediatek MT6360 PMIC Signed-off-by: Gene Chen --- Documentation/devicetree/bindings/mfd/mt6360.txt | 122 +++++++++++++++++++++++ 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: +It is interfaced to host controller using I2C interface. +This document describes the binding for PMIC device and its sub module. + +- ADC +- Battery Charger/OTG boost +- Flash LED/RGB LED/moonlight LED +- 2-channel Buck and 6-channel LDO +- USB_PD + +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. + +Optional subnodes: +- ADC + Required properties: + - compatible: "mediatek,mt6360-adc" +- battery charger/OTG boost + 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 + 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>; + adc { + compatible = "mediatek,mt6360-adc"; + #io-channel-cells = <1>; + }; + regulator { + compatible = "mediatek,mt6360-regulator"; + LDO_VIN3-supply = <&BUCK2>; + buck1 { + regulator-compatible = "BUCK1"; + regulator-name = "mt6360,buck1"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1300000>; + regulator-allowed-modes = ; + }; + BUCK2: buck2 { + regulator-compatible = "BUCK2"; + regulator-name = "mt6360,buck2"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1300000>; + regulator-allowed-modes = ; + }; + ldo6 { + regulator-compatible = "LDO6"; + regulator-name = "mt6360,ldo6"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2100000>; + regulator-allowed-modes = ; + }; + ldo7 { + regulator-compatible = "LDO7"; + regulator-name = "mt6360,ldo7"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2100000>; + regulator-allowed-modes = ; + }; + ldo1 { + regulator-compatible = "LDO1"; + regulator-name = "mt6360,ldo1"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3600000>; + regulator-allowed-modes = ; + }; + ldo2 { + regulator-compatible = "LDO2"; + regulator-name = "mt6360,ldo2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3600000>; + regulator-allowed-modes = ; + }; + ldo3 { + regulator-compatible = "LDO3"; + regulator-name = "mt6360,ldo3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3600000>; + regulator-allowed-modes = ; + }; + ldo5 { + regulator-compatible = "LDO5"; + regulator-name = "mt6360,ldo5"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3600000>; + regulator-allowed-modes = ; + }; + }; + }; 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