Skip to content

Commit

Permalink
qualcommax: add ipq60xx support
Browse files Browse the repository at this point in the history
Introduce support for the Qualcomm IPQ60xx SoC. WiFi support still has
to be handled and correctly fix hence this is currently marked as
source-only to have a solid base to progress on correct support of this
and hope Upstream QUIC publish newers ath11k drivers for this SoC.

Co-developed-by: Robert Marko <[email protected]>
Signed-off-by: Robert Marko <[email protected]>
Signed-off-by: Mantas Pucka <[email protected]>
[ improve commit description, add SoB for Robert, make it source-only ]
Signed-off-by: Christian Marangi <[email protected]>
  • Loading branch information
mantas-p authored and Ansuel committed Feb 9, 2024
1 parent a79efe4 commit 23deb4a
Show file tree
Hide file tree
Showing 30 changed files with 2,085 additions and 1 deletion.
2 changes: 1 addition & 1 deletion target/linux/qualcommax/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BOARDNAME:=Qualcomm Atheros 802.11ax WiSoC-s
FEATURES:=squashfs ramdisk fpu nand rtc emmc
KERNELNAME:=Image dtbs
CPU_TYPE:=cortex-a53
SUBTARGETS:=ipq807x
SUBTARGETS:=ipq807x ipq60xx

KERNEL_PATCHVER:=6.1

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: GPL-2.0-only

#include "ipq6018-cpr-regulator.dtsi"

&CPU0 {
cpu-supply = <&apc_vreg>;
};

&CPU1 {
cpu-supply = <&apc_vreg>;
};

&CPU2 {
cpu-supply = <&apc_vreg>;
};

&CPU3 {
cpu-supply = <&apc_vreg>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/*
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

&soc {
apc_apm: apm@b111000 {
compatible = "qcom,ipq807x-apm";
reg = <0x0 0xb111000 0x0 0x1000>;
reg-names = "pm-apcc-glb";
qcom,apm-post-halt-delay = <0x2>;
qcom,apm-halt-clk-delay = <0x11>;
qcom,apm-resume-clk-delay = <0x10>;
qcom,apm-sel-switch-delay = <0x01>;
};

apc_cpr: cpr4-ctrl@b018000 {
compatible = "qcom,cpr4-ipq6018-apss-regulator";
reg = <0x0 0xb018000 0x0 0x4000>, <0x0 0xa4000 0x0 0x1000>, <0x0 0x0193d008 0x0 0x4>;
reg-names = "cpr_ctrl", "fuse_base", "cpr_tcsr_reg";
interrupts = <GIC_SPI 15 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "cpr";
qcom,cpr-ctrl-name = "apc";
qcom,cpr-sensor-time = <1000>;
qcom,cpr-loop-time = <5000000>;
qcom,cpr-idle-cycles = <15>;
qcom,cpr-step-quot-init-min = <0>;
qcom,cpr-step-quot-init-max = <15>;
qcom,cpr-count-mode = <0>; /* All-at-once */
qcom,cpr-count-repeat = <1>;
qcom,cpr-down-error-step-limit = <1>;
qcom,cpr-up-error-step-limit = <1>;
qcom,apm-ctrl = <&apc_apm>;
qcom,apm-threshold-voltage = <850000>;
vdd-supply = <&ipq6018_s2>;
qcom,voltage-step = <12500>;

thread@0 {
qcom,cpr-thread-id = <0>;
qcom,cpr-consecutive-up = <2>;
qcom,cpr-consecutive-down = <2>;
qcom,cpr-up-threshold = <2>;
qcom,cpr-down-threshold = <2>;

apc_vreg: regulator {
regulator-name = "apc_corner";
regulator-min-microvolt = <1>;
regulator-max-microvolt = <6>;
qcom,cpr-fuse-corners = <4>;
qcom,cpr-fuse-combos = <8>;
qcom,cpr-corners = <6>;
qcom,cpr-speed-bins = <1>;
qcom,cpr-speed-bin-corners = <6>;
qcom,cpr-corner-fmax-map = <1 3 5 6>;
qcom,allow-voltage-interpolation;
qcom,allow-quotient-interpolation;
qcom,cpr-voltage-ceiling =
<725000 787500 862500
925000 987500 1062500>;
qcom,cpr-voltage-floor =
<587500 650000 712500
750000 787500 850000>;
qcom,corner-frequencies =
<864000000 1056000000 1320000000
1440000000 1608000000 1800000000>;
qcom,cpr-ro-sel =
/* Speed bin 0; CPR rev 0..7 */
< 0 0 0 0>,
< 7 7 7 7>,
< 0 0 0 0>,
< 0 0 0 0>,
< 0 0 0 0>,
< 0 0 0 0>,
< 0 0 0 0>,
< 0 0 0 0>;

qcom,cpr-open-loop-voltage-fuse-adjustment =
/* Speed bin 0; CPR rev 0..7 */
/* SVS Nominal Turbo Turbo_L1 */
< 0 0 0 0>,
< 0 0 15000 0>,
< 0 0 15000 0>,
< 0 0 0 0>,
< 0 0 0 0>,
< 0 0 0 0>,
< 0 0 0 0>,
< 0 0 0 0>;

qcom,cpr-closed-loop-voltage-fuse-adjustment =
/* Speed bin 0; CPR rev 0..7 */
< 0 0 0 0>,
< 13000 0 13000 13000>,
< 13000 0 13000 13000>,
< 0 0 0 0>,
< 0 0 0 0>,
< 0 0 0 0>,
< 0 0 0 0>,
< 0 0 0 0>;

qcom,cpr-ro-scaling-factor =
< 2000 1770 1900 1670 1930 1770 1910 1800
1870 1730 2000 1840 1800 2030 1700 1890 >,
< 2000 1770 1900 1670 1930 1770 1910 1800
1870 1730 2000 1840 1800 2030 1700 1890 >,
< 2000 1770 1900 1670 1930 1770 1910 1800
1870 1730 2000 1840 1800 2030 1700 1890 >,
< 2000 1770 1900 1670 1930 1770 1910 1800
1870 1730 2000 1840 1800 2030 1700 1890 >;
regulator-always-on;
};
};
};
};
Loading

0 comments on commit 23deb4a

Please sign in to comment.