rk322x-box: rewrite u-boot patches against v2024.07-rc5

This commit is contained in:
Ricardo Pardini
2024-07-07 00:05:44 +02:00
committed by Igor
parent d399fb9b7f
commit 07084b64b7
11 changed files with 235 additions and 117 deletions

View File

@@ -1,18 +1,18 @@
From 497b401b7ec7f0fa52efa4765b8421e21b8840ff Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Mon, 29 Apr 2024 16:18:46 +0200
Subject: [PATCH 4/4] clock entries to accomodate rk3228 HDMI features
Subject: clock entries to accomodate rk3228 HDMI features
---
.../include/asm/arch-rockchip/cru_rk322x.h | 14 ++
drivers/clk/rockchip/clk_rk322x.c | 133 +++++++++++++++++-
2 files changed, 144 insertions(+), 3 deletions(-)
arch/arm/include/asm/arch-rockchip/cru_rk322x.h | 14 +
drivers/clk/rockchip/clk_rk322x.c | 129 +++++++++-
2 files changed, 140 insertions(+), 3 deletions(-)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk322x.h b/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
index cfbc7e92f7..de3c4bf310 100644
index 111111111111..222222222222 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
@@ -194,6 +194,10 @@ enum {
@@ -193,6 +193,10 @@ enum {
/* CRU_CLKSEL27_CON */
VOP_DCLK_DIV_SHIFT = 8,
VOP_DCLK_DIV_MASK = 0xff << VOP_DCLK_DIV_SHIFT,
@@ -23,7 +23,7 @@ index cfbc7e92f7..de3c4bf310 100644
VOP_PLL_SEL_SHIFT = 1,
VOP_PLL_SEL_MASK = 1 << VOP_PLL_SEL_SHIFT,
@@ -201,6 +205,16 @@ enum {
@@ -200,6 +204,16 @@ enum {
GMAC_CLK_SRC_SHIFT = 12,
GMAC_CLK_SRC_MASK = 1 << GMAC_CLK_SRC_SHIFT,
@@ -41,10 +41,10 @@ index cfbc7e92f7..de3c4bf310 100644
DDRCTRL_PSRST_SHIFT = 11,
DDRCTRL_SRST_SHIFT = 10,
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index 44b5778589..418164e63b 100644
index 111111111111..222222222222 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -371,6 +371,14 @@ static ulong rk322x_clk_get_rate(struct clk *clk)
@@ -367,6 +367,14 @@ static ulong rk322x_clk_get_rate(struct clk *clk)
case SCLK_SDMMC:
rate = rockchip_mmc_get_clk(priv->cru, gclk_rate, clk->id);
break;
@@ -59,7 +59,7 @@ index 44b5778589..418164e63b 100644
default:
return -ENOENT;
}
@@ -378,6 +386,68 @@ static ulong rk322x_clk_get_rate(struct clk *clk)
@@ -374,6 +382,68 @@ static ulong rk322x_clk_get_rate(struct clk *clk)
return rate;
}
@@ -128,7 +128,7 @@ index 44b5778589..418164e63b 100644
static ulong rk322x_clk_set_rate(struct clk *clk, ulong rate)
{
struct rk322x_clk_priv *priv = dev_get_priv(clk->dev);
@@ -400,7 +470,29 @@ static ulong rk322x_clk_set_rate(struct clk *clk, ulong rate)
@@ -395,7 +465,29 @@ static ulong rk322x_clk_set_rate(struct clk *clk, ulong rate)
new_rate = rk322x_mac_set_clk(priv->cru, rate);
break;
case PLL_GPLL:
@@ -159,7 +159,7 @@ index 44b5778589..418164e63b 100644
default:
return -ENOENT;
}
@@ -461,13 +553,44 @@ static int rk322x_gmac_extclk_set_parent(struct clk *clk, struct clk *parent)
@@ -456,13 +548,44 @@ static int rk322x_gmac_extclk_set_parent(struct clk *clk, struct clk *parent)
return -EINVAL;
}
@@ -204,7 +204,7 @@ index 44b5778589..418164e63b 100644
}
debug("%s: unsupported clk %ld\n", __func__, clk->id);
@@ -646,7 +773,7 @@ static int rk322x_clk_bind(struct udevice *dev)
@@ -520,7 +643,7 @@ static int rk322x_clk_bind(struct udevice *dev)
debug("Warning: software reset driver bind failed\n");
#endif
@@ -213,7 +213,7 @@ index 44b5778589..418164e63b 100644
}
static const struct udevice_id rk322x_clk_ids[] = {
@@ -655,7 +782,7 @@ static const struct udevice_id rk322x_clk_ids[] = {
@@ -529,7 +652,7 @@ static const struct udevice_id rk322x_clk_ids[] = {
};
U_BOOT_DRIVER(rockchip_rk322x_cru) = {
@@ -223,5 +223,5 @@ index 44b5778589..418164e63b 100644
.of_match = rk322x_clk_ids,
.priv_auto = sizeof(struct rk322x_clk_priv),
--
2.34.1
Armbian

View File

@@ -1,16 +1,15 @@
From 98792aa8f196df9f771c52e5bcac2c34a2937cd2 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Sun, 30 Jun 2024 17:37:39 +0200
Subject: [PATCH] rk3228 hdmi driver
Subject: rk3228 hdmi driver
---
drivers/video/rockchip/Makefile | 1 +
drivers/video/rockchip/rk3228_hdmi.c | 168 +++++++++++++++++++++++++++
drivers/video/rockchip/rk3228_hdmi.c | 168 ++++++++++
2 files changed, 169 insertions(+)
create mode 100644 drivers/video/rockchip/rk3228_hdmi.c
diff --git a/drivers/video/rockchip/Makefile b/drivers/video/rockchip/Makefile
index f55beceebf..ac55864a33 100644
index 111111111111..222222222222 100644
--- a/drivers/video/rockchip/Makefile
+++ b/drivers/video/rockchip/Makefile
@@ -10,6 +10,7 @@ obj-$(CONFIG_ROCKCHIP_RK3328) += rk3328_vop.o
@@ -23,7 +22,7 @@ index f55beceebf..ac55864a33 100644
obj-hdmi-$(CONFIG_ROCKCHIP_RK3399) += rk3399_hdmi.o
diff --git a/drivers/video/rockchip/rk3228_hdmi.c b/drivers/video/rockchip/rk3228_hdmi.c
new file mode 100644
index 0000000000..3a95fcf0d8
index 000000000000..111111111111
--- /dev/null
+++ b/drivers/video/rockchip/rk3228_hdmi.c
@@ -0,0 +1,168 @@
@@ -196,5 +195,5 @@ index 0000000000..3a95fcf0d8
+ .flags = DM_FLAG_OS_PREPARE
+};
--
2.34.1
Armbian

View File

@@ -1,14 +1,14 @@
From 3f6e2571e3bc164fceacc2057476fdf0724f1131 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Sun, 30 Jun 2024 17:18:22 +0200
Subject: [PATCH] add rk3228 support to inno hdmi driver
Subject: add rk3228 support to inno hdmi driver
---
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 379 ++++++++++++++++++
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 379 ++++++++++
1 file changed, 379 insertions(+)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
index 604e2703da..e41428be22 100644
index 111111111111..222222222222 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
@@ -19,6 +19,110 @@
@@ -489,5 +489,5 @@ index 604e2703da..e41428be22 100644
.compatible = "rockchip,rk3328-hdmi-phy",
.data = (ulong)&rk3328_inno_hdmi_phy_drv_data,
--
2.34.1
Armbian

View File

@@ -1,16 +1,15 @@
From 87c948b811c99b0a9004016099152a406b8db903 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Sun, 30 Jun 2024 17:41:01 +0200
Subject: [PATCH] rk3228 vop driver
Subject: rk3228 vop driver
---
drivers/video/rockchip/Makefile | 1 +
drivers/video/rockchip/rk3228_vop.c | 107 ++++++++++++++++++++++++++++
drivers/video/rockchip/rk3228_vop.c | 107 ++++++++++
2 files changed, 108 insertions(+)
create mode 100644 drivers/video/rockchip/rk3228_vop.c
diff --git a/drivers/video/rockchip/Makefile b/drivers/video/rockchip/Makefile
index ac55864a33..28ac47a81b 100644
index 111111111111..222222222222 100644
--- a/drivers/video/rockchip/Makefile
+++ b/drivers/video/rockchip/Makefile
@@ -5,6 +5,7 @@
@@ -23,7 +22,7 @@ index ac55864a33..28ac47a81b 100644
obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399_vop.o
diff --git a/drivers/video/rockchip/rk3228_vop.c b/drivers/video/rockchip/rk3228_vop.c
new file mode 100644
index 0000000000..ec558078a0
index 000000000000..111111111111
--- /dev/null
+++ b/drivers/video/rockchip/rk3228_vop.c
@@ -0,0 +1,107 @@
@@ -135,5 +134,5 @@ index 0000000000..ec558078a0
+ .flags = DM_FLAG_OS_PREPARE
+};
--
2.34.1
Armbian

View File

@@ -1,14 +1,16 @@
From 908176615a6aa710563883715da75e50e7305179 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Sat, 4 May 2024 15:07:27 +0200
Subject: [PATCH] add reset properties for usb otg/ehci
Subject: add reset properties for usb otg/ehci
---
arch/arm/dts/rk322x.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
arch/arm/dts/rk322x.dtsi | 8 ++++++++
drivers/usb/host/dwc2.c | 5 ++++-
drivers/usb/host/ehci-generic.c | 6 +++---
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/arch/arm/dts/rk322x.dtsi b/arch/arm/dts/rk322x.dtsi
index 8eed9e3a92..ffe503e5db 100644
index 111111111111..222222222222 100644
--- a/arch/arm/dts/rk322x.dtsi
+++ b/arch/arm/dts/rk322x.dtsi
@@ -799,6 +799,8 @@
@@ -46,12 +48,12 @@ index 8eed9e3a92..ffe503e5db 100644
+ reset-names = "ehci";
status = "disabled";
};
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 936e30438d..09d3805e78 100644
index 111111111111..222222222222 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -1436,7 +1438,10 @@ static int dwc2_usb_remove(struct udevice *dev)
@@ -1438,7 +1438,10 @@ static int dwc2_usb_remove(struct udevice *dev)
dwc2_uninit_common(priv->regs);
@@ -64,7 +66,7 @@ index 936e30438d..09d3805e78 100644
clk_release_bulk(&priv->clks);
diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
index 936e30438d..09d3805e78 100644
index 111111111111..222222222222 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -148,9 +148,9 @@ static int ehci_usb_remove(struct udevice *dev)
@@ -81,7 +83,5 @@ index 936e30438d..09d3805e78 100644
return clk_release_bulk(&priv->clocks);
}
--
2.34.1
Armbian

