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 040D1C433F5 for ; Sun, 10 Apr 2022 21:40:10 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KiDGC+sAbakbRwhZZoP6+UT+IsE5zBTsJQJiKvVSW3I=; b=W/LEsE+vt2fbgX X1HSogJDfdsCPOh4mahAYwfI5oYbQnePEhhwgKSx0V8JtEcCL9um/HsjRD7US/lpdSsaOq+vu6v7x KBNNyfOC2xmNOQmQxWx+A6AovnAQWKNq7aQ5n2Da/5i3mph1rrhgbLULmgqVAgT+QMm2C76idKl0N ybk16tMuzeC52+VU42zgWLJUL0PM2pTTfjsjudP9AxYLs4NxkgOFsmxTELSdj1Gz9Q03iSdUU3rVa qPQjHiX+ivsuToBAT4YSYhDH9ZEzJblBvboZFgXWCYD1VsGRUTfqekNewxM+0t9ZycIQfo7e/NqwC xunae71wt/ExlE07U11w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndfGR-005Ydl-H7; Sun, 10 Apr 2022 21:38:31 +0000 Received: from phobos.denx.de ([2a01:238:438b:c500:173d:9f52:ddab:ee01]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndfGN-005Yd3-Ls for linux-arm-kernel@lists.infradead.org; Sun, 10 Apr 2022 21:38:29 +0000 Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id B1C1E81DD3; Sun, 10 Apr 2022 23:38:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1649626702; bh=BaxIRrODDWQs8VL7rECvfWUCLEDyJtsqmHhHZsB7Tgo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=y9Kb++8Irk2bGm4/+J8TlAKKza9Idk8+BUdiiXVOpTqjMQzviyLjSkGLf7c2pHTVf siHZOcKwc/vFhilvgknlQNswI8UVaamWqt6gqiN3/X2VjyhXDJJiQZOGBIkcDgB7fr a1NeonV6jtW/OAHbey5ibcCVJ90tmovJGVnwXVoLcZCwst61SVuIhivxv3ul4j6KIz x1v/ztRPs1F/cn8vL+KBqVBEqHlsrfRIM21Yoqo7Rlk17ZXljwNSgB5InAjE2T/l5w 0v6iRsuFe10bm82l2E79S/Oav9lwbDmGMweKBb8jSi4cekZe0hv8srWKGTrZZYe6rn sl9YILWX2sS5A== Message-ID: <753d9e1b-cbc9-bdb8-036a-89293583271b@denx.de> Date: Sun, 10 Apr 2022 23:37:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 2/2] arm64: dts: imx8mm: Add i.MX8M Mini Toradex Verdin based Menlo board Content-Language: en-US To: Francesco Dolcini Cc: linux-arm-kernel@lists.infradead.org, Fabio Estevam , Marcel Ziswiler , Peng Fan , Shawn Guo , NXP Linux Team References: <20220407202456.244917-1-marex@denx.de> <20220407202456.244917-2-marex@denx.de> <20220408064657.GA80730@francesco-nb.int.toradex.com> <55a1e747-9b6e-98da-969c-7592b29a293b@denx.de> <20220410084636.GB115930@francesco-nb.int.toradex.com> From: Marek Vasut In-Reply-To: <20220410084636.GB115930@francesco-nb.int.toradex.com> X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220410_143828_149388_6F48A402 X-CRM114-Status: GOOD ( 34.04 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/10/22 10:46, Francesco Dolcini wrote: > On Fri, Apr 08, 2022 at 05:02:15PM +0200, Marek Vasut wrote: >> On 4/8/22 08:46, Francesco Dolcini wrote: >>>> + /delete-node/ gpio-keys; >>> would it be better if we had a label in the imx8mm-verdin.dtsi and we >>> could just set status=disabled here? >> >> It would be better if there was Verdin SoM dtsi and Verdin carrier board dts >> which includes the SoM dtsi. Right now, it seems these two things are >> conflated a bit. >> >> There are no GPIO buttons on the Verdin SoM, there are some on the Dahlia >> carrier board I think. > > The GPIO keys, for example the suspend button, are part of Verdin family > SODIMM connector pinout/definition (see related datasheets). In the SoM > dtsi we implement our standard family definition. > > Of course, you are free to redefine this in any way you prefer. In > general the way we envision this is to just enable/disable in the > carrier board or overlay dts, this is the reason I proposed to add > a label there. I do not see any real value on deleting the node at all, > just some potential for additional maintenance burden. There are two reasons for not adding DT nodes for hardware which is not populated: - You are polluting the DT with unused nodes representing hardware which can never be present on the system, that makes the DT bigger and more complex, for no reason. - Once DTOs enter the picture, these so far only useless nodes and properties actively become a problem. You cannot delete either node or property from a base DT using a DTO, because neither /delete-node/ nor /delete-property/ can be encoded into the DTO blob . So, speaking about this GPIO button which is not physically on the SoM, I would propose the following: - Keep some sort of gpio-line-names property on the SoM level, to have mapping between GPIOs and SoM edge connector pins - Move the "gpio-button" node into the carrier board DT If someone designs a carrier board with this button populated, then they should describe it in the DT. If someone designs a carrier board without any physical button, then they won't describe it in the DT. And as a bit of an encore, if you have optional components on a SoM (e.g. you have different SoM variants, some of which may contain extra components and some of them may not, e.g. to save cost or whatever), then you should describe the components in SoM DT, but set it to status="disabled" by default. And then when a carrier board is populated with specific SoM model, it can enable those extra populated SoM components on carrier board DT level (or in some proxy SoM-variant DTSI if you really want to be very precise about the separation, but that leads to combinatorial explosion of SoM-variant DTSIs over time). >>>> + /* CAN controller on the baseboard */ >>>> + canfd: can@0 { >>>> + compatible = "microchip,mcp2518fd"; >>>> + clocks = <&clk20m>; >>> You are using the node defined in the verdin.dtsi here, while I guess >>> this is a separate oscillator part of the carrier board. >>> >>> Should you define a new clock? My concern is that we had discussion to >>> change the SoM to move from 20 to 40 MHz, and we would remove this entry >>> from the dtsi if we would do such a change. >> >> Is the 20 MHz oscillator on your SoM or on the carrier board ? > In the SoM, not available on the SODIMM connector. Your clock if for > sure not this one. Right, lemme switch this one to dedicated clock node. >>>> +&i2c4 { >>>> + /* IMX8MM ERRATA e7805 -- I2C is limited to 384 kHz due to SoC bug */ >>>> + clock-frequency = <100000>; >>>> + /delete-node/ bridge@2c; >>>> + /delete-node/ hwmon@40; >>>> + /delete-node/ hdmi@48; >>>> + /delete-node/ touch@4a; >>>> + /delete-node/ hwmontemp@4f; >>>> + /delete-node/ eeprom@50; >>>> + /delete-node/ eeprom@57; >>> All of those are disabled in the dtsi, is it really worth deleting the >>> nodes? >> >> They are not present on the hardware, why should they be described in the DT >> ? Hence the /delete-node/ . > Not 100% correct (see the SoM datasheet) I can't find e.g. the hdmi@48 LT8912 DSI-to-HDMI bridge, nor the bridge@2c SN65DSI83 DSI-to-LVDS bridge in the datasheet, and visual inspection of the SoM also leads to nothing. I also cannot find them on the Dahlia carrier board. But I can find them on the optional expansion modules for the Dahlia carrier board. So, why are they described in the SoM DT (they shouldn't be) ? Maybe the other components are actually on the SoM, but then, why are those not enabled by default ? Maybe because not all SoM variants have them populated ? > , anyway is this causing you any > real trouble having those nodes disabled instead of removed from the > dts? I assume nor the file size nor the parsing time are an issue there. See above, it is the same argument as regarding the gpio-button . The SoM DTSI shouldn't become a dumping ground for nodes describing any random hardware which might be attached to arbitrary carrier board. > Of course, not a big deal for me you removing this nodes in the menlo > dts, but in general I'm happy to make your life easier when using our > som dtsi file, this is the reason for asking. See above, I hope that clarifies it. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel