From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
Date: Sat, 20 Jun 2020 22:39:57 +0200
Subject: [ARCHEOLOGY] Initial ROCK Pi E support (as WIP) (#2042)

> X-Git-Archeology: > recovered message: > * WIP: Adding RockpiE config
> X-Git-Archeology: > recovered message: > Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
> X-Git-Archeology: > recovered message: > * Mainline u-boot for ROCK Pi E
> X-Git-Archeology: > recovered message: > * Initial ROCK Pi E device tree in kernel
> X-Git-Archeology: > recovered message: > * Fixed supplies for ROCK Pi E device tree
> X-Git-Archeology: > recovered message: > * Adjusted u-boot load address for rockchip64 boards with 256MB eg. ROCK Pi E
> X-Git-Archeology: > recovered message: > * Blacklisted lima on ROCK Pi E
> X-Git-Archeology: > recovered message: > * Fixed ROCK Pi E patch after merge from master
> X-Git-Archeology: > recovered message: > * Removed mode settings from rk805 regulators
> X-Git-Archeology: > recovered message: > * Fixed issues with offloading for gigabit interface of RockPi E
> X-Git-Archeology: > recovered message: > * Adjusted ROCK Pi E board config
> X-Git-Archeology: > recovered message: > * Added dev branch for ROCK Pi E
> X-Git-Archeology: > recovered message: > * Add build targets
> X-Git-Archeology: > recovered message: > Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
> X-Git-Archeology: > recovered message: > * Exchange legacy to current in ROCK Pi E build targets
> X-Git-Archeology: > recovered message: > Co-authored-by: Piotr Szczepanik <piter75@gmail.com>
> X-Git-Archeology: - Revision e1ecb098330dc372740371dc2386f911833a0529: https://github.com/armbian/build/commit/e1ecb098330dc372740371dc2386f911833a0529
> X-Git-Archeology:   Date: Sat, 20 Jun 2020 22:39:57 +0200
> X-Git-Archeology:   From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology:   Subject: Initial ROCK Pi E support (as WIP) (#2042)
> X-Git-Archeology:
> X-Git-Archeology: - Revision 72257bd0648c28fca32962126bb885a4a2c188cc: https://github.com/armbian/build/commit/72257bd0648c28fca32962126bb885a4a2c188cc
> X-Git-Archeology:   Date: Tue, 23 Jun 2020 16:37:54 +0200
> X-Git-Archeology:   From: Piotr Szczepanik <piter75@gmail.com>
> X-Git-Archeology:   Subject: Make USB3 support of ROCK Pi E on par with other rk3328 boards (#2050)
> X-Git-Archeology:
> X-Git-Archeology: - Revision e36ce875b025e112127cf8cc2d34825ebfe36569: https://github.com/armbian/build/commit/e36ce875b025e112127cf8cc2d34825ebfe36569
> X-Git-Archeology:   Date: Tue, 10 Nov 2020 21:43:13 +0100
> X-Git-Archeology:   From: Piotr Szczepanik <piter75@gmail.com>
> X-Git-Archeology:   Subject: Switched rockchip64-current to linux 5.9.y (#2309)
> X-Git-Archeology:
> X-Git-Archeology: - Revision ccbc888b3f5731790128684959b55b6552e26190: https://github.com/armbian/build/commit/ccbc888b3f5731790128684959b55b6552e26190
> X-Git-Archeology:   Date: Sat, 28 Nov 2020 16:52:34 +0100
> X-Git-Archeology:   From: Oleg <balbes-150@yandex.ru>
> X-Git-Archeology:   Subject: add dts rk3328-roc-pc, fix WIFI and USB 3.0 rk3328 (#2390)
> X-Git-Archeology:
> X-Git-Archeology: - Revision 25bd76527e1276c4c00829f68c0ca0742ecc94c1: https://github.com/armbian/build/commit/25bd76527e1276c4c00829f68c0ca0742ecc94c1
> X-Git-Archeology:   Date: Sat, 28 Nov 2020 18:10:53 +0100
> X-Git-Archeology:   From: Piotr Szczepanik <piter75@gmail.com>
> X-Git-Archeology:   Subject: Fix roc-rk3328-pc device tree reference to missing RK_FUNC_1
> X-Git-Archeology:
> X-Git-Archeology: - Revision dfd5cf9692e97774f7f0bfd72227144e36f58070: https://github.com/armbian/build/commit/dfd5cf9692e97774f7f0bfd72227144e36f58070
> X-Git-Archeology:   Date: Sun, 13 Dec 2020 22:13:03 -0500
> X-Git-Archeology:   From: tonymac32 <tonymckahan@gmail.com>
> X-Git-Archeology:   Subject: [ rockchip64 ] Clean up patchset
> X-Git-Archeology:
> X-Git-Archeology: - Revision 25e0f1633467c020f6ae68d09964a522fbfbe613: https://github.com/armbian/build/commit/25e0f1633467c020f6ae68d09964a522fbfbe613
> X-Git-Archeology:   Date: Mon, 18 Jan 2021 23:21:40 +0100
> X-Git-Archeology:   From: Piotr Szczepanik <piter75@gmail.com>
> X-Git-Archeology:   Subject: Adjusted power and pmic configuration for Station M1 in current/dev
> X-Git-Archeology:
> X-Git-Archeology: - Revision 0cdffb29b07305209efb12cf3b5ac6032d3a1153: https://github.com/armbian/build/commit/0cdffb29b07305209efb12cf3b5ac6032d3a1153
> X-Git-Archeology:   Date: Wed, 24 Mar 2021 19:01:53 +0100
> X-Git-Archeology:   From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology:   Subject: Renaming DEV branch to EDGE (#2704)
> X-Git-Archeology:
> X-Git-Archeology: - Revision d8dbefd61838e5b0cfc2b93d2d168f3fb2666dfb: https://github.com/armbian/build/commit/d8dbefd61838e5b0cfc2b93d2d168f3fb2666dfb
> X-Git-Archeology:   Date: Tue, 27 Jul 2021 00:05:09 -0400
> X-Git-Archeology:   From: tonymac32 <tonymckahan@gmail.com>
> X-Git-Archeology:   Subject: [ rockchip64 ] rk3328 change to mainline USB3
> X-Git-Archeology:
> X-Git-Archeology: - Revision a16699260fb786a4d89a1c335722e9fed49d19d2: https://github.com/armbian/build/commit/a16699260fb786a4d89a1c335722e9fed49d19d2
> X-Git-Archeology:   Date: Fri, 08 Jul 2022 22:35:59 +1200
> X-Git-Archeology:   From: schwar3kat <61094841+schwar3kat@users.noreply.github.com>
> X-Git-Archeology:   Subject: Refactored orangepi-r1plus-lts dts in kernel add board patch
> X-Git-Archeology:
> X-Git-Archeology: - Revision 8648dde23ff090b5fb704adab036ed14cd944ba3: https://github.com/armbian/build/commit/8648dde23ff090b5fb704adab036ed14cd944ba3
> X-Git-Archeology:   Date: Thu, 22 Sep 2022 10:25:28 +0200
> X-Git-Archeology:   From: aiamadeus <42570690+aiamadeus@users.noreply.github.com>
> X-Git-Archeology:   Subject: rockchip: fixes support for orangepi-r1plus (#4215)
> X-Git-Archeology:
> X-Git-Archeology: - Revision 85bab47bba73e0ef0e4ea5fde60e0aab56f82906: https://github.com/armbian/build/commit/85bab47bba73e0ef0e4ea5fde60e0aab56f82906
> X-Git-Archeology:   Date: Sat, 06 May 2023 12:55:10 +0200
> X-Git-Archeology:   From: amazingfate <liujianfeng1994@gmail.com>
> X-Git-Archeology:   Subject: bump rockchip64 edge to v6.3
> X-Git-Archeology:
> X-Git-Archeology: - Revision 906ca66430329ab774f5b9d0f62eef1ce5e398fe: https://github.com/armbian/build/commit/906ca66430329ab774f5b9d0f62eef1ce5e398fe
> X-Git-Archeology:   Date: Tue, 16 May 2023 08:55:33 +0200
> X-Git-Archeology:   From: Ricardo Pardini <ricardo@pardini.net>
> X-Git-Archeology:   Subject: `rockchip64`/`edge`/`6.3`: rebase/rewrite patches against `v6.3.1`; do archeology for mbox-less patches; materialize overwrites
> X-Git-Archeology:
> X-Git-Archeology: - Revision 19d532b13cabc1a749f61b9c400d933ba5aeb7e3: https://github.com/armbian/build/commit/19d532b13cabc1a749f61b9c400d933ba5aeb7e3
> X-Git-Archeology:   Date: Tue, 13 Jun 2023 12:33:59 +0200
> X-Git-Archeology:   From: Ricardo Pardini <ricardo@pardini.net>
> X-Git-Archeology:   Subject: `rockchip64` `edge` 6.3: rename most remaining "add-board" patches to "board" (all "add-board"s are now bare .dts in `dt/` folder)
> X-Git-Archeology:
> X-Git-Archeology: - Revision 41ade999f04c26a277cfa1c3c721cbe869d3ad12: https://github.com/armbian/build/commit/41ade999f04c26a277cfa1c3c721cbe869d3ad12
> X-Git-Archeology:   Date: Tue, 03 Oct 2023 13:54:03 +0200
> X-Git-Archeology:   From: Ricardo Pardini <ricardo@pardini.net>
> X-Git-Archeology:   Subject: `rockchip64`/`edge`: bump to `6.6-rc4`; initial copy patches from 6.5
> X-Git-Archeology:
> X-Git-Archeology: - Revision 1f4df4c41fe33f9822ca2f42d14a2a445e27aed7: https://github.com/armbian/build/commit/1f4df4c41fe33f9822ca2f42d14a2a445e27aed7
> X-Git-Archeology:   Date: Sun, 14 Jan 2024 14:14:50 +0100
> X-Git-Archeology:   From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology:   Subject: rockchip64: bump edge to 6.7, current to 6.6
> X-Git-Archeology:
> X-Git-Archeology: - Revision e4d413b9166e3633b40fb23382fb1045b9d0e315: https://github.com/armbian/build/commit/e4d413b9166e3633b40fb23382fb1045b9d0e315
> X-Git-Archeology:   Date: Tue, 26 Mar 2024 13:46:35 +0100
> X-Git-Archeology:   From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology:   Subject: rockchip64: bump edge kernel to 6.8
> X-Git-Archeology:
> X-Git-Archeology: - Revision fae4549764c548cb65d3cbfe319f1e11bc777505: https://github.com/armbian/build/commit/fae4549764c548cb65d3cbfe319f1e11bc777505
> X-Git-Archeology:   Date: Thu, 04 Apr 2024 13:38:18 +0800
> X-Git-Archeology:   From: aiamadeus <2789289348@qq.com>
> X-Git-Archeology:   Subject: rockchip: update dts patches for orangepi r1-plus
> X-Git-Archeology:
---
 arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dtsi | 45 ++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dtsi b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dtsi
@@ -8,6 +8,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include "rk3328-dram-default-timing.dtsi"
 #include "rk3328.dtsi"
 
 / {
@@ -83,6 +84,33 @@ vdd_5v_lan: regulator-vdd-5v-lan {
 		regulator-boot-on;
 		vin-supply = <&vcc_sys>;
 	};
+
+	/delete-node/ dmc-opp-table;
+
+	dmc_opp_table: dmc_opp_table {
+		compatible = "operating-points-v2";
+
+		opp-786000000 {
+			opp-hz = /bits/ 64 <786000000>;
+			opp-microvolt = <1075000 1075000 1200000>;
+		};
+		opp-798000000 {
+			opp-hz = /bits/ 64 <798000000>;
+			opp-microvolt = <1075000 1075000 1200000>;
+		};
+		opp-840000000 {
+			opp-hz = /bits/ 64 <840000000>;
+			opp-microvolt = <1075000 1075000 1200000>;
+		};
+		opp-924000000 {
+			opp-hz = /bits/ 64 <924000000>;
+			opp-microvolt = <1100000 1100000 1200000>;
+		};
+		opp-1056000000 {
+			opp-hz = /bits/ 64 <1056000000>;
+			opp-microvolt = <1175000 1175000 1200000>;
+		};
+	};
 };
 
 &cpu0 {
@@ -105,6 +133,16 @@ &display_subsystem {
 	status = "disabled";
 };
 
+&dfi {
+	status = "okay";
+};
+
+&dmc {
+	center-supply = <&vdd_log>;
+	ddr_timing = <&ddr_timing>;
+	status = "okay";
+};
+
 &gmac2io {
 	assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
 	assigned-clock-parents = <&gmac_clk>, <&gmac_clk>;
@@ -120,6 +158,10 @@ mdio {
 	};
 };
 
+&i2c0 {
+	status = "okay";
+};
+
 &i2c1 {
 	status = "okay";
 
@@ -149,6 +191,7 @@ vdd_log: DCDC_REG1 {
 				regulator-name = "vdd_log";
 				regulator-always-on;
 				regulator-boot-on;
+				regulator-init-microvolt = <1075000>;
 				regulator-min-microvolt = <712500>;
 				regulator-max-microvolt = <1450000>;
 				regulator-ramp-delay = <12500>;
@@ -163,6 +206,7 @@ vdd_arm: DCDC_REG2 {
 				regulator-name = "vdd_arm";
 				regulator-always-on;
 				regulator-boot-on;
+				regulator-init-microvolt = <1225000>;
 				regulator-min-microvolt = <712500>;
 				regulator-max-microvolt = <1450000>;
 				regulator-ramp-delay = <12500>;
@@ -344,6 +388,7 @@ &usbdrd3 {
 	rtl8153: device@2 {
 		compatible = "usbbda,8153";
 		reg = <2>;
+		realtek,led-data = <0x87>;
 	};
 };
 
-- 
Armbian

