#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):

 It doesn't look like there are any pins needed to be pulled to enable
 communication.
 The differences of the pinctrl registers you dumped here hint that the
 pins 5, 6, 12, 13, 16, 17, 20, 21, 28 and 29 of bank B are set to
 functions other than GPIO. As we don't have a hardware-I2C driver for
 oxnas in OpenWrt, the pins used should be set to be GPIO and we use i2c-
 gpio to perform bit-banging in software.

 In the new pinctrl driver written by Ma Hajun, there are two I/O addresses
 for each bank, regbase and ctrlbase. The driver is based on pinctrl-at91.c
 and seems hacky, looking at it I consider it likely that there are still
 some bugs in there...
 But yes, at least in theory, pinctrl-oxnas.c does also set that 5th mask
 in
 https://dev.openwrt.org/browser/trunk/target/linux/oxnas/files/drivers/pinctrl
 /pinctrl-oxnas.c#L488 .

 Thanks for sharing the DTS. From a brief look, this is ox820-kd20.dts with
 the type and address of the RTC adapted and PCIe disabled. Are the LEDs
 and buttons actually the same or did you just leave it there hoping that
 it doesn't hurt to switch pins 5, 6, 10 and 11 of bank A to be inputs...

 If you want to play more to get a feeling for what you are dealing with,
 create pinctrl sections like the one in ox820-pogoplug-pro.dts and attach
 it to your i2c-gpio section. then put stuff there and try to use that to
 get things to work while checking the actual content of the gpio registers
 for orientation.

--
Ticket URL: <https://dev.openwrt.org/ticket/21892#comment:15>
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