Hi Denis,

I have high interest in this target device and wanted to provide some assistance if that's ok with you. I've fixed most of the open stuff, with the exception of using a PCIe device in the slot. (checking currently what is wrong there)

Changes:
- dts cleanup
- Enabled USB
- Added required GPIO's for USB switching functionality (Type-A vs mini pcie slot)
- Added pcie device power gpio (default ON)
- Added kernel 5.10 support
- use maximum SPI speed compatible with any type/brand of EEPROM (Dual & Quad)
- use maximum SPI speed compatbile with any type/brand of SSR chip
- added beeper package

I also have different hw revisions of this board.
- Oldest revision: works as expected, also when booting from flash
- Newer revision: ethernet works when booting from ethernet, but not when booted from flash (interface is up, IP is set, but not able to ping it.)

I also have a board running latest RouterOS on it.
It seems it should be possible to also fetch Voltage and Temperature somewhere.

Do you have an update?

Thanks,
Kind regards,

Koen

On 06.05.21 18:35, John Crispin wrote:
interesting. I have a rb92xx on my desk and am wondering if this would also work ? after a brief glance at the code I think this might work. the rb92xx certainly has the same latch setup ...

    John

On 06.05.21 18:19, Denis Kalashnikov wrote:
When porting RB91xG ad hoc drivers (gpio-latch and rb91x-nand) from ar71xx to ath79, I made a decision to rework this to more clear design in my opinion:
MFD driver that requests and controls the gpio lines, and separate NAND
driver and GPIO-latch driver that uses API of the MFD driver (like
how in rb4xx-clpd is done). ar71xx gpio-latch is very good, but somewhat hacky, so I don't think that it can be general driver for gpio controller on a latch. I could be wrong. Also it is my first attempt to port OpenWrt to a device, so I need a review from the community. I've tested all these on my RB912UAG-2HPnD. Gigabit Ethernet, 2.4GHz Wi-Fi, sysupgrade and LEDs:) are working for me.
Not working: beeper, button and USB port/mPCIe (has not tested yet).

Denis Kalashnikov (4):
   ath79: add MFD driver (NAND and GPIO) for Mikrotik RB91xG
   ath79: add GPIO-latch driver for Mikrotik RB91xG
   ath79: add NAND driver for Mikrotik RB91xG
   ath79: add support of Mikrotik RouterBoard 91xG series

  .../dts/ar9342_mikrotik_routerboard-912g.dts  | 314 +++++++++++++
  .../files/drivers/gpio/gpio-latch-rb91x.c     | 127 +++++
  .../linux/ath79/files/drivers/mfd/rb91x-ngl.c | 331 ++++++++++++++
  .../files/drivers/mtd/nand/raw/nand_rb91x.c   | 432 ++++++++++++++++++
  .../linux/ath79/files/include/mfd/rb91x-ngl.h |  59 +++
  target/linux/ath79/image/mikrotik.mk          |   9 +
  .../base-files/etc/board.d/02_network         |   2 +
  .../etc/hotplug.d/firmware/10-ath9k-eeprom    |   1 +
  .../base-files/lib/upgrade/platform.sh        |   1 +
  target/linux/ath79/mikrotik/config-default    |   3 +
  .../patches-5.4/939-mikrotik-rb91x.patch      |  65 +++
  11 files changed, 1344 insertions(+)
  create mode 100644 target/linux/ath79/dts/ar9342_mikrotik_routerboard-912g.dts   create mode 100644 target/linux/ath79/files/drivers/gpio/gpio-latch-rb91x.c
  create mode 100644 target/linux/ath79/files/drivers/mfd/rb91x-ngl.c
  create mode 100644 target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb91x.c
  create mode 100644 target/linux/ath79/files/include/mfd/rb91x-ngl.h
  create mode 100644 target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to