View File

@@ -1,6 +1,76 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo <paolo.sabatino@gmail.com>
Date: Fri, 19 Jun 2020 17:27:27 +0200
Subject: [ARCHEOLOGY] Introducing Rockchip RK322X SoC support (#2032)
> X-Git-Archeology: > recovered message: > * Introducing Rockchip rk322x SoC support
> X-Git-Archeology: > recovered message: > Main features:
> X-Git-Archeology: > recovered message: > - Legacy kernel flavour based upon stable v2.x rk3288 Rockchip branch (https://github.com/rockchip-linux/kernel/tree/stable-4.4-rk3288-linux-v2.x)
> X-Git-Archeology: > recovered message: > - Current kernel flavour based on mainline 5.6.y kernel
> X-Git-Archeology: > recovered message: > - Mainline u-boot (v2020.04)
> X-Git-Archeology: > recovered message: > - Single generic tv box target (rk322x-box) which boots on all the known tv boxes
> X-Git-Archeology: > recovered message: > - Hardware devices (eMMC/NAND, led wiring configuration, SoC variant selection) modulation done by user at runtime via device tree overlays - a script (rk322x-config) is provided for autodetection and simple configuration by inexperienced users;
> X-Git-Archeology: > recovered message: > - Bits added to armbian-hardware-optimization to set affinity for irq handlers
> X-Git-Archeology: > recovered message: > - rk322x-box targets already added to targets.conf for automatic image creation
> X-Git-Archeology: > recovered message: > * Removed disabled patches
> X-Git-Archeology: > recovered message: > * Restored mysteriously removed comment character
> X-Git-Archeology: - Revision 23604e8a0dcdf81ec6c28ccd4b2a64b90816d8e7: https://github.com/armbian/build/commit/23604e8a0dcdf81ec6c28ccd4b2a64b90816d8e7
> X-Git-Archeology: Date: Fri, 19 Jun 2020 17:27:27 +0200
> X-Git-Archeology: From: Paolo <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: Introducing Rockchip RK322X SoC support (#2032)
> X-Git-Archeology:
> X-Git-Archeology: - Revision 3e7409eb1aa98c339cf35a03e305ec635e4c6292: https://github.com/armbian/build/commit/3e7409eb1aa98c339cf35a03e305ec635e4c6292
> X-Git-Archeology: Date: Sat, 10 Oct 2020 07:07:59 +0000
> X-Git-Archeology: From: paolo <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: Moving rk322x to u-boot v2020.10, using static FIT image source file instead of now removed fit_spl_optee.sh script
> X-Git-Archeology:
> X-Git-Archeology: - Revision 95425c27b9d3bbb96e7936cc531638c9150538f9: https://github.com/armbian/build/commit/95425c27b9d3bbb96e7936cc531638c9150538f9
> X-Git-Archeology: Date: Fri, 12 Mar 2021 20:20:12 +0000
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: Changes and fixes to rk322x uboot and kernel config
> X-Git-Archeology:
> X-Git-Archeology: - Revision e4d895607e5ac380b186e523ce28c6f9c36289cb: https://github.com/armbian/build/commit/e4d895607e5ac380b186e523ce28c6f9c36289cb
> X-Git-Archeology: Date: Sun, 04 Apr 2021 15:52:22 +0000
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: rk322x: uboot: upgrade to v2021.04-rc5
> X-Git-Archeology:
> X-Git-Archeology: - Revision 71d6e7db63d6d85b7b1374b37432e0e8dcd3a73a: https://github.com/armbian/build/commit/71d6e7db63d6d85b7b1374b37432e0e8dcd3a73a
> X-Git-Archeology: Date: Fri, 18 Mar 2022 17:26:46 +0100
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: rk322x: bump to u-boot v2022.01
> X-Git-Archeology:
> X-Git-Archeology: - Revision 0777be9e754c8bd24cff0297226b5158564bbc96: https://github.com/armbian/build/commit/0777be9e754c8bd24cff0297226b5158564bbc96
> X-Git-Archeology: Date: Sun, 10 Apr 2022 16:45:06 +0200
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: rk322x: move edge flavour to kernel 5.17, adapt patches were necessary
> X-Git-Archeology:
> X-Git-Archeology: - Revision 97c34489831f2146940f52915428263b7edfcbe1: https://github.com/armbian/build/commit/97c34489831f2146940f52915428263b7edfcbe1
> X-Git-Archeology: Date: Fri, 24 Mar 2023 23:13:42 +0100
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: rockchip: put all rockchip 32 bit into uboot/v2022.04 directory
> X-Git-Archeology:
> X-Git-Archeology: - Revision fb7484f3f9f50bbbae033c251978e00fa59fd080: https://github.com/armbian/build/commit/fb7484f3f9f50bbbae033c251978e00fa59fd080
> X-Git-Archeology: Date: Wed, 01 May 2024 08:29:03 +0100
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: rockchip: bump rk322x u-boot to v2024.01
> X-Git-Archeology:
> X-Git-Archeology: - Revision 5657ec0798045ad9cff0df0033ff1c963dfcdd66: https://github.com/armbian/build/commit/5657ec0798045ad9cff0df0033ff1c963dfcdd66
> X-Git-Archeology: Date: Mon, 06 May 2024 15:50:14 +0100
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: rockchip: add reset props for usb on rk322x
> X-Git-Archeology:
> X-Git-Archeology: - Revision 7876017d0b77bbfefbb3d112045b32d9b50db928: https://github.com/armbian/build/commit/7876017d0b77bbfefbb3d112045b32d9b50db928
> X-Git-Archeology: Date: Tue, 02 Jul 2024 23:31:50 +0000
> X-Git-Archeology: From: Paolo <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: Bump rk322x-box and rk3318-box to u-boot v2024.07-rc5 (#6855)
> X-Git-Archeology:
---
configs/rk322x-box_defconfig | 128 ++++++++++
1 file changed, 128 insertions(+)
diff --git a/configs/rk322x-box_defconfig b/configs/rk322x-box_defconfig
new file mode 100644
index 0000000000..cd93614c51
index 000000000000..111111111111
--- /dev/null
+++ b/configs/rk322x-box_defconfig
@@ -0,0 +1,128 @@
@@ -132,3 +202,6 @@ index 0000000000..cd93614c51
+CONFIG_SPL_CRC32=y
+CONFIG_ERRNO_STR=y
+CONFIG_BOOTM_OPTEE=y
--
Armbian

View File

@@ -1,30 +1,24 @@
From 9a4db18c4405d06cb3339f55463259259577d1a1 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Thu, 25 Apr 2024 21:24:15 +0200
Subject: [PATCH] Makefile and basic configuration for rk322x-box
Subject: Makefile and basic configuration for rk322x-box
---
arch/arm/dts/Makefile | 3 +-
arch/arm/mach-rockchip/rk322x/Kconfig | 5 ++
board/rockchip/rk322x-box/Kconfig | 15 ++++++
board/rockchip/rk322x-box/MAINTAINERS | 6 +++
board/rockchip/rk322x-box/Makefile | 7 +++
board/rockchip/rk322x-box/README | 72 ++++++++++++++++++++++++++
board/rockchip/rk322x-box/rk322x-box.c | 21 ++++++++
include/configs/rk322x-box.h | 27 ++++++++++
8 files changed, 155 insertions(+), 1 deletion(-)
create mode 100644 board/rockchip/rk322x-box/Kconfig
create mode 100644 board/rockchip/rk322x-box/MAINTAINERS
create mode 100644 board/rockchip/rk322x-box/Makefile
create mode 100644 board/rockchip/rk322x-box/README
create mode 100644 board/rockchip/rk322x-box/rk322x-box.c
create mode 100644 include/configs/rk322x-box.h
arch/arm/mach-rockchip/rk322x/Kconfig | 5 +
board/rockchip/rk322x-box/Kconfig | 15 ++
board/rockchip/rk322x-box/MAINTAINERS | 6 +
board/rockchip/rk322x-box/Makefile | 7 +
board/rockchip/rk322x-box/README | 72 ++++++++++
board/rockchip/rk322x-box/rk322x-box.c | 21 +++
include/configs/rk322x-box.h | 29 ++++
8 files changed, 157 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 9d28a485be..c26b05b948 100644
index 111111111111..222222222222 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -100,7 +100,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3188) += \
@@ -73,7 +73,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3188) += \
rk3188-radxarock.dtb
dtb-$(CONFIG_ROCKCHIP_RK322X) += \
@@ -35,7 +29,7 @@ index 9d28a485be..c26b05b948 100644
dtb-$(CONFIG_ROCKCHIP_RK3288) += \
rk3288-evb.dtb \
diff --git a/arch/arm/mach-rockchip/rk322x/Kconfig b/arch/arm/mach-rockchip/rk322x/Kconfig
index 9ad1f54055..f5f36b5bf4 100644
index 111111111111..222222222222 100644
--- a/arch/arm/mach-rockchip/rk322x/Kconfig
+++ b/arch/arm/mach-rockchip/rk322x/Kconfig
@@ -11,6 +11,10 @@ config ROCKCHIP_BOOT_MODE_REG
@@ -58,7 +52,7 @@ index 9ad1f54055..f5f36b5bf4 100644
endif
diff --git a/board/rockchip/rk322x-box/Kconfig b/board/rockchip/rk322x-box/Kconfig
new file mode 100644
index 0000000000..db6378f6ba
index 000000000000..111111111111
--- /dev/null
+++ b/board/rockchip/rk322x-box/Kconfig
@@ -0,0 +1,15 @@
@@ -79,7 +73,7 @@ index 0000000000..db6378f6ba
+endif
diff --git a/board/rockchip/rk322x-box/MAINTAINERS b/board/rockchip/rk322x-box/MAINTAINERS
new file mode 100644
index 0000000000..d8513d319a
index 000000000000..111111111111
--- /dev/null
+++ b/board/rockchip/rk322x-box/MAINTAINERS
@@ -0,0 +1,6 @@
@@ -91,7 +85,7 @@ index 0000000000..d8513d319a
+F: configs/rk322x-box_defconfig
diff --git a/board/rockchip/rk322x-box/Makefile b/board/rockchip/rk322x-box/Makefile
new file mode 100644
index 0000000000..66afec79aa
index 000000000000..111111111111
--- /dev/null
+++ b/board/rockchip/rk322x-box/Makefile
@@ -0,0 +1,7 @@
@@ -104,7 +98,7 @@ index 0000000000..66afec79aa
+obj-y += rk322x-box.o
diff --git a/board/rockchip/rk322x-box/README b/board/rockchip/rk322x-box/README
new file mode 100644
index 0000000000..86e7055051
index 000000000000..111111111111
--- /dev/null
+++ b/board/rockchip/rk322x-box/README
@@ -0,0 +1,72 @@
@@ -182,7 +176,7 @@ index 0000000000..86e7055051
+http://opensource.rock-chips.com/wiki_Boot_option
diff --git a/board/rockchip/rk322x-box/rk322x-box.c b/board/rockchip/rk322x-box/rk322x-box.c
new file mode 100644
index 0000000000..ff7d8c98fe
index 000000000000..111111111111
--- /dev/null
+++ b/board/rockchip/rk322x-box/rk322x-box.c
@@ -0,0 +1,21 @@
@@ -209,7 +203,7 @@ index 0000000000..ff7d8c98fe
+
diff --git a/include/configs/rk322x-box.h b/include/configs/rk322x-box.h
new file mode 100644
index 0000000000..994685dba3
index 000000000000..111111111111
--- /dev/null
+++ b/include/configs/rk322x-box.h
@@ -0,0 +1,29 @@
@@ -243,5 +237,5 @@ index 0000000000..994685dba3
+
+#endif
--
2.34.1
Armbian

View File

@@ -1,6 +1,56 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo <paolo.sabatino@gmail.com>
Date: Fri, 19 Jun 2020 17:27:27 +0200
Subject: [ARCHEOLOGY] Introducing Rockchip RK322X SoC support (#2032)
> X-Git-Archeology: > recovered message: > * Introducing Rockchip rk322x SoC support
> X-Git-Archeology: > recovered message: > Main features:
> X-Git-Archeology: > recovered message: > - Legacy kernel flavour based upon stable v2.x rk3288 Rockchip branch (https://github.com/rockchip-linux/kernel/tree/stable-4.4-rk3288-linux-v2.x)
> X-Git-Archeology: > recovered message: > - Current kernel flavour based on mainline 5.6.y kernel
> X-Git-Archeology: > recovered message: > - Mainline u-boot (v2020.04)
> X-Git-Archeology: > recovered message: > - Single generic tv box target (rk322x-box) which boots on all the known tv boxes
> X-Git-Archeology: > recovered message: > - Hardware devices (eMMC/NAND, led wiring configuration, SoC variant selection) modulation done by user at runtime via device tree overlays - a script (rk322x-config) is provided for autodetection and simple configuration by inexperienced users;
> X-Git-Archeology: > recovered message: > - Bits added to armbian-hardware-optimization to set affinity for irq handlers
> X-Git-Archeology: > recovered message: > - rk322x-box targets already added to targets.conf for automatic image creation
> X-Git-Archeology: > recovered message: > * Removed disabled patches
> X-Git-Archeology: > recovered message: > * Restored mysteriously removed comment character
> X-Git-Archeology: - Revision 23604e8a0dcdf81ec6c28ccd4b2a64b90816d8e7: https://github.com/armbian/build/commit/23604e8a0dcdf81ec6c28ccd4b2a64b90816d8e7
> X-Git-Archeology: Date: Fri, 19 Jun 2020 17:27:27 +0200
> X-Git-Archeology: From: Paolo <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: Introducing Rockchip RK322X SoC support (#2032)
> X-Git-Archeology:
> X-Git-Archeology: - Revision 95425c27b9d3bbb96e7936cc531638c9150538f9: https://github.com/armbian/build/commit/95425c27b9d3bbb96e7936cc531638c9150538f9
> X-Git-Archeology: Date: Fri, 12 Mar 2021 20:20:12 +0000
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: Changes and fixes to rk322x uboot and kernel config
> X-Git-Archeology:
> X-Git-Archeology: - Revision 97c34489831f2146940f52915428263b7edfcbe1: https://github.com/armbian/build/commit/97c34489831f2146940f52915428263b7edfcbe1
> X-Git-Archeology: Date: Fri, 24 Mar 2023 23:13:42 +0100
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: rockchip: put all rockchip 32 bit into uboot/v2022.04 directory
> X-Git-Archeology:
> X-Git-Archeology: - Revision fb7484f3f9f50bbbae033c251978e00fa59fd080: https://github.com/armbian/build/commit/fb7484f3f9f50bbbae033c251978e00fa59fd080
> X-Git-Archeology: Date: Wed, 01 May 2024 08:29:03 +0100
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: rockchip: bump rk322x u-boot to v2024.01
> X-Git-Archeology:
> X-Git-Archeology: - Revision 5657ec0798045ad9cff0df0033ff1c963dfcdd66: https://github.com/armbian/build/commit/5657ec0798045ad9cff0df0033ff1c963dfcdd66
> X-Git-Archeology: Date: Mon, 06 May 2024 15:50:14 +0100
> X-Git-Archeology: From: Paolo Sabatino <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: rockchip: add reset props for usb on rk322x
> X-Git-Archeology:
> X-Git-Archeology: - Revision 7876017d0b77bbfefbb3d112045b32d9b50db928: https://github.com/armbian/build/commit/7876017d0b77bbfefbb3d112045b32d9b50db928
> X-Git-Archeology: Date: Tue, 02 Jul 2024 23:31:50 +0000
> X-Git-Archeology: From: Paolo <paolo.sabatino@gmail.com>
> X-Git-Archeology: Subject: Bump rk322x-box and rk3318-box to u-boot v2024.07-rc5 (#6855)
> X-Git-Archeology:
---
arch/arm/dts/rk322x-box.dts | 268 ++++++++++
1 file changed, 268 insertions(+)
diff --git a/arch/arm/dts/rk322x-box.dts b/arch/arm/dts/rk322x-box.dts
new file mode 100755
index 0000000000..d1433c6e3b
index 000000000000..111111111111
--- /dev/null
+++ b/arch/arm/dts/rk322x-box.dts
@@ -0,0 +1,268 @@
@@ -272,3 +322,6 @@ index 0000000000..d1433c6e3b
+&vop_mmu {
+ status = "okay";
+};
--
Armbian

View File

@@ -1,21 +1,21 @@
From f860502331f1c1700db222a80cfb9bd0026954cb Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Thu, 25 Apr 2024 21:44:55 +0200
Subject: [PATCH] support gmac rmii phy for rk322x
Subject: support gmac rmii phy for rk322x
---
arch/arm/dts/rk322x.dtsi | 8 +-
.../include/asm/arch-rockchip/cru_rk322x.h | 1 +
doc/device-tree-bindings/net/phy.txt | 13 ++
drivers/clk/rockchip/clk_rk322x.c | 14 +-
drivers/net/gmac_rockchip.c | 186 +++++++++++++++++-
arch/arm/dts/rk322x.dtsi | 8 +-
arch/arm/include/asm/arch-rockchip/cru_rk322x.h | 1 +
doc/device-tree-bindings/net/phy.txt | 13 +
drivers/clk/rockchip/clk_rk322x.c | 14 +-
drivers/net/gmac_rockchip.c | 186 +++++++++-
5 files changed, 205 insertions(+), 17 deletions(-)
diff --git a/arch/arm/dts/rk322x.dtsi b/arch/arm/dts/rk322x.dtsi
index 8eed9e3a92..e3109afa7b 100644
index 111111111111..222222222222 100644
--- a/arch/arm/dts/rk322x.dtsi
+++ b/arch/arm/dts/rk322x.dtsi
@@ -870,13 +870,13 @@
@@ -878,13 +878,13 @@
clocks = <&cru SCLK_MAC>, <&cru SCLK_MAC_RX>,
<&cru SCLK_MAC_TX>, <&cru SCLK_MAC_REF>,
<&cru SCLK_MAC_REFOUT>, <&cru ACLK_GMAC>,
@@ -34,7 +34,7 @@ index 8eed9e3a92..e3109afa7b 100644
status = "disabled";
};
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk322x.h b/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
index ee12fa831f..cfbc7e92f7 100644
index 111111111111..222222222222 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
@@ -10,6 +10,7 @@
@@ -46,7 +46,7 @@ index ee12fa831f..cfbc7e92f7 100644
#define CORE_PERI_HZ 150000000
#define CORE_ACLK_HZ 300000000
diff --git a/doc/device-tree-bindings/net/phy.txt b/doc/device-tree-bindings/net/phy.txt
index 6599c667b5..ca1a4a8526 100644
index 111111111111..222222222222 100644
--- a/doc/device-tree-bindings/net/phy.txt
+++ b/doc/device-tree-bindings/net/phy.txt
@@ -8,6 +8,19 @@ Required properties:
@@ -70,10 +70,10 @@ index 6599c667b5..ca1a4a8526 100644
ethernet-phy@0 {
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index 28cdba7575..f6d2ca6134 100644
index 111111111111..222222222222 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -43,6 +43,7 @@ enum {
@@ -42,6 +42,7 @@ enum {
/* use integer mode*/
static const struct pll_div apll_init_cfg = PLL_DIVISORS(APLL_HZ, 1, 3, 1);
static const struct pll_div gpll_init_cfg = PLL_DIVISORS(GPLL_HZ, 2, 2, 1);
@@ -81,7 +81,7 @@ index 28cdba7575..f6d2ca6134 100644
static int rkclk_set_pll(struct rk322x_cru *cru, enum rk_clk_id clk_id,
const struct pll_div *div)
@@ -92,11 +93,13 @@ static void rkclk_init(struct rk322x_cru *cru)
@@ -91,11 +92,13 @@ static void rkclk_init(struct rk322x_cru *cru)
rk_clrsetreg(&cru->cru_mode_con,
GPLL_MODE_MASK | APLL_MODE_MASK,
GPLL_MODE_SLOW << GPLL_MODE_SHIFT |
@@ -96,7 +96,7 @@ index 28cdba7575..f6d2ca6134 100644
/*
* select apll as cpu/core clock pll source and
@@ -169,7 +172,8 @@ static void rkclk_init(struct rk322x_cru *cru)
@@ -168,7 +171,8 @@ static void rkclk_init(struct rk322x_cru *cru)
rk_clrsetreg(&cru->cru_mode_con,
GPLL_MODE_MASK | APLL_MODE_MASK,
GPLL_MODE_NORM << GPLL_MODE_SHIFT |
@@ -106,7 +106,7 @@ index 28cdba7575..f6d2ca6134 100644
}
/* Get pll rate by id */
@@ -259,11 +263,10 @@ static ulong rk322x_mac_set_clk(struct rk322x_cru *cru, uint freq)
@@ -258,11 +262,10 @@ static ulong rk322x_mac_set_clk(struct rk322x_cru *cru, uint freq)
ulong pll_rate;
u8 div;
@@ -120,7 +120,7 @@ index 28cdba7575..f6d2ca6134 100644
div = DIV_ROUND_UP(pll_rate, freq) - 1;
if (div <= 0x1f)
@@ -392,6 +395,7 @@ static ulong rk322x_clk_set_rate(struct clk *clk, ulong rate)
@@ -461,6 +464,7 @@ static ulong rk322x_clk_set_rate(struct clk *clk, ulong rate)
case CLK_DDR:
new_rate = rk322x_ddr_set_clk(priv->cru, rate);
break;
@@ -129,7 +129,7 @@ index 28cdba7575..f6d2ca6134 100644
new_rate = rk322x_mac_set_clk(priv->cru, rate);
break;
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index 04008d2b19..7a917e09cd 100644
index 111111111111..222222222222 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -11,6 +11,7 @@
@@ -139,8 +139,8 @@ index 04008d2b19..7a917e09cd 100644
+#include <reset.h>
#include <syscon.h>
#include <asm/global_data.h>
#include <asm/io.h>
@@ -26,6 +27,8 @@
#include <asm/arch-rockchip/periph.h>
@@ -25,6 +26,8 @@
#include <asm/arch-rockchip/grf_rk3399.h>
#include <asm/arch-rockchip/grf_rv1108.h>
#include <dm/pinctrl.h>
@@ -149,7 +149,7 @@ index 04008d2b19..7a917e09cd 100644
#include <dt-bindings/clock/rk3288-cru.h>
#include <linux/bitops.h>
#include "designware.h"
@@ -43,21 +46,30 @@ DECLARE_GLOBAL_DATA_PTR;
@@ -42,21 +45,30 @@ DECLARE_GLOBAL_DATA_PTR;
struct gmac_rockchip_plat {
struct dw_eth_pdata dw_eth_pdata;
bool clock_input;
@@ -180,7 +180,7 @@ index 04008d2b19..7a917e09cd 100644
string = dev_read_string(dev, "clock_in_out");
if (!strcmp(string, "input"))
@@ -65,6 +77,25 @@ static int gmac_rockchip_of_to_plat(struct udevice *dev)
@@ -64,6 +76,25 @@ static int gmac_rockchip_of_to_plat(struct udevice *dev)
else
pdata->clock_input = false;
@@ -206,7 +206,7 @@ index 04008d2b19..7a917e09cd 100644
/* Check the new naming-style first... */
pdata->tx_delay = dev_read_u32_default(dev, "tx_delay", -ENOENT);
pdata->rx_delay = dev_read_u32_default(dev, "rx_delay", -ENOENT);
@@ -119,7 +150,43 @@ static int px30_gmac_fix_mac_speed(struct dw_eth_dev *priv)
@@ -118,7 +149,43 @@ static int px30_gmac_fix_mac_speed(struct dw_eth_dev *priv)
return 0;
}
@@ -251,7 +251,7 @@ index 04008d2b19..7a917e09cd 100644
{
struct rk322x_grf *grf;
int clk;
@@ -361,6 +428,28 @@ static void px30_gmac_set_to_rmii(struct gmac_rockchip_plat *pdata)
@@ -360,6 +427,28 @@ static void px30_gmac_set_to_rmii(struct gmac_rockchip_plat *pdata)
PX30_GMAC_PHY_INTF_SEL_RMII);
}
@@ -280,7 +280,7 @@ index 04008d2b19..7a917e09cd 100644
static void rk3228_gmac_set_to_rgmii(struct gmac_rockchip_plat *pdata)
{
struct rk322x_grf *grf;
@@ -554,6 +643,66 @@ static void rv1108_gmac_set_to_rmii(struct gmac_rockchip_plat *pdata)
@@ -553,6 +642,66 @@ static void rv1108_gmac_set_to_rmii(struct gmac_rockchip_plat *pdata)
RV1108_GMAC_PHY_INTF_SEL_RMII);
}
@@ -347,7 +347,7 @@ index 04008d2b19..7a917e09cd 100644
static int gmac_rockchip_probe(struct udevice *dev)
{
struct gmac_rockchip_plat *pdata = dev_get_plat(dev);
@@ -573,6 +722,9 @@ static int gmac_rockchip_probe(struct udevice *dev)
@@ -572,6 +721,9 @@ static int gmac_rockchip_probe(struct udevice *dev)
if (ret)
return ret;
@@ -357,7 +357,7 @@ index 04008d2b19..7a917e09cd 100644
switch (eth_pdata->phy_interface) {
case PHY_INTERFACE_MODE_RGMII:
/* Set to RGMII mode */
@@ -656,7 +808,7 @@ static int gmac_rockchip_probe(struct udevice *dev)
@@ -655,7 +807,7 @@ static int gmac_rockchip_probe(struct udevice *dev)
break;
default:
@@ -366,7 +366,7 @@ index 04008d2b19..7a917e09cd 100644
return -ENXIO;
}
@@ -665,18 +817,33 @@ static int gmac_rockchip_probe(struct udevice *dev)
@@ -664,18 +816,33 @@ static int gmac_rockchip_probe(struct udevice *dev)
static int gmac_rockchip_eth_start(struct udevice *dev)
{
@@ -405,7 +405,7 @@ index 04008d2b19..7a917e09cd 100644
ret = designware_eth_enable(priv);
if (ret)
return ret;
@@ -699,8 +866,11 @@ const struct rk_gmac_ops px30_gmac_ops = {
@@ -698,8 +865,11 @@ const struct rk_gmac_ops px30_gmac_ops = {
};
const struct rk_gmac_ops rk3228_gmac_ops = {
@@ -419,5 +419,5 @@ index 04008d2b19..7a917e09cd 100644
const struct rk_gmac_ops rk3288_gmac_ops = {
--
2.34.1
Armbian

View File

@@ -1,7 +1,7 @@
From 0add0274f4b7c1fbcb2c2795c3e6f5ce00e484c8 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Thu, 25 Apr 2024 21:48:17 +0200
Subject: [PATCH] Set register r1 to CONFIG_SYS_TEXT_BASE to support rockchip
Subject: Set register r1 to CONFIG_SYS_TEXT_BASE to support rockchip
proprietary OP-TEE binaries
---
@@ -9,7 +9,7 @@ Subject: [PATCH] Set register r1 to CONFIG_SYS_TEXT_BASE to support rockchip
1 file changed, 1 insertion(+)
diff --git a/common/spl/spl_optee.S b/common/spl/spl_optee.S
index a269904d38..a3891f0071 100644
index 111111111111..222222222222 100644
--- a/common/spl/spl_optee.S
+++ b/common/spl/spl_optee.S
@@ -8,5 +8,6 @@
@@ -20,5 +20,5 @@ index a269904d38..a3891f0071 100644
mov pc, r3
ENDPROC(spl_optee_entry)
--
2.34.1
Armbian

View File

@@ -1,16 +1,16 @@
From cf6a1483e87f01165606c10d19c8faa8cd7ce69f Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Sun, 30 Jun 2024 16:46:51 +0200
Subject: [PATCH] OTG/EHCI USB support for rk322x
Subject: OTG/EHCI USB support for rk322x
---
arch/arm/mach-rockchip/rk322x/syscon_rk322x.c | 3 +
drivers/clk/rockchip/clk_rk322x.c | 121 ++++++++++++++++++
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 32 +++++
drivers/clk/rockchip/clk_rk322x.c | 121 ++++++++++
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 32 +++
3 files changed, 156 insertions(+)
diff --git a/arch/arm/mach-rockchip/rk322x/syscon_rk322x.c b/arch/arm/mach-rockchip/rk322x/syscon_rk322x.c
index 0d9dca8173..37c040950b 100644
index 111111111111..222222222222 100644
--- a/arch/arm/mach-rockchip/rk322x/syscon_rk322x.c
+++ b/arch/arm/mach-rockchip/rk322x/syscon_rk322x.c
@@ -17,5 +17,8 @@ static const struct udevice_id rk322x_syscon_ids[] = {
@@ -23,7 +23,7 @@ index 0d9dca8173..37c040950b 100644
.of_match = rk322x_syscon_ids,
};
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index 4cd8a1b2e6..9bc07a570a 100644
index 111111111111..222222222222 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -596,10 +596,131 @@ static int rk322x_clk_set_parent(struct clk *clk, struct clk *parent)
@@ -159,7 +159,7 @@ index 4cd8a1b2e6..9bc07a570a 100644
static int rk322x_clk_of_to_plat(struct udevice *dev)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 43f6e020a6..8b814dbf26 100644
index 111111111111..222222222222 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -361,6 +361,34 @@ static const struct rockchip_usb2phy_cfg rk3328_usb2phy_cfgs[] = {
@@ -209,5 +209,5 @@ index 43f6e020a6..8b814dbf26 100644
.compatible = "rockchip,rk3399-usb2phy",
.data = (ulong)&rk3399_usb2phy_cfgs,
--
2.34.1
Armbian