aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/patches-5.15/939-mikrotik-rb91x.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/patches-5.15/939-mikrotik-rb91x.patch')
-rw-r--r--target/linux/ath79/patches-5.15/939-mikrotik-rb91x.patch33
1 files changed, 31 insertions, 2 deletions
diff --git a/target/linux/ath79/patches-5.15/939-mikrotik-rb91x.patch b/target/linux/ath79/patches-5.15/939-mikrotik-rb91x.patch
index 4a852886bf..459b6ff9b1 100644
--- a/target/linux/ath79/patches-5.15/939-mikrotik-rb91x.patch
+++ b/target/linux/ath79/patches-5.15/939-mikrotik-rb91x.patch
@@ -1,3 +1,32 @@
+From: Denis Kalashnikov <denis281089@gmail.com>
+Subject: [PATCH] ath79: add support for reset key on MikroTik RB912UAG-2HPnD
+
+On MikroTik RB91x board series a reset key shares SoC gpio
+line #15 with NAND ALE and NAND IO7. So we need a custom
+gpio driver to manage this non-trivial connection schema.
+Also rb91x-nand needs to have an ability to disable a polling
+of the key while it works with NAND.
+
+While we've been integrating rb91x-key into a firmware, we've
+figured out that:
+* In the gpio-latch driver we need to add a "cansleep" suffix to
+several gpiolib calls,
+* When gpio-latch and rb91x-nand fail to get a gpio and an error
+is -EPROBE_DEFER, they shouldn't report about this, since this
+actually is not an error and occurs when the gpio-latch probe
+function is called before the rb91x-key probe.
+We fix these related things here too.
+
+Submitted-by: Denis Kalashnikov <denis281089@gmail.com>
+Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
+Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
+---
+ drivers/gpio/Kconfig | 11 +++++++++++
+ drivers/gpio/Makefile | 2 ++
+ drivers/mtd/nand/raw/Kconfig | 6 ++++++
+ drivers/mtd/nand/raw/Makefile | 1 +
+ 7 files changed, 20 insertions(+)
+
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -353,6 +353,13 @@ config GPIO_IXP4XX
@@ -15,8 +44,8 @@
tristate "Xylon LogiCVC GPIO support"
depends on MFD_SYSCON && OF
@@ -529,6 +536,10 @@ config GPIO_ROCKCHIP
- help
- Say yes here to support GPIO on Rockchip SoCs.
+ help
+ Say yes here to support GPIO on Rockchip SoCs.
+config GPIO_RB91X_KEY
+ tristate "MikroTik RB91x board series reset key support"