Describe the Universal Bandwidth Compression (UBWC) configuration
for the Milos SoC.

Signed-off-by: Luca Weiss <[email protected]>
---
 drivers/soc/qcom/ubwc_config.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/soc/qcom/ubwc_config.c b/drivers/soc/qcom/ubwc_config.c
index 15d373bff231..790e67c7db3e 100644
--- a/drivers/soc/qcom/ubwc_config.c
+++ b/drivers/soc/qcom/ubwc_config.c
@@ -16,6 +16,17 @@ static const struct qcom_ubwc_cfg_data no_ubwc_data = {
        /* no UBWC, no HBB */
 };
 
+static const struct qcom_ubwc_cfg_data milos_data = {
+       .ubwc_enc_version = UBWC_4_0,
+       .ubwc_dec_version = UBWC_4_0,
+       .ubwc_swizzle = UBWC_SWIZZLE_ENABLE_LVL2 |
+                       UBWC_SWIZZLE_ENABLE_LVL3,
+       .ubwc_bank_spread = true,
+       /* TODO: highest_bank_bit = 14 for LP_DDR4 */
+       .highest_bank_bit = 15,
+       .macrotile_mode = true,
+};
+
 static const struct qcom_ubwc_cfg_data msm8937_data = {
        .ubwc_enc_version = UBWC_1_0,
        .ubwc_dec_version = UBWC_1_0,
@@ -223,6 +234,7 @@ static const struct of_device_id qcom_ubwc_configs[] 
__maybe_unused = {
        { .compatible = "qcom,apq8026", .data = &no_ubwc_data },
        { .compatible = "qcom,apq8074", .data = &no_ubwc_data },
        { .compatible = "qcom,apq8096", .data = &msm8998_data },
+       { .compatible = "qcom,milos", .data = &milos_data },
        { .compatible = "qcom,msm8226", .data = &no_ubwc_data },
        { .compatible = "qcom,msm8916", .data = &no_ubwc_data },
        { .compatible = "qcom,msm8917", .data = &no_ubwc_data },

-- 
2.52.0

Reply via email to