Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp3708787rwb; Sun, 7 Aug 2022 05:48:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR4K3nidABoJY0WycBRQPe9R6NzsV/u812tkS86PhK/KhA3K5ucM7eRfzeBb0s4As84QfFKX X-Received: by 2002:a17:907:3fa8:b0:730:a2d0:3a56 with SMTP id hr40-20020a1709073fa800b00730a2d03a56mr10829673ejc.460.1659876528593; Sun, 07 Aug 2022 05:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659876528; cv=none; d=google.com; s=arc-20160816; b=kuX/qF6TY0UDOz4bwnKBRsZr+c9Iikkjc37j+y3ywRNnZx5o7dwTeifIfT/5U+/Ps5 XUw/IbM70OQAx4ddvtAwXA7vE7J+3NND7O9+cYP1lQhL6UWANjlNV1gcK6FOs0vNRxuT pim1pw9gG2PB23gE6aQaV1isq2/zQy9I9/sAca4JILce11W2UOu+4OaeraewnwOgxeR7 ToZkS7ZgdymfX+/guLTW0kR2IRmm+vwqdwAwJOTOP8OTILRZDb1gA1h8yFxaQdVKS1fA ugFqCYMHbdhRT/+GjA79Ge+dwb11+dSXCR4dpNv2vauN6SkCN3KlJ3CUiGMR02vcxkPy 4VFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date:sender :dkim-signature; bh=zQGkdKu5K+mMGtINb8IUwXhsmEcLqR+snZ46Vc8nWxk=; b=JNkPxFGpqKQ0rbt2tDsXPyk/0GPGJ0cRNo4ADTCm8qgGDZ4XPA2XdinAPhj0z7lIop rf/SoTjOvVSn7Qqpp4LhpiuahVdMpeqigVR9y4YxAApm8fxIiUW4rIRW7ffDB+aWfdMh OtM16zCrFBWrdYCG2h60pNdgcIe8uhIE/onMCXuuFRhEBtVCfmfHYScKFQqP7P/OoCLd 1dj/uNpZybDuo5MfNcaNKcMkTbAzKrJS7fII33cqYxoEWSS9mXE4w/IEU+IQnqzOAjtY HdgrztliqX7JNxU8hrSi0TUY7a8Tcx4GsLNq7iYkNOpeAs1nNEsCx0O1mkD840EGQq+N xw3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X8rltdjm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a056402438700b0043c19cd608dsi4254975edc.33.2022.08.07.05.48.22; Sun, 07 Aug 2022 05:48:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X8rltdjm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233939AbiHGMLp (ORCPT + 99 others); Sun, 7 Aug 2022 08:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233412AbiHGMLn (ORCPT ); Sun, 7 Aug 2022 08:11:43 -0400 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9702BF50; Sun, 7 Aug 2022 05:11:42 -0700 (PDT) Received: by mail-qk1-x732.google.com with SMTP id v1so4771711qkg.11; Sun, 07 Aug 2022 05:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:reply-to :message-id:subject:cc:to:from:date:sender:from:to:cc; bh=zQGkdKu5K+mMGtINb8IUwXhsmEcLqR+snZ46Vc8nWxk=; b=X8rltdjmNBHQeJgcjT5qKvzBk79eACG1asdlFesZiy6mpB7LeCJF7SKsbdbpwbbRGU L5JPWtm6ii7OHXAzUWdcpmbBkfv9U6p1dxIbRbxH0ypFHqyTDdp5hx+UgzNqLvo3kt/q id4+yVLZ6A9XqLg4LE5kn5bB6eCDMWaXeK5W4IwzFhzV310nTnhLk4m1lBrYmCz5n3Ye ewSU1EmiL4x5YlqhdlFo7BTHk3sBl9jJj3NmnOirRC5pG9IBweefeZw3NBV6JpUoKHCY sPLKEk8/am2VcYKbwolANziEuKRbNbGGRN+bvhbPgQL9e+Mum1TwIOeuzII7ALtG4bfd yzNg== 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:reply-to :message-id:subject:cc:to:from:date:sender:x-gm-message-state:from :to:cc; bh=zQGkdKu5K+mMGtINb8IUwXhsmEcLqR+snZ46Vc8nWxk=; b=YZNc9sascoXrx+qZZYc/chycZEqYqBcoxnf5kcRCpFqtUVS5hcGlQA2pr/NbyEmXVC WwlWuL1fOC3U6bcUO5KnrxrMFoYwhmqVv4Hc7m826pC0GdkjflLbH8Sj6t5bu36ueILS BkukxnMRTj5G9hWwfC7CJyX3O0X28pXBuA1KE9eugexP0YwnYdqbNccni/aWUVWXjvj5 1/yZPOq0t9qUBObjZiDVU2dSpFbHyUdJ9YOK6fEey1Dv4tc8XgO4XEsNdmqnuXJedgLx 7kQc3BbPfQvGOwCRQR38vgdT+QQhiz98Yx5utOdSlwKm0ehmpTjh57e8YP4pyqXf5Pic LofA== X-Gm-Message-State: ACgBeo2AufVBSRETOvYB6zPFG47a8PSc9JzWVxM/ZhWoMD5ox0LoYM36 HTE6ZA4eFBfJWDtFc4Jg5g== X-Received: by 2002:a05:620a:460c:b0:6b8:fbfd:b963 with SMTP id br12-20020a05620a460c00b006b8fbfdb963mr11002856qkb.140.1659874301700; Sun, 07 Aug 2022 05:11:41 -0700 (PDT) Received: from serve.minyard.net (serve.minyard.net. [2001:470:b8f6:1b::1]) by smtp.gmail.com with ESMTPSA id y8-20020a37f608000000b006b66510f4f7sm6896108qkj.6.2022.08.07.05.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Aug 2022 05:11:41 -0700 (PDT) Sender: Corey Minyard Received: from minyard.net (unknown [IPv6:2001:470:b8f6:1b:18ee:4123:89ce:5c5d]) by serve.minyard.net (Postfix) with ESMTPSA id B96051800FA; Sun, 7 Aug 2022 12:11:39 +0000 (UTC) Date: Sun, 7 Aug 2022 07:11:38 -0500 From: Corey Minyard To: Tomer Maimon Cc: Avi Fishman , Tali Perry , Joel Stanley , Patrick Venture , Nancy Yuen , Benjamin Fair , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , OpenBMC Maillist , openipmi-developer@lists.sourceforge.net, Linux Kernel Mailing List , devicetree Subject: Re: [PATCH v2] dt-binding: ipmi: add fallback to npcm845 compatible Message-ID: <20220807121138.GL3834@minyard.net> Reply-To: minyard@acm.org References: <20220804181800.235368-1-tmaimon77@gmail.com> <20220805115827.GG3834@minyard.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 07, 2022 at 11:03:56AM +0300, Tomer Maimon wrote: > Hi Corey, > > Thanks for your comment. > > On Fri, 5 Aug 2022 at 14:58, Corey Minyard wrote: > > > > On Thu, Aug 04, 2022 at 09:18:00PM +0300, Tomer Maimon wrote: > > > Add to npcm845 KCS compatible string a fallback to npcm750 KCS compatible > > > string becuase NPCM845 and NPCM750 BMCs are using identical KCS modules. > > > > > > Signed-off-by: Tomer Maimon > > > --- > > > Documentation/devicetree/bindings/ipmi/npcm7xx-kcs-bmc.txt | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/Documentation/devicetree/bindings/ipmi/npcm7xx-kcs-bmc.txt b/Documentation/devicetree/bindings/ipmi/npcm7xx-kcs-bmc.txt > > > index cbc10a68ddef..4fda76e63396 100644 > > > --- a/Documentation/devicetree/bindings/ipmi/npcm7xx-kcs-bmc.txt > > > +++ b/Documentation/devicetree/bindings/ipmi/npcm7xx-kcs-bmc.txt > > > @@ -7,7 +7,7 @@ used to perform in-band IPMI communication with their host. > > > Required properties: > > > - compatible : should be one of > > > "nuvoton,npcm750-kcs-bmc" > > > - "nuvoton,npcm845-kcs-bmc" > > > + "nuvoton,npcm845-kcs-bmc", "nuvoton,npcm750-kcs-bmc" > > > > This is just wrong. The compatible is supposed to identify the device, > > not the board the device is on. I think compatible here should be > > "npcm7xx-kcs-bmc", and just use that everywhere. It's fine if that is > > used on a board named npcm845. > The NPCM8XX is not a board, The Nuvoton NPCM8XX is a fourth-generation > BMC SoC device family. Ok, but same principle applies. If the device is exactly the same, then you would only use one of the "npcm7xx-kcs-bmc" and put that in both device trees. You can use "nuvoton,npcm750-kcs-bmc", it's really not that important. Or even "nuvoton,npcm-kcs-bmc" If the device has a minor difference that can be expressed in a parameter, then create a parameter for it. If the device has enough differences that a parameter or two doesn't cover it, then you put either nuvoton,npcm750-kcs-bmc or nuvoton,npcm750-kcs-bmc in the device tree. Not both. Then you need two entries in the of_device_id array and you use the data field or something to express the difference. Since there appears to be no difference, just put "nuvoton,npcm750-kcs-bmc" in the npcm845 and I will drop the patch adding all this. Then a patch can be added saying it applies to both the 7xx and 8xx series of BMC SOCs. If you want to change the name, then a patch will be needed for that, but then you will need multiple entries in your device tree, but you would not document it as such, as there would only be one that applies for this kernel. I'm pretty sure the only reason to have muliple compatible entries in a device tree is to cover multiple kernels where the name changed. -corey > > > > -corey > > > > > - interrupts : interrupt generated by the controller > > > - kcs_chan : The KCS channel number in the controller > > > > > > -- > > > 2.33.0 > > > > > Best regards, > > Tomer