From 4fa8fec6c0d0978795323ff1fa536eecdd573d64 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 22 May 2023 23:23:14 +0200 Subject: [PATCH] ipq807x: 6.1: refresh patches Manually refresh tsens, PCI and CPR patches to apply and compile. Then run automatic refresh on rest of the patches. Signed-off-by: Robert Marko --- ...tsens-Add-support-for-combined-inter.patch | 12 ++++----- ...tsens-Allow-configuring-min-and-max-.patch | 6 ++--- ...al-drivers-tsens-Add-IPQ8074-support.patch | 4 +-- ...s-qcom-ipq8074-hk01-add-VQMMC-supply.patch | 2 +- ...ts-qcom-hk01-use-GPIO-flags-for-tlmm.patch | 2 +- ...om-Add-support-for-IPQ8074-Gen3-port.patch | 25 +++++++++++-------- ...remoteproc-qcom-Add-PRNG-proxy-clock.patch | 4 +-- ...moteproc-qcom-Add-secure-PIL-support.patch | 2 +- ...Add-support-for-split-q6-m3-wlan-fir.patch | 4 +-- ...oc-qcom-Add-ssr-subdevice-identifier.patch | 2 +- ...Update-regmap-offsets-for-halt-regis.patch | 4 +-- ...c-wcss-disable-auto-boot-for-IPQ8074.patch | 6 ++--- ...-move-SMEM-item-struct-and-defines-t.patch | 2 +- ...nvmem-reuse-socinfo-SMEM-item-struct.patch | 2 +- ...com-nvmem-use-SoC-ID-s-from-bindings.patch | 2 +- ...em-make-qcom_cpufreq_get_msm_id-retu.patch | 4 +-- ...q-qcom-nvmem-add-support-for-IPQ8074.patch | 8 +++--- ...egulator-add-Qualcomm-CPR-regulators.patch | 19 ++++++-------- 18 files changed, 55 insertions(+), 55 deletions(-) diff --git a/target/linux/ipq807x/patches-6.1/0042-v6.2-thermal-drivers-tsens-Add-support-for-combined-inter.patch b/target/linux/ipq807x/patches-6.1/0042-v6.2-thermal-drivers-tsens-Add-support-for-combined-inter.patch index 2c6e70b14d..0320725999 100644 --- a/target/linux/ipq807x/patches-6.1/0042-v6.2-thermal-drivers-tsens-Add-support-for-combined-inter.patch +++ b/target/linux/ipq807x/patches-6.1/0042-v6.2-thermal-drivers-tsens-Add-support-for-combined-inter.patch @@ -61,7 +61,7 @@ Signed-off-by: Daniel Lezcano .max_sensors = 16, --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c -@@ -531,6 +531,27 @@ static irqreturn_t tsens_irq_thread(int +@@ -532,6 +532,27 @@ static irqreturn_t tsens_irq_thread(int return IRQ_HANDLED; } @@ -86,10 +86,10 @@ Signed-off-by: Daniel Lezcano + return tsens_irq_thread(irq, data); +} + - static int tsens_set_trips(void *_sensor, int low, int high) + static int tsens_set_trips(struct thermal_zone_device *tz, int low, int high) { - struct tsens_sensor *s = _sensor; -@@ -1081,13 +1102,18 @@ static int tsens_register(struct tsens_p + struct tsens_sensor *s = tz->devdata; +@@ -1074,13 +1095,18 @@ static int tsens_register(struct tsens_p tsens_mC_to_hw(priv->sensor, 0)); } @@ -116,7 +116,7 @@ Signed-off-by: Daniel Lezcano } --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h -@@ -495,6 +495,7 @@ enum regfield_ids { +@@ -493,6 +493,7 @@ enum regfield_ids { * struct tsens_features - Features supported by the IP * @ver_major: Major number of IP version * @crit_int: does the IP support critical interrupts? @@ -124,7 +124,7 @@ Signed-off-by: Daniel Lezcano * @adc: do the sensors only output adc code (instead of temperature)? * @srot_split: does the IP neatly splits the register space into SROT and TM, * with SROT only being available to secure boot firmware? -@@ -504,6 +505,7 @@ enum regfield_ids { +@@ -502,6 +503,7 @@ enum regfield_ids { struct tsens_features { unsigned int ver_major; unsigned int crit_int:1; diff --git a/target/linux/ipq807x/patches-6.1/0043-v6.2-thermal-drivers-tsens-Allow-configuring-min-and-max-.patch b/target/linux/ipq807x/patches-6.1/0043-v6.2-thermal-drivers-tsens-Allow-configuring-min-and-max-.patch index 5a571a36b6..363061813a 100644 --- a/target/linux/ipq807x/patches-6.1/0043-v6.2-thermal-drivers-tsens-Allow-configuring-min-and-max-.patch +++ b/target/linux/ipq807x/patches-6.1/0043-v6.2-thermal-drivers-tsens-Allow-configuring-min-and-max-.patch @@ -68,7 +68,7 @@ Signed-off-by: Daniel Lezcano static const struct reg_field tsens_v2_regfields[MAX_REGFIELDS] = { --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c -@@ -572,8 +572,8 @@ static int tsens_set_trips(void *_sensor +@@ -573,8 +573,8 @@ static int tsens_set_trips(struct therma dev_dbg(dev, "[%u] %s: proposed thresholds: (%d:%d)\n", hw_id, __func__, low, high); @@ -81,7 +81,7 @@ Signed-off-by: Daniel Lezcano low_val = tsens_mC_to_hw(s, cl_low); --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h -@@ -501,6 +501,8 @@ enum regfield_ids { +@@ -499,6 +499,8 @@ enum regfield_ids { * with SROT only being available to secure boot firmware? * @has_watchdog: does this IP support watchdog functionality? * @max_sensors: maximum sensors supported by this version of the IP @@ -90,7 +90,7 @@ Signed-off-by: Daniel Lezcano */ struct tsens_features { unsigned int ver_major; -@@ -510,6 +512,8 @@ struct tsens_features { +@@ -508,6 +510,8 @@ struct tsens_features { unsigned int srot_split:1; unsigned int has_watchdog:1; unsigned int max_sensors; diff --git a/target/linux/ipq807x/patches-6.1/0044-v6.2-thermal-drivers-tsens-Add-IPQ8074-support.patch b/target/linux/ipq807x/patches-6.1/0044-v6.2-thermal-drivers-tsens-Add-IPQ8074-support.patch index 3e3e77a0a8..eaea693959 100644 --- a/target/linux/ipq807x/patches-6.1/0044-v6.2-thermal-drivers-tsens-Add-IPQ8074-support.patch +++ b/target/linux/ipq807x/patches-6.1/0044-v6.2-thermal-drivers-tsens-Add-IPQ8074-support.patch @@ -52,7 +52,7 @@ Signed-off-by: Daniel Lezcano .num_sensors = 13, --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c -@@ -991,6 +991,9 @@ static const struct of_device_id tsens_t +@@ -981,6 +981,9 @@ static const struct of_device_id tsens_t .compatible = "qcom,ipq8064-tsens", .data = &data_8960, }, { @@ -64,7 +64,7 @@ Signed-off-by: Daniel Lezcano }, { --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h -@@ -599,6 +599,6 @@ extern struct tsens_plat_data data_8916, +@@ -597,6 +597,6 @@ extern struct tsens_plat_data data_8916, extern struct tsens_plat_data data_tsens_v1, data_8976, data_8956; /* TSENS v2 targets */ diff --git a/target/linux/ipq807x/patches-6.1/0067-v6.2-arm64-dts-qcom-ipq8074-hk01-add-VQMMC-supply.patch b/target/linux/ipq807x/patches-6.1/0067-v6.2-arm64-dts-qcom-ipq8074-hk01-add-VQMMC-supply.patch index af65c0c979..ebd3763a58 100644 --- a/target/linux/ipq807x/patches-6.1/0067-v6.2-arm64-dts-qcom-ipq8074-hk01-add-VQMMC-supply.patch +++ b/target/linux/ipq807x/patches-6.1/0067-v6.2-arm64-dts-qcom-ipq8074-hk01-add-VQMMC-supply.patch @@ -27,7 +27,7 @@ Link: https://lore.kernel.org/r/20220818221815.346233-5-robimarko@gmail.com / { model = "Qualcomm Technologies, Inc. IPQ8074-HK01"; -@@ -82,6 +83,7 @@ +@@ -84,6 +85,7 @@ &sdhc_1 { status = "okay"; diff --git a/target/linux/ipq807x/patches-6.1/0068-v6.2-arm64-dts-qcom-hk01-use-GPIO-flags-for-tlmm.patch b/target/linux/ipq807x/patches-6.1/0068-v6.2-arm64-dts-qcom-hk01-use-GPIO-flags-for-tlmm.patch index 93c57d9ea9..e08f6d1f3c 100644 --- a/target/linux/ipq807x/patches-6.1/0068-v6.2-arm64-dts-qcom-hk01-use-GPIO-flags-for-tlmm.patch +++ b/target/linux/ipq807x/patches-6.1/0068-v6.2-arm64-dts-qcom-hk01-use-GPIO-flags-for-tlmm.patch @@ -25,7 +25,7 @@ Link: https://lore.kernel.org/r/20221107092930.33325-3-robimarko@gmail.com / { model = "Qualcomm Technologies, Inc. IPQ8074-HK01"; -@@ -50,12 +51,12 @@ +@@ -52,12 +53,12 @@ &pcie0 { status = "okay"; diff --git a/target/linux/ipq807x/patches-6.1/0081-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch b/target/linux/ipq807x/patches-6.1/0081-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch index c7a7e7ab49..60caee46ca 100644 --- a/target/linux/ipq807x/patches-6.1/0081-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch +++ b/target/linux/ipq807x/patches-6.1/0081-v6.3-PCI-qcom-Add-support-for-IPQ8074-Gen3-port.patch @@ -1,23 +1,26 @@ -From 76893579a74e7e5c79f0c717d95d13f4cbbb5f4d Mon Sep 17 00:00:00 2001 +From f356132229b18ceef5d5ef9103bbaa9bdeb84c8d Mon Sep 17 00:00:00 2001 From: Robert Marko -Date: Sat, 24 Dec 2022 17:11:16 +0100 -Subject: [PATCH] PCI: qcom: Add support for IPQ8074 Gen3 port +Date: Fri, 13 Jan 2023 17:44:47 +0100 +Subject: [PATCH] PCI: qcom: Add IPQ8074 Gen3 port support IPQ8074 has one Gen2 and one Gen3 port, with Gen2 port already supported. Add compatible for Gen3 port which uses the same controller as IPQ6018. +Link: https://lore.kernel.org/r/20230113164449.906002-7-robimarko@gmail.com Signed-off-by: Robert Marko +Signed-off-by: Lorenzo Pieralisi +Signed-off-by: Bjorn Helgaas --- drivers/pci/controller/dwc/pcie-qcom.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -1733,6 +1733,7 @@ static const struct of_device_id qcom_pc - { .compatible = "qcom,pcie-apq8064", .data = &ipq8064_cfg }, - { .compatible = "qcom,pcie-msm8996", .data = &msm8996_cfg }, - { .compatible = "qcom,pcie-ipq8074", .data = &ipq8074_cfg }, -+ { .compatible = "qcom,pcie-ipq8074-gen3", .data = &ipq6018_cfg }, - { .compatible = "qcom,pcie-ipq4019", .data = &ipq4019_cfg }, - { .compatible = "qcom,pcie-qcs404", .data = &ipq4019_cfg }, - { .compatible = "qcom,pcie-sdm845", .data = &sdm845_cfg }, +@@ -1745,6 +1745,7 @@ static const struct of_device_id qcom_pc + { .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 }, + { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 }, + { .compatible = "qcom,pcie-ipq8074", .data = &cfg_2_3_3 }, ++ { .compatible = "qcom,pcie-ipq8074-gen3", .data = &cfg_2_9_0 }, + { .compatible = "qcom,pcie-msm8996", .data = &cfg_2_3_2 }, + { .compatible = "qcom,pcie-qcs404", .data = &cfg_2_4_0 }, + { .compatible = "qcom,pcie-sa8540p", .data = &cfg_1_9_0 }, diff --git a/target/linux/ipq807x/patches-6.1/0112-remoteproc-qcom-Add-PRNG-proxy-clock.patch b/target/linux/ipq807x/patches-6.1/0112-remoteproc-qcom-Add-PRNG-proxy-clock.patch index 2124bfa3f1..0a984948b5 100644 --- a/target/linux/ipq807x/patches-6.1/0112-remoteproc-qcom-Add-PRNG-proxy-clock.patch +++ b/target/linux/ipq807x/patches-6.1/0112-remoteproc-qcom-Add-PRNG-proxy-clock.patch @@ -136,7 +136,7 @@ Signed-off-by: Nikhil Prakash V if (ret) goto free_rproc; } -@@ -1086,6 +1112,7 @@ static int q6v5_wcss_remove(struct platf +@@ -1087,6 +1113,7 @@ static int q6v5_wcss_remove(struct platf } static const struct wcss_data wcss_ipq8074_res_init = { @@ -144,7 +144,7 @@ Signed-off-by: Nikhil Prakash V .firmware_name = "IPQ8074/q6_fw.mdt", .crash_reason_smem = WCSS_CRASH_REASON, .aon_reset_required = true, -@@ -1095,6 +1122,8 @@ static const struct wcss_data wcss_ipq80 +@@ -1096,6 +1123,8 @@ static const struct wcss_data wcss_ipq80 }; static const struct wcss_data wcss_qcs404_res_init = { diff --git a/target/linux/ipq807x/patches-6.1/0113-remoteproc-qcom-Add-secure-PIL-support.patch b/target/linux/ipq807x/patches-6.1/0113-remoteproc-qcom-Add-secure-PIL-support.patch index 1d415942e0..0328efc041 100644 --- a/target/linux/ipq807x/patches-6.1/0113-remoteproc-qcom-Add-secure-PIL-support.patch +++ b/target/linux/ipq807x/patches-6.1/0113-remoteproc-qcom-Add-secure-PIL-support.patch @@ -133,7 +133,7 @@ Signed-off-by: Nikhil Prakash V ret = q6v5_wcss_init_mmio(wcss, pdev); if (ret) -@@ -1119,6 +1155,7 @@ static const struct wcss_data wcss_ipq80 +@@ -1120,6 +1156,7 @@ static const struct wcss_data wcss_ipq80 .wcss_q6_reset_required = true, .ops = &q6v5_wcss_ipq8074_ops, .requires_force_stop = true, diff --git a/target/linux/ipq807x/patches-6.1/0114-remoteproc-qcom-Add-support-for-split-q6-m3-wlan-fir.patch b/target/linux/ipq807x/patches-6.1/0114-remoteproc-qcom-Add-support-for-split-q6-m3-wlan-fir.patch index 1231824af0..e5c9506c89 100644 --- a/target/linux/ipq807x/patches-6.1/0114-remoteproc-qcom-Add-support-for-split-q6-m3-wlan-fir.patch +++ b/target/linux/ipq807x/patches-6.1/0114-remoteproc-qcom-Add-support-for-split-q6-m3-wlan-fir.patch @@ -82,7 +82,7 @@ Signed-off-by: Nikhil Prakash V ret = q6v5_wcss_init_mmio(wcss, pdev); if (ret) -@@ -1149,7 +1173,8 @@ static int q6v5_wcss_remove(struct platf +@@ -1150,7 +1174,8 @@ static int q6v5_wcss_remove(struct platf static const struct wcss_data wcss_ipq8074_res_init = { .init_clock = ipq8074_init_clock, @@ -92,7 +92,7 @@ Signed-off-by: Nikhil Prakash V .crash_reason_smem = WCSS_CRASH_REASON, .aon_reset_required = true, .wcss_q6_reset_required = true, -@@ -1162,7 +1187,7 @@ static const struct wcss_data wcss_qcs40 +@@ -1163,7 +1188,7 @@ static const struct wcss_data wcss_qcs40 .init_clock = qcs404_init_clock, .init_regulator = qcs404_init_regulator, .crash_reason_smem = WCSS_CRASH_REASON, diff --git a/target/linux/ipq807x/patches-6.1/0115-remoteproc-qcom-Add-ssr-subdevice-identifier.patch b/target/linux/ipq807x/patches-6.1/0115-remoteproc-qcom-Add-ssr-subdevice-identifier.patch index 0ff2d0358b..be63d46e8e 100644 --- a/target/linux/ipq807x/patches-6.1/0115-remoteproc-qcom-Add-ssr-subdevice-identifier.patch +++ b/target/linux/ipq807x/patches-6.1/0115-remoteproc-qcom-Add-ssr-subdevice-identifier.patch @@ -14,7 +14,7 @@ Signed-off-by: Nikhil Prakash V --- a/drivers/remoteproc/qcom_q6v5_wcss.c +++ b/drivers/remoteproc/qcom_q6v5_wcss.c -@@ -1178,6 +1178,7 @@ static const struct wcss_data wcss_ipq80 +@@ -1179,6 +1179,7 @@ static const struct wcss_data wcss_ipq80 .crash_reason_smem = WCSS_CRASH_REASON, .aon_reset_required = true, .wcss_q6_reset_required = true, diff --git a/target/linux/ipq807x/patches-6.1/0116-remoteproc-qcom-Update-regmap-offsets-for-halt-regis.patch b/target/linux/ipq807x/patches-6.1/0116-remoteproc-qcom-Update-regmap-offsets-for-halt-regis.patch index c8e5aceefc..f0b717210f 100644 --- a/target/linux/ipq807x/patches-6.1/0116-remoteproc-qcom-Update-regmap-offsets-for-halt-regis.patch +++ b/target/linux/ipq807x/patches-6.1/0116-remoteproc-qcom-Update-regmap-offsets-for-halt-regis.patch @@ -61,7 +61,7 @@ Signed-off-by: Sricharan R return 0; } -@@ -1178,6 +1182,7 @@ static const struct wcss_data wcss_ipq80 +@@ -1179,6 +1183,7 @@ static const struct wcss_data wcss_ipq80 .crash_reason_smem = WCSS_CRASH_REASON, .aon_reset_required = true, .wcss_q6_reset_required = true, @@ -69,7 +69,7 @@ Signed-off-by: Sricharan R .ssr_name = "q6wcss", .ops = &q6v5_wcss_ipq8074_ops, .requires_force_stop = true, -@@ -1192,6 +1197,7 @@ static const struct wcss_data wcss_qcs40 +@@ -1193,6 +1198,7 @@ static const struct wcss_data wcss_qcs40 .version = WCSS_QCS404, .aon_reset_required = false, .wcss_q6_reset_required = false, diff --git a/target/linux/ipq807x/patches-6.1/0119-remoteproc-wcss-disable-auto-boot-for-IPQ8074.patch b/target/linux/ipq807x/patches-6.1/0119-remoteproc-wcss-disable-auto-boot-for-IPQ8074.patch index a562f7864e..8674522a11 100644 --- a/target/linux/ipq807x/patches-6.1/0119-remoteproc-wcss-disable-auto-boot-for-IPQ8074.patch +++ b/target/linux/ipq807x/patches-6.1/0119-remoteproc-wcss-disable-auto-boot-for-IPQ8074.patch @@ -22,7 +22,7 @@ Signed-off-by: Robert Marko }; static int q6v5_wcss_reset(struct q6v5_wcss *wcss) -@@ -1151,6 +1152,7 @@ static int q6v5_wcss_probe(struct platfo +@@ -1150,6 +1151,7 @@ static int q6v5_wcss_probe(struct platfo desc->sysmon_name, desc->ssctl_id); @@ -30,7 +30,7 @@ Signed-off-by: Robert Marko ret = rproc_add(rproc); if (ret) goto free_rproc; -@@ -1187,6 +1189,7 @@ static const struct wcss_data wcss_ipq80 +@@ -1188,6 +1190,7 @@ static const struct wcss_data wcss_ipq80 .ops = &q6v5_wcss_ipq8074_ops, .requires_force_stop = true, .need_mem_protection = true, @@ -38,7 +38,7 @@ Signed-off-by: Robert Marko }; static const struct wcss_data wcss_qcs404_res_init = { -@@ -1203,6 +1206,7 @@ static const struct wcss_data wcss_qcs40 +@@ -1204,6 +1207,7 @@ static const struct wcss_data wcss_qcs40 .ssctl_id = 0x12, .ops = &q6v5_wcss_qcs404_ops, .requires_force_stop = false, diff --git a/target/linux/ipq807x/patches-6.1/0124-soc-qcom-socinfo-move-SMEM-item-struct-and-defines-t.patch b/target/linux/ipq807x/patches-6.1/0124-soc-qcom-socinfo-move-SMEM-item-struct-and-defines-t.patch index 30f6e988aa..4a744490cf 100644 --- a/target/linux/ipq807x/patches-6.1/0124-soc-qcom-socinfo-move-SMEM-item-struct-and-defines-t.patch +++ b/target/linux/ipq807x/patches-6.1/0124-soc-qcom-socinfo-move-SMEM-item-struct-and-defines-t.patch @@ -41,7 +41,7 @@ Signed-off-by: Robert Marko #ifdef CONFIG_DEBUG_FS #define SMEM_IMAGE_VERSION_BLOCKS_COUNT 32 #define SMEM_IMAGE_VERSION_SIZE 4096 -@@ -105,54 +97,6 @@ static const char *const pmic_models[] = +@@ -116,54 +108,6 @@ static const char *const pmic_models[] = }; #endif /* CONFIG_DEBUG_FS */ diff --git a/target/linux/ipq807x/patches-6.1/0125-cpufreq-qcom-nvmem-reuse-socinfo-SMEM-item-struct.patch b/target/linux/ipq807x/patches-6.1/0125-cpufreq-qcom-nvmem-reuse-socinfo-SMEM-item-struct.patch index aa7fe5a868..5776614463 100644 --- a/target/linux/ipq807x/patches-6.1/0125-cpufreq-qcom-nvmem-reuse-socinfo-SMEM-item-struct.patch +++ b/target/linux/ipq807x/patches-6.1/0125-cpufreq-qcom-nvmem-reuse-socinfo-SMEM-item-struct.patch @@ -26,7 +26,7 @@ Signed-off-by: Robert Marko enum _msm_id { MSM8996V3 = 0xF6ul, -@@ -145,17 +144,14 @@ static void get_krait_bin_format_b(struc +@@ -143,17 +142,14 @@ static void get_krait_bin_format_b(struc static enum _msm8996_version qcom_cpufreq_get_msm_id(void) { size_t len; diff --git a/target/linux/ipq807x/patches-6.1/0126-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch b/target/linux/ipq807x/patches-6.1/0126-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch index 3303b40277..bdac41a028 100644 --- a/target/linux/ipq807x/patches-6.1/0126-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch +++ b/target/linux/ipq807x/patches-6.1/0126-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch @@ -27,7 +27,7 @@ Signed-off-by: Robert Marko enum _msm8996_version { MSM8996_V3, -@@ -152,12 +147,12 @@ static enum _msm8996_version qcom_cpufre +@@ -150,12 +145,12 @@ static enum _msm8996_version qcom_cpufre return NUM_OF_MSM8996_VERSIONS; switch (info->id) { diff --git a/target/linux/ipq807x/patches-6.1/0127-cpufreq-qcom-nvmem-make-qcom_cpufreq_get_msm_id-retu.patch b/target/linux/ipq807x/patches-6.1/0127-cpufreq-qcom-nvmem-make-qcom_cpufreq_get_msm_id-retu.patch index 768866b1b2..0a33c5c66d 100644 --- a/target/linux/ipq807x/patches-6.1/0127-cpufreq-qcom-nvmem-make-qcom_cpufreq_get_msm_id-retu.patch +++ b/target/linux/ipq807x/patches-6.1/0127-cpufreq-qcom-nvmem-make-qcom_cpufreq_get_msm_id-retu.patch @@ -35,7 +35,7 @@ Signed-off-by: Robert Marko struct qcom_cpufreq_drv; struct qcom_cpufreq_match_data { -@@ -136,30 +130,16 @@ static void get_krait_bin_format_b(struc +@@ -134,30 +128,16 @@ static void get_krait_bin_format_b(struc dev_dbg(cpu_dev, "PVS version: %d\n", *pvs_ver); } @@ -69,7 +69,7 @@ Signed-off-by: Robert Marko } static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev, -@@ -168,25 +148,25 @@ static int qcom_cpufreq_kryo_name_versio +@@ -166,25 +146,25 @@ static int qcom_cpufreq_kryo_name_versio struct qcom_cpufreq_drv *drv) { size_t len; diff --git a/target/linux/ipq807x/patches-6.1/0128-cpufreq-qcom-nvmem-add-support-for-IPQ8074.patch b/target/linux/ipq807x/patches-6.1/0128-cpufreq-qcom-nvmem-add-support-for-IPQ8074.patch index 49fd4e4cc0..d2653e52d6 100644 --- a/target/linux/ipq807x/patches-6.1/0128-cpufreq-qcom-nvmem-add-support-for-IPQ8074.patch +++ b/target/linux/ipq807x/patches-6.1/0128-cpufreq-qcom-nvmem-add-support-for-IPQ8074.patch @@ -21,7 +21,7 @@ Signed-off-by: Robert Marko --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c -@@ -159,6 +159,7 @@ static const struct of_device_id blockli +@@ -164,6 +164,7 @@ static const struct of_device_id blockli { .compatible = "ti,omap3", }, { .compatible = "qcom,ipq8064", }, @@ -41,7 +41,7 @@ Signed-off-by: Robert Marko struct qcom_cpufreq_drv; struct qcom_cpufreq_match_data { -@@ -218,6 +221,37 @@ len_error: +@@ -216,6 +219,37 @@ len_error: return ret; } @@ -79,7 +79,7 @@ Signed-off-by: Robert Marko static const struct qcom_cpufreq_match_data match_data_kryo = { .get_version = qcom_cpufreq_kryo_name_version, }; -@@ -232,6 +266,10 @@ static const struct qcom_cpufreq_match_d +@@ -230,6 +264,10 @@ static const struct qcom_cpufreq_match_d .genpd_names = qcs404_genpd_names, }; @@ -90,7 +90,7 @@ Signed-off-by: Robert Marko static int qcom_cpufreq_probe(struct platform_device *pdev) { struct qcom_cpufreq_drv *drv; -@@ -431,6 +469,7 @@ static const struct of_device_id qcom_cp +@@ -375,6 +413,7 @@ static const struct of_device_id qcom_cp { .compatible = "qcom,msm8996", .data = &match_data_kryo }, { .compatible = "qcom,qcs404", .data = &match_data_qcs404 }, { .compatible = "qcom,ipq8064", .data = &match_data_krait }, diff --git a/target/linux/ipq807x/patches-6.1/0901-regulator-add-Qualcomm-CPR-regulators.patch b/target/linux/ipq807x/patches-6.1/0901-regulator-add-Qualcomm-CPR-regulators.patch index 3deadea139..9b9f7159f3 100644 --- a/target/linux/ipq807x/patches-6.1/0901-regulator-add-Qualcomm-CPR-regulators.patch +++ b/target/linux/ipq807x/patches-6.1/0901-regulator-add-Qualcomm-CPR-regulators.patch @@ -1,22 +1,21 @@ -From 303fb163bb86f04432c93325ff8b9638c9e50641 Mon Sep 17 00:00:00 2001 +From c9df32c057e43e38c8113199e64f7a64f8d341df Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 11 Apr 2022 14:35:36 +0200 Subject: [PATCH] regulator: add Qualcomm CPR regulators -Add Qualcomm CPR driver, which allows using the CPR HW to calculate the -correct OPP point voltage dynamically based on the system load. +Allow building Qualcomm CPR regulators. Signed-off-by: Robert Marko --- drivers/regulator/Kconfig | 33 + drivers/regulator/Makefile | 3 + drivers/regulator/cpr3-npu-regulator.c | 695 +++ - drivers/regulator/cpr3-regulator.c | 5112 +++++++++++++++++++++++ + drivers/regulator/cpr3-regulator.c | 5111 +++++++++++++++++++++++ drivers/regulator/cpr3-regulator.h | 1211 ++++++ drivers/regulator/cpr3-util.c | 2750 ++++++++++++ drivers/regulator/cpr4-apss-regulator.c | 1819 ++++++++ include/soc/qcom/socinfo.h | 463 ++ - 8 files changed, 12086 insertions(+) + 8 files changed, 12085 insertions(+) create mode 100644 drivers/regulator/cpr3-npu-regulator.c create mode 100644 drivers/regulator/cpr3-regulator.c create mode 100644 drivers/regulator/cpr3-regulator.h @@ -26,7 +25,7 @@ Signed-off-by: Robert Marko --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig -@@ -1423,5 +1423,38 @@ config REGULATOR_QCOM_LABIBB +@@ -1524,4 +1524,37 @@ config REGULATOR_QCOM_LABIBB boost regulator and IBB can be used as a negative boost regulator for LCD display panel. @@ -64,10 +63,9 @@ Signed-off-by: Robert Marko + voltage and CPR target quotient values out of hardware fuses. + endif - --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile -@@ -105,6 +105,9 @@ obj-$(CONFIG_REGULATOR_QCOM_RPMH) += qco +@@ -110,6 +110,9 @@ obj-$(CONFIG_REGULATOR_QCOM_RPMH) += qco obj-$(CONFIG_REGULATOR_QCOM_SMD_RPM) += qcom_smd-regulator.o obj-$(CONFIG_REGULATOR_QCOM_SPMI) += qcom_spmi-regulator.o obj-$(CONFIG_REGULATOR_QCOM_USB_VBUS) += qcom_usb_vbus-regulator.o @@ -777,7 +775,7 @@ Signed-off-by: Robert Marko +MODULE_ALIAS("platform:npu-ipq807x"); --- /dev/null +++ b/drivers/regulator/cpr3-regulator.c -@@ -0,0 +1,5112 @@ +@@ -0,0 +1,5111 @@ +/* + * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. + * @@ -4419,7 +4417,7 @@ Signed-off-by: Robert Marko + config.init_data = init_data; + config.of_node = vreg->of_node; + -+ vreg->rdev = regulator_register(rdesc, &config); ++ vreg->rdev = regulator_register(vreg->thread->ctrl->dev, rdesc, &config); + if (IS_ERR(vreg->rdev)) { + rc = PTR_ERR(vreg->rdev); + cpr3_err(vreg, "regulator_register failed, rc=%d\n", rc); @@ -4613,7 +4611,6 @@ Signed-off-by: Robert Marko + .open = cpr3_debug_quot_open, + .release = cpr3_debug_quot_release, + .read = cpr3_debug_quot_read, -+ .llseek = no_llseek, +}; + +/** -- 2.30.2