Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1788569ybt; Thu, 2 Jul 2020 13:59:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwd1NQ2ohTPW896xkYqUIrsU9v3/za5SiHflkdAgCY4eKW7yfQVz6FSqvluBKjJtjB6MdIq X-Received: by 2002:a50:fa07:: with SMTP id b7mr36000934edq.298.1593723585562; Thu, 02 Jul 2020 13:59:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593723585; cv=none; d=google.com; s=arc-20160816; b=HJgTdWi2/emze3l/rwtB67POCbrwkx43WFZF0zIDV9iRKf0t+0LMkDnpMxHTGfRNZ4 QmMZhSTnMl2jsYLOqqJ+pBH7/eywxAPwxc4SFKAEQ8yOg2oA/qfP6J7sScOV3qS7Rq7J 0PmHSLmWsKR87yc3xyTbH/G+/+2/xvO6vjI9VwyrWD3UhvEQAiJO93FRULx3eK9rlGJF fwL43RQ2+u1/3Hf2v+9zSKdiElrqQ90K/IPzhtGn/mnpwDFuZ7SXEhf8iSmPGBk9d66n 5Lql6WJ4FERaiILL++9tZ8ChOTj8wxSlFlGN5cRR+GulmW7xc3DwsllyUWoV4gFH7r4K UVRQ== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=T5vpSNDrCv3It924w2h+o8DX1bZC5q09S/8KHjjhWME=; b=R8uHe+7KZ17eMWg0VVuNzTWMIswwVjXF4G0QLtbsPIaL+VfSzm1LLX3MgPlLm7OAMi nx21d2ES0+/aUBaaCR4WF2X8Txoj8jJXUdLBU/7M91G6HbNd0c23P2sN8T/J8rghD1xh 0kyinI+ub2DupcZeMEbZmM1qQsJ/LRpYN/2KRbTYLIn20lFnQXZsHtjEIVxvkbOFLVPm IymwcJX2kevWmbgYYKF32ZsiaYwOaEkfpyoXM1yrhUst70nCnfVShwPx5JFFJ6/ucAgu iKFsWOKBwBWcx63+kEaZih76HpyYOlu87PBWq8daWfeM0QyN0egu1uf0NSLKi/kDy/Ok kEPQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lu24si6411041ejb.477.2020.07.02.13.59.23; Thu, 02 Jul 2020 13:59:45 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726110AbgGBU64 (ORCPT + 99 others); Thu, 2 Jul 2020 16:58:56 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:36435 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725937AbgGBU64 (ORCPT ); Thu, 2 Jul 2020 16:58:56 -0400 Received: by mail-io1-f68.google.com with SMTP id y2so30392382ioy.3; Thu, 02 Jul 2020 13:58:55 -0700 (PDT) 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; bh=T5vpSNDrCv3It924w2h+o8DX1bZC5q09S/8KHjjhWME=; b=aEniSuNjgV1mg/6ZZgajKKhfC2xw5YOshM/EF848MB4KQuYRCpM0JD3LE/914iaOPg 46fdiFUIX/73MzzuiiBQh6N5kusVrEqXKATvdg3i93xI3VR/vP+V/2zlYZydNHUI81M4 KfMpR3D9vlQheU179s3z5bB+rVei70pT/KtZVoXSBsnM7W8ElVaKu3M8O7Vi+zX4Ymid BDcFVYoGTKqqsyt7IAsi0bR3rPbfV1JO4K8OUy2xgL8YmGyqUXV4/nlRtSX5rpmmr5N6 GfH2XV1Qrz61/14u0oL9zVLOCE5Lc9or6WsqYeme/MZY0uOuzkfnwgj4w8Ggj9sB5nsJ hYhQ== X-Gm-Message-State: AOAM531lXTZKXdQPTMW6m9kmidacMhyAE/tc8qfwQDe3QPTgwNFTHsIE 4BH9IC0xLrBiUAURN29kLA== X-Received: by 2002:a05:6602:2295:: with SMTP id d21mr9253006iod.0.1593723534890; Thu, 02 Jul 2020 13:58:54 -0700 (PDT) Received: from xps15 ([64.188.179.253]) by smtp.gmail.com with ESMTPSA id h1sm2071572iob.8.2020.07.02.13.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 13:58:54 -0700 (PDT) Received: (nullmailer pid 1683187 invoked by uid 1000); Thu, 02 Jul 2020 20:58:52 -0000 Date: Thu, 2 Jul 2020 14:58:52 -0600 From: Rob Herring To: Hanks Chen Cc: Linus Walleij , Matthias Brugger , Michael Turquette , Stephen Boyd , Sean Wang , mtk01761 , Andy Teng , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, wsd_upstream@mediatek.com, CC Hwang , Loda Chou Subject: Re: [PATCH v7 2/7] dt-bindings: pinctrl: add bindings for MediaTek MT6779 SoC Message-ID: <20200702205852.GA1675491@bogus> References: <1593694630-26604-1-git-send-email-hanks.chen@mediatek.com> <1593694630-26604-4-git-send-email-hanks.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1593694630-26604-4-git-send-email-hanks.chen@mediatek.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 02, 2020 at 08:57:05PM +0800, Hanks Chen wrote: > From: Andy Teng > > Add devicetree bindings for MediaTek MT6779 pinctrl driver. > > Signed-off-by: Andy Teng > --- > .../bindings/pinctrl/mediatek,mt6779-pinctrl.yaml | 210 ++++++++++++++++++++ > 1 file changed, 210 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml > > diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml > new file mode 100644 > index 0000000..3a9fc4d > --- /dev/null > +++ b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml > @@ -0,0 +1,210 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pinctrl/mediatek,mt6779-pinctrl.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Mediatek MT6779 Pin Controller Device Tree Bindings > + > +maintainers: > + - Andy Teng > + > +description: |+ > + The pin controller node should be the child of a syscon node with the > + required property: > + - compatible: "syscon" > + > +properties: > + compatible: > + const: mediatek,mt6779-pinctrl > + > + reg: > + minItems: 9 > + maxItems: 9 > + description: | > + physical address base for gpio-related control registers. Need to describe what each entry is. items: - description: ... - description: ... - description: ... > + > + reg-names: > + description: | > + GPIO base register names. The names are "gpio", "iocfg_rm", > + "iocfg_br", "iocfg_lm", "iocfg_lb", "iocfg_rt", "iocfg_lt", > + "iocfg_tl", "eint"; The names should be a schema. > + > + gpio-controller: true > + > + "#gpio-cells": > + const: 2 > + description: | > + 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: > + minItems: 1 > + maxItems: 5 > + description: | > + GPIO valid number range. > + > + interrupt-controller: true > + > + interrupts: > + maxItems: 1 > + description: | > + Specifies the summary IRQ. > + > + "#interrupt-cells": > + const: 2 > + > +required: > + - compatible > + - reg > + - reg-names > + - gpio-controller > + - "#gpio-cells" > + - gpio-ranges > + - interrupt-controller > + - interrupts > + - "#interrupt-cells" > + > +patternProperties: > + '-[0-9]*$': > + type: object > + patternProperties: > + '-pins*$': > + type: object > + description: | > + 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. Need to include the pinconf schema here. > + > + properties: > + pinmux: > + description: > + 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. > + > + bias-disable: > + type: boolean Don't redefine the type. Just indicate what common properties are used: bias-disable: true > + > + bias-pull-up: > + type: boolean > + > + bias-pull-down: > + type: boolean > + > + input-enable: > + type: boolean > + > + input-disable: > + type: boolean > + > + output-low: > + type: boolean > + > + output-high: > + type: boolean > + > + input-schmitt-enable: > + type: boolean > + > + input-schmitt-disable: > + type: boolean > + > + mediatek,pull-up-adv: > + description: | > + Pull up setings for 2 pull resistors, R0 and R1. User can > + configure those special pins. Valid arguments are described as below: > + 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. > + 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. > + 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. > + 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled. > + allOf: You can drop the allOf now. > + - $ref: /schemas/types.yaml#/definitions/uint32 > + - enum: [0, 1, 2, 3] > + > + mediatek,pull-down-adv: > + description: | > + Pull down settings for 2 pull resistors, R0 and R1. User can > + configure those special pins. Valid arguments are described as below: > + 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. > + 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. > + 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. > + 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled. > + allOf: > + - $ref: /schemas/types.yaml#/definitions/uint32 > + - enum: [0, 1, 2, 3] > + > + drive-strength: > + description: | > + Selects the drive strength for the specified pins in mA. > + allOf: > + - $ref: /schemas/types.yaml#/definitions/uint32 > + - enum: [2, 4, 6, 8, 10, 12, 14, 16] > + > + required: > + - pinmux > + > + additionalProperties: false > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + > + pio: pinctrl@10005000 { > + compatible = "mediatek,mt6779-pinctrl"; > + reg = <0 0x10005000 0 0x1000>, > + <0 0x11c20000 0 0x1000>, > + <0 0x11d10000 0 0x1000>, > + <0 0x11e20000 0 0x1000>, > + <0 0x11e70000 0 0x1000>, > + <0 0x11ea0000 0 0x1000>, > + <0 0x11f20000 0 0x1000>, > + <0 0x11f30000 0 0x1000>, > + <0 0x1000b000 0 0x1000>; > + reg-names = "gpio", "iocfg_rm", > + "iocfg_br", "iocfg_lm", > + "iocfg_lb", "iocfg_rt", > + "iocfg_lt", "iocfg_tl", > + "eint"; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = <&pio 0 0 210>; > + interrupt-controller; > + #interrupt-cells = <2>; > + interrupts = ; > + > + mmc0_pins_default: mmc0-0 { > + cmd-dat-pins { > + pinmux = , > + , > + , > + , > + , > + , > + , > + , > + ; > + input-enable; > + mediatek,pull-up-adv = <1>; > + }; > + clk-pins { > + pinmux = ; > + mediatek,pull-down-adv = <2>; > + }; > + rst-pins { > + pinmux = ; > + mediatek,pull-up-adv = <0>; > + }; > + }; > + }; > + > + mmc0 { > + pinctrl-0 = <&mmc0_pins_default>; > + pinctrl-names = "default"; > + }; > -- > 1.7.9.5