[PATCH 1/4] arm64: dts: marvell: espressobin-ultra: enable UART output by default

Subsystems: arm/marvell kirkwood and armada 370, 375, 38x, 39x, xp, 3700, 7k/8k, cn9130 soc support, the rest

STALE1407d

13 messages, 3 authors, 2022-09-24 · open the first message on its own page

[PATCH 1/4] arm64: dts: marvell: espressobin-ultra: enable UART output by default

From: Robert Marko <robert.marko@sartura.hr>
Date: 2021-09-27 15:42:10

Since Espressobin Ultra board has a microUSB port
with the onboard USB to UART connected to it to be
used as a debug UART it makes no sense to require
the bootloader to pass console args to the kernel in
order to get console working.

So, use the "stdout-path" property to enable the UART
output on the microUSB port by default.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 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 c5eb3604dd5b..c1770ceff3c1 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -15,6 +15,10 @@ / {
 	compatible = "globalscale,espressobin-ultra", "marvell,armada3720",
 		     "marvell,armada3710";
 
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
 	aliases {
 		/* ethernet1 is WAN port */
 		ethernet1 = &switch0port5;
-- 
2.31.1

[PATCH 2/4] arm64: dts: marvell: espressobin-ultra: fix SPI-NOR config

From: Robert Marko <robert.marko@sartura.hr>
Date: 2021-09-27 15:42:16

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.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 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 c1770ceff3c1..8a700afd0570 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -75,10 +75,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

[PATCH 3/4] arm64: dts: marvell: espressobin-ultra: add PHY and switch reset pins

From: Robert Marko <robert.marko@sartura.hr>
Date: 2021-09-27 15:42:21

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 <robert.marko@sartura.hr>
---
 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 8a700afd0570..96855a10b4a0 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -118,12 +118,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

Re: [PATCH 3/4] arm64: dts: marvell: espressobin-ultra: add PHY and switch reset pins

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-09-27 16:38:11

On Mon, Sep 27, 2021 at 05:41:58PM +0200, Robert Marko wrote:
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 <robert.marko@sartura.hr>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

Re: [PATCH 3/4] arm64: dts: marvell: espressobin-ultra: add PHY and switch reset pins

From: Pali Rohár <pali@kernel.org>
Date: 2021-09-28 15:32:56

On Monday 27 September 2021 17:41:58 Robert Marko wrote:
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.
Are reset pins connected only on ultra variant? Or on all espressobin
variants? Because if they are on all variants then definitions should go
into common dtsi file.

I see that "gpionb 2" is on v7 variant connected to LED2. So I'm not
sure if this one gpio is also shared or not.
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.
Do you plan to finish also this additional setup?
quoted hunk
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 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 8a700afd0570..96855a10b4a0 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -118,12 +118,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

Re: [PATCH 3/4] arm64: dts: marvell: espressobin-ultra: add PHY and switch reset pins

From: Robert Marko <robert.marko@sartura.hr>
Date: 2021-09-28 16:02:35

On Tue, Sep 28, 2021 at 5:32 PM Pali Rohár [off-list ref] wrote:
On Monday 27 September 2021 17:41:58 Robert Marko wrote:
quoted
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.
Are reset pins connected only on ultra variant? Or on all espressobin
variants? Because if they are on all variants then definitions should go
into common dtsi file.

I see that "gpionb 2" is on v7 variant connected to LED2. So I'm not
sure if this one gpio is also shared or not.
As far as I know only Ultra has the reset pins connected, on the v5 and v7 Topaz
reset is tied to the system reset so it's not controllable.
I checked both the v5 and v7 schematics and it's like that.
quoted
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.
Do you plan to finish also this additional setup?
Yes as the MOCHAbin board that I have sent the DTS for also has it connected
so I can use it as Armada 7040 supports level triggers, unlike the A3720.
It's in the queue but as a low priority, so I don't know when will I get to it.

Regards,
Robert
quoted
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 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 8a700afd0570..96855a10b4a0 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -118,12 +118,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


-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

Re: [PATCH 3/4] arm64: dts: marvell: espressobin-ultra: add PHY and switch reset pins

From: Pali Rohár <pali@kernel.org>
Date: 2022-09-24 12:03:48

On Tuesday 28 September 2021 18:02:19 Robert Marko wrote:
On Tue, Sep 28, 2021 at 5:32 PM Pali Rohár [off-list ref] wrote:
quoted
On Monday 27 September 2021 17:41:58 Robert Marko wrote:
quoted
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.
Are reset pins connected only on ultra variant? Or on all espressobin
variants? Because if they are on all variants then definitions should go
into common dtsi file.

I see that "gpionb 2" is on v7 variant connected to LED2. So I'm not
sure if this one gpio is also shared or not.
As far as I know only Ultra has the reset pins connected, on the v5 and v7 Topaz
reset is tied to the system reset so it's not controllable.
I checked both the v5 and v7 schematics and it's like that.
quoted
quoted
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.
Do you plan to finish also this additional setup?
Yes as the MOCHAbin board that I have sent the DTS for also has it connected
so I can use it as Armada 7040 supports level triggers, unlike the A3720.
It's in the queue but as a low priority, so I don't know when will I get to it.
I have WIP patch for A37xx gpio/pinctrl driver which adds support for
level interrupts. I think you would need it for testing...
Regards,
Robert
quoted
quoted
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 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 8a700afd0570..96855a10b4a0 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -118,12 +118,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


-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

[PATCH 4/4] arm64: dts: marvell: espressobin-ultra: enable front USB3 port

From: Robert Marko <robert.marko@sartura.hr>
Date: 2021-09-27 15:42:23

Espressobin Ultra has a front panel USB3.0 Type-A port which works
just fine so enable it.
I dont see a reason why it was disabled in the first place anyway.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 1 -
 1 file changed, 1 deletion(-)
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 96855a10b4a0..aada43fa236c 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -112,7 +112,6 @@ rtc@51 {
 
 &usb3 {
 	usb-phy = <&usb3_phy>;
-	status = "disabled";
 };
 
 &mdio {
-- 
2.31.1

Re: [PATCH 4/4] arm64: dts: marvell: espressobin-ultra: enable front USB3 port

From: Pali Rohár <pali@kernel.org>
Date: 2021-09-28 15:37:37

On Monday 27 September 2021 17:41:59 Robert Marko wrote:
Espressobin Ultra has a front panel USB3.0 Type-A port which works
just fine so enable it.
I dont see a reason why it was disabled in the first place anyway.
If USB 3.0 port is was tested and is working fine, then what about
adding Fixes: tag into commit message?
quoted hunk
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 1 -
 1 file changed, 1 deletion(-)
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 96855a10b4a0..aada43fa236c 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -112,7 +112,6 @@ rtc@51 {
 
 &usb3 {
 	usb-phy = <&usb3_phy>;
-	status = "disabled";
 };
 
 &mdio {
-- 
2.31.1

Re: [PATCH 4/4] arm64: dts: marvell: espressobin-ultra: enable front USB3 port

From: Robert Marko <robert.marko@sartura.hr>
Date: 2021-09-28 16:03:08

On Tue, Sep 28, 2021 at 5:37 PM Pali Rohár [off-list ref] wrote:
On Monday 27 September 2021 17:41:59 Robert Marko wrote:
quoted
Espressobin Ultra has a front panel USB3.0 Type-A port which works
just fine so enable it.
I dont see a reason why it was disabled in the first place anyway.
If USB 3.0 port is was tested and is working fine, then what about
adding Fixes: tag into commit message?
Sure, gotta send a v4 anyway dropping the first patch.

Regards,
Robert
quoted
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 1 -
 1 file changed, 1 deletion(-)
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 96855a10b4a0..aada43fa236c 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -112,7 +112,6 @@ rtc@51 {

 &usb3 {
      usb-phy = <&usb3_phy>;
-     status = "disabled";
 };

 &mdio {
--
2.31.1


-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

Re: [PATCH 1/4] arm64: dts: marvell: espressobin-ultra: enable UART output by default

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-09-27 16:37:56

On Mon, Sep 27, 2021 at 05:41:56PM +0200, Robert Marko wrote:
Since Espressobin Ultra board has a microUSB port
with the onboard USB to UART connected to it to be
used as a debug UART it makes no sense to require
the bootloader to pass console args to the kernel in
order to get console working.

So, use the "stdout-path" property to enable the UART
output on the microUSB port by default.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

Re: [PATCH 1/4] arm64: dts: marvell: espressobin-ultra: enable UART output by default

From: Pali Rohár <pali@kernel.org>
Date: 2021-09-28 15:13:56

On Monday 27 September 2021 17:41:56 Robert Marko wrote:
quoted hunk
Since Espressobin Ultra board has a microUSB port
with the onboard USB to UART connected to it to be
used as a debug UART it makes no sense to require
the bootloader to pass console args to the kernel in
order to get console working.

So, use the "stdout-path" property to enable the UART
output on the microUSB port by default.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 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 c5eb3604dd5b..c1770ceff3c1 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -15,6 +15,10 @@ / {
 	compatible = "globalscale,espressobin-ultra", "marvell,armada3720",
 		     "marvell,armada3710";
 
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
This code is duplication of common espressobin code from
armada-3720-espressobin.dtsi file:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi
 	aliases {
 		/* ethernet1 is WAN port */
 		ethernet1 = &switch0port5;
-- 
2.31.1

Re: [PATCH 1/4] arm64: dts: marvell: espressobin-ultra: enable UART output by default

From: Robert Marko <robert.marko@sartura.hr>
Date: 2021-09-28 15:50:09

On Tue, Sep 28, 2021 at 5:13 PM Pali Rohár [off-list ref] wrote:
On Monday 27 September 2021 17:41:56 Robert Marko wrote:
quoted
Since Espressobin Ultra board has a microUSB port
with the onboard USB to UART connected to it to be
used as a debug UART it makes no sense to require
the bootloader to pass console args to the kernel in
order to get console working.

So, use the "stdout-path" property to enable the UART
output on the microUSB port by default.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 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 c5eb3604dd5b..c1770ceff3c1 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -15,6 +15,10 @@ / {
      compatible = "globalscale,espressobin-ultra", "marvell,armada3720",
                   "marvell,armada3710";

+     chosen {
+             stdout-path = "serial0:115200n8";
+     };
+
This code is duplication of common espressobin code from
armada-3720-espressobin.dtsi file:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi
Ahh yes, I don't know why was it not working by default then.
Sorry for the noise, I will drop this patch.

Regards,
Robert
quoted
      aliases {
              /* ethernet1 is WAN port */
              ethernet1 = &switch0port5;
--
2.31.1


-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help