interconnect: qcom: osm-l3: Add sc8180x support
authorBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 25 Jul 2021 02:58:34 +0000 (19:58 -0700)
committerGeorgi Djakov <djakov@kernel.org>
Mon, 9 Aug 2021 12:17:25 +0000 (15:17 +0300)
Add support for the Qualcomm SC8180x platform to the OSM L3 driver.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20210725025834.3941777-2-bjorn.andersson@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
drivers/interconnect/qcom/osm-l3.c
drivers/interconnect/qcom/sc8180x.h

index 695f287..13e41b9 100644 (file)
@@ -15,6 +15,7 @@
 #include <dt-bindings/interconnect/qcom,osm-l3.h>
 
 #include "sc7180.h"
+#include "sc8180x.h"
 #include "sdm845.h"
 #include "sm8150.h"
 #include "sm8250.h"
@@ -113,6 +114,22 @@ static const struct qcom_icc_desc sc7180_icc_osm_l3 = {
        .reg_perf_state = OSM_REG_PERF_STATE,
 };
 
+DEFINE_QNODE(sc8180x_osm_apps_l3, SC8180X_MASTER_OSM_L3_APPS, 32, SC8180X_SLAVE_OSM_L3);
+DEFINE_QNODE(sc8180x_osm_l3, SC8180X_SLAVE_OSM_L3, 32);
+
+static const struct qcom_icc_node *sc8180x_osm_l3_nodes[] = {
+       [MASTER_OSM_L3_APPS] = &sc8180x_osm_apps_l3,
+       [SLAVE_OSM_L3] = &sc8180x_osm_l3,
+};
+
+static const struct qcom_icc_desc sc8180x_icc_osm_l3 = {
+       .nodes = sc8180x_osm_l3_nodes,
+       .num_nodes = ARRAY_SIZE(sc8180x_osm_l3_nodes),
+       .lut_row_size = OSM_LUT_ROW_SIZE,
+       .reg_freq_lut = OSM_REG_FREQ_LUT,
+       .reg_perf_state = OSM_REG_PERF_STATE,
+};
+
 DEFINE_QNODE(sm8150_osm_apps_l3, SM8150_MASTER_OSM_L3_APPS, 32, SM8150_SLAVE_OSM_L3);
 DEFINE_QNODE(sm8150_osm_l3, SM8150_SLAVE_OSM_L3, 32);
 
@@ -311,6 +328,7 @@ static const struct of_device_id osm_l3_of_match[] = {
        { .compatible = "qcom,sc7180-osm-l3", .data = &sc7180_icc_osm_l3 },
        { .compatible = "qcom,sdm845-osm-l3", .data = &sdm845_icc_osm_l3 },
        { .compatible = "qcom,sm8150-osm-l3", .data = &sm8150_icc_osm_l3 },
+       { .compatible = "qcom,sc8180x-osm-l3", .data = &sc8180x_icc_osm_l3 },
        { .compatible = "qcom,sm8250-epss-l3", .data = &sm8250_icc_epss_l3 },
        { }
 };
index fed2dc2..e70cf70 100644 (file)
 #define SC8180X_SLAVE_EBI_CH0_DISPLAY          158
 #define SC8180X_SLAVE_MNOC_SF_MEM_NOC_DISPLAY  159
 #define SC8180X_SLAVE_MNOC_HF_MEM_NOC_DISPLAY  160
+#define SC8180X_MASTER_OSM_L3_APPS             161
+#define SC8180X_SLAVE_OSM_L3                   162
 
 #endif