Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1848377pxv; Fri, 2 Jul 2021 13:59:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi73OaCny5xsbt0jY8iECUuQdnK/u9+IQEfSrYxindN49d0RdnQIHGUzflH5C0VeqqFRiy X-Received: by 2002:a17:907:7287:: with SMTP id dt7mr1581055ejc.127.1625259557400; Fri, 02 Jul 2021 13:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625259557; cv=none; d=google.com; s=arc-20160816; b=xHix0hOWA5t8cCBwLL9kRIxj9F506JEywd38derr6Mko7lboU0kPBpkw2doe7N3NQ3 JbAAuQq9rYlSEbjp5Btl4VDi4/CzeGsk9FpJX0hAmA92IMYRpgg6OMufi7VqoSKorV5U 8TyicMPnJeX+c1aJ7Pgy5Ui33l7hEmhxFQzA9mPKK0+Mt2okumn1WUpii4KIut4NSB9p c1gCrw42xtMqhzMAVTJajc53cwraSiYDQx5Db9w6yyYPO4fJliIalNOyFJQpGU39KKlo wGW6idz6UNLR2EAqsq2bdlZ8C/NhPwVa1mS1D+XVBa0LMZzv+dY1OLRYySB0xomOyKp5 IBgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1AEvcX79wTwRSqbgBLrkHdiDfFShg8BM5FD9raF2EWY=; b=PGEg/gLQ0Aj6Y/0h7EoK8bxPIy0yHUd2U8VviGYfhdAB28V6WlurP0+Za25U921P5n GgfvYHS+Ix2p/By3hyOM/IlNjYzA1AgSbJcqFq/kZ2Zjd9l5QVLAwA4rT8VB6dQrrVdy nuVycDlhwvok8k11tUqiKE3LoBsJ1T6VDlMDSlTSCmyfskrMdJXQTsybriUnyADjfIFp fHGL8FU8NawLmmxoeeP0zw2M97qyIdST1vXR5/Xk5Qe3Et/pzn5nO8yKAQSU2h/h1qAY Vn5MAwhUZ351vCaQWtPr//m6q3r0kUazuCd4iKa1E9CdEcvNXr69YgON6EQx1qrExNIx oSdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=IKuq5TBy; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si5017150eje.719.2021.07.02.13.58.53; Fri, 02 Jul 2021 13:59:17 -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; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=IKuq5TBy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230274AbhGBU67 (ORCPT + 99 others); Fri, 2 Jul 2021 16:58:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230377AbhGBU66 (ORCPT ); Fri, 2 Jul 2021 16:58:58 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2718CC061764 for ; Fri, 2 Jul 2021 13:56:26 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id w15so10843337pgk.13 for ; Fri, 02 Jul 2021 13:56:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1AEvcX79wTwRSqbgBLrkHdiDfFShg8BM5FD9raF2EWY=; b=IKuq5TByHH3DkX3ppDM5EBgRgnaAP3gRxzEx/9k8gJBKVC2i35+kz++q7w1A9sq8JK JIe1c7iiGsUtCfUQBtZ1rmKNuKFnY9UJlS3Iyx66zNFBQg2cPztZkL+tPnuQW9g5stJO LofVqXnk0H3/nl3BiqcovVZdRYE/OGJxIczEKYEz3eggxQATcNROQVhd8hOkxxgcj30F NwBFRw1hXahDBiHBoCdhHV7F3jGZ6LH00hhgSFQqx9kmU0LCbpw6JJBPhehoZi9fixSo klkKgmmuHew3Sm0ZZCO8V4IZ5H1kjDrOtBhoxyE1HwvAv2zHOVLJtCCjk9yo93bQCGns BlAQ== 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=1AEvcX79wTwRSqbgBLrkHdiDfFShg8BM5FD9raF2EWY=; b=b9zP/elZ/ZBUMaQnco0fMKXEPtC3TZ+NKjKpBzz92QQPDxg9tLihjZQRjA86yK0yG0 wgxSS+roRaEQ6o35nPfB95+IvtgWNR23o3CroMQVjUZpYaY4rZ6TnOuM/QDCS87z8sGb CVsCQkUGW9VNPRFQbSAo3sbF7ggYtIjiev6pxeoi443sH650ZHaQPoW0DirX5q60HGut Ngb4dMfL8sz643HP1R9FrFOkS8utgF/L7b19H7c/ciVtGElVoYvcnmovQWywsFcJ7WlT jgtkYFgJiqLqg6VpVw78qySJ9egQXjTf71bccv+zn4/WL1wEEPk9vIOiY4e+OQlQVxvQ +5dw== X-Gm-Message-State: AOAM532TN+HUqJgN3bitReSo/6TgQ85oo3jcnjyuGXoUOJu/VB2BEwwD O6zn4alAstnCaX7X6z3Fo/r4izPmHr8upg== X-Received: by 2002:a63:6246:: with SMTP id w67mr1850437pgb.66.1625259385386; Fri, 02 Jul 2021 13:56:25 -0700 (PDT) Received: from x1 ([2601:1c0:4701:ae70:f236:257f:88f9:445e]) by smtp.gmail.com with ESMTPSA id j16sm4908574pgh.69.2021.07.02.13.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 13:56:24 -0700 (PDT) Date: Fri, 2 Jul 2021 13:56:22 -0700 From: Drew Fustini To: Geert Uytterhoeven Cc: Rob Herring , Linus Walleij , Bartosz Golaszewski , Paul Walmsley , Palmer Dabbelt , Michael Zhu , Fu Wei , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , linux-riscv , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Huan Feng Subject: Re: [RFC PATH 1/2] dt-bindings: gpio: add starfive,jh7100-gpio bindings Message-ID: <20210702205622.GA1035183@x1> References: <20210701002037.912625-1-drew@beagleboard.org> <20210701002037.912625-2-drew@beagleboard.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 01, 2021 at 10:34:56AM +0200, Geert Uytterhoeven wrote: > Hi Drew, > > On Thu, Jul 1, 2021 at 2:22 AM Drew Fustini wrote: > > Add bindings for the GPIO controller in the StarFive JH7100 SoC [1]. > > > > [1] https://github.com/starfive-tech/beaglev_doc > > > > Signed-off-by: Drew Fustini > > Signed-off-by: Huan Feng > > Thanks for your patch! > > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/gpio/starfive,jh7100-gpio.yaml > > @@ -0,0 +1,60 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/gpio/starfive,jh7100-gpio.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: StarFive JH7100 GPIO controller > > + > > +maintainers: > > + - Huan Feng > > + - Drew Fustini > > + > > +properties: > > + compatible: > > + items: > > + - const: starfive,jh7100-gpio > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + description: > > + Interrupt mapping, one per GPIO. Maximum 32 GPIOs. > > + minItems: 1 > > + maxItems: 32 > > What about clocks and resets? Thank you for your feedback, Geert. GPIO controller uses clk_apb1_bus under dom0_sys. I believe the device tree node would use something like this: clocks = <&clkgen JH7100_CLK_APB1>; I see the sifive-gpio.yaml has: clocks: maxItems: 1 Would that be the correct way to do it for the starfive gpio yaml? The reset for GPIO controller is presetn under dom_sys. Do you think know you know an example that has reset in the YAML? Is there some code that would actually make use of that information? > > > + > > + gpio-controller: true > > + > > + "#gpio-cells": > > + const: 2 > > + > > + interrupt-controller: true > > + > > + "#interrupt-cells": > > + const: 2 > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - interrupt-controller > > + - "#interrupt-cells" > > + - "#gpio-cells" > > + - gpio-controller Do you think I should add 'clocks' to 'required:'? > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + gpio@11910000 { > > + compatible = "starfive,jh7100-gpio"; > > + reg = <0x11910000 0x10000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + interrupts = <32>; I would add: clocks = <&clkgen JH7100_CLK_APB1>; But I am not sure how reset would work? Thank you, Drew