From 1fcc805a9a16bafeb80cfcd5f2492642ec8ce93c Mon Sep 17 00:00:00 2001
From: Lucas Tanure <lucas.tanure@collabora.com>
Date: Tue, 28 Feb 2023 14:40:59 +0000
Subject: [PATCH] arm64: dts: rockchip: RK3588s: Enable PCIE2.0x1 @fe190000

Enable PCIE2.0x1 @fe190000 for RTL8125 network controller in
Rock 5B board.

This is based on prior work from XiaoDong Huang and
Peter Geis fixing this issue specifically for Rockchip 356x.

Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com>
Change-Id: Ib01a1a49234167932ea89c8ac5f830e4385ecf75
---
 .../boot/dts/rockchip/rk3588-rock-5b.dts      | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
index 4bac245defbc8..83971b19a3824 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -38,6 +38,15 @@ vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
 		vin-supply = <&vcc5v0_sys>;
 	};
 
+	vcc3v3_pcie2x1l2: vcc3v3-pcie2x1l2 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc3v3_pcie2x1l2";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <5000>;
+		vin-supply = <&vcc_3v3_s3>;
+	};
+
 	sound {
 		compatible = "audio-graph-card";
 		label = "Analog";
@@ -131,3 +140,14 @@ hp_detect: hp-detect {
 		};
 	};
 };
+
+&combphy0_ps {
+	status = "okay";
+};
+
+&pcie2x1l2 {
+	reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
+	vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
+	status = "okay";
+
+};
-- 
GitLab