Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1302519ybi; Fri, 12 Jul 2019 13:19:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzJ/97V//f6JqBuiTUGeypCmI6H3yQXCYVTc4kInsU4BzUBb3LWYBQiQDqoNN7YxA/aG1z X-Received: by 2002:a17:90a:22c6:: with SMTP id s64mr14469595pjc.5.1562962763472; Fri, 12 Jul 2019 13:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562962763; cv=none; d=google.com; s=arc-20160816; b=CTVLg2HN30LBqMn+Hvd5eyxBZYTgFH6adIY/UJoYOxLqUN+wbl1yfDD7MQjyTGvdRN guObjJhTc2j+66U3X0wTUAnWR0A35gdwvt0EAz9FB6WUUoY6R95ULb229rN2xshArr6f EDY5BsJQrMLs7VMh8fCICQKT/7z6Lo/bdN3CxqTGTSt4ILfzyOusbqwF13Ha+PCHvxln ljgtYUL6I9RXGc0kNMfJQTvSo9/NucxdlGftEWUH326uB9WylBU4Tin84O0HHh03w93s oK937eXwg0hvYoxUKjtlQ7QdrZaU02KLZb9siaOaPRzJmYWmeWBNmIDryhvLO+j0cAdJ /mlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=VTnJueDtmlSLiTPDyywi3T+5zTGV1ZTZogno9rNcdfU=; b=vIN+OnLHi2LgDHL01mKpnlpHwHBlk1zkcg8J2hMgY7J6AAESnc+TyArANkydWsAcaB 4aqxfVTIXwEX9quOoETXEkHqa0jRhqAWY/0TlonGPa2cWZdlBOv9eUGfzV6tctMfalCD D56+Q2/NF/Uc3ZJYhep6HQqvqHxTvzx2uDQGJ+NqM0ex5XN/35Mg3/gIXChN7W0fBggO 2+s/nSzYxqAyh2nYN3UU+pvUIJe4XLax5kv/Z0pG4ujns0PHrzvNbZ5bcMsFFT740sOZ V4RVF5zR1osAd+majG44A4/KrgKg3Ej2LUrB96BTf90YkefycHlwwK+etijXMtmt9vTD V3fQ== 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 k32si9139912pjb.11.2019.07.12.13.19.07; Fri, 12 Jul 2019 13:19:23 -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; 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 S1727603AbfGLUSm convert rfc822-to-8bit (ORCPT + 99 others); Fri, 12 Jul 2019 16:18:42 -0400 Received: from atlmailgw2.ami.com ([63.147.10.42]:50845 "EHLO atlmailgw2.ami.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727125AbfGLUSl (ORCPT ); Fri, 12 Jul 2019 16:18:41 -0400 X-AuditID: ac10606f-d27ff70000003324-2c-5d28eb20fe7f Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw2.ami.com (Symantec Messaging Gateway) with SMTP id 2A.D9.13092.02BE82D5; Fri, 12 Jul 2019 16:18:40 -0400 (EDT) Received: from ATLMS2.us.megatrends.com ([fe80::29dc:a91e:ea0c:cdeb]) by atlms1.us.megatrends.com ([fe80::8c55:daf0:ef05:5605%12]) with mapi id 14.03.0415.000; Fri, 12 Jul 2019 16:18:40 -0400 From: Hongwei Zhang To: Andrew Jeffery , "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 Thread-Topic: [linux,dev-5.1 v1] dt-bindings: gpio: aspeed: Add SGPIO support Thread-Index: AQHVMdoYoxHDUhbFgEKYqLGYV+TuK6bDajmAgAQPB2A= Date: Fri, 12 Jul 2019 20:18:39 +0000 Message-ID: <14D3C8298A3B0F42A1EB31EE961CFF82AA8F46AD@atlms2.us.megatrends.com> References: <1562184069-22332-1-git-send-email-hongweiz@ami.com> <9c998f5f-42ef-43bd-b024-839ee00126de@www.fastmail.com> In-Reply-To: <9c998f5f-42ef-43bd-b024-839ee00126de@www.fastmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.100.241] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRmVeSWpSXmKPExsWyRiBhgq7Ca41Yg2ddlha7LnNYzD9yjtXi 9/m/zBZT/ixnsmhefY7Z4vKuOWwWS69fZLJo3XuE3YHD42r7LnaPNfPWMHpc/HiM2WPTqk42 jzvX9rB5nJ+xkNHj8ya5APYoLpuU1JzMstQifbsEroyJXbeZCnZLV8y/+4utgXGeWBcjJ4eE gInE77YNLCC2kMAuJonpTZVdjFxA9mFGiRsHJrOCJNgE1CSe/mlgB0mICKxhlLh59igjiMMs cJZRYs2lL8wgVcICPhInfi4HGyUi4CvRfaaFEcK2kthwpRksziKgKvHg8H8mEJtXwF/iat8M dojVVRIrdveAbeMUcJFYMm0LG4jNKCAm8f3UGrB6ZgFxiVtP5jNBnC0gsWTPeWYIW1Ti5eN/ rBC2kkTDin9Q9ToSC3Z/YoOwtSWWLXzNDLFXUOLkzCcsExhFZyEZOwtJyywkLbOQtCxgZFnF KJRYkpObmJmTXm6kl5ibqZecn7uJERKP+TsYP340P8TIxMF4iFGCg1lJhHfVf/VYId6UxMqq 1KL8+KLSnNTiQ4zSHCxK4ryr1nyLERJITyxJzU5NLUgtgskycXBKNTDOuNgu7FYhZ62Vr6Pq paWRFbEkjbs2XfKugNzi21e3xUjVbLjafTqRc3HIdtGHGWXSfLwpk/dmy91riZzT2Lfkg/vV fxaJzdebb7861LTeOGKN49vGJ3Vbvn9TvLlxxb4XpQaHNl1TS34WsVFsVZl5hPgsbbfv5V8c GR9tV9GYu2/Z4d9hn/mVWIozEg21mIuKEwGO1G0stQIAAA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for your review, Andrew, Just submitted an updated binding document, with new proper subject line: [PATCH 2/3 v2] dt-bindings: gpio: aspeed: Add SGPIO support Regards, --Hongwei -----Original Message----- From: Andrew Jeffery Sent: Tuesday, July 9, 2019 10:16 PM 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 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 > >