On Fri, Sep 27, 2019 at 9:29 PM Stefan Wahren <wahrenst@xxxxxxx> wrote: > today i had the time to try this out. Instead of the following: > > i2c0_gpio0: i2c0_gpio0 { > brcm,pins = <0 1>; > brcm,function = <BCM2835_FSEL_ALT0>; > brcm,pull = <BCM2835_PUD_UP > BCM2835_PUD_OFF>; > } > > you want this? > > i2c0_gpio0: i2c0_gpio0 { > pin-sda { > function = "alt0"; > pins = "gpio0"; > bias-pull-up; > }; > pin-scl { > function = "alt0"; > pins = "gpio1"; > bias-disable; > }; > }; Yes that looks much better. In my opinion. I understand that it puts some developers off because of being more lines or excessively verbose, so to be on the clear, verboseness in itself is not the goal. The goal is universal portability: i.e. it should not matter one bit whether I work on an 2001 Intel StrongARM SoC, a 2019 Broadcom SoC or a 2011 ST-Ericsson SoC: I will understand what bias-disable; or bias-pull-up; means, which lowers the threshold to maintenance. Opaque macros, however helpfully named, still creates a higher cognitive resistance and stresses developers. > Unfortunately i don't know U-Boot is handle the BCM2835 specific pinctrl > functions. I think it would be nice if boot loaders avoid to forking the standards, but I suppose it will invariably happen. Just keep in mind the IETF motto "rough consensus and running code". Yours, Linus Walleij