Skip to content

Commit

Permalink
qualcommax: backport more changes for ipq6018 and ipq8074
Browse files Browse the repository at this point in the history
 - Mark patches as upstream
 - Backport more upstream changes
 - Handle conflicts and refresh patches

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
  • Loading branch information
aiamadeus authored and robimarko committed Feb 19, 2024
1 parent bf304d1 commit 4108c0c
Show file tree
Hide file tree
Showing 48 changed files with 1,810 additions and 126 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 8857b0ab6a562c473c5bded0efda9390b82a84d4 Mon Sep 17 00:00:00 2001
From: Robert Marko <robimarko@gmail.com>
Date: Tue, 27 Sep 2022 22:12:17 +0200
Subject: [PATCH] arm64: dts: qcom: ipq6018: fix NAND node name

Per schema it should be nand-controller@79b0000 instead of nand@79b0000.
Fix it to match nand-controller.yaml requirements.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220927201218.1264506-1-robimarko@gmail.com
---
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
@@ -348,7 +348,7 @@
status = "disabled";
};

- qpic_nand: nand@79b0000 {
+ qpic_nand: nand-controller@79b0000 {
compatible = "qcom,ipq6018-nand";
reg = <0x0 0x079b0000 0x0 0x10000>;
#address-cells = <1>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
From 20afb6751739264ea41993877de93923911dfdc3 Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Date: Thu, 6 Oct 2022 14:46:27 +0200
Subject: [PATCH] arm64: dts: qcom: ipq6018: align TLMM pin configuration with
DT schema

DT schema expects TLMM pin configuration nodes to be named with
'-state' suffix and their optional children with '-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221006124659.217540-3-krzysztof.kozlowski@linaro.org
---
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 4 ++--
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

--- a/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
+++ b/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
@@ -51,13 +51,13 @@
};

&tlmm {
- i2c_1_pins: i2c-1-pins {
+ i2c_1_pins: i2c-1-state {
pins = "gpio42", "gpio43";
function = "blsp2_i2c";
drive-strength = <8>;
};

- spi_0_pins: spi-0-pins {
+ spi_0_pins: spi-0-state {
pins = "gpio38", "gpio39", "gpio40", "gpio41";
function = "blsp0_spi";
drive-strength = <8>;
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
@@ -218,14 +218,14 @@
interrupt-controller;
#interrupt-cells = <2>;

- serial_3_pins: serial3-pinmux {
+ serial_3_pins: serial3-state {
pins = "gpio44", "gpio45";
function = "blsp2_uart";
drive-strength = <8>;
bias-pull-down;
};

- qpic_pins: qpic-pins {
+ qpic_pins: qpic-state {
pins = "gpio1", "gpio3", "gpio4",
"gpio5", "gpio6", "gpio7",
"gpio8", "gpio10", "gpio11",
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From d93bd4630ce163f3761aedc0b342b072bee6db6b Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Date: Wed, 22 Mar 2023 18:41:40 +0100
Subject: [PATCH] arm64: dts: qcom: ipq8074: add compatible fallback to mailbox

IPQ8074 mailbox is compatible with IPQ6018.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230322174148.810938-4-krzysztof.kozlowski@linaro.org
---
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -682,7 +682,8 @@
};

apcs_glb: mailbox@b111000 {
- compatible = "qcom,ipq8074-apcs-apps-global";
+ compatible = "qcom,ipq8074-apcs-apps-global",
+ "qcom,ipq6018-apcs-apps-global";
reg = <0x0b111000 0x1000>;
clocks = <&a53pll>, <&xo>;
clock-names = "pll", "xo";
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com

--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -898,6 +898,14 @@
@@ -899,6 +899,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 4>;
Expand All @@ -32,7 +32,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

nss0-thermal {
@@ -905,6 +913,14 @@
@@ -906,6 +914,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 5>;
Expand All @@ -47,7 +47,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

nss1-thermal {
@@ -912,6 +928,14 @@
@@ -913,6 +929,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 6>;
Expand All @@ -62,7 +62,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

wcss-phya0-thermal {
@@ -919,6 +943,14 @@
@@ -920,6 +944,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 7>;
Expand All @@ -77,7 +77,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

wcss-phya1-thermal {
@@ -926,6 +958,14 @@
@@ -927,6 +959,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 8>;
Expand All @@ -92,7 +92,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

cpu0_thermal: cpu0-thermal {
@@ -933,6 +973,14 @@
@@ -934,6 +974,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 9>;
Expand All @@ -107,7 +107,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

cpu1_thermal: cpu1-thermal {
@@ -940,6 +988,14 @@
@@ -941,6 +989,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 10>;
Expand All @@ -122,7 +122,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

cpu2_thermal: cpu2-thermal {
@@ -947,6 +1003,14 @@
@@ -948,6 +1004,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 11>;
Expand All @@ -137,7 +137,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

cpu3_thermal: cpu3-thermal {
@@ -954,6 +1018,14 @@
@@ -955,6 +1019,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 12>;
Expand All @@ -152,7 +152,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

cluster_thermal: cluster-thermal {
@@ -961,6 +1033,14 @@
@@ -962,6 +1034,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 13>;
Expand All @@ -167,7 +167,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

wcss-phyb0-thermal {
@@ -968,6 +1048,14 @@
@@ -969,6 +1049,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 14>;
Expand All @@ -182,7 +182,7 @@ Link: https://lore.kernel.org/r/20230607184448.2512179-1-robimarko@gmail.com
};

wcss-phyb1-thermal {
@@ -975,6 +1063,14 @@
@@ -976,6 +1064,14 @@
polling-delay = <1000>;

thermal-sensors = <&tsens 15>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
drivers/cpufreq/qcom-cpufreq-nvmem.c | 58 ++++++++++++++++++++++++++++++++++++
drivers/cpufreq/qcom-cpufreq-nvmem.c | 58 ++++++++++++++++++++++++++++
2 files changed, 59 insertions(+)

--- a/drivers/cpufreq/cpufreq-dt-platdev.c
Expand All @@ -31,20 +31,20 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

+ { .compatible = "qcom,ipq6018", },
{ .compatible = "qcom,ipq8064", },
{ .compatible = "qcom,ipq8074", },
{ .compatible = "qcom,apq8064", },
{ .compatible = "qcom,msm8974", },
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
@@ -36,6 +36,8 @@ enum ipq8074_versions {
IPQ8074_ACORN_VERSION,
};
@@ -31,6 +31,8 @@

#include <dt-bindings/arm/qcom,ids.h>

+#define IPQ6000_VERSION BIT(2)
+
struct qcom_cpufreq_drv;

struct qcom_cpufreq_match_data {
@@ -209,6 +211,57 @@ len_error:
@@ -204,6 +206,57 @@ len_error:
return ret;
}

Expand Down Expand Up @@ -99,11 +99,11 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
+ return 0;
+}
+
static int qcom_cpufreq_ipq8074_name_version(struct device *cpu_dev,
struct nvmem_cell *speedbin_nvmem,
char **pvs_name,
@@ -265,6 +318,10 @@ static const struct qcom_cpufreq_match_d
.get_version = qcom_cpufreq_ipq8074_name_version,
static const struct qcom_cpufreq_match_data match_data_kryo = {
.get_version = qcom_cpufreq_kryo_name_version,
};
@@ -218,6 +271,10 @@ static const struct qcom_cpufreq_match_d
.genpd_names = qcs404_genpd_names,
};

+static const struct qcom_cpufreq_match_data match_data_ipq6018 = {
Expand All @@ -113,11 +113,11 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
static int qcom_cpufreq_probe(struct platform_device *pdev)
{
struct qcom_cpufreq_drv *drv;
@@ -409,6 +466,7 @@ static const struct of_device_id qcom_cp
@@ -362,6 +419,7 @@ static const struct of_device_id qcom_cp
{ .compatible = "qcom,apq8096", .data = &match_data_kryo },
{ .compatible = "qcom,msm8996", .data = &match_data_kryo },
{ .compatible = "qcom,qcs404", .data = &match_data_qcs404 },
+ { .compatible = "qcom,ipq6018", .data = &match_data_ipq6018 },
{ .compatible = "qcom,ipq8064", .data = &match_data_krait },
{ .compatible = "qcom,ipq8074", .data = &match_data_ipq8074 },
{ .compatible = "qcom,apq8064", .data = &match_data_krait },
{ .compatible = "qcom,msm8974", .data = &match_data_krait },
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From df75a00c60c6e58bc36e4c63e9d7f1910412b132 Mon Sep 17 00:00:00 2001
From 0b9cd949136f1b63f7aa9424b6e583a1ab261e36 Mon Sep 17 00:00:00 2001
From: Robert Marko <robimarko@gmail.com>
Date: Fri, 13 Oct 2023 19:20:02 +0200
Subject: [PATCH] cpufreq: qcom-nvmem: add support for IPQ8074
Expand All @@ -16,6 +16,7 @@ will get created by NVMEM CPUFreq driver.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
[ Viresh: Fixed rebase conflict. ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
Expand All @@ -24,19 +25,19 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -164,6 +164,7 @@ static const struct of_device_id blockli
{ .compatible = "ti,omap3", },
@@ -165,6 +165,7 @@ static const struct of_device_id blockli

{ .compatible = "qcom,ipq6018", },
{ .compatible = "qcom,ipq8064", },
+ { .compatible = "qcom,ipq8074", },
{ .compatible = "qcom,apq8064", },
{ .compatible = "qcom,msm8974", },
{ .compatible = "qcom,msm8960", },
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
@@ -31,6 +31,11 @@
@@ -33,6 +33,11 @@

#include <dt-bindings/arm/qcom,ids.h>
#define IPQ6000_VERSION BIT(2)

+enum ipq8074_versions {
+ IPQ8074_HAWKEYE_VERSION = 0,
Expand All @@ -46,8 +47,8 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
struct qcom_cpufreq_drv;

struct qcom_cpufreq_match_data {
@@ -204,6 +209,44 @@ len_error:
return ret;
@@ -257,6 +262,44 @@ static int qcom_cpufreq_ipq6018_name_ver
return 0;
}

+static int qcom_cpufreq_ipq8074_name_version(struct device *cpu_dev,
Expand Down Expand Up @@ -91,8 +92,8 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
static const struct qcom_cpufreq_match_data match_data_kryo = {
.get_version = qcom_cpufreq_kryo_name_version,
};
@@ -218,6 +261,10 @@ static const struct qcom_cpufreq_match_d
.genpd_names = qcs404_genpd_names,
@@ -275,6 +318,10 @@ static const struct qcom_cpufreq_match_d
.get_version = qcom_cpufreq_ipq6018_name_version,
};

+static const struct qcom_cpufreq_match_data match_data_ipq8074 = {
Expand All @@ -102,9 +103,9 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
static int qcom_cpufreq_probe(struct platform_device *pdev)
{
struct qcom_cpufreq_drv *drv;
@@ -363,6 +410,7 @@ static const struct of_device_id qcom_cp
{ .compatible = "qcom,msm8996", .data = &match_data_kryo },
@@ -421,6 +468,7 @@ static const struct of_device_id qcom_cp
{ .compatible = "qcom,qcs404", .data = &match_data_qcs404 },
{ .compatible = "qcom,ipq6018", .data = &match_data_ipq6018 },
{ .compatible = "qcom,ipq8064", .data = &match_data_krait },
+ { .compatible = "qcom,ipq8074", .data = &match_data_ipq8074 },
{ .compatible = "qcom,apq8064", .data = &match_data_krait },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -684,8 +684,8 @@
apcs_glb: mailbox@b111000 {
compatible = "qcom,ipq8074-apcs-apps-global";
@@ -685,8 +685,8 @@
compatible = "qcom,ipq8074-apcs-apps-global",
"qcom,ipq6018-apcs-apps-global";
reg = <0x0b111000 0x1000>;
- clocks = <&a53pll>, <&xo>;
- clock-names = "pll", "xo";
Expand Down
Loading

0 comments on commit 4108c0c

Please sign in to comment.