Thread (7 messages) 7 messages, 3 authors, 2021-03-09

Re: GPIO regression on mvebu and/or max310x since 2ab73c6d8323

From: Jan Kundrát <hidden>
Date: 2021-03-09 14:50:26

Can you just send a patch to the Armada DTS file adding these ranges?
I looked at some other November/December-ish commits into the DT, and in 
the end, this is the patch that I needed to add to my board-specific DTS:

 / {
        gpio_i2c {
                compatible = "i2c-gpio";
                sda-gpios = <&gpio0 25 (GPIO_ACTIVE_HIGH | 
GPIO_OPEN_DRAIN)>;
                scl-gpios = <&gpio0 24 (GPIO_ACTIVE_HIGH | 
GPIO_OPEN_DRAIN)>;
                i2c-gpio.delay-us = <1>;
                #address-cells = <1>;
                #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart1_pins_i2c_bb>;
        };
 };
 
-&uart1_pins {
+&pinctrl {
+       uart1_pins_i2c_bb: uart1-pins-i2c-bb {
+               marvell,pins = "mpp24", "mpp25";
+               marvell,function = "gpio";
+       };
+};
+
+&mikro_uart_pins {
        status = "disabled";
 };

The missing bit was making sure that the "i2c-gpio" instantiation sees a 
correct pinctrl-names and pinctrl-0 properties.

I think there's probably nothing to fix upstream here; I think it could be 
considered common knowledge than one has to patch the pinctrl block in DT 
in order to re-purpose a set of pins from, say, UART to GPIO. What confused 
me is that pre-5.7, this used to work without setting the pinctrl to "gpio" 
explicitly.

With kind regards,
Jan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help