Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp908551imm; Wed, 18 Jul 2018 12:53:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd8fao8oAu20T2LYHMEFA4VNSWZyqr308v7QT3gu12f6OE3oc3s5D1pB2F5EPrF+jOFXKcJ X-Received: by 2002:a62:2b4c:: with SMTP id r73-v6mr6540825pfr.134.1531943592572; Wed, 18 Jul 2018 12:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531943592; cv=none; d=google.com; s=arc-20160816; b=N6cYV9PxO01F+xNj1OK4ohhVLZ5+yjxBTeZwWqnPQK8fkLOUbxvLmXBJMOJsNMT92l pONy5AJ2aH+aXUuyA1ZqbPuv3g+6QW0jFsPWR+h7OFazDmeNrnSHXJ3FVdXwWxsDgryk 6ysDvyd2P+cOCMBHYQvUjEsrI1s9Y7H8iX0p4mEPIFAJDiG4kCVgURvz8wJiI3xWS7wb jrAhOwfM5+rvubKunMg22Ot0MOidNHshvluTNLMTCg0FZEGDtGPWNn+mil+t38QhLNbd NyxZx003N0KvynuooPTcPI3iHsoDDWmZCr1zWzg5rBhKyGsiLrCk03Pgz6y8/EwqR2qH 3kyQ== 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 :arc-authentication-results; bh=8FxxvupXKf1giwQWFxo/AlN2qLn/Ea8B9I5D6p3O2MA=; b=T8jIvkyUNxo3zDAWLedyrpj4zj7d2KsjbDInfu0zn7zCyhnarhNajTrKJsXeoopYL2 xcS8QEmqQcw/x1VCRv3BG8hFe+dkR9QKg8rK7A48lSGWInhJdJgUgpdXNqNo8fuorcra m/epYxBv8p6F+52P9Ra6LryVrqD1iexzDyIcA/N53zNC3QXFNU00snkqd/pFKsSOODlW EEJbQD+3Uu7yd4tYtgk8jbzizHvZWqA8JsfQ4z1TKBbPD3LD4hyVaLuWBbOSJqjTEpWg ZjrTxFDSgqPYADlWQbM0S6slVyr5t4hEe+CWtb/iIwyKO/WWAzgAFqCWTSaacpjntiju e5bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hWfGvo+k; 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 b5-v6si4107234pfa.116.2018.07.18.12.52.57; Wed, 18 Jul 2018 12:53:12 -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=hWfGvo+k; 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 S1730021AbeGRUad (ORCPT + 99 others); Wed, 18 Jul 2018 16:30:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:36228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726992AbeGRUad (ORCPT ); Wed, 18 Jul 2018 16:30:33 -0400 Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) (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 1993920856; Wed, 18 Jul 2018 19:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1531943468; bh=oCPoTpXsK5RGCIs8IjRid6UXfiCYh9HhBvUvlDSZ1/A=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hWfGvo+kiSDbktLAOA3M5OSk7r7jQM6GfPonqlKG235/dclGdTdksfNLgj8CGkPr0 RIJufi6r3FJhPDJ5rq7LkYZzdLuj3iNKiRztv509A329ItwXN2u2GZSY0oLc8VFlY9 7vSUWqTRdDP1XP7bYidd7KPpVXfLFFhUSuR5kfd4= Received: by mail-it0-f44.google.com with SMTP id q20-v6so6062523ith.0; Wed, 18 Jul 2018 12:51:08 -0700 (PDT) X-Gm-Message-State: AOUpUlE2UZ3EiqkLP65p1nKqlA5tQ+a04etajTcHAtDr8mdtfpwilFXA ql2gzZJbTFSNzMYWL/Irj+NLadDEKiKxGUMSlw== X-Received: by 2002:a02:9936:: with SMTP id r51-v6mr6839717jaj.46.1531943467490; Wed, 18 Jul 2018 12:51:07 -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> In-Reply-To: From: Rob Herring Date: Wed, 18 Jul 2018 13:50:56 -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: Benjamin Herrenschmidt Cc: Andrew Jeffery , 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 16, 2018 at 10:56 PM 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... Can we separate the list of what's enabled from the details of the registers? Even if we put all this into DT, we may still want to have some separation for dts file structure. Some portion of this has to be SoC specific because you are simply exposing SoC registers. > 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. That's very hand wavy. Do you have some concrete examples (i.e. dts files) showing the differences. One problem I'm having with this is you are still going to need per board specifics in userspace. You may be moving some of details out, but moving to DT is not going to completely eliminate that. I agree that not using /dev/mem is a good thing, but there are several ways you could do that independent of any DT binding. > 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... Sadly, updating my kernel is easier than updating my PC firmware (though packaged firmware on my current laptop changes that). I can assure you that ARM boards are generally much worse in that regard. BTW, you may want to pay attention to EBBR[1][2]. Not sure how much you care for BMCs, but there may be some interest. Rob [1] https://github.com/ARM-software/ebbr [2] https://lists.linaro.org/pipermail/boot-architecture/