mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
1762 lines
56 KiB
Diff
1762 lines
56 KiB
Diff
--- a/arch/arm/Makefile
|
||
+++ b/arch/arm/Makefile
|
||
@@ -149,6 +149,11 @@ textofs-$(CONFIG_SA1111) := 0x00208000
|
||
endif
|
||
textofs-$(CONFIG_ARCH_IPQ40XX) := 0x00208000
|
||
textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
|
||
+ifeq ($(CONFIG_ARCH_IPQ6018),y)
|
||
+textofs-$(CONFIG_ARCH_IPQ256M) := 0x01008000
|
||
+else
|
||
+textofs-$(CONFIG_ARCH_IPQ256M) := 0x01208000
|
||
+endif
|
||
textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
|
||
textofs-$(CONFIG_ARCH_MESON) := 0x00208000
|
||
textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000
|
||
--- a/arch/arm/boot/compressed/head.S
|
||
+++ b/arch/arm/boot/compressed/head.S
|
||
@@ -269,7 +269,8 @@ not_angel:
|
||
mov r4, pc
|
||
and r4, r4, #0xf8000000
|
||
/* Determine final kernel image address. */
|
||
- add r4, r4, #TEXT_OFFSET
|
||
+ ldr r0, =TEXT_OFFSET
|
||
+ add r4, r4, r0
|
||
#else
|
||
ldr r4, =zreladdr
|
||
#endif
|
||
--- a/arch/arm/kernel/head.S
|
||
+++ b/arch/arm/kernel/head.S
|
||
@@ -48,8 +48,9 @@
|
||
.globl swapper_pg_dir
|
||
.equ swapper_pg_dir, KERNEL_RAM_VADDR - PG_DIR_SIZE
|
||
|
||
- .macro pgtbl, rd, phys
|
||
- add \rd, \phys, #TEXT_OFFSET
|
||
+ .macro pgtbl, rd, phys, scratch
|
||
+ ldr \scratch, =TEXT_OFFSET
|
||
+ add \rd, \phys, \scratch
|
||
sub \rd, \rd, #PG_DIR_SIZE
|
||
.endm
|
||
|
||
@@ -175,7 +176,7 @@ ENDPROC(stext)
|
||
* r4 = physical page table address
|
||
*/
|
||
__create_page_tables:
|
||
- pgtbl r4, r8 @ page table address
|
||
+ pgtbl r4, r8, r0 @ page table address
|
||
|
||
/*
|
||
* Clear the swapper page table
|
||
--- a/arch/arm/mach-qcom/Kconfig
|
||
+++ b/arch/arm/mach-qcom/Kconfig
|
||
@@ -33,4 +33,34 @@ config ARCH_MDM9615
|
||
bool "Enable support for MDM9615"
|
||
select CLKSRC_QCOM
|
||
|
||
+config IPQ_MEM_PROFILE
|
||
+ int "Select Memory Profile"
|
||
+ range 0 1024
|
||
+ default 0
|
||
+ ---help---
|
||
+ This option select memory profile to be used, which defines
|
||
+ the reserved memory configuration used in device tree.
|
||
+
|
||
+ If unsure, say 0
|
||
+
|
||
+config SKB_FIXED_SIZE_2K
|
||
+ bool "SKB size fixed at 2K"
|
||
+ default n
|
||
+ help
|
||
+ This is a hint to the NSS driver that the ‘skbuff’ size might
|
||
+ need to be fixed at 2KB, to conserve memory.
|
||
+
|
||
+config ARCH_IPQ256M
|
||
+ bool "Enable 256M config"
|
||
+ default n
|
||
+ help
|
||
+ This sets the text offset of 256M profile, which makes kernel aware of
|
||
+ first 16MB of DDR.
|
||
+
|
||
+config ARCH_IPQ6018
|
||
+ bool "Enable support for IPQ6018"
|
||
+ help
|
||
+ This enables support for the IPQ6018 chipset. If you dont
|
||
+ know what do here, say N
|
||
+
|
||
endif
|
||
--- a/arch/arm64/Kconfig
|
||
+++ b/arch/arm64/Kconfig
|
||
@@ -1831,6 +1831,16 @@ config STACKPROTECTOR_PER_TASK
|
||
def_bool y
|
||
depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_SYSREG
|
||
|
||
+config IPQ_MEM_PROFILE
|
||
+ int "Select Memory Profile"
|
||
+ range 0 1024
|
||
+ default 0
|
||
+ help
|
||
+ This option select memory profile to be used,which defines
|
||
+ the reserved memory configuration used in device tree,
|
||
+
|
||
+ If unsure, say 0.
|
||
+
|
||
endmenu
|
||
|
||
menu "Boot options"
|
||
--- a/drivers/clk/qcom/apss-ipq6018.c
|
||
+++ b/drivers/clk/qcom/apss-ipq6018.c
|
||
@@ -1,6 +1,6 @@
|
||
// SPDX-License-Identifier: GPL-2.0
|
||
/*
|
||
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||
+ * Copyright (c) 2018,2020 The Linux Foundation. All rights reserved.
|
||
*/
|
||
|
||
#include <linux/kernel.h>
|
||
@@ -16,7 +16,7 @@
|
||
#include "clk-regmap.h"
|
||
#include "clk-branch.h"
|
||
#include "clk-alpha-pll.h"
|
||
-#include "clk-regmap-mux.h"
|
||
+#include "clk-rcg.h"
|
||
|
||
enum {
|
||
P_XO,
|
||
@@ -33,16 +33,21 @@ static const struct parent_map parents_a
|
||
{ P_APSS_PLL_EARLY, 5 },
|
||
};
|
||
|
||
-static struct clk_regmap_mux apcs_alias0_clk_src = {
|
||
- .reg = 0x0050,
|
||
- .width = 3,
|
||
- .shift = 7,
|
||
+static const struct freq_tbl ftbl_apcs_alias0_clk_src[] = {
|
||
+ { .src = P_APSS_PLL_EARLY, .pre_div = 1 },
|
||
+ { }
|
||
+};
|
||
+
|
||
+static struct clk_rcg2 apcs_alias0_clk_src = {
|
||
+ .cmd_rcgr = 0x0050,
|
||
+ .freq_tbl = ftbl_apcs_alias0_clk_src,
|
||
+ .hid_width = 5,
|
||
.parent_map = parents_apcs_alias0_clk_src_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "apcs_alias0_clk_src",
|
||
.parent_data = parents_apcs_alias0_clk_src,
|
||
.num_parents = 2,
|
||
- .ops = &clk_regmap_mux_closest_ops,
|
||
+ .ops = &clk_rcg2_ops,
|
||
.flags = CLK_SET_RATE_PARENT,
|
||
},
|
||
};
|
||
@@ -87,8 +92,8 @@ static int apss_ipq6018_probe(struct pla
|
||
struct regmap *regmap;
|
||
|
||
regmap = dev_get_regmap(pdev->dev.parent, NULL);
|
||
- if (!regmap)
|
||
- return -ENODEV;
|
||
+ if (IS_ERR(regmap))
|
||
+ return PTR_ERR(regmap);
|
||
|
||
return qcom_cc_really_probe(pdev, &apss_ipq6018_desc, regmap);
|
||
}
|
||
@@ -102,5 +107,6 @@ static struct platform_driver apss_ipq60
|
||
|
||
module_platform_driver(apss_ipq6018_driver);
|
||
|
||
-MODULE_DESCRIPTION("QCOM APSS IPQ 6018 CLK Driver");
|
||
+MODULE_DESCRIPTION("IPQ6018 APSS CLK Driver");
|
||
MODULE_LICENSE("GPL v2");
|
||
+
|
||
--- a/drivers/clk/qcom/gcc-ipq6018.c
|
||
+++ b/drivers/clk/qcom/gcc-ipq6018.c
|
||
@@ -1,6 +1,6 @@
|
||
// SPDX-License-Identifier: GPL-2.0
|
||
/*
|
||
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||
+ * Copyright (c) 2018,2020 The Linux Foundation. All rights reserved.
|
||
*/
|
||
|
||
#include <linux/kernel.h>
|
||
@@ -62,6 +62,7 @@ static struct clk_alpha_pll gpll0_main =
|
||
},
|
||
.num_parents = 1,
|
||
.ops = &clk_alpha_pll_ops,
|
||
+ .flags = CLK_IS_CRITICAL,
|
||
},
|
||
},
|
||
};
|
||
@@ -150,6 +151,7 @@ static struct clk_alpha_pll gpll6_main =
|
||
},
|
||
.num_parents = 1,
|
||
.ops = &clk_alpha_pll_ops,
|
||
+ .flags = CLK_IS_CRITICAL,
|
||
},
|
||
},
|
||
};
|
||
@@ -181,6 +183,7 @@ static struct clk_alpha_pll gpll4_main =
|
||
},
|
||
.num_parents = 1,
|
||
.ops = &clk_alpha_pll_ops,
|
||
+ .flags = CLK_IS_CRITICAL,
|
||
},
|
||
},
|
||
};
|
||
@@ -211,6 +214,7 @@ static struct clk_rcg2 pcnoc_bfdcd_clk_s
|
||
.freq_tbl = ftbl_pcnoc_bfdcd_clk_src,
|
||
.hid_width = 5,
|
||
.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
|
||
+ .flags = CLK_RCG2_HW_CONTROLLED,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "pcnoc_bfdcd_clk_src",
|
||
.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
|
||
@@ -219,6 +223,19 @@ static struct clk_rcg2 pcnoc_bfdcd_clk_s
|
||
},
|
||
};
|
||
|
||
+static struct clk_fixed_factor pcnoc_clk_src = {
|
||
+ .mult = 1,
|
||
+ .div = 1,
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "pcnoc_clk_src",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &pcnoc_bfdcd_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .ops = &clk_fixed_factor_ops,
|
||
+ .flags = CLK_SET_RATE_PARENT,
|
||
+ },
|
||
+};
|
||
+
|
||
static struct clk_alpha_pll gpll2_main = {
|
||
.offset = 0x4a000,
|
||
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
|
||
@@ -232,6 +249,7 @@ static struct clk_alpha_pll gpll2_main =
|
||
},
|
||
.num_parents = 1,
|
||
.ops = &clk_alpha_pll_ops,
|
||
+ .flags = CLK_IS_CRITICAL,
|
||
},
|
||
},
|
||
};
|
||
@@ -456,6 +474,7 @@ static struct clk_branch gcc_sleep_clk_s
|
||
},
|
||
.num_parents = 1,
|
||
.ops = &clk_branch2_ops,
|
||
+ .flags = CLK_IS_CRITICAL,
|
||
},
|
||
},
|
||
};
|
||
@@ -499,6 +518,19 @@ static struct clk_rcg2 snoc_nssnoc_bfdcd
|
||
},
|
||
};
|
||
|
||
+static struct clk_fixed_factor snoc_nssnoc_clk_src = {
|
||
+ .mult = 1,
|
||
+ .div = 1,
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "snoc_nssnoc_clk_src",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &snoc_nssnoc_bfdcd_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .ops = &clk_fixed_factor_ops,
|
||
+ .flags = CLK_SET_RATE_PARENT,
|
||
+ },
|
||
+};
|
||
+
|
||
static const struct freq_tbl ftbl_apss_ahb_clk_src[] = {
|
||
F(24000000, P_XO, 1, 0, 0),
|
||
F(25000000, P_GPLL0_DIV2, 16, 0, 0),
|
||
@@ -532,17 +564,6 @@ static const struct freq_tbl ftbl_nss_po
|
||
{ }
|
||
};
|
||
|
||
-static const struct clk_parent_data
|
||
-gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias[] = {
|
||
- { .fw_name = "xo" },
|
||
- { .fw_name = "uniphy0_gcc_rx_clk" },
|
||
- { .fw_name = "uniphy0_gcc_tx_clk" },
|
||
- { .fw_name = "uniphy1_gcc_rx_clk" },
|
||
- { .fw_name = "uniphy1_gcc_tx_clk" },
|
||
- { .hw = &ubi32_pll.clkr.hw },
|
||
- { .fw_name = "bias_pll_cc_clk" },
|
||
-};
|
||
-
|
||
static const struct parent_map
|
||
gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias_map[] = {
|
||
{ P_XO, 0 },
|
||
@@ -554,6 +575,16 @@ gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32
|
||
{ P_BIAS_PLL, 6 },
|
||
};
|
||
|
||
+static const char * const gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias[] = {
|
||
+ "xo",
|
||
+ "uniphy0_gcc_rx_clk",
|
||
+ "uniphy0_gcc_tx_clk",
|
||
+ "uniphy1_gcc_rx_clk",
|
||
+ "uniphy1_gcc_tx_clk",
|
||
+ "ubi32_pll",
|
||
+ "bias_pll_cc_clk",
|
||
+};
|
||
+
|
||
static struct clk_rcg2 nss_port5_rx_clk_src = {
|
||
.cmd_rcgr = 0x68060,
|
||
.freq_tbl = ftbl_nss_port5_rx_clk_src,
|
||
@@ -561,7 +592,7 @@ static struct clk_rcg2 nss_port5_rx_clk_
|
||
.parent_map = gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_port5_rx_clk_src",
|
||
- .parent_data = gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias,
|
||
+ .parent_names = gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias,
|
||
.num_parents = 7,
|
||
.ops = &clk_rcg2_ops,
|
||
},
|
||
@@ -579,15 +610,14 @@ static const struct freq_tbl ftbl_nss_po
|
||
{ }
|
||
};
|
||
|
||
-static const struct clk_parent_data
|
||
-gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias[] = {
|
||
- { .fw_name = "xo" },
|
||
- { .fw_name = "uniphy0_gcc_tx_clk" },
|
||
- { .fw_name = "uniphy0_gcc_rx_clk" },
|
||
- { .fw_name = "uniphy1_gcc_tx_clk" },
|
||
- { .fw_name = "uniphy1_gcc_rx_clk" },
|
||
- { .hw = &ubi32_pll.clkr.hw },
|
||
- { .fw_name = "bias_pll_cc_clk" },
|
||
+static const char * const gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias[] = {
|
||
+ "xo",
|
||
+ "uniphy0_gcc_tx_clk",
|
||
+ "uniphy0_gcc_rx_clk",
|
||
+ "uniphy1_gcc_tx_clk",
|
||
+ "uniphy1_gcc_rx_clk",
|
||
+ "ubi32_pll",
|
||
+ "bias_pll_cc_clk",
|
||
};
|
||
|
||
static const struct parent_map
|
||
@@ -608,7 +638,7 @@ static struct clk_rcg2 nss_port5_tx_clk_
|
||
.parent_map = gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_port5_tx_clk_src",
|
||
- .parent_data = gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias,
|
||
+ .parent_names = gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias,
|
||
.num_parents = 7,
|
||
.ops = &clk_rcg2_ops,
|
||
},
|
||
@@ -721,14 +751,15 @@ static const struct freq_tbl ftbl_nss_po
|
||
{ }
|
||
};
|
||
|
||
-static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_ubi32_bias[] = {
|
||
- { .fw_name = "xo" },
|
||
- { .fw_name = "uniphy0_gcc_rx_clk" },
|
||
- { .fw_name = "uniphy0_gcc_tx_clk" },
|
||
- { .hw = &ubi32_pll.clkr.hw },
|
||
- { .fw_name = "bias_pll_cc_clk" },
|
||
+static const char * const gcc_xo_uniphy0_rx_tx_ubi32_bias[] = {
|
||
+ "xo",
|
||
+ "uniphy0_gcc_rx_clk",
|
||
+ "uniphy0_gcc_tx_clk",
|
||
+ "ubi32_pll",
|
||
+ "bias_pll_cc_clk",
|
||
};
|
||
|
||
+
|
||
static const struct parent_map gcc_xo_uniphy0_rx_tx_ubi32_bias_map[] = {
|
||
{ P_XO, 0 },
|
||
{ P_UNIPHY0_RX, 1 },
|
||
@@ -744,7 +775,7 @@ static struct clk_rcg2 nss_port1_rx_clk_
|
||
.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_port1_rx_clk_src",
|
||
- .parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
|
||
+ .parent_names = gcc_xo_uniphy0_rx_tx_ubi32_bias,
|
||
.num_parents = 5,
|
||
.ops = &clk_rcg2_ops,
|
||
},
|
||
@@ -757,12 +788,12 @@ static const struct freq_tbl ftbl_nss_po
|
||
{ }
|
||
};
|
||
|
||
-static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_ubi32_bias[] = {
|
||
- { .fw_name = "xo" },
|
||
- { .fw_name = "uniphy0_gcc_tx_clk" },
|
||
- { .fw_name = "uniphy0_gcc_rx_clk" },
|
||
- { .hw = &ubi32_pll.clkr.hw },
|
||
- { .fw_name = "bias_pll_cc_clk" },
|
||
+static const char * const gcc_xo_uniphy0_tx_rx_ubi32_bias[] = {
|
||
+ "xo",
|
||
+ "uniphy0_gcc_tx_clk",
|
||
+ "uniphy0_gcc_rx_clk",
|
||
+ "ubi32_pll",
|
||
+ "bias_pll_cc_clk",
|
||
};
|
||
|
||
static const struct parent_map gcc_xo_uniphy0_tx_rx_ubi32_bias_map[] = {
|
||
@@ -780,7 +811,7 @@ static struct clk_rcg2 nss_port1_tx_clk_
|
||
.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_port1_tx_clk_src",
|
||
- .parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
|
||
+ .parent_names = gcc_xo_uniphy0_tx_rx_ubi32_bias,
|
||
.num_parents = 5,
|
||
.ops = &clk_rcg2_ops,
|
||
},
|
||
@@ -793,7 +824,7 @@ static struct clk_rcg2 nss_port2_rx_clk_
|
||
.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_port2_rx_clk_src",
|
||
- .parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
|
||
+ .parent_names = gcc_xo_uniphy0_rx_tx_ubi32_bias,
|
||
.num_parents = 5,
|
||
.ops = &clk_rcg2_ops,
|
||
},
|
||
@@ -806,7 +837,7 @@ static struct clk_rcg2 nss_port2_tx_clk_
|
||
.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_port2_tx_clk_src",
|
||
- .parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
|
||
+ .parent_names = gcc_xo_uniphy0_tx_rx_ubi32_bias,
|
||
.num_parents = 5,
|
||
.ops = &clk_rcg2_ops,
|
||
},
|
||
@@ -819,7 +850,7 @@ static struct clk_rcg2 nss_port3_rx_clk_
|
||
.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_port3_rx_clk_src",
|
||
- .parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
|
||
+ .parent_names = gcc_xo_uniphy0_rx_tx_ubi32_bias,
|
||
.num_parents = 5,
|
||
.ops = &clk_rcg2_ops,
|
||
},
|
||
@@ -832,7 +863,7 @@ static struct clk_rcg2 nss_port3_tx_clk_
|
||
.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_port3_tx_clk_src",
|
||
- .parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
|
||
+ .parent_names = gcc_xo_uniphy0_tx_rx_ubi32_bias,
|
||
.num_parents = 5,
|
||
.ops = &clk_rcg2_ops,
|
||
},
|
||
@@ -845,7 +876,7 @@ static struct clk_rcg2 nss_port4_rx_clk_
|
||
.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_port4_rx_clk_src",
|
||
- .parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
|
||
+ .parent_names = gcc_xo_uniphy0_rx_tx_ubi32_bias,
|
||
.num_parents = 5,
|
||
.ops = &clk_rcg2_ops,
|
||
},
|
||
@@ -858,7 +889,7 @@ static struct clk_rcg2 nss_port4_tx_clk_
|
||
.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_port4_tx_clk_src",
|
||
- .parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
|
||
+ .parent_names = gcc_xo_uniphy0_tx_rx_ubi32_bias,
|
||
.num_parents = 5,
|
||
.ops = &clk_rcg2_ops,
|
||
},
|
||
@@ -960,6 +991,7 @@ static struct clk_rcg2 nss_crypto_clk_sr
|
||
.mnd_width = 16,
|
||
.hid_width = 5,
|
||
.parent_map = gcc_xo_nss_crypto_pll_gpll0_map,
|
||
+ .flags = CLK_RCG2_HW_CONTROLLED,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_crypto_clk_src",
|
||
.parent_data = gcc_xo_nss_crypto_pll_gpll0,
|
||
@@ -1131,6 +1163,7 @@ static struct clk_rcg2 nss_ubi0_clk_src
|
||
.freq_tbl = ftbl_nss_ubi_clk_src,
|
||
.hid_width = 5,
|
||
.parent_map = gcc_xo_ubi32_gpll0_gpll2_gpll4_gpll6_map,
|
||
+ .flags = CLK_RCG2_HW_CONTROLLED,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "nss_ubi0_clk_src",
|
||
.parent_data = gcc_xo_ubi32_pll_gpll0_gpll2_gpll4_gpll6,
|
||
@@ -1869,7 +1902,7 @@ static struct clk_branch gcc_apss_ahb_cl
|
||
.parent_hws = (const struct clk_hw *[]){
|
||
&apss_ahb_postdiv_clk_src.clkr.hw },
|
||
.num_parents = 1,
|
||
- .flags = CLK_SET_RATE_PARENT,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
|
||
.ops = &clk_branch2_ops,
|
||
},
|
||
},
|
||
@@ -1891,11 +1924,26 @@ static struct clk_rcg2 system_noc_bfdcd_
|
||
.freq_tbl = ftbl_system_noc_bfdcd_clk_src,
|
||
.hid_width = 5,
|
||
.parent_map = gcc_xo_gpll0_gpll6_gpll0_out_main_div2_map,
|
||
+ .flags = CLK_RCG2_HW_CONTROLLED,
|
||
.clkr.hw.init = &(struct clk_init_data){
|
||
.name = "system_noc_bfdcd_clk_src",
|
||
.parent_data = gcc_xo_gpll0_gpll6_gpll0_out_main_div2,
|
||
.num_parents = 4,
|
||
.ops = &clk_rcg2_ops,
|
||
+ .flags = CLK_IS_CRITICAL,
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_fixed_factor system_noc_clk_src = {
|
||
+ .mult = 1,
|
||
+ .div = 1,
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "system_noc_clk_src",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &system_noc_bfdcd_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .ops = &clk_fixed_factor_ops,
|
||
+ .flags = CLK_SET_RATE_PARENT,
|
||
},
|
||
};
|
||
|
||
@@ -1934,6 +1982,19 @@ static struct clk_rcg2 ubi32_mem_noc_bfd
|
||
},
|
||
};
|
||
|
||
+static struct clk_fixed_factor ubi32_mem_noc_clk_src = {
|
||
+ .mult = 1,
|
||
+ .div = 1,
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "ubi32_mem_noc_clk_src",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &ubi32_mem_noc_bfdcd_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .ops = &clk_fixed_factor_ops,
|
||
+ .flags = CLK_SET_RATE_PARENT,
|
||
+ },
|
||
+};
|
||
+
|
||
static struct clk_branch gcc_apss_axi_clk = {
|
||
.halt_reg = 0x46020,
|
||
.halt_check = BRANCH_HALT_VOTED,
|
||
@@ -1945,7 +2006,7 @@ static struct clk_branch gcc_apss_axi_cl
|
||
.parent_hws = (const struct clk_hw *[]){
|
||
&apss_axi_clk_src.clkr.hw },
|
||
.num_parents = 1,
|
||
- .flags = CLK_SET_RATE_PARENT,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
|
||
.ops = &clk_branch2_ops,
|
||
},
|
||
},
|
||
@@ -2128,6 +2189,22 @@ static struct clk_branch gcc_blsp1_qup5_
|
||
},
|
||
};
|
||
|
||
+static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk = {
|
||
+ .halt_reg = 0x07010,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x07010,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_blsp1_qup6_i2c_apps_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &blsp1_qup6_i2c_apps_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = {
|
||
.halt_reg = 0x0700c,
|
||
.clkr = {
|
||
@@ -2314,7 +2391,7 @@ static struct clk_branch gcc_xo_clk = {
|
||
.parent_hws = (const struct clk_hw *[]){
|
||
&gcc_xo_clk_src.clkr.hw },
|
||
.num_parents = 1,
|
||
- .flags = CLK_SET_RATE_PARENT,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
|
||
.ops = &clk_branch2_ops,
|
||
},
|
||
},
|
||
@@ -2671,6 +2748,454 @@ static struct clk_rcg2 lpass_q6_axim_clk
|
||
},
|
||
};
|
||
|
||
+static struct clk_branch gcc_wcss_axi_m_clk = {
|
||
+ .halt_reg = 0x5903C,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x5903C,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_axi_m_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &system_noc_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_sys_noc_wcss_ahb_clk = {
|
||
+ .halt_reg = 0x26034,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x26034,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_sys_noc_wcss_ahb_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &wcss_ahb_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_q6_axim_clk = {
|
||
+ .halt_reg = 0x5913C,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x5913C,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_q6_axim_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &q6_axi_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_q6ss_atbm_clk = {
|
||
+ .halt_reg = 0x59144,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59144,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_q6ss_atbm_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_at_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_q6ss_pclkdbg_clk = {
|
||
+ .halt_reg = 0x59140,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59140,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_q6ss_pclkdbg_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_dap_sync_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_q6_tsctr_1to2_clk = {
|
||
+ .halt_reg = 0x59148,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59148,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_q6_tsctr_1to2_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_tsctr_div2_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_core_tbu_clk = {
|
||
+ .halt_reg = 0x12028,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0xb00c,
|
||
+ .enable_mask = BIT(7),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_core_tbu_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &system_noc_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_q6_tbu_clk = {
|
||
+ .halt_reg = 0x1202C,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0xb00c,
|
||
+ .enable_mask = BIT(8),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_q6_tbu_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &q6_axi_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_q6_axim2_clk = {
|
||
+ .halt_reg = 0x59150,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59150,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_q6_axim2_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &q6_axi_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_q6_ahb_clk = {
|
||
+ .halt_reg = 0x59138,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59138,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_q6_ahb_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &wcss_ahb_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_q6_ahb_s_clk = {
|
||
+ .halt_reg = 0x5914C,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x5914C,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_q6_ahb_s_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &wcss_ahb_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_dbg_ifc_apb_clk = {
|
||
+ .halt_reg = 0x59040,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59040,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_dbg_ifc_apb_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_dap_sync_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_dbg_ifc_atb_clk = {
|
||
+ .halt_reg = 0x59044,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59044,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_dbg_ifc_atb_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_at_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_dbg_ifc_nts_clk = {
|
||
+ .halt_reg = 0x59048,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59048,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_dbg_ifc_nts_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_tsctr_div2_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_dbg_ifc_dapbus_clk = {
|
||
+ .halt_reg = 0x5905C,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x5905C,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_dbg_ifc_dapbus_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_dap_sync_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_dbg_ifc_apb_bdg_clk = {
|
||
+ .halt_reg = 0x59050,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59050,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_dbg_ifc_apb_bdg_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_dap_sync_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_dbg_ifc_atb_bdg_clk = {
|
||
+ .halt_reg = 0x59054,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59054,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_dbg_ifc_atb_bdg_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_at_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_dbg_ifc_nts_bdg_clk = {
|
||
+ .halt_reg = 0x59058,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59058,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_dbg_ifc_nts_bdg_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_tsctr_div2_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_dbg_ifc_dapbus_bdg_clk = {
|
||
+ .halt_reg = 0x59060,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59060,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_dbg_ifc_dapbus_bdg_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_dap_sync_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_nssnoc_atb_clk = {
|
||
+ .halt_reg = 0x6818C,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x6818C,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_nssnoc_atb_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_at_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_ecahb_clk = {
|
||
+ .halt_reg = 0x59038,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59038,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_ecahb_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &wcss_ahb_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_acmt_clk = {
|
||
+ .halt_reg = 0x59064,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59064,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_acmt_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &wcss_ahb_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_wcss_ahb_s_clk = {
|
||
+ .halt_reg = 0x59034,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x59034,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_wcss_ahb_s_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &wcss_ahb_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+struct clk_branch gcc_rbcpr_wcss_ahb_clk = {
|
||
+ .halt_reg = 0x3A008,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x3A008,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_rbcpr_wcss_ahb_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &pcnoc_clk_src.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+struct clk_branch gcc_mem_noc_q6_axi_clk = {
|
||
+ .halt_reg = 0x1D038,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x1D038,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_mem_noc_q6_axi_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &q6_axi_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_sys_noc_qdss_stm_axi_clk = {
|
||
+ .halt_reg = 0x26024,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x26024,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_sys_noc_qdss_stm_axi_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_stm_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_qdss_stm_clk = {
|
||
+ .halt_reg = 0x29044,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x29044,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_qdss_stm_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_stm_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+static struct clk_branch gcc_qdss_traceclkin_clk = {
|
||
+ .halt_reg = 0x29060,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x29060,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_qdss_traceclkin_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_traceclkin_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
static struct freq_tbl ftbl_rbcpr_wcss_clk_src[] = {
|
||
F(24000000, P_XO, 1, 0, 0),
|
||
F(50000000, P_GPLL0, 16, 0, 0),
|
||
@@ -2690,6 +3215,23 @@ static struct clk_rcg2 rbcpr_wcss_clk_sr
|
||
},
|
||
};
|
||
|
||
+struct clk_branch gcc_rbcpr_wcss_clk = {
|
||
+ .halt_reg = 0x3A004,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x3A004,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_rbcpr_wcss_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &rbcpr_wcss_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
+
|
||
static struct clk_branch gcc_lpass_core_axim_clk = {
|
||
.halt_reg = 0x1F028,
|
||
.clkr = {
|
||
@@ -3163,6 +3705,7 @@ static struct clk_branch gcc_nssnoc_ppe_
|
||
.name = "gcc_nssnoc_ppe_cfg_clk",
|
||
.parent_hws = (const struct clk_hw *[]){
|
||
&nss_ppe_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
.flags = CLK_SET_RATE_PARENT,
|
||
.ops = &clk_branch2_ops,
|
||
},
|
||
@@ -3511,6 +4054,22 @@ static struct clk_branch gcc_prng_ahb_cl
|
||
},
|
||
};
|
||
|
||
+static struct clk_branch gcc_qdss_at_clk = {
|
||
+ .halt_reg = 0x29024,
|
||
+ .clkr = {
|
||
+ .enable_reg = 0x29024,
|
||
+ .enable_mask = BIT(0),
|
||
+ .hw.init = &(struct clk_init_data){
|
||
+ .name = "gcc_qdss_at_clk",
|
||
+ .parent_hws = (const struct clk_hw *[]){
|
||
+ &qdss_at_clk_src.clkr.hw },
|
||
+ .num_parents = 1,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
|
||
+ .ops = &clk_branch2_ops,
|
||
+ },
|
||
+ },
|
||
+};
|
||
+
|
||
static struct clk_branch gcc_qdss_dap_clk = {
|
||
.halt_reg = 0x29084,
|
||
.clkr = {
|
||
@@ -3521,7 +4080,7 @@ static struct clk_branch gcc_qdss_dap_cl
|
||
.parent_hws = (const struct clk_hw *[]){
|
||
&qdss_dap_sync_clk_src.hw },
|
||
.num_parents = 1,
|
||
- .flags = CLK_SET_RATE_PARENT,
|
||
+ .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
|
||
.ops = &clk_branch2_ops,
|
||
},
|
||
},
|
||
@@ -4151,15 +4710,18 @@ static struct clk_branch gcc_dcc_clk = {
|
||
|
||
static const struct alpha_pll_config ubi32_pll_config = {
|
||
.l = 0x3e,
|
||
- .alpha = 0x57,
|
||
- .config_ctl_val = 0x240d6aa8,
|
||
- .config_ctl_hi_val = 0x3c2,
|
||
+ .alpha = 0x6667,
|
||
+ .config_ctl_val = 0x240d4828,
|
||
+ .config_ctl_hi_val = 0x6,
|
||
.main_output_mask = BIT(0),
|
||
.aux_output_mask = BIT(1),
|
||
.pre_div_val = 0x0,
|
||
.pre_div_mask = BIT(12),
|
||
.post_div_val = 0x0,
|
||
.post_div_mask = GENMASK(9, 8),
|
||
+ .alpha_en_mask = BIT(24),
|
||
+ .test_ctl_val = 0x1C0000C0,
|
||
+ .test_ctl_hi_val = 0x4000,
|
||
};
|
||
|
||
static const struct alpha_pll_config nss_crypto_pll_config = {
|
||
@@ -4184,6 +4746,9 @@ static struct clk_hw *gcc_ipq6018_hws[]
|
||
&gpll6_out_main_div2.hw,
|
||
&qdss_dap_sync_clk_src.hw,
|
||
&qdss_tsctr_div2_clk_src.hw,
|
||
+ &pcnoc_clk_src.hw,
|
||
+ &snoc_nssnoc_clk_src.hw,
|
||
+ &ubi32_mem_noc_clk_src.hw,
|
||
};
|
||
|
||
static struct clk_regmap *gcc_ipq6018_clks[] = {
|
||
@@ -4281,6 +4846,7 @@ static struct clk_regmap *gcc_ipq6018_cl
|
||
[GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr,
|
||
[GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr,
|
||
[GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr,
|
||
+ [GCC_BLSP1_QUP6_I2C_APPS_CLK] = &gcc_blsp1_qup6_i2c_apps_clk.clkr,
|
||
[GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr,
|
||
[GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr,
|
||
[GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr,
|
||
@@ -4346,6 +4912,7 @@ static struct clk_regmap *gcc_ipq6018_cl
|
||
[GCC_SYS_NOC_PCIE0_AXI_CLK] = &gcc_sys_noc_pcie0_axi_clk.clkr,
|
||
[GCC_PCIE0_PIPE_CLK] = &gcc_pcie0_pipe_clk.clkr,
|
||
[GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
|
||
+ [GCC_QDSS_AT_CLK] = &gcc_qdss_at_clk.clkr,
|
||
[GCC_QDSS_DAP_CLK] = &gcc_qdss_dap_clk.clkr,
|
||
[GCC_QPIC_AHB_CLK] = &gcc_qpic_ahb_clk.clkr,
|
||
[GCC_QPIC_CLK] = &gcc_qpic_clk.clkr,
|
||
@@ -4387,9 +4954,35 @@ static struct clk_regmap *gcc_ipq6018_cl
|
||
[PCIE0_RCHNG_CLK_SRC] = &pcie0_rchng_clk_src.clkr,
|
||
[GCC_PCIE0_AXI_S_BRIDGE_CLK] = &gcc_pcie0_axi_s_bridge_clk.clkr,
|
||
[PCIE0_RCHNG_CLK] = &gcc_pcie0_rchng_clk.clkr,
|
||
+ [GCC_WCSS_AXI_M_CLK] = &gcc_wcss_axi_m_clk.clkr,
|
||
+ [GCC_SYS_NOC_WCSS_AHB_CLK] = &gcc_sys_noc_wcss_ahb_clk.clkr,
|
||
[WCSS_AHB_CLK_SRC] = &wcss_ahb_clk_src.clkr,
|
||
+ [GCC_Q6_AXIM_CLK] = &gcc_q6_axim_clk.clkr,
|
||
[Q6_AXI_CLK_SRC] = &q6_axi_clk_src.clkr,
|
||
+ [GCC_Q6SS_ATBM_CLK] = &gcc_q6ss_atbm_clk.clkr,
|
||
+ [GCC_Q6SS_PCLKDBG_CLK] = &gcc_q6ss_pclkdbg_clk.clkr,
|
||
+ [GCC_Q6_TSCTR_1TO2_CLK] = &gcc_q6_tsctr_1to2_clk.clkr,
|
||
+ [GCC_WCSS_CORE_TBU_CLK] = &gcc_wcss_core_tbu_clk.clkr,
|
||
+ [GCC_WCSS_Q6_TBU_CLK] = &gcc_wcss_q6_tbu_clk.clkr,
|
||
+ [GCC_Q6_AXIM2_CLK] = &gcc_q6_axim2_clk.clkr,
|
||
+ [GCC_Q6_AHB_CLK] = &gcc_q6_ahb_clk.clkr,
|
||
+ [GCC_Q6_AHB_S_CLK] = &gcc_q6_ahb_s_clk.clkr,
|
||
+ [GCC_WCSS_DBG_IFC_APB_CLK] = &gcc_wcss_dbg_ifc_apb_clk.clkr,
|
||
+ [GCC_WCSS_DBG_IFC_ATB_CLK] = &gcc_wcss_dbg_ifc_atb_clk.clkr,
|
||
+ [GCC_WCSS_DBG_IFC_NTS_CLK] = &gcc_wcss_dbg_ifc_nts_clk.clkr,
|
||
+ [GCC_WCSS_DBG_IFC_DAPBUS_CLK] = &gcc_wcss_dbg_ifc_dapbus_clk.clkr,
|
||
+ [GCC_WCSS_DBG_IFC_APB_BDG_CLK] = &gcc_wcss_dbg_ifc_apb_bdg_clk.clkr,
|
||
+ [GCC_WCSS_DBG_IFC_ATB_BDG_CLK] = &gcc_wcss_dbg_ifc_atb_bdg_clk.clkr,
|
||
+ [GCC_WCSS_DBG_IFC_NTS_BDG_CLK] = &gcc_wcss_dbg_ifc_nts_bdg_clk.clkr,
|
||
+ [GCC_WCSS_DBG_IFC_DAPBUS_BDG_CLK] = &gcc_wcss_dbg_ifc_dapbus_bdg_clk.clkr,
|
||
+ [GCC_NSSNOC_ATB_CLK] = &gcc_nssnoc_atb_clk.clkr,
|
||
+ [GCC_WCSS_ECAHB_CLK] = &gcc_wcss_ecahb_clk.clkr,
|
||
+ [GCC_WCSS_ACMT_CLK] = &gcc_wcss_acmt_clk.clkr,
|
||
+ [GCC_WCSS_AHB_S_CLK] = &gcc_wcss_ahb_s_clk.clkr,
|
||
+ [GCC_RBCPR_WCSS_CLK] = &gcc_rbcpr_wcss_clk.clkr,
|
||
[RBCPR_WCSS_CLK_SRC] = &rbcpr_wcss_clk_src.clkr,
|
||
+ [GCC_RBCPR_WCSS_AHB_CLK] = &gcc_rbcpr_wcss_ahb_clk.clkr,
|
||
+ [GCC_MEM_NOC_Q6_AXI_CLK] = &gcc_mem_noc_q6_axi_clk.clkr,
|
||
[GCC_LPASS_CORE_AXIM_CLK] = &gcc_lpass_core_axim_clk.clkr,
|
||
[LPASS_CORE_AXIM_CLK_SRC] = &lpass_core_axim_clk_src.clkr,
|
||
[GCC_LPASS_SNOC_CFG_CLK] = &gcc_lpass_snoc_cfg_clk.clkr,
|
||
@@ -4405,6 +4998,9 @@ static struct clk_regmap *gcc_ipq6018_cl
|
||
[GCC_MEM_NOC_UBI32_CLK] = &gcc_mem_noc_ubi32_clk.clkr,
|
||
[GCC_MEM_NOC_LPASS_CLK] = &gcc_mem_noc_lpass_clk.clkr,
|
||
[GCC_SNOC_LPASS_CFG_CLK] = &gcc_snoc_lpass_cfg_clk.clkr,
|
||
+ [GCC_SYS_NOC_QDSS_STM_AXI_CLK] = &gcc_sys_noc_qdss_stm_axi_clk.clkr,
|
||
+ [GCC_QDSS_STM_CLK] = &gcc_qdss_stm_clk.clkr,
|
||
+ [GCC_QDSS_TRACECLKIN_CLK] = &gcc_qdss_traceclkin_clk.clkr,
|
||
[QDSS_STM_CLK_SRC] = &qdss_stm_clk_src.clkr,
|
||
[QDSS_TRACECLKIN_CLK_SRC] = &qdss_traceclkin_clk_src.clkr,
|
||
};
|
||
@@ -4517,24 +5113,24 @@ static const struct qcom_reset_map gcc_i
|
||
[GCC_PCIE0_AHB_ARES] = { 0x75040, 5 },
|
||
[GCC_PCIE0_AXI_MASTER_STICKY_ARES] = { 0x75040, 6 },
|
||
[GCC_PCIE0_AXI_SLAVE_STICKY_ARES] = { 0x75040, 7 },
|
||
- [GCC_PPE_FULL_RESET] = { 0x68014, 0 },
|
||
- [GCC_UNIPHY0_SOFT_RESET] = { 0x56004, 0 },
|
||
+ [GCC_PPE_FULL_RESET] = { 0x68014, 0, 0xf0000},
|
||
+ [GCC_UNIPHY0_SOFT_RESET] = { 0x56004, 0, 0x3ff2},
|
||
[GCC_UNIPHY0_XPCS_RESET] = { 0x56004, 2 },
|
||
- [GCC_UNIPHY1_SOFT_RESET] = { 0x56104, 0 },
|
||
+ [GCC_UNIPHY1_SOFT_RESET] = { 0x56104, 0, 0x32},
|
||
[GCC_UNIPHY1_XPCS_RESET] = { 0x56104, 2 },
|
||
- [GCC_EDMA_HW_RESET] = { 0x68014, 0 },
|
||
- [GCC_NSSPORT1_RESET] = { 0x68014, 0 },
|
||
- [GCC_NSSPORT2_RESET] = { 0x68014, 0 },
|
||
- [GCC_NSSPORT3_RESET] = { 0x68014, 0 },
|
||
- [GCC_NSSPORT4_RESET] = { 0x68014, 0 },
|
||
- [GCC_NSSPORT5_RESET] = { 0x68014, 0 },
|
||
- [GCC_UNIPHY0_PORT1_ARES] = { 0x56004, 0 },
|
||
- [GCC_UNIPHY0_PORT2_ARES] = { 0x56004, 0 },
|
||
- [GCC_UNIPHY0_PORT3_ARES] = { 0x56004, 0 },
|
||
- [GCC_UNIPHY0_PORT4_ARES] = { 0x56004, 0 },
|
||
- [GCC_UNIPHY0_PORT5_ARES] = { 0x56004, 0 },
|
||
- [GCC_UNIPHY0_PORT_4_5_RESET] = { 0x56004, 0 },
|
||
- [GCC_UNIPHY0_PORT_4_RESET] = { 0x56004, 0 },
|
||
+ [GCC_EDMA_HW_RESET] = { 0x68014, 0, 0x300000},
|
||
+ [GCC_NSSPORT1_RESET] = { 0x68014, 0, 0x1000003},
|
||
+ [GCC_NSSPORT2_RESET] = { 0x68014, 0, 0x200000c},
|
||
+ [GCC_NSSPORT3_RESET] = { 0x68014, 0, 0x4000030},
|
||
+ [GCC_NSSPORT4_RESET] = { 0x68014, 0, 0x8000300},
|
||
+ [GCC_NSSPORT5_RESET] = { 0x68014, 0, 0x10000c00},
|
||
+ [GCC_UNIPHY0_PORT1_ARES] = { 0x56004, 0, 0x30},
|
||
+ [GCC_UNIPHY0_PORT2_ARES] = { 0x56004, 0, 0xc0},
|
||
+ [GCC_UNIPHY0_PORT3_ARES] = { 0x56004, 0, 0x300},
|
||
+ [GCC_UNIPHY0_PORT4_ARES] = { 0x56004, 0, 0xc00},
|
||
+ [GCC_UNIPHY0_PORT5_ARES] = { 0x56004, 0, 0x3000},
|
||
+ [GCC_UNIPHY0_PORT_4_5_RESET] = { 0x56004, 0, 0x3c02},
|
||
+ [GCC_UNIPHY0_PORT_4_RESET] = { 0x56004, 0, 0xc02},
|
||
[GCC_LPASS_BCR] = {0x1F000, 0},
|
||
[GCC_UBI32_TBU_BCR] = {0x65000, 0},
|
||
[GCC_LPASS_TBU_BCR] = {0x6C000, 0},
|
||
@@ -4585,7 +5181,12 @@ static const struct qcom_cc_desc gcc_ipq
|
||
|
||
static int gcc_ipq6018_probe(struct platform_device *pdev)
|
||
{
|
||
+ int ret;
|
||
struct regmap *regmap;
|
||
+ struct device *dev = &pdev->dev;
|
||
+
|
||
+ clk_register_fixed_rate(dev, "pcie20_phy0_pipe_clk", NULL, 0,
|
||
+ 250000000);
|
||
|
||
regmap = qcom_cc_map(pdev, &gcc_ipq6018_desc);
|
||
if (IS_ERR(regmap))
|
||
@@ -4608,13 +5209,24 @@ static int gcc_ipq6018_probe(struct plat
|
||
clk_alpha_pll_configure(&nss_crypto_pll_main, regmap,
|
||
&nss_crypto_pll_config);
|
||
|
||
- return qcom_cc_really_probe(pdev, &gcc_ipq6018_desc, regmap);
|
||
+ ret = qcom_cc_really_probe(pdev, &gcc_ipq6018_desc, regmap);
|
||
+
|
||
+ dev_dbg(&pdev->dev, "Registered ipq6018 clock provider");
|
||
+
|
||
+ return ret;
|
||
+}
|
||
+
|
||
+static int gcc_ipq6018_remove(struct platform_device *pdev)
|
||
+{
|
||
+ return 0;
|
||
}
|
||
|
||
static struct platform_driver gcc_ipq6018_driver = {
|
||
.probe = gcc_ipq6018_probe,
|
||
+ .remove = gcc_ipq6018_remove,
|
||
.driver = {
|
||
.name = "qcom,gcc-ipq6018",
|
||
+ .owner = THIS_MODULE,
|
||
.of_match_table = gcc_ipq6018_match_table,
|
||
},
|
||
};
|
||
--- a/drivers/mtd/nand/raw/qcom_nandc.c
|
||
+++ b/drivers/mtd/nand/raw/qcom_nandc.c
|
||
@@ -3063,6 +3063,10 @@ static const struct of_device_id qcom_na
|
||
.data = &ipq4019_nandc_props,
|
||
},
|
||
{
|
||
+ .compatible = "qcom,ipq6018-nand",
|
||
+ .data = &ipq8074_nandc_props,
|
||
+ },
|
||
+ {
|
||
.compatible = "qcom,ipq8074-nand",
|
||
.data = &ipq8074_nandc_props,
|
||
},
|
||
--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
|
||
+++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
|
||
@@ -299,6 +299,82 @@ static const struct qmp_phy_init_tbl ipq
|
||
QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXDEEMPH_M3P5DB_V0, 0x0f),
|
||
};
|
||
|
||
+static const struct qmp_phy_init_tbl ipq6018_usb3_serdes_tbl[] = {
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_SYSCLK_EN_SEL,0x1a),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_BIAS_EN_CLKBUFLR_EN,0x08),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_CLK_SELECT,0x30),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_BG_TRIM,0x0f),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_UCDR_FASTLOCK_FO_GAIN,0x0b),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_SVS_MODE_CLK_SEL,0x01),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_HSCLK_SEL,0x00),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_CMN_CONFIG,0x06),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_PLL_IVCO,0x0f),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_SYS_CLK_CTRL,0x06),
|
||
+ /* PLL and Loop filter settings */
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_DEC_START_MODE0,0x68),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START1_MODE0,0xAB),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START2_MODE0,0xAA),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START3_MODE0,0x02),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_CP_CTRL_MODE0,0x09),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_PLL_RCTRL_MODE0,0x16),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_PLL_CCTRL_MODE0,0x28),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_INTEGLOOP_GAIN0_MODE0,0xA0),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP1_MODE0,0xAA),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP2_MODE0,0x29),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP3_MODE0,0x00),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_CORE_CLK_EN,0x00),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP_CFG,0x00),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_VCO_TUNE_MAP,0x00),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_BG_TIMER,0x0a),
|
||
+ /* SSC settings */
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_SSC_EN_CENTER,0x01),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_SSC_PER1,0x7D),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_SSC_PER2,0x01),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_SSC_ADJ_PER1,0x00),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_SSC_ADJ_PER2,0x00),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_SSC_STEP_SIZE1,0x0A),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_COM_SSC_STEP_SIZE2,0x05),
|
||
+};
|
||
+
|
||
+static const struct qmp_phy_init_tbl ipq6018_usb3_rx_tbl[] = {
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_UCDR_SO_GAIN,0x06),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_RX_EQU_ADAPTOR_CNTRL2,0x02),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_RX_EQU_ADAPTOR_CNTRL3,0x6c),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_RX_EQU_ADAPTOR_CNTRL3,0x4c),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_RX_EQU_ADAPTOR_CNTRL4,0xb8),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_RX_EQ_OFFSET_ADAPTOR_CNTRL1,0x77),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_RX_OFFSET_ADAPTOR_CNTRL2,0x80),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_SIGDET_CNTRL,0x03),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_SIGDET_DEGLITCH_CNTRL,0x16),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX_SIGDET_ENABLES,0x00),
|
||
+};
|
||
+
|
||
+static const struct qmp_phy_init_tbl ipq6018_usb3_pcs_tbl[] = {
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXDEEMPH_M6DB_V0,0x17),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXDEEMPH_M3P5DB_V0,0x0f),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_FLL_CNTRL2,0x83),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_FLL_CNTRL1,0x02),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_FLL_CNT_VAL_L,0x09),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_FLL_CNT_VAL_H_TOL,0xa2),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_FLL_MAN_CODE,0x85),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_LOCK_DETECT_CONFIG1,0xd1),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_LOCK_DETECT_CONFIG2,0x1f),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_LOCK_DETECT_CONFIG3,0x47),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_POWER_STATE_CONFIG2,0x1b),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RXEQTRAINING_WAIT_TIME,0x75),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RXEQTRAINING_RUN_TIME,0x13),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_LFPS_TX_ECSTART_EQTLOCK,0x86),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_PWRUP_RESET_DLY_TIME_AUXCLK,0x04),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_TSYNC_RSYNC_TIME,0x44),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RCVR_DTCT_DLY_P1U2_L,0xe7),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RCVR_DTCT_DLY_P1U2_H,0x03),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RCVR_DTCT_DLY_U3_L,0x40),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RCVR_DTCT_DLY_U3_H,0x00),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RX_SIGDET_LVL,0x88),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXDEEMPH_M6DB_V0,0x17),
|
||
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXDEEMPH_M3P5DB_V0,0x0f),
|
||
+};
|
||
+
|
||
static const struct qmp_phy_init_tbl msm8996_pcie_serdes_tbl[] = {
|
||
QMP_PHY_INIT_CFG(QSERDES_COM_BIAS_EN_CLKBUFLR_EN, 0x1c),
|
||
QMP_PHY_INIT_CFG(QSERDES_COM_CLK_ENABLE1, 0x10),
|
||
@@ -584,6 +660,113 @@ static const struct qmp_phy_init_tbl msm
|
||
QMP_PHY_INIT_CFG(QSERDES_RX_SIGDET_DEGLITCH_CNTRL, 0x16),
|
||
};
|
||
|
||
+static const struct qmp_phy_init_tbl ipq6018_pcie_serdes_tbl[] = {
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_SSC_PER1, 0x7d),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_SSC_PER2, 0x01),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_SSC_STEP_SIZE1_MODE0, 0x0a),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_SSC_STEP_SIZE2_MODE0, 0x05),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_SSC_STEP_SIZE1_MODE1, 0x08),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_SSC_STEP_SIZE2_MODE1, 0x04),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_BIAS_EN_CLKBUFLR_EN, 0x18),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_CLK_ENABLE1, 0x90),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_SYS_CLK_CTRL, 0x02),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_SYSCLK_BUF_ENABLE, 0x07),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_PLL_IVCO, 0x0f),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_LOCK_CMP1_MODE0, 0xd4),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_LOCK_CMP2_MODE0, 0x14),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_LOCK_CMP1_MODE1, 0xaa),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_LOCK_CMP2_MODE1, 0x29),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_BG_TRIM, 0x0f),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_CP_CTRL_MODE0, 0x09),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_CP_CTRL_MODE1, 0x09),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_PLL_RCTRL_MODE0, 0x16),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_PLL_RCTRL_MODE1, 0x16),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_PLL_CCTRL_MODE0, 0x28),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_PLL_CCTRL_MODE1, 0x28),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_BIAS_EN_CTRL_BY_PSM, 0x01),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_SYSCLK_EN_SEL, 0x08),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_RESETSM_CNTRL, 0x20),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_LOCK_CMP_EN, 0x42),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_DEC_START_MODE0, 0x68),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_DEC_START_MODE1, 0x53),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_DIV_FRAC_START1_MODE0, 0xab),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_DIV_FRAC_START2_MODE0, 0xaa),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_DIV_FRAC_START3_MODE0, 0x02),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_DIV_FRAC_START1_MODE1, 0x55),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_DIV_FRAC_START2_MODE1, 0x55),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_DIV_FRAC_START3_MODE1, 0x05),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_INTEGLOOP_GAIN0_MODE0, 0xa0),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_INTEGLOOP_GAIN0_MODE1, 0xa0),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_VCO_TUNE1_MODE0, 0x24),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_VCO_TUNE2_MODE0, 0x02),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_VCO_TUNE1_MODE1, 0xb4),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_VCO_TUNE2_MODE1, 0x03),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_CLK_SELECT, 0x32),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_HSCLK_SEL, 0x01),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_CORE_CLK_EN, 0x00),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_CMN_CONFIG, 0x06),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_SVS_MODE_CLK_SEL, 0x05),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_PLL_CORECLK_DIV_MODE1, 0x08),
|
||
+};
|
||
+
|
||
+static const struct qmp_phy_init_tbl ipq6018_pcie_tx_tbl[] = {
|
||
+ QMP_PHY_INIT_CFG(QSERDES_TX0_RES_CODE_LANE_OFFSET_TX, 0x02),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_TX0_LANE_MODE_1, 0x06),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_TX0_RCV_DETECT_LVL_2, 0x12),
|
||
+};
|
||
+
|
||
+static const struct qmp_phy_init_tbl ipq6018_pcie_rx_tbl[] = {
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_UCDR_FO_GAIN, 0x0c),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_UCDR_SO_GAIN, 0x02),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_UCDR_SO_SATURATION_AND_ENABLE, 0x7f),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_UCDR_PI_CONTROLS, 0x70),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_EQU_ADAPTOR_CNTRL2, 0x61),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_EQU_ADAPTOR_CNTRL3, 0x04),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_EQU_ADAPTOR_CNTRL4, 0x1e),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_IDAC_TSETTLE_LOW, 0xc0),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_IDAC_TSETTLE_HIGH, 0x00),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_EQ_OFFSET_ADAPTOR_CNTRL1, 0x73),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_OFFSET_ADAPTOR_CNTRL2, 0x80),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_SIGDET_ENABLES, 0x1c),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_SIGDET_CNTRL, 0x03),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_SIGDET_DEGLITCH_CNTRL, 0x14),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_00_LOW, 0xf0),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_00_HIGH, 0x01),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_00_HIGH2, 0x2f),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_00_HIGH3, 0xd3),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_00_HIGH4, 0x40),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_01_LOW, 0x01),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_01_HIGH, 0x02),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_01_HIGH2, 0xc8),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_01_HIGH3, 0x09),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_01_HIGH4, 0xb1),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_10_LOW, 0x00),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_10_HIGH, 0x02),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_10_HIGH2, 0xc8),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_10_HIGH3, 0x09),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_RX_MODE_10_HIGH4, 0xb1),
|
||
+ QMP_PHY_INIT_CFG(QSERDES_RX0_DFE_EN_TIMER, 0x04),
|
||
+};
|
||
+
|
||
+static const struct qmp_phy_init_tbl ipq6018_pcie_pcs_tbl[] = {
|
||
+ QMP_PHY_INIT_CFG(PCS_COM_FLL_CNTRL1, 0x01),
|
||
+ QMP_PHY_INIT_CFG(PCS_COM_REFGEN_REQ_CONFIG1, 0x0d),
|
||
+ QMP_PHY_INIT_CFG(PCS_COM_G12S1_TXDEEMPH_M3P5DB, 0x10),
|
||
+ QMP_PHY_INIT_CFG(PCS_COM_RX_SIGDET_LVL, 0xaa),
|
||
+ QMP_PHY_INIT_CFG(PCS_COM_P2U3_WAKEUP_DLY_TIME_AUXCLK_L, 0x01),
|
||
+ QMP_PHY_INIT_CFG(PCS_COM_RX_DCC_CAL_CONFIG, 0x01),
|
||
+ QMP_PHY_INIT_CFG(PCS_COM_EQ_CONFIG5, 0x01),
|
||
+ QMP_PHY_INIT_CFG(PCS_PCIE_POWER_STATE_CONFIG2, 0x0d),
|
||
+ QMP_PHY_INIT_CFG(PCS_PCIE_POWER_STATE_CONFIG4, 0x07),
|
||
+ QMP_PHY_INIT_CFG(PCS_PCIE_ENDPOINT_REFCLK_DRIVE, 0xc1),
|
||
+ QMP_PHY_INIT_CFG(PCS_PCIE_L1P1_WAKEUP_DLY_TIME_AUXCLK_L, 0x01),
|
||
+ QMP_PHY_INIT_CFG(PCS_PCIE_L1P2_WAKEUP_DLY_TIME_AUXCLK_L, 0x01),
|
||
+ QMP_PHY_INIT_CFG(PCS_PCIE_OSC_DTCT_ACTIONS, 0x00),
|
||
+ QMP_PHY_INIT_CFG(PCS_PCIE_EQ_CONFIG1, 0x11),
|
||
+ QMP_PHY_INIT_CFG(PCS_PCIE_PRESET_P10_PRE, 0x00),
|
||
+ QMP_PHY_INIT_CFG(PCS_PCIE_PRESET_P10_POST, 0x58),
|
||
+};
|
||
+
|
||
static const struct qmp_phy_init_tbl msm8996_usb3_pcs_tbl[] = {
|
||
/* FLL settings */
|
||
QMP_PHY_INIT_CFG_L(QPHY_FLL_CNTRL2, 0x03),
|
||
@@ -2196,6 +2379,30 @@ static const struct qmp_phy_cfg ipq8074_
|
||
.pwrdn_ctrl = SW_PWRDN,
|
||
};
|
||
|
||
+static const struct qmp_phy_cfg ipq6018_usb3phy_cfg = {
|
||
+ .type = PHY_TYPE_USB3,
|
||
+ .nlanes = 1,
|
||
+
|
||
+ .serdes_tbl = ipq6018_usb3_serdes_tbl,
|
||
+ .serdes_tbl_num = ARRAY_SIZE(ipq6018_usb3_serdes_tbl),
|
||
+ .tx_tbl = msm8996_usb3_tx_tbl,
|
||
+ .tx_tbl_num = ARRAY_SIZE(msm8996_usb3_tx_tbl),
|
||
+ .rx_tbl = ipq6018_usb3_rx_tbl,
|
||
+ .rx_tbl_num = ARRAY_SIZE(ipq6018_usb3_rx_tbl),
|
||
+ .pcs_tbl = ipq6018_usb3_pcs_tbl,
|
||
+ .pcs_tbl_num = ARRAY_SIZE(ipq6018_usb3_pcs_tbl),
|
||
+ .clk_list = msm8996_phy_clk_l,
|
||
+ .num_clks = ARRAY_SIZE(msm8996_phy_clk_l),
|
||
+ .reset_list = msm8996_usb3phy_reset_l,
|
||
+ .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l),
|
||
+ .vreg_list = qmp_phy_vreg_l,
|
||
+ .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
|
||
+ .regs = usb3phy_regs_layout,
|
||
+
|
||
+ .start_ctrl = SERDES_START | PCS_START,
|
||
+ .pwrdn_ctrl = SW_PWRDN,
|
||
+};
|
||
+
|
||
static const struct qmp_phy_cfg msm8996_pciephy_cfg = {
|
||
.type = PHY_TYPE_PCIE,
|
||
.nlanes = 3,
|
||
@@ -2344,6 +2551,36 @@ static const struct qmp_phy_cfg ipq8074_
|
||
.pwrdn_delay_max = 1005, /* us */
|
||
};
|
||
|
||
+static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
|
||
+ .type = PHY_TYPE_PCIE,
|
||
+ .nlanes = 1,
|
||
+
|
||
+ .serdes_tbl = ipq6018_pcie_serdes_tbl,
|
||
+ .serdes_tbl_num = ARRAY_SIZE(ipq6018_pcie_serdes_tbl),
|
||
+ .tx_tbl = ipq6018_pcie_tx_tbl,
|
||
+ .tx_tbl_num = ARRAY_SIZE(ipq6018_pcie_tx_tbl),
|
||
+ .rx_tbl = ipq6018_pcie_rx_tbl,
|
||
+ .rx_tbl_num = ARRAY_SIZE(ipq6018_pcie_rx_tbl),
|
||
+ .pcs_tbl = ipq6018_pcie_pcs_tbl,
|
||
+ .pcs_tbl_num = ARRAY_SIZE(ipq6018_pcie_pcs_tbl),
|
||
+ .clk_list = ipq8074_pciephy_clk_l,
|
||
+ .num_clks = ARRAY_SIZE(ipq8074_pciephy_clk_l),
|
||
+ .reset_list = ipq8074_pciephy_reset_l,
|
||
+ .num_resets = ARRAY_SIZE(ipq8074_pciephy_reset_l),
|
||
+ .vreg_list = NULL,
|
||
+ .num_vregs = 0,
|
||
+ .regs = qmp_v4_usb3phy_regs_layout,
|
||
+
|
||
+ .start_ctrl = SERDES_START | PCS_START,
|
||
+ .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
|
||
+
|
||
+ .has_phy_com_ctrl = false,
|
||
+ .has_lane_rst = false,
|
||
+ .has_pwrdn_delay = true,
|
||
+ .pwrdn_delay_min = 995, /* us */
|
||
+ .pwrdn_delay_max = 1005, /* us */
|
||
+};
|
||
+
|
||
static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
|
||
.type = PHY_TYPE_PCIE,
|
||
.nlanes = 1,
|
||
@@ -4002,6 +4239,9 @@ int qcom_qmp_phy_create(struct device *d
|
||
|
||
static const struct of_device_id qcom_qmp_phy_of_match_table[] = {
|
||
{
|
||
+ .compatible = "qcom,ipq6018-qmp-usb3-phy",
|
||
+ .data = &ipq6018_usb3phy_cfg,
|
||
+ }, {
|
||
.compatible = "qcom,ipq8074-qmp-usb3-phy",
|
||
.data = &ipq8074_usb3phy_cfg,
|
||
}, {
|
||
--- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
|
||
+++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
|
||
@@ -22,6 +22,7 @@
|
||
|
||
#include <dt-bindings/phy/phy-qcom-qusb2.h>
|
||
|
||
+#define QUSB2PHY_PLL 0x0
|
||
#define QUSB2PHY_PLL_TEST 0x04
|
||
#define CLK_REF_SEL BIT(7)
|
||
|
||
@@ -224,6 +225,22 @@ static const struct qusb2_phy_init_tbl q
|
||
QUSB2_PHY_INIT_CFG(QUSB2PHY_CHG_CTRL2, 0x0),
|
||
};
|
||
|
||
+static const struct qusb2_phy_init_tbl ipq6018_init_tbl[] = {
|
||
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL, 0x14),
|
||
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0xF8),
|
||
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0xB3),
|
||
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE3, 0x83),
|
||
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE4, 0xC0),
|
||
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_TUNE, 0x30),
|
||
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL1, 0x79),
|
||
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL2, 0x21),
|
||
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE5, 0x00),
|
||
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00),
|
||
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TEST2, 0x14),
|
||
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_TEST, 0x80),
|
||
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_AUTOPGM_CTL1, 0x9F),
|
||
+};
|
||
+
|
||
struct qusb2_phy_cfg {
|
||
const struct qusb2_phy_init_tbl *tbl;
|
||
/* number of entries in the table */
|
||
@@ -258,6 +275,17 @@ static const struct qusb2_phy_cfg msm899
|
||
.autoresume_en = BIT(3),
|
||
};
|
||
|
||
+static const struct qusb2_phy_cfg ipq6018_phy_cfg = {
|
||
+ .tbl = ipq6018_init_tbl,
|
||
+ .tbl_num = ARRAY_SIZE(ipq6018_init_tbl),
|
||
+ .regs = msm8996_regs_layout,
|
||
+
|
||
+ .disable_ctrl = POWER_DOWN,
|
||
+ .mask_core_ready = PLL_LOCKED,
|
||
+ /* autoresume not used */
|
||
+ .autoresume_en = BIT(0),
|
||
+};
|
||
+
|
||
static const struct qusb2_phy_cfg msm8998_phy_cfg = {
|
||
.tbl = msm8998_init_tbl,
|
||
.tbl_num = ARRAY_SIZE(msm8998_init_tbl),
|
||
@@ -814,6 +842,9 @@ static const struct phy_ops qusb2_phy_ge
|
||
|
||
static const struct of_device_id qusb2_phy_of_match_table[] = {
|
||
{
|
||
+ .compatible = "qcom,ipq6018-qusb2-phy",
|
||
+ .data = &ipq6018_phy_cfg,
|
||
+ }, {
|
||
.compatible = "qcom,ipq8074-qusb2-phy",
|
||
.data = &msm8996_phy_cfg,
|
||
}, {
|
||
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
|
||
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
|
||
@@ -91,7 +91,7 @@
|
||
#define WCNSS_PAS_ID 6
|
||
|
||
enum {
|
||
- WCSS_IPQ8074,
|
||
+ WCSS_IPQ,
|
||
WCSS_QCS404,
|
||
};
|
||
|
||
@@ -902,7 +902,7 @@ static int q6v5_wcss_init_mmio(struct q6
|
||
if (!wcss->reg_base)
|
||
return -ENOMEM;
|
||
|
||
- if (wcss->version == WCSS_IPQ8074) {
|
||
+ if (wcss->version == WCSS_IPQ) {
|
||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rmb");
|
||
wcss->rmb_base = devm_ioremap_resource(&pdev->dev, res);
|
||
if (IS_ERR(wcss->rmb_base))
|
||
@@ -1188,6 +1188,21 @@ static const struct wcss_data wcss_ipq80
|
||
.need_auto_boot = false,
|
||
};
|
||
|
||
+static const struct wcss_data wcss_ipq6018_res_init = {
|
||
+ .init_clock = ipq8074_init_clock,
|
||
+ .q6_firmware_name = "IPQ6018/q6_fw.mdt",
|
||
+ .m3_firmware_name = "IPQ6018/m3_fw.mdt",
|
||
+ .crash_reason_smem = WCSS_CRASH_REASON,
|
||
+ .aon_reset_required = true,
|
||
+ .wcss_q6_reset_required = true,
|
||
+ .bcr_reset_required = false,
|
||
+ .ssr_name = "q6wcss",
|
||
+ .ops = &q6v5_wcss_ipq8074_ops,
|
||
+ .requires_force_stop = true,
|
||
+ .need_mem_protection = true,
|
||
+ .need_auto_boot = false,
|
||
+};
|
||
+
|
||
static const struct wcss_data wcss_qcs404_res_init = {
|
||
.init_clock = qcs404_init_clock,
|
||
.init_regulator = qcs404_init_regulator,
|
||
@@ -1207,6 +1222,7 @@ static const struct wcss_data wcss_qcs40
|
||
|
||
static const struct of_device_id q6v5_wcss_of_match[] = {
|
||
{ .compatible = "qcom,ipq8074-wcss-pil", .data = &wcss_ipq8074_res_init },
|
||
+ { .compatible = "qcom,ipq6018-wcss-pil", .data = &wcss_ipq6018_res_init },
|
||
{ .compatible = "qcom,qcs404-wcss-pil", .data = &wcss_qcs404_res_init },
|
||
{ },
|
||
};
|
||
--- a/drivers/usb/dwc3/dwc3-qcom.c
|
||
+++ b/drivers/usb/dwc3/dwc3-qcom.c
|
||
@@ -440,7 +440,7 @@ static int dwc3_qcom_get_irq(struct plat
|
||
struct dwc3_qcom *qcom = platform_get_drvdata(pdev);
|
||
struct platform_device *pdev_irq = qcom->urs_usb ? qcom->urs_usb : pdev;
|
||
struct device_node *np = pdev->dev.of_node;
|
||
- int ret;
|
||
+ int i, ret;
|
||
|
||
if (np)
|
||
ret = platform_get_irq_byname(pdev_irq, name);
|
||
@@ -852,18 +852,19 @@ static int dwc3_qcom_remove(struct platf
|
||
|
||
of_platform_depopulate(dev);
|
||
|
||
- for (i = qcom->num_clocks - 1; i >= 0; i--) {
|
||
- clk_disable_unprepare(qcom->clks[i]);
|
||
- clk_put(qcom->clks[i]);
|
||
- }
|
||
- qcom->num_clocks = 0;
|
||
-
|
||
dwc3_qcom_interconnect_exit(qcom);
|
||
reset_control_assert(qcom->resets);
|
||
|
||
pm_runtime_allow(dev);
|
||
pm_runtime_disable(dev);
|
||
|
||
+ for (i = qcom->num_clocks - 1; i >= 0; i--) {
|
||
+ if (!qcom->is_suspended)
|
||
+ clk_disable_unprepare(qcom->clks[i]);
|
||
+ clk_put(qcom->clks[i]);
|
||
+ }
|
||
+ qcom->num_clocks = 0;
|
||
+
|
||
return 0;
|
||
}
|
||
|
||
--- a/include/dt-bindings/clock/qcom,gcc-ipq6018.h
|
||
+++ b/include/dt-bindings/clock/qcom,gcc-ipq6018.h
|
||
@@ -1,6 +1,6 @@
|
||
/* SPDX-License-Identifier: GPL-2.0 */
|
||
/*
|
||
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||
+ * Copyright (c) 2018,2020 The Linux Foundation. All rights reserved.
|
||
*/
|
||
|
||
#ifndef _DT_BINDINGS_CLOCK_IPQ_GCC_6018_H
|
||
--- a/include/dt-bindings/reset/qcom,gcc-ipq6018.h
|
||
+++ b/include/dt-bindings/reset/qcom,gcc-ipq6018.h
|
||
@@ -1,6 +1,6 @@
|
||
/* SPDX-License-Identifier: GPL-2.0 */
|
||
/*
|
||
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||
+ * Copyright (c) 2018,2020 The Linux Foundation. All rights reserved.
|
||
*/
|
||
|
||
#ifndef _DT_BINDINGS_RESET_IPQ_GCC_6018_H
|
||
--- a/include/linux/memblock.h
|
||
+++ b/include/linux/memblock.h
|
||
@@ -67,6 +67,7 @@ struct memblock_type {
|
||
unsigned long cnt;
|
||
unsigned long max;
|
||
phys_addr_t total_size;
|
||
+ phys_addr_t start_base; /* start of the region */
|
||
struct memblock_region *regions;
|
||
char *name;
|
||
};
|
||
--- a/mm/memblock.c
|
||
+++ b/mm/memblock.c
|
||
@@ -1611,7 +1611,7 @@ phys_addr_t __init_memblock memblock_res
|
||
/* lowest address */
|
||
phys_addr_t __init_memblock memblock_start_of_DRAM(void)
|
||
{
|
||
- return memblock.memory.regions[0].base;
|
||
+ return memblock.memory.start_base;
|
||
}
|
||
|
||
phys_addr_t __init_memblock memblock_end_of_DRAM(void)
|
||
--- a/scripts/Makefile.lib
|
||
+++ b/scripts/Makefile.lib
|
||
@@ -216,6 +216,15 @@ dtc_cpp_flags = -Wp,-MMD,$(depfile).pre
|
||
$(addprefix -I,$(DTC_INCLUDE)) \
|
||
-undef -D__DTS__
|
||
|
||
+#Add DDR profiling for different DDR size in dtsi
|
||
+ifeq ($(CONFIG_IPQ_MEM_PROFILE),256)
|
||
+dtc_cpp_flags += -D __IPQ_MEM_PROFILE_256_MB__
|
||
+else ifeq ($(CONFIG_IPQ_FLASH_16M_PROFILE),y)
|
||
+dtc_cpp_flags += -D __IPQ_MEM_PROFILE_256_MB__
|
||
+else ifeq ($(CONFIG_IPQ_MEM_PROFILE),512)
|
||
+dtc_cpp_flags += -D __IPQ_MEM_PROFILE_512_MB__
|
||
+endif
|
||
+
|
||
# Useful for describing the dependency of composite objects
|
||
# Usage:
|
||
# $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_add)
|