Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp533190imu; Fri, 4 Jan 2019 02:29:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN7hSzxrjNElwJAt3ZdqUB2eYVvapCj9slnR/7hOyVJLLVIAEvtvMBLtovi8XjkrHYuMrzbZ X-Received: by 2002:a63:70c:: with SMTP id 12mr1125383pgh.352.1546597747625; Fri, 04 Jan 2019 02:29:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546597747; cv=none; d=google.com; s=arc-20160816; b=LRhmYj6fgJZhVr8kwefMNnE4o+Pl9XiAjjOyKxUAYREEWW1gl9ligprpRroogtWZBz ixKkifRomjSXiqitR+X6s1bL1dvXnadkRKWcZYQW3NlP40XH9DAMAoMpQM994GX7+zaF k4VCFWj/p+evYN+/HsICWB0QQYXXtxsx6lVMvizffkfMFFVydMIoZW4sGb1NgHYQq4We rxlFNBgfBvJGSwvB3pJCBtLItT1msmztvEiZ2RbuKRSVNWtyAz2bmNCCZRUoaI+Y3nmI nYPSy583Oam7bjaB560+Tln0Z4K7W1GremkcASB0CH9W43qXwoMefxoYZhZbyZn+zNfn lt2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6u51BIsMMXbmRTbLhRbUCKsJpr3qx+1t9Ab8jRFSZGI=; b=Myr/u1cEwJujlTfMKKHhQb9dwGbXXNQ/hKas24oqABvNztHzdauLYIenKcq0tMDKNk UNBiYd0+G3/zlfTeAuDKtN5ZPncx/YvrJqLpVlFCW5D69vJiEXy1C7BFYIU+48+3NjMx 92isJLA1mYR+rvjMY+MRGp2n7dZ4kCoKurQ5tawQaoIRf1c0Beloyw47jFkvKllH0URd y28c/d2Vskho+YElN++V+KqsDSMCPOLHlRiYREWB+AvyBJsM3dSAfs5JBAtnbtHwQMep 2GbywNjUBTKIPAsZ42n2Vx454vovrnHWKXFrKQG2U0pHe0dLXRdIrrLf1mBiPCbPFtYY UNTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Iliswcbs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e34si55081191pgb.80.2019.01.04.02.28.52; Fri, 04 Jan 2019 02:29:07 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Iliswcbs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727280AbfADJNo (ORCPT + 99 others); Fri, 4 Jan 2019 04:13:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:56824 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726169AbfADJNn (ORCPT ); Fri, 4 Jan 2019 04:13:43 -0500 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7BE3F218D8; Fri, 4 Jan 2019 09:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546593221; bh=kRhrn0GqHvLVBSyJaj2/l/wYC/wLT07POAcDWSryzu4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IliswcbsjSqTWCHPatLUuVbKCXo5vhEEY0TibX2RTwfD8uPoCiVYFRCBdojgy0iaS hx+JCXeT/PWzB6M0wGAaDsQDbzwwSDkT9c8ZKZQTrg8kJ5wXXVFHl+8p8vjhWQ6ypW Kiu0oKNOxsoS5q5C0LcDWuMay1u9Q7wcG54f/zqA= Received: by mail-wm1-f41.google.com with SMTP id g67so556556wmd.2; Fri, 04 Jan 2019 01:13:41 -0800 (PST) X-Gm-Message-State: AJcUuke6MZF02NJTZDeVxlN64rUxYXrl9Sy+jiOWDNibhnRhf7XwICtz ms+NrG3IOKxVG2dt5RpySSW14JYI7ojnCEeor5w= X-Received: by 2002:a1c:2e43:: with SMTP id u64mr751976wmu.52.1546593219832; Fri, 04 Jan 2019 01:13:39 -0800 (PST) MIME-Version: 1.0 References: <1545984581-25843-1-git-send-email-erin.lo@mediatek.com> <1545984581-25843-6-git-send-email-erin.lo@mediatek.com> <20181228220405.GA8739@bogus> <1546585723.21915.7.camel@mhfsdcap03> In-Reply-To: <1546585723.21915.7.camel@mhfsdcap03> From: Sean Wang Date: Fri, 4 Jan 2019 01:14:33 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 5/6] dt-bindings: pinctrl: mt8183: add binding document To: Zhiyong Tao Cc: Rob Herring , Mark Rutland , "devicetree@vger.kernel.org" , Jason Cooper , srv_heupstream , Marc Zyngier , Greg Kroah-Hartman , =?UTF-8?B?RXJpbiBMbyAo576F6ZuF6b2hKQ==?= , Stephen Boyd , "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "linux-serial@vger.kernel.org" , =?UTF-8?B?TWFycyBDaGVuZyAo6YSt5qOu5Y+LKQ==?= , Matthias Brugger , =?UTF-8?B?WWluZ2pvZSBDaGVuICjpmbPoi7HmtLIp?= , Thomas Gleixner , =?UTF-8?B?RWRkaWUgSHVhbmcgKOm7g+aZuuWCkSk=?= , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 3, 2019 at 11:09 PM Zhiyong Tao wrote: > > On Sat, 2018-12-29 at 06:04 +0800, Rob Herring wrote: > > On Fri, Dec 28, 2018 at 04:09:40PM +0800, Erin Lo wrote: > > > 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. > > > > s/physicall/physical/ > > > > reg should never be optional. > > > > Need to say how many reg entries. > > ==> Thanks for your suggestion. We will change 'reg' to Required > properties and add the reg entries in next version. > > > > > +- reg-names: gpio base registers name. > > > > Need to say what are the names. However, I don't find the names in the > > example all that useful, so I'd just drop it. > > ==> we will add the reg-names in next version. > They are used in the sample code, such as: > > + reg-names = "iocfg0", "iocfg1", "iocfg2", > > > + "iocfg3", "iocfg4", "iocfg5", > > > + "iocfg6", "iocfg7", "iocfg8"; > > > > > > +- 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. > > > + One point we can fix more is the drive-strength already is supported as the generic one, not need to depend on a dedicated header file. > > > +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 { > > > > unit-address without reg property is not valid. > > ==> we will change "i2c0_pins_a: i2c0@0" to "i2c0_pins_a: i2c0" in the > next version. > > > > > + pins1 { > > > + pinmux = , > > > + ; > > > + mediatek,pull-up-adv = <11>; > > > + }; > > > + }; > > > + > > > + i2c1_pins_a: i2c1@0 { > > > + pins { > > > + pinmux = , > > > + ; > > > + mediatek,pull-down-adv = <10>; > > > + }; > > > + }; > > > + ... > > > + }; > > > +}; > > > -- > > > 1.9.1 > > > > > > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek