From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9867C001B5 for ; Fri, 2 Sep 2022 17:29:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zl7UpSHf5nev9l9/7nCKG3oE++PtsesLTEYsgLt6fik=; b=TtZJYliyw8dQ7a 3UHcZkUrj6HeOBCJcTa6sFBLFkHBx38VOsaG9RfIHHL0ThtfQIu9/D6G21bIvBajXF4k9aZHP7nsB zEu5sUuhM8oSrHh/ftOXHIXndZ30gZwff/gBS85uTML1F12PUbgMoHSxrbGYMdWWPa5A4msBIA7o1 lHwbCxifn8SDYuJHkAq+dQbYFfAqh28M1hc89PnZIu+I3aERKNRtky7aJlboIOHJzTyXc49Qw2Opf Og1sLFmGHs1gI7ueaTS6iCFFv0xyeUUVftsD6986tsJyThzvWvFO6caSR7J1UdN4KKURMh1S4tN9I 3Xz0vO7MXgYqhvqMfWrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUASk-0086qs-HT; Fri, 02 Sep 2022 17:28:14 +0000 Received: from mail-ot1-f53.google.com ([209.85.210.53]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUASh-0086mP-N1 for linux-arm-kernel@lists.infradead.org; Fri, 02 Sep 2022 17:28:13 +0000 Received: by mail-ot1-f53.google.com with SMTP id v2-20020a056830090200b006397457afecso1867218ott.13 for ; Fri, 02 Sep 2022 10:28:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=OcvzQvUSS5BtKmCuAUECPvo/XLnVbi/A8dYrn8VmGY8=; b=tIkqxaslG2gH3TgZusoS6Qz2Uk0CkbyH+mrLkaB0GUJ3IsSl3tkI6DY1BuHajrySEp Tdg08NqN2I7F10lN7CJNsfYvQOfZaCk/Wbi6xFIqS/01pbifi1x8vVeNwjwd/FARUGVU PCTFtx9obaSBzgeRDeQVr+0g4fwOcIa0LFbCSBVuIJ0pz5DkS6YW8iUCAEGkcqJ6U+YY yhqQTWqc8FuDOsJegFS3tdpNg9u06dz2txFqWroIUqdWGYDXbYkAC1KrLkxSTsxXrJ0b 3q0dBoIuQzcGdzY3nfeUV9bhUsoIko1AvNUXuNJ3VizaO2UU7w0IfNWjqb+kPwHkc6+4 rETw== X-Gm-Message-State: ACgBeo0938/gcughjI8vlBndL4kTZnRiu6BEMX/Xrh6AfcZOYJxJMN3i JG8y06RiJFRX+RzEOm6hKw== X-Google-Smtp-Source: AA6agR6ne64hi/duoCub5KI+hVE1YPF+X4QCb+HaiW6b/UpaTprnQRbugYjsvv1s/+lraQv3IukWkA== X-Received: by 2002:a05:6830:929:b0:63b:25ba:dfe4 with SMTP id v41-20020a056830092900b0063b25badfe4mr12145905ott.311.1662139689454; Fri, 02 Sep 2022 10:28:09 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id b10-20020a05687051ca00b0011e73536301sm1389723oaj.52.2022.09.02.10.28.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 10:28:09 -0700 (PDT) Received: (nullmailer pid 90543 invoked by uid 1000); Fri, 02 Sep 2022 17:28:08 -0000 Date: Fri, 2 Sep 2022 12:28:08 -0500 From: Rob Herring To: Mark Kettenis Cc: linux@armlinux.org.uk, krzysztof.kozlowski@linaro.org, arnd@arndb.de, lee@kernel.org, linus.walleij@linaro.org, alyssa@rosenzweig.io, asahi@lists.linux.dev, brgl@bgdev.pl, marcan@marcan.st, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, sven@svenpeter.dev, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org Subject: Re: [PATCH 1/6] dt-bindings: mfd: add binding for Apple Mac System Management Controller Message-ID: <20220902172808.GB52527-robh@kernel.org> References: <426469c1-13cc-178b-4904-09439d7788e8@linaro.org> <928ddeff-efac-920c-7bbf-dda35a942b93@linaro.org> <2fedff34-6a20-f1ce-a756-2bd8671fcd52@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_102811_777624_3B729A8D X-CRM114-Status: GOOD ( 35.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 02, 2022 at 05:06:43PM +0200, Mark Kettenis wrote: > > From: Rob Herring > > Date: Thu, 1 Sep 2022 17:33:31 -0500 > > > > On Thu, Sep 1, 2022 at 11:47 AM Russell King (Oracle) > > wrote: > > > > > > On Thu, Sep 01, 2022 at 07:25:03PM +0300, Krzysztof Kozlowski wrote: > > > > On 01/09/2022 18:56, Russell King (Oracle) wrote: > > > > > > > > > > 8<=== > > > > > From: "Russell King (Oracle)" > > > > > Subject: [PATCH] dt-bindings: mfd: add binding for Apple Mac System Management > > > > > Controller > > > > > > > > > > Add a DT binding for the Apple Mac System Management Controller. > > > > > > > > > > Signed-off-by: Russell King (Oracle) > > > > > > > > Yes, looks good. > > > > > > > > I won't add Reviewed-by tag, because I think it would confuse Patchwork, > > > > so please send a v2 at some point. > > > > > > Thanks. Do you have any suggestions for patch 2? Should I merge the > > > description in patch 2 into this file? > > > > > > The full dts for this series looks like this: > > > > > > smc: smc@23e400000 { > > > compatible = "apple,t8103-smc", "apple,smc"; > > > reg = <0x2 0x3e400000 0x0 0x4000>, > > > <0x2 0x3fe00000 0x0 0x100000>; > > > reg-names = "smc", "sram"; > > > mboxes = <&smc_mbox>; > > > > > > smc_gpio: gpio { > > > gpio-controller; > > > #gpio-cells = <2>; > > > }; > > > }; > > > > > > but the fuller version in the asahi linux tree looks like: > > > > > > smc: smc@23e400000 { > > > compatible = "apple,t8103-smc", "apple,smc"; > > > reg = <0x2 0x3e400000 0x0 0x4000>, > > > <0x2 0x3fe00000 0x0 0x100000>; > > > reg-names = "smc", "sram"; > > > mboxes = <&smc_mbox>; > > > > > > smc_gpio: gpio { > > > gpio-controller; > > > #gpio-cells = <2>; > > > > Only 2 properties doesn't really need its own schema doc. However, I > > would just move these to the parent node. > > When we designed the bindings, it was our understanding that having > separate nodes better matches Linux's MFD driver model. Well, it is convenient to have subnodes with compatibles so that your drivers automagically probe. So yes, a 1:1 relationship of nodes to drivers is nice and tidy. But h/w is not always packaged up neatly and it's not DT's job to try to abstract it such that it is. Also, we shouldn't design bindings around the *current* driver partitioning of some OS. This one is actually pretty odd in that the child nodes don't have a compatible string which breaks the automagical probing. > Please be aware that OpenBSD is already using these bindings. If > there are good reasons for moving things, we can probably deal with > that. But this sounds a bit like a toss up. Sigh. If there are other bindings in use, please submit them even if the Linux driver isn't ready. If a Linux subsystem maintainer doesn't want to take it, then I will. It is a toss up though... > > > }; > > > > > > smc_rtc: rtc { > > > nvmem-cells = <&rtc_offset>; > > > nvmem-cell-names = "rtc_offset"; > > > }; > > > > > > smc_reboot: reboot { > > > nvmem-cells = <&shutdown_flag>, <&boot_stage>, > > > <&boot_error_count>, <&panic_count>, <&pm_setting>; > > > nvmem-cell-names = "shutdown_flag", "boot_stage", > > > "boot_error_count", "panic_count", "pm_setting"; > > > > Not really much reason to split these up either because you can just > > fetch the entry you want by name. > > Again the separate nodes are there because the RTC and the reboot > functionality are logically separate and handled by different MFD > sub-drivers in Linux. It's really a question of whether the subset of functionality is going to get reused on its own or has its own resources in DT. MFD bindings are done both ways. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel