From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hongzhou.Yang Subject: [PATCH v2 3/4] dt-bindings: Add pinctrl bindings for mt65xx/mt81xx. Date: Tue, 23 Sep 2014 11:39:04 +0800 Message-ID: <1411443545-24951-4-git-send-email-srv_hongzhou.yang@mediatek.com> References: <1411443545-24951-1-git-send-email-srv_hongzhou.yang@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411443545-24951-1-git-send-email-srv_hongzhou.yang@mediatek.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Rob Herring , Linus Walleij , Matthias Brugger Cc: Mark Rutland , devicetree@vger.kernel.org, Vladimir Murzin , Russell King , srv_heupstream@mediatek.com, Pawel Moll , Ian Campbell , Hongzhou Yang , Catalin Marinas , linux-kernel@vger.kernel.org, Ashwin Chaugule , Sascha Hauer , Kumar Gala , Grant Likely , "Joe.C" , dandan.he@mediatek.com, linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org From: Hongzhou Yang Add devicetree bindings for Mediatek SoC pinctrl driver. Signed-off-by: Hongzhou Yang --- .../devicetree/bindings/pinctrl/pinctrl-mt65xx.txt | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt new file mode 100644 index 0000000..ee028cb --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt @@ -0,0 +1,98 @@ +* Mediatek MT65XX Pin Controller + +The Mediatek's Pin controller is used to control GPIO pins. + +Required properties: +- compatible: value should be either of the following. + (a) "mediatek,mt8135-pinctrl", compatible with mt8135 pinctrl. +- reg: Should contain the register physical address and length for the + pin controller. +- 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. + + Eg: <&pio 6 0> + <[phandle of the gpio controller node] + [pin number within the gpio controller] + [flags]> + + Values for gpio specifier: + - Pin 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 + +Please refer to pinctrl-bindings.txt in this directory for details of the +common pinctrl bindings used by client devices. + +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 and pullups. If one of these options is +not set, its actual value will be unspecified. + +Required subnode-properties: + +- mediatek,pinfunc: List of gpio number and function to mux. + +The mediatek,pinfunc can use defines directly, +which are already defind in boot/dts/mt8135-pinfunc.h. + +Optional subnode-properties: +- generic pin configuration option to use, bias-disable, bias-pull-down, + bias-pull,up, output-low and output-high are valid. + Example : + i2c0_pins_a { + mediatek,pinfunc = ; + bias-disable; + }; + +The mediatek,pinfunc can be either a single value or an array. +If it is an array, that means all pins use same config in this node. + + +Examples: + +pinctrl@01c20800 { + compatible = "mediatek,mt8135-pinctrl"; + reg = <0x01c20800 0x400>; + gpio-controller; + #gpio-cells = <2>; + + i2c0_pins_a: i2c0@0 { + mediatek,pinfunc = ; + bias-disable; + }; + + i2c1_pins_a: i2c1@0 { + mediatek,pinfunc = ; + bias-pull-up; + }; + + i2c2_pins_a: i2c2@0 { + mediatek,pinfunc = ; + bias-pull-down; + }; + + i2c3_pins_a: i2c3@0 { + mediatek,pinfunc = ; + bias-disable; + output-high; + }; + + uart2_pins_a: uart2@0 { + mediatek,pinfunc = ; + bias-disable; + output-low; + }; + + uart3_pins_a: uart3@0 { + mediatek,pinfunc = ; + bias-disable; + output-low; + }; + ... + +}; -- 1.8.1.1.dirty