Thread (31 messages) 31 messages, 6 authors, 2021-03-11

Re: [Linux-stm32] [PATCH 5/8] ARM: dts: stm32: introduce stm32h7-pinctrl.dtsi to support stm32h75x

From: Ahmad Fatoum <a.fatoum@pengutronix.de>
Date: 2021-03-11 12:55:39
Also in: linux-arm-kernel, lkml

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 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help