qualcommax: backport unmerged ipq60xx pwm support
authorChukun Pan <amadeus@jmu.edu.cn>
Sun, 3 Mar 2024 15:09:36 +0000 (23:09 +0800)
committerRobert Marko <robimarko@gmail.com>
Mon, 24 Mar 2025 09:15:59 +0000 (10:15 +0100)
Because of the dt-bindings error, these patches have not
been merged yet, and the driver part is fine.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/14950
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/qualcommax/ipq60xx/config-default
target/linux/qualcommax/patches-6.6/0135-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch [new file with mode: 0644]
target/linux/qualcommax/patches-6.6/0137-arm64-dts-qcom-ipq6018-add-SDHCI-node.patch
target/linux/qualcommax/patches-6.6/0138-arm64-dts-qcom-ipq6018-add-pwm-node.patch [new file with mode: 0644]
target/linux/qualcommax/patches-6.6/0140-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch [deleted file]
target/linux/qualcommax/patches-6.6/0141-pwm-driver-for-qualcomm-ipq6018-pwm-block.patch
target/linux/qualcommax/patches-6.6/0906-arm64-dts-qcom-ipq6018-add-wifi-node.patch
target/linux/qualcommax/patches-6.6/0907-soc-qcom-fix-smp2p-ack-on-ipq6018.patch
target/linux/qualcommax/patches-6.6/0909-arm64-dts-qcom-ipq6018-assign-QDSS_AT-clock-to-wifi-.patch

index 9ce4b04293900fc1b70f5ddc8649776a198db422..ac9743eb2cb93718ab868672565d08028bb763ef 100644 (file)
@@ -1,6 +1,9 @@
 CONFIG_IPQ_GCC_6018=y
 CONFIG_MTD_SPLIT_FIT_FW=y
 CONFIG_PINCTRL_IPQ6018=y
+CONFIG_PWM=y
+CONFIG_PWM_IPQ=y
+CONFIG_PWM_SYSFS=y
 CONFIG_QCOM_APM=y
 # CONFIG_QCOM_CLK_SMD_RPM is not set
 # CONFIG_QCOM_RPMPD is not set
diff --git a/target/linux/qualcommax/patches-6.6/0135-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch b/target/linux/qualcommax/patches-6.6/0135-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch
new file mode 100644 (file)
index 0000000..0d53531
--- /dev/null
@@ -0,0 +1,27 @@
+From 7e102b1eb2ca3eff7a6f33ebeab17825e6f70956 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko@gmail.com>
+Date: Mon, 4 Nov 2024 22:01:24 +0100
+Subject: [PATCH] arm64: dts: qcom: ipq6018: add NSS reserved memory
+
+It seems that despite NSS not being supported in OpenWrt the memory it
+usually uses needs to be reserved anyway for stability reasons.
+
+Signed-off-by: Robert Marko <robimarko@gmail.com>
+---
+ arch/arm64/boot/dts/qcom/ipq6018.dtsi | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
++++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+@@ -194,6 +194,11 @@
+                       no-map;
+               };
++              nss_region: memory@40000000 {
++                      reg = <0x0 0x40000000 0x0 0x01000000>;
++                      no-map;
++              };
++
+               bootloader@4a100000 {
+                       reg = <0x0 0x4a100000 0x0 0x400000>;
+                       no-map;
index e1296aa79271db9c59fe4d6eb21032effd9a9060..6052f41209028ef4a0f2b70b6264ddf1b10dbf14 100644 (file)
@@ -13,7 +13,7 @@ Tested-by: Robert Marko <robimarko@gmail.com>
 
 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
 +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
-@@ -470,6 +470,29 @@
+@@ -475,6 +475,29 @@
                        };
                };
  
