Commit graph

1044975 commits

Author SHA1 Message Date
AngeloGioacchino Del Regno
848a1bbf75 arm64: DT: sdm630: Configure CPRh and cpufreq-hw for CPU scaling
Now that the CPR v3/v4/Hardened is ready and the cpufreq-hw driver
got OSM programming, we can finally enable CPU scaling on both
of the clusters on SDM630.
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
f7add98021 dt-bindings: soc: qcom: spm: Document SDM660 and MSM8998 compatibles
The driver was updated to add SAW2 v4.1 support for new SoCs: document
the new compatibles.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
441ab88ea6 soc: qcom: spm: Add compatible for MSM8998 SAWv4.1 L2
Add the SAWv4.1 parameters for MSM8998's Gold and Silver clusters.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
f4d9f13eb7 soc: qcom: spm: Implement support for SAWv4.1, SDM630/660 L2 AVS
Implement the support for SAW v4.1, used in at least MSM8998,
SDM630, SDM660 and APQ variants and, while at it, also add the
configuration for the SDM630/660 Silver and Gold cluster L2
Adaptive Voltage Scaler: this is also one of the prerequisites
to allow the OSM controller to perform DCVS.

Please note that despite there are various "versions" of these
values downstream, these are the only ones that are perfectly
stable on the entire set of tested devices.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
8d6b6e3078 dt-bindings: soc: qcom: Add devicetree binding for QCOM SPM
Add devicetree binding for Qualcomm Subsystem Power Manager (SPM).

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
e113e17634 cpuidle: qcom_spm: Detach state machine from main SPM handling
In commit a871be6b8e ("cpuidle: Convert Qualcomm SPM driver to a generic
CPUidle driver") the SPM driver has been converted to a
generic CPUidle driver: that was mainly made to simplify the
driver and that was a great accomplishment;
Though, at that time, this driver was only applicable to ARM 32-bit SoCs,
lacking logic about the handling of newer generation SAW.

In preparation for the enablement of SPM features on AArch64/ARM64,
split the cpuidle-qcom-spm driver in two: the CPUIdle related
state machine (currently used only on ARM SoCs) stays there, while
the SPM communication handling lands back in soc/qcom/spm.c and
also making sure to not discard the simplifications that were
introduced in the aforementioned commit.

Since now the "two drivers" are split, the SCM dependency in the
main SPM handling is gone and for this reason it was also possible
to move the SPM initialization early: this will also make sure that
whenever the SAW CPUIdle driver is getting initialized, the SPM
driver will be ready to do the job.

Please note that the anticipation of the SPM initialization was
also done to optimize the boot times on platforms that have their
CPU/L2 idle states managed by other means (such as PSCI), while
needing SAW initialization for other purposes, like AVS control.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Tested-by: Stephan Gerhold <stephan@gerhold.net>
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
534226dd92 arm64: dts: qcom: Introduce SDM660 Xiaomi Mi 8 Lite (platina)
Add support for the SDM660 Xiaomi Platina (Mi 8 Lite).

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
1b3bf3b1ce arm64: dts: qcom: sdm630: Disallow disabling secured iommu context banks
Some IOMMU context banks are secured and any attempt to disable them
during arm-smmu initialization will result in a system crash.
To work around this issue, add a list of context banks that will never
be disabled, but only reconfigured, at initialization time.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
59598b642c arm64: dts: sdm630: Override bypass emulation context for lpass, anoc2
On the LPASS and ANOC2 IOMMUs, we cannot use the last context to
emulate bypass streams: set the right context banks to avoid crashes.
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
44fde9148e iommu/arm-smmu-qcom: Don't modify sACR on hypervisor secured iommus
Avoid modifying the contents of the secure Auxiliary Control Register
on some Qualcomm SoCs: due to a hypervisor configuration on some
firmware versions, this would result in a system crash.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
b766d992cd iommu/arm-smmu-qcom: Avoid disabling secured context banks
Some Qualcomm SoCs' TZ/hypervisor configuration is disallowing the
disablement of some context banks, being them used for tzapps and/or
remote processors; any attempt to disable such CBs will result in
triggering a fault and the system will freeze and/or reset.

For this reason, get a list of context banks that should never get
disabled during smmu initialization through a DT array property
`qcom,reset-nodisable-cbs`.
It was chosen to not hardcode the CBs as this is dependant on the
SoC's firmware, which may vary on different boards.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
76330e01e0 iommu/arm-smmu: Allow skipping context bank disable at reset time
On some SoCs some IOMMU context banks are actively used from TZ
during system boot, or some hypervisor configurations will trigger
a system reset upon disabling some protected/secured CBs.

Allow skipping the disablement of such contexts at IOMMU reset time
during initialization with a new implementation detail to work around
this quirk.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:39 +02:00
AngeloGioacchino Del Regno
b3bad314cd iommu/arm-smmu-qcom: Allow choosing a custom bypass emulation context
It cannot be taken for granted that the last IOMMU context is free
and available for us to use it to emulate bypass streams and, at least
on MSM8998's lpass iommu, using the last one will produce a crash;
please note that this may not be only dependant on the SoC, but also
on the firmware version.

To overcome to this issue, allow specifying a different context for
bypass emulation with the optional DT property "qcom,bypass-cbndx":
if this property is not found this means that we are either booting
with ACPI instead or that we don't want to specify a custom cb because
the default one (the last context bank) is fine.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:39 +02:00
Marijn Suijten
28337278f5 qcom-lpg: Review fixups! 2021-11-01 06:13:39 +02:00
Marijn Suijten
86f859fc4b leds: qcom-lpg: Add PM660L 2021-11-01 06:13:39 +02:00
Marijn Suijten
9a151a1e8d NILE/pm660l: LPG 2021-11-01 06:13:38 +02:00
Marijn Suijten
4419531c3d defconfig: Leds, QCOM_LPG, and all the led triggers! 2021-11-01 06:13:38 +02:00
Bjorn Andersson
4ddfcc0a10 arm64: dts: qcom: db820c: Add user LEDs
The db820c has 4 "user LEDs", all connected to the PMI8994. The first
three are connected to the three current sinks provided by the TRILED
and the fourth is connected to MPP2.

By utilizing the DTEST bus the MPP is fed the control signal from the
fourth LPG block, providing a consistent interface to the user.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-11-01 06:13:38 +02:00
Bjorn Andersson
2b7bfae14a arm64: dts: qcom: pmi8994: Define MPP block
The pmi8994 has 4 multi-purpose-pins, add these to the definition.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-11-01 06:13:38 +02:00
Bjorn Andersson
1bdbb50dd5 arm64: dts: qcom: sdm845: Enable user LEDs on DB845c
The DB845c has 4 "user LEDs", the last one is already supported as it's
just wired to a gpio. Now that the LPG binding is in place we can wire
up the other 3 LEDs as well.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-11-01 06:13:38 +02:00
Bjorn Andersson
3a24655b15 arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998
Add PWM/LPG nodes to the PMICs currently supported by the binding.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-11-01 06:13:38 +02:00
Bjorn Andersson
25281c8b70 leds: Add driver for Qualcomm LPG
The Light Pulse Generator (LPG) is a PWM-block found in a wide range of
PMICs from Qualcomm. It can operate on fixed parameters or based on a
lookup-table, altering the duty cycle over time - which provides the
means for e.g. hardware assisted transitions of LED brightness.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-11-01 06:13:38 +02:00
Bjorn Andersson
0b099e0d7e dt-bindings: leds: Add Qualcomm Light Pulse Generator binding
This adds the binding document describing the three hardware blocks
related to the Light Pulse Generator found in a wide range of Qualcomm
PMICs.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-11-01 06:13:38 +02:00
Marijn Suijten
e6dc461e83 leds: ledtrig-pattern: Use last_repeat when applying hw pattern
`last_repeat` holds the actual value requested by the user whereas
`repeat` is a software iteration variable that is unused in hardware
patterns.

Furthermore `last_repeat` is the field returned to the user when reading
the `repeat` sysfs property.  This field is initialized to `-1` which is
- together with `1` - the only valid value in the upcoming Qualcomm LPG
driver.  It is thus unexpected when `repeat` with an initialization
value of `0` is passed into the the driver, when the sysfs property
clearly presents a value of `-1`.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
2021-11-01 06:13:38 +02:00
Marijn Suijten
b2a234e861 FIXUP: simple-panel: add missing connector_type! 2021-11-01 06:13:38 +02:00
Marijn Suijten
4121e0bc1c android-recommended lies: AIO is needed for adb :| 2021-11-01 06:13:38 +02:00
Marijn Suijten
645c2d229c PANEL INNOLUX FIXUP!: Use set_tear_on for VBLANK instead of magic const 2021-11-01 06:13:38 +02:00
Marijn Suijten
3b2ed60056 gpu go 700mhz 2021-11-01 06:13:38 +02:00
Marijn Suijten
3f134d4eab sdm630: Add missing zap-shader! 2021-11-01 06:13:38 +02:00
Marijn Suijten
ad3c1d83ab nile: Turn on pm660l_wled to not -EPROBE_DEFER the panel 2021-11-01 06:13:38 +02:00
Marijn Suijten
80d6ecc10a defconfig: Disco panel! 2021-11-01 06:13:38 +02:00
Marijn Suijten
345e2402f9 DISCO PANELS?!?!? 2021-11-01 06:13:38 +02:00
Marijn Suijten
9deca0ad10 PANELS TODO FINISHME: use dev_err_probe in _probe! 2021-11-01 06:13:38 +02:00
Konrad Dybcio
7ed205734a arm64: dts: qcom: sdm63*-xperia: Add display panels
Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
2021-11-01 06:13:37 +02:00
Marijn Suijten
e5b76990e8 arm64: defconfig: Disable legacy USB networking in favour of configfs
Otherwise adb cannot get itself up
2021-11-01 06:13:37 +02:00
Marijn Suijten
84f338c4d3 630: Also system part, root fstab not found 2021-11-01 06:13:37 +02:00
Marijn Suijten
c6fea63d41 bye slotselect 2021-11-01 06:13:37 +02:00
Marijn Suijten
4835b657d6 defconfig: a508 zap, a530 firmware 2021-11-01 06:13:37 +02:00
Marijn Suijten
d492687bfa Adreno firmware in .c file; vendor DT 2021-11-01 06:13:37 +02:00
Marijn Suijten
0b8a882b92 bye framebuffer and sdhc_2 2021-11-01 06:13:37 +02:00
Marijn Suijten
be3b2acd0d defconfig: Interconnect 2021-11-01 06:13:37 +02:00
Marijn Suijten
93af1dbe3e nile: Enable gpucc 2021-11-01 06:13:37 +02:00
Marijn Suijten
f5bd27247f defconfig; MMCC and GPUCC 660 2021-11-01 06:13:37 +02:00
Marijn Suijten
8f263ba951 Android defconfig
cat
    ../../configs/r/android-5.4/android-{base,recommended,recommended-arm64}.config
    >> arch/arm64/configs/defconfig
2021-11-01 06:13:37 +02:00
Marijn Suijten
328f064e3a 660 defconfig
[Fixed up for 5.15 by Jami]
2021-11-01 06:13:37 +02:00
Konrad Dybcio
f71ea3441b arm64: dts: qcom: sdm630: Enable SMMUs
Now that the quirks are in, SMMUs are fine to enable.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
2021-11-01 06:13:37 +02:00
Konrad Dybcio
1e696c47d1 remoteproc: Add support for SDM630/636/660 MSS remoteproc
This adds support for sdm630/636/660 modem subsystem
remote processor.

Currently an issue persists, where the remote processor will
restart itself every 40 seconds, but it seems to work otherwise.

Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
2021-11-01 06:13:37 +02:00
AngeloGioacchino Del Regno
0fde91e372 drm/msm/mdp5: Fix SDM630/660 MDP5 configuration
SDM630 has two usable layer mixers (LM0, LM2) and pingpongs (PP0, PP2),
with writeback located on LM2, has no RGB pipe and does not support
source split.

SDM660 has four usable layer mixers (LM0, LM1, LM2, LM5) and
three pingpongs (PP0, PP1, PP4), with writeback located on LM2,
has no RGB pipes and does support source split; also, the HDMI
is on INTF0.

As cherry on top, let's also write the correct flush_hw_mask for
both MDP configurations to stop flushing useless and unused pipes
for performance purposes.

Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
2021-11-01 06:13:37 +02:00
Konrad Dybcio
e7523b153d drm/panel-simple: Add nt36672a Tianma FHD+ panel
This adds support for nt36672a Tianma FHD+ (2520x1080)
video mode panel as found on Sony Xperia 10 Plus (mermaid)
devices.

Due to the nature of phone manufacturing, it is impossible
to retrieve the actual panel name, hence the replacement
one, detailing the device it's used on.

Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
2021-11-01 06:13:37 +02:00
Konrad Dybcio
b4e0021277 drm/panel-simple: Add nt36672a Truly FHD+ panel
This adds support for nt36672a Truly FHD+ (2520x1080)
video mode panel as found on Sony Xperia 10 (kirin)
devices.

Due to the nature of phone manufacturing, it is impossible
to retrieve the actual panel name, hence the replacement
one, detailing the device it's used on.

Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
2021-11-01 06:13:37 +02:00