Skip to contentSkip to conversation

arm64: dts: Marvell CN9130-CRB fixes

PATCH New Joachim Wiberg 1 participant 3 messages Mar 18, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm64: dts: Marvell CN9130-CRB fixes

Hi,

while testing out the CN9130-CRB in Buildroot we found a few minor issues with the (otherwise great) device tree.

- The 2.5 Gbps port did not work
- The USB port did not register plugged in devices

The following patches address these issues.

Best regards
/Joachim

Joachim Wiberg (2):
arm64: dts: enable 2.5 Gbps port on CN9130-CRB
arm64: dts: power on CN9130-CRB USB port on plug-in

 arch/arm64/boot/dts/marvell/cn9130-crb.dtsi | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 arm64: dts: enable 2.5 Gbps port on CN9130-CRB

While testing the reference board we noticed the 2.5 Gbps port working fine as long as the phy-mode was "properly" set.

---
 arch/arm64/boot/dts/marvell/cn9130-crb.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/marvell/cn9130-crb.dtsi +2 -1
index d9f9f2c19740..893a9be704ba 100644
@@ -355,8 +355,9 @@ &cp0_eth1 {
 
 &cp0_eth2 {
 	/* This port uses "2500base-t" phy-mode */
-	status = "disabled";
+	status = "okay";
 	phy = <&nbaset_phy0>;
 	phys = <&cp0_comphy5 2>;
+	phy-mode = "sgmii";
 };
 
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 arm64: dts: power on CN9130-CRB USB port on plug-in

In reply to Joachim Wiberg

The USB port on the CN9130 reference board did not register any devices being plugged in, despite CONFIG_PINCTRL_MCP23S08=y. According to the schematics, it turns out the regulator is actually controlled by a gpio.

---
 arch/arm64/boot/dts/marvell/cn9130-crb.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/marvell/cn9130-crb.dtsi +3 -1
index 893a9be704ba..f7426b0a4117 100644
@@ -37,12 +37,14 @@ ap0_reg_mmc_vccq: ap0_mmc_vccq@0 {
 	};
 
 	cp0_reg_usb3_vbus1: cp0_usb3_vbus@1 {
-		compatible = "regulator-fixed";
+		compatible = "regulator-gpio";
 		regulator-name = "cp0-xhci1-vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		enable-active-high;
 		gpio = <&expander0 8 GPIO_ACTIVE_HIGH>;
+		states = <5000000 0x1
+			  0000000 0x0>;
 	};
 
 	cp0_usb3_0_phy0: cp0_usb3_phy0 {
Signature · 1 line
2.25.1