diff mbox series

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

Message ID 20201207013603.330578-2-dgilmore@redhat.com
State Superseded
Delegated to: Stefan Roese
Headers show
Series [1/4] ARM: mvebu: helios4 adjust env sizes to enable SPI to work | expand

Commit Message

Dennis Gilmore Dec. 7, 2020, 1:36 a.m. UTC
From: Dennis Gilmore <dennis@ausil.us>

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(-)

Comments

Baruch Siach Dec. 7, 2020, 5:36 a.m. UTC | #1
Hi Dennis,

On Mon, Dec 07 2020, dgilmore@redhat.com wrote:
> From: Dennis Gilmore <dennis@ausil.us>
>
> 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@52 {
> +		u-boot,dm-spl;
> +	};
> +
> +	eeprom@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";
> +	};

There is no MikroBUS header or rear button on the Helios4 carrier as far
as I can see.

> +};
> +
> +&w25q32 {
> +	status = "okay";
> +};
> +
> +&spi1 {
> +	/*
> +	 * Add SPI CS pins for helios4:
> +	 * CS0: W25Q32
> +	 * CS1:
> +	 * CS2: mikrobus

Ditto.

> +	 */
> +	pinctrl-0 = <&spi1_pins &mikro_spi_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};

baruch
diff mbox series

Patch

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@52 {
+		u-boot,dm-spl;
+	};
+
+	eeprom@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";
+};