linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: activate spi flash on pine64 LTS board
@ 2018-07-22 15:46 Akash Gajjar
  2018-07-24 12:51 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Akash Gajjar @ 2018-07-22 15:46 UTC (permalink / raw)
  To: icenowy
  Cc: Akash Gajjar, Maxime Ripard, Chen-Yu Tsai, Rob Herring,
	Mark Rutland, Catalin Marinas, Will Deacon, linux-arm-kernel,
	devicetree, linux-kernel

This board has a 128M SPI flash. add spi flash support in device tree.

Tested on pine64 LTS.

Signed-off-by: Akash Gajjar <Akash_Gajjar@mentor.com>
---
 .../dts/allwinner/sun50i-a64-sopine-baseboard.dts  | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index abe179d..d54637d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -134,6 +134,29 @@
 	regulator-name = "vcc-wifi";
 };
 
+&spi0  {
+	status = "okay";
+
+	m25p80@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "w25q128";
+		reg = <0x0>;
+		linux,modalias = "m25p80", "w25q128";
+		spi-max-frequency = <40000000>;
+
+		uboot@0 {
+			label = "uboot";
+			reg = <0x0 0x100000>;
+		};
+
+		rootfs@0 {
+			label = "rootfs";
+			reg = <0x100000 0x7F00000>;
+		};
+	};
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: activate spi flash on pine64 LTS board
  2018-07-22 15:46 [PATCH] arm64: activate spi flash on pine64 LTS board Akash Gajjar
@ 2018-07-24 12:51 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2018-07-24 12:51 UTC (permalink / raw)
  To: Akash Gajjar
  Cc: icenowy, Akash Gajjar, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	Catalin Marinas, Will Deacon, linux-arm-kernel, devicetree,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1744 bytes --]

Hi!

On Sun, Jul 22, 2018 at 09:16:49PM +0530, Akash Gajjar wrote:
> This board has a 128M SPI flash. add spi flash support in device tree.
> 
> Tested on pine64 LTS.
> 
> Signed-off-by: Akash Gajjar <Akash_Gajjar@mentor.com>

The author email should match the one in the SoB, and the prefix of
your commit title should be "arm64: dts: allwinner: ..."

> ---
>  .../dts/allwinner/sun50i-a64-sopine-baseboard.dts  | 23 ++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
> index abe179d..d54637d 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
> @@ -134,6 +134,29 @@
>  	regulator-name = "vcc-wifi";
>  };
>  
> +&spi0  {
> +	status = "okay";
> +
> +	m25p80@0 {

The node-name should be the device class, not the device model

> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "w25q128";

According to the binding, this should have "jedec,spi-nor", and you
should put the vendor name before the model name as well.

> +		reg = <0x0>;
> +		linux,modalias = "m25p80", "w25q128";

This property isn

> +		spi-max-frequency = <40000000>;
> +
> +		uboot@0 {
> +			label = "uboot";
> +			reg = <0x0 0x100000>;
> +		};
> +
> +		rootfs@0 {
> +			label = "rootfs";
> +			reg = <0x100000 0x7F00000>;
> +		};

This forces a partition scheme on users that might feel
differently. This should be removed.

maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-24 12:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-22 15:46 [PATCH] arm64: activate spi flash on pine64 LTS board Akash Gajjar
2018-07-24 12:51 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).