Skip to contentSkip to conversation

riscv: dts: starfive: fml13v01: enable pcie1

PATCH Applied Sandie Cao 4 participants 4 messages Feb 7, 2025 – Feb 19, 2025

Subsystems (3)
lore
Share & tools
lore

Sandie Cao

author
#0 lore raw

PATCH 1/1 riscv: dts: starfive: fml13v01: enable pcie1

Starfive Soc common defines GPIO28 as pcie1 reset, GPIO21 as pcie1 wakeup; But the FML13V01 board uses GPIO21 as pcie1 reset, GPIO28 as pcie1 wakeup; redefine pcie1 gpio and enable pcie1 for pcie based Wi-Fi.

---
 .../jh7110-deepcomputing-fml13v01.dts         | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
arch/riscv/boot/dts/starfive/jh7110-deepcomputing-fml13v01.dts +34 -0
index 30b0715196b6..8d9ce8b69a71 100644
@@ -11,6 +11,40 @@ / {
 	compatible = "deepcomputing,fml13v01", "starfive,jh7110";
 };
 
+&pcie1 {
+	perst-gpios = <&sysgpio 21 GPIO_ACTIVE_LOW>;
+	phys = <&pciephy1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie1_pins>;
+	status = "okay";
+};
+
+&sysgpio {
+	pcie1_pins: pcie1-0 {
+		clkreq-pins {
+			pinmux = <GPIOMUX(29, GPOUT_LOW,
+					      GPOEN_DISABLE,
+					      GPI_NONE)>;
+			bias-pull-down;
+			drive-strength = <2>;
+			input-enable;
+			input-schmitt-disable;
+			slew-rate = <0>;
+		};
+
+		wake-pins {
+			pinmux = <GPIOMUX(28, GPOUT_HIGH,
+					      GPOEN_DISABLE,
+					      GPI_NONE)>;
+			bias-pull-up;
+			drive-strength = <2>;
+			input-enable;
+			input-schmitt-disable;
+			slew-rate = <0>;
+		};
+	};
+};
+
 &usb0 {
 	dr_mode = "host";
 	status = "okay";

base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b

Signature · 6 lines
2.34.1

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Tested-by on v1 1/1
#1 lore raw
Quoted 55 lines · Sandie Cao

Starfive Soc common defines GPIO28 as pcie1 reset, GPIO21 as pcie1 wakeup; But the FML13V01 board uses GPIO21 as pcie1 reset, GPIO28 as pcie1 wakeup; redefine pcie1 gpio and enable pcie1 for pcie based Wi-Fi.

---
  .../jh7110-deepcomputing-fml13v01.dts         | 34 +++++++++++++++++++
  1 file changed, 34 insertions(+)
arch/riscv/boot/dts/starfive/jh7110-deepcomputing-fml13v01.dts +34 -0
index 30b0715196b6..8d9ce8b69a71 100644
@@ -11,6 +11,40 @@ / {
  	compatible = "deepcomputing,fml13v01", "starfive,jh7110";
  };
 
+&pcie1 {
+	perst-gpios = <&sysgpio 21 GPIO_ACTIVE_LOW>;
+	phys = <&pciephy1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie1_pins>;
+	status = "okay";
+};
+
+&sysgpio {
+	pcie1_pins: pcie1-0 {
+		clkreq-pins {
+			pinmux = <GPIOMUX(29, GPOUT_LOW,
+					      GPOEN_DISABLE,
+					      GPI_NONE)>;
+			bias-pull-down;
+			drive-strength = <2>;
+			input-enable;
+			input-schmitt-disable;
+			slew-rate = <0>;
+		};
+
+		wake-pins {
+			pinmux = <GPIOMUX(28, GPOUT_HIGH,
+					      GPOEN_DISABLE,
+					      GPI_NONE)>;
+			bias-pull-up;
+			drive-strength = <2>;
+			input-enable;
+			input-schmitt-disable;
+			slew-rate = <0>;
+		};
+	};
+};
+
  &usb0 {
  	dr_mode = "host";
  	status = "okay";
Quoted 1 line

base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b

Tried this on my device and it works as expected

Kind regards,
Maud

Reviewed-by on v1 1/1
#2 lore raw
In reply to Sandie Cao
Quoted 5 lines · Sandie Cao

Starfive Soc common defines GPIO28 as pcie1 reset, GPIO21 as pcie1 wakeup; But the FML13V01 board uses GPIO21 as pcie1 reset, GPIO28 as pcie1 wakeup; redefine pcie1 gpio and enable pcie1 for pcie based Wi-Fi.

Unfortunately I don't yet have a board to test this on, but it looks ok to me.

Quoted 58 lines
---
 .../jh7110-deepcomputing-fml13v01.dts         | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
arch/riscv/boot/dts/starfive/jh7110-deepcomputing-fml13v01.dts +34 -0
index 30b0715196b6..8d9ce8b69a71 100644
@@ -11,6 +11,40 @@ / {
 	compatible = "deepcomputing,fml13v01", "starfive,jh7110";
 };
 
+&pcie1 {
+	perst-gpios = <&sysgpio 21 GPIO_ACTIVE_LOW>;
+	phys = <&pciephy1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie1_pins>;
+	status = "okay";
+};
+
+&sysgpio {
+	pcie1_pins: pcie1-0 {
+		clkreq-pins {
+			pinmux = <GPIOMUX(29, GPOUT_LOW,
+					      GPOEN_DISABLE,
+					      GPI_NONE)>;
+			bias-pull-down;
+			drive-strength = <2>;
+			input-enable;
+			input-schmitt-disable;
+			slew-rate = <0>;
+		};
+
+		wake-pins {
+			pinmux = <GPIOMUX(28, GPOUT_HIGH,
+					      GPOEN_DISABLE,
+					      GPI_NONE)>;
+			bias-pull-up;
+			drive-strength = <2>;
+			input-enable;
+			input-schmitt-disable;
+			slew-rate = <0>;
+		};
+	};
+};
+
 &usb0 {
 	dr_mode = "host";
 	status = "okay";

base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b --
2.34.1

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

maintainer Applied
#3 lore raw
In reply to Sandie Cao

From: Conor Dooley <[email protected]>

Quoted 5 lines · Sandie Cao

Starfive Soc common defines GPIO28 as pcie1 reset, GPIO21 as pcie1 wakeup; But the FML13V01 board uses GPIO21 as pcie1 reset, GPIO28 as pcie1 wakeup; redefine pcie1 gpio and enable pcie1 for pcie based Wi-Fi.

Applied to riscv-dt-for-next, thanks!

[1/1] riscv: dts: starfive: fml13v01: enable pcie1

      https://git.kernel.org/conor/c/57b5369f3668

Thanks,
Conor.