Commit graph

1045098 commits

Author SHA1 Message Date
Danct12
41179d35fb arm64: dts: msm8998-fxtec-pro1: Enable PMI8998 haptics 2021-11-01 06:13:46 +02:00
Danct12
57c7528f8c arm64: dts: msm8998-fxtec-pro1: Configure PMI8998 fuel gauge
This will account for battery statistics reporting on the Fxtec Pro1 (QX1000)
2021-11-01 06:13:46 +02:00
Danct12
23a6de947e FIXUP: arm64: dts: msm8998-fxtec-pro1: Fix volume down button compatible 2021-11-01 06:13:46 +02:00
Jami Kettunen
ac057abd31 [ANNOTATION] Apply miscellaneous hacks and patches 2021-11-01 06:13:46 +02:00
Jami Kettunen
694be6adcd Input: synaptics-rmi4 - add support for F1A
RMI4 F1A supports the simple capacitive buttons function, it's used for
example on embedded devices such as smartphones for capacitive Android
back and recents buttons.
2021-11-01 06:13:46 +02:00
Jami Kettunen
ea6b8af19e arm64: dts: qcom: msm8998: add IPA information
Add support for the MSM8998 SoC, which includes IPA version 3.1.
2021-11-01 06:13:46 +02:00
Jami Kettunen
42b3371dfa power: supply: qcom_fg: Report online property 2021-11-01 06:13:46 +02:00
Jami Kettunen
986190113f drm/msm: Mention DSI 10nm PHY support for MSM8998 2021-11-01 06:13:46 +02:00
Jami Kettunen
d2e6912f20 dt-bindings: Document bindings for all MSM8998 devices 2021-11-01 06:13:46 +02:00
Jami Kettunen
054ad80080 [HACK] ath10k: Fake MSA ready event after event server arrival
This finally allowed me to get past the 2 ath10k_info()'s in qmi.c!

However, this doesn't fix everything; it seems you *have* to run
diag-router from https://github.com/andersson/diag to calm the firmware
down and stop constantly crashing; need to look into a way to get Wi-Fi
working later without needing this debug crap to be running.
2021-11-01 06:13:46 +02:00
Jami Kettunen
c70f833efa [HACK] scripts: Stop appending "+" to localversion
This always gets added and doesn't look nice in the version string, so
it's purely for aesthetic reasons :p
2021-11-01 06:13:46 +02:00
Jami Kettunen
b608dfd547 [ANNOTATION] Apply WIP "Qualcomm SPMI Fuel Gauge" patches
https://gitlab.com/sdm845-mainline/linux/-/commits/driver/pmi8998_fg/
2021-11-01 06:13:46 +02:00
Yassine Oudjana
dffa02cc2a arm64: dts: qcom: pmi8994: Add fuel gauge 2021-11-01 06:13:46 +02:00
Yassine Oudjana
a33fd4351b power: pmi8998_fg: Rename to qcom_fg and add support for PMI8994/6
This adds support for accessing SRAM. That includes requesting and releasing
access to SRAM by setting some registers and handling the mem-avail IRQ,
configuring access, and reading from/writing to it.

Pre-gen3 fuel gauges require reading from SRAM to get voltage, current
and temperature data. Getting capacity is identical to gen3.

Tested on Xiaomi Mi Note 2 with PMI8996.
2021-11-01 06:13:46 +02:00
Yassine Oudjana
0953d76319 power: pmi8998_fg: Remove some trailing spaces and tabs
This should be squashed.
2021-11-01 06:13:45 +02:00
Joel Selvaraj
804dea4ce6 arm64: dts: qcom: sdm845-oneplus: enable pmi8998 fuel guage
Enable the new pmi8998 fuel gauge

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2021-11-01 06:13:45 +02:00
Joel Selvaraj
68229c25b8 fg: clean and read charge full and max voltage from dts 2021-11-01 06:13:45 +02:00
Joel Selvaraj
bed14a3bb9 power: supply: add battery charging status feature 2021-11-01 06:13:45 +02:00
Joel Selvaraj
41531113f2 arm64: dts: qcom: pmi8998: Add nodes for pmi8998 fuel guage 2021-11-01 06:13:45 +02:00
Joel Selvaraj
ea5b58fcdf power: supply: introduce pmi8998 fuel guage driver 2021-11-01 06:13:45 +02:00
Jami Kettunen
ae78fc1d7e [ANNOTATION] Apply "input: Introduce support for SPMI haptics found on Qcom PMICs" series
https://patchwork.kernel.org/project/linux-arm-msm/cover/20210816221931.1998187-1-caleb@connolly.tech/
2021-11-01 06:13:45 +02:00
Jami Kettunen
b48f513acf arm64: dts: qcom: msm8998-oneplus-common: Enable PMI8998 haptics
The OnePlus 5 and 5T both have a haptics engine connected to PMI8998.

