Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5361

Device Tree • Re: Adapting an overlay for AT24 EEPROM on i2c-0 for Pi 5

$
0
0
if I were to leave those lines in my overlay, it'd need to be the same - "rp1_i2c0_0_1" instead of "i2c0_pins" - right?
That's correct. However, you raise a good point. If you look at uart0 in the Pi 5 dtb (which isn't easy because of the way labels are handled - running the ovmerge utility on the source dts files gives you a clearer picture - you'll see that it requests uart0_pins for its default pinctrl state, but this is a second label applied to a node called rp1_uart0_14_15 and with a label of the same name (in rp1.dtsi):

Code:

rp1_uart0_14_15: rp1_uart0_14_15 {pin_txd {function = "uart0";pins = "gpio14";bias-disable;};pin_rxd {function = "uart0";pins = "gpio15";bias-pull-up;};};
Elsewhere (bcm2712-rpi.dtsi) a second label (uart0_pins) is added:

Code:

uart0_pins: &rp1_uart0_14_15 {};uart0_ctsrts_pins: &rp1_uart0_ctsrts_16_17 {};uart0: &rp1_uart0 {pinctrl-0 = <&uart0_pins>;};
There is no reason why we shouldn't (and arguably a good reason why we should) give rp1_i2c0_0_1 a second label i2c0_pins. Had this been in place, the original version of your overlay would have worked.

Statistics: Posted by PhilE — Sun Mar 03, 2024 11:01 am



Viewing all articles
Browse latest Browse all 5361

Trending Articles