Re: [Linux-stm32] [PATCH 5/8] ARM: dts: stm32: introduce stm32h7-pinctrl.dtsi to support stm32h75x
From: dillon min <hidden>
Date: 2021-03-11 13:04:43
Also in:
linux-arm-kernel, lkml
Hi Ahmad, Thanks for discussing. On Thu, Mar 11, 2021 at 8:55 PM Ahmad Fatoum [off-list ref] wrote:
Hello Dillon, On 11.03.21 13:23, dillon min wrote:quoted
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.
Thanks for your advice, actually, DTB size is not my first consideration. different board pin configuration place to one dtsi files, it's a little hard to maintain when a lot of boards add in.
(But in general, I am in favor of having board-specific configuration in the board dts)
Yes, same to me.
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 |