Signed-off-by: Jami Kettunen <jami.kettunen@somainline.org>
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2021-11-01 06:13:45 +02:00
Joel Selvaraj
b6492e810e arm64: dts: qcom: sdm845-xiaomi-beryllium: add haptics
Enable the pmi8998 SPMI haptics driver and configure the play rate for the
hardware.

Signed-off-by: Joel Selvaraj <jo@jsfamily.in>
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2021-11-01 06:13:45 +02:00
Caleb Connolly
25f251ea49 arm64: dts: qcom: sdm845-oneplus-common: add haptics
Enable the pmi8998 SPMI haptics driver and configure the play rate for the
hardware.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2021-11-01 06:13:45 +02:00
Caleb Connolly
600576bd13 arm64: dts: qcom: pmi8998: introduce spmi haptics
Add bindings for Qualcomm SPMI haptics on platforms using pmi8998.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2021-11-01 06:13:45 +02:00
Caleb Connolly
9040d9932a input: add Qualcomm SPMI haptics driver
Add support for the haptics found in pmi8998 and related PMICs.
Based on the ff-memless interface. Currently this driver provides
a partial implementation of hardware features.

This driver only supports LRAs (Linear Resonant Actuators) in the "buffer"
mode with a single wave pattern.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2021-11-01 06:13:45 +02:00
Caleb Connolly
80280ab41e dt-bindings: input: add Qualcomm SPMI haptics driver
Add bindings for qcom PMIC SPMI haptics driver.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2021-11-01 06:13:45 +02:00
Jami Kettunen
ca7ae55c48 [ANNOTATION] Various patches from SoMainline trees & LKML 2021-11-01 06:13:45 +02:00
Junak
0d15a5ef69 drm: msm: mdp5: improve command-mode panel support 2021-11-01 06:13:45 +02:00
Jami Kettunen
5200e0ea04 [ANNOTATION] Base @ angelo/5.14-msm8998-audio-working
I also rebased this tree on the linus/v5.14 tag.
2021-11-01 06:13:45 +02:00
AngeloGioacchino Del Regno
103686b10c nt35950: partial marijn review 2021-11-01 06:13:45 +02:00
AngeloGioacchino Del Regno
cba6ccd255 dt-bindings: display: Add bindings for Novatek NT35950
The nt35950 IC from Novatek is a Driver IC used to drive MIPI-DSI panels,
with Static RAM for content retention in command mode and also supports
video mode with VESA Frame Buffer Compression or Display Stream Compression
on single, or dual dsi port(s).
This DDIC is also capable of upscaling an input image to the panel's native
resolution, for example it can upscale a 1920x1080 input to 3840x2160 with
either bilinear interpolation or pixel duplication.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:45 +02:00
AngeloGioacchino Del Regno
5f9d2ce95d nt35950: final 2021-11-01 06:13:45 +02:00
AngeloGioacchino Del Regno
09588133d4 soc: qcom: spm: Implement support for SAWv2.3, MSM8976 L2 PM
Implement the support for SAW v2.3, used in at least MSM8976, MSM8956
and APQ variants and, while at it, also add the configuration for the
MSM8976's little (a53) and big (a72) clusters cache power management.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:45 +02:00
AngeloGioacchino Del Regno
10df41f3a6 interconnect: qcom: Add MSM8976 interconnect provider driver
Introduce a driver for the Qualcomm interconnect busses found in
the MSM8976/8956 SoCs.
The topology consists of several NoCs that are controlled by a
remote processor that collects the aggregated bandwidth for each
master-slave pairs.
2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
04285e416b adreno 5xx: TTBR1 extravaganza on MSM8998 2021-11-01 06:13:44 +02:00
Marijn Suijten
5b142a5515 backlight: qcom-wled: Consistently use enabled-strings in set_brightness
According to the documentation any combination of LEDs can be used,
which is specified in the DT using qcom,enabled-strings as u32 array.
The numbers specified in this array represent indices of the led strings
that are to be enabled and disabled.