diff --git a/target/linux/qualcommax/patches-6.6/0138-arm64-dts-qcom-ipq6018-add-pwm-node.patch b/target/linux/qualcommax/patches-6.6/0138-arm64-dts-qcom-ipq6018-add-pwm-node.patch
new file mode 100644 (file)
index 0000000..71061ba
--- /dev/null
@@ -0,0 +1,45 @@
+From b4a32d218d424b81a58fbd419e1114b1c1f76168 Mon Sep 17 00:00:00 2001
+From: Devi Priya <quic_devipriy@quicinc.com>
+Date: Thu, 5 Oct 2023 21:35:50 +0530
+Subject: [PATCH] arm64: dts: qcom: ipq6018: add pwm node
+
+Describe the PWM block on IPQ6018.
+
+The PWM is in the TCSR area. Make &tcsr "simple-mfd" compatible, and add
+&pwm as child of &tcsr.
+
+Add also ipq6018 specific compatible string.
+
+Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Co-developed-by: Baruch Siach <baruch.siach@siklu.com>
+Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
+Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
+---
+ arch/arm64/boot/dts/qcom/ipq6018.dtsi | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
++++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+@@ -430,8 +430,21 @@
+               };
+               tcsr: syscon@1937000 {
+-                      compatible = "qcom,tcsr-ipq6018", "syscon";
++                      compatible = "qcom,tcsr-ipq6018", "syscon", "simple-mfd";
+                       reg = <0x0 0x01937000 0x0 0x21000>;
++                      ranges = <0x0 0x0 0x01937000 0x21000>;
++                      #address-cells = <1>;
++                      #size-cells = <1>;
++
++                      pwm: pwm@a010 {
++                              compatible = "qcom,ipq6018-pwm";
++                              reg = <0xa010 0x20>;
++                              clocks = <&gcc GCC_ADSS_PWM_CLK>;
++                              assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>;
++                              assigned-clock-rates = <100000000>;
++                              #pwm-cells = <2>;
++                              status = "disabled";
++                      };
+               };
+               usb2: usb@70f8800 {
diff --git a/target/linux/qualcommax/patches-6.6/0140-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch b/target/linux/qualcommax/patches-6.6/0140-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch
deleted file mode 100644 (file)
index 84591c8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From 7e102b1eb2ca3eff7a6f33ebeab17825e6f70956 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robimarko@gmail.com>
-Date: Mon, 4 Nov 2024 22:01:24 +0100
-Subject: [PATCH] arm64: dts: qcom: ipq6018: add NSS reserved memory
-
-It seems that despite NSS not being supported in OpenWrt the memory it
-usually uses needs to be reserved anyway for stability reasons.
-
-Signed-off-by: Robert Marko <robimarko@gmail.com>
----
- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
-+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
-@@ -199,6 +199,11 @@
-                       no-map;
-               };
-+              nss_region: memory@40000000 {
-+                      reg = <0x0 0x40000000 0x0 0x01000000>;
-+                      no-map;
-+              };
-+
-               bootloader@4a100000 {
-                       reg = <0x0 0x4a100000 0x0 0x400000>;
-                       no-map;
index f4f396a2c1962026158a788765cd4bab6439a6cc..2b7a6d6d891ff6bf1a4a1bebb9eba69005c737b1 100644 (file)
@@ -12,6 +12,12 @@ Co-developed-by: Baruch Siach <baruch.siach@siklu.com>
 Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
 Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
 ---
+ drivers/pwm/Kconfig   |  12 ++
+ drivers/pwm/Makefile  |   1 +
+ drivers/pwm/pwm-ipq.c | 282 ++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 295 insertions(+)
+ create mode 100644 drivers/pwm/pwm-ipq.c
+
 --- a/drivers/pwm/Kconfig
 +++ b/drivers/pwm/Kconfig
 @@ -282,6 +282,18 @@ config PWM_INTEL_LGM
index d41244d65a6f39200a6da1527459729ea5ead8a6..25e5d2f62dc5d3836747d6e6d497a170265d1e4f 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
 
 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
 +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
-@@ -814,6 +814,102 @@
+@@ -827,6 +827,102 @@
                        };
                };
  
index 5154aad53163dbd6090077b9e2519858d7c694cf..981ee031057ade44122338c79a674a87eac06bbe 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
 
 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
 +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
-@@ -1162,6 +1162,7 @@
+@@ -1175,6 +1175,7 @@
  
                wcss_smp2p_out: master-kernel {
                        qcom,entry-name = "master-kernel";
index 993d60870b82cee8b3906304c2714208b8ff68d6..150e06f3012854bb92ce075dda5b452e0f59945f 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
 
 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
 +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
-@@ -935,8 +935,8 @@
+@@ -948,8 +948,8 @@
                                      "wcss_reset",
                                      "wcss_q6_reset";