Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1181228imm; Wed, 18 Jul 2018 18:58:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdDk4kLH3kKlBGEq2fDg5N3EwiSxNAF98+zyuyIVr9CIUZegQzAk5oRzN8dYWt3Anr/Mm4c X-Received: by 2002:aa7:8591:: with SMTP id w17-v6mr7586775pfn.77.1531965491796; Wed, 18 Jul 2018 18:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531965491; cv=none; d=google.com; s=arc-20160816; b=Bh/W49N+9z6CBvGkZ2jDuOw/dxxkmowV8zmjdLndoTgV2P/BRhKFSfQao3FW6ovCiZ S1xbi2+/7grUwQUq+plQeOWVUd5CyIX2AjOJc+URSYqQQ1mtMjHyWCayMOuUsCz7pp7a zMDg0Zr7bAuXALCM73RvoxL3JPp5tHa17+tDKGH5C90cdJT59CXhQpwJIN+7bbi48F5o 7G0kAKOE1m+W4sT3VgzXNFNSkgdz96lrwDM/4kKVKtgfDRH9rlsmSHOAdz7p82/+8dgX nLpVIfsnJSejwED9FIO9A/uaCANAZNmS0g8NVTeK3iReStpqAPlry74aOZ1SpFUsiY0w kzXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:subject:date:in-reply-to :content-transfer-encoding:mime-version:cc:to:from:message-id :dkim-signature:dkim-signature:arc-authentication-results; bh=FADGPYhbP+fHYI9EJbb3chU050AUTCPuk5jUmbBl1X8=; b=Xno+sBuYw3m75EvXt1tWxtuNrzTpoF/0KE8JjVxeOhyh/CT8k98GMYpv79dvK+xaT+ XfoEIXvSyGfXniHPtsbdMMreWFpv7TZDjizhgKCyamYbUi32EOLyJ+7P8gj4ubjoC5cV 6fmJ2wt7AHa94+uBlX1an0OwBkQq8xAALmCh1XJNkH17zQO9q0zh5tKR/o6bFhYSyaen tchqg3vJkgjljOKZBVZUIUN8oBQS7P/7CCKE7P2OQOY4wImDDs631y9Oa4qnuTAWh5MF yrqvqNlgaRLyQzscneN5t2no33fEGdSrmwwnVteI25R/s33WiITovaY9Ns8zMIe0blW9 AvAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm3 header.b=Qlln+qLY; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="BR0zGx/F"; 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 m11-v6si3035913pla.45.2018.07.18.18.57.57; Wed, 18 Jul 2018 18:58:11 -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=Qlln+qLY; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="BR0zGx/F"; 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 S1731178AbeGSCh4 (ORCPT + 99 others); Wed, 18 Jul 2018 22:37:56 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:59049 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731098AbeGSCh4 (ORCPT ); Wed, 18 Jul 2018 22:37:56 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E6B5321AE8; Wed, 18 Jul 2018 21:57:14 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute4.internal (MEProxy); Wed, 18 Jul 2018 21:57:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=FADGPYhbP+fHYI9EJbb3chU050AUT CPuk5jUmbBl1X8=; b=Qlln+qLY8qUuWJuDzsnu9z29JmhIgNVBFkxcGfkoZnPVF E7wshXQxbzj2Xz77zP5Say6gSTNBcw0b0NEcFWXDRcjNMFsMcE1Il6py+cfUAxLG +w6TbeeP4Ujno7QIAmzQ58ni4sqhq9mIJshj86Z8fKgHFDF1abug5ytssfUA+cTC lMLxkNS6kUvAsRmjO+2l18yDtVzmdl4eSok/Pjdupg55R4JjgH6TR9EO+BzATSrE tVEyO6oRUAvY7gDMTsZxDQN91u3aUQjgYPb7mUoJgireR2cMymg70YQ2jgFwZZRp JUvpZnezEV9F1BDNy07MbkqQZKCRqexhX+sUnC0iQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=FADGPY hbP+fHYI9EJbb3chU050AUTCPuk5jUmbBl1X8=; b=BR0zGx/F6aaN7T/0ojXinG V5uZEowE5h0CT6bn4y1QjR7+9ai3XW4zwb2OwQ6hjVb8j++cr3weXPKeMJFS226D ESeK1yacIj8wzad+wSxQwlJWZasTDHQmiUvWmEaEZLiW8sm/73WCAYGZmIAT29yV nE6m4wg1Z0msMbkMPA4H3aKUDogpxw2wYk/XiTizsw6PaHtgOJ54YWrlqmAJcZou WRSQ8VMt1P0r0m1DolGllhpfGgkXFoS3dLgWIHgBkAxbxf3Z7B7ALy+mYQ/T/2Gt glWu37lSuJFgldZB9GuvBa7gyQ/rW2L6eUho14II/KKYhUY+51d+skzbB9w4jQVw == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 924159E0DC; Wed, 18 Jul 2018 21:57:13 -0400 (EDT) Message-Id: <1531965433.2133841.1445577960.5C709A63@webmail.messagingengine.com> From: Andrew Jeffery To: Rob Herring Cc: Benjamin Herrenschmidt , Mark Rutland , devicetree@vger.kernel.org, "Greg Kroah-Hartman" , Eugene.Cho@dell.com, a.amelkin@yadro.com, linux-kernel@vger.kernel.org, Joel Stanley , stewart@linux.ibm.com, OpenBMC Maillist , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-e74bb3a0 In-Reply-To: Date: Thu, 19 Jul 2018 11:27:13 +0930 Subject: Re: [RFC PATCH v2 1/4] dt-bindings: misc: Add bindings for misc. BMC control fields References: <20180711053122.30773-1-andrew@aj.id.au> <20180711053122.30773-2-andrew@aj.id.au> <20180711200450.GB17291@rob-hp-laptop> <1531356830.3551458.1437853280.551CA8C5@webmail.messagingengine.com> <1531463489.747186.1439263128.075AECE1@webmail.messagingengine.com> <1531870098.3337969.1444201888.2476205D@webmail.messagingengine.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Jul 2018, at 04:37, Rob Herring wrote: > On Tue, Jul 17, 2018 at 5:28 PM Andrew Jeffery wrote: > > > > On Tue, 17 Jul 2018, at 14:26, Benjamin Herrenschmidt wrote: > > > On Mon, 2018-07-16 at 07:55 -0600, Rob Herring wrote: > > > > If that data is one set per SoC, then i'm not that concerned having > > > > platform-specific data in the driver. That doesn't mean the driver is > > > > not "generic". It's still not clear to me in this thread, how much of > > > > this is board specific, but given that you've placed all the data in > > > > an SoC dtsi file it seems to be all per SoC. > > > > > > So Rob, I think that's precisely where the disconnect is. > > > > > > I think we all (well hopefully) agree that those few tunables don't fit > > > in any existing subystem and aren't likely to ever do (famous last > > > words...). > > > > > > Where we disagree is we want to make this parametrized via the DT, and > > > you want us to hard wire the list in some kind of SoC driver for a > > > given SoC family/version. > > > > > > The reason I think hard wiring the list in the driver is not a great > > > solution is that that list in itself is prone to variations, possibly > > > fairly often, between boards, vendors, versions of boards, etc... > > > > > > We can't know for sure every SoC tunable (out of the gazillions in > > > those chips) are going to be needed for a given system. We know which > > > ones we do use for ours, and that's a couple of handfuls, but it could > > > be that Dell need a slightly different set, and so might Yadro, or so > > > might our next board revision for that matter. > > > > > > Now, updating the device-tree in the board flash with whatever vendor > > > specific information is needed is a LOT easier than getting the kernel > > > driver constantly updated. The device-tree after all is there to > > > reflect among other things system specific ways in which the SoC is > > > wired and configured. This is rather close... > > > > Not sure this helps, but I feel that the proposal pretty closely matches what's described in Documentation/devicetree/bindings/mfd/mfd.txt. It's intended that nodes using the bindings I'm proposing are children of a 'compatible = "syscon", "simple-mfd"' node (this is the case with the features we're hoping to describe for our SoC). I should explicitly call that out. > > IMO, any binding that has only those compatibles is not correct and a > specific compatible is needed. We should be able identify a specific > h/w block. I didn't intend for that to get interpreted quite as literally, so apologies for that. We do have h/w-block-specific compatibles in there too. The point was to demonstrate that we're dealing (at this point, only) with mfds/syscons. > > > But to go on, "simple-mfd" is effectively an alias of "simple-bus", which means its intended to match child node compatibles to drivers provided by the kernel. If we shouldn't be describing minor features of a SoC in the devicetree, doesn't this invalidate the case for simple-mfd? What is the *correct* use of simple-mfd? When is it not used to expose minor features in set of "miscellaneous system registers"? Why doesn't this proposed case fit? > > I'm no fan of simple-mfd either. I think it is abused and often a sign > of bad binding design. Ah, yes, this is a familiar feeling when reflecting on things I've done in the past. Hence trying to understand how to use it right. > The general problem with MFD bindings is people > define child nodes based on what drivers they happen to have for some > OS. DT is not the only way to instantiate drivers. Child nodes are > really only needed when you have resources per child that need to be > defined. For example, if the MFD has an interrupt controller and > interrupts to sub-blocks or sub-blocks have their own clocks. > "simple-mfd" was for when the parent node has no driver or the child > nodes have no dependency on the parent. Thanks for the clarification, I'll keep that in mind going forward. Andrew