Skip to contentSkip to conversation

ARM: dts: aspeed: romulus: Add GPIO hogs for nic_mode_func

PATCH In review Lei YU 2 participants 3 messages Mar 15, 2017 – Mar 21, 2017

Subsystems (2)
lore
Share & tools
lore

Lei YU

author
#0 lore raw

PATCH 1/1 ARM: dts: aspeed: romulus: Add GPIO hogs for nic_mode_func

GPIOD3/D4 are the "NIC_FUNC_MODE_0/1" pins connected to Broadcom 5719 which control the PCIe functions.
Add GPIO hogs to pull down GPIOD3/D4 to use that function.

---
 arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +15 -0
index b8b2d7f..2266c85 100644
@@ -181,6 +181,21 @@
 	status = "disabled";
 };
 
+&gpio {
+    nic_func_mode0 {
+		gpio-hog;
+		gpios = <ASPEED_GPIO(D, 3) GPIO_ACTIVE_HIGH>;
+		output-low;
+		line-name = "nic_func_mode0";
+    };
+    nic_func_mode1 {
+		gpio-hog;
+		gpios = <ASPEED_GPIO(D, 4) GPIO_ACTIVE_HIGH>;
+		output-low;
+		line-name = "nic_func_mode1";
+    };
+};
+
 &vuart {
 	status = "okay";
 };
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 3 lines · Lei YU

GPIOD3/D4 are the "NIC_FUNC_MODE_0/1" pins connected to Broadcom 5719 which control the PCIe functions.
Add GPIO hogs to pull down GPIOD3/D4 to use that function.

On other systems we had three GPIOs that set the mode of the NIC. I notice the schematic for romulus has three FUNC_MODE pins. Is there a reason you're only setting two of them?

I have applied this to dev-4.7. Please send a follow up for FUNC_MODE_2 if you want to set that.

Cheers,

Joel

Quoted 35 lines
---
 arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +15 -1
index b8b2d7f..2266c85 100644
@@ -181,6 +181,21 @@
        status = "disabled";
 };
 
+&gpio {
+    nic_func_mode0 {
+               gpio-hog;
+               gpios = <ASPEED_GPIO(D, 3) GPIO_ACTIVE_HIGH>;
+               output-low;
+               line-name = "nic_func_mode0";
+    };
+    nic_func_mode1 {
+               gpio-hog;
+               gpios = <ASPEED_GPIO(D, 4) GPIO_ACTIVE_HIGH>;
+               output-low;
+               line-name = "nic_func_mode1";
+    };
+};
+
 &vuart {
        status = "okay";
 };
--

1.9.1

author
#2 lore raw
Quoted 9 lines · Joel Stanley
Quoted 3 lines · Lei YU

GPIOD3/D4 are the "NIC_FUNC_MODE_0/1" pins connected to Broadcom 5719 which control the PCIe functions.
Add GPIO hogs to pull down GPIOD3/D4 to use that function.

On other systems we had three GPIOs that set the mode of the NIC. I notice the schematic for romulus has three FUNC_MODE pins. Is there a reason you're only setting two of them?

Nick (the chief engineer of Romulus) specifically asked to pull down only the two GPIOs, and mentioned there's no need to pull down GPIOD5.
So this patch only set the two pins for nic_func_mode0/1.

Quoted 43 lines

I have applied this to dev-4.7. Please send a follow up for FUNC_MODE_2 if you want to set that.

Cheers,

Joel

Quoted 35 lines
---
 arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +15 -1
index b8b2d7f..2266c85 100644
@@ -181,6 +181,21 @@
        status = "disabled";
 };
 
+&gpio {
+    nic_func_mode0 {
+               gpio-hog;
+               gpios = <ASPEED_GPIO(D, 3) GPIO_ACTIVE_HIGH>;
+               output-low;
+               line-name = "nic_func_mode0";
+    };
+    nic_func_mode1 {
+               gpio-hog;
+               gpios = <ASPEED_GPIO(D, 4) GPIO_ACTIVE_HIGH>;
+               output-low;
+               line-name = "nic_func_mode1";
+    };
+};
+
 &vuart {
        status = "okay";
 };
--

1.9.1