Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8591710ybi; Tue, 9 Jul 2019 19:18:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyi1g4Q7kmuCRMvU18U8/btU41HvC6q+DjvYD6HFMWYoqRveZ9oxd5xmEwAAPnyJfhZmbuy X-Received: by 2002:a17:90a:8d0c:: with SMTP id c12mr3584721pjo.140.1562725084544; Tue, 09 Jul 2019 19:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562725084; cv=none; d=google.com; s=arc-20160816; b=zwFp1B29iPEiZVO9MLaa14K6Iv0aKFRklwsAQ/bweIPpCIlqPnqJ6qM6nqZZ571z3f x37a/DFz+xg8W+CnH1NylNaTEqM+QAklVi+F+6+gon3Xib1EiXJH+Z0rB3uyPe5ZjFMC 2BHJHhjeWNw0kJegtNW0sYPLR7fddqrt9VJ5d82VOwELc0Q8UN7s5C0L/VukCH/5dsud DUASnghL85EV9Ky8Z9gjTC1t09jLe48TZntkhXbRJgkI5wNLWoRFwAdXQFs1VuLV8rhO N9Qn75bfGnMFKF0gtqscNaiZaYa1ku+kGUeV5zxAwjvV2gT5Zkgz0x1+WNb7Bcd4J9Tc dksQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:user-agent:dkim-signature :dkim-signature; bh=5bWrIcP8UjAg5UmoomU2W8F9lAlb5kNyGswff6nCzsI=; b=gMC6Av0Q6LIoh7/rHGUgVyjaysuf2yh0o9kBJkdJal5xXLcwUbhb8PpBAuN59JYs8s Xwrpne4Xu3PS9SwOqY4dzoJ92u7dZj351+/FQAKRq84RTjUNQMV5xyjD/c197FnHekgw q9Tn5BTl/Xu1N6JpYEsgKdaQZhmPSE91p4EcSKQBrTXFidZzp0Z+hZhnd3VvM1lUxgDs aOme3DeEaxLXCLg5hB49qW+EAq3JfF0K4Of7mSzyBpLS7Fy1O4kiZKmHIQWNdbjPITbh sH9oADFa+1rAMPV0E/eRAeKGYl9RAIXGX/n0QBVGrvTf3zUqNoAkNk+tPESeN5zzZbNo 5Rkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm3 header.b=N5HOs7+r; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=rFoFNF7V; 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 33si685430plu.126.2019.07.09.19.17.49; Tue, 09 Jul 2019 19:18:04 -0700 (PDT) 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=@aj.id.au header.s=fm3 header.b=N5HOs7+r; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=rFoFNF7V; 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 S1726122AbfGJCQG (ORCPT + 99 others); Tue, 9 Jul 2019 22:16:06 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:36031 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbfGJCQG (ORCPT ); Tue, 9 Jul 2019 22:16:06 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2EC4122460; Tue, 9 Jul 2019 22:16:05 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute4.internal (MEProxy); Tue, 09 Jul 2019 22:16:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm3; bh=5bWrIcP8UjAg5UmoomU2W8F9lAlb5kN yGswff6nCzsI=; b=N5HOs7+r/2TZvYRABQ4YWWnYO2Ie8R/7nMD6N3kktwfqBsc WFBGym4M379zo71+ww9HItVnfeB+UfwDN0ImjXLJn0ObHQhKAMJYelRmTpiq8Yew +b/fMAxaPcLLvHZr8zmf90JfWqg+THvTNaTR+2bzgFJ8YI7+XiF3wJ7QTeRg64ky jFeGA+wL7FmPh4Om49B1wfHybk7FYpKEE8tcbBvCa3FLOqLRBHlQgbrOcl1VChhd fTtr5u7kd6D5v3wj6lLdDNGicPCPYkIIagN2IWFZxM2XhF1B4xZ5vXlIlIp9OI1i 1QT0G+pmCzKmK50fMWD0rLVk2Y+1IEDCZ3d2IvA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=5bWrIc P8UjAg5UmoomU2W8F9lAlb5kNyGswff6nCzsI=; b=rFoFNF7VTheq4MajAP4eWv tCsH1eTUG0hw6Jrj4alZRgVhsi9z+1yo5Ki4CcyHJeTQrUKgA0eBjlBT4cpB+zbh YwnEMC9DNOCYG9yj0wXMcPpNLc61O0XEGuVi4N3pCtoON5S3G535G8rKiDI+ST5x JvXYjl0BYv7/OT8u48OCPXIjzRlq1NSXcNYUo0bn9ptWy8Kt+To1Ax4EA9CrCLq/ USWx/QMWwveWfEX/khKk3vNvAejc6gXrxAoDyvXuQVXgmjeMWOiautovFyB/Gnte ce571NETXRQCPiZdoQov0gMqwyvSbnQZvf4MKq8WrZbbW9/yyrHrUmbmJhr6x8Qw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrgeehgddtvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedftehnughr vgifucflvghffhgvrhihfdcuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucfrrghrrg hmpehmrghilhhfrhhomheprghnughrvgifsegrjhdrihgurdgruhenucevlhhushhtvghr ufhiiigvpedt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 660EFE0193; Tue, 9 Jul 2019 22:16:04 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.6-731-g19d3b16-fmstable-20190627v1 Mime-Version: 1.0 Message-Id: <9c998f5f-42ef-43bd-b024-839ee00126de@www.fastmail.com> In-Reply-To: <1562184069-22332-1-git-send-email-hongweiz@ami.com> References: <1562184069-22332-1-git-send-email-hongweiz@ami.com> Date: Wed, 10 Jul 2019 11:46:09 +0930 From: "Andrew Jeffery" To: "Hongwei Zhang" , devicetree@vger.kernel.org, "Joel Stanley" , "Linus Walleij" Cc: "Rob Herring" , "Mark Rutland" , linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [linux,dev-5.1 v1] dt-bindings: gpio: aspeed: Add SGPIO support Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Jul 2019, at 05:31, Hongwei Zhang wrote: > Add bindings to support SGPIO on AST2400 or AST2500. > > Signed-off-by: Hongwei Zhang > --- > .../devicetree/bindings/gpio/sgpio-aspeed.txt | 36 ++++++++++++++++++++++ > 1 file changed, 36 insertions(+) > create mode 100644 Documentation/devicetree/bindings/gpio/sgpio-aspeed.txt > > diff --git a/Documentation/devicetree/bindings/gpio/sgpio-aspeed.txt > b/Documentation/devicetree/bindings/gpio/sgpio-aspeed.txt > new file mode 100644 > index 0000000..f5fc6ef > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/sgpio-aspeed.txt > @@ -0,0 +1,36 @@ > +Aspeed SGPIO controller Device Tree Bindings > +------------------------------------------- > + > +Required properties: > +- compatible : Either "aspeed,ast2400-sgpio" or "aspeed,ast2500-sgpio" > + > +- #gpio-cells : Should be two > + - First cell is the GPIO line number > + - Second cell is used to specify optional > + parameters (unused) > + > +- reg : Address and length of the register set for the device > +- gpio-controller : Marks the device node as a GPIO controller. > +- interrupts : Interrupt specifier (see interrupt bindings for > + details) > +- interrupt-controller : Mark the GPIO controller as an > interrupt-controller As this is a serial GPIO controller, a critical piece of configuration information is how many GPIOs we wish to serialise. This is done in multiples of 8, up to 80 pins. The bindings need to describe the "ngpios" property from the generic GPIO bindings and how this affects the behaviour of the controller. We also need to add the "bus-frequency" property here to control the rate of SGPMCK. > + > +Optional properties: > + > +- clocks : A phandle to the clock to use for debounce > timings We need this, but not for the reason specified, and it should be a required property. We need PCLK (the APB clock) to derive the SGPIO bus frequency. Despite what the datasheet blurb says, there's no debounce control for the SGPIO master (this is a copy/paste mistake from the description of the parallel GPIO master). > + > +The sgpio and interrupt properties are further described in their > respective > +bindings documentation: > + > +- Documentation/devicetree/bindings/sgpio/gpio.txt > +- Documentation/devicetree/bindings/interrupt-controller/interrupts.txt > + > + Example: > + sgpio@1e780200 { > + #gpio-cells = <2>; > + compatible = "aspeed,ast2500-sgpio"; > + gpio-controller; > + interrupts = <40>; > + reg = <0x1e780200 0x0100>; > + interrupt-controller; > + }; You'll need to fix up the example after making the changes mentioned above. Andrew > -- > 2.7.4 > >