Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1342889ybf; Fri, 28 Feb 2020 20:13:56 -0800 (PST) X-Google-Smtp-Source: APXvYqy/hink1Qv4Oh92YUnVm3pf5koIDjqkISi80uckAZOvh/JTfLeGPo7MJzWT6bCxIprOojCv X-Received: by 2002:a9d:638a:: with SMTP id w10mr5955793otk.130.1582949636412; Fri, 28 Feb 2020 20:13:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582949636; cv=none; d=google.com; s=arc-20160816; b=XL5EKCTq2flJ/5ZeaOjUWNneq2klKAVM2PDH7KUEcidDbLGnwLpWjEnG0373DymkoV Sa52G9bhJHWMLmsPvlwCBBaXF4qxwSHGqzVSO5Vghrvi2MVj1CZpHuuGoQOlIRGEH0En qwPqhBObvLqR7AjZylyAGCXJpOUJQJ2MvoPJOKLMdNlsfPfqA/idhWpT+ObbEiNFBxBe fugd6E+5aVBglJqea3DH5r0J6uY7Urrf6A1JfQO6Wr3zCVd7b8sAmy+khYR2BXttIDWL /1PwNVtZSL5qN3rzqBHF9TUZKP5ibC8Si1+nPxzaWU+OeVXRWJoc/SnFV3loURnwT8hF 8vSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=a0pOxn4yBaf/CY6aaFvzsHrraptkGWxpAnq3v9ZlKRY=; b=R1Cvq+CTxT47MNuMS9ENsxjuryZ/xFV0dmTpJ3m9ZfMFia7FGXfoboxNExSwMfbGuL Z1YwHY6wx+PiskRh5ousguP8WfGF+dAIr4X+dKQqN1Ame1IteLRqCp8C8HVPWACYW4SJ cMHtaaVf2djtuRbYGIYdWsTyq0/N7fVk20gD/HnHwgkgNJ4hyRq7RRMNoScE4eXlFxWc OZS6XKylSzOxPLvmFPt4hLIQBXWkzf7gA6fIboJV65sjPD55MPAcVetWo7aiJnW4jC5l 7OVAaf7yOhQo0FYuZ2py8TX9zk4tcCoUvUmSkP1D9DFicxFSpEChPnLHxUd0+6WafmQQ L2AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fOA7El3g; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t20si2454501otr.64.2020.02.28.20.13.43; Fri, 28 Feb 2020 20:13:56 -0800 (PST) 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=@nifty.com header.s=dec2015msa header.b=fOA7El3g; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbgB2ENZ (ORCPT + 99 others); Fri, 28 Feb 2020 23:13:25 -0500 Received: from conssluserg-06.nifty.com ([210.131.2.91]:48703 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbgB2ENY (ORCPT ); Fri, 28 Feb 2020 23:13:24 -0500 Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 01T4D41A025071; Sat, 29 Feb 2020 13:13:05 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 01T4D41A025071 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1582949585; bh=a0pOxn4yBaf/CY6aaFvzsHrraptkGWxpAnq3v9ZlKRY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fOA7El3gUZ+0vookKfso5oCJGJGXdyvfax5sR2I/8GpIokf76DL8pZ24WAfMfeSsr U7g4VUlvoWMwe1QlKJpl07c3DuxJ/MGi0QDqFrqw6n0JpWMNuoLETbC07BHzdeAItd MTQLLRf2TjHMAKc/3tbB7Meg8Bk2AHfj+eeqIC3P+Qr4p1rWTzJ8zuBuapk70KdDKh UM/w7Twnn9o3Ak63xkR61NljF9Zv95d9dv0KWFD3oEATkysMmFDXXO2EO88kCU9Hmv qfPybMSMqk+vbkeDzepC1vTHr+Byx7sq7FNW+a9XY6bWhiE2oUUqJNYSbl3XJmHi+E +zHW1cnleh1kw== X-Nifty-SrcIP: [209.85.217.48] Received: by mail-vs1-f48.google.com with SMTP id a19so3132715vsp.6; Fri, 28 Feb 2020 20:13:05 -0800 (PST) X-Gm-Message-State: ANhLgQ2esNiX7087hKcGA+ocLH9MW4dfAtWIvmgEEqlDDnSe/eIOFREJ B1qYzWTkhdM7wvHgVRKSHSbnergQsoseF/+f8F8= X-Received: by 2002:a05:6102:3102:: with SMTP id e2mr4205619vsh.179.1582949583909; Fri, 28 Feb 2020 20:13:03 -0800 (PST) MIME-Version: 1.0 References: <20200221021002.18795-1-yamada.masahiro@socionext.com> <20200221021002.18795-3-yamada.masahiro@socionext.com> In-Reply-To: From: Masahiro Yamada Date: Sat, 29 Feb 2020 13:12:27 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] dt-bingings: pinctrl: Convert UniPhier pin controller to json-schema To: Linus Walleij Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Herring , Frank Rowand , "David S. Miller" , Greg Kroah-Hartman , Jonathan Cameron , Mark Rutland , Mauro Carvalho Chehab , Linux ARM , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On Sat, Feb 29, 2020 at 7:13 AM Linus Walleij wrote: > > On Fri, Feb 21, 2020 at 3:10 AM Masahiro Yamada > wrote: > > > Convert the UniPhier pin controller binding to DT schema format. > > > > Signed-off-by: Masahiro Yamada > > Nice! > > > In the original .txt file, there is a description: > > The UniPhier pinctrl should be a subnode of a "syscon" compatible node > > > > I did not figure out how to represent (or check) it in dt-schema. > > I just moved it to a comment line in 'examples'. > > If there is a better way, please let me know. > > There is no way to do that AFAICT, we are checking nodes from > one node and downwards, never upwards. The syscon needs to > have its own binding file: if it has another specific compatible > such as compatible = "foo", "syscon"; then for the DT bindings > for foo, make sure to add this subnode as optional/compulsory > if you want to tie up the whole thing. Thanks for your advice. Documentation/devicetree/bindings/mfd/syscon.yaml already contains sunxi-specific compatibles, but I hesitate to add more and more platform-specific stuff in this file. Maybe, I can add Documentation/devicetree/bindings/mfd/socionext,uniphier-soc-glue.yaml and then, check 'reg' and compulsory sub-nodes. > > -Required properties: > > -- compatible: should be one of the following: > > - "socionext,uniphier-ld4-pinctrl" - for LD4 SoC > > - "socionext,uniphier-pro4-pinctrl" - for Pro4 SoC > > - "socionext,uniphier-sld8-pinctrl" - for sLD8 SoC > > - "socionext,uniphier-pro5-pinctrl" - for Pro5 SoC > > - "socionext,uniphier-pxs2-pinctrl" - for PXs2 SoC > > - "socionext,uniphier-ld6b-pinctrl" - for LD6b SoC > > - "socionext,uniphier-ld11-pinctrl" - for LD11 SoC > > - "socionext,uniphier-ld20-pinctrl" - for LD20 SoC > > - "socionext,uniphier-pxs3-pinctrl" - for PXs3 SoC > > But: > > > + soc-glue@5f800000 { > > + compatible = "socionext,uniphier-pro4-soc-glue", "simple-mfd", "syscon"; > > + reg = <0x5f800000 0x2000>; > > + > > + pinctrl: pinctrl { > > + compatible = "socionext,uniphier-pro4-pinctrl"; > > + }; > > + }; > > It looks like you want to check also for "simple-mfd" and "syscon" > following after the enum (two consts) > > It seems you want to check that reg is there. Documentation/devicetree/bindings/mfd/syscon.yaml already checks the 'reg' by the 'contains syscon' pattern, but I can repeat it in my yaml file. Thanks. > It seems the subnode pinctrl is also compulsory. > > All of this have examples in example-schema.yaml IIRC. > > Yours, > Linus Walleij -- Best Regards Masahiro Yamada