From 4af9b12df68ccb302ef3375a0da2bf77a9ead764 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Mon, 26 Jul 2021 12:02:10 +0800 Subject: [PATCH] sunxi: orangepi-3: fixes wrong pcie patches Commit f01b7cd introduced 2 gpios for the pcie part by mistake, one of it is used for usb2phy, and the other is not connected anywhere. Obviously, we cannot copy the dts of pine-h64 directly, which will cause usb2 on this board to be unusable. Note: From the datasheet provided by OrangePi open source, it seems that the perst part of pcie is controlled by the sw6 button. However, let us first guess a gpio to avoid any related error logs. By the way, it seems that the usb3 led (red), sw4 and sw6 buttons on this board are not controlled by gpio. Fixes: f01b7cd ("sunxi: add support for OrangePi 3") Signed-off-by: AmadeusGhost --- ...llwinner-Enable-PCIe-for-Orange-Pi-3.patch | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/target/linux/sunxi/patches-5.4/801-arm64-dts-allwinner-Enable-PCIe-for-Orange-Pi-3.patch b/target/linux/sunxi/patches-5.4/801-arm64-dts-allwinner-Enable-PCIe-for-Orange-Pi-3.patch index 8236f691b4..b0a41ef615 100644 --- a/target/linux/sunxi/patches-5.4/801-arm64-dts-allwinner-Enable-PCIe-for-Orange-Pi-3.patch +++ b/target/linux/sunxi/patches-5.4/801-arm64-dts-allwinner-Enable-PCIe-for-Orange-Pi-3.patch @@ -1,41 +1,14 @@ -From 84110d1e78e57a09a391f24dc69ac8b1c99740e4 Mon Sep 17 00:00:00 2001 -From: Tianling Shen -Date: Fri, 11 Jun 2021 15:27:06 +0800 -Subject: [PATCH] arm64: dts: allwinner: Enable PCIe for Orange Pi 3 - -Signed-off-by: Tianling Shen ---- - .../dts/allwinner/sun50i-h6-orangepi-3.dts | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts -@@ -55,6 +55,16 @@ - }; - }; - -+ reg_pcie_slot: pcie-slot-power { -+ compatible = "regulator-fixed"; -+ regulator-name = "pcie-slot-3v3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ startup-delay-us = <100000>; -+ gpio = <&pio 2 15 GPIO_ACTIVE_HIGH>; -+ enable-active-high; -+ }; -+ - reg_vcc5v: vcc5v { - /* board wide 5V supply directly from the DC jack */ - compatible = "regulator-fixed"; -@@ -202,6 +212,14 @@ +@@ -208,6 +208,14 @@ status = "okay"; }; +&pcie { + vcc-supply = <®_bldo2>; + vdd-supply = <®_dcdcd>; -+ slot-supply = <®_pcie_slot>; -+ perst-gpio = <&pio 6 14 GPIO_ACTIVE_LOW>; /* PG14 */ ++ slot-supply = <®_aldo3>; ++ perst-gpio = <&pio 3 17 GPIO_ACTIVE_LOW>; + status = "okay"; +}; +