Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3977766pxb; Sun, 24 Oct 2021 16:27:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM9e6Hmrhl/+yQZdAy/4uoxfRigg1yWubMSmbfsAYbJyYOk1c+vw2/gjnC0Qpx4gxwHeiY X-Received: by 2002:a17:907:2062:: with SMTP id qp2mr18270592ejb.453.1635118030004; Sun, 24 Oct 2021 16:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635118029; cv=none; d=google.com; s=arc-20160816; b=aRy+ewbs3f2p+KHU92gjJxeeKIJP2IgJ/8ynCGIef20mhaJfC9+RY8yjOlPb/8InuD CTc1yt5pNeopNbdbCZqaO8uavyCId2z4McRyU7b3IAGgwz0YDOdu53aFPJinShUb3Xh6 8UsIHvRJBbp5MBMcVxsaM/QrYEPP8hAW5OvNkCR2LT+PNXMvO1hPu0KHLvoCi8Oj4PzN S0PKVQeagiqM+H5e55RiQp5O7MHTWVDpS4cQQbz3MUsbXHqaCdYlbXAoMIuGFKeL1N5v Z1xqlcPI92hwgUNpJfkcs1E9UDjmHKgB5x+rqfxTxtUsI+PRsfEqO6Smi0a2OtSv0NCh WzPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1vsRSHd5ol8s+6s2RmI1HSUriW3Srp1b0zXswHBU7Sk=; b=n7pbIgW3cCctdCpxMdqlhzCopKRFnrA7nnD8+g4GOzKo9lV6H9rLoNanYHvFQy40Dh nvKWUGKJPs3auxSN3+UUN+uhCpnInio/OgUAu0a6yxQNGrYSUzxf6KbUmRAqfe1vU83W hH6KQyltSWoUlVrZhTFu7s/+cbEqTXkToVH6dhncLhdbhkh3mGLVVCbIXShLxqVjDojP 9yDcmokRDBgWvXbcsJU6nRqtRp2qxR5U9BZ42LbgAd0QmcZGB9rE0C1jR42+aWYH/fE5 nKA2rGokbV2nn03lIbWfEkM/KptpLISOzUjwTUiE7WTAu0I7e4KVENuwWE3g6IubLsrO N7TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fbe4EIds; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp11si20546388ejc.3.2021.10.24.16.26.45; Sun, 24 Oct 2021 16:27:09 -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=@linaro.org header.s=google header.b=Fbe4EIds; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229706AbhJXXNm (ORCPT + 99 others); Sun, 24 Oct 2021 19:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbhJXXNl (ORCPT ); Sun, 24 Oct 2021 19:13:41 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D21DC061243 for ; Sun, 24 Oct 2021 16:11:20 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id g8so6871906ljn.4 for ; Sun, 24 Oct 2021 16:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1vsRSHd5ol8s+6s2RmI1HSUriW3Srp1b0zXswHBU7Sk=; b=Fbe4EIds06j7G15aUzedORb13lKIjQ6UiPypMt2r3Za3UkwMy3eZjMeqrH72ZYFrTs r8q7Xz0FkqCRKj57sd4OSEzXDwuhh3wq32AKWpty61ch5UA/SFwkpc+7dDPJEdkrrbAE mVDrQsy3h3IongKhzglUoxh8y3AIsZA27Fq6xk2oaDprAjT9vW1Xox4IaQisRGixQYr5 OqySCDG5ZsJMLA8aSr6+JqAwIRDuHGCbAlt4SA3g6LphVfONBIDlGoYC7VW/MfBllOq+ yZt55HEO30faBn4r38/QxRyweFJ9NRLRmVtzqWNka692YwBWW15nQAEUQ8dEWs9C18+9 FtPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1vsRSHd5ol8s+6s2RmI1HSUriW3Srp1b0zXswHBU7Sk=; b=u+tTkdsHG/wmzsnFmB6xiqKbAJno5wZxB/2sbOyFF67nM6jBal3x1jljHSmLXjrz4A B84mmVsR/slAA6e7Mg3N4vTcEd90cRNLjz9JfCjNjFWRmP+ZDpSNdF2oiUGrEyjahpBD 71RtpmCBpXDzm1q5IFQP4/ShtmQ5+aiwVP3jDAMQhJY1wD5Vwp4wjpdDJqXWTQwCDy0Y qq1IESFevG0/JEXySEnEd9B4yRB548H5NAbRwmRZ7MIXkTgUwFFiNOyg/fkYPVOd3vOG i3WgTlPbZ50nPPFAAethZc+S5isKPkPEI/b96UWjF/8nSQ41hCgHcGlffQ0kVAYS6KmD Ax1Q== X-Gm-Message-State: AOAM532YgU9Ni3uKBbHhRbIhdvAqgS4gu7QN/yxTBVQ891CP/Kath3V1 rT8YC7DAl/SG04QhtTSW+Rxh+rvEO8c74b6cz7ZL9A== X-Received: by 2002:a05:651c:111:: with SMTP id a17mr14808602ljb.145.1635117078094; Sun, 24 Oct 2021 16:11:18 -0700 (PDT) MIME-Version: 1.0 References: <20211021174223.43310-1-kernel@esmil.dk> <20211021174223.43310-12-kernel@esmil.dk> In-Reply-To: <20211021174223.43310-12-kernel@esmil.dk> From: Linus Walleij Date: Mon, 25 Oct 2021 01:11:06 +0200 Message-ID: Subject: Re: [PATCH v2 11/16] dt-bindings: pinctrl: Add StarFive JH7100 bindings To: Emil Renner Berthing Cc: linux-riscv , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-clk , "open list:GPIO SUBSYSTEM" , "open list:SERIAL DRIVERS" , Palmer Dabbelt , Paul Walmsley , Rob Herring , Michael Turquette , Stephen Boyd , Thomas Gleixner , Marc Zyngier , Philipp Zabel , Greg Kroah-Hartman , Daniel Lezcano , Andy Shevchenko , Jiri Slaby , Maximilian Luz , Sagar Kadam , Drew Fustini , Geert Uytterhoeven , Michael Zhu , Fu Wei , Anup Patel , Atish Patra , Matteo Croce , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 21, 2021 at 7:42 PM Emil Renner Berthing wrote: > Add bindings for the StarFive JH7100 GPIO/pin controller. > > Signed-off-by: Emil Renner Berthing That is a very terse commit message for an entirely new SoC, please put a little blurb about this silicon there. Like mention that it is RISC-V at least. Overall quite interesting! > +$id: http://devicetree.org/schemas/pinctrl/starfive,jh7100-pinctrl.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: StarFive JH7100 Pin Controller Device Tree Bindings > + > +maintainers: > + - Emil Renner Berthing > + - Drew Fustini Add description: talking about that this is a RISC-V SoC and other implicit things that are really good to know. > + starfive,signal-group: > + description: | > + The SoC has a global setting selecting one of 7 different pinmux > + configurations of the pads named GPIO[0:63] and FUNC_SHARE[0:141]. After > + this global setting is chosen only the 64 "GPIO" pins can be further > + muxed by configuring them to be controlled by certain peripherals rather > + than software. > + Note that in configuration 0 none of GPIOs are routed to pads, and only > + in configuration 1 are the GPIOs routed to the pads named GPIO[0:63]. > + If this property is not set it defaults to the configuration already > + chosen by the earlier boot stages. > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1, 2, 3, 4, 5, 6] This still is hard for me to understand. Does it mean that 0..6 define how the direct-to-peripheral-pins are set up? Then it would make sense to describe what happens for 0, 1, 2 ...6 i.e. what the different set-ups are. Actually this is what we call group-based pin multiplexing in Linux, this property seems to avoid using that concept. See for example: Documentation/devicetree/bindings/pinctrl/cortina,gemini-pinctrl.txt > + patternProperties: > + '-pins*$': > + type: object > + description: | > + A pinctrl node should contain at least one subnode 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, bias, input enable/disable, input schmitt > + trigger enable/disable, slew-rate and drive strength. > + $ref: "/schemas/pinctrl/pincfg-node.yaml" Nice that you use pincfg-node.yaml > + properties: > + pins: > + description: | > + The list of pin identifiers that properties in the node apply to. > + This should be set using either the PAD_GPIO or PAD_FUNC_SHARE > + macro. Either this or "pinmux" has to be specified. > + > + pinmux: > + description: | > + The list of GPIO identifiers and their mux settings that > + properties in the node apply to. This should be set using the > + GPIOMUX macro. Either this or "pins" has to be specified. What about referencing Documentation/devicetree/bindings/pinctrl/pinmux-node.yaml for this? Yours, Linus Walleij