All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: Enable SPI NOR flash on Rock64
@ 2018-09-26  4:53 ` Chen-Yu Tsai
  0 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2018-09-26  4:53 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-rockchip,
	linux-mtd, linux-spi, linux-kernel, Mark Brown

The Pine64 Rock64 board comes with a GigaDevice GD25Q128CSIG
or GD25Q127CSIG chip, which is a 128 Mbit SPI NOR flash chip
that supports the JEDEC read-ID command.

This patch enables the SPI controller and adds a device node
for the flash chip using the generic "jedec,spi-nor" comaptible.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

This was working on linux-next 20180910, but now fails on linux-next
20180925, with the following error messages:

    m25p80 spi0.0: error -22 reading 9f
    m25p80: probe of spi0.0 failed with error -2

Reverting the spi/for-next branch makes it work again:

    m25p80 spi0.0: gd25q128 (16384 Kbytes)

Not sure what's up.

---
 arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index 9ee4f57557f3..2170cf63845e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -290,6 +290,18 @@
 	};
 };
 
+&spi0 {
+	status = "okay";
+
+	spiflash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+
+		/* maximum speed for Rockchip SPI */
+		spi-max-frequency = <50000000>;
+	};
+};
+
 &tsadc {
 	rockchip,hw-tshut-mode = <0>;
 	rockchip,hw-tshut-polarity = <0>;
-- 
2.19.0


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

* [PATCH] arm64: dts: rockchip: Enable SPI NOR flash on Rock64
@ 2018-09-26  4:53 ` Chen-Yu Tsai
  0 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2018-09-26  4:53 UTC (permalink / raw)
  To: linux-arm-kernel

The Pine64 Rock64 board comes with a GigaDevice GD25Q128CSIG
or GD25Q127CSIG chip, which is a 128 Mbit SPI NOR flash chip
that supports the JEDEC read-ID command.

This patch enables the SPI controller and adds a device node
for the flash chip using the generic "jedec,spi-nor" comaptible.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

This was working on linux-next 20180910, but now fails on linux-next
20180925, with the following error messages:

    m25p80 spi0.0: error -22 reading 9f
    m25p80: probe of spi0.0 failed with error -2

Reverting the spi/for-next branch makes it work again:

    m25p80 spi0.0: gd25q128 (16384 Kbytes)

Not sure what's up.

---
 arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index 9ee4f57557f3..2170cf63845e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -290,6 +290,18 @@
 	};
 };
 
