#21892: Oxnas pincontrol (GPIO) does not work
------------------------+-----------------------------------------
  Reporter:  anonymous  |      Owner:  developers
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:
 Component:  kernel     |    Version:  Trunk
Resolution:             |   Keywords:  oxnas ox820 gpio pincontrol
------------------------+-----------------------------------------

Comment (by dangole):

 Thanks for reviewing mach-ox820.c, indeed it looks like SEC_CTRL_*_SEL are
 supposed to be 0'd there. And yes, this explains why the RTC was working
 at all when warm-booting from the stock firmware...
 Better remove the LEDs section if they don't match anyway.
 My first bet would be something like this
 {{{
         pinctrl {
                 i2c {
                         pinctrl_i2c: i2c-0 {
                                 plxtech,pins =
                                         <1 9  0 0       /* MF_B9 GPIO */
                                          1 10 0 0       /* MF_B10 GPIO */
                                          1 5  0 1>;     /* e.g. MF_B5
 pull-up */

                         };
                 };
         };
 }}}
 Then make use of pinctrl_i2c by adding it to the i2c-gpio section
 {{{
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_i2c>;
 }}}

 To better understand the pinctrl driver, try understanding pinctrl-at91.c
 which it is based pn. For corresponding device-tree examples, see
 at91*.dts*.

 The whole oxnas target definitely needs more cleanup and review (help is
 always welcome), I didn't have a deeper look at pinctrl and irqchip yet
 because I didn't need to... I will have to when working on getting rid of
 mach-oxnas/include/asm/{iomap,hardware}.h which is somewhere down on my
 agenda ...

--
Ticket URL: <https://dev.openwrt.org/ticket/21892#comment:19>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to