Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp870729imm; Wed, 18 Jul 2018 12:08:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd+841tUSDvNCjdyrk6sUaaWjijTDKqclWJYCOjbgoHXP5HnWAGM7f3P9ZpcskZqUtb8aYT X-Received: by 2002:a17:902:64c2:: with SMTP id y2-v6mr7066648pli.53.1531940923113; Wed, 18 Jul 2018 12:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531940923; cv=none; d=google.com; s=arc-20160816; b=SWrCNvuNMth3yLkXffrPiLflOYgIUCDjnf5EeG99mOz3W7Cj5vBKIQb7wesQ6eMvv8 rY2XwZ6j13siMz39yWrObgxLSgmNUHJUT1WKQqUp0S60cYsotxfdvrUAsuiudtXf24Qu +MYjLj5QHoUgsshTqQGj/KhHvkCqFXCU6bP0HPNCzsvp8l/yH+SEY1lMElbBNzgRIZC0 OgX+XMTQwQtOMGk2zzma66ET/v1LkYy+JCb2aulz9BipAvxhXXs9wxVCV3prtk5MiQR/ wW6vJLAMbG7MCUWr8HmKfuEaas1shIfpesPC5JBT4hcxEj8Njbb9TKDwmvqsUNYee+AT koCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:arc-authentication-results; bh=y1tMQlwlBl2NKACtOQcj/0QE6EkhO4X8N4GANq0OXys=; b=S4R4uiXjMUD8ZtKrAW3fV2bsgrr5el05yFFSqiQi+wBfLbGZG4kkKi8LbhfxohOjgv ImCf/RSQ0TLBCBAhrGGwpn2RsPywdS962WGbYo3oiDb8SyVp3pf5NfonGxsXg8mkaaoB ttjUa0DlKHFGfpy4GSVysN78fF8uJsGYn4LWQ3WmWh+m2EHPppU1cznqiN5Y2sVcwrYO L+Cx0BZ67kXn2C0CBZSHxcrjDp1zJwno5KVoboY3WQfH+wZ1qavEwOs/b2Ik6AU0klq5 zYuj8gcG7ey6/l10/Whm9bi0XvQxkcMnQFWycBzHgO5ckk2Rs5+UGLItcMieBkcPWUk4 6Amw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=biAB1exQ; 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=pass (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 q23-v6si4138579pgq.483.2018.07.18.12.08.26; Wed, 18 Jul 2018 12:08:43 -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=@kernel.org header.s=default header.b=biAB1exQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729594AbeGRTrF (ORCPT + 99 others); Wed, 18 Jul 2018 15:47:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:52588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727000AbeGRTrF (ORCPT ); Wed, 18 Jul 2018 15:47:05 -0400 Received: from mail-io0-f170.google.com (mail-io0-f170.google.com [209.85.223.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 529D52084E; Wed, 18 Jul 2018 19:07:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1531940869; bh=y1tMQlwlBl2NKACtOQcj/0QE6EkhO4X8N4GANq0OXys=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=biAB1exQsgvuf9JHnO7GBLEW4sO+a2eDWAqbZ2A0sChfAC/CFRobWkxY7Hy8fXkgf WBbto35e3snf8wNBZkIjvoWEBY/bOKwC7aiyD2a4jgCRnRjcoN6mT8vHp8b6jL0BHp Zn1Dgqq9cexP8SIWuUmBDFeM6hKZf7xTVzYdm8Hs= Received: by mail-io0-f170.google.com with SMTP id v26-v6so5000438iog.5; Wed, 18 Jul 2018 12:07:49 -0700 (PDT) X-Gm-Message-State: AOUpUlHTrSJgHI3nJr4eURR9GWdFVn8mrKPCOeuABH7zYN/czoPp4idd Phtvfk0+nGYp1kEfZfcYReFP2zibmWtNWM89Mw== X-Received: by 2002:a5e:c90e:: with SMTP id z14-v6mr6305101iol.268.1531940868777; Wed, 18 Jul 2018 12:07:48 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <1531870098.3337969.1444201888.2476205D@webmail.messagingengine.com> From: Rob Herring Date: Wed, 18 Jul 2018 13:07:37 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 1/4] dt-bindings: misc: Add bindings for misc. BMC control fields To: Andrew Jeffery 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" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 int= ended that nodes using the bindings I'm proposing are children of a 'compat= ible =3D "syscon", "simple-mfd"' node (this is the case with the features w= e'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. > 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 de= vicetree, doesn't this invalidate the case for simple-mfd? What is the *cor= rect* use of simple-mfd? When is it not used to expose minor features in se= t 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. 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. Rob