Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3410220pxf; Mon, 15 Mar 2021 08:59:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ6wpFwKVJD2gEpEe3vkomeBJoX7MH4EBbyKFq2yEUEcEfBQZABKA4kxOBwvomxXrzAwCT X-Received: by 2002:a05:6402:270e:: with SMTP id y14mr30802723edd.283.1615823965937; Mon, 15 Mar 2021 08:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615823965; cv=none; d=google.com; s=arc-20160816; b=OKkI1CzALltajO5LH0pueKARQwlf25X0HToetWkKqnRHaCm3UlvvzEqspxS0sAwQBT 9ZGK1/UGQk9hDx1m1Dj7dJ/Lh3U8ylK5xcMUreLcjiTpQ6Ho/DJASDZXaKot321o/n1v gnD7QhKf/+LrhffHok7SuGYFSWyP0CurWtSdo+Z6LoS74HeB2BPImKahRW31u8SUFBl2 mrx7HcmXyBtEV9Fc+F8gj9tgrZbLPO0ljJ/AXGjZGQP2j1IS0mBqz1WHyWd4g7/LtPKo MgJbEbonCkpdhTsH5qIegnjm3E0Jcmjd+qHJjpVuLMunTyPrL7jWx2PA6zij9pGtVwF8 Ca5g== 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=Y05LxKqxHARRJz9b41KUmPJQO8MgmeiKWNfuMrL5SJk=; b=jLbMmC26ott3M4BLxTMnLZmIhUXqWR1dV6I/vFtjDmKM4aH9FcPqOwN5ReBlxbxONU HuoBkNzFCKYOhSadxEE6jppom3yrfVL4cK/xV7D++hUiD1uW/69E2b/SWEYHD1VMJraM 68N4tMw4c0zuKXOZ6ldLrY09+VufxznNL4ro4qT/UJhbJ8ZS+WGObG4UlQ1UCeZ6cV5I xg3LgW2ye05g8ZZON0hjAh7Ir/p/PKcXf3GpJH+Rh1uaesLuj2VRYf+sMeJExsCkyLvS l+vm8RtDoXBficmwlsmi+tZFpLLQ7vnYsTyA4K8b7BztnItqHFmzgJ3hFd/SjCuDY8Vm 4AoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sg+CBQyG; 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 o11si10889977eja.149.2021.03.15.08.59.02; Mon, 15 Mar 2021 08:59:25 -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=sg+CBQyG; 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 S229774AbhCOP5y (ORCPT + 99 others); Mon, 15 Mar 2021 11:57:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232366AbhCOP5q (ORCPT ); Mon, 15 Mar 2021 11:57:46 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD278C06174A for ; Mon, 15 Mar 2021 08:57:45 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id e7so57713673lft.2 for ; Mon, 15 Mar 2021 08:57:45 -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=Y05LxKqxHARRJz9b41KUmPJQO8MgmeiKWNfuMrL5SJk=; b=sg+CBQyG0EjOu0RLfrShAXMw/eoMGUCyFdU3ApyPzUZVu1ZoUxTbmz/aGui6ivYpXH kvuF8su3Y4ap3MPR3845uPRC9oASkjOYntE5efRPKCwArsq1lC02nJEyQpC/3isyQgr0 5tgBmSz/41MgYy+cPQB6z1GWEv5ltp+lMmGj6QMmJVJSPFnV3y8IY4S8hdJkMEHccjD0 KxLbqpfobp9IGnahjh1O/qkoqsimBu61rQWnWo4iHOPmxfk0QgyQVD81jDbdUHJRqKHN Sbv0uJJnNq0QyR6kR93rH6ylHh6X//AGKnrCt3UTJuSffK7yNbT1xQ0FBT/p997oWOFF o+qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y05LxKqxHARRJz9b41KUmPJQO8MgmeiKWNfuMrL5SJk=; b=UIyA6TFHdLtw/8x/FdVy48JHVxYwCMncirzCG+jFfIYMZnQ+xtKUmlEZVBT3+eXOA3 ZL6sEDQG19Kjvdz66Cm9I48nV5S6Koxy6xZlInBceoZp5FOtrVDhx5obSsINghnlMbHZ oZIdiFHWZbtjvA/ZbTG0ewfOVlrGDkA2agKswDoxr2K3lXvldOFW/nw7F1kr0c3i8Udh U5jAqx/i67vpnyL8iJONri85gDTBKn/94odkpZ2YxnlBwYoAnwPq7OBBU2adIRQKmqrV Hk/p2YTGJ3WW4ol9sWKNnHcQMBu1aJGf0fiUBu/Ij5pViWo4K7CXlRtjsuDfaReeDk2H lunQ== X-Gm-Message-State: AOAM530PKwsb22pNcvEW6xvYUZfevaGs/FVYM8MlNmRMJypt4D1lyzLx fHi0DmYIyRYCbHZqjqn40YPW082i7kMmkeLLSgFhUQ== X-Received: by 2002:a05:6512:74a:: with SMTP id c10mr8496071lfs.586.1615823864353; Mon, 15 Mar 2021 08:57:44 -0700 (PDT) MIME-Version: 1.0 References: <20210310125504.31886-1-noltari@gmail.com> <20210310125504.31886-5-noltari@gmail.com> <693A763C-14D1-47A2-A87E-2358E69DC993@gmail.com> <90994df6-9d7d-686f-8668-a1cf5267aa16@gmail.com> In-Reply-To: From: Linus Walleij Date: Mon, 15 Mar 2021 16:57:33 +0100 Message-ID: Subject: Re: [PATCH v6 04/15] dt-bindings: add BCM6328 pincontroller binding documentation To: Rob Herring Cc: =?UTF-8?B?w4FsdmFybyBGZXJuw6FuZGV6IFJvamFz?= , Michael Walle , Bartosz Golaszewski , Florian Fainelli , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Jonas Gorski , Necip Fazil Yildiran , Andy Shevchenko , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 11, 2021 at 7:14 PM Rob Herring wrote: > > Or this way (2): > > syscon { > > compatible = "brcm,bcm6328-gpio-regs", "syscon", "simple-mfd"; > > reg = <0x10000080 0x80>; > > ranges = <0 0x10000080 0x80>; > > > > pinctrl: pinctrl@18 { > > compatible = "brcm,bcm6328-pinctrl"; > > reg = <0x0 0x28>; > > > > gpio: gpio@0 { > > This doesn't make sense IMO because GPIO is not a sub-function of the > pinctrl h/w. They are peers. This becomes an ontological discussion, as in "what does the world consist of and what are the proper definitions of the things in it". A couple of years back I had this presentation: https://dflund.se/~triad/papers/pincontrol.pdf where I try to investigate how hardware engineers build these blocks. TL;DR: it depends on what the hardware engineer did. A HW block can be pin controller, GPIO controller and interrupt chip at the same time, that case is straight-forward. One compatible, lots of properties. . A second case is when the pin controller and the GPIO+irqchip are two completely different HW entities, and then they also get two different device nodes on the same level in the device tree. (We usually see this when the different blocks live in totally different memory locations.) However in the third case HW can also be bolted with a front-end pin controller (facing the pins) with several GPIO+interrupt controller back-ends. Then it gets the structure in this patch, subnodes for each GPIO controller. Our current bindings have all three examples and it simply reflects the different ways HW engineers have chosen to integrate their stuff. Yours, Linus Walleij