Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

interconnect: qcom: Add EPSS L3 support on SM8250

Add Epoch Subsystem (EPSS) L3 interconnect provider support on
SM8250 SoCs.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Link: https://lore.kernel.org/r/20200801123049.32398-6-sibis@codeaurora.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>

authored by

Sibi Sankar and committed by
Georgi Djakov
d7e19be6 c4877059

+25
+23
drivers/interconnect/qcom/osm-l3.c
··· 17 17 #include "sc7180.h" 18 18 #include "sdm845.h" 19 19 #include "sm8150.h" 20 + #include "sm8250.h" 20 21 21 22 #define LUT_MAX_ENTRIES 40U 22 23 #define LUT_SRC GENMASK(31, 30) ··· 29 28 #define OSM_LUT_ROW_SIZE 32 30 29 #define OSM_REG_FREQ_LUT 0x110 31 30 #define OSM_REG_PERF_STATE 0x920 31 + 32 + /* EPSS Register offsets */ 33 + #define EPSS_LUT_ROW_SIZE 4 34 + #define EPSS_REG_FREQ_LUT 0x100 35 + #define EPSS_REG_PERF_STATE 0x320 32 36 33 37 #define OSM_L3_MAX_LINKS 1 34 38 ··· 127 121 .lut_row_size = OSM_LUT_ROW_SIZE, 128 122 .reg_freq_lut = OSM_REG_FREQ_LUT, 129 123 .reg_perf_state = OSM_REG_PERF_STATE, 124 + }; 125 + 126 + DEFINE_QNODE(sm8250_epss_apps_l3, SM8250_MASTER_EPSS_L3_APPS, 32, SM8250_SLAVE_EPSS_L3); 127 + DEFINE_QNODE(sm8250_epss_l3, SM8250_SLAVE_EPSS_L3, 32); 128 + 129 + static struct qcom_icc_node *sm8250_epss_l3_nodes[] = { 130 + [MASTER_EPSS_L3_APPS] = &sm8250_epss_apps_l3, 131 + [SLAVE_EPSS_L3_SHARED] = &sm8250_epss_l3, 132 + }; 133 + 134 + static const struct qcom_icc_desc sm8250_icc_epss_l3 = { 135 + .nodes = sm8250_epss_l3_nodes, 136 + .num_nodes = ARRAY_SIZE(sm8250_epss_l3_nodes), 137 + .lut_row_size = EPSS_LUT_ROW_SIZE, 138 + .reg_freq_lut = EPSS_REG_FREQ_LUT, 139 + .reg_perf_state = EPSS_REG_PERF_STATE, 130 140 }; 131 141 132 142 static int qcom_icc_set(struct icc_node *src, struct icc_node *dst) ··· 310 288 { .compatible = "qcom,sc7180-osm-l3", .data = &sc7180_icc_osm_l3 }, 311 289 { .compatible = "qcom,sdm845-osm-l3", .data = &sdm845_icc_osm_l3 }, 312 290 { .compatible = "qcom,sm8150-osm-l3", .data = &sm8150_icc_osm_l3 }, 291 + { .compatible = "qcom,sm8250-epss-l3", .data = &sm8250_icc_epss_l3 }, 313 292 { } 314 293 }; 315 294 MODULE_DEVICE_TABLE(of, osm_l3_of_match);
+2
drivers/interconnect/qcom/sm8250.h
··· 158 158 #define SM8250_SLAVE_VSENSE_CTRL_CFG 147 159 159 #define SM8250_SNOC_CNOC_MAS 148 160 160 #define SM8250_SNOC_CNOC_SLV 149 161 + #define SM8250_MASTER_EPSS_L3_APPS 150 162 + #define SM8250_SLAVE_EPSS_L3 151 161 163 162 164 #endif