difos/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062.dtsi
Shane Synan 9baca41064 ipq806x: fix min<>target opp-microvolt DTS mixup
Rearrange all voltage triplets for "opp_table0" to match the
specifications.  "opp-microvolt" and "opp-microvolt-<name>" triplets
are in order of <target min max>, and NOT <min target max>.

Previously, the CPU would *always* spend its time at the "minimum"
voltage, ignoring the actual intended target.  This is a regression
from previous behavior.

On an NBG6817 with a Qualcomm CPU of PVS bin #2...
(see &opp_table0 -> opp-1725000000 -> opp-microvolt-speed0-pvs2-v0)

* Before:
/usr/bin/tail -n +1 /sys/kernel/debug/opp/cpu0/opp\:1725000000/supply-0/u_volt_*
==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_max <==
1260000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_min <==
1200000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_target <==
1140000

* After:
/usr/bin/tail -n +1 /sys/kernel/debug/opp/cpu0/opp\:1725000000/supply-0/u_volt_*
==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_max <==
1260000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_min <==
1140000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_target <==
1200000

To check voltages and frequencies at run time, use...
/bin/cat /sys/kernel/debug/regulator/regulator_summary &&
  /bin/cat /sys/kernel/debug/clk/clk_summary | grep "hfpll"

See
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/opp/opp.txt?h=v5.4.142#n91

Fixes: 1e25423be8 ("ipq806x: refresh dtsi patches")

Signed-off-by: Shane Synan <digitalcircuit36939@gmail.com>
Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
[commit message style cleanup, another kernel refresh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-21 23:54:31 +02:00

98 lines
2.1 KiB
Text

// SPDX-License-Identifier: GPL-2.0-only
#include "qcom-ipq8064.dtsi"
/ {
model = "Qualcomm IPQ8062";
compatible = "qcom,ipq8062", "qcom,ipq8064";
aliases {
serial0 = &gsbi4_serial;
};
chosen {
stdout-path = "serial0:115200n8";
};
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
rsvd@41200000 {
reg = <0x41200000 0x300000>;
no-map;
};
};
};
&gsbi4 {
qcom,mode = <GSBI_PROT_I2C_UART>;
status = "okay";
serial@16340000 {
status = "okay";
};
/*
* The i2c device on gsbi4 should not be enabled.
* On ipq806x designs gsbi4 i2c is meant for exclusive
* RPM usage. Turning this on in kernel manifests as
* i2c failure for the RPM.
*/
};
&opp_table0 {
/delete-node/opp-1200000000;
/delete-node/opp-1400000000;
/*
* Voltage thresholds are <target min max>
*/
opp-384000000 {
opp-microvolt-speed0-pvs0-v0 = <950000 902500 997500>;
opp-microvolt-speed0-pvs1-v0 = <900000 855000 945000>;
opp-microvolt-speed0-pvs2-v0 = <850000 807500 892500>;
opp-microvolt-speed0-pvs3-v0 = <800000 760000 840000>;
};
opp-600000000 {
opp-microvolt-speed0-pvs0-v0 = <1000000 950000 1050000>;
opp-microvolt-speed0-pvs1-v0 = <950000 945000 955000>;
opp-microvolt-speed0-pvs2-v0 = <900000 895000 905000>;
opp-microvolt-speed0-pvs3-v0 = <850000 845000 855000>;
};
opp-800000000 {
opp-microvolt-speed0-pvs0-v0 = <1050000 997500 1102500>;
opp-microvolt-speed0-pvs1-v0 = <1000000 995000 1005000>;
opp-microvolt-speed0-pvs2-v0 = <950000 945000 955000>;
opp-microvolt-speed0-pvs3-v0 = <900000 895000 905000>;
};
opp-1000000000 {
opp-microvolt-speed0-pvs0-v0 = <1100000 1045000 1155000>;
opp-microvolt-speed0-pvs1-v0 = <1050000 997500 1102500>;
opp-microvolt-speed0-pvs2-v0 = <1000000 995000 1005000>;
opp-microvolt-speed0-pvs3-v0 = <950000 945000 955000>;
};
};
&pcie0 {
compatible = "qcom,pcie-ipq8064-v2";
};
&pcie1 {
compatible = "qcom,pcie-ipq8064-v2";
};
&pcie2 {
compatible = "qcom,pcie-ipq8064-v2";
};
&smb208_s2a {
regulator-max-microvolt = <1150000>;
};
&smb208_s2b {
regulator-max-microvolt = <1150000>;
};