Zeng Heng
6f42f5e73b
soc: mediatek: mtk-svs: add missing MODULE_DEVICE_TABLE
...
This patch adds missing MODULE_DEVICE_TABLE definition
which generates correct modalias for automatic loading
of this driver when it is built as an external module.
Signed-off-by: Zeng Heng <zengheng4@huawei.com >
Link: https://lore.kernel.org/r/20220928151346.1942977-1-zengheng4@huawei.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-02-01 14:35:12 +01:00
AngeloGioacchino Del Regno
916120df5a
soc: mediatek: mtk-devapc: Switch to devm_clk_get_enabled()
...
This driver does exactly devm_clk_get() and clk_prepare_enable() right
after, which is exactly what devm_clk_get_enabled() does: clean that
up by switching to the latter.
This commit brings no functional changes.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20221006110935.59695-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-02-01 14:22:29 +01:00
Roger Lu
d5a7d80990
soc: mtk-svs: mt8183: refactor o_slope calculation
...
The o_slope value is dependent of the o_slope_sign, refactor code to get
rid of unnecessary if constructs.
Signed-off-by: Roger Lu <roger.lu@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230111074528.29354-15-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-31 14:40:55 +01:00
Matthias Brugger
01c9a8bd23
soc: mediatek: mtk-svs: delete superfluous platform data entries
...
The platform name and efuse parsing function pointer are only used while
probing the device. Use them from the svs_platform_data struct instead.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Roger Lu <roger.lu@mediatek.com >
Link: https://lore.kernel.org/r/20230111074528.29354-12-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-31 14:30:24 +01:00
Matthias Brugger
5343e9ffb4
soc: mediatek: mtk-svs: move svs_platform_probe into probe
...
Moving svs_platform_probe into driver probe function will allow us to
reduce svs_platform members. This will be done in a follow-up patch.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Roger Lu <roger.lu@mediatek.com >
Link: https://lore.kernel.org/r/20230111074528.29354-11-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-31 14:24:58 +01:00
Matthias Brugger
227fafd73b
soc: mediatek: mtk-svs: improve readability of platform_probe
...
If a compatible misses a match data entry, then something is wrong in
the development phase, we don't need to check for that at runtime.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Roger Lu <roger.lu@mediatek.com >
Link: https://lore.kernel.org/r/20230111074528.29354-10-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-31 14:24:38 +01:00
Matthias Brugger
3bab727bef
soc: mediatek: mtk-svs: clean up platform probing
...
We only ever call the SoC specific probe function from
svs_platform_probe. No need to carry that function in a global
datastructure around.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Roger Lu <roger.lu@mediatek.com >
Link: https://lore.kernel.org/r/20230111074528.29354-9-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-31 14:24:17 +01:00
Roger Lu
8bf3050876
soc: mediatek: mtk-svs: keep svs alive if CONFIG_DEBUG_FS not supported
...
Some projects might not support CONFIG_DEBUG_FS but still needs svs to be
alive. Therefore, enclose debug cmd codes with CONFIG_DEBUG_FS to make sure
svs can be alive when CONFIG_DEBUG_FS not supported.
Signed-off-by: Roger Lu <roger.lu@mediatek.com >
Link: https://lore.kernel.org/r/20230111074528.29354-8-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-31 14:23:55 +01:00
Shang XiaoJing
37fa2aff8f
soc: mediatek: mtk-svs: Use pm_runtime_resume_and_get() in svs_init01()
...
svs_init01() calls pm_runtime_get_sync() and added fail path as
svs_init01_finish to put usage_counter. However, pm_runtime_get_sync()
will increment usage_counter even it failed. Fix it by replacing it with
pm_runtime_resume_and_get() to keep usage counter balanced.
Fixes: 681a02e950 ("soc: mediatek: SVS: introduce MTK SVS engine")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com >
Signed-off-by: Roger Lu <roger.lu@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230111074528.29354-5-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-31 14:23:05 +01:00
Roger Lu
f4f8ad204a
soc: mediatek: mtk-svs: reset svs when svs_resume() fail
...
Add svs reset when svs_resume() fail.
Fixes: a825d72f74 ("soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume()")
Signed-off-by: Roger Lu <roger.lu@mediatek.com >
Link: https://lore.kernel.org/r/20230111074528.29354-3-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-31 14:22:14 +01:00
Roger Lu
a0674cd237
soc: mediatek: mtk-svs: restore default voltages when svs_init02() fail
...
If svs init02 fail, it means we cannot rely on svs bank voltages anymore.
We need to disable svs function and restore DVFS opp voltages back to the
default voltages for making sure we have enough DVFS voltages.
Fixes: 681a02e950 ("soc: mediatek: SVS: introduce MTK SVS engine")
Fixes: 0bbb09b2af ("soc: mediatek: SVS: add mt8192 SVS GPU driver")
Signed-off-by: Roger Lu <roger.lu@mediatek.com >
Link: https://lore.kernel.org/r/20230111074528.29354-2-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-31 14:21:49 +01:00
Roy-CW.Yeh
78ce3093f0
soc: mediatek: mmsys: add support for MT8195 VPPSYS
...
Add MT8195 VPPSYS0 and VPPSYS1 driver data.
Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com >
Signed-off-by: Moudy Ho <moudy.ho@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230118031509.29834-5-moudy.ho@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-30 12:27:08 +01:00
Moudy Ho
1873da264c
dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS
...
For MT8195, VPPSYS0 and VPPSYS1 are 2 display pipes with
hardware differences in power domains, clocks and subsystem counts,
which should be determined by compatible names.
Signed-off-by: Moudy Ho <moudy.ho@mediatek.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230118031509.29834-3-moudy.ho@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-30 12:27:02 +01:00
AngeloGioacchino Del Regno
c200774a6d
soc: mediatek: Introduce mediatek-regulator-coupler driver
...
This driver currently deals with GPU-SRAM regulator coupling, ensuring
that the SRAM voltage is always between a specific range of distance to
the GPU voltage, depending on the SoC, necessary in order to achieve
system stability across the full range of supported GPU frequencies.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Link: https://lore.kernel.org/r/20221006115816.66853-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-30 11:27:49 +01:00
Ricardo Ribalda
b74952aba6
soc: mediatek: mtk-svs: Enable the IRQ later
...
If the system does not come from reset (like when is booted via
kexec()), the peripheral might triger an IRQ before the data structures
are initialised.
Fixes:
[ 0.227710] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000f08
[ 0.227913] Call trace:
[ 0.227918] svs_isr+0x8c/0x538
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org >
Link: https://lore.kernel.org/r/20221127-mtk-svs-v2-0-145b07663ea8@chromium.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 20:10:09 +01:00
Nancy.Lin
4ea6aa8902
soc: mediatek: add mtk-mutex support for mt8195 vdosys1
...
Add mtk-mutex support for mt8195 vdosys1.
The vdosys1 path component contains ovl_adaptor, merge5,
and dp_intf1. Ovl_adaptor is composed of several sub-elements
which include MDP_RDMA0~7, MERGE0~3, and ETHDR.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: CK Hu <ck.hu@mediatek.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://lore.kernel.org/r/20230113104434.28023-12-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:15 +01:00
Nancy.Lin
8150a0e3a9
soc: mediatek: add mtk-mutex component - dp_intf1
...
Add mtk-mutex DDP_COMPONENT_DP_INTF1 component. The MT8195 vdosys1 path
component contains ovl_adaptor, merge5, and dp_intf1. It is a preparation
for adding support for MT8195 vdosys1 path component.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: CK Hu <ck.hu@mediatek.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://lore.kernel.org/r/20230113104434.28023-11-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:15 +01:00
Nancy.Lin
7f0a38f46b
soc: mediatek: mmsys: add reset control for MT8195 vdosys1
...
MT8195 vdosys1 has more than 32 reset bits and a different reset base
than other chips. Add the number of reset bits and reset base in mmsys
private data.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: CK Hu <ck.hu@mediatek.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://lore.kernel.org/r/20230113104434.28023-10-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:15 +01:00
Nancy.Lin
2004f8be84
soc: mediatek: mmsys: add mmsys for support 64 reset bits
...
Add mmsys for support 64 reset bits. It is a preparation for MT8195
vdosys1 HW reset. MT8195 vdosys1 has more than 32 reset bits.
1. Add the number of reset bits in mmsys private data
2. move the whole "reset register code section" behind the
"get mmsys->data" code section for getting the num_resets in mmsys->data.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: CK Hu <ck.hu@mediatek.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com >
Link: https://lore.kernel.org/r/20230113104434.28023-9-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:15 +01:00
Nancy.Lin
8af1f6b5bc
soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1
...
Add cmdq support for mtk-mmsys config API.
The mmsys config register settings need to take effect with the other
HW settings(like OVL_ADAPTOR...) at the same vblanking time.
If we use CPU to write the mmsys reg, we can't guarantee all the
settings can be written in the same vblanking time.
Cmdq is used for this purpose. We prepare all the related HW settings
in one cmdq packet. The first command in the packet is "wait stream done",
and then following with all the HW settings. After the cmdq packet is
flush to GCE HW. The GCE waits for the "stream done event" to coming
and then starts flushing all the HW settings. This can guarantee all
the settings flush in the same vblanking.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: CK Hu <ck.hu@mediatek.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://lore.kernel.org/r/20230113104434.28023-8-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:15 +01:00
Nancy.Lin
3dd20b715c
soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1
...
Add four mmsys config APIs. The config APIs are used for config
mmsys reg. Some mmsys regs need to be set according to the
HW engine binding to the mmsys simultaneously.
1. mtk_mmsys_merge_async_config: config merge async width/height.
async is used for cross-clock domain synchronization.
2. mtk_mmsys_hdr_confing: config hdr backend async width/height.
3. mtk_mmsys_mixer_in_config and mtk_mmsys_mixer_in_config:
config mixer related settings.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: CK Hu <ck.hu@mediatek.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://lore.kernel.org/r/20230113104434.28023-7-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:15 +01:00
Nancy.Lin
0a815034a5
soc: mediatek: refine code to use mtk_mmsys_update_bits API
...
Simplify code for update mmsys reg.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: CK Hu <ck.hu@mediatek.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com >
Link: https://lore.kernel.org/r/20230113104434.28023-6-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:14 +01:00
Nancy.Lin
39170127c1
soc: mediatek: add mtk-mmsys support for mt8195 vdosys1
...
Add mt8195 vdosys1 routing table to the driver data of mtk-mmsys.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com >
Reviewed-by: CK Hu <ck.hu@mediatek.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://lore.kernel.org/r/20230113104434.28023-5-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:14 +01:00
Nancy.Lin
be234d0024
soc: mediatek: add mtk-mmsys ethdr and mdp_rdma components
...
Add new mmsys component: ethdr_mixer and mdp_rdma. These components will
use in mt8195 vdosys1.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: CK Hu <ck.hu@mediatek.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://lore.kernel.org/r/20230113104434.28023-4-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:14 +01:00
Nancy.Lin
664a39b8e7
dt-bindings: reset: mt8195: add vdosys1 reset control bit
...
Add vdosys1 reset control bit for MT8195 platform.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230113104434.28023-3-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:14 +01:00
Nancy.Lin
82219cfbef
dt-bindings: arm: mediatek: mmsys: add vdosys1 compatible for MT8195
...
Add vdosys1 mmsys compatible for MT8195 platform.
For MT8195, VDOSYS0 and VDOSYS1 are 2 display HW pipelines binding to
2 different power domains, different clock drivers and different
mediatek-drm drivers.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230113104434.28023-2-nancy.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-25 16:05:14 +01:00
Allen-KH Cheng
7d1ae5926d
soc: mediatek: pm-domains: Add buck isolation setting in power domain
...
In some chipsets, we need to disable EXT_BUCK_ISO before turning on the
specific power pm-domains (mtcmos), such as ADSP in MT8192 and CAM_VCORE
in MT8188.
Add the MTK_SCPD_EXT_BUCK_ISO flag to control the buck isolation setting
in the mediatek power domain driver.
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230117032640.13504-3-allen-kh.cheng@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-19 18:44:57 +01:00
Allen-KH Cheng
1e28f6a35f
soc: mediatek: pm-domains: Add buck isolation offset and mask to power domain data
...
Add buck isolation offset and mask to power domain data.
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230117032640.13504-2-allen-kh.cheng@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-19 18:44:54 +01:00
Fabien Parent
297770ec5c
Input: mtk-pmic-keys: add MT6357 support
...
Add PMIC Keys support on MT6357 SoC.
Signed-off-by: Fabien Parent <fparent@baylibre.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com >
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-6-560caaafee53@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-19 18:25:44 +01:00
Alexandre Mergnat
22282276ea
dt-bindings: mfd: mediatek: Add bindings for MT6357 PMIC
...
Currently, almost all MT63XX PMIC are documented mfd/mt6397.txt.
Unfortunately, the PMICs haven't always similar HW sub-features.
To have a better human readable schema, I chose to make one PMIC schema
to match the exact HW capabilities instead of convert mt6397.txt to
mediatek,mt63xx.yaml and put a bunch of properties behind
"if contain ... then ..."
- add interrupt property
- change property refs to match with new yaml documentation
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Lee Jones <lee@kernel.org >
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-3-560caaafee53@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-19 18:25:44 +01:00
Alexandre Mergnat
fc5a643fdd
dt-bindings: soc: mediatek: convert pwrap documentation
...
- Convert soc/mediatek/pwrap.txt to soc/mediatek/mediatek,pwrap.yaml
- Add syscon compatible const for mt8186 and mt8195 to match the DTS needs,
which is missing from pwrap.txt.
Reviewed-by: Rob Herring <robh@kernel.org >
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-2-560caaafee53@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-19 18:25:44 +01:00
Fabien Parent
f32397bfbd
dt-bindings: input: mtk-pmic-keys: add binding for MT6357 PMIC
...
Add binding documentation for the PMIC keys on MT6357.
Signed-off-by: Fabien Parent <fparent@baylibre.com >
Acked-by: Rob Herring <robh@kernel.org >
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com >
Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-1-560caaafee53@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-19 18:25:43 +01:00
Garmin.Chang
e610e81464
soc: mediatek: pm-domains: Add support for mt8188
...
Add domain control data including bus protection data size
change due to more protection steps in mt8188.
Signed-off-by: Garmin.Chang <Garmin.Chang@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20221223080553.9397-3-Garmin.Chang@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-19 17:17:37 +01:00
Garmin.Chang
1725dde87f
dt-bindings: power: Add MT8188 power domains
...
Add power domains dt-bindings for MT8188.
Signed-off-by: Garmin.Chang <Garmin.Chang@mediatek.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20221223080553.9397-2-Garmin.Chang@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-19 17:17:37 +01:00
Yongqiang Niu
a7596e62da
mtk-mmsys: Change mtk-mmsys & mtk-mutex to modules
...
Change mtk-mmsys & mtk-mutex to modules for gki
Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20221118063018.13520-1-yongqiang.niu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-09 17:17:47 +01:00
Tinghan Shen
0d08c56d97
soc: mediatek: mtk-pm-domains: Allow mt8186 ADSP default power on
...
In the use case of configuring the access permissions of the ADSP core,
the mt8186 SoC ADSP power will be switched on in the bootloader because
the permission control registers are located in the ADSP subsys.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com >
Fixes: 88590cbc17 ("soc: mediatek: pm-domains: Add support for mt8186")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20221012075434.30009-1-tinghan.shen@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-09 17:17:46 +01:00
Nathan Lu
64bc37bf39
soc: mediatek: add mtk-mutex support for mt8188 vdosys0
...
add mtk-mutex support for mt8188 vdosys0.
Signed-off-by: amy zhang <Amy.Zhang@mediatek.com >
Signed-off-by: Nathan Lu <nathan.lu@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20221206020046.11333-6-nathan.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-09 17:17:46 +01:00
Nathan Lu
3b1a57c4f9
soc: mediatek: add mtk-mmsys support for mt8188 vdosys0
...
1. add mt8188 mmsys
2. add mt8188 vdosys0 routing table settings
Signed-off-by: amy zhang <Amy.Zhang@mediatek.com >
Signed-off-by: Nathan Lu <nathan.lu@mediatek.com >
Link: https://lore.kernel.org/r/20221206020046.11333-5-nathan.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-09 17:17:46 +01:00
Nathan Lu
5d98c6351d
dt-bindings: mediatek: modify VDOSYS0 mutex device tree Documentations for MT8188
...
modify VDOSYS0 mutex device tree Documentations for MT8188.
Signed-off-by: Nathan Lu <nathan.lu@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221206020046.11333-4-nathan.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-09 17:17:46 +01:00
Nathan Lu
2433c71670
dt-bindings: mediatek: modify VDOSYS0 mmsys device tree Documentations for MT8188
...
modify VDOSYS0 mmsys device tree Documentations for MT8188.
Signed-off-by: Nathan Lu <nathan.lu@mediatek.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221206020046.11333-3-nathan.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-09 17:17:46 +01:00
Uwe Kleine-König
169fa2ad8d
soc: mediatek: mutex: Drop empty platform remove function
...
A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2023-01-09 17:17:46 +01:00
Linus Torvalds
1b929c02af
Linux 6.2-rc1
v6.2-rc1
2022-12-25 13:41:39 -08:00
Steven Rostedt (Google)
292a089d78
treewide: Convert del_timer*() to timer_shutdown*()
...
Due to several bugs caused by timers being re-armed after they are
shutdown and just before they are freed, a new state of timers was added
called "shutdown". After a timer is set to this state, then it can no
longer be re-armed.
The following script was run to find all the trivial locations where
del_timer() or del_timer_sync() is called in the same function that the
object holding the timer is freed. It also ignores any locations where
the timer->function is modified between the del_timer*() and the free(),
as that is not considered a "trivial" case.
This was created by using a coccinelle script and the following
commands:
$ cat timer.cocci
@@
expression ptr, slab;
identifier timer, rfield;
@@
(
- del_timer(&ptr->timer);
+ timer_shutdown(&ptr->timer);
|
- del_timer_sync(&ptr->timer);
+ timer_shutdown_sync(&ptr->timer);
)
... when strict
when != ptr->timer
(
kfree_rcu(ptr, rfield);
|
kmem_cache_free(slab, ptr);
|
kfree(ptr);
)
$ spatch timer.cocci . > /tmp/t.patch
$ patch -p1 < /tmp/t.patch
Link: https://lore.kernel.org/lkml/20221123201306.823305113@linutronix.de/
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org >
Acked-by: Pavel Machek <pavel@ucw.cz > [ LED ]
Acked-by: Kalle Valo <kvalo@kernel.org > [ wireless ]
Acked-by: Paolo Abeni <pabeni@redhat.com > [ networking ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2022-12-25 13:38:09 -08:00
Linus Torvalds
72a85e2b0a
Merge tag 'spi-fix-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
...
Pull spi fix from Mark Brown:
"One driver specific change here which handles the case where a SPI
device for some reason tries to change the bus speed during a message
on fsl_spi hardware, this should be very unusual"
* tag 'spi-fix-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: fsl_spi: Don't change speed while chipselect is active
2022-12-23 14:44:08 -08:00
Linus Torvalds
0a023cbb11
Merge tag 'regulator-fix-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
...
Pull regulator fixes from Mark Brown:
"Two core fixes here, one for a long standing race which some Qualcomm
systems have started triggering with their UFS driver and another
fixing a problem with supply lookup introduced by the fixes for devm
related use after free issues that were introduced in this merge
window"
* tag 'regulator-fix-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: core: fix deadlock on regulator enable
regulator: core: Fix resolve supply lookup issue
2022-12-23 14:38:00 -08:00
Linus Torvalds
2c91ce92c6
Merge tag 'coccinelle-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux
...
Pull coccicheck update from Julia Lawall:
"Modernize use of grep in coccicheck:
Use 'grep -E' instead of 'egrep'"
* tag 'coccinelle-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
scripts: coccicheck: use "grep -E" instead of "egrep"
2022-12-23 13:56:41 -08:00
Linus Torvalds
51094a24b8
Merge tag 'hardening-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
...
Pull kernel hardening fixes from Kees Cook:
- Fix CFI failure with KASAN (Sami Tolvanen)
- Fix LKDTM + CFI under GCC 7 and 8 (Kristina Martsenko)
- Limit CONFIG_ZERO_CALL_USED_REGS to Clang > 15.0.6 (Nathan
Chancellor)
- Ignore "contents" argument in LoadPin's LSM hook handling
- Fix paste-o in /sys/kernel/warn_count API docs
- Use READ_ONCE() consistently for oops/warn limit reading
* tag 'hardening-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
cfi: Fix CFI failure with KASAN
exit: Use READ_ONCE() for all oops/warn limit reads
security: Restrict CONFIG_ZERO_CALL_USED_REGS to gcc or clang > 15.0.6
lkdtm: cfi: Make PAC test work with GCC 7 and 8
docs: Fix path paste-o for /sys/kernel/warn_count
LoadPin: Ignore the "contents" argument of the LSM hooks
2022-12-23 12:00:24 -08:00
Linus Torvalds
edb23125fd
Merge tag 'pstore-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
...
Pull pstore fixes from Kees Cook:
- Switch pmsg_lock to an rt_mutex to avoid priority inversion (John
Stultz)
- Correctly assign mem_type property (Luca Stefani)
* tag 'pstore-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
pstore: Properly assign mem_type property
pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES
pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion
2022-12-23 11:55:54 -08:00
Linus Torvalds
59d2c635f6
Merge tag 'dma-mapping-2022-12-23' of git://git.infradead.org/users/hch/dma-mapping
...
Pull dma-mapping fixes from Christoph Hellwig:
"Fix up the sound code to not pass __GFP_COMP to the non-coherent DMA
allocator, as it copes with that just as badly as the coherent
allocator, and then add a check to make sure no one passes the flag
ever again"
* tag 'dma-mapping-2022-12-23' of git://git.infradead.org/users/hch/dma-mapping:
dma-mapping: reject GFP_COMP for noncoherent allocations
ALSA: memalloc: don't use GFP_COMP for non-coherent dma allocations
2022-12-23 11:44:20 -08:00
Linus Torvalds
e3b862ed89
Merge tag '9p-for-6.2-rc1' of https://github.com/martinetd/linux
...
Pull 9p updates from Dominique Martinet:
- improve p9_check_errors to check buffer size instead of msize when
possible (e.g. not zero-copy)
- some more syzbot and KCSAN fixes
- minor headers include cleanup
* tag '9p-for-6.2-rc1' of https://github.com/martinetd/linux :
9p/client: fix data race on req->status
net/9p: fix response size check in p9_check_errors()
net/9p: distinguish zero-copy requests
9p/xen: do not memcpy header into req->rc
9p: set req refcount to zero to avoid uninitialized usage
9p/net: Remove unneeded idr.h #include
9p/fs: Remove unneeded idr.h #include
2022-12-23 11:39:18 -08:00