+&spi0 {
+	status = "okay";
+
+	spiflash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+
+		/* maximum speed for Rockchip SPI */
+		spi-max-frequency = <50000000>;
+	};
+};
+
 &tsadc {
 	rockchip,hw-tshut-mode = <0>;
 	rockchip,hw-tshut-polarity = <0>;
-- 
2.19.0

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

* Re: [PATCH] arm64: dts: rockchip: Enable SPI NOR flash on Rock64
  2018-09-26  4:53 ` Chen-Yu Tsai
@ 2018-09-26  7:10   ` Frieder Schrempf
  -1 siblings, 0 replies; 6+ messages in thread
From: Frieder Schrempf @ 2018-09-26  7:10 UTC (permalink / raw)
  To: Chen-Yu Tsai, Heiko Stuebner
  Cc: devicetree, linux-kernel, linux-spi, linux-rockchip, Mark Brown,
	linux-mtd, linux-arm-kernel

On 26.09.2018 06:53, Chen-Yu Tsai wrote:
> The Pine64 Rock64 board comes with a GigaDevice GD25Q128CSIG
> or GD25Q127CSIG chip, which is a 128 Mbit SPI NOR flash chip
> that supports the JEDEC read-ID command.
> 
> This patch enables the SPI controller and adds a device node
> for the flash chip using the generic "jedec,spi-nor" comaptible.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> 
> This was working on linux-next 20180910, but now fails on linux-next
> 20180925, with the following error messages:
> 
>      m25p80 spi0.0: error -22 reading 9f
>      m25p80: probe of spi0.0 failed with error -2
> 
> Reverting the spi/for-next branch makes it work again:
> 
>      m25p80 spi0.0: gd25q128 (16384 Kbytes)
> 
> Not sure what's up.

The reason is probably an issue that was introduced here: [1], and it 
was fixed here: [2].

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/spi?id=380583227c0c7f52383b0cd5c0e2de93ed31d553
[2] 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/spi?id=4c53f98555fdbf1cc291cab8ffa5e1507a4f25d9

> 
> ---
>   arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> index 9ee4f57557f3..2170cf63845e 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> @@ -290,6 +290,18 @@
>   	};
>   };
>   
> +&spi0 {
> +	status = "okay";
> +
> +	spiflash@0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +
> +		/* maximum speed for Rockchip SPI */
> +		spi-max-frequency = <50000000>;
> +	};
> +};
> +
>   &tsadc {
>   	rockchip,hw-tshut-mode = <0>;
>   	rockchip,hw-tshut-polarity = <0>;
> 

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

* [PATCH] arm64: dts: rockchip: Enable SPI NOR flash on Rock64
@ 2018-09-26  7:10   ` Frieder Schrempf
  0 siblings, 0 replies; 6+ messages in thread
From: Frieder Schrempf @ 2018-09-26  7:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 26.09.2018 06:53, Chen-Yu Tsai wrote:
> The Pine64 Rock64 board comes with a GigaDevice GD25Q128CSIG
> or GD25Q127CSIG chip, which is a 128 Mbit SPI NOR flash chip
> that supports the JEDEC read-ID command.
> 
> This patch enables the SPI controller and adds a device node
> for the flash chip using the generic "jedec,spi-nor" comaptible.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> 
> This was working on linux-next 20180910, but now fails on linux-next
> 20180925, with the following error messages:
> 
>      m25p80 spi0.0: error -22 reading 9f
>      m25p80: probe of spi0.0 failed with error -2
> 
> Reverting the spi/for-next branch makes it work again:
> 
>      m25p80 spi0.0: gd25q128 (16384 Kbytes)
> 
> Not sure what's up.

The reason is probably an issue that was introduced here: [1], and it 
was fixed here: [2].

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/spi?id=380583227c0c7f52383b0cd5c0e2de93ed31d553
[2] 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/spi?id=4c53f98555fdbf1cc291cab8ffa5e1507a4f25d9

> 
> ---
>   arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> index 9ee4f57557f3..2170cf63845e 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> @@ -290,6 +290,18 @@
>   	};
>   };
>   
> +&spi0 {
> +	status = "okay";
> +
> +	spiflash at 0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +
> +		/* maximum speed for Rockchip SPI */
> +		spi-max-frequency = <50000000>;
> +	};
> +};
> +
>   &tsadc {
>   	rockchip,hw-tshut-mode = <0>;
>   	rockchip,hw-tshut-polarity = <0>;
> 

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

* Re: [PATCH] arm64: dts: rockchip: Enable SPI NOR flash on Rock64
  2018-09-26  4:53 ` Chen-Yu Tsai
@ 2018-09-26 11:38   ` Heiko Stuebner
  -1 siblings, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2018-09-26 11:38 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-mtd,
	linux-spi, linux-kernel, Mark Brown

Am Mittwoch, 26. September 2018, 06:53:57 CEST schrieb Chen-Yu Tsai:
> The Pine64 Rock64 board comes with a GigaDevice GD25Q128CSIG
> or GD25Q127CSIG chip, which is a 128 Mbit SPI NOR flash chip
> that supports the JEDEC read-ID command.
> 
> This patch enables the SPI controller and adds a device node
> for the flash chip using the generic "jedec,spi-nor" comaptible.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

applied for 4.20

Thanks
Heiko



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

* [PATCH] arm64: dts: rockchip: Enable SPI NOR flash on Rock64
@ 2018-09-26 11:38   ` Heiko Stuebner
  0 siblings, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2018-09-26 11:38 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch, 26. September 2018, 06:53:57 CEST schrieb Chen-Yu Tsai:
> The Pine64 Rock64 board comes with a GigaDevice GD25Q128CSIG
> or GD25Q127CSIG chip, which is a 128 Mbit SPI NOR flash chip
> that supports the JEDEC read-ID command.
> 
> This patch enables the SPI controller and adds a device node
> for the flash chip using the generic "jedec,spi-nor" comaptible.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

applied for 4.20

Thanks
Heiko

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

end of thread, other threads:[~2018-09-26 11:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26  4:53 [PATCH] arm64: dts: rockchip: Enable SPI NOR flash on Rock64 Chen-Yu Tsai
2018-09-26  4:53 ` Chen-Yu Tsai
2018-09-26  7:10 ` Frieder Schrempf
2018-09-26  7:10   ` Frieder Schrempf
2018-09-26 11:38 ` Heiko Stuebner
2018-09-26 11:38   ` Heiko Stuebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.