Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1428337ybd; Wed, 26 Jun 2019 17:47:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxi+OqFEY9OudmFuvkULqdFnQNlUifAgCVgYWIKRpHbnZS4yWDRPf1WhJzYrYxS+gAW1HQa X-Received: by 2002:a63:1303:: with SMTP id i3mr865426pgl.202.1561596427333; Wed, 26 Jun 2019 17:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561596427; cv=none; d=google.com; s=arc-20160816; b=0RlfbtEHvCCEvEamm0BkLdT98BF4fCcd327WJlwZYPpDIuol3uUeMStv8zpvdZhhvB JWhoS75QWEF1TaYOFn3UNqeHXTBqGRkkr3Wogsn/ZcATXCu1II7k2GjH3RlsgSK65uL0 NeM2q+sCaLRsIScWNr6GZfPhLzId8NPxLNy2s+s0dDDSzcM5XBNlMUuyynNdhSaLQJ/m qRF+UXPHSYO808xsxvw/Ca2yZt0Q9Kbe8QoEt1uka1N4Awyy5jUiGQ/vkbZ3RgUBPpLm mC9F2VbGqaMyDl767bpa8P0lzMzbllRpWT/zk+mWMTZkNtOZ+z3Wl7bT2BXOmMBCu8jQ AVjA== 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=fpT0JqDAZ1LbsvcXxvksyaOpwMvPGdmJm6T67E0jq2E=; b=x3fD9xlzVTuW41cuCKkhK3nX99a0R44ls5J1YqfEEmykY2QcambC0L9WjBFTHFTNQb l9JTTso/m75XN0Pq3HrE1rahgSM5C9qBYV62boxWUTGal22DfIlb7XUuCDMYu0QKXYtu mGA6gB9rVeowWoFYQHfA7OfkbkBGHvCrCRyUu9bg8pnDYbVP4oiDESzjHzW9+LXL1mLl ymNFay3uarzQHL9V05CN0Akh4g2uVz99wVyOIq5g+8pnBGvKD0Kd14yOd5Ju+73RCOM1 6rf7SgO3VMCT0hoYlaDzLPHAjKkFlHxOHttfIu1YspzAYCdEHjKkRYjli5FUt3wkTgvU jcxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm3 header.b=kAye16Gf; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=LM8hCUjm; 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 i22si3432350pju.59.2019.06.26.17.46.51; Wed, 26 Jun 2019 17:47:07 -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=kAye16Gf; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=LM8hCUjm; 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 S1727667AbfF0Aou (ORCPT + 99 others); Wed, 26 Jun 2019 20:44:50 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:46461 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbfF0Aor (ORCPT ); Wed, 26 Jun 2019 20:44:47 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 6889E15F0; Wed, 26 Jun 2019 20:44:46 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute4.internal (MEProxy); Wed, 26 Jun 2019 20:44:46 -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=fpT0JqDAZ1LbsvcXxvksyaOpwMvPGdm Jm6T67E0jq2E=; b=kAye16GfKJbU0NWzzWSdIW4HXu0jSNwdtLtrj/7/PWGDrZJ 1e5JBZ7Tghc+ZNOoqTzDVuSXmFjTTUqAV5sijqH3OAn7NBLGoY4Q69Erz+2I5t9k IiT77FX+m0IOwyn8gCeJD4shCjoNa4jNJDy8C/TXvOJ425jIkkCXAqu0J4K97ADt 09tKH1Qq3+RAkp1D371KxmTGvoCYPrDmh9fXT0yN+wy9xRqFmyo7wGPMTJgNj0U0 23DRUuveeE9Vx/ox5BYg4dWWNicsNtAxExF+bV7nQj5NQJXmRWy64amvj522GmKQ WdUxMerQ/ZT48EdjRRueRPo1Q0tPt1uLPOia2qQ== 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=fpT0Jq DAZ1LbsvcXxvksyaOpwMvPGdmJm6T67E0jq2E=; b=LM8hCUjmJFRQPZu5N+06Vi yOpOqYaI5yb+RCXXvI5zrc0TVYUEDDqu0iU0x2uXuyWdh5GY/HCOlELjsKJR7+so mzd0GrG4336P+7+NVNyGYOy+umqgSk1ArpCeFbx2siv2ZGjtO+jCHT0TaMHf/rMK rRm7UT2/WGKjtAsVgvyYjjczjNqzMCpU8D5dXHHvMoXCir4QeAdjdh813F9FFF97 jqiIbXiMPE5Yo1PTdu6K2/SO5P/GZRB9UqiJQlPgY2EFipFBzPQBqiN7eh74z3Ir 2aVvEG8/hUa78s4plNRyXVWLEcwaJqAPjEup1pOJMyr9Y+luR/Djai6wlo93kchA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudejgdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderreejnecuhfhrohhmpedftehnughr vgifucflvghffhgvrhihfdcuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucffohhmrg hinhepuggvvhhitggvthhrvggvrdhorhhgnecurfgrrhgrmhepmhgrihhlfhhrohhmpegr nhgurhgvfiesrghjrdhiugdrrghunecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 343C9E00A2; Wed, 26 Jun 2019 20:44:45 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.6-730-g63f2c3b-fmstable-20190622v1 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20190626071430.28556-1-andrew@aj.id.au> <20190626071430.28556-3-andrew@aj.id.au> Date: Thu, 27 Jun 2019 10:14:40 +0930 From: "Andrew Jeffery" To: "Rob Herring" Cc: "open list:GPIO SUBSYSTEM" , "Ryan Chen" , "Linus Walleij" , "Mark Rutland" , "Joel Stanley" , linux-aspeed@lists.ozlabs.org, "OpenBMC Maillist" , devicetree@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "linux-kernel@vger.kernel.org" Subject: =?UTF-8?Q?Re:_[PATCH_2/8]_dt-bindings:_pinctrl:_aspeed:_Convert_AST2400_?= =?UTF-8?Q?bindings_to_json-schema?= Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Jun 2019, at 23:17, Rob Herring wrote: > On Wed, Jun 26, 2019 at 1:21 AM Andrew Jeffery wrote: > > > > Convert ASPEED pinctrl bindings to DT schema format using json-schema > > BTW, ASPEED is one of the remaining platforms needing the top-level > board bindings converted. Okay, I'll put together patches to fix that. > > > > > Signed-off-by: Andrew Jeffery > > --- > > .../pinctrl/aspeed,ast2400-pinctrl.txt | 80 ------------------- > > .../pinctrl/aspeed,ast2400-pinctrl.yaml | 73 +++++++++++++++++ > > 2 files changed, 73 insertions(+), 80 deletions(-) > > delete mode 100644 Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.txt > > create mode 100644 Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml > > > diff --git a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml > > new file mode 100644 > > index 000000000000..3b8cf3e51506 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml > > @@ -0,0 +1,73 @@ > > +# SPDX-License-Identifier: GPL-2.0+ > > Do you have rights to change the license? Where are you coming from with this question? The bindings previously didn't list a license, is there some implicit license for them? I would have thought it was GPL-2.0? IBM's (my employer's) preferred contribution license is GPL 2.0-or-later, so I was just adding the SPDX marker to clarify. > If so, the preference is to > dual license with (GPL-2.0 OR BSD-2-Clause). You're asking if I have the power to relicense so I can dual license it this way? > > BTW, '-or-later' is the preferred form over '+'. Thanks for the pointer. > > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/pinctrl/aspeed,ast2400-pinctrl.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: ASPEED AST2400 Pin Controller > > + > > +maintainers: > > + - Andrew Jeffery > > + > > +properties: > > + compatible: > > + oneOf: > > + - items: > > + - enum: > > + - aspeed,ast2400-pinctrl > > + - items: > > + - enum: > > + - aspeed,g4-pinctrl > > This can be simplified to: > > compatible: > enum: > - aspeed,ast2400-pinctrl > - aspeed,g4-pinctrl Ah, that makes more sense, I think I was thrown by some details of the example. > > > + > > +required: > > + - compatible > > + > > +description: |+ > > description goes before properties. Okay. I wouldn't have thought the ordering mattered. Is this just a preference? The tools seemed to run fine as is. I'll re-order it regardless. > > > + The pin controller node should be the child of a syscon node with the > > + required property: > > + > > + - compatible: Should be one of the following: > > + "aspeed,ast2400-scu", "syscon", "simple-mfd" > > + "aspeed,g4-scu", "syscon", "simple-mfd" > > + > > + Refer to the the bindings described in > > + Documentation/devicetree/bindings/mfd/syscon.txt > > + > > + For the AST2400 pinmux, each mux function has only one associated pin group. > > + Each group is named by its function. The following values for the function > > + and groups properties are supported: > > + > > + ACPI ADC0 ADC1 ADC10 ADC11 ADC12 ADC13 ADC14 ADC15 ADC2 ADC3 ADC4 ADC5 ADC6 > > + ADC7 ADC8 ADC9 BMCINT DDCCLK DDCDAT EXTRST FLACK FLBUSY FLWP GPID GPID0 GPID2 > > + GPID4 GPID6 GPIE0 GPIE2 GPIE4 GPIE6 I2C10 I2C11 I2C12 I2C13 I2C14 I2C3 I2C4 > > + I2C5 I2C6 I2C7 I2C8 I2C9 LPCPD LPCPME LPCRST LPCSMI MAC1LINK MAC2LINK MDIO1 > > + MDIO2 NCTS1 NCTS2 NCTS3 NCTS4 NDCD1 NDCD2 NDCD3 NDCD4 NDSR1 NDSR2 NDSR3 NDSR4 > > + NDTR1 NDTR2 NDTR3 NDTR4 NDTS4 NRI1 NRI2 NRI3 NRI4 NRTS1 NRTS2 NRTS3 OSCCLK > > + PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 RGMII1 RGMII2 RMII1 RMII2 ROM16 ROM8 > > + ROMCS1 ROMCS2 ROMCS3 ROMCS4 RXD1 RXD2 RXD3 RXD4 SALT1 SALT2 SALT3 SALT4 SD1 > > + SD2 SGPMCK SGPMI SGPMLD SGPMO SGPSCK SGPSI0 SGPSI1 SGPSLD SIOONCTRL SIOPBI > > + SIOPBO SIOPWREQ SIOPWRGD SIOS3 SIOS5 SIOSCI SPI1 SPI1DEBUG SPI1PASSTHRU > > + SPICS1 TIMER3 TIMER4 TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD2 TXD3 TXD4 UART6 > > + USB11D1 USB11H2 USB2D1 USB2H1 USBCKI VGABIOS_ROM VGAHS VGAVS VPI18 VPI24 > > + VPI30 VPO12 VPO24 WDTRST1 WDTRST2 > > This should be a schema. Yeah, I covered this in my cover letter. I was hoping to get away without that for the moment as this seems like the first pinctrl binding to be converted, however if you insist... > You need to define child nodes and list these > as values for 'function' and 'group'. Ideally, the child nodes would > have some sort of pattern, but if not, you can just match on '^.*$' > under patternProperties. > > BTW, You can put the names under a 'definitions' key and then use > '$ref' to reference them from function and group to avoid duplicating > the names. Or use patternProperties with '^(function|group)$'. Okay, I'll take some time to digest this while looking at the documentation. > > Similar comments apply to AST2500 binding. Yes, will fix that too. Thanks for the prompt review! Andrew