From 36fac63d855938f5c17c0b9caf4eb1ceab902f62 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 12 Feb 2025 16:26:00 +0800 Subject: [PATCH] qualcommax: 6.6: add ipq60xx pwm support --- ...com-ipq6018-add-NSS-reserved-memory.patch} | 19 +++++++- ...-arm64-dts-qcom-ipq6018-add-pwm-node.patch | 45 +++++++++++++++++++ ...rm64-dts-ipq6018-add-label-to-clocks.patch | 11 +++++ 3 files changed, 74 insertions(+), 1 deletion(-) rename target/linux/qualcommax/patches-6.6/{0140-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch => 0137-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch} (70%) create mode 100644 target/linux/qualcommax/patches-6.6/0139-arm64-dts-qcom-ipq6018-add-pwm-node.patch create mode 100644 target/linux/qualcommax/patches-6.6/0910-arm64-dts-ipq6018-add-label-to-clocks.patch 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/0137-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch similarity index 70% rename from target/linux/qualcommax/patches-6.6/0140-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch rename to target/linux/qualcommax/patches-6.6/0137-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch index 84591c845..76259c0f1 100644 --- a/target/linux/qualcommax/patches-6.6/0140-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch +++ b/target/linux/qualcommax/patches-6.6/0137-arm64-dts-qcom-ipq6018-add-NSS-reserved-memory.patch @@ -13,7 +13,7 @@ Signed-off-by: Robert Marko --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi -@@ -199,6 +199,11 @@ +@@ -194,6 +194,11 @@ no-map; }; @@ -25,3 +25,20 @@ Signed-off-by: Robert Marko bootloader@4a100000 { reg = <0x0 0x4a100000 0x0 0x400000>; no-map; +@@ -218,6 +223,16 @@ + reg = <0x0 0x4ab00000 0x0 0x5500000>; + no-map; + }; ++ ++ q6_etr_region: q6_etr_dump@50000000 { ++ reg = <0x0 0x50000000 0x0 0x100000>; ++ no-map; ++ }; ++ ++ m3_dump_region: m3_dump@50100000 { ++ reg = <0x0 0x50100000 0x0 0x100000>; ++ no-map; ++ }; + }; + + smem { diff --git a/target/linux/qualcommax/patches-6.6/0139-arm64-dts-qcom-ipq6018-add-pwm-node.patch b/target/linux/qualcommax/patches-6.6/0139-arm64-dts-qcom-ipq6018-add-pwm-node.patch new file mode 100644 index 000000000..b1632f21a --- /dev/null +++ b/target/linux/qualcommax/patches-6.6/0139-arm64-dts-qcom-ipq6018-add-pwm-node.patch @@ -0,0 +1,45 @@ +From b4a32d218d424b81a58fbd419e1114b1c1f76168 Mon Sep 17 00:00:00 2001 +From: Devi Priya +Date: Thu, 5 Oct 2023 21:35:50 +0530 +Subject: [PATCH] pwm: driver for qualcomm ipq6018 pwm block + +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 +Co-developed-by: Baruch Siach +Signed-off-by: Baruch Siach +Signed-off-by: Devi Priya +--- + 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 +@@ -440,8 +440,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/0910-arm64-dts-ipq6018-add-label-to-clocks.patch b/target/linux/qualcommax/patches-6.6/0910-arm64-dts-ipq6018-add-label-to-clocks.patch new file mode 100644 index 000000000..75c45a2ce --- /dev/null +++ b/target/linux/qualcommax/patches-6.6/0910-arm64-dts-ipq6018-add-label-to-clocks.patch @@ -0,0 +1,11 @@ +--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi ++++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi +@@ -15,7 +15,7 @@ + #size-cells = <2>; + interrupt-parent = <&intc>; + +- clocks { ++ clocks: clocks { + sleep_clk: sleep-clk { + compatible = "fixed-clock"; + clock-frequency = <32000>;