ath79: add Mikrotik rb4xx series drivers
authorChristopher Hill <>
Tue, 26 May 2020 01:05:00 +0000 (21:05 -0400)
committerAdrian Schmutzler <>
Mon, 15 Jun 2020 19:16:18 +0000 (21:16 +0200)
ath79: add Mikrotik rb4xx series drivers

This adds 3 Mikrotik rb4xx series drivers as follows:

rb4xx-cpld: This is in the mfd subsystem, and is the parent CPLD device
that interfaces between the SoC SPI bus and its two children below.
rb4xx-gpio: This is the GPIO expander.
rb4xx-nand: This is the NAND driver.

The history of this code comes in three phases.

1. The first is a May 2015 attempt to push the equivalient ar71xx rb4xx
drivers upstream. See

Module-author: Gabor Juhos <>
Module-author: Imre Kaloz <>
Module-author: Bert Vermeulen <>

2. Next several ar71xx patches were applied bringing the code current.

commit 7bbf4117c6fe4b764d9d7c62fb2bcf6dd93bff2c
Signed-off-by: Hauke Mehrtens <>
commit af79fdbe4af32a287798b579141204bda056b8aa
commit 889272d92db689fd9c910243635e44c9d8323095
commit e21cb649a235180563363b8af5ba8296b9ac0baa
commit 7c09fa4a7492ca436f2c94bd9a465b7c5bbeed6f
Signed-off-by: Felix Fietkau <>
3. Finally a heavy refactor to split the driver into the three new
subsystems, and updated to work with the device tree configuration, plus
updates and review feedback incorporated

Reviewed-by: Thibaut VARĂˆNE <>
Signed-off-by: Christopher Hill <>
target/linux/ath79/files/drivers/gpio/gpio-rb4xx.c [new file with mode: 0644]
target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c [new file with mode: 0644]
target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c [new file with mode: 0644]
target/linux/ath79/files/include/mfd/rb4xx-cpld.h [new file with mode: 0644]
target/linux/ath79/patches-4.19/920-mikrotik-rb4xx.patch [new file with mode: 0644]
target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch [new file with mode: 0644]