interconnect changes for 6.6
This pull request contains the interconnect changes for the 6.6-rc1 merge window which is a mix of core and driver changes with the following highlights: Core changes: - New generic test client driver that allows issuing bandwidth requests between endpoints via debugfs. - Annotate all structs with flexible array members with the __counted_by attribute. - Introduce new icc_bw_lock for cases where we need to serialize bandwidth aggregation and update to decouple that from paths that require memory allocation. Driver changes: - Move the Qualcomm SMD RPM bus-clocks from CCF to interconnect framework where they actually belong. This brings power management improvements and reduces the overhead and layering. These changes are in immutable branch that is being pulled also into the qcom tree. - Fixes for QUP nodes on SM8250. - Enable sync_state and keepalive for QCM2290. - Enable sync_state for SM8450. - Improve enable_mask-based BCMs handling and fix some bugs. - Add compatible string for the OSM-L3 on SDM670. - Add compatible strings for SC7180, SM8250 and SM6350 bandwidth monitors. - Expand and retire the DEFINE_QNODE and DEFINE_QBCM macros, which have become ugly beasts with many different arguments. Signed-off-by: Georgi Djakov <djakov@kernel.org> -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJk5xuLAAoJEIDQzArG2BZjnN4QALIjeLAhT+sonUbdwoSRmE4M fsE99iZnNXq4+CYOR38NOcpa/ZKA+a6as4a8pqfYw7+8yaV/BqaDJTt1lOPTeGwz 38wdvy9R9H/KoJxad7SDFYDSkMpvMmcTQ33a4fyyyHdnNpgaEYqauncctnywD69U UywOR7YsA+T/0sugCqq1r1CgWK2S+JbUjxEgahnY840lCPMNRHrU+aJ9Uvw8fLcB iqNzEld/HB5lneqNDVWZWugxzX4bpsm2Ib0M1VZtNfh8bjZNaeIsMjAdDnmIKQQo qkRz3kHCrEzSKHsfX1X0umT4EpJ+UiltBGVWDTxodh9Pmw47D0UZGOipj6pwwulO /Jso/T0tJMSy4c05DMOegyothv6vpsillG5ZmzVpun8uiduBxp6KWkfEii+O6AXY EOaWQK/GYKJ9aKyGeOdZPq8aTxfmIOM85Bt/5LwZruUL1d5D4DTXvs5yJFBERDif sS2yK4GGtHLqllRttPC7pjYu6CWrCO5v3yvsezDdZfK/hd0QZMTr7DB4NcDi6ohl Au4HL84wa69MBh1sXm/hxbz3eGIh/XD8eRBheil+eAdkbx7+IoIHg1il49oPCmXH UKFBE2Gki1zFZ+0yGjJC031idaHDeNvGmoXd9+RkjHtCqMmkaofIOD3Pe3zIGrX4 mj6QCcrZe5flt4eqKyTG =MeG9 -----END PGP SIGNATURE----- Merge tag 'icc-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 6.6 This pull request contains the interconnect changes for the 6.6-rc1 merge window which is a mix of core and driver changes with the following highlights: Core changes: - New generic test client driver that allows issuing bandwidth requests between endpoints via debugfs. - Annotate all structs with flexible array members with the __counted_by attribute. - Introduce new icc_bw_lock for cases where we need to serialize bandwidth aggregation and update to decouple that from paths that require memory allocation. Driver changes: - Move the Qualcomm SMD RPM bus-clocks from CCF to interconnect framework where they actually belong. This brings power management improvements and reduces the overhead and layering. These changes are in immutable branch that is being pulled also into the qcom tree. - Fixes for QUP nodes on SM8250. - Enable sync_state and keepalive for QCM2290. - Enable sync_state for SM8450. - Improve enable_mask-based BCMs handling and fix some bugs. - Add compatible string for the OSM-L3 on SDM670. - Add compatible strings for SC7180, SM8250 and SM6350 bandwidth monitors. - Expand and retire the DEFINE_QNODE and DEFINE_QBCM macros, which have become ugly beasts with many different arguments. Signed-off-by: Georgi Djakov <djakov@kernel.org> * tag 'icc-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: (64 commits) interconnect: Add debugfs test client interconnect: Reintroduce icc_get() debugfs: Add write support to debugfs_create_str() interconnect: qcom: icc-rpmh: Retire DEFINE_QBCM interconnect: qcom: sm8350: Retire DEFINE_QBCM interconnect: qcom: sm8250: Retire DEFINE_QBCM interconnect: qcom: sm8150: Retire DEFINE_QBCM interconnect: qcom: sm6350: Retire DEFINE_QBCM interconnect: qcom: sdx65: Retire DEFINE_QBCM interconnect: qcom: sdx55: Retire DEFINE_QBCM interconnect: qcom: sdm845: Retire DEFINE_QBCM interconnect: qcom: sdm670: Retire DEFINE_QBCM interconnect: qcom: sc7180: Retire DEFINE_QBCM interconnect: qcom: icc-rpmh: Retire DEFINE_QNODE interconnect: qcom: sm8350: Retire DEFINE_QNODE interconnect: qcom: sm8250: Retire DEFINE_QNODE interconnect: qcom: sm8150: Retire DEFINE_QNODE interconnect: qcom: sm6350: Retire DEFINE_QNODE interconnect: qcom: sdx65: Retire DEFINE_QNODE interconnect: qcom: sdx55: Retire DEFINE_QNODE ...
This commit is contained in:
Коммит
704e2c6107
|
@ -25,14 +25,20 @@ properties:
|
|||
- const: qcom,msm8998-bwmon # BWMON v4
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,sc7180-cpu-bwmon
|
||||
- qcom,sc7280-cpu-bwmon
|
||||
- qcom,sc8280xp-cpu-bwmon
|
||||
- qcom,sdm845-cpu-bwmon
|
||||
- qcom,sm6350-llcc-bwmon
|
||||
- qcom,sm8250-cpu-bwmon
|
||||
- qcom,sm8550-cpu-bwmon
|
||||
- const: qcom,sdm845-bwmon # BWMON v4, unified register space
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,sc7180-llcc-bwmon
|
||||
- qcom,sc8280xp-llcc-bwmon
|
||||
- qcom,sm6350-cpu-bwmon
|
||||
- qcom,sm8250-llcc-bwmon
|
||||
- qcom,sm8550-llcc-bwmon
|
||||
- const: qcom,sc7280-llcc-bwmon
|
||||
- const: qcom,sc7280-llcc-bwmon # BWMON v5
|
||||
|
|
|
@ -21,6 +21,7 @@ properties:
|
|||
- enum:
|
||||
- qcom,sc7180-osm-l3
|
||||
- qcom,sc8180x-osm-l3
|
||||
- qcom,sdm670-osm-l3
|
||||
- qcom,sdm845-osm-l3
|
||||
- qcom,sm6350-osm-l3
|
||||
- qcom,sm8150-osm-l3
|
||||
|
|
|
@ -18,9 +18,6 @@ description: |
|
|||
least one RPMh device child node pertaining to their RSC and each provider
|
||||
can map to multiple RPMh resources.
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,rpmh-common.yaml#
|
||||
|
||||
properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
@ -91,6 +88,7 @@ properties:
|
|||
- qcom,sm8250-mc-virt
|
||||
- qcom,sm8250-mmss-noc
|
||||
- qcom,sm8250-npu-noc
|
||||
- qcom,sm8250-qup-virt
|
||||
- qcom,sm8250-system-noc
|
||||
- qcom,sm8350-aggre1-noc
|
||||
- qcom,sm8350-aggre2-noc
|
||||
|
@ -107,7 +105,19 @@ properties:
|
|||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,rpmh-common.yaml#
|
||||
- if:
|
||||
not:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,sm8250-qup-virt
|
||||
then:
|
||||
required:
|
||||
- reg
|
||||
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
|
|
|
@ -113,3 +113,28 @@ through dot to generate diagrams in many graphical formats::
|
|||
|
||||
$ cat /sys/kernel/debug/interconnect/interconnect_graph | \
|
||||
dot -Tsvg > interconnect_graph.svg
|
||||
|
||||
The ``test-client`` directory provides interfaces for issuing BW requests to
|
||||
any arbitrary path. Note that for safety reasons, this feature is disabled by
|
||||
default without a Kconfig to enable it. Enabling it requires code changes to
|
||||
``#define INTERCONNECT_ALLOW_WRITE_DEBUGFS``. Example usage::
|
||||
|
||||
cd /sys/kernel/debug/interconnect/test-client/
|
||||
|
||||
# Configure node endpoints for the path from CPU to DDR on
|
||||
# qcom/sm8550.
|
||||
echo chm_apps > src_node
|
||||
echo ebi > dst_node
|
||||
|
||||
# Get path between src_node and dst_node. This is only
|
||||
# necessary after updating the node endpoints.
|
||||
echo 1 > get
|
||||
|
||||
# Set desired BW to 1GBps avg and 2GBps peak.
|
||||
echo 1000000 > avg_bw
|
||||
echo 2000000 > peak_bw
|
||||
|
||||
# Vote for avg_bw and peak_bw on the latest path from "get".
|
||||
# Voting for multiple paths is possible by repeating this
|
||||
# process for different nodes endpoints.
|
||||
echo 1 > commit
|
||||
|
|
|
@ -18,13 +18,6 @@
|
|||
|
||||
#include <dt-bindings/clock/qcom,rpmcc.h>
|
||||
|
||||
#define QCOM_RPM_KEY_SOFTWARE_ENABLE 0x6e657773
|
||||
#define QCOM_RPM_KEY_PIN_CTRL_CLK_BUFFER_ENABLE_KEY 0x62636370
|
||||
#define QCOM_RPM_SMD_KEY_RATE 0x007a484b
|
||||
#define QCOM_RPM_SMD_KEY_ENABLE 0x62616e45
|
||||
#define QCOM_RPM_SMD_KEY_STATE 0x54415453
|
||||
#define QCOM_RPM_SCALING_ENABLE_ID 0x2
|
||||
|
||||
#define __DEFINE_CLK_SMD_RPM_PREFIX(_prefix, _name, _active, \
|
||||
type, r_id, key) \
|
||||
static struct clk_smd_rpm clk_smd_rpm_##_prefix##_active; \
|
||||
|
@ -171,21 +164,23 @@ struct clk_smd_rpm {
|
|||
unsigned long rate;
|
||||
};
|
||||
|
||||
struct clk_smd_rpm_req {
|
||||
__le32 key;
|
||||
__le32 nbytes;
|
||||
__le32 value;
|
||||
};
|
||||
|
||||
struct rpm_smd_clk_desc {
|
||||
struct clk_smd_rpm **clks;
|
||||
size_t num_clks;
|
||||
|
||||
/*
|
||||
* Interconnect clocks are managed by the icc framework, this driver
|
||||
* only kickstarts them so that they don't get gated between
|
||||
* clk_smd_rpm_enable_scaling() and interconnect driver initialization.
|
||||
*/
|
||||
const struct clk_smd_rpm ** const icc_clks;
|
||||
size_t num_icc_clks;
|
||||
bool scaling_before_handover;
|
||||
};
|
||||
|
||||
static DEFINE_MUTEX(rpm_smd_clk_lock);
|
||||
|
||||
static int clk_smd_rpm_handoff(struct clk_smd_rpm *r)
|
||||
static int clk_smd_rpm_handoff(const struct clk_smd_rpm *r)
|
||||
{
|
||||
int ret;
|
||||
struct clk_smd_rpm_req req = {
|
||||
|
@ -511,13 +506,69 @@ DEFINE_CLK_SMD_RPM_XO_BUFFER(div_clk1, 11, 19200000);
|
|||
DEFINE_CLK_SMD_RPM_XO_BUFFER(div_clk2, 12, 19200000);
|
||||
DEFINE_CLK_SMD_RPM_XO_BUFFER(div_clk3, 13, 19200000);
|
||||
|
||||
static const struct clk_smd_rpm *bimc_pcnoc_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *bimc_pcnoc_snoc_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *bimc_pcnoc_snoc_smmnoc_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
&clk_smd_rpm_bus_2_sysmmnoc_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *bimc_pcnoc_snoc_cnoc_ocmem_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
&clk_smd_rpm_bus_2_cnoc_clk,
|
||||
&clk_smd_rpm_ocmemgx_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *msm8996_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_branch_aggre1_noc_clk,
|
||||
&clk_smd_rpm_branch_aggre2_noc_clk,
|
||||
&clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
&clk_smd_rpm_bus_2_cnoc_clk,
|
||||
&clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *msm8998_icc_clks[] = {
|
||||
&clk_smd_rpm_aggre1_noc_clk,
|
||||
&clk_smd_rpm_aggre2_noc_clk,
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
&clk_smd_rpm_bus_2_cnoc_clk,
|
||||
&clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *sdm660_icc_clks[] = {
|
||||
&clk_smd_rpm_aggre2_noc_clk,
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
&clk_smd_rpm_bus_2_cnoc_clk,
|
||||
&clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *sm_qnoc_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_1_cnoc_clk,
|
||||
&clk_smd_rpm_mmnrt_clk,
|
||||
&clk_smd_rpm_mmrt_clk,
|
||||
&clk_smd_rpm_qup_clk,
|
||||
&clk_smd_rpm_bus_2_snoc_clk,
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8909_clks[] = {
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QPIC_CLK] = &clk_smd_rpm_qpic_clk,
|
||||
[RPM_SMD_QPIC_CLK_A] = &clk_smd_rpm_qpic_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
|
@ -543,15 +594,11 @@ static struct clk_smd_rpm *msm8909_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8909 = {
|
||||
.clks = msm8909_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8909_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8916_clks[] = {
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
@ -575,21 +622,15 @@ static struct clk_smd_rpm *msm8916_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8916 = {
|
||||
.clks = msm8916_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8916_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8917_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_BIMC_GPU_CLK] = &clk_smd_rpm_bimc_gpu_clk,
|
||||
[RPM_SMD_BIMC_GPU_A_CLK] = &clk_smd_rpm_bimc_gpu_a_clk,
|
||||
[RPM_SMD_SYSMMNOC_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_clk,
|
||||
[RPM_SMD_SYSMMNOC_A_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
@ -609,19 +650,13 @@ static struct clk_smd_rpm *msm8917_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8917 = {
|
||||
.clks = msm8917_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8917_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_smmnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8936_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_SYSMMNOC_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_clk,
|
||||
[RPM_SMD_SYSMMNOC_A_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
@ -645,25 +680,17 @@ static struct clk_smd_rpm *msm8936_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8936 = {
|
||||
.clks = msm8936_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8936_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_smmnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8974_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_MMSSNOC_AHB_CLK] = &clk_smd_rpm_bus_3_mmssnoc_ahb_clk,
|
||||
[RPM_SMD_MMSSNOC_AHB_A_CLK] = &clk_smd_rpm_bus_3_mmssnoc_ahb_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_GFX3D_CLK_SRC] = &clk_smd_rpm_gfx3d_clk_src,
|
||||
[RPM_SMD_GFX3D_A_CLK_SRC] = &clk_smd_rpm_gfx3d_a_clk_src,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_OCMEMGX_CLK] = &clk_smd_rpm_ocmemgx_clk,
|
||||
[RPM_SMD_OCMEMGX_A_CLK] = &clk_smd_rpm_ocmemgx_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_CXO_D0] = &clk_smd_rpm_cxo_d0,
|
||||
|
@ -697,20 +724,14 @@ static struct clk_smd_rpm *msm8974_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8974 = {
|
||||
.clks = msm8974_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8974_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_cnoc_ocmem_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_cnoc_ocmem_icc_clks),
|
||||
.scaling_before_handover = true,
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8976_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_SYSMMNOC_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_clk,
|
||||
[RPM_SMD_SYSMMNOC_A_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
@ -731,24 +752,15 @@ static struct clk_smd_rpm *msm8976_clks[] = {
|
|||
|
||||
static const struct rpm_smd_clk_desc rpm_clk_msm8976 = {
|
||||
.clks = msm8976_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8976_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_smmnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8992_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_OCMEMGX_CLK] = &clk_smd_rpm_ocmemgx_clk,
|
||||
[RPM_SMD_OCMEMGX_A_CLK] = &clk_smd_rpm_ocmemgx_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_GFX3D_CLK_SRC] = &clk_smd_rpm_gfx3d_clk_src,
|
||||
[RPM_SMD_GFX3D_A_CLK_SRC] = &clk_smd_rpm_gfx3d_a_clk_src,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
[RPM_SMD_BB_CLK1_A] = &clk_smd_rpm_bb_clk1_a,
|
||||
[RPM_SMD_BB_CLK1_PIN] = &clk_smd_rpm_bb_clk1_pin,
|
||||
|
@ -790,23 +802,15 @@ static struct clk_smd_rpm *msm8992_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8992 = {
|
||||
.clks = msm8992_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8992_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_cnoc_ocmem_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_cnoc_ocmem_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8994_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_OCMEMGX_CLK] = &clk_smd_rpm_ocmemgx_clk,
|
||||
[RPM_SMD_OCMEMGX_A_CLK] = &clk_smd_rpm_ocmemgx_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_GFX3D_CLK_SRC] = &clk_smd_rpm_gfx3d_clk_src,
|
||||
[RPM_SMD_GFX3D_A_CLK_SRC] = &clk_smd_rpm_gfx3d_a_clk_src,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
[RPM_SMD_BB_CLK1_A] = &clk_smd_rpm_bb_clk1_a,
|
||||
[RPM_SMD_BB_CLK1_PIN] = &clk_smd_rpm_bb_clk1_pin,
|
||||
|
@ -850,29 +854,17 @@ static struct clk_smd_rpm *msm8994_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8994 = {
|
||||
.clks = msm8994_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8994_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_cnoc_ocmem_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_cnoc_ocmem_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8996_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_MMAXI_CLK] = &clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
[RPM_SMD_MMAXI_A_CLK] = &clk_smd_rpm_mmssnoc_axi_rpm_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &clk_smd_rpm_ce1_clk,
|
||||
[RPM_SMD_CE1_A_CLK] = &clk_smd_rpm_ce1_a_clk,
|
||||
[RPM_SMD_AGGR1_NOC_CLK] = &clk_smd_rpm_branch_aggre1_noc_clk,
|
||||
[RPM_SMD_AGGR1_NOC_A_CLK] = &clk_smd_rpm_branch_aggre1_noc_a_clk,
|
||||
[RPM_SMD_AGGR2_NOC_CLK] = &clk_smd_rpm_branch_aggre2_noc_clk,
|
||||
[RPM_SMD_AGGR2_NOC_A_CLK] = &clk_smd_rpm_branch_aggre2_noc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
@ -904,6 +896,8 @@ static struct clk_smd_rpm *msm8996_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8996 = {
|
||||
.clks = msm8996_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8996_clks),
|
||||
.icc_clks = msm8996_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(msm8996_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *qcs404_clks[] = {
|
||||
|
@ -932,19 +926,15 @@ static struct clk_smd_rpm *qcs404_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_qcs404 = {
|
||||
.clks = qcs404_clks,
|
||||
.num_clks = ARRAY_SIZE(qcs404_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8998_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &clk_smd_rpm_ce1_clk,
|
||||
[RPM_SMD_CE1_A_CLK] = &clk_smd_rpm_ce1_a_clk,
|
||||
[RPM_SMD_DIV_CLK1] = &clk_smd_rpm_div_clk1,
|
||||
|
@ -967,12 +957,6 @@ static struct clk_smd_rpm *msm8998_clks[] = {
|
|||
[RPM_SMD_LN_BB_CLK2_A_PIN] = &clk_smd_rpm_ln_bb_clk2_a_pin,
|
||||
[RPM_SMD_LN_BB_CLK3_PIN] = &clk_smd_rpm_ln_bb_clk3_pin,
|
||||
[RPM_SMD_LN_BB_CLK3_A_PIN] = &clk_smd_rpm_ln_bb_clk3_a_pin,
|
||||
[RPM_SMD_MMAXI_CLK] = &clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
[RPM_SMD_MMAXI_A_CLK] = &clk_smd_rpm_mmssnoc_axi_rpm_a_clk,
|
||||
[RPM_SMD_AGGR1_NOC_CLK] = &clk_smd_rpm_aggre1_noc_clk,
|
||||
[RPM_SMD_AGGR1_NOC_A_CLK] = &clk_smd_rpm_aggre1_noc_a_clk,
|
||||
[RPM_SMD_AGGR2_NOC_CLK] = &clk_smd_rpm_aggre2_noc_clk,
|
||||
[RPM_SMD_AGGR2_NOC_A_CLK] = &clk_smd_rpm_aggre2_noc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_RF_CLK1] = &clk_smd_rpm_rf_clk1,
|
||||
|
@ -992,27 +976,19 @@ static struct clk_smd_rpm *msm8998_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8998 = {
|
||||
.clks = msm8998_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8998_clks),
|
||||
.icc_clks = msm8998_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(msm8998_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *sdm660_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_CNOC_PERIPH_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_CNOC_PERIPH_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_MMSSNOC_AXI_CLK] = &clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
[RPM_SMD_MMSSNOC_AXI_CLK_A] = &clk_smd_rpm_mmssnoc_axi_rpm_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &clk_smd_rpm_ce1_clk,
|
||||
[RPM_SMD_CE1_A_CLK] = &clk_smd_rpm_ce1_a_clk,
|
||||
[RPM_SMD_AGGR2_NOC_CLK] = &clk_smd_rpm_aggre2_noc_clk,
|
||||
[RPM_SMD_AGGR2_NOC_A_CLK] = &clk_smd_rpm_aggre2_noc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_RF_CLK1] = &clk_smd_rpm_rf_clk1,
|
||||
|
@ -1038,15 +1014,13 @@ static struct clk_smd_rpm *sdm660_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_sdm660 = {
|
||||
.clks = sdm660_clks,
|
||||
.num_clks = ARRAY_SIZE(sdm660_clks),
|
||||
.icc_clks = sdm660_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(sdm660_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *mdm9607_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QPIC_CLK] = &clk_smd_rpm_qpic_clk,
|
||||
[RPM_SMD_QPIC_CLK_A] = &clk_smd_rpm_qpic_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
|
@ -1060,21 +1034,15 @@ static struct clk_smd_rpm *mdm9607_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_mdm9607 = {
|
||||
.clks = mdm9607_clks,
|
||||
.num_clks = ARRAY_SIZE(mdm9607_clks),
|
||||
.icc_clks = bimc_pcnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8953_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_SYSMMNOC_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_clk,
|
||||
[RPM_SMD_SYSMMNOC_A_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
@ -1096,23 +1064,19 @@ static struct clk_smd_rpm *msm8953_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8953 = {
|
||||
.clks = msm8953_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8953_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_smmnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *sm6125_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_2_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_2_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_branch_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_branch_qdss_a_clk,
|
||||
[RPM_SMD_RF_CLK1] = &clk_smd_rpm_rf_clk1,
|
||||
[RPM_SMD_RF_CLK1_A] = &clk_smd_rpm_rf_clk1_a,
|
||||
[RPM_SMD_RF_CLK2] = &clk_smd_rpm_rf_clk2,
|
||||
[RPM_SMD_RF_CLK2_A] = &clk_smd_rpm_rf_clk2_a,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_1_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_1_cnoc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &clk_smd_rpm_ce1_clk,
|
||||
|
@ -1123,12 +1087,6 @@ static struct clk_smd_rpm *sm6125_clks[] = {
|
|||
[RPM_SMD_LN_BB_CLK2_A] = &clk_smd_rpm_ln_bb_clk2_a,
|
||||
[RPM_SMD_LN_BB_CLK3] = &clk_smd_rpm_ln_bb_clk3,
|
||||
[RPM_SMD_LN_BB_CLK3_A] = &clk_smd_rpm_ln_bb_clk3_a,
|
||||
[RPM_SMD_QUP_CLK] = &clk_smd_rpm_qup_clk,
|
||||
[RPM_SMD_QUP_A_CLK] = &clk_smd_rpm_qup_a_clk,
|
||||
[RPM_SMD_MMRT_CLK] = &clk_smd_rpm_mmrt_clk,
|
||||
[RPM_SMD_MMRT_A_CLK] = &clk_smd_rpm_mmrt_a_clk,
|
||||
[RPM_SMD_MMNRT_CLK] = &clk_smd_rpm_mmnrt_clk,
|
||||
[RPM_SMD_MMNRT_A_CLK] = &clk_smd_rpm_mmnrt_a_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_CLK] = &clk_smd_rpm_bus_0_snoc_periph_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_A_CLK] = &clk_smd_rpm_bus_0_snoc_periph_a_clk,
|
||||
[RPM_SMD_SNOC_LPASS_CLK] = &clk_smd_rpm_bus_5_snoc_lpass_clk,
|
||||
|
@ -1138,34 +1096,24 @@ static struct clk_smd_rpm *sm6125_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_sm6125 = {
|
||||
.clks = sm6125_clks,
|
||||
.num_clks = ARRAY_SIZE(sm6125_clks),
|
||||
.icc_clks = sm_qnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(sm_qnoc_icc_clks)
|
||||
};
|
||||
|
||||
/* SM6115 */
|
||||
static struct clk_smd_rpm *sm6115_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_2_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_2_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_branch_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_branch_qdss_a_clk,
|
||||
[RPM_SMD_RF_CLK1] = &clk_smd_rpm_rf_clk1,
|
||||
[RPM_SMD_RF_CLK1_A] = &clk_smd_rpm_rf_clk1_a,
|
||||
[RPM_SMD_RF_CLK2] = &clk_smd_rpm_rf_clk2,
|
||||
[RPM_SMD_RF_CLK2_A] = &clk_smd_rpm_rf_clk2_a,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_1_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_1_cnoc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &clk_smd_rpm_ce1_clk,
|
||||
[RPM_SMD_CE1_A_CLK] = &clk_smd_rpm_ce1_a_clk,
|
||||
[RPM_SMD_QUP_CLK] = &clk_smd_rpm_qup_clk,
|
||||
[RPM_SMD_QUP_A_CLK] = &clk_smd_rpm_qup_a_clk,
|
||||
[RPM_SMD_MMRT_CLK] = &clk_smd_rpm_mmrt_clk,
|
||||
[RPM_SMD_MMRT_A_CLK] = &clk_smd_rpm_mmrt_a_clk,
|
||||
[RPM_SMD_MMNRT_CLK] = &clk_smd_rpm_mmnrt_clk,
|
||||
[RPM_SMD_MMNRT_A_CLK] = &clk_smd_rpm_mmnrt_a_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_CLK] = &clk_smd_rpm_bus_0_snoc_periph_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_A_CLK] = &clk_smd_rpm_bus_0_snoc_periph_a_clk,
|
||||
[RPM_SMD_SNOC_LPASS_CLK] = &clk_smd_rpm_bus_5_snoc_lpass_clk,
|
||||
|
@ -1179,27 +1127,17 @@ static struct clk_smd_rpm *sm6115_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_sm6115 = {
|
||||
.clks = sm6115_clks,
|
||||
.num_clks = ARRAY_SIZE(sm6115_clks),
|
||||
.icc_clks = sm_qnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(sm_qnoc_icc_clks)
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *sm6375_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_2_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_2_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_branch_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_branch_qdss_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_1_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_1_cnoc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_QUP_CLK] = &clk_smd_rpm_qup_clk,
|
||||
[RPM_SMD_QUP_A_CLK] = &clk_smd_rpm_qup_a_clk,
|
||||
[RPM_SMD_MMRT_CLK] = &clk_smd_rpm_mmrt_clk,
|
||||
[RPM_SMD_MMRT_A_CLK] = &clk_smd_rpm_mmrt_a_clk,
|
||||
[RPM_SMD_MMNRT_CLK] = &clk_smd_rpm_mmnrt_clk,
|
||||
[RPM_SMD_MMNRT_A_CLK] = &clk_smd_rpm_mmnrt_a_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_CLK] = &clk_smd_rpm_bus_0_snoc_periph_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_A_CLK] = &clk_smd_rpm_bus_0_snoc_periph_a_clk,
|
||||
[RPM_SMD_SNOC_LPASS_CLK] = &clk_smd_rpm_bus_5_snoc_lpass_clk,
|
||||
|
@ -1216,31 +1154,21 @@ static struct clk_smd_rpm *sm6375_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_sm6375 = {
|
||||
.clks = sm6375_clks,
|
||||
.num_clks = ARRAY_SIZE(sm6375_clks),
|
||||
.icc_clks = sm_qnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(sm_qnoc_icc_clks)
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *qcm2290_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_2_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_2_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_branch_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_branch_qdss_a_clk,
|
||||
[RPM_SMD_LN_BB_CLK2] = &clk_smd_rpm_ln_bb_clk2,
|
||||
[RPM_SMD_LN_BB_CLK2_A] = &clk_smd_rpm_ln_bb_clk2_a,
|
||||
[RPM_SMD_RF_CLK3] = &clk_smd_rpm_38m4_rf_clk3,
|
||||
[RPM_SMD_RF_CLK3_A] = &clk_smd_rpm_38m4_rf_clk3_a,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_1_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_1_cnoc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_QUP_CLK] = &clk_smd_rpm_qup_clk,
|
||||
[RPM_SMD_QUP_A_CLK] = &clk_smd_rpm_qup_a_clk,
|
||||
[RPM_SMD_MMRT_CLK] = &clk_smd_rpm_mmrt_clk,
|
||||
[RPM_SMD_MMRT_A_CLK] = &clk_smd_rpm_mmrt_a_clk,
|
||||
[RPM_SMD_MMNRT_CLK] = &clk_smd_rpm_mmnrt_clk,
|
||||
[RPM_SMD_MMNRT_A_CLK] = &clk_smd_rpm_mmnrt_a_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_CLK] = &clk_smd_rpm_bus_0_snoc_periph_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_A_CLK] = &clk_smd_rpm_bus_0_snoc_periph_a_clk,
|
||||
[RPM_SMD_SNOC_LPASS_CLK] = &clk_smd_rpm_bus_5_snoc_lpass_clk,
|
||||
|
@ -1262,6 +1190,8 @@ static struct clk_smd_rpm *qcm2290_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_qcm2290 = {
|
||||
.clks = qcm2290_clks,
|
||||
.num_clks = ARRAY_SIZE(qcm2290_clks),
|
||||
.icc_clks = sm_qnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(sm_qnoc_icc_clks)
|
||||
};
|
||||
|
||||
static const struct of_device_id rpm_smd_clk_match_table[] = {
|
||||
|
@ -1302,12 +1232,20 @@ static struct clk_hw *qcom_smdrpm_clk_hw_get(struct of_phandle_args *clkspec,
|
|||
return desc->clks[idx] ? &desc->clks[idx]->hw : ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
||||
static void rpm_smd_unregister_icc(void *data)
|
||||
{
|
||||
struct platform_device *icc_pdev = data;
|
||||
|
||||
platform_device_unregister(icc_pdev);
|
||||
}
|
||||
|
||||
static int rpm_smd_clk_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
size_t num_clks, i;
|
||||
struct clk_smd_rpm **rpm_smd_clks;
|
||||
const struct rpm_smd_clk_desc *desc;
|
||||
struct platform_device *icc_pdev;
|
||||
|
||||
rpmcc_smd_rpm = dev_get_drvdata(pdev->dev.parent);
|
||||
if (!rpmcc_smd_rpm) {
|
||||
|
@ -1337,6 +1275,15 @@ static int rpm_smd_clk_probe(struct platform_device *pdev)
|
|||
goto err;
|
||||
}
|
||||
|
||||
for (i = 0; i < desc->num_icc_clks; i++) {
|
||||
if (!desc->icc_clks[i])
|
||||
continue;
|
||||
|
||||
ret = clk_smd_rpm_handoff(desc->icc_clks[i]);
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!desc->scaling_before_handover) {
|
||||
ret = clk_smd_rpm_enable_scaling();
|
||||
if (ret)
|
||||
|
@ -1357,6 +1304,19 @@ static int rpm_smd_clk_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
goto err;
|
||||
|
||||
icc_pdev = platform_device_register_data(pdev->dev.parent,
|
||||
"icc_smd_rpm", -1, NULL, 0);
|
||||
if (IS_ERR(icc_pdev)) {
|
||||
dev_err(&pdev->dev, "Failed to register icc_smd_rpm device: %pE\n",
|
||||
icc_pdev);
|
||||
/* No need to unregister clocks because of this */
|
||||
} else {
|
||||
ret = devm_add_action_or_reset(&pdev->dev, rpm_smd_unregister_icc,
|
||||
icc_pdev);
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
dev_err(&pdev->dev, "Error registering SMD clock driver (%d)\n", ret);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
CFLAGS_core.o := -I$(src)
|
||||
icc-core-objs := core.o bulk.o
|
||||
icc-core-objs := core.o bulk.o debugfs-client.o
|
||||
|
||||
obj-$(CONFIG_INTERCONNECT) += icc-core.o
|
||||
obj-$(CONFIG_INTERCONNECT_IMX) += imx/
|
||||
|
|
|
@ -28,6 +28,7 @@ static LIST_HEAD(icc_providers);
|
|||
static int providers_count;
|
||||
static bool synced_state;
|
||||
static DEFINE_MUTEX(icc_lock);
|
||||
static DEFINE_MUTEX(icc_bw_lock);
|
||||
static struct dentry *icc_debugfs_dir;
|
||||
|
||||
static void icc_summary_show_one(struct seq_file *s, struct icc_node *n)
|
||||
|
@ -147,6 +148,21 @@ static struct icc_node *node_find(const int id)
|
|||
return idr_find(&icc_idr, id);
|
||||
}
|
||||
|
||||
static struct icc_node *node_find_by_name(const char *name)
|
||||
{
|
||||
struct icc_provider *provider;
|
||||
struct icc_node *n;
|
||||
|
||||
list_for_each_entry(provider, &icc_providers, provider_list) {
|
||||
list_for_each_entry(n, &provider->nodes, node_list) {
|
||||
if (!strcmp(n->name, name))
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct icc_path *path_init(struct device *dev, struct icc_node *dst,
|
||||
ssize_t num_nodes)
|
||||
{
|
||||
|
@ -561,6 +577,54 @@ struct icc_path *of_icc_get(struct device *dev, const char *name)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(of_icc_get);
|
||||
|
||||
/**
|
||||
* icc_get() - get a path handle between two endpoints
|
||||
* @dev: device pointer for the consumer device
|
||||
* @src: source node name
|
||||
* @dst: destination node name
|
||||
*
|
||||
* This function will search for a path between two endpoints and return an
|
||||
* icc_path handle on success. Use icc_put() to release constraints when they
|
||||
* are not needed anymore.
|
||||
*
|
||||
* Return: icc_path pointer on success or ERR_PTR() on error. NULL is returned
|
||||
* when the API is disabled.
|
||||
*/
|
||||
struct icc_path *icc_get(struct device *dev, const char *src, const char *dst)
|
||||
{
|
||||
struct icc_node *src_node, *dst_node;
|
||||
struct icc_path *path = ERR_PTR(-EPROBE_DEFER);
|
||||
|
||||
mutex_lock(&icc_lock);
|
||||
|
||||
src_node = node_find_by_name(src);
|
||||
if (!src_node) {
|
||||
dev_err(dev, "%s: invalid src=%s\n", __func__, src);
|
||||
goto out;
|
||||
}
|
||||
|
||||
dst_node = node_find_by_name(dst);
|
||||
if (!dst_node) {
|
||||
dev_err(dev, "%s: invalid dst=%s\n", __func__, dst);
|
||||
goto out;
|
||||
}
|
||||
|
||||
path = path_find(dev, src_node, dst_node);
|
||||
if (IS_ERR(path)) {
|
||||
dev_err(dev, "%s: invalid path=%ld\n", __func__, PTR_ERR(path));
|
||||
goto out;
|
||||
}
|
||||
|
||||
path->name = kasprintf(GFP_KERNEL, "%s-%s", src_node->name, dst_node->name);
|
||||
if (!path->name) {
|
||||
kfree(path);
|
||||
path = ERR_PTR(-ENOMEM);
|
||||
}
|
||||
out:
|
||||
mutex_unlock(&icc_lock);
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* icc_set_tag() - set an optional tag on a path
|
||||
* @path: the path we want to tag
|
||||
|
@ -631,7 +695,7 @@ int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw)
|
|||
if (WARN_ON(IS_ERR(path) || !path->num_nodes))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&icc_lock);
|
||||
mutex_lock(&icc_bw_lock);
|
||||
|
||||
old_avg = path->reqs[0].avg_bw;
|
||||
old_peak = path->reqs[0].peak_bw;
|
||||
|
@ -663,7 +727,7 @@ int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw)
|
|||
apply_constraints(path);
|
||||
}
|
||||
|
||||
mutex_unlock(&icc_lock);
|
||||
mutex_unlock(&icc_bw_lock);
|
||||
|
||||
trace_icc_set_bw_end(path, ret);
|
||||
|
||||
|
@ -872,6 +936,7 @@ void icc_node_add(struct icc_node *node, struct icc_provider *provider)
|
|||
return;
|
||||
|
||||
mutex_lock(&icc_lock);
|
||||
mutex_lock(&icc_bw_lock);
|
||||
|
||||
node->provider = provider;
|
||||
list_add_tail(&node->node_list, &provider->nodes);
|
||||
|
@ -900,6 +965,7 @@ void icc_node_add(struct icc_node *node, struct icc_provider *provider)
|
|||
node->avg_bw = 0;
|
||||
node->peak_bw = 0;
|
||||
|
||||
mutex_unlock(&icc_bw_lock);
|
||||
mutex_unlock(&icc_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(icc_node_add);
|
||||
|
@ -1025,6 +1091,7 @@ void icc_sync_state(struct device *dev)
|
|||
return;
|
||||
|
||||
mutex_lock(&icc_lock);
|
||||
mutex_lock(&icc_bw_lock);
|
||||
synced_state = true;
|
||||
list_for_each_entry(p, &icc_providers, provider_list) {
|
||||
dev_dbg(p->dev, "interconnect provider is in synced state\n");
|
||||
|
@ -1037,13 +1104,21 @@ void icc_sync_state(struct device *dev)
|
|||
}
|
||||
}
|
||||
}
|
||||
mutex_unlock(&icc_bw_lock);
|
||||
mutex_unlock(&icc_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(icc_sync_state);
|
||||
|
||||
static int __init icc_init(void)
|
||||
{
|
||||
struct device_node *root = of_find_node_by_path("/");
|
||||
struct device_node *root;
|
||||
|
||||
/* Teach lockdep about lock ordering wrt. shrinker: */
|
||||
fs_reclaim_acquire(GFP_KERNEL);
|
||||
might_lock(&icc_bw_lock);
|
||||
fs_reclaim_release(GFP_KERNEL);
|
||||
|
||||
root = of_find_node_by_path("/");
|
||||
|
||||
providers_count = of_count_icc_providers(root);
|
||||
of_node_put(root);
|
||||
|
@ -1053,6 +1128,9 @@ static int __init icc_init(void)
|
|||
icc_debugfs_dir, NULL, &icc_summary_fops);
|
||||
debugfs_create_file("interconnect_graph", 0444,
|
||||
icc_debugfs_dir, NULL, &icc_graph_fops);
|
||||
|
||||
icc_debugfs_client_init(icc_debugfs_dir);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,168 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
/*
|
||||
* This can be dangerous, therefore don't provide any real compile time
|
||||
* configuration option for this feature.
|
||||
* People who want to use this will need to modify the source code directly.
|
||||
*/
|
||||
#undef INTERCONNECT_ALLOW_WRITE_DEBUGFS
|
||||
|
||||
#if defined(INTERCONNECT_ALLOW_WRITE_DEBUGFS) && defined(CONFIG_DEBUG_FS)
|
||||
|
||||
static LIST_HEAD(debugfs_paths);
|
||||
static DEFINE_MUTEX(debugfs_lock);
|
||||
|
||||
static struct platform_device *pdev;
|
||||
static struct icc_path *cur_path;
|
||||
|
||||
static char *src_node;
|
||||
static char *dst_node;
|
||||
static u32 avg_bw;
|
||||
static u32 peak_bw;
|
||||
static u32 tag;
|
||||
|
||||
struct debugfs_path {
|
||||
const char *src;
|
||||
const char *dst;
|
||||
struct icc_path *path;
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
static struct icc_path *get_path(const char *src, const char *dst)
|
||||
{
|
||||
struct debugfs_path *path;
|
||||
|
||||
list_for_each_entry(path, &debugfs_paths, list) {
|
||||
if (!strcmp(path->src, src) && !strcmp(path->dst, dst))
|
||||
return path->path;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int icc_get_set(void *data, u64 val)
|
||||
{
|
||||
struct debugfs_path *debugfs_path;
|
||||
char *src, *dst;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&debugfs_lock);
|
||||
|
||||
rcu_read_lock();
|
||||
src = rcu_dereference(src_node);
|
||||
dst = rcu_dereference(dst_node);
|
||||
|
||||
/*
|
||||
* If we've already looked up a path, then use the existing one instead
|
||||
* of calling icc_get() again. This allows for updating previous BW
|
||||
* votes when "get" is written to multiple times for multiple paths.
|
||||
*/
|
||||
cur_path = get_path(src, dst);
|
||||
if (cur_path) {
|
||||
rcu_read_unlock();
|
||||
goto out;
|
||||
}
|
||||
|
||||
src = kstrdup(src, GFP_ATOMIC);
|
||||
dst = kstrdup(dst, GFP_ATOMIC);
|
||||
rcu_read_unlock();
|
||||
|
||||
if (!src || !dst) {
|
||||
ret = -ENOMEM;
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
cur_path = icc_get(&pdev->dev, src, dst);
|
||||
if (IS_ERR(cur_path)) {
|
||||
ret = PTR_ERR(cur_path);
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
debugfs_path = kzalloc(sizeof(*debugfs_path), GFP_KERNEL);
|
||||
if (!debugfs_path) {
|
||||
ret = -ENOMEM;
|
||||
goto err_put;
|
||||
}
|
||||
|
||||
debugfs_path->path = cur_path;
|
||||
debugfs_path->src = src;
|
||||
debugfs_path->dst = dst;
|
||||
list_add_tail(&debugfs_path->list, &debugfs_paths);
|
||||
|
||||
goto out;
|
||||
|
||||
err_put:
|
||||
icc_put(cur_path);
|
||||
err_free:
|
||||
kfree(src);
|
||||
kfree(dst);
|
||||
out:
|
||||
mutex_unlock(&debugfs_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
DEFINE_DEBUGFS_ATTRIBUTE(icc_get_fops, NULL, icc_get_set, "%llu\n");
|
||||
|
||||
static int icc_commit_set(void *data, u64 val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
mutex_lock(&debugfs_lock);
|
||||
|
||||
if (IS_ERR_OR_NULL(cur_path)) {
|
||||
ret = PTR_ERR(cur_path);
|
||||
goto out;
|
||||
}
|
||||
|
||||
icc_set_tag(cur_path, tag);
|
||||
ret = icc_set_bw(cur_path, avg_bw, peak_bw);
|
||||
out:
|
||||
mutex_unlock(&debugfs_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
DEFINE_DEBUGFS_ATTRIBUTE(icc_commit_fops, NULL, icc_commit_set, "%llu\n");
|
||||
|
||||
int icc_debugfs_client_init(struct dentry *icc_dir)
|
||||
{
|
||||
struct dentry *client_dir;
|
||||
int ret;
|
||||
|
||||
pdev = platform_device_alloc("icc-debugfs-client", PLATFORM_DEVID_NONE);
|
||||
|
||||
ret = platform_device_add(pdev);
|
||||
if (ret) {
|
||||
pr_err("%s: failed to add platform device: %d\n", __func__, ret);
|
||||
platform_device_put(pdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
client_dir = debugfs_create_dir("test_client", icc_dir);
|
||||
|
||||
debugfs_create_str("src_node", 0600, client_dir, &src_node);
|
||||
debugfs_create_str("dst_node", 0600, client_dir, &dst_node);
|
||||
debugfs_create_file("get", 0200, client_dir, NULL, &icc_get_fops);
|
||||
debugfs_create_u32("avg_bw", 0600, client_dir, &avg_bw);
|
||||
debugfs_create_u32("peak_bw", 0600, client_dir, &peak_bw);
|
||||
debugfs_create_u32("tag", 0600, client_dir, &tag);
|
||||
debugfs_create_file("commit", 0200, client_dir, NULL, &icc_commit_fops);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int icc_debugfs_client_init(struct dentry *icc_dir)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -16,7 +16,7 @@ struct icc_clk_node {
|
|||
struct icc_clk_provider {
|
||||
struct icc_provider provider;
|
||||
int num_clocks;
|
||||
struct icc_clk_node clocks[];
|
||||
struct icc_clk_node clocks[] __counted_by(num_clocks);
|
||||
};
|
||||
|
||||
#define to_icc_clk_provider(_provider) \
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <dt-bindings/interconnect/fsl,imx8mp.h>
|
||||
|
||||
|
|
|
@ -38,7 +38,10 @@ struct icc_req {
|
|||
struct icc_path {
|
||||
const char *name;
|
||||
size_t num_nodes;
|
||||
struct icc_req reqs[];
|
||||
struct icc_req reqs[] __counted_by(num_nodes);
|
||||
};
|
||||
|
||||
struct icc_path *icc_get(struct device *dev, const char *src, const char *dst);
|
||||
int icc_debugfs_client_init(struct dentry *icc_dir);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,7 @@ qnoc-sm8250-objs := sm8250.o
|
|||
qnoc-sm8350-objs := sm8350.o
|
||||
qnoc-sm8450-objs := sm8450.o
|
||||
qnoc-sm8550-objs := sm8550.o
|
||||
icc-smd-rpm-objs := smd-rpm.o icc-rpm.o
|
||||
icc-smd-rpm-objs := smd-rpm.o icc-rpm.o icc-rpm-clocks.o
|
||||
|
||||
obj-$(CONFIG_INTERCONNECT_QCOM_BCM_VOTER) += icc-bcm-voter.o
|
||||
obj-$(CONFIG_INTERCONNECT_QCOM_MSM8916) += qnoc-msm8916.o
|
||||
|
|
|
@ -58,6 +58,36 @@ static u64 bcm_div(u64 num, u32 base)
|
|||
return num;
|
||||
}
|
||||
|
||||
/* BCMs with enable_mask use one-hot-encoding for on/off signaling */
|
||||
static void bcm_aggregate_mask(struct qcom_icc_bcm *bcm)
|
||||
{
|
||||
struct qcom_icc_node *node;
|
||||
int bucket, i;
|
||||
|
||||
for (bucket = 0; bucket < QCOM_ICC_NUM_BUCKETS; bucket++) {
|
||||
bcm->vote_x[bucket] = 0;
|
||||
bcm->vote_y[bucket] = 0;
|
||||
|
||||
for (i = 0; i < bcm->num_nodes; i++) {
|
||||
node = bcm->nodes[i];
|
||||
|
||||
/* If any vote in this bucket exists, keep the BCM enabled */
|
||||
if (node->sum_avg[bucket] || node->max_peak[bucket]) {
|
||||
bcm->vote_x[bucket] = 0;
|
||||
bcm->vote_y[bucket] = bcm->enable_mask;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bcm->keepalive) {
|
||||
bcm->vote_x[QCOM_ICC_BUCKET_AMC] = bcm->enable_mask;
|
||||
bcm->vote_x[QCOM_ICC_BUCKET_WAKE] = bcm->enable_mask;
|
||||
bcm->vote_y[QCOM_ICC_BUCKET_AMC] = bcm->enable_mask;
|
||||
bcm->vote_y[QCOM_ICC_BUCKET_WAKE] = bcm->enable_mask;
|
||||
}
|
||||
}
|
||||
|
||||
static void bcm_aggregate(struct qcom_icc_bcm *bcm)
|
||||
{
|
||||
struct qcom_icc_node *node;
|
||||
|
@ -83,11 +113,6 @@ static void bcm_aggregate(struct qcom_icc_bcm *bcm)
|
|||
|
||||
temp = agg_peak[bucket] * bcm->vote_scale;
|
||||
bcm->vote_y[bucket] = bcm_div(temp, bcm->aux_data.unit);
|
||||
|
||||
if (bcm->enable_mask && (bcm->vote_x[bucket] || bcm->vote_y[bucket])) {
|
||||
bcm->vote_x[bucket] = 0;
|
||||
bcm->vote_y[bucket] = bcm->enable_mask;
|
||||
}
|
||||
}
|
||||
|
||||
if (bcm->keepalive && bcm->vote_x[QCOM_ICC_BUCKET_AMC] == 0 &&
|
||||
|
@ -260,8 +285,12 @@ int qcom_icc_bcm_voter_commit(struct bcm_voter *voter)
|
|||
return 0;
|
||||
|
||||
mutex_lock(&voter->lock);
|
||||
list_for_each_entry(bcm, &voter->commit_list, list)
|
||||
bcm_aggregate(bcm);
|
||||
list_for_each_entry(bcm, &voter->commit_list, list) {
|
||||
if (bcm->enable_mask)
|
||||
bcm_aggregate_mask(bcm);
|
||||
else
|
||||
bcm_aggregate(bcm);
|
||||
}
|
||||
|
||||
/*
|
||||
* Pre sort the BCMs based on VCD for ease of generating a command list
|
||||
|
|
|
@ -12,14 +12,6 @@
|
|||
|
||||
#include "icc-rpmh.h"
|
||||
|
||||
#define DEFINE_QBCM(_name, _bcmname, _keepalive, ...) \
|
||||
static struct qcom_icc_bcm _name = { \
|
||||
.name = _bcmname, \
|
||||
.keepalive = _keepalive, \
|
||||
.num_nodes = ARRAY_SIZE(((struct qcom_icc_node *[]){ __VA_ARGS__ })), \
|
||||
.nodes = { __VA_ARGS__ }, \
|
||||
}
|
||||
|
||||
struct bcm_voter *of_bcm_voter_get(struct device *dev, const char *name);
|
||||
void qcom_icc_bcm_voter_add(struct bcm_voter *voter, struct qcom_icc_bcm *bcm);
|
||||
int qcom_icc_bcm_voter_commit(struct bcm_voter *voter);
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2023 Linaro Ltd
|
||||
*/
|
||||
|
||||
#include <linux/soc/qcom/smd-rpm.h>
|
||||
|
||||
#include "icc-rpm.h"
|
||||
|
||||
const struct rpm_clk_resource aggre1_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_AGGR_CLK,
|
||||
.clock_id = 1,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(aggre1_clk);
|
||||
|
||||
const struct rpm_clk_resource aggre2_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_AGGR_CLK,
|
||||
.clock_id = 2,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(aggre2_clk);
|
||||
|
||||
const struct rpm_clk_resource bimc_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_MEM_CLK,
|
||||
.clock_id = 0,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bimc_clk);
|
||||
|
||||
const struct rpm_clk_resource bus_0_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_BUS_CLK,
|
||||
.clock_id = 0,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bus_0_clk);
|
||||
|
||||
const struct rpm_clk_resource bus_1_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_BUS_CLK,
|
||||
.clock_id = 1,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bus_1_clk);
|
||||
|
||||
const struct rpm_clk_resource bus_2_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_BUS_CLK,
|
||||
.clock_id = 2,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bus_2_clk);
|
||||
|
||||
const struct rpm_clk_resource mmaxi_0_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_MMAXI_CLK,
|
||||
.clock_id = 0,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(mmaxi_0_clk);
|
||||
|
||||
const struct rpm_clk_resource mmaxi_1_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_MMAXI_CLK,
|
||||
.clock_id = 1,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(mmaxi_1_clk);
|
||||
|
||||
const struct rpm_clk_resource qup_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_QUP_CLK,
|
||||
.clock_id = 0,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(qup_clk);
|
||||
|
||||
/* Branch clocks */
|
||||
const struct rpm_clk_resource aggre1_branch_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_AGGR_CLK,
|
||||
.clock_id = 1,
|
||||
.branch = true,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(aggre1_branch_clk);
|
||||
|
||||
const struct rpm_clk_resource aggre2_branch_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_AGGR_CLK,
|
||||
.clock_id = 2,
|
||||
.branch = true,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(aggre2_branch_clk);
|
|
@ -3,18 +3,16 @@
|
|||
* Copyright (C) 2020 Linaro Ltd
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-common.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
|
@ -50,6 +48,8 @@
|
|||
#define NOC_QOS_MODE_FIXED_VAL 0x0
|
||||
#define NOC_QOS_MODE_BYPASS_VAL 0x2
|
||||
|
||||
#define ICC_BUS_CLK_MIN_RATE 19200ULL /* kHz */
|
||||
|
||||
static int qcom_icc_set_qnoc_qos(struct icc_node *src)
|
||||
{
|
||||
struct icc_provider *provider = src->provider;
|
||||
|
@ -204,38 +204,43 @@ static int qcom_icc_qos_set(struct icc_node *node)
|
|||
}
|
||||
}
|
||||
|
||||
static int qcom_icc_rpm_set(struct qcom_icc_node *qn, u64 sum_bw)
|
||||
static int qcom_icc_rpm_set(struct qcom_icc_node *qn, u64 *bw)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret, rpm_ctx = 0;
|
||||
u64 bw_bps;
|
||||
|
||||
if (qn->qos.ap_owned)
|
||||
return 0;
|
||||
|
||||
if (qn->mas_rpm_id != -1) {
|
||||
ret = qcom_icc_rpm_smd_send(QCOM_SMD_RPM_ACTIVE_STATE,
|
||||
RPM_BUS_MASTER_REQ,
|
||||
qn->mas_rpm_id,
|
||||
sum_bw);
|
||||
if (ret) {
|
||||
pr_err("qcom_icc_rpm_smd_send mas %d error %d\n",
|
||||
qn->mas_rpm_id, ret);
|
||||
return ret;
|
||||
for (rpm_ctx = 0; rpm_ctx < QCOM_SMD_RPM_STATE_NUM; rpm_ctx++) {
|
||||
bw_bps = icc_units_to_bps(bw[rpm_ctx]);
|
||||
|
||||
if (qn->mas_rpm_id != -1) {
|
||||
ret = qcom_icc_rpm_smd_send(rpm_ctx,
|
||||
RPM_BUS_MASTER_REQ,
|
||||
qn->mas_rpm_id,
|
||||
bw_bps);
|
||||
if (ret) {
|
||||
pr_err("qcom_icc_rpm_smd_send mas %d error %d\n",
|
||||
qn->mas_rpm_id, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (qn->slv_rpm_id != -1) {
|
||||
ret = qcom_icc_rpm_smd_send(rpm_ctx,
|
||||
RPM_BUS_SLAVE_REQ,
|
||||
qn->slv_rpm_id,
|
||||
bw_bps);
|
||||
if (ret) {
|
||||
pr_err("qcom_icc_rpm_smd_send slv %d error %d\n",
|
||||
qn->slv_rpm_id, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (qn->slv_rpm_id != -1) {
|
||||
ret = qcom_icc_rpm_smd_send(QCOM_SMD_RPM_ACTIVE_STATE,
|
||||
RPM_BUS_SLAVE_REQ,
|
||||
qn->slv_rpm_id,
|
||||
sum_bw);
|
||||
if (ret) {
|
||||
pr_err("qcom_icc_rpm_smd_send slv %d error %d\n",
|
||||
qn->slv_rpm_id, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -248,7 +253,7 @@ static void qcom_icc_pre_bw_aggregate(struct icc_node *node)
|
|||
size_t i;
|
||||
|
||||
qn = node->data;
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
|
||||
for (i = 0; i < QCOM_SMD_RPM_STATE_NUM; i++) {
|
||||
qn->sum_avg[i] = 0;
|
||||
qn->max_peak[i] = 0;
|
||||
}
|
||||
|
@ -272,9 +277,9 @@ static int qcom_icc_bw_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
|||
qn = node->data;
|
||||
|
||||
if (!tag)
|
||||
tag = QCOM_ICC_TAG_ALWAYS;
|
||||
tag = RPM_ALWAYS_TAG;
|
||||
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
|
||||
for (i = 0; i < QCOM_SMD_RPM_STATE_NUM; i++) {
|
||||
if (tag & BIT(i)) {
|
||||
qn->sum_avg[i] += avg_bw;
|
||||
qn->max_peak[i] = max_t(u32, qn->max_peak[i], peak_bw);
|
||||
|
@ -287,61 +292,45 @@ static int qcom_icc_bw_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
|||
}
|
||||
|
||||
/**
|
||||
* qcom_icc_bus_aggregate - aggregate bandwidth by traversing all nodes
|
||||
* qcom_icc_bus_aggregate - calculate bus clock rates by traversing all nodes
|
||||
* @provider: generic interconnect provider
|
||||
* @agg_avg: an array for aggregated average bandwidth of buckets
|
||||
* @agg_peak: an array for aggregated peak bandwidth of buckets
|
||||
* @max_agg_avg: pointer to max value of aggregated average bandwidth
|
||||
* @agg_clk_rate: array containing the aggregated clock rates in kHz
|
||||
*/
|
||||
static void qcom_icc_bus_aggregate(struct icc_provider *provider,
|
||||
u64 *agg_avg, u64 *agg_peak,
|
||||
u64 *max_agg_avg)
|
||||
static void qcom_icc_bus_aggregate(struct icc_provider *provider, u64 *agg_clk_rate)
|
||||
{
|
||||
struct icc_node *node;
|
||||
u64 agg_avg_rate, agg_rate;
|
||||
struct qcom_icc_node *qn;
|
||||
u64 sum_avg[QCOM_ICC_NUM_BUCKETS];
|
||||
struct icc_node *node;
|
||||
int i;
|
||||
|
||||
/* Initialise aggregate values */
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
|
||||
agg_avg[i] = 0;
|
||||
agg_peak[i] = 0;
|
||||
}
|
||||
|
||||
*max_agg_avg = 0;
|
||||
|
||||
/*
|
||||
* Iterate nodes on the interconnect and aggregate bandwidth
|
||||
* requests for every bucket.
|
||||
* Iterate nodes on the provider, aggregate bandwidth requests for
|
||||
* every bucket and convert them into bus clock rates.
|
||||
*/
|
||||
list_for_each_entry(node, &provider->nodes, node_list) {
|
||||
qn = node->data;
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
|
||||
for (i = 0; i < QCOM_SMD_RPM_STATE_NUM; i++) {
|
||||
if (qn->channels)
|
||||
sum_avg[i] = div_u64(qn->sum_avg[i], qn->channels);
|
||||
agg_avg_rate = div_u64(qn->sum_avg[i], qn->channels);
|
||||
else
|
||||
sum_avg[i] = qn->sum_avg[i];
|
||||
agg_avg[i] += sum_avg[i];
|
||||
agg_peak[i] = max_t(u64, agg_peak[i], qn->max_peak[i]);
|
||||
agg_avg_rate = qn->sum_avg[i];
|
||||
|
||||
agg_rate = max_t(u64, agg_avg_rate, qn->max_peak[i]);
|
||||
do_div(agg_rate, qn->buswidth);
|
||||
|
||||
agg_clk_rate[i] = max_t(u64, agg_clk_rate[i], agg_rate);
|
||||
}
|
||||
}
|
||||
|
||||
/* Find maximum values across all buckets */
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++)
|
||||
*max_agg_avg = max_t(u64, *max_agg_avg, agg_avg[i]);
|
||||
}
|
||||
|
||||
static int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
|
||||
{
|
||||
struct qcom_icc_provider *qp;
|
||||
struct qcom_icc_node *src_qn = NULL, *dst_qn = NULL;
|
||||
u64 agg_clk_rate[QCOM_SMD_RPM_STATE_NUM] = { 0 };
|
||||
struct icc_provider *provider;
|
||||
u64 sum_bw;
|
||||
u64 rate;
|
||||
u64 agg_avg[QCOM_ICC_NUM_BUCKETS], agg_peak[QCOM_ICC_NUM_BUCKETS];
|
||||
u64 max_agg_avg;
|
||||
int ret, i;
|
||||
int bucket;
|
||||
struct qcom_icc_provider *qp;
|
||||
u64 active_rate, sleep_rate;
|
||||
int ret;
|
||||
|
||||
src_qn = src->data;
|
||||
if (dst)
|
||||
|
@ -349,56 +338,66 @@ static int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
|
|||
provider = src->provider;
|
||||
qp = to_qcom_provider(provider);
|
||||
|
||||
qcom_icc_bus_aggregate(provider, agg_avg, agg_peak, &max_agg_avg);
|
||||
qcom_icc_bus_aggregate(provider, agg_clk_rate);
|
||||
active_rate = agg_clk_rate[QCOM_SMD_RPM_ACTIVE_STATE];
|
||||
sleep_rate = agg_clk_rate[QCOM_SMD_RPM_SLEEP_STATE];
|
||||
|
||||
sum_bw = icc_units_to_bps(max_agg_avg);
|
||||
|
||||
ret = qcom_icc_rpm_set(src_qn, sum_bw);
|
||||
ret = qcom_icc_rpm_set(src_qn, src_qn->sum_avg);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (dst_qn) {
|
||||
ret = qcom_icc_rpm_set(dst_qn, sum_bw);
|
||||
ret = qcom_icc_rpm_set(dst_qn, dst_qn->sum_avg);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (i = 0; i < qp->num_bus_clks; i++) {
|
||||
/*
|
||||
* Use WAKE bucket for active clock, otherwise, use SLEEP bucket
|
||||
* for other clocks. If a platform doesn't set interconnect
|
||||
* path tags, by default use sleep bucket for all clocks.
|
||||
*
|
||||
* Note, AMC bucket is not supported yet.
|
||||
*/
|
||||
if (!strcmp(qp->bus_clks[i].id, "bus_a"))
|
||||
bucket = QCOM_ICC_BUCKET_WAKE;
|
||||
else
|
||||
bucket = QCOM_ICC_BUCKET_SLEEP;
|
||||
/* Some providers don't have a bus clock to scale */
|
||||
if (!qp->bus_clk_desc && !qp->bus_clk)
|
||||
return 0;
|
||||
|
||||
rate = icc_units_to_bps(max(agg_avg[bucket], agg_peak[bucket]));
|
||||
do_div(rate, src_qn->buswidth);
|
||||
rate = min_t(u64, rate, LONG_MAX);
|
||||
/*
|
||||
* Downstream checks whether the requested rate is zero, but it makes little sense
|
||||
* to vote for a value that's below the lower threshold, so let's not do so.
|
||||
*/
|
||||
if (qp->keep_alive)
|
||||
active_rate = max(ICC_BUS_CLK_MIN_RATE, active_rate);
|
||||
|
||||
if (qp->bus_clk_rate[i] == rate)
|
||||
continue;
|
||||
/* Some providers have a non-RPM-owned bus clock - convert kHz->Hz for the CCF */
|
||||
if (qp->bus_clk) {
|
||||
active_rate = max_t(u64, active_rate, sleep_rate);
|
||||
/* ARM32 caps clk_set_rate arg to u32.. Nothing we can do about that! */
|
||||
active_rate = min_t(u64, 1000ULL * active_rate, ULONG_MAX);
|
||||
return clk_set_rate(qp->bus_clk, active_rate);
|
||||
}
|
||||
|
||||
ret = clk_set_rate(qp->bus_clks[i].clk, rate);
|
||||
if (ret) {
|
||||
pr_err("%s clk_set_rate error: %d\n",
|
||||
qp->bus_clks[i].id, ret);
|
||||
/* RPM only accepts <=INT_MAX rates */
|
||||
active_rate = min_t(u64, active_rate, INT_MAX);
|
||||
sleep_rate = min_t(u64, sleep_rate, INT_MAX);
|
||||
|
||||
if (active_rate != qp->bus_clk_rate[QCOM_SMD_RPM_ACTIVE_STATE]) {
|
||||
ret = qcom_icc_rpm_set_bus_rate(qp->bus_clk_desc, QCOM_SMD_RPM_ACTIVE_STATE,
|
||||
active_rate);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
qp->bus_clk_rate[i] = rate;
|
||||
|
||||
/* Cache the rate after we've successfully commited it to RPM */
|
||||
qp->bus_clk_rate[QCOM_SMD_RPM_ACTIVE_STATE] = active_rate;
|
||||
}
|
||||
|
||||
if (sleep_rate != qp->bus_clk_rate[QCOM_SMD_RPM_SLEEP_STATE]) {
|
||||
ret = qcom_icc_rpm_set_bus_rate(qp->bus_clk_desc, QCOM_SMD_RPM_SLEEP_STATE,
|
||||
sleep_rate);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Cache the rate after we've successfully commited it to RPM */
|
||||
qp->bus_clk_rate[QCOM_SMD_RPM_SLEEP_STATE] = sleep_rate;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char * const bus_clocks[] = {
|
||||
"bus", "bus_a",
|
||||
};
|
||||
|
||||
int qnoc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
|
@ -440,6 +439,20 @@ int qnoc_probe(struct platform_device *pdev)
|
|||
if (!qp->intf_clks)
|
||||
return -ENOMEM;
|
||||
|
||||
if (desc->bus_clk_desc) {
|
||||
qp->bus_clk_desc = devm_kzalloc(dev, sizeof(*qp->bus_clk_desc),
|
||||
GFP_KERNEL);
|
||||
if (!qp->bus_clk_desc)
|
||||
return -ENOMEM;
|
||||
|
||||
qp->bus_clk_desc = desc->bus_clk_desc;
|
||||
} else {
|
||||
/* Some older SoCs may have a single non-RPM-owned bus clock. */
|
||||
qp->bus_clk = devm_clk_get_optional(dev, "bus");
|
||||
if (IS_ERR(qp->bus_clk))
|
||||
return PTR_ERR(qp->bus_clk);
|
||||
}
|
||||
|
||||
data = devm_kzalloc(dev, struct_size(data, nodes, num_nodes),
|
||||
GFP_KERNEL);
|
||||
if (!data)
|
||||
|
@ -449,10 +462,7 @@ int qnoc_probe(struct platform_device *pdev)
|
|||
for (i = 0; i < cd_num; i++)
|
||||
qp->intf_clks[i].id = cds[i];
|
||||
|
||||
qp->num_bus_clks = desc->no_clk_scaling ? 0 : NUM_BUS_CLKS;
|
||||
for (i = 0; i < qp->num_bus_clks; i++)
|
||||
qp->bus_clks[i].id = bus_clocks[i];
|
||||
|
||||
qp->keep_alive = desc->keep_alive;
|
||||
qp->type = desc->type;
|
||||
qp->qos_offset = desc->qos_offset;
|
||||
|
||||
|
@ -481,11 +491,7 @@ int qnoc_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
regmap_done:
|
||||
ret = devm_clk_bulk_get(dev, qp->num_bus_clks, qp->bus_clks);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = clk_bulk_prepare_enable(qp->num_bus_clks, qp->bus_clks);
|
||||
ret = clk_prepare_enable(qp->bus_clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -557,7 +563,7 @@ err_deregister_provider:
|
|||
icc_provider_deregister(provider);
|
||||
err_remove_nodes:
|
||||
icc_nodes_remove(provider);
|
||||
clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks);
|
||||
clk_disable_unprepare(qp->bus_clk);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -569,7 +575,7 @@ int qnoc_remove(struct platform_device *pdev)
|
|||
|
||||
icc_provider_deregister(&qp->provider);
|
||||
icc_nodes_remove(&qp->provider);
|
||||
clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks);
|
||||
clk_disable_unprepare(qp->bus_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
#ifndef __DRIVERS_INTERCONNECT_QCOM_ICC_RPM_H
|
||||
#define __DRIVERS_INTERCONNECT_QCOM_ICC_RPM_H
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,icc.h>
|
||||
#include <linux/soc/qcom/smd-rpm.h>
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,rpm-icc.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#define RPM_BUS_MASTER_REQ 0x73616d62
|
||||
#define RPM_BUS_SLAVE_REQ 0x766c7362
|
||||
|
@ -20,31 +25,43 @@ enum qcom_icc_type {
|
|||
QCOM_ICC_QNOC,
|
||||
};
|
||||
|
||||
#define NUM_BUS_CLKS 2
|
||||
/**
|
||||
* struct rpm_clk_resource - RPM bus clock resource
|
||||
* @resource_type: RPM resource type of the clock resource
|
||||
* @clock_id: index of the clock resource of a specific resource type
|
||||
* @branch: whether the resource represents a branch clock
|
||||
*/
|
||||
struct rpm_clk_resource {
|
||||
u32 resource_type;
|
||||
u32 clock_id;
|
||||
bool branch;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct qcom_icc_provider - Qualcomm specific interconnect provider
|
||||
* @provider: generic interconnect provider
|
||||
* @num_bus_clks: the total number of bus_clks clk_bulk_data entries (0 or 2)
|
||||
* @num_intf_clks: the total number of intf_clks clk_bulk_data entries
|
||||
* @type: the ICC provider type
|
||||
* @regmap: regmap for QoS registers read/write access
|
||||
* @qos_offset: offset to QoS registers
|
||||
* @bus_clk_rate: bus clock rate in Hz
|
||||
* @bus_clks: the clk_bulk_data table of bus clocks
|
||||
* @bus_clk_desc: a pointer to a rpm_clk_resource description of bus clocks
|
||||
* @bus_clk: a pointer to a HLOS-owned bus clock
|
||||
* @intf_clks: a clk_bulk_data array of interface clocks
|
||||
* @keep_alive: whether to always keep a minimum vote on the bus clocks
|
||||
* @is_on: whether the bus is powered on
|
||||
*/
|
||||
struct qcom_icc_provider {
|
||||
struct icc_provider provider;
|
||||
int num_bus_clks;
|
||||
int num_intf_clks;
|
||||
enum qcom_icc_type type;
|
||||
struct regmap *regmap;
|
||||
unsigned int qos_offset;
|
||||
u64 bus_clk_rate[NUM_BUS_CLKS];
|
||||
struct clk_bulk_data bus_clks[NUM_BUS_CLKS];
|
||||
u32 bus_clk_rate[QCOM_SMD_RPM_STATE_NUM];
|
||||
const struct rpm_clk_resource *bus_clk_desc;
|
||||
struct clk *bus_clk;
|
||||
struct clk_bulk_data *intf_clks;
|
||||
bool keep_alive;
|
||||
bool is_on;
|
||||
};
|
||||
|
||||
|
@ -89,8 +106,8 @@ struct qcom_icc_node {
|
|||
u16 num_links;
|
||||
u16 channels;
|
||||
u16 buswidth;
|
||||
u64 sum_avg[QCOM_ICC_NUM_BUCKETS];
|
||||
u64 max_peak[QCOM_ICC_NUM_BUCKETS];
|
||||
u64 sum_avg[QCOM_SMD_RPM_STATE_NUM];
|
||||
u64 max_peak[QCOM_SMD_RPM_STATE_NUM];
|
||||
int mas_rpm_id;
|
||||
int slv_rpm_id;
|
||||
struct qcom_icc_qos qos;
|
||||
|
@ -99,10 +116,10 @@ struct qcom_icc_node {
|
|||
struct qcom_icc_desc {
|
||||
struct qcom_icc_node * const *nodes;
|
||||
size_t num_nodes;
|
||||
const char * const *bus_clocks;
|
||||
const struct rpm_clk_resource *bus_clk_desc;
|
||||
const char * const *intf_clocks;
|
||||
size_t num_intf_clocks;
|
||||
bool no_clk_scaling;
|
||||
bool keep_alive;
|
||||
enum qcom_icc_type type;
|
||||
const struct regmap_config *regmap_cfg;
|
||||
unsigned int qos_offset;
|
||||
|
@ -115,7 +132,24 @@ enum qos_mode {
|
|||
NOC_QOS_MODE_BYPASS,
|
||||
};
|
||||
|
||||
extern const struct rpm_clk_resource aggre1_clk;
|
||||
extern const struct rpm_clk_resource aggre2_clk;
|
||||
extern const struct rpm_clk_resource bimc_clk;
|
||||
extern const struct rpm_clk_resource bus_0_clk;
|
||||
extern const struct rpm_clk_resource bus_1_clk;
|
||||
extern const struct rpm_clk_resource bus_2_clk;
|
||||
extern const struct rpm_clk_resource mmaxi_0_clk;
|
||||
extern const struct rpm_clk_resource mmaxi_1_clk;
|
||||
extern const struct rpm_clk_resource qup_clk;
|
||||
|
||||
extern const struct rpm_clk_resource aggre1_branch_clk;
|
||||
extern const struct rpm_clk_resource aggre2_branch_clk;
|
||||
|
||||
int qnoc_probe(struct platform_device *pdev);
|
||||
int qnoc_remove(struct platform_device *pdev);
|
||||
|
||||
bool qcom_icc_rpm_smd_available(void);
|
||||
int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u32 val);
|
||||
int qcom_icc_rpm_set_bus_rate(const struct rpm_clk_resource *clk, int ctx, u32 rate);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "bcm-voter.h"
|
||||
|
@ -185,6 +185,7 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev)
|
|||
data = devm_kzalloc(dev, struct_size(data, nodes, num_nodes), GFP_KERNEL);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
data->num_nodes = num_nodes;
|
||||
|
||||
provider = &qp->provider;
|
||||
provider->dev = dev;
|
||||
|
@ -228,8 +229,6 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev)
|
|||
data->nodes[i] = node;
|
||||
}
|
||||
|
||||
data->num_nodes = num_nodes;
|
||||
|
||||
ret = icc_provider_register(provider);
|
||||
if (ret)
|
||||
goto err_remove_nodes;
|
||||
|
|
|
@ -120,16 +120,6 @@ struct qcom_icc_desc {
|
|||
size_t num_bcms;
|
||||
};
|
||||
|
||||
#define DEFINE_QNODE(_name, _id, _channels, _buswidth, ...) \
|
||||
static struct qcom_icc_node _name = { \
|
||||
.id = _id, \
|
||||
.name = #_name, \
|
||||
.channels = _channels, \
|
||||
.buswidth = _buswidth, \
|
||||
.num_links = ARRAY_SIZE(((int[]){ __VA_ARGS__ })), \
|
||||
.links = { __VA_ARGS__ }, \
|
||||
}
|
||||
|
||||
int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
||||
u32 peak_bw, u32 *agg_avg, u32 *agg_peak);
|
||||
int qcom_icc_set(struct icc_node *src, struct icc_node *dst);
|
||||
|
|
|
@ -4,18 +4,16 @@
|
|||
* Author: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/of_device.h>
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,msm8916.h>
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
enum {
|
||||
|
@ -1232,6 +1230,7 @@ static const struct qcom_icc_desc msm8916_snoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = msm8916_snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8916_snoc_nodes),
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.regmap_cfg = &msm8916_snoc_regmap_config,
|
||||
.qos_offset = 0x7000,
|
||||
};
|
||||
|
@ -1260,6 +1259,7 @@ static const struct qcom_icc_desc msm8916_bimc = {
|
|||
.type = QCOM_ICC_BIMC,
|
||||
.nodes = msm8916_bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8916_bimc_nodes),
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.regmap_cfg = &msm8916_bimc_regmap_config,
|
||||
.qos_offset = 0x8000,
|
||||
};
|
||||
|
@ -1329,6 +1329,7 @@ static const struct qcom_icc_desc msm8916_pcnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = msm8916_pcnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8916_pcnoc_nodes),
|
||||
.bus_clk_desc = &bus_0_clk,
|
||||
.regmap_cfg = &msm8916_pcnoc_regmap_config,
|
||||
.qos_offset = 0x7000,
|
||||
};
|
||||
|
|
|
@ -5,18 +5,16 @@
|
|||
* With reference of msm8916 interconnect driver of Georgi Djakov.
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/of_device.h>
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,msm8939.h>
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
enum {
|
||||
|
@ -1285,6 +1283,7 @@ static const struct qcom_icc_desc msm8939_snoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = msm8939_snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8939_snoc_nodes),
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.regmap_cfg = &msm8939_snoc_regmap_config,
|
||||
.qos_offset = 0x7000,
|
||||
};
|
||||
|
@ -1305,6 +1304,7 @@ static const struct qcom_icc_desc msm8939_snoc_mm = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = msm8939_snoc_mm_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8939_snoc_mm_nodes),
|
||||
.bus_clk_desc = &bus_2_clk,
|
||||
.regmap_cfg = &msm8939_snoc_regmap_config,
|
||||
.qos_offset = 0x7000,
|
||||
};
|
||||
|
@ -1333,6 +1333,7 @@ static const struct qcom_icc_desc msm8939_bimc = {
|
|||
.type = QCOM_ICC_BIMC,
|
||||
.nodes = msm8939_bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8939_bimc_nodes),
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.regmap_cfg = &msm8939_bimc_regmap_config,
|
||||
.qos_offset = 0x8000,
|
||||
};
|
||||
|
@ -1404,6 +1405,7 @@ static const struct qcom_icc_desc msm8939_pcnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = msm8939_pcnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8939_pcnoc_nodes),
|
||||
.bus_clk_desc = &bus_0_clk,
|
||||
.regmap_cfg = &msm8939_pcnoc_regmap_config,
|
||||
.qos_offset = 0x7000,
|
||||
};
|
||||
|
|
|
@ -33,12 +33,11 @@
|
|||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
enum {
|
||||
MSM8974_BIMC_MAS_AMPSS_M0 = 1,
|
||||
|
@ -676,6 +675,7 @@ static int msm8974_icc_probe(struct platform_device *pdev)
|
|||
GFP_KERNEL);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
data->num_nodes = num_nodes;
|
||||
|
||||
qp->bus_clks = devm_kmemdup(dev, msm8974_icc_bus_clocks,
|
||||
sizeof(msm8974_icc_bus_clocks), GFP_KERNEL);
|
||||
|
@ -722,7 +722,6 @@ static int msm8974_icc_probe(struct platform_device *pdev)
|
|||
|
||||
data->nodes[i] = node;
|
||||
}
|
||||
data->num_nodes = num_nodes;
|
||||
|
||||
ret = icc_provider_register(provider);
|
||||
if (ret)
|
||||
|
|
|
@ -5,20 +5,17 @@
|
|||
* Copyright (c) 2021 Yassine Oudjana <y.oudjana@protonmail.com>
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,msm8996.h>
|
||||
|
||||
#include "icc-rpm.h"
|
||||
#include "smd-rpm.h"
|
||||
#include "msm8996.h"
|
||||
|
||||
static const char * const mm_intf_clocks[] = {
|
||||
|
@ -1819,7 +1816,6 @@ static const struct qcom_icc_desc msm8996_a0noc = {
|
|||
.num_nodes = ARRAY_SIZE(a0noc_nodes),
|
||||
.intf_clocks = a0noc_intf_clocks,
|
||||
.num_intf_clocks = ARRAY_SIZE(a0noc_intf_clocks),
|
||||
.no_clk_scaling = true,
|
||||
.regmap_cfg = &msm8996_a0noc_regmap_config
|
||||
};
|
||||
|
||||
|
@ -1841,6 +1837,7 @@ static const struct qcom_icc_desc msm8996_a1noc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = a1noc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(a1noc_nodes),
|
||||
.bus_clk_desc = &aggre1_branch_clk,
|
||||
.regmap_cfg = &msm8996_a1noc_regmap_config
|
||||
};
|
||||
|
||||
|
@ -1862,6 +1859,7 @@ static const struct qcom_icc_desc msm8996_a2noc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = a2noc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(a2noc_nodes),
|
||||
.bus_clk_desc = &aggre2_branch_clk,
|
||||
.intf_clocks = a2noc_intf_clocks,
|
||||
.num_intf_clocks = ARRAY_SIZE(a2noc_intf_clocks),
|
||||
.regmap_cfg = &msm8996_a2noc_regmap_config
|
||||
|
@ -1890,6 +1888,7 @@ static const struct qcom_icc_desc msm8996_bimc = {
|
|||
.type = QCOM_ICC_BIMC,
|
||||
.nodes = bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(bimc_nodes),
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.regmap_cfg = &msm8996_bimc_regmap_config
|
||||
};
|
||||
|
||||
|
@ -1948,6 +1947,7 @@ static const struct qcom_icc_desc msm8996_cnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = cnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(cnoc_nodes),
|
||||
.bus_clk_desc = &bus_2_clk,
|
||||
.regmap_cfg = &msm8996_cnoc_regmap_config
|
||||
};
|
||||
|
||||
|
@ -2001,6 +2001,7 @@ static const struct qcom_icc_desc msm8996_mnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = mnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(mnoc_nodes),
|
||||
.bus_clk_desc = &mmaxi_0_clk,
|
||||
.intf_clocks = mm_intf_clocks,
|
||||
.num_intf_clocks = ARRAY_SIZE(mm_intf_clocks),
|
||||
.regmap_cfg = &msm8996_mnoc_regmap_config
|
||||
|
@ -2039,6 +2040,7 @@ static const struct qcom_icc_desc msm8996_pnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = pnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(pnoc_nodes),
|
||||
.bus_clk_desc = &bus_0_clk,
|
||||
.regmap_cfg = &msm8996_pnoc_regmap_config
|
||||
};
|
||||
|
||||
|
@ -2083,6 +2085,7 @@ static const struct qcom_icc_desc msm8996_snoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(snoc_nodes),
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.regmap_cfg = &msm8996_snoc_regmap_config
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,osm-l3.h>
|
||||
|
@ -232,6 +232,7 @@ static int qcom_osm_l3_probe(struct platform_device *pdev)
|
|||
data = devm_kzalloc(&pdev->dev, struct_size(data, nodes, num_nodes), GFP_KERNEL);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
data->num_nodes = num_nodes;
|
||||
|
||||
provider = &qp->provider;
|
||||
provider->dev = &pdev->dev;
|
||||
|
@ -261,7 +262,6 @@ static int qcom_osm_l3_probe(struct platform_device *pdev)
|
|||
|
||||
data->nodes[i] = node;
|
||||
}
|
||||
data->num_nodes = num_nodes;
|
||||
|
||||
ret = icc_provider_register(provider);
|
||||
if (ret)
|
||||
|
|
|
@ -7,19 +7,16 @@
|
|||
*/
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,qcm2290.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "icc-rpm.h"
|
||||
#include "smd-rpm.h"
|
||||
|
||||
enum {
|
||||
QCM2290_MASTER_APPSS_PROC = 1,
|
||||
|
@ -1197,7 +1194,9 @@ static const struct qcom_icc_desc qcm2290_bimc = {
|
|||
.type = QCOM_ICC_BIMC,
|
||||
.nodes = qcm2290_bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_bimc_nodes),
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.regmap_cfg = &qcm2290_bimc_regmap_config,
|
||||
.keep_alive = true,
|
||||
/* M_REG_BASE() in vendor msm_bus_bimc_adhoc driver */
|
||||
.qos_offset = 0x8000,
|
||||
};
|
||||
|
@ -1252,7 +1251,9 @@ static const struct qcom_icc_desc qcm2290_cnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = qcm2290_cnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_cnoc_nodes),
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.regmap_cfg = &qcm2290_cnoc_regmap_config,
|
||||
.keep_alive = true,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node * const qcm2290_snoc_nodes[] = {
|
||||
|
@ -1293,7 +1294,9 @@ static const struct qcom_icc_desc qcm2290_snoc = {
|
|||
.type = QCOM_ICC_QNOC,
|
||||
.nodes = qcm2290_snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_snoc_nodes),
|
||||
.bus_clk_desc = &bus_2_clk,
|
||||
.regmap_cfg = &qcm2290_snoc_regmap_config,
|
||||
.keep_alive = true,
|
||||
/* Vendor DT node fab-sys_noc property 'qcom,base-offset' */
|
||||
.qos_offset = 0x15000,
|
||||
};
|
||||
|
@ -1307,6 +1310,8 @@ static const struct qcom_icc_desc qcm2290_qup_virt = {
|
|||
.type = QCOM_ICC_QNOC,
|
||||
.nodes = qcm2290_qup_virt_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_qup_virt_nodes),
|
||||
.bus_clk_desc = &qup_clk,
|
||||
.keep_alive = true,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node * const qcm2290_mmnrt_virt_nodes[] = {
|
||||
|
@ -1320,7 +1325,9 @@ static const struct qcom_icc_desc qcm2290_mmnrt_virt = {
|
|||
.type = QCOM_ICC_QNOC,
|
||||
.nodes = qcm2290_mmnrt_virt_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_mmnrt_virt_nodes),
|
||||
.bus_clk_desc = &mmaxi_0_clk,
|
||||
.regmap_cfg = &qcm2290_snoc_regmap_config,
|
||||
.keep_alive = true,
|
||||
.qos_offset = 0x15000,
|
||||
};
|
||||
|
||||
|
@ -1334,7 +1341,9 @@ static const struct qcom_icc_desc qcm2290_mmrt_virt = {
|
|||
.type = QCOM_ICC_QNOC,
|
||||
.nodes = qcm2290_mmrt_virt_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_mmrt_virt_nodes),
|
||||
.bus_clk_desc = &mmaxi_1_clk,
|
||||
.regmap_cfg = &qcm2290_snoc_regmap_config,
|
||||
.keep_alive = true,
|
||||
.qos_offset = 0x15000,
|
||||
};
|
||||
|
||||
|
@ -1355,6 +1364,7 @@ static struct platform_driver qcm2290_noc_driver = {
|
|||
.driver = {
|
||||
.name = "qnoc-qcm2290",
|
||||
.of_match_table = qcm2290_noc_of_match,
|
||||
.sync_state = icc_sync_state,
|
||||
},
|
||||
};
|
||||
module_platform_driver(qcm2290_noc_driver);
|
||||
|
|
|
@ -4,16 +4,14 @@
|
|||
*/
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,qcs404.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of_device.h>
|
||||
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
enum {
|
||||
|
@ -985,6 +983,7 @@ static struct qcom_icc_node * const qcs404_bimc_nodes[] = {
|
|||
};
|
||||
|
||||
static const struct qcom_icc_desc qcs404_bimc = {
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.nodes = qcs404_bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcs404_bimc_nodes),
|
||||
};
|
||||
|
@ -1039,6 +1038,7 @@ static struct qcom_icc_node * const qcs404_pcnoc_nodes[] = {
|
|||
};
|
||||
|
||||
static const struct qcom_icc_desc qcs404_pcnoc = {
|
||||
.bus_clk_desc = &bus_0_clk,
|
||||
.nodes = qcs404_pcnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcs404_pcnoc_nodes),
|
||||
};
|
||||
|
@ -1067,6 +1067,7 @@ static struct qcom_icc_node * const qcs404_snoc_nodes[] = {
|
|||
};
|
||||
|
||||
static const struct qcom_icc_desc qcs404_snoc = {
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.nodes = qcs404_snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcs404_snoc_nodes),
|
||||
};
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <dt-bindings/interconnect/qcom,qdu1000-rpmh.h>
|
||||
|
||||
#include "bcm-voter.h"
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <dt-bindings/interconnect/qcom,sa8775p-rpmh.h>
|
||||
|
||||
#include "bcm-voter.h"
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -7,8 +7,9 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <dt-bindings/interconnect/qcom,sc7280.h>
|
||||
|
||||
#include "bcm-voter.h"
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,sc8180x.h>
|
||||
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <dt-bindings/interconnect/qcom,sc8280xp.h>
|
||||
|
||||
#include "bcm-voter.h"
|
||||
|
|
|
@ -5,19 +5,16 @@
|
|||
*/
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,sdm660.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "icc-rpm.h"
|
||||
#include "smd-rpm.h"
|
||||
|
||||
enum {
|
||||
SDM660_MASTER_IPA = 1,
|
||||
|
@ -1512,6 +1509,7 @@ static const struct qcom_icc_desc sdm660_a2noc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = sdm660_a2noc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_a2noc_nodes),
|
||||
.bus_clk_desc = &aggre2_clk,
|
||||
.intf_clocks = a2noc_intf_clocks,
|
||||
.num_intf_clocks = ARRAY_SIZE(a2noc_intf_clocks),
|
||||
.regmap_cfg = &sdm660_a2noc_regmap_config,
|
||||
|
@ -1540,6 +1538,7 @@ static const struct qcom_icc_desc sdm660_bimc = {
|
|||
.type = QCOM_ICC_BIMC,
|
||||
.nodes = sdm660_bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_bimc_nodes),
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.regmap_cfg = &sdm660_bimc_regmap_config,
|
||||
};
|
||||
|
||||
|
@ -1594,6 +1593,7 @@ static const struct qcom_icc_desc sdm660_cnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = sdm660_cnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_cnoc_nodes),
|
||||
.bus_clk_desc = &bus_2_clk,
|
||||
.regmap_cfg = &sdm660_cnoc_regmap_config,
|
||||
};
|
||||
|
||||
|
@ -1616,7 +1616,6 @@ static const struct qcom_icc_desc sdm660_gnoc = {
|
|||
.nodes = sdm660_gnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_gnoc_nodes),
|
||||
.regmap_cfg = &sdm660_gnoc_regmap_config,
|
||||
.no_clk_scaling = true,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node * const sdm660_mnoc_nodes[] = {
|
||||
|
@ -1656,6 +1655,7 @@ static const struct qcom_icc_desc sdm660_mnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = sdm660_mnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_mnoc_nodes),
|
||||
.bus_clk_desc = &mmaxi_0_clk,
|
||||
.intf_clocks = mm_intf_clocks,
|
||||
.num_intf_clocks = ARRAY_SIZE(mm_intf_clocks),
|
||||
.regmap_cfg = &sdm660_mnoc_regmap_config,
|
||||
|
@ -1693,6 +1693,7 @@ static const struct qcom_icc_desc sdm660_snoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = sdm660_snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_snoc_nodes),
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.regmap_cfg = &sdm660_snoc_regmap_config,
|
||||
};
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -10,94 +10,778 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <dt-bindings/interconnect/qcom,sdx55.h>
|
||||
|
||||
#include "bcm-voter.h"
|
||||
#include "icc-rpmh.h"
|
||||
#include "sdx55.h"
|
||||
|
||||
DEFINE_QNODE(llcc_mc, SDX55_MASTER_LLCC, 4, 4, SDX55_SLAVE_EBI_CH0);
|
||||
DEFINE_QNODE(acm_tcu, SDX55_MASTER_TCU_0, 1, 8, SDX55_SLAVE_LLCC, SDX55_SLAVE_MEM_NOC_SNOC, SDX55_SLAVE_MEM_NOC_PCIE_SNOC);
|
||||
DEFINE_QNODE(qnm_snoc_gc, SDX55_MASTER_SNOC_GC_MEM_NOC, 1, 8, SDX55_SLAVE_LLCC);
|
||||
DEFINE_QNODE(xm_apps_rdwr, SDX55_MASTER_AMPSS_M0, 1, 16, SDX55_SLAVE_LLCC, SDX55_SLAVE_MEM_NOC_SNOC, SDX55_SLAVE_MEM_NOC_PCIE_SNOC);
|
||||
DEFINE_QNODE(qhm_audio, SDX55_MASTER_AUDIO, 1, 4, SDX55_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(qhm_blsp1, SDX55_MASTER_BLSP_1, 1, 4, SDX55_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(qhm_qdss_bam, SDX55_MASTER_QDSS_BAM, 1, 4, SDX55_SLAVE_SNOC_CFG, SDX55_SLAVE_EMAC_CFG, SDX55_SLAVE_USB3, SDX55_SLAVE_TLMM, SDX55_SLAVE_SPMI_FETCHER, SDX55_SLAVE_QDSS_CFG, SDX55_SLAVE_PDM, SDX55_SLAVE_SNOC_MEM_NOC_GC, SDX55_SLAVE_TCSR, SDX55_SLAVE_CNOC_DDRSS, SDX55_SLAVE_SPMI_VGI_COEX, SDX55_SLAVE_QPIC, SDX55_SLAVE_OCIMEM, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_USB3_PHY_CFG, SDX55_SLAVE_AOP, SDX55_SLAVE_BLSP_1, SDX55_SLAVE_SDCC_1, SDX55_SLAVE_CNOC_MSS, SDX55_SLAVE_PCIE_PARF, SDX55_SLAVE_ECC_CFG, SDX55_SLAVE_AUDIO, SDX55_SLAVE_AOSS, SDX55_SLAVE_PRNG, SDX55_SLAVE_CRYPTO_0_CFG, SDX55_SLAVE_TCU, SDX55_SLAVE_CLK_CTL, SDX55_SLAVE_IMEM_CFG);
|
||||
DEFINE_QNODE(qhm_qpic, SDX55_MASTER_QPIC, 1, 4, SDX55_SLAVE_AOSS, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_ANOC_SNOC, SDX55_SLAVE_AOP, SDX55_SLAVE_AUDIO);
|
||||
DEFINE_QNODE(qhm_snoc_cfg, SDX55_MASTER_SNOC_CFG, 1, 4, SDX55_SLAVE_SERVICE_SNOC);
|
||||
DEFINE_QNODE(qhm_spmi_fetcher1, SDX55_MASTER_SPMI_FETCHER, 1, 4, SDX55_SLAVE_AOSS, SDX55_SLAVE_ANOC_SNOC, SDX55_SLAVE_AOP);
|
||||
DEFINE_QNODE(qnm_aggre_noc, SDX55_MASTER_ANOC_SNOC, 1, 8, SDX55_SLAVE_PCIE_0, SDX55_SLAVE_SNOC_CFG, SDX55_SLAVE_SDCC_1, SDX55_SLAVE_TLMM, SDX55_SLAVE_SPMI_FETCHER, SDX55_SLAVE_QDSS_CFG, SDX55_SLAVE_PDM, SDX55_SLAVE_SNOC_MEM_NOC_GC, SDX55_SLAVE_TCSR, SDX55_SLAVE_CNOC_DDRSS, SDX55_SLAVE_SPMI_VGI_COEX, SDX55_SLAVE_QDSS_STM, SDX55_SLAVE_QPIC, SDX55_SLAVE_OCIMEM, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_USB3_PHY_CFG, SDX55_SLAVE_AOP, SDX55_SLAVE_BLSP_1, SDX55_SLAVE_USB3, SDX55_SLAVE_CNOC_MSS, SDX55_SLAVE_PCIE_PARF, SDX55_SLAVE_ECC_CFG, SDX55_SLAVE_APPSS, SDX55_SLAVE_AUDIO, SDX55_SLAVE_AOSS, SDX55_SLAVE_PRNG, SDX55_SLAVE_CRYPTO_0_CFG, SDX55_SLAVE_TCU, SDX55_SLAVE_CLK_CTL, SDX55_SLAVE_IMEM_CFG);
|
||||
DEFINE_QNODE(qnm_ipa, SDX55_MASTER_IPA, 1, 8, SDX55_SLAVE_SNOC_CFG, SDX55_SLAVE_EMAC_CFG, SDX55_SLAVE_USB3, SDX55_SLAVE_AOSS, SDX55_SLAVE_SPMI_FETCHER, SDX55_SLAVE_QDSS_CFG, SDX55_SLAVE_PDM, SDX55_SLAVE_SNOC_MEM_NOC_GC, SDX55_SLAVE_TCSR, SDX55_SLAVE_CNOC_DDRSS, SDX55_SLAVE_QDSS_STM, SDX55_SLAVE_QPIC, SDX55_SLAVE_OCIMEM, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_USB3_PHY_CFG, SDX55_SLAVE_AOP, SDX55_SLAVE_BLSP_1, SDX55_SLAVE_SDCC_1, SDX55_SLAVE_CNOC_MSS, SDX55_SLAVE_PCIE_PARF, SDX55_SLAVE_ECC_CFG, SDX55_SLAVE_AUDIO, SDX55_SLAVE_TLMM, SDX55_SLAVE_PRNG, SDX55_SLAVE_CRYPTO_0_CFG, SDX55_SLAVE_CLK_CTL, SDX55_SLAVE_IMEM_CFG);
|
||||
DEFINE_QNODE(qnm_memnoc, SDX55_MASTER_MEM_NOC_SNOC, 1, 8, SDX55_SLAVE_SNOC_CFG, SDX55_SLAVE_EMAC_CFG, SDX55_SLAVE_USB3, SDX55_SLAVE_TLMM, SDX55_SLAVE_SPMI_FETCHER, SDX55_SLAVE_QDSS_CFG, SDX55_SLAVE_PDM, SDX55_SLAVE_TCSR, SDX55_SLAVE_CNOC_DDRSS, SDX55_SLAVE_SPMI_VGI_COEX, SDX55_SLAVE_QDSS_STM, SDX55_SLAVE_QPIC, SDX55_SLAVE_OCIMEM, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_USB3_PHY_CFG, SDX55_SLAVE_AOP, SDX55_SLAVE_BLSP_1, SDX55_SLAVE_SDCC_1, SDX55_SLAVE_CNOC_MSS, SDX55_SLAVE_PCIE_PARF, SDX55_SLAVE_ECC_CFG, SDX55_SLAVE_APPSS, SDX55_SLAVE_AUDIO, SDX55_SLAVE_AOSS, SDX55_SLAVE_PRNG, SDX55_SLAVE_CRYPTO_0_CFG, SDX55_SLAVE_TCU, SDX55_SLAVE_CLK_CTL, SDX55_SLAVE_IMEM_CFG);
|
||||
DEFINE_QNODE(qnm_memnoc_pcie, SDX55_MASTER_MEM_NOC_PCIE_SNOC, 1, 8, SDX55_SLAVE_PCIE_0);
|
||||
DEFINE_QNODE(qxm_crypto, SDX55_MASTER_CRYPTO_CORE_0, 1, 8, SDX55_SLAVE_AOSS, SDX55_SLAVE_ANOC_SNOC, SDX55_SLAVE_AOP);
|
||||
DEFINE_QNODE(xm_emac, SDX55_MASTER_EMAC, 1, 8, SDX55_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(xm_ipa2pcie_slv, SDX55_MASTER_IPA_PCIE, 1, 8, SDX55_SLAVE_PCIE_0);
|
||||
DEFINE_QNODE(xm_pcie, SDX55_MASTER_PCIE, 1, 8, SDX55_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(xm_qdss_etr, SDX55_MASTER_QDSS_ETR, 1, 8, SDX55_SLAVE_SNOC_CFG, SDX55_SLAVE_EMAC_CFG, SDX55_SLAVE_USB3, SDX55_SLAVE_AOSS, SDX55_SLAVE_SPMI_FETCHER, SDX55_SLAVE_QDSS_CFG, SDX55_SLAVE_PDM, SDX55_SLAVE_SNOC_MEM_NOC_GC, SDX55_SLAVE_TCSR, SDX55_SLAVE_CNOC_DDRSS, SDX55_SLAVE_SPMI_VGI_COEX, SDX55_SLAVE_QPIC, SDX55_SLAVE_OCIMEM, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_USB3_PHY_CFG, SDX55_SLAVE_AOP, SDX55_SLAVE_BLSP_1, SDX55_SLAVE_SDCC_1, SDX55_SLAVE_CNOC_MSS, SDX55_SLAVE_PCIE_PARF, SDX55_SLAVE_ECC_CFG, SDX55_SLAVE_AUDIO, SDX55_SLAVE_AOSS, SDX55_SLAVE_PRNG, SDX55_SLAVE_CRYPTO_0_CFG, SDX55_SLAVE_TCU, SDX55_SLAVE_CLK_CTL, SDX55_SLAVE_IMEM_CFG);
|
||||
DEFINE_QNODE(xm_sdc1, SDX55_MASTER_SDCC_1, 1, 8, SDX55_SLAVE_AOSS, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_ANOC_SNOC, SDX55_SLAVE_AOP, SDX55_SLAVE_AUDIO);
|
||||
DEFINE_QNODE(xm_usb3, SDX55_MASTER_USB3, 1, 8, SDX55_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(ebi, SDX55_SLAVE_EBI_CH0, 1, 4);
|
||||
DEFINE_QNODE(qns_llcc, SDX55_SLAVE_LLCC, 1, 16, SDX55_SLAVE_EBI_CH0);
|
||||
DEFINE_QNODE(qns_memnoc_snoc, SDX55_SLAVE_MEM_NOC_SNOC, 1, 8, SDX55_MASTER_MEM_NOC_SNOC);
|
||||
DEFINE_QNODE(qns_sys_pcie, SDX55_SLAVE_MEM_NOC_PCIE_SNOC, 1, 8, SDX55_MASTER_MEM_NOC_PCIE_SNOC);
|
||||
DEFINE_QNODE(qhs_aop, SDX55_SLAVE_AOP, 1, 4);
|
||||
DEFINE_QNODE(qhs_aoss, SDX55_SLAVE_AOSS, 1, 4);
|
||||
DEFINE_QNODE(qhs_apss, SDX55_SLAVE_APPSS, 1, 4);
|
||||
DEFINE_QNODE(qhs_audio, SDX55_SLAVE_AUDIO, 1, 4);
|
||||
DEFINE_QNODE(qhs_blsp1, SDX55_SLAVE_BLSP_1, 1, 4);
|
||||
DEFINE_QNODE(qhs_clk_ctl, SDX55_SLAVE_CLK_CTL, 1, 4);
|
||||
DEFINE_QNODE(qhs_crypto0_cfg, SDX55_SLAVE_CRYPTO_0_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_ddrss_cfg, SDX55_SLAVE_CNOC_DDRSS, 1, 4);
|
||||
DEFINE_QNODE(qhs_ecc_cfg, SDX55_SLAVE_ECC_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_emac_cfg, SDX55_SLAVE_EMAC_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_imem_cfg, SDX55_SLAVE_IMEM_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_ipa, SDX55_SLAVE_IPA_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_mss_cfg, SDX55_SLAVE_CNOC_MSS, 1, 4);
|
||||
DEFINE_QNODE(qhs_pcie_parf, SDX55_SLAVE_PCIE_PARF, 1, 4);
|
||||
DEFINE_QNODE(qhs_pdm, SDX55_SLAVE_PDM, 1, 4);
|
||||
DEFINE_QNODE(qhs_prng, SDX55_SLAVE_PRNG, 1, 4);
|
||||
DEFINE_QNODE(qhs_qdss_cfg, SDX55_SLAVE_QDSS_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_qpic, SDX55_SLAVE_QPIC, 1, 4);
|
||||
DEFINE_QNODE(qhs_sdc1, SDX55_SLAVE_SDCC_1, 1, 4);
|
||||
DEFINE_QNODE(qhs_snoc_cfg, SDX55_SLAVE_SNOC_CFG, 1, 4, SDX55_MASTER_SNOC_CFG);
|
||||
DEFINE_QNODE(qhs_spmi_fetcher, SDX55_SLAVE_SPMI_FETCHER, 1, 4);
|
||||
DEFINE_QNODE(qhs_spmi_vgi_coex, SDX55_SLAVE_SPMI_VGI_COEX, 1, 4);
|
||||
DEFINE_QNODE(qhs_tcsr, SDX55_SLAVE_TCSR, 1, 4);
|
||||
DEFINE_QNODE(qhs_tlmm, SDX55_SLAVE_TLMM, 1, 4);
|
||||
DEFINE_QNODE(qhs_usb3, SDX55_SLAVE_USB3, 1, 4);
|
||||
DEFINE_QNODE(qhs_usb3_phy, SDX55_SLAVE_USB3_PHY_CFG, 1, 4);
|
||||
DEFINE_QNODE(qns_aggre_noc, SDX55_SLAVE_ANOC_SNOC, 1, 8, SDX55_MASTER_ANOC_SNOC);
|
||||
DEFINE_QNODE(qns_snoc_memnoc, SDX55_SLAVE_SNOC_MEM_NOC_GC, 1, 8, SDX55_MASTER_SNOC_GC_MEM_NOC);
|
||||
DEFINE_QNODE(qxs_imem, SDX55_SLAVE_OCIMEM, 1, 8);
|
||||
DEFINE_QNODE(srvc_snoc, SDX55_SLAVE_SERVICE_SNOC, 1, 4);
|
||||
DEFINE_QNODE(xs_pcie, SDX55_SLAVE_PCIE_0, 1, 8);
|
||||
DEFINE_QNODE(xs_qdss_stm, SDX55_SLAVE_QDSS_STM, 1, 4);
|
||||
DEFINE_QNODE(xs_sys_tcu_cfg, SDX55_SLAVE_TCU, 1, 8);
|
||||
static struct qcom_icc_node llcc_mc = {
|
||||
.name = "llcc_mc",
|
||||
.id = SDX55_MASTER_LLCC,
|
||||
.channels = 4,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_EBI_CH0 },
|
||||
};
|
||||
|
||||
DEFINE_QBCM(bcm_mc0, "MC0", true, &ebi);
|
||||
DEFINE_QBCM(bcm_sh0, "SH0", true, &qns_llcc);
|
||||
DEFINE_QBCM(bcm_ce0, "CE0", false, &qxm_crypto);
|
||||
DEFINE_QBCM(bcm_pn0, "PN0", false, &qhm_snoc_cfg);
|
||||
DEFINE_QBCM(bcm_sh3, "SH3", false, &xm_apps_rdwr);
|
||||
DEFINE_QBCM(bcm_sh4, "SH4", false, &qns_memnoc_snoc, &qns_sys_pcie);
|
||||
DEFINE_QBCM(bcm_sn0, "SN0", true, &qns_snoc_memnoc);
|
||||
DEFINE_QBCM(bcm_sn1, "SN1", false, &qxs_imem);
|
||||
DEFINE_QBCM(bcm_pn1, "PN1", false, &xm_sdc1);
|
||||
DEFINE_QBCM(bcm_pn2, "PN2", false, &qhm_audio, &qhm_spmi_fetcher1);
|
||||
DEFINE_QBCM(bcm_sn3, "SN3", false, &xs_qdss_stm);
|
||||
DEFINE_QBCM(bcm_pn3, "PN3", false, &qhm_blsp1, &qhm_qpic);
|
||||
DEFINE_QBCM(bcm_sn4, "SN4", false, &xs_sys_tcu_cfg);
|
||||
DEFINE_QBCM(bcm_pn5, "PN5", false, &qxm_crypto);
|
||||
DEFINE_QBCM(bcm_sn6, "SN6", false, &xs_pcie);
|
||||
DEFINE_QBCM(bcm_sn7, "SN7", false, &qnm_aggre_noc, &xm_emac, &xm_emac, &xm_usb3,
|
||||
&qns_aggre_noc);
|
||||
DEFINE_QBCM(bcm_sn8, "SN8", false, &qhm_qdss_bam, &xm_qdss_etr);
|
||||
DEFINE_QBCM(bcm_sn9, "SN9", false, &qnm_memnoc);
|
||||
DEFINE_QBCM(bcm_sn10, "SN10", false, &qnm_memnoc_pcie);
|
||||
DEFINE_QBCM(bcm_sn11, "SN11", false, &qnm_ipa, &xm_ipa2pcie_slv);
|
||||
static struct qcom_icc_node acm_tcu = {
|
||||
.name = "acm_tcu",
|
||||
.id = SDX55_MASTER_TCU_0,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 3,
|
||||
.links = { SDX55_SLAVE_LLCC,
|
||||
SDX55_SLAVE_MEM_NOC_SNOC,
|
||||
SDX55_SLAVE_MEM_NOC_PCIE_SNOC
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qnm_snoc_gc = {
|
||||
.name = "qnm_snoc_gc",
|
||||
.id = SDX55_MASTER_SNOC_GC_MEM_NOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_LLCC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_apps_rdwr = {
|
||||
.name = "xm_apps_rdwr",
|
||||
.id = SDX55_MASTER_AMPSS_M0,
|
||||
.channels = 1,
|
||||
.buswidth = 16,
|
||||
.num_links = 3,
|
||||
.links = { SDX55_SLAVE_LLCC,
|
||||
SDX55_SLAVE_MEM_NOC_SNOC,
|
||||
SDX55_SLAVE_MEM_NOC_PCIE_SNOC
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_audio = {
|
||||
.name = "qhm_audio",
|
||||
.id = SDX55_MASTER_AUDIO,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_blsp1 = {
|
||||
.name = "qhm_blsp1",
|
||||
.id = SDX55_MASTER_BLSP_1,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_qdss_bam = {
|
||||
.name = "qhm_qdss_bam",
|
||||
.id = SDX55_MASTER_QDSS_BAM,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 28,
|
||||
.links = { SDX55_SLAVE_SNOC_CFG,
|
||||
SDX55_SLAVE_EMAC_CFG,
|
||||
SDX55_SLAVE_USB3,
|
||||
SDX55_SLAVE_TLMM,
|
||||
SDX55_SLAVE_SPMI_FETCHER,
|
||||
SDX55_SLAVE_QDSS_CFG,
|
||||
SDX55_SLAVE_PDM,
|
||||
SDX55_SLAVE_SNOC_MEM_NOC_GC,
|
||||
SDX55_SLAVE_TCSR,
|
||||
SDX55_SLAVE_CNOC_DDRSS,
|
||||
SDX55_SLAVE_SPMI_VGI_COEX,
|
||||
SDX55_SLAVE_QPIC,
|
||||
SDX55_SLAVE_OCIMEM,
|
||||
SDX55_SLAVE_IPA_CFG,
|
||||
SDX55_SLAVE_USB3_PHY_CFG,
|
||||
SDX55_SLAVE_AOP,
|
||||
SDX55_SLAVE_BLSP_1,
|
||||
SDX55_SLAVE_SDCC_1,
|
||||
SDX55_SLAVE_CNOC_MSS,
|
||||
SDX55_SLAVE_PCIE_PARF,
|
||||
SDX55_SLAVE_ECC_CFG,
|
||||
SDX55_SLAVE_AUDIO,
|
||||
SDX55_SLAVE_AOSS,
|
||||
SDX55_SLAVE_PRNG,
|
||||
SDX55_SLAVE_CRYPTO_0_CFG,
|
||||
SDX55_SLAVE_TCU,
|
||||
SDX55_SLAVE_CLK_CTL,
|
||||
SDX55_SLAVE_IMEM_CFG
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_qpic = {
|
||||
.name = "qhm_qpic",
|
||||
.id = SDX55_MASTER_QPIC,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 5,
|
||||
.links = { SDX55_SLAVE_AOSS,
|
||||
SDX55_SLAVE_IPA_CFG,
|
||||
SDX55_SLAVE_ANOC_SNOC,
|
||||
SDX55_SLAVE_AOP,
|
||||
SDX55_SLAVE_AUDIO
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_snoc_cfg = {
|
||||
.name = "qhm_snoc_cfg",
|
||||
.id = SDX55_MASTER_SNOC_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_SERVICE_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_spmi_fetcher1 = {
|
||||
.name = "qhm_spmi_fetcher1",
|
||||
.id = SDX55_MASTER_SPMI_FETCHER,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 3,
|
||||
.links = { SDX55_SLAVE_AOSS,
|
||||
SDX55_SLAVE_ANOC_SNOC,
|
||||
SDX55_SLAVE_AOP
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qnm_aggre_noc = {
|
||||
.name = "qnm_aggre_noc",
|
||||
.id = SDX55_MASTER_ANOC_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 30,
|
||||
.links = { SDX55_SLAVE_PCIE_0,
|
||||
SDX55_SLAVE_SNOC_CFG,
|
||||
SDX55_SLAVE_SDCC_1,
|
||||
SDX55_SLAVE_TLMM,
|
||||
SDX55_SLAVE_SPMI_FETCHER,
|
||||
SDX55_SLAVE_QDSS_CFG,
|
||||
SDX55_SLAVE_PDM,
|
||||
SDX55_SLAVE_SNOC_MEM_NOC_GC,
|
||||
SDX55_SLAVE_TCSR,
|
||||
SDX55_SLAVE_CNOC_DDRSS,
|
||||
SDX55_SLAVE_SPMI_VGI_COEX,
|
||||
SDX55_SLAVE_QDSS_STM,
|
||||
SDX55_SLAVE_QPIC,
|
||||
SDX55_SLAVE_OCIMEM,
|
||||
SDX55_SLAVE_IPA_CFG,
|
||||
SDX55_SLAVE_USB3_PHY_CFG,
|
||||
SDX55_SLAVE_AOP,
|
||||
SDX55_SLAVE_BLSP_1,
|
||||
SDX55_SLAVE_USB3,
|
||||
SDX55_SLAVE_CNOC_MSS,
|
||||
SDX55_SLAVE_PCIE_PARF,
|
||||
SDX55_SLAVE_ECC_CFG,
|
||||
SDX55_SLAVE_APPSS,
|
||||
SDX55_SLAVE_AUDIO,
|
||||
SDX55_SLAVE_AOSS,
|
||||
SDX55_SLAVE_PRNG,
|
||||
SDX55_SLAVE_CRYPTO_0_CFG,
|
||||
SDX55_SLAVE_TCU,
|
||||
SDX55_SLAVE_CLK_CTL,
|
||||
SDX55_SLAVE_IMEM_CFG
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qnm_ipa = {
|
||||
.name = "qnm_ipa",
|
||||
.id = SDX55_MASTER_IPA,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 27,
|
||||
.links = { SDX55_SLAVE_SNOC_CFG,
|
||||
SDX55_SLAVE_EMAC_CFG,
|
||||
SDX55_SLAVE_USB3,
|
||||
SDX55_SLAVE_AOSS,
|
||||
SDX55_SLAVE_SPMI_FETCHER,
|
||||
SDX55_SLAVE_QDSS_CFG,
|
||||
SDX55_SLAVE_PDM,
|
||||
SDX55_SLAVE_SNOC_MEM_NOC_GC,
|
||||
SDX55_SLAVE_TCSR,
|
||||
SDX55_SLAVE_CNOC_DDRSS,
|
||||
SDX55_SLAVE_QDSS_STM,
|
||||
SDX55_SLAVE_QPIC,
|
||||
SDX55_SLAVE_OCIMEM,
|
||||
SDX55_SLAVE_IPA_CFG,
|
||||
SDX55_SLAVE_USB3_PHY_CFG,
|
||||
SDX55_SLAVE_AOP,
|
||||
SDX55_SLAVE_BLSP_1,
|
||||
SDX55_SLAVE_SDCC_1,
|
||||
SDX55_SLAVE_CNOC_MSS,
|
||||
SDX55_SLAVE_PCIE_PARF,
|
||||
SDX55_SLAVE_ECC_CFG,
|
||||
SDX55_SLAVE_AUDIO,
|
||||
SDX55_SLAVE_TLMM,
|
||||
SDX55_SLAVE_PRNG,
|
||||
SDX55_SLAVE_CRYPTO_0_CFG,
|
||||
SDX55_SLAVE_CLK_CTL,
|
||||
SDX55_SLAVE_IMEM_CFG
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qnm_memnoc = {
|
||||
.name = "qnm_memnoc",
|
||||
.id = SDX55_MASTER_MEM_NOC_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 29,
|
||||
.links = { SDX55_SLAVE_SNOC_CFG,
|
||||
SDX55_SLAVE_EMAC_CFG,
|
||||
SDX55_SLAVE_USB3,
|
||||
SDX55_SLAVE_TLMM,
|
||||
SDX55_SLAVE_SPMI_FETCHER,
|
||||
SDX55_SLAVE_QDSS_CFG,
|
||||
SDX55_SLAVE_PDM,
|
||||
SDX55_SLAVE_TCSR,
|
||||
SDX55_SLAVE_CNOC_DDRSS,
|
||||
SDX55_SLAVE_SPMI_VGI_COEX,
|
||||
SDX55_SLAVE_QDSS_STM,
|
||||
SDX55_SLAVE_QPIC,
|
||||
SDX55_SLAVE_OCIMEM,
|
||||
SDX55_SLAVE_IPA_CFG,
|
||||
SDX55_SLAVE_USB3_PHY_CFG,
|
||||
SDX55_SLAVE_AOP,
|
||||
SDX55_SLAVE_BLSP_1,
|
||||
SDX55_SLAVE_SDCC_1,
|
||||
SDX55_SLAVE_CNOC_MSS,
|
||||
SDX55_SLAVE_PCIE_PARF,
|
||||
SDX55_SLAVE_ECC_CFG,
|
||||
SDX55_SLAVE_APPSS,
|
||||
SDX55_SLAVE_AUDIO,
|
||||
SDX55_SLAVE_AOSS,
|
||||
SDX55_SLAVE_PRNG,
|
||||
SDX55_SLAVE_CRYPTO_0_CFG,
|
||||
SDX55_SLAVE_TCU,
|
||||
SDX55_SLAVE_CLK_CTL,
|
||||
SDX55_SLAVE_IMEM_CFG
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qnm_memnoc_pcie = {
|
||||
.name = "qnm_memnoc_pcie",
|
||||
.id = SDX55_MASTER_MEM_NOC_PCIE_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_PCIE_0 },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qxm_crypto = {
|
||||
.name = "qxm_crypto",
|
||||
.id = SDX55_MASTER_CRYPTO_CORE_0,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 3,
|
||||
.links = { SDX55_SLAVE_AOSS,
|
||||
SDX55_SLAVE_ANOC_SNOC,
|
||||
SDX55_SLAVE_AOP
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_emac = {
|
||||
.name = "xm_emac",
|
||||
.id = SDX55_MASTER_EMAC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_ipa2pcie_slv = {
|
||||
.name = "xm_ipa2pcie_slv",
|
||||
.id = SDX55_MASTER_IPA_PCIE,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_PCIE_0 },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_pcie = {
|
||||
.name = "xm_pcie",
|
||||
.id = SDX55_MASTER_PCIE,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_qdss_etr = {
|
||||
.name = "xm_qdss_etr",
|
||||
.id = SDX55_MASTER_QDSS_ETR,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 28,
|
||||
.links = { SDX55_SLAVE_SNOC_CFG,
|
||||
SDX55_SLAVE_EMAC_CFG,
|
||||
SDX55_SLAVE_USB3,
|
||||
SDX55_SLAVE_AOSS,
|
||||
SDX55_SLAVE_SPMI_FETCHER,
|
||||
SDX55_SLAVE_QDSS_CFG,
|
||||
SDX55_SLAVE_PDM,
|
||||
SDX55_SLAVE_SNOC_MEM_NOC_GC,
|
||||
SDX55_SLAVE_TCSR,
|
||||
SDX55_SLAVE_CNOC_DDRSS,
|
||||
SDX55_SLAVE_SPMI_VGI_COEX,
|
||||
SDX55_SLAVE_QPIC,
|
||||
SDX55_SLAVE_OCIMEM,
|
||||
SDX55_SLAVE_IPA_CFG,
|
||||
SDX55_SLAVE_USB3_PHY_CFG,
|
||||
SDX55_SLAVE_AOP,
|
||||
SDX55_SLAVE_BLSP_1,
|
||||
SDX55_SLAVE_SDCC_1,
|
||||
SDX55_SLAVE_CNOC_MSS,
|
||||
SDX55_SLAVE_PCIE_PARF,
|
||||
SDX55_SLAVE_ECC_CFG,
|
||||
SDX55_SLAVE_AUDIO,
|
||||
SDX55_SLAVE_AOSS,
|
||||
SDX55_SLAVE_PRNG,
|
||||
SDX55_SLAVE_CRYPTO_0_CFG,
|
||||
SDX55_SLAVE_TCU,
|
||||
SDX55_SLAVE_CLK_CTL,
|
||||
SDX55_SLAVE_IMEM_CFG
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_sdc1 = {
|
||||
.name = "xm_sdc1",
|
||||
.id = SDX55_MASTER_SDCC_1,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 5,
|
||||
.links = { SDX55_SLAVE_AOSS,
|
||||
SDX55_SLAVE_IPA_CFG,
|
||||
SDX55_SLAVE_ANOC_SNOC,
|
||||
SDX55_SLAVE_AOP,
|
||||
SDX55_SLAVE_AUDIO
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_usb3 = {
|
||||
.name = "xm_usb3",
|
||||
.id = SDX55_MASTER_USB3,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node ebi = {
|
||||
.name = "ebi",
|
||||
.id = SDX55_SLAVE_EBI_CH0,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qns_llcc = {
|
||||
.name = "qns_llcc",
|
||||
.id = SDX55_SLAVE_LLCC,
|
||||
.channels = 1,
|
||||
.buswidth = 16,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_SLAVE_EBI_CH0 },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qns_memnoc_snoc = {
|
||||
.name = "qns_memnoc_snoc",
|
||||
.id = SDX55_SLAVE_MEM_NOC_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_MASTER_MEM_NOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qns_sys_pcie = {
|
||||
.name = "qns_sys_pcie",
|
||||
.id = SDX55_SLAVE_MEM_NOC_PCIE_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_MASTER_MEM_NOC_PCIE_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_aop = {
|
||||
.name = "qhs_aop",
|
||||
.id = SDX55_SLAVE_AOP,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_aoss = {
|
||||
.name = "qhs_aoss",
|
||||
.id = SDX55_SLAVE_AOSS,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_apss = {
|
||||
.name = "qhs_apss",
|
||||
.id = SDX55_SLAVE_APPSS,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_audio = {
|
||||
.name = "qhs_audio",
|
||||
.id = SDX55_SLAVE_AUDIO,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_blsp1 = {
|
||||
.name = "qhs_blsp1",
|
||||
.id = SDX55_SLAVE_BLSP_1,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_clk_ctl = {
|
||||
.name = "qhs_clk_ctl",
|
||||
.id = SDX55_SLAVE_CLK_CTL,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_crypto0_cfg = {
|
||||
.name = "qhs_crypto0_cfg",
|
||||
.id = SDX55_SLAVE_CRYPTO_0_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_ddrss_cfg = {
|
||||
.name = "qhs_ddrss_cfg",
|
||||
.id = SDX55_SLAVE_CNOC_DDRSS,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_ecc_cfg = {
|
||||
.name = "qhs_ecc_cfg",
|
||||
.id = SDX55_SLAVE_ECC_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_emac_cfg = {
|
||||
.name = "qhs_emac_cfg",
|
||||
.id = SDX55_SLAVE_EMAC_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_imem_cfg = {
|
||||
.name = "qhs_imem_cfg",
|
||||
.id = SDX55_SLAVE_IMEM_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_ipa = {
|
||||
.name = "qhs_ipa",
|
||||
.id = SDX55_SLAVE_IPA_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_mss_cfg = {
|
||||
.name = "qhs_mss_cfg",
|
||||
.id = SDX55_SLAVE_CNOC_MSS,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_pcie_parf = {
|
||||
.name = "qhs_pcie_parf",
|
||||
.id = SDX55_SLAVE_PCIE_PARF,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_pdm = {
|
||||
.name = "qhs_pdm",
|
||||
.id = SDX55_SLAVE_PDM,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_prng = {
|
||||
.name = "qhs_prng",
|
||||
.id = SDX55_SLAVE_PRNG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_qdss_cfg = {
|
||||
.name = "qhs_qdss_cfg",
|
||||
.id = SDX55_SLAVE_QDSS_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_qpic = {
|
||||
.name = "qhs_qpic",
|
||||
.id = SDX55_SLAVE_QPIC,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_sdc1 = {
|
||||
.name = "qhs_sdc1",
|
||||
.id = SDX55_SLAVE_SDCC_1,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_snoc_cfg = {
|
||||
.name = "qhs_snoc_cfg",
|
||||
.id = SDX55_SLAVE_SNOC_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_MASTER_SNOC_CFG },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_spmi_fetcher = {
|
||||
.name = "qhs_spmi_fetcher",
|
||||
.id = SDX55_SLAVE_SPMI_FETCHER,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_spmi_vgi_coex = {
|
||||
.name = "qhs_spmi_vgi_coex",
|
||||
.id = SDX55_SLAVE_SPMI_VGI_COEX,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_tcsr = {
|
||||
.name = "qhs_tcsr",
|
||||
.id = SDX55_SLAVE_TCSR,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_tlmm = {
|
||||
.name = "qhs_tlmm",
|
||||
.id = SDX55_SLAVE_TLMM,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_usb3 = {
|
||||
.name = "qhs_usb3",
|
||||
.id = SDX55_SLAVE_USB3,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_usb3_phy = {
|
||||
.name = "qhs_usb3_phy",
|
||||
.id = SDX55_SLAVE_USB3_PHY_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qns_aggre_noc = {
|
||||
.name = "qns_aggre_noc",
|
||||
.id = SDX55_SLAVE_ANOC_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_MASTER_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qns_snoc_memnoc = {
|
||||
.name = "qns_snoc_memnoc",
|
||||
.id = SDX55_SLAVE_SNOC_MEM_NOC_GC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX55_MASTER_SNOC_GC_MEM_NOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qxs_imem = {
|
||||
.name = "qxs_imem",
|
||||
.id = SDX55_SLAVE_OCIMEM,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node srvc_snoc = {
|
||||
.name = "srvc_snoc",
|
||||
.id = SDX55_SLAVE_SERVICE_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xs_pcie = {
|
||||
.name = "xs_pcie",
|
||||
.id = SDX55_SLAVE_PCIE_0,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xs_qdss_stm = {
|
||||
.name = "xs_qdss_stm",
|
||||
.id = SDX55_SLAVE_QDSS_STM,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xs_sys_tcu_cfg = {
|
||||
.name = "xs_sys_tcu_cfg",
|
||||
.id = SDX55_SLAVE_TCU,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_mc0 = {
|
||||
.name = "MC0",
|
||||
.keepalive = true,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &ebi },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sh0 = {
|
||||
.name = "SH0",
|
||||
.keepalive = true,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qns_llcc },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_ce0 = {
|
||||
.name = "CE0",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qxm_crypto },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_pn0 = {
|
||||
.name = "PN0",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qhm_snoc_cfg },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sh3 = {
|
||||
.name = "SH3",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &xm_apps_rdwr },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sh4 = {
|
||||
.name = "SH4",
|
||||
.keepalive = false,
|
||||
.num_nodes = 2,
|
||||
.nodes = { &qns_memnoc_snoc, &qns_sys_pcie },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn0 = {
|
||||
.name = "SN0",
|
||||
.keepalive = true,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qns_snoc_memnoc },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn1 = {
|
||||
.name = "SN1",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qxs_imem },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_pn1 = {
|
||||
.name = "PN1",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &xm_sdc1 },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_pn2 = {
|
||||
.name = "PN2",
|
||||
.keepalive = false,
|
||||
.num_nodes = 2,
|
||||
.nodes = { &qhm_audio, &qhm_spmi_fetcher1 },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn3 = {
|
||||
.name = "SN3",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &xs_qdss_stm },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_pn3 = {
|
||||
.name = "PN3",
|
||||
.keepalive = false,
|
||||
.num_nodes = 2,
|
||||
.nodes = { &qhm_blsp1, &qhm_qpic },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn4 = {
|
||||
.name = "SN4",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &xs_sys_tcu_cfg },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_pn5 = {
|
||||
.name = "PN5",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qxm_crypto },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn6 = {
|
||||
.name = "SN6",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &xs_pcie },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn7 = {
|
||||
.name = "SN7",
|
||||
.keepalive = false,
|
||||
.num_nodes = 5,
|
||||
.nodes = { &qnm_aggre_noc, &xm_emac, &xm_emac, &xm_usb3, &qns_aggre_noc },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn8 = {
|
||||
.name = "SN8",
|
||||
.keepalive = false,
|
||||
.num_nodes = 2,
|
||||
.nodes = { &qhm_qdss_bam, &xm_qdss_etr },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn9 = {
|
||||
.name = "SN9",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qnm_memnoc },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn10 = {
|
||||
.name = "SN10",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qnm_memnoc_pcie },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn11 = {
|
||||
.name = "SN11",
|
||||
.keepalive = false,
|
||||
.num_nodes = 2,
|
||||
.nodes = { &qnm_ipa, &xm_ipa2pcie_slv },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm * const mc_virt_bcms[] = {
|
||||
&bcm_mc0,
|
||||
|
|
|
@ -6,90 +6,769 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <dt-bindings/interconnect/qcom,sdx65.h>
|
||||
|
||||
#include "bcm-voter.h"
|
||||
#include "icc-rpmh.h"
|
||||
#include "sdx65.h"
|
||||
|
||||
DEFINE_QNODE(llcc_mc, SDX65_MASTER_LLCC, 1, 4, SDX65_SLAVE_EBI1);
|
||||
DEFINE_QNODE(acm_tcu, SDX65_MASTER_TCU_0, 1, 8, SDX65_SLAVE_LLCC, SDX65_SLAVE_MEM_NOC_SNOC, SDX65_SLAVE_MEM_NOC_PCIE_SNOC);
|
||||
DEFINE_QNODE(qnm_snoc_gc, SDX65_MASTER_SNOC_GC_MEM_NOC, 1, 16, SDX65_SLAVE_LLCC);
|
||||
DEFINE_QNODE(xm_apps_rdwr, SDX65_MASTER_APPSS_PROC, 1, 16, SDX65_SLAVE_LLCC, SDX65_SLAVE_MEM_NOC_SNOC, SDX65_SLAVE_MEM_NOC_PCIE_SNOC);
|
||||
DEFINE_QNODE(qhm_audio, SDX65_MASTER_AUDIO, 1, 4, SDX65_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(qhm_blsp1, SDX65_MASTER_BLSP_1, 1, 4, SDX65_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(qhm_qdss_bam, SDX65_MASTER_QDSS_BAM, 1, 4, SDX65_SLAVE_AOSS, SDX65_SLAVE_AUDIO, SDX65_SLAVE_BLSP_1, SDX65_SLAVE_CLK_CTL, SDX65_SLAVE_CRYPTO_0_CFG, SDX65_SLAVE_CNOC_DDRSS, SDX65_SLAVE_ECC_CFG, SDX65_SLAVE_IMEM_CFG, SDX65_SLAVE_IPA_CFG, SDX65_SLAVE_CNOC_MSS, SDX65_SLAVE_PCIE_PARF, SDX65_SLAVE_PDM, SDX65_SLAVE_PRNG, SDX65_SLAVE_QDSS_CFG, SDX65_SLAVE_QPIC, SDX65_SLAVE_SDCC_1, SDX65_SLAVE_SNOC_CFG, SDX65_SLAVE_SPMI_FETCHER, SDX65_SLAVE_SPMI_VGI_COEX, SDX65_SLAVE_TCSR, SDX65_SLAVE_TLMM, SDX65_SLAVE_USB3, SDX65_SLAVE_USB3_PHY_CFG, SDX65_SLAVE_SNOC_MEM_NOC_GC, SDX65_SLAVE_IMEM, SDX65_SLAVE_TCU);
|
||||
DEFINE_QNODE(qhm_qpic, SDX65_MASTER_QPIC, 1, 4, SDX65_SLAVE_AOSS, SDX65_SLAVE_AUDIO, SDX65_SLAVE_IPA_CFG, SDX65_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(qhm_snoc_cfg, SDX65_MASTER_SNOC_CFG, 1, 4, SDX65_SLAVE_SERVICE_SNOC);
|
||||
DEFINE_QNODE(qhm_spmi_fetcher1, SDX65_MASTER_SPMI_FETCHER, 1, 4, SDX65_SLAVE_AOSS, SDX65_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(qnm_aggre_noc, SDX65_MASTER_ANOC_SNOC, 1, 8, SDX65_SLAVE_AOSS, SDX65_SLAVE_APPSS, SDX65_SLAVE_AUDIO, SDX65_SLAVE_BLSP_1, SDX65_SLAVE_CLK_CTL, SDX65_SLAVE_CRYPTO_0_CFG, SDX65_SLAVE_CNOC_DDRSS, SDX65_SLAVE_ECC_CFG, SDX65_SLAVE_IMEM_CFG, SDX65_SLAVE_IPA_CFG, SDX65_SLAVE_CNOC_MSS, SDX65_SLAVE_PCIE_PARF, SDX65_SLAVE_PDM, SDX65_SLAVE_PRNG, SDX65_SLAVE_QDSS_CFG, SDX65_SLAVE_QPIC, SDX65_SLAVE_SDCC_1, SDX65_SLAVE_SNOC_CFG, SDX65_SLAVE_SPMI_FETCHER, SDX65_SLAVE_SPMI_VGI_COEX, SDX65_SLAVE_TCSR, SDX65_SLAVE_TLMM, SDX65_SLAVE_USB3, SDX65_SLAVE_USB3_PHY_CFG, SDX65_SLAVE_SNOC_MEM_NOC_GC, SDX65_SLAVE_IMEM, SDX65_SLAVE_PCIE_0, SDX65_SLAVE_QDSS_STM, SDX65_SLAVE_TCU);
|
||||
DEFINE_QNODE(qnm_ipa, SDX65_MASTER_IPA, 1, 8, SDX65_SLAVE_AOSS, SDX65_SLAVE_AUDIO, SDX65_SLAVE_BLSP_1, SDX65_SLAVE_CLK_CTL, SDX65_SLAVE_CRYPTO_0_CFG, SDX65_SLAVE_CNOC_DDRSS, SDX65_SLAVE_ECC_CFG, SDX65_SLAVE_IMEM_CFG, SDX65_SLAVE_IPA_CFG, SDX65_SLAVE_CNOC_MSS, SDX65_SLAVE_PCIE_PARF, SDX65_SLAVE_PDM, SDX65_SLAVE_PRNG, SDX65_SLAVE_QDSS_CFG, SDX65_SLAVE_QPIC, SDX65_SLAVE_SDCC_1, SDX65_SLAVE_SNOC_CFG, SDX65_SLAVE_SPMI_FETCHER, SDX65_SLAVE_TCSR, SDX65_SLAVE_TLMM, SDX65_SLAVE_USB3, SDX65_SLAVE_USB3_PHY_CFG, SDX65_SLAVE_SNOC_MEM_NOC_GC, SDX65_SLAVE_IMEM, SDX65_SLAVE_PCIE_0, SDX65_SLAVE_QDSS_STM);
|
||||
DEFINE_QNODE(qnm_memnoc, SDX65_MASTER_MEM_NOC_SNOC, 1, 8, SDX65_SLAVE_AOSS, SDX65_SLAVE_APPSS, SDX65_SLAVE_AUDIO, SDX65_SLAVE_BLSP_1, SDX65_SLAVE_CLK_CTL, SDX65_SLAVE_CRYPTO_0_CFG, SDX65_SLAVE_CNOC_DDRSS, SDX65_SLAVE_ECC_CFG, SDX65_SLAVE_IMEM_CFG, SDX65_SLAVE_IPA_CFG, SDX65_SLAVE_CNOC_MSS, SDX65_SLAVE_PCIE_PARF, SDX65_SLAVE_PDM, SDX65_SLAVE_PRNG, SDX65_SLAVE_QDSS_CFG, SDX65_SLAVE_QPIC, SDX65_SLAVE_SDCC_1, SDX65_SLAVE_SNOC_CFG, SDX65_SLAVE_SPMI_FETCHER, SDX65_SLAVE_SPMI_VGI_COEX, SDX65_SLAVE_TCSR, SDX65_SLAVE_TLMM, SDX65_SLAVE_USB3, SDX65_SLAVE_USB3_PHY_CFG, SDX65_SLAVE_IMEM, SDX65_SLAVE_QDSS_STM, SDX65_SLAVE_TCU);
|
||||
DEFINE_QNODE(qnm_memnoc_pcie, SDX65_MASTER_MEM_NOC_PCIE_SNOC, 1, 8, SDX65_SLAVE_PCIE_0);
|
||||
DEFINE_QNODE(qxm_crypto, SDX65_MASTER_CRYPTO, 1, 8, SDX65_SLAVE_AOSS, SDX65_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(xm_ipa2pcie_slv, SDX65_MASTER_IPA_PCIE, 1, 8, SDX65_SLAVE_PCIE_0);
|
||||
DEFINE_QNODE(xm_pcie, SDX65_MASTER_PCIE_0, 1, 8, SDX65_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(xm_qdss_etr, SDX65_MASTER_QDSS_ETR, 1, 8, SDX65_SLAVE_AOSS, SDX65_SLAVE_AUDIO, SDX65_SLAVE_BLSP_1, SDX65_SLAVE_CLK_CTL, SDX65_SLAVE_CRYPTO_0_CFG, SDX65_SLAVE_CNOC_DDRSS, SDX65_SLAVE_ECC_CFG, SDX65_SLAVE_IMEM_CFG, SDX65_SLAVE_IPA_CFG, SDX65_SLAVE_CNOC_MSS, SDX65_SLAVE_PCIE_PARF, SDX65_SLAVE_PDM, SDX65_SLAVE_PRNG, SDX65_SLAVE_QDSS_CFG, SDX65_SLAVE_QPIC, SDX65_SLAVE_SDCC_1, SDX65_SLAVE_SNOC_CFG, SDX65_SLAVE_SPMI_FETCHER, SDX65_SLAVE_SPMI_VGI_COEX, SDX65_SLAVE_TCSR, SDX65_SLAVE_TLMM, SDX65_SLAVE_USB3, SDX65_SLAVE_USB3_PHY_CFG, SDX65_SLAVE_SNOC_MEM_NOC_GC, SDX65_SLAVE_IMEM, SDX65_SLAVE_TCU);
|
||||
DEFINE_QNODE(xm_sdc1, SDX65_MASTER_SDCC_1, 1, 8, SDX65_SLAVE_AOSS, SDX65_SLAVE_AUDIO, SDX65_SLAVE_IPA_CFG, SDX65_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(xm_usb3, SDX65_MASTER_USB3, 1, 8, SDX65_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(ebi, SDX65_SLAVE_EBI1, 1, 4);
|
||||
DEFINE_QNODE(qns_llcc, SDX65_SLAVE_LLCC, 1, 16, SDX65_MASTER_LLCC);
|
||||
DEFINE_QNODE(qns_memnoc_snoc, SDX65_SLAVE_MEM_NOC_SNOC, 1, 8, SDX65_MASTER_MEM_NOC_SNOC);
|
||||
DEFINE_QNODE(qns_sys_pcie, SDX65_SLAVE_MEM_NOC_PCIE_SNOC, 1, 8, SDX65_MASTER_MEM_NOC_PCIE_SNOC);
|
||||
DEFINE_QNODE(qhs_aoss, SDX65_SLAVE_AOSS, 1, 4);
|
||||
DEFINE_QNODE(qhs_apss, SDX65_SLAVE_APPSS, 1, 4);
|
||||
DEFINE_QNODE(qhs_audio, SDX65_SLAVE_AUDIO, 1, 4);
|
||||
DEFINE_QNODE(qhs_blsp1, SDX65_SLAVE_BLSP_1, 1, 4);
|
||||
DEFINE_QNODE(qhs_clk_ctl, SDX65_SLAVE_CLK_CTL, 1, 4);
|
||||
DEFINE_QNODE(qhs_crypto0_cfg, SDX65_SLAVE_CRYPTO_0_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_ddrss_cfg, SDX65_SLAVE_CNOC_DDRSS, 1, 4);
|
||||
DEFINE_QNODE(qhs_ecc_cfg, SDX65_SLAVE_ECC_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_imem_cfg, SDX65_SLAVE_IMEM_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_ipa, SDX65_SLAVE_IPA_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_mss_cfg, SDX65_SLAVE_CNOC_MSS, 1, 4);
|
||||
DEFINE_QNODE(qhs_pcie_parf, SDX65_SLAVE_PCIE_PARF, 1, 4);
|
||||
DEFINE_QNODE(qhs_pdm, SDX65_SLAVE_PDM, 1, 4);
|
||||
DEFINE_QNODE(qhs_prng, SDX65_SLAVE_PRNG, 1, 4);
|
||||
DEFINE_QNODE(qhs_qdss_cfg, SDX65_SLAVE_QDSS_CFG, 1, 4);
|
||||
DEFINE_QNODE(qhs_qpic, SDX65_SLAVE_QPIC, 1, 4);
|
||||
DEFINE_QNODE(qhs_sdc1, SDX65_SLAVE_SDCC_1, 1, 4);
|
||||
DEFINE_QNODE(qhs_snoc_cfg, SDX65_SLAVE_SNOC_CFG, 1, 4, SDX65_MASTER_SNOC_CFG);
|
||||
DEFINE_QNODE(qhs_spmi_fetcher, SDX65_SLAVE_SPMI_FETCHER, 1, 4);
|
||||
DEFINE_QNODE(qhs_spmi_vgi_coex, SDX65_SLAVE_SPMI_VGI_COEX, 1, 4);
|
||||
DEFINE_QNODE(qhs_tcsr, SDX65_SLAVE_TCSR, 1, 4);
|
||||
DEFINE_QNODE(qhs_tlmm, SDX65_SLAVE_TLMM, 1, 4);
|
||||
DEFINE_QNODE(qhs_usb3, SDX65_SLAVE_USB3, 1, 4);
|
||||
DEFINE_QNODE(qhs_usb3_phy, SDX65_SLAVE_USB3_PHY_CFG, 1, 4);
|
||||
DEFINE_QNODE(qns_aggre_noc, SDX65_SLAVE_ANOC_SNOC, 1, 8, SDX65_MASTER_ANOC_SNOC);
|
||||
DEFINE_QNODE(qns_snoc_memnoc, SDX65_SLAVE_SNOC_MEM_NOC_GC, 1, 16, SDX65_MASTER_SNOC_GC_MEM_NOC);
|
||||
DEFINE_QNODE(qxs_imem, SDX65_SLAVE_IMEM, 1, 8);
|
||||
DEFINE_QNODE(srvc_snoc, SDX65_SLAVE_SERVICE_SNOC, 1, 4);
|
||||
DEFINE_QNODE(xs_pcie, SDX65_SLAVE_PCIE_0, 1, 8);
|
||||
DEFINE_QNODE(xs_qdss_stm, SDX65_SLAVE_QDSS_STM, 1, 4);
|
||||
DEFINE_QNODE(xs_sys_tcu_cfg, SDX65_SLAVE_TCU, 1, 8);
|
||||
static struct qcom_icc_node llcc_mc = {
|
||||
.name = "llcc_mc",
|
||||
.id = SDX65_MASTER_LLCC,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_SLAVE_EBI1 },
|
||||
};
|
||||
|
||||
DEFINE_QBCM(bcm_ce0, "CE0", false, &qxm_crypto);
|
||||
DEFINE_QBCM(bcm_mc0, "MC0", true, &ebi);
|
||||
DEFINE_QBCM(bcm_pn0, "PN0", true, &qhm_snoc_cfg, &qhs_aoss, &qhs_apss, &qhs_audio, &qhs_blsp1, &qhs_clk_ctl, &qhs_crypto0_cfg, &qhs_ddrss_cfg, &qhs_ecc_cfg, &qhs_imem_cfg, &qhs_ipa, &qhs_mss_cfg, &qhs_pcie_parf, &qhs_pdm, &qhs_prng, &qhs_qdss_cfg, &qhs_qpic, &qhs_sdc1, &qhs_snoc_cfg, &qhs_spmi_fetcher, &qhs_spmi_vgi_coex, &qhs_tcsr, &qhs_tlmm, &qhs_usb3, &qhs_usb3_phy, &srvc_snoc);
|
||||
DEFINE_QBCM(bcm_pn1, "PN1", false, &xm_sdc1);
|
||||
DEFINE_QBCM(bcm_pn2, "PN2", false, &qhm_audio, &qhm_spmi_fetcher1);
|
||||
DEFINE_QBCM(bcm_pn3, "PN3", false, &qhm_blsp1, &qhm_qpic);
|
||||
DEFINE_QBCM(bcm_pn4, "PN4", false, &qxm_crypto);
|
||||
DEFINE_QBCM(bcm_sh0, "SH0", true, &qns_llcc);
|
||||
DEFINE_QBCM(bcm_sh1, "SH1", false, &qns_memnoc_snoc);
|
||||
DEFINE_QBCM(bcm_sh3, "SH3", false, &xm_apps_rdwr);
|
||||
DEFINE_QBCM(bcm_sn0, "SN0", true, &qns_snoc_memnoc);
|
||||
DEFINE_QBCM(bcm_sn1, "SN1", false, &qxs_imem);
|
||||
DEFINE_QBCM(bcm_sn2, "SN2", false, &xs_qdss_stm);
|
||||
DEFINE_QBCM(bcm_sn3, "SN3", false, &xs_sys_tcu_cfg);
|
||||
DEFINE_QBCM(bcm_sn5, "SN5", false, &xs_pcie);
|
||||
DEFINE_QBCM(bcm_sn6, "SN6", false, &qhm_qdss_bam, &xm_qdss_etr);
|
||||
DEFINE_QBCM(bcm_sn7, "SN7", false, &qnm_aggre_noc, &xm_pcie, &xm_usb3, &qns_aggre_noc);
|
||||
DEFINE_QBCM(bcm_sn8, "SN8", false, &qnm_memnoc);
|
||||
DEFINE_QBCM(bcm_sn9, "SN9", false, &qnm_memnoc_pcie);
|
||||
DEFINE_QBCM(bcm_sn10, "SN10", false, &qnm_ipa, &xm_ipa2pcie_slv);
|
||||
static struct qcom_icc_node acm_tcu = {
|
||||
.name = "acm_tcu",
|
||||
.id = SDX65_MASTER_TCU_0,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 3,
|
||||
.links = { SDX65_SLAVE_LLCC,
|
||||
SDX65_SLAVE_MEM_NOC_SNOC,
|
||||
SDX65_SLAVE_MEM_NOC_PCIE_SNOC
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qnm_snoc_gc = {
|
||||
.name = "qnm_snoc_gc",
|
||||
.id = SDX65_MASTER_SNOC_GC_MEM_NOC,
|
||||
.channels = 1,
|
||||
.buswidth = 16,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_SLAVE_LLCC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_apps_rdwr = {
|
||||
.name = "xm_apps_rdwr",
|
||||
.id = SDX65_MASTER_APPSS_PROC,
|
||||
.channels = 1,
|
||||
.buswidth = 16,
|
||||
.num_links = 3,
|
||||
.links = { SDX65_SLAVE_LLCC,
|
||||
SDX65_SLAVE_MEM_NOC_SNOC,
|
||||
SDX65_SLAVE_MEM_NOC_PCIE_SNOC
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_audio = {
|
||||
.name = "qhm_audio",
|
||||
.id = SDX65_MASTER_AUDIO,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_SLAVE_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_blsp1 = {
|
||||
.name = "qhm_blsp1",
|
||||
.id = SDX65_MASTER_BLSP_1,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_SLAVE_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_qdss_bam = {
|
||||
.name = "qhm_qdss_bam",
|
||||
.id = SDX65_MASTER_QDSS_BAM,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 26,
|
||||
.links = { SDX65_SLAVE_AOSS,
|
||||
SDX65_SLAVE_AUDIO,
|
||||
SDX65_SLAVE_BLSP_1,
|
||||
SDX65_SLAVE_CLK_CTL,
|
||||
SDX65_SLAVE_CRYPTO_0_CFG,
|
||||
SDX65_SLAVE_CNOC_DDRSS,
|
||||
SDX65_SLAVE_ECC_CFG,
|
||||
SDX65_SLAVE_IMEM_CFG,
|
||||
SDX65_SLAVE_IPA_CFG,
|
||||
SDX65_SLAVE_CNOC_MSS,
|
||||
SDX65_SLAVE_PCIE_PARF,
|
||||
SDX65_SLAVE_PDM,
|
||||
SDX65_SLAVE_PRNG,
|
||||
SDX65_SLAVE_QDSS_CFG,
|
||||
SDX65_SLAVE_QPIC,
|
||||
SDX65_SLAVE_SDCC_1,
|
||||
SDX65_SLAVE_SNOC_CFG,
|
||||
SDX65_SLAVE_SPMI_FETCHER,
|
||||
SDX65_SLAVE_SPMI_VGI_COEX,
|
||||
SDX65_SLAVE_TCSR,
|
||||
SDX65_SLAVE_TLMM,
|
||||
SDX65_SLAVE_USB3,
|
||||
SDX65_SLAVE_USB3_PHY_CFG,
|
||||
SDX65_SLAVE_SNOC_MEM_NOC_GC,
|
||||
SDX65_SLAVE_IMEM,
|
||||
SDX65_SLAVE_TCU
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_qpic = {
|
||||
.name = "qhm_qpic",
|
||||
.id = SDX65_MASTER_QPIC,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 4,
|
||||
.links = { SDX65_SLAVE_AOSS,
|
||||
SDX65_SLAVE_AUDIO,
|
||||
SDX65_SLAVE_IPA_CFG,
|
||||
SDX65_SLAVE_ANOC_SNOC
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_snoc_cfg = {
|
||||
.name = "qhm_snoc_cfg",
|
||||
.id = SDX65_MASTER_SNOC_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_SLAVE_SERVICE_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhm_spmi_fetcher1 = {
|
||||
.name = "qhm_spmi_fetcher1",
|
||||
.id = SDX65_MASTER_SPMI_FETCHER,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 2,
|
||||
.links = { SDX65_SLAVE_AOSS,
|
||||
SDX65_SLAVE_ANOC_SNOC
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qnm_aggre_noc = {
|
||||
.name = "qnm_aggre_noc",
|
||||
.id = SDX65_MASTER_ANOC_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 29,
|
||||
.links = { SDX65_SLAVE_AOSS,
|
||||
SDX65_SLAVE_APPSS,
|
||||
SDX65_SLAVE_AUDIO,
|
||||
SDX65_SLAVE_BLSP_1,
|
||||
SDX65_SLAVE_CLK_CTL,
|
||||
SDX65_SLAVE_CRYPTO_0_CFG,
|
||||
SDX65_SLAVE_CNOC_DDRSS,
|
||||
SDX65_SLAVE_ECC_CFG,
|
||||
SDX65_SLAVE_IMEM_CFG,
|
||||
SDX65_SLAVE_IPA_CFG,
|
||||
SDX65_SLAVE_CNOC_MSS,
|
||||
SDX65_SLAVE_PCIE_PARF,
|
||||
SDX65_SLAVE_PDM,
|
||||
SDX65_SLAVE_PRNG,
|
||||
SDX65_SLAVE_QDSS_CFG,
|
||||
SDX65_SLAVE_QPIC,
|
||||
SDX65_SLAVE_SDCC_1,
|
||||
SDX65_SLAVE_SNOC_CFG,
|
||||
SDX65_SLAVE_SPMI_FETCHER,
|
||||
SDX65_SLAVE_SPMI_VGI_COEX,
|
||||
SDX65_SLAVE_TCSR,
|
||||
SDX65_SLAVE_TLMM,
|
||||
SDX65_SLAVE_USB3,
|
||||
SDX65_SLAVE_USB3_PHY_CFG,
|
||||
SDX65_SLAVE_SNOC_MEM_NOC_GC,
|
||||
SDX65_SLAVE_IMEM,
|
||||
SDX65_SLAVE_PCIE_0,
|
||||
SDX65_SLAVE_QDSS_STM,
|
||||
SDX65_SLAVE_TCU
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qnm_ipa = {
|
||||
.name = "qnm_ipa",
|
||||
.id = SDX65_MASTER_IPA,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 26,
|
||||
.links = { SDX65_SLAVE_AOSS,
|
||||
SDX65_SLAVE_AUDIO,
|
||||
SDX65_SLAVE_BLSP_1,
|
||||
SDX65_SLAVE_CLK_CTL,
|
||||
SDX65_SLAVE_CRYPTO_0_CFG,
|
||||
SDX65_SLAVE_CNOC_DDRSS,
|
||||
SDX65_SLAVE_ECC_CFG,
|
||||
SDX65_SLAVE_IMEM_CFG,
|
||||
SDX65_SLAVE_IPA_CFG,
|
||||
SDX65_SLAVE_CNOC_MSS,
|
||||
SDX65_SLAVE_PCIE_PARF,
|
||||
SDX65_SLAVE_PDM,
|
||||
SDX65_SLAVE_PRNG,
|
||||
SDX65_SLAVE_QDSS_CFG,
|
||||
SDX65_SLAVE_QPIC,
|
||||
SDX65_SLAVE_SDCC_1,
|
||||
SDX65_SLAVE_SNOC_CFG,
|
||||
SDX65_SLAVE_SPMI_FETCHER,
|
||||
SDX65_SLAVE_TCSR,
|
||||
SDX65_SLAVE_TLMM,
|
||||
SDX65_SLAVE_USB3,
|
||||
SDX65_SLAVE_USB3_PHY_CFG,
|
||||
SDX65_SLAVE_SNOC_MEM_NOC_GC,
|
||||
SDX65_SLAVE_IMEM,
|
||||
SDX65_SLAVE_PCIE_0,
|
||||
SDX65_SLAVE_QDSS_STM
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qnm_memnoc = {
|
||||
.name = "qnm_memnoc",
|
||||
.id = SDX65_MASTER_MEM_NOC_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 27,
|
||||
.links = { SDX65_SLAVE_AOSS,
|
||||
SDX65_SLAVE_APPSS,
|
||||
SDX65_SLAVE_AUDIO,
|
||||
SDX65_SLAVE_BLSP_1,
|
||||
SDX65_SLAVE_CLK_CTL,
|
||||
SDX65_SLAVE_CRYPTO_0_CFG,
|
||||
SDX65_SLAVE_CNOC_DDRSS,
|
||||
SDX65_SLAVE_ECC_CFG,
|
||||
SDX65_SLAVE_IMEM_CFG,
|
||||
SDX65_SLAVE_IPA_CFG,
|
||||
SDX65_SLAVE_CNOC_MSS,
|
||||
SDX65_SLAVE_PCIE_PARF,
|
||||
SDX65_SLAVE_PDM,
|
||||
SDX65_SLAVE_PRNG,
|
||||
SDX65_SLAVE_QDSS_CFG,
|
||||
SDX65_SLAVE_QPIC,
|
||||
SDX65_SLAVE_SDCC_1,
|
||||
SDX65_SLAVE_SNOC_CFG,
|
||||
SDX65_SLAVE_SPMI_FETCHER,
|
||||
SDX65_SLAVE_SPMI_VGI_COEX,
|
||||
SDX65_SLAVE_TCSR,
|
||||
SDX65_SLAVE_TLMM,
|
||||
SDX65_SLAVE_USB3,
|
||||
SDX65_SLAVE_USB3_PHY_CFG,
|
||||
SDX65_SLAVE_IMEM,
|
||||
SDX65_SLAVE_QDSS_STM,
|
||||
SDX65_SLAVE_TCU
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qnm_memnoc_pcie = {
|
||||
.name = "qnm_memnoc_pcie",
|
||||
.id = SDX65_MASTER_MEM_NOC_PCIE_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_SLAVE_PCIE_0 },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qxm_crypto = {
|
||||
.name = "qxm_crypto",
|
||||
.id = SDX65_MASTER_CRYPTO,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 2,
|
||||
.links = { SDX65_SLAVE_AOSS,
|
||||
SDX65_SLAVE_ANOC_SNOC
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_ipa2pcie_slv = {
|
||||
.name = "xm_ipa2pcie_slv",
|
||||
.id = SDX65_MASTER_IPA_PCIE,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_SLAVE_PCIE_0 },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_pcie = {
|
||||
.name = "xm_pcie",
|
||||
.id = SDX65_MASTER_PCIE_0,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_SLAVE_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_qdss_etr = {
|
||||
.name = "xm_qdss_etr",
|
||||
.id = SDX65_MASTER_QDSS_ETR,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 26,
|
||||
.links = { SDX65_SLAVE_AOSS,
|
||||
SDX65_SLAVE_AUDIO,
|
||||
SDX65_SLAVE_BLSP_1,
|
||||
SDX65_SLAVE_CLK_CTL,
|
||||
SDX65_SLAVE_CRYPTO_0_CFG,
|
||||
SDX65_SLAVE_CNOC_DDRSS,
|
||||
SDX65_SLAVE_ECC_CFG,
|
||||
SDX65_SLAVE_IMEM_CFG,
|
||||
SDX65_SLAVE_IPA_CFG,
|
||||
SDX65_SLAVE_CNOC_MSS,
|
||||
SDX65_SLAVE_PCIE_PARF,
|
||||
SDX65_SLAVE_PDM,
|
||||
SDX65_SLAVE_PRNG,
|
||||
SDX65_SLAVE_QDSS_CFG,
|
||||
SDX65_SLAVE_QPIC,
|
||||
SDX65_SLAVE_SDCC_1,
|
||||
SDX65_SLAVE_SNOC_CFG,
|
||||
SDX65_SLAVE_SPMI_FETCHER,
|
||||
SDX65_SLAVE_SPMI_VGI_COEX,
|
||||
SDX65_SLAVE_TCSR,
|
||||
SDX65_SLAVE_TLMM,
|
||||
SDX65_SLAVE_USB3,
|
||||
SDX65_SLAVE_USB3_PHY_CFG,
|
||||
SDX65_SLAVE_SNOC_MEM_NOC_GC,
|
||||
SDX65_SLAVE_IMEM,
|
||||
SDX65_SLAVE_TCU
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_sdc1 = {
|
||||
.name = "xm_sdc1",
|
||||
.id = SDX65_MASTER_SDCC_1,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 4,
|
||||
.links = { SDX65_SLAVE_AOSS,
|
||||
SDX65_SLAVE_AUDIO,
|
||||
SDX65_SLAVE_IPA_CFG,
|
||||
SDX65_SLAVE_ANOC_SNOC
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xm_usb3 = {
|
||||
.name = "xm_usb3",
|
||||
.id = SDX65_MASTER_USB3,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_SLAVE_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node ebi = {
|
||||
.name = "ebi",
|
||||
.id = SDX65_SLAVE_EBI1,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qns_llcc = {
|
||||
.name = "qns_llcc",
|
||||
.id = SDX65_SLAVE_LLCC,
|
||||
.channels = 1,
|
||||
.buswidth = 16,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_MASTER_LLCC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qns_memnoc_snoc = {
|
||||
.name = "qns_memnoc_snoc",
|
||||
.id = SDX65_SLAVE_MEM_NOC_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_MASTER_MEM_NOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qns_sys_pcie = {
|
||||
.name = "qns_sys_pcie",
|
||||
.id = SDX65_SLAVE_MEM_NOC_PCIE_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_MASTER_MEM_NOC_PCIE_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_aoss = {
|
||||
.name = "qhs_aoss",
|
||||
.id = SDX65_SLAVE_AOSS,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_apss = {
|
||||
.name = "qhs_apss",
|
||||
.id = SDX65_SLAVE_APPSS,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_audio = {
|
||||
.name = "qhs_audio",
|
||||
.id = SDX65_SLAVE_AUDIO,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_blsp1 = {
|
||||
.name = "qhs_blsp1",
|
||||
.id = SDX65_SLAVE_BLSP_1,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_clk_ctl = {
|
||||
.name = "qhs_clk_ctl",
|
||||
.id = SDX65_SLAVE_CLK_CTL,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_crypto0_cfg = {
|
||||
.name = "qhs_crypto0_cfg",
|
||||
.id = SDX65_SLAVE_CRYPTO_0_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_ddrss_cfg = {
|
||||
.name = "qhs_ddrss_cfg",
|
||||
.id = SDX65_SLAVE_CNOC_DDRSS,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_ecc_cfg = {
|
||||
.name = "qhs_ecc_cfg",
|
||||
.id = SDX65_SLAVE_ECC_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_imem_cfg = {
|
||||
.name = "qhs_imem_cfg",
|
||||
.id = SDX65_SLAVE_IMEM_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_ipa = {
|
||||
.name = "qhs_ipa",
|
||||
.id = SDX65_SLAVE_IPA_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_mss_cfg = {
|
||||
.name = "qhs_mss_cfg",
|
||||
.id = SDX65_SLAVE_CNOC_MSS,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_pcie_parf = {
|
||||
.name = "qhs_pcie_parf",
|
||||
.id = SDX65_SLAVE_PCIE_PARF,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_pdm = {
|
||||
.name = "qhs_pdm",
|
||||
.id = SDX65_SLAVE_PDM,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_prng = {
|
||||
.name = "qhs_prng",
|
||||
.id = SDX65_SLAVE_PRNG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_qdss_cfg = {
|
||||
.name = "qhs_qdss_cfg",
|
||||
.id = SDX65_SLAVE_QDSS_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_qpic = {
|
||||
.name = "qhs_qpic",
|
||||
.id = SDX65_SLAVE_QPIC,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_sdc1 = {
|
||||
.name = "qhs_sdc1",
|
||||
.id = SDX65_SLAVE_SDCC_1,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_snoc_cfg = {
|
||||
.name = "qhs_snoc_cfg",
|
||||
.id = SDX65_SLAVE_SNOC_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_MASTER_SNOC_CFG },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_spmi_fetcher = {
|
||||
.name = "qhs_spmi_fetcher",
|
||||
.id = SDX65_SLAVE_SPMI_FETCHER,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_spmi_vgi_coex = {
|
||||
.name = "qhs_spmi_vgi_coex",
|
||||
.id = SDX65_SLAVE_SPMI_VGI_COEX,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_tcsr = {
|
||||
.name = "qhs_tcsr",
|
||||
.id = SDX65_SLAVE_TCSR,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_tlmm = {
|
||||
.name = "qhs_tlmm",
|
||||
.id = SDX65_SLAVE_TLMM,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_usb3 = {
|
||||
.name = "qhs_usb3",
|
||||
.id = SDX65_SLAVE_USB3,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qhs_usb3_phy = {
|
||||
.name = "qhs_usb3_phy",
|
||||
.id = SDX65_SLAVE_USB3_PHY_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qns_aggre_noc = {
|
||||
.name = "qns_aggre_noc",
|
||||
.id = SDX65_SLAVE_ANOC_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_MASTER_ANOC_SNOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qns_snoc_memnoc = {
|
||||
.name = "qns_snoc_memnoc",
|
||||
.id = SDX65_SLAVE_SNOC_MEM_NOC_GC,
|
||||
.channels = 1,
|
||||
.buswidth = 16,
|
||||
.num_links = 1,
|
||||
.links = { SDX65_MASTER_SNOC_GC_MEM_NOC },
|
||||
};
|
||||
|
||||
static struct qcom_icc_node qxs_imem = {
|
||||
.name = "qxs_imem",
|
||||
.id = SDX65_SLAVE_IMEM,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node srvc_snoc = {
|
||||
.name = "srvc_snoc",
|
||||
.id = SDX65_SLAVE_SERVICE_SNOC,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xs_pcie = {
|
||||
.name = "xs_pcie",
|
||||
.id = SDX65_SLAVE_PCIE_0,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xs_qdss_stm = {
|
||||
.name = "xs_qdss_stm",
|
||||
.id = SDX65_SLAVE_QDSS_STM,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node xs_sys_tcu_cfg = {
|
||||
.name = "xs_sys_tcu_cfg",
|
||||
.id = SDX65_SLAVE_TCU,
|
||||
.channels = 1,
|
||||
.buswidth = 8,
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_ce0 = {
|
||||
.name = "CE0",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qxm_crypto },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_mc0 = {
|
||||
.name = "MC0",
|
||||
.keepalive = true,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &ebi },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_pn0 = {
|
||||
.name = "PN0",
|
||||
.keepalive = true,
|
||||
.num_nodes = 26,
|
||||
.nodes = { &qhm_snoc_cfg,
|
||||
&qhs_aoss,
|
||||
&qhs_apss,
|
||||
&qhs_audio,
|
||||
&qhs_blsp1,
|
||||
&qhs_clk_ctl,
|
||||
&qhs_crypto0_cfg,
|
||||
&qhs_ddrss_cfg,
|
||||
&qhs_ecc_cfg,
|
||||
&qhs_imem_cfg,
|
||||
&qhs_ipa,
|
||||
&qhs_mss_cfg,
|
||||
&qhs_pcie_parf,
|
||||
&qhs_pdm,
|
||||
&qhs_prng,
|
||||
&qhs_qdss_cfg,
|
||||
&qhs_qpic,
|
||||
&qhs_sdc1,
|
||||
&qhs_snoc_cfg,
|
||||
&qhs_spmi_fetcher,
|
||||
&qhs_spmi_vgi_coex,
|
||||
&qhs_tcsr,
|
||||
&qhs_tlmm,
|
||||
&qhs_usb3,
|
||||
&qhs_usb3_phy,
|
||||
&srvc_snoc
|
||||
},
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_pn1 = {
|
||||
.name = "PN1",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &xm_sdc1 },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_pn2 = {
|
||||
.name = "PN2",
|
||||
.keepalive = false,
|
||||
.num_nodes = 2,
|
||||
.nodes = { &qhm_audio, &qhm_spmi_fetcher1 },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_pn3 = {
|
||||
.name = "PN3",
|
||||
.keepalive = false,
|
||||
.num_nodes = 2,
|
||||
.nodes = { &qhm_blsp1, &qhm_qpic },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_pn4 = {
|
||||
.name = "PN4",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qxm_crypto },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sh0 = {
|
||||
.name = "SH0",
|
||||
.keepalive = true,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qns_llcc },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sh1 = {
|
||||
.name = "SH1",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qns_memnoc_snoc },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sh3 = {
|
||||
.name = "SH3",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &xm_apps_rdwr },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn0 = {
|
||||
.name = "SN0",
|
||||
.keepalive = true,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qns_snoc_memnoc },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn1 = {
|
||||
.name = "SN1",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qxs_imem },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn2 = {
|
||||
.name = "SN2",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &xs_qdss_stm },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn3 = {
|
||||
.name = "SN3",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &xs_sys_tcu_cfg },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn5 = {
|
||||
.name = "SN5",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &xs_pcie },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn6 = {
|
||||
.name = "SN6",
|
||||
.keepalive = false,
|
||||
.num_nodes = 2,
|
||||
.nodes = { &qhm_qdss_bam, &xm_qdss_etr },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn7 = {
|
||||
.name = "SN7",
|
||||
.keepalive = false,
|
||||
.num_nodes = 4,
|
||||
.nodes = { &qnm_aggre_noc, &xm_pcie, &xm_usb3, &qns_aggre_noc },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn8 = {
|
||||
.name = "SN8",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qnm_memnoc },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn9 = {
|
||||
.name = "SN9",
|
||||
.keepalive = false,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &qnm_memnoc_pcie },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn10 = {
|
||||
.name = "SN10",
|
||||
.keepalive = false,
|
||||
.num_nodes = 2,
|
||||
.nodes = { &qnm_ipa, &xm_ipa2pcie_slv },
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm * const mc_virt_bcms[] = {
|
||||
&bcm_mc0,
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -158,5 +158,11 @@
|
|||
#define SM8250_SLAVE_VSENSE_CTRL_CFG 147
|
||||
#define SM8250_SNOC_CNOC_MAS 148
|
||||
#define SM8250_SNOC_CNOC_SLV 149
|
||||
#define SM8250_MASTER_QUP_CORE_0 150
|
||||
#define SM8250_MASTER_QUP_CORE_1 151
|
||||
#define SM8250_MASTER_QUP_CORE_2 152
|
||||
#define SM8250_SLAVE_QUP_CORE_0 153
|
||||
#define SM8250_SLAVE_QUP_CORE_1 154
|
||||
#define SM8250_SLAVE_QUP_CORE_2 155
|
||||
|
||||
#endif
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -8,7 +8,9 @@
|
|||
#include <linux/interconnect.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <dt-bindings/interconnect/qcom,sm8450.h>
|
||||
|
||||
#include "bcm-voter.h"
|
||||
|
@ -1886,6 +1888,7 @@ static struct platform_driver qnoc_driver = {
|
|||
.driver = {
|
||||
.name = "qnoc-sm8450",
|
||||
.of_match_table = qnoc_of_match,
|
||||
.sync_state = icc_sync_state,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
#include <linux/interconnect.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <dt-bindings/interconnect/qcom,sm8550-rpmh.h>
|
||||
|
||||
#include "bcm-voter.h"
|
||||
|
|
|
@ -8,14 +8,13 @@
|
|||
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/soc/qcom/smd-rpm.h>
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
#define RPM_KEY_BW 0x00007762
|
||||
#define QCOM_RPM_SMD_KEY_RATE 0x007a484b
|
||||
|
||||
static struct qcom_smd_rpm *icc_smd_rpm;
|
||||
|
||||
|
@ -44,6 +43,26 @@ int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u32 val)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_icc_rpm_smd_send);
|
||||
|
||||
int qcom_icc_rpm_set_bus_rate(const struct rpm_clk_resource *clk, int ctx, u32 rate)
|
||||
{
|
||||
struct clk_smd_rpm_req req = {
|
||||
.key = cpu_to_le32(QCOM_RPM_SMD_KEY_RATE),
|
||||
.nbytes = cpu_to_le32(sizeof(u32)),
|
||||
};
|
||||
|
||||
/* Branch clocks are only on/off */
|
||||
if (clk->branch)
|
||||
rate = !!rate;
|
||||
|
||||
req.value = cpu_to_le32(rate);
|
||||
return qcom_rpm_smd_write(icc_smd_rpm,
|
||||
ctx,
|
||||
clk->resource_type,
|
||||
clk->clock_id,
|
||||
&req, sizeof(req));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_icc_rpm_set_bus_rate);
|
||||
|
||||
static int qcom_icc_rpm_smd_remove(struct platform_device *pdev)
|
||||
{
|
||||
icc_smd_rpm = NULL;
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2019, Linaro Ltd.
|
||||
* Author: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
*/
|
||||
|
||||
#ifndef __DRIVERS_INTERCONNECT_QCOM_SMD_RPM_H
|
||||
#define __DRIVERS_INTERCONNECT_QCOM_SMD_RPM_H
|
||||
|
||||
#include <linux/soc/qcom/smd-rpm.h>
|
||||
|
||||
bool qcom_icc_rpm_smd_available(void);
|
||||
int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u32 val);
|
||||
|
||||
#endif
|
|
@ -19,7 +19,6 @@
|
|||
/**
|
||||
* struct qcom_smd_rpm - state of the rpm device driver
|
||||
* @rpm_channel: reference to the smd channel
|
||||
* @icc: interconnect proxy device
|
||||
* @dev: rpm device
|
||||
* @ack: completion for acks
|
||||
* @lock: mutual exclusion around the send/complete pair
|
||||
|
@ -27,7 +26,6 @@
|
|||
*/
|
||||
struct qcom_smd_rpm {
|
||||
struct rpmsg_endpoint *rpm_channel;
|
||||
struct platform_device *icc;
|
||||
struct device *dev;
|
||||
|
||||
struct completion ack;
|
||||
|
@ -197,7 +195,6 @@ static int qcom_smd_rpm_callback(struct rpmsg_device *rpdev,
|
|||
static int qcom_smd_rpm_probe(struct rpmsg_device *rpdev)
|
||||
{
|
||||
struct qcom_smd_rpm *rpm;
|
||||
int ret;
|
||||
|
||||
rpm = devm_kzalloc(&rpdev->dev, sizeof(*rpm), GFP_KERNEL);
|
||||
if (!rpm)
|
||||
|
@ -210,23 +207,11 @@ static int qcom_smd_rpm_probe(struct rpmsg_device *rpdev)
|
|||
rpm->rpm_channel = rpdev->ept;
|
||||
dev_set_drvdata(&rpdev->dev, rpm);
|
||||
|
||||
rpm->icc = platform_device_register_data(&rpdev->dev, "icc_smd_rpm", -1,
|
||||
NULL, 0);
|
||||
if (IS_ERR(rpm->icc))
|
||||
return PTR_ERR(rpm->icc);
|
||||
|
||||
ret = of_platform_populate(rpdev->dev.of_node, NULL, NULL, &rpdev->dev);
|
||||
if (ret)
|
||||
platform_device_unregister(rpm->icc);
|
||||
|
||||
return ret;
|
||||
return of_platform_populate(rpdev->dev.of_node, NULL, NULL, &rpdev->dev);
|
||||
}
|
||||
|
||||
static void qcom_smd_rpm_remove(struct rpmsg_device *rpdev)
|
||||
{
|
||||
struct qcom_smd_rpm *rpm = dev_get_drvdata(&rpdev->dev);
|
||||
|
||||
platform_device_unregister(rpm->icc);
|
||||
of_platform_depopulate(&rpdev->dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -904,8 +904,52 @@ EXPORT_SYMBOL_GPL(debugfs_create_str);
|
|||
static ssize_t debugfs_write_file_str(struct file *file, const char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
/* This is really only for read-only strings */
|
||||
return -EINVAL;
|
||||
struct dentry *dentry = F_DENTRY(file);
|
||||
char *old, *new = NULL;
|
||||
int pos = *ppos;
|
||||
int r;
|
||||
|
||||
r = debugfs_file_get(dentry);
|
||||
if (unlikely(r))
|
||||
return r;
|
||||
|
||||
old = *(char **)file->private_data;
|
||||
|
||||
/* only allow strict concatenation */
|
||||
r = -EINVAL;
|
||||
if (pos && pos != strlen(old))
|
||||
goto error;
|
||||
|
||||
r = -E2BIG;
|
||||
if (pos + count + 1 > PAGE_SIZE)
|
||||
goto error;
|
||||
|
||||
r = -ENOMEM;
|
||||
new = kmalloc(pos + count + 1, GFP_KERNEL);
|
||||
if (!new)
|
||||
goto error;
|
||||
|
||||
if (pos)
|
||||
memcpy(new, old, pos);
|
||||
|
||||
r = -EFAULT;
|
||||
if (copy_from_user(new + pos, user_buf, count))
|
||||
goto error;
|
||||
|
||||
new[pos + count] = '\0';
|
||||
strim(new);
|
||||
|
||||
rcu_assign_pointer(*(char **)file->private_data, new);
|
||||
synchronize_rcu();
|
||||
kfree(old);
|
||||
|
||||
debugfs_file_put(dentry);
|
||||
return count;
|
||||
|
||||
error:
|
||||
kfree(new);
|
||||
debugfs_file_put(dentry);
|
||||
return r;
|
||||
}
|
||||
|
||||
static const struct file_operations fops_str = {
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2023, Linaro Limited
|
||||
*/
|
||||
|
||||
#ifndef __DT_BINDINGS_INTERCONNECT_QCOM_RPM_ICC_H
|
||||
#define __DT_BINDINGS_INTERCONNECT_QCOM_RPM_ICC_H
|
||||
|
||||
#define RPM_ACTIVE_TAG (1 << 0)
|
||||
#define RPM_SLEEP_TAG (1 << 1)
|
||||
#define RPM_ALWAYS_TAG (RPM_ACTIVE_TAG | RPM_SLEEP_TAG)
|
||||
|
||||
#endif
|
|
@ -166,4 +166,11 @@
|
|||
#define SLAVE_QDSS_STM 17
|
||||
#define SLAVE_TCU 18
|
||||
|
||||
#define MASTER_QUP_CORE_0 0
|
||||
#define MASTER_QUP_CORE_1 1
|
||||
#define MASTER_QUP_CORE_2 2
|
||||
#define SLAVE_QUP_CORE_0 3
|
||||
#define SLAVE_QUP_CORE_1 4
|
||||
#define SLAVE_QUP_CORE_2 5
|
||||
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,7 @@ struct icc_node_data {
|
|||
*/
|
||||
struct icc_onecell_data {
|
||||
unsigned int num_nodes;
|
||||
struct icc_node *nodes[];
|
||||
struct icc_node *nodes[] __counted_by(num_nodes);
|
||||
};
|
||||
|
||||
struct icc_node *of_icc_xlate_onecell(struct of_phandle_args *spec,
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
#ifndef __QCOM_SMD_RPM_H__
|
||||
#define __QCOM_SMD_RPM_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct qcom_smd_rpm;
|
||||
|
||||
#define QCOM_SMD_RPM_ACTIVE_STATE 0
|
||||
#define QCOM_SMD_RPM_SLEEP_STATE 1
|
||||
#define QCOM_SMD_RPM_ACTIVE_STATE 0
|
||||
#define QCOM_SMD_RPM_SLEEP_STATE 1
|
||||
#define QCOM_SMD_RPM_STATE_NUM 2
|
||||
|
||||
/*
|
||||
* Constants used for addressing resources in the RPM.
|
||||
|
@ -44,6 +47,19 @@ struct qcom_smd_rpm;
|
|||
#define QCOM_SMD_RPM_PKA_CLK 0x616b70
|
||||
#define QCOM_SMD_RPM_MCFG_CLK 0x6766636d
|
||||
|
||||
#define QCOM_RPM_KEY_SOFTWARE_ENABLE 0x6e657773
|
||||
#define QCOM_RPM_KEY_PIN_CTRL_CLK_BUFFER_ENABLE_KEY 0x62636370
|
||||
#define QCOM_RPM_SMD_KEY_RATE 0x007a484b
|
||||
#define QCOM_RPM_SMD_KEY_ENABLE 0x62616e45
|
||||
#define QCOM_RPM_SMD_KEY_STATE 0x54415453
|
||||
#define QCOM_RPM_SCALING_ENABLE_ID 0x2
|
||||
|
||||
struct clk_smd_rpm_req {
|
||||
__le32 key;
|
||||
__le32 nbytes;
|
||||
__le32 value;
|
||||
};
|
||||
|
||||
int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm,
|
||||
int state,
|
||||
u32 resource_type, u32 resource_id,
|
||||
|
|
Загрузка…
Ссылка в новой задаче