summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/gemini-dlink-dir-685.dts
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-10-11 20:06:23 +0200
committerLinus Walleij <linus.walleij@linaro.org>2018-12-08 23:19:23 +0100
commit137cd7100ec6fa36d610e106df00acb4d8af99df (patch)
tree412aa4b55c8ad5152bae9f94b1a28dc37104fe3a /arch/arm/boot/dts/gemini-dlink-dir-685.dts
parent738a05e673435afb986b53da43befd83ad87ec3b (diff)
ARM: dts: Enable Gemini flash access
Some Gemini platforms have a parallel NOR flash which conflicts with use cases reusing some of the flash lines (such as CE1) for GPIO. Fix this on the D-Link DIR-685 and Itian SQ201 by creating "enabled" and "disabled" states for the flash pin control handle, and rely on the flash handling code to switch this in and out when accessed so these lines can be used for GPIO when flash is not accessed, and enable flash access. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/boot/dts/gemini-dlink-dir-685.dts')
-rw-r--r--arch/arm/boot/dts/gemini-dlink-dir-685.dts35
1 files changed, 24 insertions, 11 deletions
diff --git a/arch/arm/boot/dts/gemini-dlink-dir-685.dts b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
index 502a361d1fe9..318e9b2ba7dc 100644
--- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
+++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
@@ -64,7 +64,6 @@
gpio-sck = <&gpio1 5 GPIO_ACTIVE_HIGH>;
gpio-miso = <&gpio1 8 GPIO_ACTIVE_HIGH>;
gpio-mosi = <&gpio1 7 GPIO_ACTIVE_HIGH>;
- /* Collides with pflash CE1, not so cool */
cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
num-chipselects = <1>;
@@ -253,15 +252,18 @@
soc {
flash@30000000 {
/*
- * Flash access is by default disabled, because it
- * collides with the Chip Enable signal for the display
- * panel, that reuse the parallel flash Chip Select 1
- * (CS1). Enabling flash makes graphics stop working.
- *
- * We might be able to hack around this by letting
- * GPIO poke around in the flash controller registers.
+ * Flash access collides with the Chip Enable signal for
+ * the display panel, that reuse the parallel flash Chip
+ * Select 1 (CS1). We switch the pin control state so we
+ * enable these pins for flash access only when we need
+ * then, and when disabled they can be used for GPIO which
+ * is what the display panel needs.
*/
- /* status = "okay"; */
+ status = "okay";
+ pinctrl-names = "enabled", "disabled";
+ pinctrl-0 = <&pflash_default_pins>;
+ pinctrl-1 = <&pflash_disabled_pins>;
+
/* 32MB of flash */
reg = <0x30000000 0x02000000>;
@@ -327,7 +329,6 @@
"gpio0cgrp",
"gpio0egrp",
"gpio0fgrp",
- "gpio0ggrp",
"gpio0hgrp";
};
};
@@ -342,6 +343,18 @@
groups = "gpio1bgrp";
};
};
+ /*
+ * These GPIO groups will be mapped in over some
+ * of the flash pins when the flash is not in
+ * active use.
+ */
+ pflash_disabled_pins: pinctrl-pflash-disabled {
+ mux {
+ function = "gpio0";
+ groups = "gpio0ggrp", "gpio0igrp", "gpio0jgrp",
+ "gpio0kgrp";
+ };
+ };
pinctrl-gmii {
mux {
function = "gmii";
@@ -430,7 +443,7 @@
};
display-controller@6a000000 {
- status = "okay";
+ status = "disabled";
port@0 {
reg = <0>;