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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88E27C433DB for ; Thu, 11 Mar 2021 12:55:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28A8264FAB for ; Thu, 11 Mar 2021 12:55:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233102AbhCKMzH (ORCPT ); Thu, 11 Mar 2021 07:55:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233036AbhCKMy7 (ORCPT ); Thu, 11 Mar 2021 07:54:59 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03425C061574 for ; Thu, 11 Mar 2021 04:54:59 -0800 (PST) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lKKq2-0005KZ-KO; Thu, 11 Mar 2021 13:54:50 +0100 Subject: Re: [Linux-stm32] [PATCH 5/8] ARM: dts: stm32: introduce stm32h7-pinctrl.dtsi to support stm32h75x To: dillon min , Alexandre TORGUE Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Vladimir Murzin , Linux Kernel Mailing List , linux@armlinux.org.uk, Rob Herring , Maxime Coquelin , afzal.mohd.ma@gmail.com, linux-stm32@st-md-mailman.stormreply.com, Linux ARM References: <1614758717-18223-1-git-send-email-dillon.minfei@gmail.com> <1614758717-18223-6-git-send-email-dillon.minfei@gmail.com> From: Ahmad Fatoum Message-ID: Date: Thu, 11 Mar 2021 13:54:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Dillon, On 11.03.21 13:23, dillon min wrote: > For stm32h7's new board support , I guess following the stm32f7/stm32f4's style > is a reasonable way to do it, but add a little optimization。 > which means : > old structure > stm32h7-pinctrl.dtsi --> stm32h743-pinctrl.dtsi (referenced by > stm32h743i-disco, -eval) > |--> stm32h750-pinctrl.dtsi > (referenced by stm32h750i-art-pi, etc) > add art-pi other board's pin definition in stm32h750-pinctrl.dtsi with > xxx_pins_a, xxx_pins_b > xxx_pins_a used for art-pi, xxx_pins_b used for other boards. > > after more boards add in support, there will be more xxx_pin_c, .... defined > > as the pin map is according to the hardware schematic diagram io connection. > so, why not move xxx_pin_x to a board specific place. such as > stm32h750i-art-pi.dts > > new structure: > 1, rename stm32h743-pinctrl.dtsi to stm32h7-pinctrl.dtsi (only > preserve gpioa...k,) > 2, move xxx_pins_x from stm32h7-pinctrl.dtsi to > stm32h7xx-disco/eval/art-pi/etc.dts (as they depends on hardware > schematic) > > stm32h7-pinctrl.dtsi --> stm32h743i-discon.dts > |--> stm32h743i-eval.dts > |--> stm32h750i-art-pi.dts > |--> stm32h7xxx.dts > would you agree this ? If the optimization you intend is reducing DTB size, you can flag all pinctrl groups with /omit-if-no-ref/ to have dtc throw them away if they are unused. (But in general, I am in favor of having board-specific configuration in the board dts) Cheers, Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |