aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2020-01-16 23:11:47 +0000
committerMaxime Ripard <maxime@cerno.tech>2020-02-10 08:57:41 +0100
commite757bdd01780d0ea3e6774247b735caf2d1a9e92 (patch)
tree63043130ffae0befacff0f24ec002221860de15d /arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
parentarm64: dts: sun50i: H6: Add SPI controllers nodes and pinmuxes (diff)
downloadwireguard-linux-e757bdd01780d0ea3e6774247b735caf2d1a9e92.tar.xz
wireguard-linux-e757bdd01780d0ea3e6774247b735caf2d1a9e92.zip
arm64: dts: allwinner: h6: Pine H64: Add SPI flash node
The Pine H64 board comes with SPI flash soldered on the board, connected to the SPI0 pins (so it can also boot from there). Add the required SPI flash DT node to describe this. Unfortunately the SPI CS0 pin collides with the eMMC CMD pin, so we can't use both eMMC and SPI flash at the same time (the first to claim the pin would win, the other's probe routine would then fail). To avoid losing the more useful eMMC device by chance, mark the SPI device as "disabled" for now. A user or some U-Boot code could fix this up if needed, for instance if no eMMC has been detected (it's socketed). Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts')
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index d1c2aa5b3a20..3c9dd0d69754 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -14,6 +14,7 @@
aliases {
ethernet0 = &emac;
serial0 = &uart0;
+ spi0 = &spi0;
};
chosen {
@@ -278,6 +279,24 @@
vcc-pm-supply = <&reg_aldo1>;
};
+/*
+ * The CS pin is shared with the MMC2 CMD pin, so we cannot have the SPI
+ * flash and eMMC at the same time, as one of them would fail probing.
+ * Disable SPI0 in here, to prefer the more useful eMMC. U-Boot can
+ * fix this up in no eMMC is connected.
+ */
+&spi0 {
+ pinctrl-0 = <&spi0_pins>, <&spi0_cs_pin>;
+ pinctrl-names = "default";
+ status = "disabled";
+
+ flash@0 {
+ compatible = "winbond,w25q128", "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <4000000>;
+ };
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_ph_pins>;