mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-23 13:29:33 +00:00
- Chanaged default x.org configuration to disable glamor - Reintroduce patch to use DRM cursor plane as overlay in rk322x-current and -dev - Updated wifi patches for kernel 5.8.10 - Bumped rk322x to u-boot v2020.07, removed reserved zones from device trees - Updated OPTEE to v3.10, using ddrbin v1.10 - Bumped rk322x-current to kernel 5.8.y - Imported new patches from knaerzche's LibreELEC fork for rk322x-dev (kernel 5.8.y) - Adjusted existing patches to match changes, updated rk322x-dev kernel config file - Add default modprobe conf file for esp8089 to force the crystal frequency to 40Mhz for rk322x targets - Removed ssv6051 firmware packages to move to armbian-firmware repository - Switching ssv6051-wifi.cfg to /lib/firmware for rk322x-legacy - Removed P2P interface for esp8089 driver for rk322x-legacy - Optimized ssv6051 performance: kernel module gains -Os flag, disabled p2p interface, enabled HW crypto for CCMP cipher - Enabled remote control interface, IR GPIO kernel module and HDMI CEC modules
1692 lines
66 KiB
Diff
1692 lines
66 KiB
Diff
From a49884fc5063fb0eb3db69568b45e3b8ef5ea094 Mon Sep 17 00:00:00 2001
|
|
From: Finley Xiao <finley.xiao@rock-chips.com>
|
|
Date: Thu, 22 Jun 2017 20:22:25 +0800
|
|
Subject: [PATCH] clk: rockchip: rk3228: fix some PLL_NUX_CLKs' gates
|
|
|
|
Some PLL_NUX_CLKs' gates is actually behind muxs according to latest TRM,
|
|
so move the gates to composite clocks and amend their parent clocks.
|
|
|
|
Change-Id: Ib6043caa61e9df0473f2d0bdc756850968bb2a55
|
|
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3228.c | 53 ++++++++-----------------------
|
|
1 file changed, 14 insertions(+), 39 deletions(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c
|
|
index dd414c8255e3..734126a2ad7e 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3228.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3228.c
|
|
@@ -130,24 +130,22 @@ static const struct rockchip_cpuclk_reg_data rk3228_cpuclk_data = {
|
|
|
|
PNAME(mux_pll_p) = { "clk_24m", "xin24m" };
|
|
|
|
-PNAME(mux_ddrphy_p) = { "dpll_ddr", "gpll_ddr", "apll_ddr" };
|
|
-PNAME(mux_armclk_p) = { "apll_core", "gpll_core", "dpll_core" };
|
|
+PNAME(mux_ddrphy_p) = { "dpll", "gpll", "apll" };
|
|
+PNAME(mux_armclk_p) = { "apll", "gpll", "dpll" };
|
|
PNAME(mux_usb480m_phy_p) = { "usb480m_phy0", "usb480m_phy1" };
|
|
PNAME(mux_usb480m_p) = { "usb480m_phy", "xin24m" };
|
|
PNAME(mux_hdmiphy_p) = { "hdmiphy_phy", "xin24m" };
|
|
-PNAME(mux_aclk_cpu_src_p) = { "cpll_aclk_cpu", "gpll_aclk_cpu", "hdmiphy_aclk_cpu" };
|
|
|
|
PNAME(mux_pll_src_4plls_p) = { "cpll", "gpll", "hdmiphy" "usb480m" };
|
|
PNAME(mux_pll_src_3plls_p) = { "cpll", "gpll", "hdmiphy" };
|
|
PNAME(mux_pll_src_2plls_p) = { "cpll", "gpll" };
|
|
PNAME(mux_sclk_hdmi_cec_p) = { "cpll", "gpll", "xin24m" };
|
|
-PNAME(mux_aclk_peri_src_p) = { "cpll_peri", "gpll_peri", "hdmiphy_peri" };
|
|
PNAME(mux_mmc_src_p) = { "cpll", "gpll", "xin24m", "usb480m" };
|
|
PNAME(mux_pll_src_cpll_gpll_usb480m_p) = { "cpll", "gpll", "usb480m" };
|
|
|
|
PNAME(mux_sclk_rga_p) = { "gpll", "cpll", "sclk_rga_src" };
|
|
|
|
-PNAME(mux_sclk_vop_src_p) = { "gpll_vop", "cpll_vop" };
|
|
+PNAME(mux_sclk_vop_src_p) = { "gpll", "cpll" };
|
|
PNAME(mux_dclk_vop_p) = { "hdmiphy", "sclk_vop_pre" };
|
|
|
|
PNAME(mux_i2s0_p) = { "i2s0_src", "i2s0_frac", "ext_i2s", "xin12m" };
|
|
@@ -216,27 +214,17 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
RK2928_CLKSEL_CON(4), 8, 5, DFLAGS),
|
|
|
|
/* PD_DDR */
|
|
- GATE(0, "apll_ddr", "apll", CLK_IGNORE_UNUSED,
|
|
+ COMPOSITE(0, "clk_ddrphy_src", mux_ddrphy_p, CLK_IGNORE_UNUSED,
|
|
+ RK2928_CLKSEL_CON(26), 8, 2, MFLAGS, 0, 2, DFLAGS | CLK_DIVIDER_POWER_OF_TWO,
|
|
RK2928_CLKGATE_CON(0), 2, GFLAGS),
|
|
- GATE(0, "dpll_ddr", "dpll", CLK_IGNORE_UNUSED,
|
|
- RK2928_CLKGATE_CON(0), 2, GFLAGS),
|
|
- GATE(0, "gpll_ddr", "gpll", CLK_IGNORE_UNUSED,
|
|
- RK2928_CLKGATE_CON(0), 2, GFLAGS),
|
|
- COMPOSITE(0, "ddrphy4x", mux_ddrphy_p, CLK_IGNORE_UNUSED,
|
|
- RK2928_CLKSEL_CON(26), 8, 2, MFLAGS, 0, 3, DFLAGS | CLK_DIVIDER_POWER_OF_TWO,
|
|
+ GATE(0, "ddrphy4x", "clk_ddrphy_src", CLK_IGNORE_UNUSED,
|
|
RK2928_CLKGATE_CON(7), 1, GFLAGS),
|
|
- GATE(0, "ddrc", "ddrphy_pre", CLK_IGNORE_UNUSED,
|
|
+ FACTOR_GATE(0, "ddrc", "clk_ddrphy_src", CLK_IGNORE_UNUSED, 1, 4,
|
|
RK2928_CLKGATE_CON(8), 5, GFLAGS),
|
|
- FACTOR_GATE(0, "ddrphy", "ddrphy4x", CLK_IGNORE_UNUSED, 1, 4,
|
|
+ FACTOR_GATE(0, "ddrphy", "clk_ddrphy_src", CLK_IGNORE_UNUSED, 1, 4,
|
|
RK2928_CLKGATE_CON(7), 0, GFLAGS),
|
|
|
|
/* PD_CORE */
|
|
- GATE(0, "dpll_core", "dpll", CLK_IGNORE_UNUSED,
|
|
- RK2928_CLKGATE_CON(0), 6, GFLAGS),
|
|
- GATE(0, "apll_core", "apll", CLK_IGNORE_UNUSED,
|
|
- RK2928_CLKGATE_CON(0), 6, GFLAGS),
|
|
- GATE(0, "gpll_core", "gpll", CLK_IGNORE_UNUSED,
|
|
- RK2928_CLKGATE_CON(0), 6, GFLAGS),
|
|
COMPOSITE_NOMUX(0, "pclk_dbg", "armclk", CLK_IGNORE_UNUSED,
|
|
RK2928_CLKSEL_CON(1), 0, 4, DFLAGS | CLK_DIVIDER_READ_ONLY,
|
|
RK2928_CLKGATE_CON(4), 1, GFLAGS),
|
|
@@ -253,14 +241,9 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
RK2928_MISC_CON, 15, 1, MFLAGS),
|
|
|
|
/* PD_BUS */
|
|
- GATE(0, "hdmiphy_aclk_cpu", "hdmiphy", CLK_IGNORE_UNUSED,
|
|
- RK2928_CLKGATE_CON(0), 1, GFLAGS),
|
|
- GATE(0, "gpll_aclk_cpu", "gpll", CLK_IGNORE_UNUSED,
|
|
- RK2928_CLKGATE_CON(0), 1, GFLAGS),
|
|
- GATE(0, "cpll_aclk_cpu", "cpll", CLK_IGNORE_UNUSED,
|
|
+ COMPOSITE(0, "aclk_cpu_src", mux_pll_src_3plls_p, 0,
|
|
+ RK2928_CLKSEL_CON(0), 13, 2, MFLAGS, 8, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(0), 1, GFLAGS),
|
|
- COMPOSITE_NOGATE(0, "aclk_cpu_src", mux_aclk_cpu_src_p, 0,
|
|
- RK2928_CLKSEL_CON(0), 13, 2, MFLAGS, 8, 5, DFLAGS),
|
|
GATE(ACLK_CPU, "aclk_cpu", "aclk_cpu_src", 0,
|
|
RK2928_CLKGATE_CON(6), 0, GFLAGS),
|
|
COMPOSITE_NOMUX(HCLK_CPU, "hclk_cpu", "aclk_cpu_src", 0,
|
|
@@ -333,14 +316,9 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
RK2928_CLKGATE_CON(3), 8, GFLAGS),
|
|
|
|
/* PD_PERI */
|
|
- GATE(0, "cpll_peri", "cpll", CLK_IGNORE_UNUSED,
|
|
+ COMPOSITE(0, "aclk_peri_src", mux_pll_src_3plls_p, 0,
|
|
+ RK2928_CLKSEL_CON(10), 10, 2, MFLAGS, 0, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(2), 0, GFLAGS),
|
|
- GATE(0, "gpll_peri", "gpll", CLK_IGNORE_UNUSED,
|
|
- RK2928_CLKGATE_CON(2), 0, GFLAGS),
|
|
- GATE(0, "hdmiphy_peri", "hdmiphy", CLK_IGNORE_UNUSED,
|
|
- RK2928_CLKGATE_CON(2), 0, GFLAGS),
|
|
- COMPOSITE_NOGATE(0, "aclk_peri_src", mux_aclk_peri_src_p, 0,
|
|
- RK2928_CLKSEL_CON(10), 10, 2, MFLAGS, 0, 5, DFLAGS),
|
|
COMPOSITE_NOMUX(PCLK_PERI, "pclk_peri", "aclk_peri_src", 0,
|
|
RK2928_CLKSEL_CON(10), 12, 3, DFLAGS,
|
|
RK2928_CLKGATE_CON(5), 2, GFLAGS),
|
|
@@ -398,12 +376,9 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
* Clock-Architecture Diagram 2
|
|
*/
|
|
|
|
- GATE(0, "gpll_vop", "gpll", 0,
|
|
- RK2928_CLKGATE_CON(3), 1, GFLAGS),
|
|
- GATE(0, "cpll_vop", "cpll", 0,
|
|
+ COMPOSITE_NODIV(0, "sclk_vop_src", mux_sclk_vop_src_p, 0,
|
|
+ RK2928_CLKSEL_CON(27), 0, 1, MFLAGS,
|
|
RK2928_CLKGATE_CON(3), 1, GFLAGS),
|
|
- MUX(0, "sclk_vop_src", mux_sclk_vop_src_p, 0,
|
|
- RK2928_CLKSEL_CON(27), 0, 1, MFLAGS),
|
|
DIV(DCLK_HDMI_PHY, "dclk_hdmiphy", "sclk_vop_src", 0,
|
|
RK2928_CLKSEL_CON(29), 0, 3, DFLAGS),
|
|
DIV(0, "sclk_vop_pre", "sclk_vop_src", 0,
|
|
|
|
From 368824e53d6be0914927df4281bbce6da58a03ff Mon Sep 17 00:00:00 2001
|
|
From: Finley Xiao <finley.xiao@rock-chips.com>
|
|
Date: Sun, 18 Mar 2018 21:41:43 +0800
|
|
Subject: [PATCH] clk: rockchip: rk3228: Fix sclk_wifi div_width
|
|
|
|
Change-Id: I8e216249fbd588ce55660eba9911fc59aedc920d
|
|
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3228.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c
|
|
index 734126a2ad7e..90e5638d4e7e 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3228.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3228.c
|
|
@@ -353,7 +353,7 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
RK2928_CLKGATE_CON(10), 12, GFLAGS),
|
|
|
|
COMPOSITE(SCLK_WIFI, "sclk_wifi", mux_pll_src_cpll_gpll_usb480m_p, 0,
|
|
- RK2928_CLKSEL_CON(23), 5, 2, MFLAGS, 0, 6, DFLAGS,
|
|
+ RK2928_CLKSEL_CON(23), 5, 2, MFLAGS, 0, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(2), 15, GFLAGS),
|
|
|
|
COMPOSITE(SCLK_SDMMC, "sclk_sdmmc", mux_mmc_src_p, 0,
|
|
|
|
From 06685aabce5c6147ca099bd1b1399f6a170f78e1 Mon Sep 17 00:00:00 2001
|
|
From: Chen Lei <lei.chen@rock-chips.com>
|
|
Date: Tue, 25 Dec 2018 18:29:04 +0800
|
|
Subject: [PATCH] clk: rockchip: rk322x: fix wrong mmc phase shift for rk3228
|
|
|
|
mmc sample shift should be 1 for rk3228, or it will fail
|
|
if we enable mmc tuning for rk3228.
|
|
|
|
Change-Id: I301c2a7d33de8d519d7c288aef03a82531016373
|
|
Signed-off-by: Chen Lei <lei.chen@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3228.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c
|
|
index 90e5638d4e7e..7fff74043766 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3228.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3228.c
|
|
@@ -610,13 +610,13 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
|
|
/* PD_MMC */
|
|
MMC(SCLK_SDMMC_DRV, "sdmmc_drv", "sclk_sdmmc", RK3228_SDMMC_CON0, 1),
|
|
- MMC(SCLK_SDMMC_SAMPLE, "sdmmc_sample", "sclk_sdmmc", RK3228_SDMMC_CON1, 0),
|
|
+ MMC(SCLK_SDMMC_SAMPLE, "sdmmc_sample", "sclk_sdmmc", RK3228_SDMMC_CON1, 1),
|
|
|
|
MMC(SCLK_SDIO_DRV, "sdio_drv", "sclk_sdio", RK3228_SDIO_CON0, 1),
|
|
- MMC(SCLK_SDIO_SAMPLE, "sdio_sample", "sclk_sdio", RK3228_SDIO_CON1, 0),
|
|
+ MMC(SCLK_SDIO_SAMPLE, "sdio_sample", "sclk_sdio", RK3228_SDIO_CON1, 1),
|
|
|
|
MMC(SCLK_EMMC_DRV, "emmc_drv", "sclk_emmc", RK3228_EMMC_CON0, 1),
|
|
- MMC(SCLK_EMMC_SAMPLE, "emmc_sample", "sclk_emmc", RK3228_EMMC_CON1, 0),
|
|
+ MMC(SCLK_EMMC_SAMPLE, "emmc_sample", "sclk_emmc", RK3228_EMMC_CON1, 1),
|
|
};
|
|
|
|
static const char *const rk3228_critical_clocks[] __initconst = {
|
|
|
|
From a74448d0259e2fe4ad3d791d779ba7a85d31a08b Mon Sep 17 00:00:00 2001
|
|
From: Finley Xiao <finley.xiao@rock-chips.com>
|
|
Date: Mon, 5 Feb 2018 10:04:15 +0800
|
|
Subject: [PATCH] clk: rockchip: rk3228: Fix armclk parent
|
|
|
|
Change-Id: I09830d96b37cca600f1782b9013b25e043467f97
|
|
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3228.c | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c
|
|
index 7fff74043766..00c5b8a1e295 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3228.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3228.c
|
|
@@ -131,7 +131,7 @@ static const struct rockchip_cpuclk_reg_data rk3228_cpuclk_data = {
|
|
PNAME(mux_pll_p) = { "clk_24m", "xin24m" };
|
|
|
|
PNAME(mux_ddrphy_p) = { "dpll", "gpll", "apll" };
|
|
-PNAME(mux_armclk_p) = { "apll", "gpll", "dpll" };
|
|
+PNAME(mux_armclk_p) = { "apll_core", "gpll_core", "dpll_core" };
|
|
PNAME(mux_usb480m_phy_p) = { "usb480m_phy0", "usb480m_phy1" };
|
|
PNAME(mux_usb480m_p) = { "usb480m_phy", "xin24m" };
|
|
PNAME(mux_hdmiphy_p) = { "hdmiphy_phy", "xin24m" };
|
|
@@ -225,6 +225,12 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
RK2928_CLKGATE_CON(7), 0, GFLAGS),
|
|
|
|
/* PD_CORE */
|
|
+ GATE(0, "apll_core", "apll", CLK_IGNORE_UNUSED,
|
|
+ PX30_CLKGATE_CON(0), 6, GFLAGS),
|
|
+ GATE(0, "gpll_core", "gpll", CLK_IGNORE_UNUSED,
|
|
+ PX30_CLKGATE_CON(0), 6, GFLAGS),
|
|
+ GATE(0, "dpll_core", "dpll", CLK_IGNORE_UNUSED,
|
|
+ PX30_CLKGATE_CON(0), 6, GFLAGS),
|
|
COMPOSITE_NOMUX(0, "pclk_dbg", "armclk", CLK_IGNORE_UNUSED,
|
|
RK2928_CLKSEL_CON(1), 0, 4, DFLAGS | CLK_DIVIDER_READ_ONLY,
|
|
RK2928_CLKGATE_CON(4), 1, GFLAGS),
|
|
|
|
From bdbce1840c0b73a5e5c01576fb394d1719736ee8 Mon Sep 17 00:00:00 2001
|
|
From: Finley Xiao <finley.xiao@rock-chips.com>
|
|
Date: Sun, 18 Mar 2018 21:42:22 +0800
|
|
Subject: [PATCH] clk: rockchip: rk3228: remove the flag ROCKCHIP_PLL_SYNC_RATE
|
|
for GPLL
|
|
|
|
To slove the display shaking, when uboot logo display to kernel show.
|
|
|
|
Change-Id: Ifc97f72df27b4e8dbcd34ab8ed65ac027fd424d1
|
|
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3228.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c
|
|
index 00c5b8a1e295..5e9c6986e541 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3228.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3228.c
|
|
@@ -170,7 +170,7 @@ static struct rockchip_pll_clock rk3228_pll_clks[] __initdata = {
|
|
[cpll] = PLL(pll_rk3036, PLL_CPLL, "cpll", mux_pll_p, 0, RK2928_PLL_CON(6),
|
|
RK2928_MODE_CON, 8, 8, 0, NULL),
|
|
[gpll] = PLL(pll_rk3036, PLL_GPLL, "gpll", mux_pll_p, 0, RK2928_PLL_CON(9),
|
|
- RK2928_MODE_CON, 12, 9, ROCKCHIP_PLL_SYNC_RATE, rk3228_pll_rates),
|
|
+ RK2928_MODE_CON, 12, 9, 0, rk3228_pll_rates),
|
|
};
|
|
|
|
#define MFLAGS CLK_MUX_HIWORD_MASK
|
|
|
|
From 0b7003eb4fe6803d6f6071758f069fd7a63f096a Mon Sep 17 00:00:00 2001
|
|
From: Elaine Zhang <zhangqing@rock-chips.com>
|
|
Date: Tue, 25 Dec 2018 14:58:30 +0800
|
|
Subject: [PATCH] clk: rockchip: rk322x: fix up the gate con description error
|
|
|
|
Change-Id: I439314c590a7144fab6e33d1fb4f325530669842
|
|
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3228.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c
|
|
index 5e9c6986e541..448b202bf4f3 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3228.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3228.c
|
|
@@ -226,11 +226,11 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
|
|
/* PD_CORE */
|
|
GATE(0, "apll_core", "apll", CLK_IGNORE_UNUSED,
|
|
- PX30_CLKGATE_CON(0), 6, GFLAGS),
|
|
+ RK2928_CLKGATE_CON(0), 6, GFLAGS),
|
|
GATE(0, "gpll_core", "gpll", CLK_IGNORE_UNUSED,
|
|
- PX30_CLKGATE_CON(0), 6, GFLAGS),
|
|
+ RK2928_CLKGATE_CON(0), 6, GFLAGS),
|
|
GATE(0, "dpll_core", "dpll", CLK_IGNORE_UNUSED,
|
|
- PX30_CLKGATE_CON(0), 6, GFLAGS),
|
|
+ RK2928_CLKGATE_CON(0), 6, GFLAGS),
|
|
COMPOSITE_NOMUX(0, "pclk_dbg", "armclk", CLK_IGNORE_UNUSED,
|
|
RK2928_CLKSEL_CON(1), 0, 4, DFLAGS | CLK_DIVIDER_READ_ONLY,
|
|
RK2928_CLKGATE_CON(4), 1, GFLAGS),
|
|
|
|
From 8c78a060509051d135fceaaddd45aa8f3991298f Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 16:52:03 +0200
|
|
Subject: [PATCH] clk: rockchip: add CLOCK_IGNORE_UNUSED to serval RK3228 clks
|
|
|
|
Some clocks need the CLOCK_IGNORE_UNUSED flag in order to be prevented from being
|
|
disabled at boot time and to get respective devices working.
|
|
Has been taken from vendor kernel.
|
|
---
|
|
drivers/clk/rockchip/clk-rk3228.c | 58 +++++++++++++++----------------
|
|
1 file changed, 29 insertions(+), 29 deletions(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c
|
|
index 448b202bf4f3..e6654938d6bd 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3228.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3228.c
|
|
@@ -510,12 +510,12 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
|
|
/* PD_VOP */
|
|
GATE(ACLK_RGA, "aclk_rga", "aclk_rga_pre", 0, RK2928_CLKGATE_CON(13), 0, GFLAGS),
|
|
- GATE(0, "aclk_rga_noc", "aclk_rga_pre", 0, RK2928_CLKGATE_CON(13), 11, GFLAGS),
|
|
+ GATE(0, "aclk_rga_noc", "aclk_rga_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(13), 11, GFLAGS),
|
|
GATE(ACLK_IEP, "aclk_iep", "aclk_iep_pre", 0, RK2928_CLKGATE_CON(13), 2, GFLAGS),
|
|
- GATE(0, "aclk_iep_noc", "aclk_iep_pre", 0, RK2928_CLKGATE_CON(13), 9, GFLAGS),
|
|
+ GATE(0, "aclk_iep_noc", "aclk_iep_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(13), 9, GFLAGS),
|
|
|
|
GATE(ACLK_VOP, "aclk_vop", "aclk_vop_pre", 0, RK2928_CLKGATE_CON(13), 5, GFLAGS),
|
|
- GATE(0, "aclk_vop_noc", "aclk_vop_pre", 0, RK2928_CLKGATE_CON(13), 12, GFLAGS),
|
|
+ GATE(0, "aclk_vop_noc", "aclk_vop_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(13), 12, GFLAGS),
|
|
|
|
GATE(ACLK_HDCP, "aclk_hdcp", "aclk_hdcp_pre", 0, RK2928_CLKGATE_CON(14), 10, GFLAGS),
|
|
GATE(0, "aclk_hdcp_noc", "aclk_hdcp_pre", 0, RK2928_CLKGATE_CON(13), 10, GFLAGS),
|
|
@@ -523,13 +523,13 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
GATE(HCLK_RGA, "hclk_rga", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(13), 1, GFLAGS),
|
|
GATE(HCLK_IEP, "hclk_iep", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(13), 3, GFLAGS),
|
|
GATE(HCLK_VOP, "hclk_vop", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(13), 6, GFLAGS),
|
|
- GATE(0, "hclk_vio_ahb_arbi", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(13), 7, GFLAGS),
|
|
- GATE(0, "hclk_vio_noc", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(13), 8, GFLAGS),
|
|
- GATE(0, "hclk_vop_noc", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(13), 13, GFLAGS),
|
|
- GATE(HCLK_VIO_H2P, "hclk_vio_h2p", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(14), 7, GFLAGS),
|
|
+ GATE(0, "hclk_vio_ahb_arbi", "hclk_vio_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(13), 7, GFLAGS),
|
|
+ GATE(0, "hclk_vio_noc", "hclk_vio_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(13), 8, GFLAGS),
|
|
+ GATE(0, "hclk_vop_noc", "hclk_vio_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(13), 13, GFLAGS),
|
|
+ GATE(HCLK_VIO_H2P, "hclk_vio_h2p", "hclk_vio_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(14), 7, GFLAGS),
|
|
GATE(HCLK_HDCP_MMU, "hclk_hdcp_mmu", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(14), 12, GFLAGS),
|
|
GATE(PCLK_HDMI_CTRL, "pclk_hdmi_ctrl", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(14), 6, GFLAGS),
|
|
- GATE(PCLK_VIO_H2P, "pclk_vio_h2p", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(14), 8, GFLAGS),
|
|
+ GATE(PCLK_VIO_H2P, "pclk_vio_h2p", "hclk_vio_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(14), 8, GFLAGS),
|
|
GATE(PCLK_HDCP, "pclk_hdcp", "hclk_vio_pre", 0, RK2928_CLKGATE_CON(14), 11, GFLAGS),
|
|
|
|
/* PD_PERI */
|
|
@@ -541,13 +541,13 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
GATE(HCLK_EMMC, "hclk_emmc", "hclk_peri", 0, RK2928_CLKGATE_CON(11), 2, GFLAGS),
|
|
GATE(HCLK_NANDC, "hclk_nandc", "hclk_peri", 0, RK2928_CLKGATE_CON(11), 3, GFLAGS),
|
|
GATE(HCLK_HOST0, "hclk_host0", "hclk_peri", 0, RK2928_CLKGATE_CON(11), 6, GFLAGS),
|
|
- GATE(0, "hclk_host0_arb", "hclk_peri", 0, RK2928_CLKGATE_CON(11), 7, GFLAGS),
|
|
+ GATE(0, "hclk_host0_arb", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(11), 7, GFLAGS),
|
|
GATE(HCLK_HOST1, "hclk_host1", "hclk_peri", 0, RK2928_CLKGATE_CON(11), 8, GFLAGS),
|
|
- GATE(0, "hclk_host1_arb", "hclk_peri", 0, RK2928_CLKGATE_CON(11), 9, GFLAGS),
|
|
+ GATE(0, "hclk_host1_arb", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(11), 9, GFLAGS),
|
|
GATE(HCLK_HOST2, "hclk_host2", "hclk_peri", 0, RK2928_CLKGATE_CON(11), 10, GFLAGS),
|
|
GATE(HCLK_OTG, "hclk_otg", "hclk_peri", 0, RK2928_CLKGATE_CON(11), 12, GFLAGS),
|
|
- GATE(0, "hclk_otg_pmu", "hclk_peri", 0, RK2928_CLKGATE_CON(11), 13, GFLAGS),
|
|
- GATE(0, "hclk_host2_arb", "hclk_peri", 0, RK2928_CLKGATE_CON(11), 14, GFLAGS),
|
|
+ GATE(0, "hclk_otg_pmu", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(11), 13, GFLAGS),
|
|
+ GATE(0, "hclk_host2_arb", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(11), 14, GFLAGS),
|
|
GATE(0, "hclk_peri_noc", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(12), 1, GFLAGS),
|
|
|
|
GATE(PCLK_GMAC, "pclk_gmac", "pclk_peri", 0, RK2928_CLKGATE_CON(11), 5, GFLAGS),
|
|
@@ -555,15 +555,15 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
|
|
/* PD_GPU */
|
|
GATE(ACLK_GPU, "aclk_gpu", "aclk_gpu_pre", 0, RK2928_CLKGATE_CON(7), 14, GFLAGS),
|
|
- GATE(0, "aclk_gpu_noc", "aclk_gpu_pre", 0, RK2928_CLKGATE_CON(7), 15, GFLAGS),
|
|
+ GATE(0, "aclk_gpu_noc", "aclk_gpu_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(7), 15, GFLAGS),
|
|
|
|
/* PD_BUS */
|
|
- GATE(0, "sclk_initmem_mbist", "aclk_cpu", 0, RK2928_CLKGATE_CON(8), 1, GFLAGS),
|
|
- GATE(0, "aclk_initmem", "aclk_cpu", 0, RK2928_CLKGATE_CON(8), 0, GFLAGS),
|
|
+ GATE(0, "sclk_initmem_mbist", "aclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(8), 1, GFLAGS),
|
|
+ GATE(0, "aclk_initmem", "aclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(8), 0, GFLAGS),
|
|
GATE(ACLK_DMAC, "aclk_dmac_bus", "aclk_cpu", 0, RK2928_CLKGATE_CON(8), 2, GFLAGS),
|
|
GATE(0, "aclk_bus_noc", "aclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(10), 1, GFLAGS),
|
|
|
|
- GATE(0, "hclk_rom", "hclk_cpu", 0, RK2928_CLKGATE_CON(8), 3, GFLAGS),
|
|
+ GATE(0, "hclk_rom", "hclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(8), 3, GFLAGS),
|
|
GATE(HCLK_I2S0_8CH, "hclk_i2s0_8ch", "hclk_cpu", 0, RK2928_CLKGATE_CON(8), 7, GFLAGS),
|
|
GATE(HCLK_I2S1_8CH, "hclk_i2s1_8ch", "hclk_cpu", 0, RK2928_CLKGATE_CON(8), 8, GFLAGS),
|
|
GATE(HCLK_I2S2_2CH, "hclk_i2s2_2ch", "hclk_cpu", 0, RK2928_CLKGATE_CON(8), 9, GFLAGS),
|
|
@@ -572,9 +572,9 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
GATE(HCLK_M_CRYPTO, "hclk_crypto_mst", "hclk_cpu", 0, RK2928_CLKGATE_CON(8), 11, GFLAGS),
|
|
GATE(HCLK_S_CRYPTO, "hclk_crypto_slv", "hclk_cpu", 0, RK2928_CLKGATE_CON(8), 12, GFLAGS),
|
|
|
|
- GATE(0, "pclk_ddrupctl", "pclk_ddr_pre", 0, RK2928_CLKGATE_CON(8), 4, GFLAGS),
|
|
- GATE(0, "pclk_ddrmon", "pclk_ddr_pre", 0, RK2928_CLKGATE_CON(8), 6, GFLAGS),
|
|
- GATE(0, "pclk_msch_noc", "pclk_ddr_pre", 0, RK2928_CLKGATE_CON(10), 2, GFLAGS),
|
|
+ GATE(0, "pclk_ddrupctl", "pclk_ddr_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(8), 4, GFLAGS),
|
|
+ GATE(0, "pclk_ddrmon", "pclk_ddr_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(8), 6, GFLAGS),
|
|
+ GATE(0, "pclk_msch_noc", "pclk_ddr_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(10), 2, GFLAGS),
|
|
|
|
GATE(PCLK_EFUSE_1024, "pclk_efuse_1024", "pclk_cpu", 0, RK2928_CLKGATE_CON(8), 13, GFLAGS),
|
|
GATE(PCLK_EFUSE_256, "pclk_efuse_256", "pclk_cpu", 0, RK2928_CLKGATE_CON(8), 14, GFLAGS),
|
|
@@ -583,7 +583,7 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
GATE(PCLK_I2C2, "pclk_i2c2", "pclk_cpu", 0, RK2928_CLKGATE_CON(9), 1, GFLAGS),
|
|
GATE(PCLK_I2C3, "pclk_i2c3", "pclk_cpu", 0, RK2928_CLKGATE_CON(9), 2, GFLAGS),
|
|
GATE(PCLK_TIMER, "pclk_timer0", "pclk_cpu", 0, RK2928_CLKGATE_CON(9), 4, GFLAGS),
|
|
- GATE(0, "pclk_stimer", "pclk_cpu", 0, RK2928_CLKGATE_CON(9), 5, GFLAGS),
|
|
+ GATE(0, "pclk_stimer", "pclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(9), 5, GFLAGS),
|
|
GATE(PCLK_SPI0, "pclk_spi0", "pclk_cpu", 0, RK2928_CLKGATE_CON(9), 6, GFLAGS),
|
|
GATE(PCLK_PWM, "pclk_rk_pwm", "pclk_cpu", 0, RK2928_CLKGATE_CON(9), 7, GFLAGS),
|
|
GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_cpu", 0, RK2928_CLKGATE_CON(9), 8, GFLAGS),
|
|
@@ -597,22 +597,22 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|
GATE(PCLK_GRF, "pclk_grf", "pclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(10), 0, GFLAGS),
|
|
GATE(0, "pclk_cru", "pclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(10), 1, GFLAGS),
|
|
GATE(0, "pclk_sgrf", "pclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(10), 2, GFLAGS),
|
|
- GATE(0, "pclk_sim", "pclk_cpu", 0, RK2928_CLKGATE_CON(10), 3, GFLAGS),
|
|
+ GATE(0, "pclk_sim", "pclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(10), 3, GFLAGS),
|
|
|
|
- GATE(0, "pclk_ddrphy", "pclk_phy_pre", 0, RK2928_CLKGATE_CON(10), 3, GFLAGS),
|
|
- GATE(0, "pclk_acodecphy", "pclk_phy_pre", 0, RK2928_CLKGATE_CON(10), 5, GFLAGS),
|
|
+ GATE(0, "pclk_ddrphy", "pclk_phy_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(10), 3, GFLAGS),
|
|
+ GATE(0, "pclk_acodecphy", "pclk_phy_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(10), 5, GFLAGS),
|
|
GATE(PCLK_HDMI_PHY, "pclk_hdmiphy", "pclk_phy_pre", 0, RK2928_CLKGATE_CON(10), 7, GFLAGS),
|
|
- GATE(0, "pclk_vdacphy", "pclk_phy_pre", 0, RK2928_CLKGATE_CON(10), 8, GFLAGS),
|
|
- GATE(0, "pclk_phy_noc", "pclk_phy_pre", 0, RK2928_CLKGATE_CON(10), 9, GFLAGS),
|
|
+ GATE(0, "pclk_vdacphy", "pclk_phy_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(10), 8, GFLAGS),
|
|
+ GATE(0, "pclk_phy_noc", "pclk_phy_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(10), 9, GFLAGS),
|
|
|
|
GATE(ACLK_VPU, "aclk_vpu", "aclk_vpu_pre", 0, RK2928_CLKGATE_CON(15), 0, GFLAGS),
|
|
- GATE(0, "aclk_vpu_noc", "aclk_vpu_pre", 0, RK2928_CLKGATE_CON(15), 4, GFLAGS),
|
|
+ GATE(0, "aclk_vpu_noc", "aclk_vpu_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(15), 4, GFLAGS),
|
|
GATE(ACLK_RKVDEC, "aclk_rkvdec", "aclk_rkvdec_pre", 0, RK2928_CLKGATE_CON(15), 2, GFLAGS),
|
|
- GATE(0, "aclk_rkvdec_noc", "aclk_rkvdec_pre", 0, RK2928_CLKGATE_CON(15), 6, GFLAGS),
|
|
+ GATE(0, "aclk_rkvdec_noc", "aclk_rkvdec_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(15), 6, GFLAGS),
|
|
GATE(HCLK_VPU, "hclk_vpu", "hclk_vpu_pre", 0, RK2928_CLKGATE_CON(15), 1, GFLAGS),
|
|
- GATE(0, "hclk_vpu_noc", "hclk_vpu_pre", 0, RK2928_CLKGATE_CON(15), 5, GFLAGS),
|
|
+ GATE(0, "hclk_vpu_noc", "hclk_vpu_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(15), 5, GFLAGS),
|
|
GATE(HCLK_RKVDEC, "hclk_rkvdec", "hclk_rkvdec_pre", 0, RK2928_CLKGATE_CON(15), 3, GFLAGS),
|
|
- GATE(0, "hclk_rkvdec_noc", "hclk_rkvdec_pre", 0, RK2928_CLKGATE_CON(15), 7, GFLAGS),
|
|
+ GATE(0, "hclk_rkvdec_noc", "hclk_rkvdec_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(15), 7, GFLAGS),
|
|
|
|
/* PD_MMC */
|
|
MMC(SCLK_SDMMC_DRV, "sdmmc_drv", "sclk_sdmmc", RK3228_SDMMC_CON0, 1),
|
|
|
|
From facbc2eed0bab25a67e65387c9ac05d504fb886e Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 17:07:35 +0200
|
|
Subject: [PATCH] clk: rockchip add aclk_rkvdec and hclk_rkvdec to RK3228
|
|
critical clocks
|
|
|
|
To be prevented from being disabled at any time add aclk_rkvdec and hclk_rkvdec
|
|
to RK3228 critical clocks
|
|
---
|
|
drivers/clk/rockchip/clk-rk3228.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c
|
|
index e6654938d6bd..595ad0301ca6 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3228.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3228.c
|
|
@@ -656,8 +656,10 @@ static const char *const rk3228_critical_clocks[] __initconst = {
|
|
"pclk_phy_noc",
|
|
"aclk_vpu_noc",
|
|
"aclk_rkvdec_noc",
|
|
+ "aclk_rkvdec",
|
|
"hclk_vpu_noc",
|
|
"hclk_rkvdec_noc",
|
|
+ "hclk_rkvdec",
|
|
};
|
|
|
|
static void __init rk3228_clk_init(struct device_node *np)
|
|
|
|
From 4a3f15e1bc2fb7cb7c093e2814dbc9f447e82bbc Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Fri, 24 Apr 2020 11:42:58 +0200
|
|
Subject: [PATCH] soc: rockchip: Support powerdomains which don't need /
|
|
support to be switched on / off
|
|
|
|
Taken from https://github.com/rockchip-linux/kernel/commit/5be2cb19cf8e678655b59ec70c6a5f66f08d9418
|
|
---
|
|
drivers/soc/rockchip/pm_domains.c | 23 +++++++++++++++++++++++
|
|
1 file changed, 23 insertions(+)
|
|
|
|
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
|
|
index 727af107e6d3..3688e9e67872 100644
|
|
--- a/drivers/soc/rockchip/pm_domains.c
|
|
+++ b/drivers/soc/rockchip/pm_domains.c
|
|
@@ -71,6 +71,7 @@ struct rockchip_pm_domain {
|
|
struct regmap **qos_regmap;
|
|
u32 *qos_save_regs[MAX_QOS_REGS_NUM];
|
|
int num_clks;
|
|
+ bool is_ignore_pwr;
|
|
struct clk_bulk_data *clks;
|
|
};
|
|
|
|
@@ -353,6 +354,9 @@ static int rockchip_pd_power_on(struct generic_pm_domain *domain)
|
|
{
|
|
struct rockchip_pm_domain *pd = to_rockchip_pd(domain);
|
|
|
|
+ if (pd->is_ignore_pwr)
|
|
+ return 0;
|
|
+
|
|
return rockchip_pd_power(pd, true);
|
|
}
|
|
|
|
@@ -360,6 +364,9 @@ static int rockchip_pd_power_off(struct generic_pm_domain *domain)
|
|
{
|
|
struct rockchip_pm_domain *pd = to_rockchip_pd(domain);
|
|
|
|
+ if (pd->is_ignore_pwr)
|
|
+ return 0;
|
|
+
|
|
return rockchip_pd_power(pd, false);
|
|
}
|
|
|
|
@@ -439,6 +446,9 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
|
|
pd->info = pd_info;
|
|
pd->pmu = pmu;
|
|
|
|
+ if (!pd_info->pwr_mask)
|
|
+ pd->is_ignore_pwr = true;
|
|
+
|
|
pd->num_clks = of_clk_get_parent_count(node);
|
|
if (pd->num_clks > 0) {
|
|
pd->clks = devm_kcalloc(pmu->dev, pd->num_clks,
|
|
@@ -589,6 +599,7 @@ static int rockchip_pm_add_subdomain(struct rockchip_pmu *pmu,
|
|
{
|
|
struct device_node *np;
|
|
struct generic_pm_domain *child_domain, *parent_domain;
|
|
+ struct rockchip_pm_domain *child_pd, *parent_pd;
|
|
int error;
|
|
|
|
for_each_child_of_node(parent, np) {
|
|
@@ -629,6 +640,18 @@ static int rockchip_pm_add_subdomain(struct rockchip_pmu *pmu,
|
|
parent_domain->name, child_domain->name);
|
|
}
|
|
|
|
+ /*
|
|
+ * If child_pd doesn't do idle request or power on/off,
|
|
+ * parent_pd may fail to do power on/off, so if parent_pd
|
|
+ * need to power on/off, child_pd can't ignore to do idle
|
|
+ * request and power on/off.
|
|
+ */
|
|
+ child_pd = to_rockchip_pd(child_domain);
|
|
+ parent_pd = to_rockchip_pd(parent_domain);
|
|
+ if (!parent_pd->is_ignore_pwr)
|
|
+ child_pd->is_ignore_pwr = false;
|
|
+
|
|
+
|
|
rockchip_pm_add_subdomain(pmu, np);
|
|
}
|
|
|
|
|
|
From 02a2d327ebfce5e3b4ddd839c2cf3b9631c38b91 Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Fri, 24 Apr 2020 13:01:07 +0200
|
|
Subject: [PATCH] sound: soc: rockchip: use rouned rate for i2s
|
|
|
|
---
|
|
sound/soc/rockchip/rockchip_i2s.c | 9 +++++++--
|
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
|
|
index 61c984f10d8e..efca853eba6b 100644
|
|
--- a/sound/soc/rockchip/rockchip_i2s.c
|
|
+++ b/sound/soc/rockchip/rockchip_i2s.c
|
|
@@ -279,10 +279,13 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
|
|
if (i2s->is_master_mode) {
|
|
mclk_rate = clk_get_rate(i2s->mclk);
|
|
bclk_rate = 2 * 32 * params_rate(params);
|
|
- if (bclk_rate && mclk_rate % bclk_rate)
|
|
+ if (!bclk_rate) {
|
|
+ dev_err(i2s->dev, "invalid bclk_rate: %d\n",
|
|
+ bclk_rate);
|
|
return -EINVAL;
|
|
+ }
|
|
|
|
- div_bclk = mclk_rate / bclk_rate;
|
|
+ div_bclk = DIV_ROUND_CLOSEST(mclk_rate, bclk_rate);
|
|
div_lrck = bclk_rate / params_rate(params);
|
|
regmap_update_bits(i2s->regmap, I2S_CKR,
|
|
I2S_CKR_MDIV_MASK,
|
|
@@ -312,6 +315,8 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
|
|
val |= I2S_TXCR_VDW(32);
|
|
break;
|
|
default:
|
|
+ dev_err(i2s->dev, "invalid format: %d\n",
|
|
+ params_format(params));
|
|
return -EINVAL;
|
|
}
|
|
|
|
|
|
From 824bce392cfdaaf0037f33637078e722a9f757b9 Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Fri, 24 Apr 2020 09:08:44 +0200
|
|
Subject: [PATCH] phy: rockchip: hdmi: readout hdmi phy flag for RK3228 HDMI
|
|
phys
|
|
|
|
Some RK3228 HDMI phys only get a stable pll on frequencies higher 33,75 MHz.
|
|
This is defined in a flag in efuse of those devices.
|
|
---
|
|
arch/arm/boot/dts/rk322x.dtsi | 6 +++
|
|
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 38 ++++++++++++++++++-
|
|
2 files changed, 42 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
|
|
index eec601fb4cd0..81dfdc8c864a 100644
|
|
--- a/arch/arm/boot/dts/rk322x.dtsi
|
|
+++ b/arch/arm/boot/dts/rk322x.dtsi
|
|
@@ -340,6 +340,10 @@ efuse_id: id@7 {
|
|
cpu_leakage: cpu_leakage@17 {
|
|
reg = <0x17 0x1>;
|
|
};
|
|
+ hdmi_phy_flag: hdmi-phy-flag@1d {
|
|
+ reg = <0x1d 0x1>;
|
|
+ bits = <1 1>;
|
|
+ };
|
|
};
|
|
|
|
i2c0: i2c@11050000 {
|
|
@@ -559,6 +563,8 @@ hdmi_phy: hdmi-phy@12030000 {
|
|
clock-names = "sysclk", "refoclk", "refpclk";
|
|
#clock-cells = <0>;
|
|
clock-output-names = "hdmiphy_phy";
|
|
+ nvmem-cells = <&hdmi_phy_flag>;
|
|
+ nvmem-cell-names = "hdmi-phy-flag";
|
|
#phy-cells = <0>;
|
|
status = "disabled";
|
|
};
|
|
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
|
index bb8bdf5e3301..0c7a97352714 100644
|
|
--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
|
+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
|
@@ -237,6 +237,9 @@ struct inno_hdmi_phy {
|
|
struct clk *refoclk;
|
|
struct clk *refpclk;
|
|
|
|
+ /* phy_flag flag */
|
|
+ bool phy_flag;
|
|
+
|
|
/* platform data */
|
|
const struct inno_hdmi_phy_drv_data *plat_data;
|
|
int chip_version;
|
|
@@ -347,6 +350,7 @@ static const struct pre_pll_config pre_pll_cfg_table[] = {
|
|
static const struct post_pll_config post_pll_cfg_table[] = {
|
|
{33750000, 1, 40, 8, 1},
|
|
{33750000, 1, 80, 8, 2},
|
|
+ {33750000, 1, 10, 2, 4},
|
|
{74250000, 1, 40, 8, 1},
|
|
{74250000, 18, 80, 8, 2},
|
|
{148500000, 2, 40, 4, 3},
|
|
@@ -497,8 +501,11 @@ static int inno_hdmi_phy_power_on(struct phy *phy)
|
|
return -EINVAL;
|
|
|
|
for (; cfg->tmdsclock != 0; cfg++)
|
|
- if (tmdsclock <= cfg->tmdsclock &&
|
|
- cfg->version & inno->chip_version)
|
|
+ if (((!inno->phy_flag || tmdsclock > 33750000)
|
|
+ && tmdsclock <= cfg->tmdsclock
|
|
+ && cfg->version & inno->chip_version) ||
|
|
+ (inno->phy_flag && tmdsclock <= 33750000
|
|
+ && cfg->version & 4))
|
|
break;
|
|
|
|
for (; phy_cfg->tmdsclock != 0; phy_cfg++)
|
|
@@ -909,6 +916,10 @@ static int inno_hdmi_phy_clk_register(struct inno_hdmi_phy *inno)
|
|
|
|
static int inno_hdmi_phy_rk3228_init(struct inno_hdmi_phy *inno)
|
|
{
|
|
+ struct nvmem_cell *cell;
|
|
+ unsigned char *efuse_buf;
|
|
+ size_t len;
|
|
+
|
|
/*
|
|
* Use phy internal register control
|
|
* rxsense/poweron/pllpd/pdataen signal.
|
|
@@ -923,7 +934,28 @@ static int inno_hdmi_phy_rk3228_init(struct inno_hdmi_phy *inno)
|
|
inno_update_bits(inno, 0xaa, RK3228_POST_PLL_CTRL_MANUAL,
|
|
RK3228_POST_PLL_CTRL_MANUAL);
|
|
|
|
+
|
|
inno->chip_version = 1;
|
|
+ inno->phy_flag = false;
|
|
+
|
|
+ cell = nvmem_cell_get(inno->dev, "hdmi-phy-flag");
|
|
+ if (IS_ERR(cell)) {
|
|
+ if (PTR_ERR(cell) == -EPROBE_DEFER)
|
|
+ return -EPROBE_DEFER;
|
|
+
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
+ efuse_buf = nvmem_cell_read(cell, &len);
|
|
+ nvmem_cell_put(cell);
|
|
+
|
|
+ if (IS_ERR(efuse_buf))
|
|
+ return 0;
|
|
+ if (len == 1)
|
|
+ inno->phy_flag = (efuse_buf[0] & BIT(1)) ? true : false;
|
|
+ kfree(efuse_buf);
|
|
+
|
|
+ dev_info(inno->dev, "phy_flag is: %d\n", inno->phy_flag);
|
|
|
|
return 0;
|
|
}
|
|
@@ -1023,6 +1055,8 @@ static int inno_hdmi_phy_rk3328_init(struct inno_hdmi_phy *inno)
|
|
|
|
/* try to read the chip-version */
|
|
inno->chip_version = 1;
|
|
+ inno->phy_flag = false;
|
|
+
|
|
cell = nvmem_cell_get(inno->dev, "cpu-version");
|
|
if (IS_ERR(cell)) {
|
|
if (PTR_ERR(cell) == -EPROBE_DEFER)
|
|
|
|
From ac8834648e1e35703f6a0533b7c90b24d0d537da Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Tue, 26 May 2020 14:41:39 +0200
|
|
Subject: [PATCH] usb: dwc2: QUIRKS: rockchip host only controller needs longer
|
|
msleep to initialize
|
|
|
|
---
|
|
drivers/usb/dwc2/core.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
|
|
index fec17a2d2447..eb55c64f63be 100644
|
|
--- a/drivers/usb/dwc2/core.c
|
|
+++ b/drivers/usb/dwc2/core.c
|
|
@@ -663,7 +663,7 @@ void dwc2_force_dr_mode(struct dwc2_hsotg *hsotg)
|
|
* platforms on their host-only dwc2.
|
|
*/
|
|
if (!dwc2_hw_is_otg(hsotg))
|
|
- msleep(50);
|
|
+ msleep(200);
|
|
|
|
break;
|
|
case USB_DR_MODE_PERIPHERAL:
|
|
|
|
From 98c3cfe4ee409e64edcb9dff8341637588c9e166 Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 17:35:43 +0200
|
|
Subject: [PATCH] nvmem: rockchip-efuse: fix RK3188 efuse read
|
|
|
|
In order to read from RK3188s efuse, the logic is slightly different from whats
|
|
done currently for RK3288 and also used for this SoC.
|
|
Logic, register mask and udelays have been taken from vendor kernel.
|
|
---
|
|
drivers/nvmem/rockchip-efuse.c | 49 +++++++++++++++++++++++++++++++++-
|
|
1 file changed, 48 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
|
|
index e4579de5d014..9afd71edf503 100644
|
|
--- a/drivers/nvmem/rockchip-efuse.c
|
|
+++ b/drivers/nvmem/rockchip-efuse.c
|
|
@@ -17,6 +17,8 @@
|
|
#include <linux/of_platform.h>
|
|
#include <linux/platform_device.h>
|
|
|
|
+#define RK3188_A_MASK 0xff
|
|
+
|
|
#define RK3288_A_SHIFT 6
|
|
#define RK3288_A_MASK 0x3ff
|
|
#define RK3288_PGENB BIT(3)
|
|
@@ -52,6 +54,51 @@ struct rockchip_efuse_chip {
|
|
struct clk *clk;
|
|
};
|
|
|
|
+static int rockchip_rk3188_efuse_read(void *context, unsigned int offset,
|
|
+ void *val, size_t bytes)
|
|
+{
|
|
+ struct rockchip_efuse_chip *efuse = context;
|
|
+ u8 *buf = val;
|
|
+ int ret;
|
|
+
|
|
+ ret = clk_prepare_enable(efuse->clk);
|
|
+ if (ret < 0) {
|
|
+ dev_err(efuse->dev, "failed to prepare/enable efuse clk\n");
|
|
+ return ret;
|
|
+ }
|
|
+
|
|
+ writel(RK3288_CSB, efuse->base + REG_EFUSE_CTRL);
|
|
+ writel(RK3288_LOAD | RK3288_PGENB, efuse->base + REG_EFUSE_CTRL);
|
|
+ udelay(2);
|
|
+
|
|
+ while (bytes--) {
|
|
+ writel(readl(efuse->base + REG_EFUSE_CTRL) &
|
|
+ (~(RK3188_A_MASK << RK3288_A_SHIFT)),
|
|
+ efuse->base + REG_EFUSE_CTRL);
|
|
+ writel(readl(efuse->base + REG_EFUSE_CTRL) |
|
|
+ ((offset++ & RK3188_A_MASK) << RK3288_A_SHIFT),
|
|
+ efuse->base + REG_EFUSE_CTRL);
|
|
+ udelay(2);
|
|
+ writel(readl(efuse->base + REG_EFUSE_CTRL) |
|
|
+ RK3288_STROBE, efuse->base + REG_EFUSE_CTRL);
|
|
+ udelay(2);
|
|
+
|
|
+ *buf++ = readl(efuse->base + REG_EFUSE_DOUT);
|
|
+ writel(readl(efuse->base + REG_EFUSE_CTRL) &
|
|
+ (~RK3288_STROBE), efuse->base + REG_EFUSE_CTRL);
|
|
+ udelay(2);
|
|
+ }
|
|
+
|
|
+ udelay(2);
|
|
+ /* Switch to standby mode */
|
|
+ writel(RK3288_PGENB | RK3288_CSB, efuse->base + REG_EFUSE_CTRL);
|
|
+ udelay(1);
|
|
+
|
|
+ clk_disable_unprepare(efuse->clk);
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
static int rockchip_rk3288_efuse_read(void *context, unsigned int offset,
|
|
void *val, size_t bytes)
|
|
{
|
|
@@ -222,7 +269,7 @@ static const struct of_device_id rockchip_efuse_match[] = {
|
|
},
|
|
{
|
|
.compatible = "rockchip,rk3188-efuse",
|
|
- .data = (void *)&rockchip_rk3288_efuse_read,
|
|
+ .data = (void *)&rockchip_rk3188_efuse_read,
|
|
},
|
|
{
|
|
.compatible = "rockchip,rk3228-efuse",
|
|
|
|
From e95330563d2dfd9086ac3cadee0129b045c7a25d Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 17:43:08 +0200
|
|
Subject: [PATCH] ARM: dts: rockchip: fix RK3188 efuse register width
|
|
|
|
As with most Rockchip SoCs the RK3188s non-secure efuse contains 32 bytes of data.
|
|
This adapts the register width, so that we don't get repeated data when reading
|
|
out the values from it.
|
|
---
|
|
arch/arm/boot/dts/rk3188.dtsi | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
|
|
index b6c1699345d0..9fab375231ec 100644
|
|
--- a/arch/arm/boot/dts/rk3188.dtsi
|
|
+++ b/arch/arm/boot/dts/rk3188.dtsi
|
|
@@ -216,7 +216,7 @@ cru: clock-controller@20000000 {
|
|
|
|
efuse: efuse@20010000 {
|
|
compatible = "rockchip,rk3188-efuse";
|
|
- reg = <0x20010000 0x4000>;
|
|
+ reg = <0x20010000 0x20>;
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
clocks = <&cru PCLK_EFUSE>;
|
|
|
|
From e12fc84e0782e332a2d309cc89f52119eee55de3 Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 18:51:38 +0200
|
|
Subject: [PATCH] ARM: dts: rockchip add operating-points, power-domain for
|
|
RK322Xs GPU
|
|
|
|
This adds the operating-points table and the power-domain and the respective
|
|
qos registers for RK322xs GPU.
|
|
While at this it also adds the GPU to be a cooling cell.
|
|
---
|
|
arch/arm/boot/dts/rk322x.dtsi | 39 ++++++++++++++++++++++++++++++++++-
|
|
1 file changed, 38 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
|
|
index 81dfdc8c864a..9e531d229ae1 100644
|
|
--- a/arch/arm/boot/dts/rk322x.dtsi
|
|
+++ b/arch/arm/boot/dts/rk322x.dtsi
|
|
@@ -215,6 +215,12 @@ power: power-controller {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
+ pd_gpu@RK3228_PD_GPU {
|
|
+ reg = <RK3228_PD_GPU>;
|
|
+ clocks = <&cru ACLK_GPU>;
|
|
+ pm_qos = <&qos_gpu>;
|
|
+ };
|
|
+
|
|
pd_vpu@RK3228_PD_VPU {
|
|
reg = <RK3228_PD_VPU>;
|
|
clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>;
|
|
@@ -533,6 +539,11 @@ map1 {
|
|
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
|
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
|
};
|
|
+ map2 {
|
|
+ trip = <&cpu_alert1>;
|
|
+ cooling-device =
|
|
+ <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
|
+ };
|
|
};
|
|
};
|
|
};
|
|
@@ -587,7 +598,28 @@ gpu: gpu@20000000 {
|
|
clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>;
|
|
clock-names = "bus", "core";
|
|
resets = <&cru SRST_GPU_A>;
|
|
- status = "disabled";
|
|
+ operating-points-v2 = <&gpu_opp_table>;
|
|
+ power-domains = <&power RK3228_PD_GPU>;
|
|
+ #cooling-cells = <2>; /* min followed by max */
|
|
+ };
|
|
+
|
|
+ gpu_opp_table: opp-table2 {
|
|
+ compatible = "operating-points-v2";
|
|
+
|
|
+ opp-200000000 {
|
|
+ opp-hz = /bits/ 64 <200000000>;
|
|
+ opp-microvolt = <1050000>;
|
|
+ };
|
|
+
|
|
+ opp-300000000 {
|
|
+ opp-hz = /bits/ 64 <300000000>;
|
|
+ opp-microvolt = <1050000>;
|
|
+ };
|
|
+
|
|
+ opp-500000000 {
|
|
+ opp-hz = /bits/ 64 <500000000>;
|
|
+ opp-microvolt = <1150000>;
|
|
+ };
|
|
};
|
|
|
|
vpu: video-codec@20020000 {
|
|
@@ -872,6 +904,11 @@ qos_vpu: qos@31040000 {
|
|
reg = <0x31040000 0x20>;
|
|
};
|
|
|
|
+ qos_gpu: qos@31050000 {
|
|
+ compatible = "syscon";
|
|
+ reg = <0x31050000 0x20>;
|
|
+ };
|
|
+
|
|
qos_rkvdec_r: qos@31070000 {
|
|
compatible = "syscon";
|
|
reg = <0x31070000 0x20>;
|
|
|
|
From 19b4b92aa56381148255f8d962649869f734b5f9 Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 19:44:42 +0200
|
|
Subject: [PATCH] ARM: dts: rockchip: add ethernet0 alias
|
|
|
|
Add ethernet0 alias for gmac. This will, for example, be used
|
|
by u-boot to inject a "local-mac-address" in the devicetree.
|
|
---
|
|
arch/arm/boot/dts/rk322x.dtsi | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
|
|
index 9e531d229ae1..14eedffea4a3 100644
|
|
--- a/arch/arm/boot/dts/rk322x.dtsi
|
|
+++ b/arch/arm/boot/dts/rk322x.dtsi
|
|
@@ -15,6 +15,7 @@ / {
|
|
interrupt-parent = <&gic>;
|
|
|
|
aliases {
|
|
+ ethernet0 = &gmac;
|
|
serial0 = &uart0;
|
|
serial1 = &uart1;
|
|
serial2 = &uart2;
|
|
|
|
From 7c1f6ab6b0c97b7aacaa39f842a9e8ef7bbea83e Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 20:00:01 +0200
|
|
Subject: [PATCH] ARM: dts: rockchip: add hdmi simple-audio-card for RK322x
|
|
|
|
Add "simple-audio-card" definition for hdmi-sound. While at
|
|
that also add the missing #sound-dai-cells for i2s, spdif and hdmi
|
|
nodes.
|
|
---
|
|
arch/arm/boot/dts/rk322x.dtsi | 20 ++++++++++++++++++++
|
|
1 file changed, 20 insertions(+)
|
|
|
|
diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
|
|
index 14eedffea4a3..7f15fc838c36 100644
|
|
--- a/arch/arm/boot/dts/rk322x.dtsi
|
|
+++ b/arch/arm/boot/dts/rk322x.dtsi
|
|
@@ -124,6 +124,22 @@ arm-pmu {
|
|
interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
|
|
};
|
|
|
|
+ hdmi_sound: hdmi-sound {
|
|
+ compatible = "simple-audio-card";
|
|
+ simple-audio-card,name = "hdmi-sound";
|
|
+ simple-audio-card,format = "i2s";
|
|
+ simple-audio-card,mclk-fs = <256>;
|
|
+ status = "disabled";
|
|
+
|
|
+ simple-audio-card,cpu {
|
|
+ sound-dai = <&i2s0>;
|
|
+ };
|
|
+
|
|
+ simple-audio-card,codec {
|
|
+ sound-dai = <&hdmi>;
|
|
+ };
|
|
+ };
|
|
+
|
|
psci {
|
|
compatible = "arm,psci-1.0", "arm,psci-0.2";
|
|
method = "smc";
|
|
@@ -161,6 +177,7 @@ i2s1: i2s1@100b0000 {
|
|
dma-names = "tx", "rx";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&i2s1_bus>;
|
|
+ #sound-dai-cells = <0>;
|
|
status = "disabled";
|
|
};
|
|
|
|
@@ -172,6 +189,7 @@ i2s0: i2s0@100c0000 {
|
|
clocks = <&cru SCLK_I2S0>, <&cru HCLK_I2S0_8CH>;
|
|
dmas = <&pdma 11>, <&pdma 12>;
|
|
dma-names = "tx", "rx";
|
|
+ #sound-dai-cells = <0>;
|
|
status = "disabled";
|
|
};
|
|
|
|
@@ -185,6 +203,7 @@ spdif: spdif@100d0000 {
|
|
dma-names = "tx";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&spdif_tx>;
|
|
+ #sound-dai-cells = <0>;
|
|
status = "disabled";
|
|
};
|
|
|
|
@@ -746,6 +765,7 @@ hdmi: hdmi@200a0000 {
|
|
phys = <&hdmi_phy>;
|
|
phy-names = "hdmi";
|
|
rockchip,grf = <&grf>;
|
|
+ #sound-dai-cells = <0>;
|
|
status = "disabled";
|
|
|
|
ports {
|
|
|
|
From 6fa1bf91b123f703a2fde726ad52af1539f365d0 Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 21:16:11 +0200
|
|
Subject: [PATCH] ARM: dts: rockchip: add uart1-1 pins for RK322x
|
|
|
|
Add uart uart1-1 pins.
|
|
While at this also correct the uart2 default pinctrl, which is uart21_xfer.
|
|
---
|
|
arch/arm/boot/dts/rk322x.dtsi | 19 ++++++++++++++++++-
|
|
1 file changed, 18 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
|
|
index 7f15fc838c36..693c6f18a889 100644
|
|
--- a/arch/arm/boot/dts/rk322x.dtsi
|
|
+++ b/arch/arm/boot/dts/rk322x.dtsi
|
|
@@ -345,7 +345,7 @@ uart2: serial@11030000 {
|
|
clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
|
|
clock-names = "baudclk", "apb_pclk";
|
|
pinctrl-names = "default";
|
|
- pinctrl-0 = <&uart2_xfer>;
|
|
+ pinctrl-0 = <&uart21_xfer>;
|
|
reg-shift = <2>;
|
|
reg-io-width = <4>;
|
|
status = "disabled";
|
|
@@ -1275,13 +1275,30 @@ uart1_xfer: uart1-xfer {
|
|
<1 RK_PB2 1 &pcfg_pull_none>;
|
|
};
|
|
|
|
+ uart11_xfer: uart11-xfer {
|
|
+ rockchip,pins = <3 RK_PB6 1 &pcfg_pull_up>,
|
|
+ <3 RK_PB5 1 &pcfg_pull_none>;
|
|
+ };
|
|
+
|
|
uart1_cts: uart1-cts {
|
|
rockchip,pins = <1 RK_PB0 1 &pcfg_pull_none>;
|
|
};
|
|
|
|
+ uart11_cts: uart11-cts {
|
|
+ rockchip,pins = <3 RK_PA7 1 &pcfg_pull_none>;
|
|
+ };
|
|
+
|
|
uart1_rts: uart1-rts {
|
|
rockchip,pins = <1 RK_PB3 1 &pcfg_pull_none>;
|
|
};
|
|
+
|
|
+ uart11_rts: uart11-rts {
|
|
+ rockchip,pins = <3 RK_PA6 1 &pcfg_pull_none>;
|
|
+ };
|
|
+
|
|
+ uart11_rts_gpio: uart11-rts-gpio {
|
|
+ rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
+ };
|
|
};
|
|
|
|
uart2 {
|
|
|
|
From 1c37c9a10362d2e049be1386bb1da7d4f488b1d8 Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 21:58:56 +0200
|
|
Subject: [PATCH] ARM: dts: rockchip: align mmc* node properties with driver
|
|
|
|
Add resets, max-frequency and bus-width properties where required to emmc
|
|
,sdmmc and sdio nodes. While at that also add the sdmmc_pwr pinctrl which
|
|
is required to get the sd-card controller to work, if it was not/wrong
|
|
initialized by the bootloader (i.e. u-boot)
|
|
---
|
|
arch/arm/boot/dts/rk322x.dtsi | 17 ++++++++++++++---
|
|
1 file changed, 14 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
|
|
index 693c6f18a889..92e3eb1e7938 100644
|
|
--- a/arch/arm/boot/dts/rk322x.dtsi
|
|
+++ b/arch/arm/boot/dts/rk322x.dtsi
|
|
@@ -787,9 +787,13 @@ sdmmc: mmc@30000000 {
|
|
clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
|
|
<&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
|
|
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
|
+ bus-width = <4>;
|
|
fifo-depth = <0x100>;
|
|
+ max-frequency = <150000000>;
|
|
pinctrl-names = "default";
|
|
- pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
|
|
+ pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4 &sdmmc_pwr>;
|
|
+ resets = <&cru SRST_SDMMC>;
|
|
+ reset-names = "reset";
|
|
status = "disabled";
|
|
};
|
|
|
|
@@ -799,10 +803,14 @@ sdio: mmc@30010000 {
|
|
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
|
|
clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
|
|
<&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
|
|
+ bus-width = <4>;
|
|
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
|
fifo-depth = <0x100>;
|
|
+ max-frequency = <150000000>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
|
|
+ resets = <&cru SRST_SDIO>;
|
|
+ reset-names = "reset";
|
|
status = "disabled";
|
|
};
|
|
|
|
@@ -810,14 +818,13 @@ emmc: mmc@30020000 {
|
|
compatible = "rockchip,rk3228-dw-mshc", "rockchip,rk3288-dw-mshc";
|
|
reg = <0x30020000 0x4000>;
|
|
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
|
|
- clock-frequency = <37500000>;
|
|
- max-frequency = <37500000>;
|
|
clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
|
|
<&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
|
|
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
|
bus-width = <8>;
|
|
rockchip,default-sample-phase = <158>;
|
|
fifo-depth = <0x100>;
|
|
+ max-frequency = <150000000>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
|
|
resets = <&cru SRST_EMMC>;
|
|
@@ -1043,6 +1050,10 @@ sdmmc_bus4: sdmmc-bus4 {
|
|
<1 RK_PC4 1 &pcfg_pull_none_drv_12ma>,
|
|
<1 RK_PC5 1 &pcfg_pull_none_drv_12ma>;
|
|
};
|
|
+
|
|
+ sdmmc_pwr: sdmmc-pwr {
|
|
+ rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
+ };
|
|
};
|
|
|
|
sdio {
|
|
|
|
From 9a9db392c9d0fd23dd84c39f36290ab0bfbc2021 Mon Sep 17 00:00:00 2001
|
|
From: Jeffy Chen <jeffy.chen@rock-chips.com>
|
|
Date: Wed, 8 Jun 2016 14:05:42 +0800
|
|
Subject: [PATCH] clk: rockchip: rk3036: add ACLK_VCODEC
|
|
|
|
Change-Id: I36f6b23139345941656c127718cc4ff01c6d629f
|
|
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3036.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c
|
|
index 6a46f85ad837..3b285261ce39 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3036.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3036.c
|
|
@@ -258,7 +258,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
RK2928_CLKGATE_CON(1), 13, GFLAGS,
|
|
&rk3036_uart2_fracmux),
|
|
|
|
- COMPOSITE(0, "aclk_vcodec", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(ACLK_VCODEC, "aclk_vcodec", mux_pll_src_3plls_p, 0,
|
|
RK2928_CLKSEL_CON(32), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(3), 11, GFLAGS),
|
|
FACTOR_GATE(HCLK_VCODEC, "hclk_vcodec", "aclk_vcodec", 0, 1, 4,
|
|
|
|
From e1dd6aaa44b5ae46657f83bb066f50f5c9e0568a Mon Sep 17 00:00:00 2001
|
|
From: Randy Li <randy.li@rock-chips.com>
|
|
Date: Fri, 20 Oct 2017 14:38:09 +0800
|
|
Subject: [PATCH] clk: rockchip: rk3036: export the hevc core clock
|
|
|
|
The clock hevc core will be used to drive the hevc decoder.
|
|
|
|
Change-Id: Ic1298ce1edd07f86e5c243e3a2c9876481f4cba9
|
|
Signed-off-by: Randy Li <randy.li@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3036.c | 2 +-
|
|
include/dt-bindings/clock/rk3036-cru.h | 1 +
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c
|
|
index 3b285261ce39..a98ea978fc8a 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3036.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3036.c
|
|
@@ -264,7 +264,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
FACTOR_GATE(HCLK_VCODEC, "hclk_vcodec", "aclk_vcodec", 0, 1, 4,
|
|
RK2928_CLKGATE_CON(3), 12, GFLAGS),
|
|
|
|
- COMPOSITE(0, "aclk_hvec", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(ACLK_HEVC, "aclk_hevc", mux_pll_src_3plls_p, 0,
|
|
RK2928_CLKSEL_CON(20), 0, 2, MFLAGS, 2, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(10), 6, GFLAGS),
|
|
|
|
diff --git a/include/dt-bindings/clock/rk3036-cru.h b/include/dt-bindings/clock/rk3036-cru.h
|
|
index 35a5a01f9697..cd231f57278d 100644
|
|
--- a/include/dt-bindings/clock/rk3036-cru.h
|
|
+++ b/include/dt-bindings/clock/rk3036-cru.h
|
|
@@ -55,6 +55,7 @@
|
|
#define ACLK_VCODEC 208
|
|
#define ACLK_CPU 209
|
|
#define ACLK_PERI 210
|
|
+#define ACLK_HEVC 211
|
|
|
|
/* pclk gates */
|
|
#define PCLK_GPIO0 320
|
|
|
|
From e9752790e4c92f83924dc881cf1555977c512214 Mon Sep 17 00:00:00 2001
|
|
From: Caesar Wang <wxt@rock-chips.com>
|
|
Date: Mon, 13 Nov 2017 09:28:12 +0800
|
|
Subject: [PATCH] clk: rockchip: export SCLK_I2S_PRE and SCLK_I2S_FRAC of i2s
|
|
on rk3036
|
|
|
|
Change-Id: I627c8c2582be2b27414e7b82e9d56dd560f68e64
|
|
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3036.c | 4 ++--
|
|
include/dt-bindings/clock/rk3036-cru.h | 2 ++
|
|
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c
|
|
index a98ea978fc8a..c67ee61ef0cd 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3036.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3036.c
|
|
@@ -157,7 +157,7 @@ static struct rockchip_clk_branch rk3036_uart2_fracmux __initdata =
|
|
RK2928_CLKSEL_CON(15), 8, 2, MFLAGS);
|
|
|
|
static struct rockchip_clk_branch rk3036_i2s_fracmux __initdata =
|
|
- MUX(0, "i2s_pre", mux_i2s_pre_p, CLK_SET_RATE_PARENT,
|
|
+ MUX(SCLK_I2S_PRE, "i2s_pre", mux_i2s_pre_p, CLK_SET_RATE_PARENT,
|
|
RK2928_CLKSEL_CON(3), 8, 2, MFLAGS);
|
|
|
|
static struct rockchip_clk_branch rk3036_spdif_fracmux __initdata =
|
|
@@ -306,7 +306,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
COMPOSITE(0, "i2s_src", mux_pll_src_3plls_p, 0,
|
|
RK2928_CLKSEL_CON(3), 14, 2, MFLAGS, 0, 7, DFLAGS,
|
|
RK2928_CLKGATE_CON(0), 9, GFLAGS),
|
|
- COMPOSITE_FRACMUX(0, "i2s_frac", "i2s_src", CLK_SET_RATE_PARENT,
|
|
+ COMPOSITE_FRACMUX(SCLK_I2S_FRAC, "i2s_frac", "i2s_src", CLK_SET_RATE_PARENT,
|
|
RK2928_CLKSEL_CON(7), 0,
|
|
RK2928_CLKGATE_CON(0), 10, GFLAGS,
|
|
&rk3036_i2s_fracmux),
|
|
diff --git a/include/dt-bindings/clock/rk3036-cru.h b/include/dt-bindings/clock/rk3036-cru.h
|
|
index cd231f57278d..4c7ff6141a67 100644
|
|
--- a/include/dt-bindings/clock/rk3036-cru.h
|
|
+++ b/include/dt-bindings/clock/rk3036-cru.h
|
|
@@ -43,6 +43,8 @@
|
|
#define SCLK_PVTM_CORE 123
|
|
#define SCLK_PVTM_GPU 124
|
|
#define SCLK_PVTM_VIDEO 125
|
|
+#define SCLK_I2S_FRAC 126
|
|
+#define SCLK_I2S_PRE 127
|
|
#define SCLK_MAC 151
|
|
#define SCLK_MACREF 152
|
|
#define SCLK_MACPLL 153
|
|
|
|
From 1cfffef46d411629c71da2dea69c41b261355d5b Mon Sep 17 00:00:00 2001
|
|
From: Caesar Wang <wxt@rock-chips.com>
|
|
Date: Fri, 17 Nov 2017 14:49:16 +0800
|
|
Subject: [PATCH] clk: rockchip: protect the armclk for rk3036
|
|
|
|
Some clocks may get disabled as a side effect of another clock
|
|
being disabled, because have no consumers. Says the dclk_hdmi's parent may
|
|
change from apll to gpll, but the apll's son clocks are very less.
|
|
|
|
Change-Id: I4fb4e5fdf83a8f73979b50dbcf4f3e4543896fcf
|
|
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3036.c | 7 ++++---
|
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c
|
|
index c67ee61ef0cd..ac5c1cfb3f54 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3036.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3036.c
|
|
@@ -424,6 +424,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
};
|
|
|
|
static const char *const rk3036_critical_clocks[] __initconst = {
|
|
+ "armclk",
|
|
"aclk_cpu",
|
|
"aclk_peri",
|
|
"hclk_peri",
|
|
@@ -467,14 +468,14 @@ static void __init rk3036_clk_init(struct device_node *np)
|
|
RK3036_GRF_SOC_STATUS0);
|
|
rockchip_clk_register_branches(ctx, rk3036_clk_branches,
|
|
ARRAY_SIZE(rk3036_clk_branches));
|
|
- rockchip_clk_protect_critical(rk3036_critical_clocks,
|
|
- ARRAY_SIZE(rk3036_critical_clocks));
|
|
-
|
|
rockchip_clk_register_armclk(ctx, ARMCLK, "armclk",
|
|
mux_armclk_p, ARRAY_SIZE(mux_armclk_p),
|
|
&rk3036_cpuclk_data, rk3036_cpuclk_rates,
|
|
ARRAY_SIZE(rk3036_cpuclk_rates));
|
|
|
|
+ rockchip_clk_protect_critical(rk3036_critical_clocks,
|
|
+ ARRAY_SIZE(rk3036_critical_clocks));
|
|
+
|
|
rockchip_register_softrst(np, 9, reg_base + RK2928_SOFTRST_CON(0),
|
|
ROCKCHIP_SOFTRST_HIWORD_MASK);
|
|
|
|
|
|
From 84f5c9e7a40b0e30b087aea7a618b18e2bb87fd5 Mon Sep 17 00:00:00 2001
|
|
From: Finley Xiao <finley.xiao@rock-chips.com>
|
|
Date: Mon, 13 Nov 2017 15:32:25 +0800
|
|
Subject: [PATCH] clk: rockchip: rk3036: leave apll for core, mac and lcdc only
|
|
|
|
In order not to affect other clocks, remove the apll from the
|
|
parent list of other clocks and only core, mac and lcdc can
|
|
select apll as parent.
|
|
|
|
Change-Id: I58b995f8ccf69c6564f74b5823f618a186030d70
|
|
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3036.c | 38 ++++++++++++++++---------------
|
|
1 file changed, 20 insertions(+), 18 deletions(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c
|
|
index ac5c1cfb3f54..4ce2cf844123 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3036.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3036.c
|
|
@@ -114,14 +114,16 @@ static const struct rockchip_cpuclk_reg_data rk3036_cpuclk_data = {
|
|
PNAME(mux_pll_p) = { "xin24m", "xin24m" };
|
|
|
|
PNAME(mux_armclk_p) = { "apll", "gpll_armclk" };
|
|
-PNAME(mux_busclk_p) = { "apll", "dpll_cpu", "gpll_cpu" };
|
|
+PNAME(mux_busclk_p) = { "dummy_apll", "dpll_cpu", "gpll_cpu" };
|
|
PNAME(mux_ddrphy_p) = { "dpll_ddr", "gpll_ddr" };
|
|
-PNAME(mux_pll_src_3plls_p) = { "apll", "dpll", "gpll" };
|
|
+PNAME(mux_pll_src_apll_dpll_gpll_p) = { "apll", "dpll", "gpll" };
|
|
+PNAME(mux_pll_src_dmyapll_dpll_gpll_p) = { "dummy_apll", "dpll", "gpll" };
|
|
+
|
|
PNAME(mux_timer_p) = { "xin24m", "pclk_peri_src" };
|
|
|
|
-PNAME(mux_pll_src_apll_dpll_gpll_usb480m_p) = { "apll", "dpll", "gpll", "usb480m" };
|
|
+PNAME(mux_pll_src_dmyapll_dpll_gpll_usb480m_p) = { "dummy_apll", "dpll", "gpll", "usb480m" };
|
|
|
|
-PNAME(mux_mmc_src_p) = { "apll", "dpll", "gpll", "xin24m" };
|
|
+PNAME(mux_mmc_src_p) = { "dummy_apll", "dpll", "gpll", "xin24m" };
|
|
PNAME(mux_i2s_pre_p) = { "i2s_src", "i2s_frac", "ext_i2s", "xin12m" };
|
|
PNAME(mux_i2s_clkout_p) = { "i2s_pre", "xin12m" };
|
|
PNAME(mux_spdif_p) = { "spdif_src", "spdif_frac", "xin12m" };
|
|
@@ -206,7 +208,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
RK2928_CLKSEL_CON(1), 8, 2, DFLAGS | CLK_DIVIDER_READ_ONLY,
|
|
RK2928_CLKGATE_CON(0), 4, GFLAGS),
|
|
|
|
- COMPOSITE(0, "aclk_peri_src", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(0, "aclk_peri_src", mux_pll_src_dmyapll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(10), 14, 2, MFLAGS, 0, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(2), 0, GFLAGS),
|
|
|
|
@@ -234,7 +236,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
RK2928_CLKSEL_CON(2), 7, 1, MFLAGS,
|
|
RK2928_CLKGATE_CON(2), 5, GFLAGS),
|
|
|
|
- MUX(0, "uart_pll_clk", mux_pll_src_apll_dpll_gpll_usb480m_p, 0,
|
|
+ MUX(0, "uart_pll_clk", mux_pll_src_dmyapll_dpll_gpll_usb480m_p, 0,
|
|
RK2928_CLKSEL_CON(13), 10, 2, MFLAGS),
|
|
COMPOSITE_NOMUX(0, "uart0_src", "uart_pll_clk", 0,
|
|
RK2928_CLKSEL_CON(13), 0, 7, DFLAGS,
|
|
@@ -258,23 +260,23 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
RK2928_CLKGATE_CON(1), 13, GFLAGS,
|
|
&rk3036_uart2_fracmux),
|
|
|
|
- COMPOSITE(ACLK_VCODEC, "aclk_vcodec", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(ACLK_VCODEC, "aclk_vcodec", mux_pll_src_dmyapll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(32), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(3), 11, GFLAGS),
|
|
FACTOR_GATE(HCLK_VCODEC, "hclk_vcodec", "aclk_vcodec", 0, 1, 4,
|
|
RK2928_CLKGATE_CON(3), 12, GFLAGS),
|
|
|
|
- COMPOSITE(ACLK_HEVC, "aclk_hevc", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(ACLK_HEVC, "aclk_hevc", mux_pll_src_dmyapll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(20), 0, 2, MFLAGS, 2, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(10), 6, GFLAGS),
|
|
|
|
- COMPOSITE(0, "aclk_disp1_pre", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(0, "aclk_disp1_pre", mux_pll_src_dmyapll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(31), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(1), 4, GFLAGS),
|
|
- COMPOSITE(0, "hclk_disp_pre", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(0, "hclk_disp_pre", mux_pll_src_dmyapll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(30), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(0), 11, GFLAGS),
|
|
- COMPOSITE(SCLK_LCDC, "dclk_lcdc", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(SCLK_LCDC, "dclk_lcdc", mux_pll_src_apll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(28), 0, 2, MFLAGS, 8, 8, DFLAGS,
|
|
RK2928_CLKGATE_CON(3), 2, GFLAGS),
|
|
|
|
@@ -303,7 +305,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
MMC(SCLK_EMMC_DRV, "emmc_drv", "sclk_emmc", RK3036_EMMC_CON0, 1),
|
|
MMC(SCLK_EMMC_SAMPLE, "emmc_sample", "sclk_emmc", RK3036_EMMC_CON1, 0),
|
|
|
|
- COMPOSITE(0, "i2s_src", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(0, "i2s_src", mux_pll_src_dmyapll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(3), 14, 2, MFLAGS, 0, 7, DFLAGS,
|
|
RK2928_CLKGATE_CON(0), 9, GFLAGS),
|
|
COMPOSITE_FRACMUX(SCLK_I2S_FRAC, "i2s_frac", "i2s_src", CLK_SET_RATE_PARENT,
|
|
@@ -316,7 +318,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
GATE(SCLK_I2S, "sclk_i2s", "i2s_pre", CLK_SET_RATE_PARENT,
|
|
RK2928_CLKGATE_CON(0), 14, GFLAGS),
|
|
|
|
- COMPOSITE(0, "spdif_src", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(0, "spdif_src", mux_pll_src_dmyapll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(5), 10, 2, MFLAGS, 0, 7, DFLAGS,
|
|
RK2928_CLKGATE_CON(2), 10, GFLAGS),
|
|
COMPOSITE_FRACMUX(0, "spdif_frac", "spdif_src", 0,
|
|
@@ -327,23 +329,23 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
GATE(SCLK_OTGPHY0, "sclk_otgphy0", "xin12m", CLK_IGNORE_UNUSED,
|
|
RK2928_CLKGATE_CON(1), 5, GFLAGS),
|
|
|
|
- COMPOSITE(SCLK_GPU, "sclk_gpu", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(SCLK_GPU, "sclk_gpu", mux_pll_src_dmyapll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(34), 8, 2, MFLAGS, 0, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(3), 13, GFLAGS),
|
|
|
|
- COMPOSITE(SCLK_SPI, "sclk_spi", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(SCLK_SPI, "sclk_spi", mux_pll_src_dmyapll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(25), 8, 2, MFLAGS, 0, 7, DFLAGS,
|
|
RK2928_CLKGATE_CON(2), 9, GFLAGS),
|
|
|
|
- COMPOSITE(SCLK_NANDC, "sclk_nandc", mux_pll_src_3plls_p, 0,
|
|
+ COMPOSITE(SCLK_NANDC, "sclk_nandc", mux_pll_src_dmyapll_dpll_gpll_p, 0,
|
|
RK2928_CLKSEL_CON(16), 8, 2, MFLAGS, 10, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(10), 4, GFLAGS),
|
|
|
|
- COMPOSITE(SCLK_SFC, "sclk_sfc", mux_pll_src_apll_dpll_gpll_usb480m_p, 0,
|
|
+ COMPOSITE(SCLK_SFC, "sclk_sfc", mux_pll_src_dmyapll_dpll_gpll_usb480m_p, 0,
|
|
RK2928_CLKSEL_CON(16), 0, 2, MFLAGS, 2, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(10), 5, GFLAGS),
|
|
|
|
- COMPOSITE_NOGATE(SCLK_MACPLL, "mac_pll_src", mux_pll_src_3plls_p, CLK_SET_RATE_NO_REPARENT,
|
|
+ COMPOSITE_NOGATE(SCLK_MACPLL, "mac_pll_src", mux_pll_src_apll_dpll_gpll_p, CLK_SET_RATE_NO_REPARENT,
|
|
RK2928_CLKSEL_CON(21), 0, 2, MFLAGS, 9, 5, DFLAGS),
|
|
MUX(SCLK_MACREF, "mac_clk_ref", mux_mac_p, CLK_SET_RATE_PARENT,
|
|
RK2928_CLKSEL_CON(21), 3, 1, MFLAGS),
|
|
|
|
From 30337bfc416283d487d91e82397c81f1cae745a9 Mon Sep 17 00:00:00 2001
|
|
From: Randy Li <randy.li@rock-chips.com>
|
|
Date: Fri, 20 Apr 2018 10:43:46 +0800
|
|
Subject: [PATCH] clk: rockchip: rk3036: export the sfc clocks
|
|
|
|
The serial Flash controller on the rk3036 would request
|
|
two clock nodes.
|
|
|
|
Change-Id: Iaa50c4a25602a68241b0b9b2f186e4c7e55bc3da
|
|
Signed-off-by: Randy Li <randy.li@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3036.c | 2 +-
|
|
include/dt-bindings/clock/rk3036-cru.h | 1 +
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c
|
|
index 4ce2cf844123..0d1556ac185a 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3036.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3036.c
|
|
@@ -404,7 +404,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
GATE(HCLK_OTG0, "hclk_otg0", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(5), 13, GFLAGS),
|
|
GATE(HCLK_OTG1, "hclk_otg1", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(7), 3, GFLAGS),
|
|
GATE(HCLK_I2S, "hclk_i2s", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 2, GFLAGS),
|
|
- GATE(0, "hclk_sfc", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(3), 14, GFLAGS),
|
|
+ GATE(HCLK_SFC, "hclk_sfc", "hclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(3), 14, GFLAGS),
|
|
GATE(HCLK_MAC, "hclk_mac", "hclk_peri", 0, RK2928_CLKGATE_CON(3), 5, GFLAGS),
|
|
|
|
/* pclk_peri gates */
|
|
diff --git a/include/dt-bindings/clock/rk3036-cru.h b/include/dt-bindings/clock/rk3036-cru.h
|
|
index 4c7ff6141a67..72ba1952071d 100644
|
|
--- a/include/dt-bindings/clock/rk3036-cru.h
|
|
+++ b/include/dt-bindings/clock/rk3036-cru.h
|
|
@@ -84,6 +84,7 @@
|
|
#define HCLK_OTG0 449
|
|
#define HCLK_OTG1 450
|
|
#define HCLK_NANDC 453
|
|
+#define HCLK_SFC 454
|
|
#define HCLK_SDMMC 456
|
|
#define HCLK_SDIO 457
|
|
#define HCLK_EMMC 459
|
|
|
|
From 62768587c0db32f4180bd4cebbd9f8d8ad865901 Mon Sep 17 00:00:00 2001
|
|
From: Elaine Zhang <zhangqing@rock-chips.com>
|
|
Date: Mon, 1 Jun 2020 15:36:35 +0800
|
|
Subject: [PATCH] clk: rockchip: rk3036: fix up the sclk_sfc parent error
|
|
|
|
Change-Id: I0903161f34de8f309392bec6926348ffe37ba2f6
|
|
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3036.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c
|
|
index 0d1556ac185a..693bee4009db 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3036.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3036.c
|
|
@@ -122,6 +122,7 @@ PNAME(mux_pll_src_dmyapll_dpll_gpll_p) = { "dummy_apll", "dpll", "gpll" };
|
|
PNAME(mux_timer_p) = { "xin24m", "pclk_peri_src" };
|
|
|
|
PNAME(mux_pll_src_dmyapll_dpll_gpll_usb480m_p) = { "dummy_apll", "dpll", "gpll", "usb480m" };
|
|
+PNAME(mux_pll_src_dmyapll_dpll_gpll_xin24_p) = { "dummy_apll", "dpll", "gpll", "xin24m" };
|
|
|
|
PNAME(mux_mmc_src_p) = { "dummy_apll", "dpll", "gpll", "xin24m" };
|
|
PNAME(mux_i2s_pre_p) = { "i2s_src", "i2s_frac", "ext_i2s", "xin12m" };
|
|
@@ -341,7 +342,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
RK2928_CLKSEL_CON(16), 8, 2, MFLAGS, 10, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(10), 4, GFLAGS),
|
|
|
|
- COMPOSITE(SCLK_SFC, "sclk_sfc", mux_pll_src_dmyapll_dpll_gpll_usb480m_p, 0,
|
|
+ COMPOSITE(SCLK_SFC, "sclk_sfc", mux_pll_src_dmyapll_dpll_gpll_xin24_p, 0,
|
|
RK2928_CLKSEL_CON(16), 0, 2, MFLAGS, 2, 5, DFLAGS,
|
|
RK2928_CLKGATE_CON(10), 5, GFLAGS),
|
|
|
|
|
|
From cef2d7b595360c89a57fcf38d1dcf41759ceac95 Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 22:41:29 +0200
|
|
Subject: [PATCH] clk: rockchip: export PCLK_EFUSE for RK3036
|
|
|
|
Export PCLK_EFUSE for RK3036.
|
|
---
|
|
drivers/clk/rockchip/clk-rk3036.c | 2 +-
|
|
include/dt-bindings/clock/rk3036-cru.h | 1 +
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c
|
|
index 693bee4009db..06e92dd5ce25 100644
|
|
--- a/drivers/clk/rockchip/clk-rk3036.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3036.c
|
|
@@ -410,7 +410,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
|
|
|
|
/* pclk_peri gates */
|
|
GATE(0, "pclk_peri_matrix", "pclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(4), 1, GFLAGS),
|
|
- GATE(0, "pclk_efuse", "pclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(5), 2, GFLAGS),
|
|
+ GATE(PCLK_EFUSE, "pclk_efuse", "pclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(5), 2, GFLAGS),
|
|
GATE(PCLK_TIMER, "pclk_timer", "pclk_peri", 0, RK2928_CLKGATE_CON(7), 7, GFLAGS),
|
|
GATE(PCLK_PWM, "pclk_pwm", "pclk_peri", 0, RK2928_CLKGATE_CON(7), 10, GFLAGS),
|
|
GATE(PCLK_SPI, "pclk_spi", "pclk_peri", 0, RK2928_CLKGATE_CON(7), 12, GFLAGS),
|
|
diff --git a/include/dt-bindings/clock/rk3036-cru.h b/include/dt-bindings/clock/rk3036-cru.h
|
|
index 72ba1952071d..febab04521a2 100644
|
|
--- a/include/dt-bindings/clock/rk3036-cru.h
|
|
+++ b/include/dt-bindings/clock/rk3036-cru.h
|
|
@@ -79,6 +79,7 @@
|
|
#define PCLK_DDRUPCTL 364
|
|
#define PCLK_WDT 368
|
|
#define PCLK_ACODEC 369
|
|
+#define PCLK_EFUSE 370
|
|
|
|
/* hclk gates */
|
|
#define HCLK_OTG0 449
|
|
|
|
From bf25b1441ad681e8b56ae6ec069165dc4fb6b445 Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 22:43:41 +0200
|
|
Subject: [PATCH] ARM: dts: rockchip: add RK3036 efuse node
|
|
|
|
Add RK3036 efuse node to the devicetree and add the new compatible string
|
|
to bindings document.
|
|
---
|
|
.../devicetree/bindings/nvmem/rockchip-efuse.yaml | 1 +
|
|
arch/arm/boot/dts/rk3036.dtsi | 7 +++++++
|
|
2 files changed, 8 insertions(+)
|
|
|
|
diff --git a/Documentation/devicetree/bindings/nvmem/rockchip-efuse.yaml b/Documentation/devicetree/bindings/nvmem/rockchip-efuse.yaml
|
|
index 3ae00b0b23bc..c3fdabcb1e0a 100644
|
|
--- a/Documentation/devicetree/bindings/nvmem/rockchip-efuse.yaml
|
|
+++ b/Documentation/devicetree/bindings/nvmem/rockchip-efuse.yaml
|
|
@@ -15,6 +15,7 @@ allOf:
|
|
properties:
|
|
compatible:
|
|
enum:
|
|
+ - rockchip,rk3036-efuse
|
|
- rockchip,rk3066a-efuse
|
|
- rockchip,rk3188-efuse
|
|
- rockchip,rk3228-efuse
|
|
diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi
|
|
index 10f15cdb932c..6700a17a6446 100644
|
|
--- a/arch/arm/boot/dts/rk3036.dtsi
|
|
+++ b/arch/arm/boot/dts/rk3036.dtsi
|
|
@@ -873,4 +873,11 @@ spi_cs1:spi-cs1 {
|
|
};
|
|
};
|
|
};
|
|
+
|
|
+ efuse: efuse@20090000 {
|
|
+ compatible = "rockchip,rk3036-efuse", "rockchip,rk3288-efuse";
|
|
+ reg = <0x20090000 0x20>;
|
|
+ clocks = <&cru PCLK_EFUSE>;
|
|
+ clock-names = "pclk_efuse";
|
|
+ };
|
|
};
|
|
|
|
From 490be97e9fdc5e4ea8afd5b41d2a9f2942f82b02 Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 23:02:00 +0200
|
|
Subject: [PATCH] ARM: dts: add opp-table for RK3188s GPU
|
|
|
|
Add opp-table for RK3188s mali400 MP4 GPU
|
|
---
|
|
arch/arm/boot/dts/rk3188.dtsi | 30 ++++++++++++++++++++++++++++++
|
|
1 file changed, 30 insertions(+)
|
|
|
|
diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
|
|
index 9fab375231ec..894fe6259ef2 100644
|
|
--- a/arch/arm/boot/dts/rk3188.dtsi
|
|
+++ b/arch/arm/boot/dts/rk3188.dtsi
|
|
@@ -112,6 +112,35 @@ smp-sram@0 {
|
|
};
|
|
};
|
|
|
|
+ gpu_opp_table: opp-table2 {
|
|
+ compatible = "operating-points-v2";
|
|
+
|
|
+ opp-133000000 {
|
|
+ opp-hz = /bits/ 64 <133000000>;
|
|
+ opp-microvolt = <975000>;
|
|
+ };
|
|
+ opp-200000000 {
|
|
+ opp-hz = /bits/ 64 <200000000>;
|
|
+ opp-microvolt = <1000000>;
|
|
+ };
|
|
+ opp-266000000 {
|
|
+ opp-hz = /bits/ 64 <266000000>;
|
|
+ opp-microvolt = <1025000>;
|
|
+ };
|
|
+ opp-300000000 {
|
|
+ opp-hz = /bits/ 64 <300000000>;
|
|
+ opp-microvolt = <1050000>;
|
|
+ };
|
|
+ opp-400000000 {
|
|
+ opp-hz = /bits/ 64 <400000000>;
|
|
+ opp-microvolt = <1100000>;
|
|
+ };
|
|
+ opp-600000000 {
|
|
+ opp-hz = /bits/ 64 <600000000>;
|
|
+ opp-microvolt = <1250000>;
|
|
+ };
|
|
+ };
|
|
+
|
|
vpu: video-codec@10104000 {
|
|
compatible = "rockchip,rk3188-vpu";
|
|
reg = <0x10104000 0x800>;
|
|
@@ -672,6 +701,7 @@ &gpu {
|
|
"ppmmu2",
|
|
"pp3",
|
|
"ppmmu3";
|
|
+ operating-points-v2 = <&gpu_opp_table>;
|
|
power-domains = <&power RK3188_PD_GPU>;
|
|
};
|
|
|
|
|
|
From 313b1d3730fc3a9076a783e9e296a13fdae599ce Mon Sep 17 00:00:00 2001
|
|
From: Alex Bee <knaerzche@gmail.com>
|
|
Date: Sun, 16 Aug 2020 23:12:25 +0200
|
|
Subject: [PATCH] ARM: dts: rk322x: add crypto node
|
|
|
|
In order to add support for RK322x's crypto HW, the node
|
|
has been added t its dts.
|
|
|
|
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
|
---
|
|
arch/arm/boot/dts/rk322x.dtsi | 11 +++++++++++
|
|
1 file changed, 11 insertions(+)
|
|
|
|
diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
|
|
index 92e3eb1e7938..be46697e125e 100644
|
|
--- a/arch/arm/boot/dts/rk322x.dtsi
|
|
+++ b/arch/arm/boot/dts/rk322x.dtsi
|
|
@@ -167,6 +167,17 @@ display_subsystem: display-subsystem {
|
|
ports = <&vop_out>;
|
|
};
|
|
|
|
+ crypto: cypto-controller@100a0000 {
|
|
+ compatible = "rockchip,rk3288-crypto";
|
|
+ reg = <0x100a0000 0x4000>;
|
|
+ interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ clocks = <&cru HCLK_M_CRYPTO>, <&cru HCLK_S_CRYPTO>,
|
|
+ <&cru SCLK_CRYPTO>, <&cru ACLK_DMAC>;
|
|
+ clock-names = "aclk", "hclk", "sclk", "apb_pclk";
|
|
+ resets = <&cru SRST_CRYPTO>;
|
|
+ reset-names = "crypto-rst";
|
|
+ };
|
|
+
|
|
i2s1: i2s1@100b0000 {
|
|
compatible = "rockchip,rk3228-i2s", "rockchip,rk3066-i2s";
|
|
reg = <0x100b0000 0x4000>;
|