Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8077116imu; Fri, 28 Dec 2018 10:03:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Qq1NhrWxX+kv1i3WRagJEk9cuMR/TOd0aELd1LQ5MYxMuRi5yhQaAV/WFLlN6fOsiCxX8 X-Received: by 2002:a63:801:: with SMTP id 1mr26835509pgi.275.1546020232632; Fri, 28 Dec 2018 10:03:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546020232; cv=none; d=google.com; s=arc-20160816; b=JjptwlRIlLMncqscSJGGYHgDUImVkoqrmsTUKr00eP+0i8u4fNkVHQhx/yhwo2yb/A J6rtTKC43Mfy351bn6MAW3azKjGDVGcSIguA41IWHuiDqeCsNI85UmbDoTXkdZ/MiNfA LxVvuswa+yQz6uZW9W/mHAbMUkSIicdpFg1fVhIJccGqtPC2kZxK9u2mXnjW37cIHLdn 9X7KkxFrsDZ/qrk1q6OfkKKRCUlBNzE2DuXVzwNHKEem8UtZrSXSrT97ljd9UPuUbmOx rPa6Nvjl2ac+rSbmU1GNaAWIUPw14gnGlUs874bxO5VyVvsa7uRh/QhilNK+iQz8swaI RR8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=C2oQTtS8cUPXOXzF8tjc+HfUoX9y7z0ZjkM+41q4FCE=; b=EQUQlXBrA64mwZTjrP+doCbPIyGFF+SbB+/OWe2VgQvlfR1b0nJHC9CWGCBlx1MnqV rgkYwGZPWOQiJT/6Nluy14XC2rNdZRST/CAqvrnTHGhn8JE55E+swQdIzO5lEs1zpc6C vV0ChH9jpWZCMMr4CezUC0ZmHUhnOwXGqoCnPd3qMfmB+nWPyhCNGewwugawDWoYcuuZ xeg3JXTs5S0KKnkN3pIWx56pNcj3rm9eekaJbY5cDnuxuYB8NmIfPds6+qQPy3Pxugy7 +e3rz7raf73NlF6j35hrRIB5DYjR6Y0QAyeAL506vvNQCJAiKqTb8iHhldQGlOlawNhh hAzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k30si37756189pgb.113.2018.12.28.10.03.36; Fri, 28 Dec 2018 10:03:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731898AbeL1IKQ (ORCPT + 99 others); Fri, 28 Dec 2018 03:10:16 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:12845 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1731869AbeL1IKM (ORCPT ); Fri, 28 Dec 2018 03:10:12 -0500 X-UUID: 80b88a328e0c4f37af52a0e50643c633-20181228 X-UUID: 80b88a328e0c4f37af52a0e50643c633-20181228 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1834598019; Fri, 28 Dec 2018 16:10:03 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 28 Dec 2018 16:10:00 +0800 Received: from mtkslt303.mediatek.inc (10.21.14.116) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 28 Dec 2018 16:10:01 +0800 From: Erin Lo To: Matthias Brugger , Rob Herring , Mark Rutland , Thomas Gleixner , Jason Cooper , Marc Zyngier , Greg Kroah-Hartman , Stephen Boyd CC: , srv_heupstream , , , , , , , , , , Zhiyong Tao Subject: [PATCH v5 5/6] dt-bindings: pinctrl: mt8183: add binding document Date: Fri, 28 Dec 2018 16:09:40 +0800 Message-ID: <1545984581-25843-6-git-send-email-erin.lo@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1545984581-25843-1-git-send-email-erin.lo@mediatek.com> References: <1545984581-25843-1-git-send-email-erin.lo@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhiyong Tao The commit adds mt8183 compatible node in binding document. Signed-off-by: Zhiyong Tao Signed-off-by: Erin Lo --- .../devicetree/bindings/pinctrl/pinctrl-mt8183.txt | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-mt8183.txt diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8183.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8183.txt new file mode 100644 index 0000000..7b5285e --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8183.txt @@ -0,0 +1,110 @@ +* Mediatek MT8183 Pin Controller + +The Mediatek's Pin controller is used to control SoC pins. + +Required properties: +- compatible: value should be one of the following. + "mediatek,mt8183-pinctrl", compatible with mt8183 pinctrl. +- gpio-controller : Marks the device node as a gpio controller. +- #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO + binding is used, the amount of cells must be specified as 2. See the below + mentioned gpio binding representation for description of particular cells. +- gpio-ranges : gpio valid number range. + + Eg: <&pio 6 0> + <[phandle of the gpio controller node] + [line number within the gpio controller] + [flags]> + + Values for gpio specifier: + - Line number: is a value between 0 to 202. + - Flags: bit field of flags, as defined in . + Only the following flags are supported: + 0 - GPIO_ACTIVE_HIGH + 1 - GPIO_ACTIVE_LOW + +Optional properties: +- reg: physicall address base for gpio base registers. +- reg-names: gpio base registers name. +- interrupt-controller: Marks the device node as an interrupt controller +- #interrupt-cells: Should be two. +- interrupts : The interrupt outputs from the controller. + +Please refer to pinctrl-bindings.txt in this directory for details of the +common pinctrl bindings used by client devices. + +Subnode format +A pinctrl node should contain at least one subnodes representing the +pinctrl groups available on the machine. Each subnode will list the +pins it needs, and how they should be configured, with regard to muxer +configuration, pullups, drive strength, input enable/disable and input schmitt. + + node { + pinmux = ; + GENERIC_PINCONFIG; + }; + +Required properties: +- pinmux: integer array, represents gpio pin number and mux setting. + Supported pin number and mux varies for different SoCs, and are defined + as macros in boot/dts/-pinfunc.h directly. + +Optional properties: +- GENERIC_PINCONFIG: is the generic pinconfig options to use, bias-disable, + bias-pull-down, bias-pull-up, input-enable, input-disable, output-low, output-high, + input-schmitt-enable, input-schmitt-disable and drive-strength are valid. + + Some special pins have extra pull up strength, there are R0 and R1 pull-up + resistors available, but for user, it's only need to set R1R0 as 00, 01, 10 or 11. + So when config mediatek,pull-up-adv or mediatek,pull-down-adv, + it support arguments for those special pins. + + When config drive-strength, it can support some arguments, such as + MTK_DRIVE_4mA, MTK_DRIVE_6mA, etc. See dt-bindings/pinctrl/mt65xx.h. + +Examples: + +#include "mt8183-pinfunc.h" + +... +{ + pio: pinctrl@10005000 { + compatible = "mediatek,mt8183-pinctrl"; + reg = <0 0x10005000 0 0x1000>, + <0 0x11F20000 0 0x1000>, + <0 0x11E80000 0 0x1000>, + <0 0x11E70000 0 0x1000>, + <0 0x11E90000 0 0x1000>, + <0 0x11D30000 0 0x1000>, + <0 0x11D20000 0 0x1000>, + <0 0x11C50000 0 0x1000>, + <0 0x11F30000 0 0x1000>; + reg-names = "iocfg0", "iocfg1", "iocfg2", + "iocfg3", "iocfg4", "iocfg5", + "iocfg6", "iocfg7", "iocfg8"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pio 0 0 192>; + interrupt-controller; + interrupts = ; + interrupt-parent = <&gic>; + #interrupt-cells = <2>; + + i2c0_pins_a: i2c0@0 { + pins1 { + pinmux = , + ; + mediatek,pull-up-adv = <11>; + }; + }; + + i2c1_pins_a: i2c1@0 { + pins { + pinmux = , + ; + mediatek,pull-down-adv = <10>; + }; + }; + ... + }; +}; -- 1.9.1