2021-09-28 17:12:05

by Robert Marko

[permalink] [raw]
Subject: [PATCH v3 1/3] arm64: dts: marvell: espressobin-ultra: fix SPI-NOR config

SPI config for the SPI-NOR is incorrect and completely breaking
reading/writing to the onboard SPI-NOR.

SPI-NOR is connected in the single(x1) IO mode and not in the quad
(x4) mode.
Also, there is no need to override the max frequency from the DTSI
as the mx25u3235f that is used supports 104Mhz.

Fixes: 3404fe15a60f ("arm64: dts: marvell: add DT for ESPRESSObin-Ultra")
Signed-off-by: Robert Marko <[email protected]>
---
Changes in v3:
* Add Fixes tag
---
arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 4 ----
1 file changed, 4 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
index c5eb3604dd5b..610ff6f385c7 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -71,10 +71,6 @@ &sdhci1 {

&spi0 {
flash@0 {
- spi-max-frequency = <108000000>;
- spi-rx-bus-width = <4>;
- spi-tx-bus-width = <4>;
-
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
--
2.31.1


2021-09-28 17:13:39

by Robert Marko

[permalink] [raw]
Subject: [PATCH v3 2/3] arm64: dts: marvell: espressobin-ultra: add PHY and switch reset pins

Both the Topaz switch and 88E1512 PHY have their reset and interrupts
connected to the SoC.

So, define the Topaz and 88E1512 reset pins in the DTS.

Defining the interrupt pins wont work as both the 88E1512 and the
Topaz switch uses active LOW IRQ signals but the A37xx GPIO controller
only supports edge triggers.
88E1512 would require special setup anyway as its INT pin is shared with
the LED2 and you first need to configure it as INT.

Signed-off-by: Robert Marko <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
---
arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
index 610ff6f385c7..7c786d218f1b 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -114,12 +114,16 @@ &usb3 {
&mdio {
extphy: ethernet-phy@1 {
reg = <1>;
+
+ reset-gpios = <&gpionb 2 GPIO_ACTIVE_LOW>;
};
};

&switch0 {
reg = <3>;

+ reset-gpios = <&gpiosb 23 GPIO_ACTIVE_LOW>;
+
ports {
switch0port1: port@1 {
reg = <1>;
--
2.31.1

2022-03-24 23:32:57

by Robert Marko

[permalink] [raw]
Subject: Re: [PATCH v3 1/3] arm64: dts: marvell: espressobin-ultra: fix SPI-NOR config

On Tue, Sep 28, 2021 at 7:09 PM Robert Marko <[email protected]> wrote:
>
> SPI config for the SPI-NOR is incorrect and completely breaking
> reading/writing to the onboard SPI-NOR.
>
> SPI-NOR is connected in the single(x1) IO mode and not in the quad
> (x4) mode.
> Also, there is no need to override the max frequency from the DTSI
> as the mx25u3235f that is used supports 104Mhz.
>
> Fixes: 3404fe15a60f ("arm64: dts: marvell: add DT for ESPRESSObin-Ultra")
> Signed-off-by: Robert Marko <[email protected]>
> ---
> Changes in v3:
> * Add Fixes tag
> ---
> arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
> index c5eb3604dd5b..610ff6f385c7 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
> @@ -71,10 +71,6 @@ &sdhci1 {
>
> &spi0 {
> flash@0 {
> - spi-max-frequency = <108000000>;
> - spi-rx-bus-width = <4>;
> - spi-tx-bus-width = <4>;
> -
> partitions {
> compatible = "fixed-partitions";
> #address-cells = <1>;
> --
> 2.31.1
>

Hi,

It would be great to get a review of the series or at least of this patch,
otherwise, the SPI-NOR is unusable.

Regards,
Robert


--
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: [email protected]
Web: http://www.sartura.hr

2022-05-09 10:49:06

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH v3 1/3] arm64: dts: marvell: espressobin-ultra: fix SPI-NOR config

Robert Marko <[email protected]> writes:

> SPI config for the SPI-NOR is incorrect and completely breaking
> reading/writing to the onboard SPI-NOR.
>
> SPI-NOR is connected in the single(x1) IO mode and not in the quad
> (x4) mode.
> Also, there is no need to override the max frequency from the DTSI
> as the mx25u3235f that is used supports 104Mhz.
>
> Fixes: 3404fe15a60f ("arm64: dts: marvell: add DT for ESPRESSObin-Ultra")
> Signed-off-by: Robert Marko <[email protected]>

Applied on mvebu/dt64

Thanks,

Gregory


> ---
> Changes in v3:
> * Add Fixes tag
> ---
> arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
> index c5eb3604dd5b..610ff6f385c7 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
> @@ -71,10 +71,6 @@ &sdhci1 {
>
> &spi0 {
> flash@0 {
> - spi-max-frequency = <108000000>;
> - spi-rx-bus-width = <4>;
> - spi-tx-bus-width = <4>;
> -
> partitions {
> compatible = "fixed-partitions";
> #address-cells = <1>;
> --
> 2.31.1
>

--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

2022-05-09 10:49:58

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH v3 2/3] arm64: dts: marvell: espressobin-ultra: add PHY and switch reset pins

Robert Marko <[email protected]> writes:

> Both the Topaz switch and 88E1512 PHY have their reset and interrupts
> connected to the SoC.
>
> So, define the Topaz and 88E1512 reset pins in the DTS.
>
> Defining the interrupt pins wont work as both the 88E1512 and the
> Topaz switch uses active LOW IRQ signals but the A37xx GPIO controller
> only supports edge triggers.
> 88E1512 would require special setup anyway as its INT pin is shared with
> the LED2 and you first need to configure it as INT.
>
> Signed-off-by: Robert Marko <[email protected]>
> Reviewed-by: Andrew Lunn <[email protected]>


Applied on mvebu/dt64

Thanks,

Gregory


> ---
> arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
> index 610ff6f385c7..7c786d218f1b 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
> @@ -114,12 +114,16 @@ &usb3 {
> &mdio {
> extphy: ethernet-phy@1 {
> reg = <1>;
> +
> + reset-gpios = <&gpionb 2 GPIO_ACTIVE_LOW>;
> };
> };
>
> &switch0 {
> reg = <3>;
>
> + reset-gpios = <&gpiosb 23 GPIO_ACTIVE_LOW>;
> +
> ports {
> switch0port1: port@1 {
> reg = <1>;
> --
> 2.31.1
>

--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com