The value is appropriately used to enable string modules, but completely
disregarded in the set_brightness path which only iterates over "string
indices" 0<=i<num_strings.
This means that in order to have a custom set of strings enabled in the
DT, qcom,num-strings needs to be at least equal to the highest string
index plus one, even if that doesn't reflect the actual number of
strings used on the system.
In turn, gaps in the strings list need to be filled with duplicate
indices in order to prevent enabling other strings not listed in the
array (those are specified by the default for wled3 and 4, but not
overwritten when the array is read from the DT).

Take for example a situation where only string 1 is desired to be turned
on. Specifying an array of <1> will only overwrite the first entry of
enabled_strings, while the other numbers stick to their default. Unless
qcom,num-strings is adjusted to 1 too, other (unspecified) string
modules get enabled too.
However, this causes set_brightness to only write a brightness value to
the string at index 0.

This patch aims to simplify the case for custom string combinations by
using enabled_strings in set_brightness, as well as updating num_strings
with the length of the array when it is set.
It is assumed here that setting an array of enabled strings
TODO BETTER WORDS rules out
the use of autodetection, or at least only apply autodetection on the
specified LED modules.
TODO: THIS LATTER PART IS CURRENTLY NOT ACTUALLY THE CASE... WHAT DO WE
WANT?

Furthermore, in order to ensure the autodetection keeps working, the
default {0, 1, 2, 3} enabled_strings value has been adopted from wled3.
This is identical to iterating the indices from 0<=i<num_strings where
num_strings defaults to 4.
Keep in mind that wled4 did not have a sensible default, which would
cause only string 0 to be enabled in wled4_setup with autodetection
disabled, even when num_strings is 4.

TODO TODO TODO
SECOND FINALLY: There is another error. The default of qcom,num_strings
in case it's unset is 4. The cfg.num_strings = cfg.num_strings + 1;
causes writes to an unexisting or overlapping register in set_brightness
and other functions relying on num_strings.

TODO TODO TODO CLEAN UP WORD CONVENTION. Are we talking about strings,
modules, string modules, LED modules??? What's the unit here?
[mainline todo]: num-strings is not optional atm.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
2021-11-01 06:13:44 +02:00
Marijn Suijten
8ed17fc2f4 backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
2021-11-01 06:13:44 +02:00
Marijn Suijten
af4b70fff2 backlight: qcom-wled: Pass number of elements to read to read_u32_array
of_property_read_u32_array takes the number of elements to read as last
argument. This does not always need to be 4 (sizeof(u32)) but should
instead be the size of the array in DT as read just above with
of_property_count_elems_of_size.

To not make such an error go unnoticed again the driver now bails
accordingly when of_property_read_u32_array returns an error.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
aaa397f95a various tests 2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
ac4ea80c8c iommu/arm-smmu-qcom: Add MSM8998 and SDM660 mss compatibles for identity
Add MSM8998 and SDM660's mss-pil compatibles to switch the default
iommu domain type to IDENTITY, as similarly required by SDM845 and
others.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
a6d0e33c3f iommu/arm-smmu-qcom: Skip the TTBR1 quirk for MSM8998 and SDM630
Similarly to MSM8996 DragonBoard 820c, MSM8998 and SDM630 are equipped
with Adreno 5xx series, which doesn't have separate pagetables support
at the moment of writing.
Skip the TTBR1 quirk for these two SoCs as to get Adreno in a usable
state.
2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
74eacc6b50 AUDIO WORKS 2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
055b21d3cf ASoC: codecs: wcd9335: Fix headphone jack commit for new upstream kernel 2021-11-01 06:13:44 +02:00
Srinivas Kandagatla
8388111622 ASoC: wcd9335: add mbhc support
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
989cb3490b Revert "wcd9335 garbage"
This reverts commit d1f50ba3a4b33c98162c4b202d4c154d4ab22689.
2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
eb54959b93 stuff 2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
99098ac658 wcd9335 garbage 2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
7b4567cebc arm64: dts: qcom: msm8998: Add disabled slimbus support
Add generic slimbus configuration to MSM8998 and keep it disabled.
It is expected that this will be enabled in board-specific device
trees when supported, along with the right audio codec.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:44 +02:00
AngeloGioacchino Del Regno
672fd7d815 ASoC: qcom: Add MSM8998 sound card support
Add MSM8998 sound support: this driver supports basic functionality
and headphone jack.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2021-11-01 06:13:44 +02:00