[PATCH 2/4] ARM: mvebu: helios4 dts changes to enable SPI

dgilmore at redhat.com
2020-12-07T01:36:01Z

mirror seettings for the clearfog on the helios4 to get SPI working.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
---
arch/arm/dts/armada-388-helios4-u-boot.dtsi | 22 ++++++----
arch/arm/dts/armada-388-helios4.dts | 46 ++++++++++++++++++++-
2 files changed, 58 insertions(+), 10 deletions(-)

diff --git a/arch/arm/dts/armada-388-helios4-u-boot.dtsi b/arch/arm/dts/armada-388-helios4-u-boot.dtsi
index 0753889854..82513a1ce7 100644
--- a/arch/arm/dts/armada-388-helios4-u-boot.dtsi
+++ b/arch/arm/dts/armada-388-helios4-u-boot.dtsi
@@ -1,13 +1,5 @@
// SPDX-License-Identifier: GPL-2.0+

-/ {
- aliases {
- i2c0 = &i2c0;
- i2c1 = &i2c1;
- spi1 = &spi1;
- };
-};
-
&eth0 {
phy-reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
};
@@ -37,5 +29,17 @@
};

&sdhci {
- u-boot,dm-spl;
+ u-boot,dm-spl;
+};
+
+&i2c0 {
+ u-boot,dm-spl;
+
+ eeprom at 52 {
+ u-boot,dm-spl;
+ };
+
+ eeprom at 53 {
+ u-boot,dm-spl;
+ };
};
diff --git a/arch/arm/dts/armada-388-helios4.dts b/arch/arm/dts/armada-388-helios4.dts
index fb49df2a3b..e948b94090 100644
--- a/arch/arm/dts/armada-388-helios4.dts
+++ b/arch/arm/dts/armada-388-helios4.dts
@@ -22,10 +22,14 @@
};

aliases {
- /* So that mvebu u-boot can update the MAC addresses */
+ /* So that mvebu u-boot can update the MAC address */
ethernet1 = &eth0;
+ spi1 = &spi1;
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
};

+
chosen {
stdout-path = "serial0:115200n8";
};
@@ -306,3 +310,43 @@
};
};
};
+
+&pinctrl {
+ helios4_spi1_cs_pins: spi1-cs-pins {
+ marvell,pins = "mpp55";
+ marvell,function = "spi1";
+ };
+ mikro_pins: mikro-pins {
+ /* int: mpp22 rst: mpp29 */
+ marvell,pins = "mpp22", "mpp29";
+ marvell,function = "gpio";
+ };
+ mikro_spi_pins: mikro-spi-pins {
+ marvell,pins = "mpp43";
+ marvell,function = "spi1";
+ };
+ mikro_uart_pins: mikro-uart-pins {
+ marvell,pins = "mpp24", "mpp25";
+ marvell,function = "ua1";
+ };
+ rear_button_pins: rear-button-pins {
+ marvell,pins = "mpp34";
+ marvell,function = "gpio";
+ };
+};
+
+&w25q32 {
+ status = "okay";
+};
+
+&spi1 {
+ /*
+ * Add SPI CS pins for helios4:
+ * CS0: W25Q32
+ * CS1:
+ * CS2: mikrobus
+ */
+ pinctrl-0 = <&spi1_pins &mikro_spi_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
--
2.28.0