Commit graph

1265432 commits

Author SHA1 Message Date
Arnd Bergmann 40b561e501 TEE driver for Trusted Services
This introduces a TEE driver for Trusted Services [1].
 
 Trusted Services is a TrustedFirmware.org project that provides a
 framework for developing and deploying device Root of Trust services in
 FF-A [2] Secure Partitions. The project hosts the reference
 implementation of Arm Platform Security Architecture [3] for Arm
 A-profile devices.
 
 The FF-A Secure Partitions are accessible through the FF-A driver in
 Linux. However, the FF-A driver doesn't have a user space interface so
 user space clients currently cannot access Trusted Services. The goal of
 this TEE driver is to bridge this gap and make Trusted Services
 functionality accessible from user space.
 
 [1] https://www.trustedfirmware.org/projects/trusted-services/
 [2] https://developer.arm.com/documentation/den0077/
 [3] https://www.arm.com/architecture/security-features/platform-security
 -----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCgA4FiEEFV+gSSXZJY9ZyuB5LinzTIcAHJcFAmYp+8YaHGplbnMud2lr
 bGFuZGVyQGxpbmFyby5vcmcACgkQLinzTIcAHJd3ixAAsWZwTmxavFD1Qh2bN6dR
 XdRfv/4+8CXSN84aETBhlbjjzcUYswl6icyIcpShLcgFF7KvS+H30LRe0SGi9hjl
 xePS0hoYteLtIDN0S9u5kaM8EdYeXKYU3hNqQHKxksCh7jlTEkwC0XcOb18OkyZT
 niCHZ7+dKTmVQhH+MDvvUmeAljzk6vNwBBIBRscUX+JuG3IjWEux8pZedP3RAAS7
 IKNNtcylGB3JJVJ5H11TRF42LeQSohHyKYp1XaMca6lwWi1PoAXKIia1gcsNYLLN
 yaJByAiyGi2olk3SjeDx8Q0H35ezgJLwRBXulCXlCKzzc9ZFoVOw+a3QOI0tCJJ2
 qnUq2YZwEb4yHryPk0/v1mDCkl9MZZTpL85CYFvS84e/Gk26eZAUHwWAlgPZY6Js
 yWmfIAE/qtV48B0vUOxQGZgFAIsgn1TwaiOMWlEAoqlOQb6GosKYkCEHmfMJVMRo
 F3DeD/QOTWr4u91dFgbStL5CNwVu9yhFzgYDekPxBJfv+4IzITUmUPdne/FNqz4G
 P4RgQXstIl2xn58A/p457WSTmu/5N95/IILw0FNsbEiqNou0Wv+HFEEKEhzCSoOp
 gru5xcGrBnx+1IdE2Vw77+XhsKHCUejTrFhWXHQM6zGA1XWr30XwkmgvS1f/xolB
 DFsYhlZNRazhL16BsD4tGgo=
 =RJca
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYwAzkACgkQYKtH/8kJ
 UicRyg/+JKZAg3KJ3lG2uXGvb9a/kqpenroR7AJu4bLgsj/3KdXAVozxV0vzh7dc
 ayQCydMnMnKZDqlFoyDdqJEpFY3HINC6qknFYPF3Juc9R8aOGhMA8gN41vYDUbtS
 PXjIRkoaSUvtaZ4MarU6S/jzi3h5FpdZ1VqBoSgHioG58w+aihN/ElauhLc/qJh4
 Sz4hAsqBKKS107w0mwWaV0YhLbiGoxVBeQi8xLhO15Iy22jMU0NKMn3kGk0I14S8
 maDV64UaVD9qwilp46kbErPXodzzhmwvR53vCEH54CCv4j9GoM80A+UrB7yboZu2
 qY6k4LsyIVN6yHV268bHluNeo+XeTQbkEZxBS3SKe0NkhWY51BHL2vW/TFMr4BNj
 xl9WLf4IaS6GX0NYCyiXqaEh92USHgdl41eTf9P4vnyPSH3cMryw9FK/f/1F7JGS
 SOERoHVuyX0VeqUelWf4/Grux9n+votM49QCrdAICMbRcgiIIv/ITzKiSzYMKC0J
 pS4F9426ZymPkq9CVYBy8yl2atNUjiBZ+tW55eRDAfNKJf/4N4b7ncxVAPoPf2J4
 LhvEnKMAs4GtaF6G+0d2ltxhQdsl3uK9i2XEy+2WY4HceH2FEYctzG44SsIEzlVQ
 D/FyyKpa5aPyybFsdYGXyfyVv5GBFPowPeFXK9k9GH9ODc33xAE=
 =VM1o
 -----END PGP SIGNATURE-----

Merge tag 'tee-ts-for-v6.10' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers

TEE driver for Trusted Services

This introduces a TEE driver for Trusted Services [1].

Trusted Services is a TrustedFirmware.org project that provides a
framework for developing and deploying device Root of Trust services in
FF-A [2] Secure Partitions. The project hosts the reference
implementation of Arm Platform Security Architecture [3] for Arm
A-profile devices.

The FF-A Secure Partitions are accessible through the FF-A driver in
Linux. However, the FF-A driver doesn't have a user space interface so
user space clients currently cannot access Trusted Services. The goal of
this TEE driver is to bridge this gap and make Trusted Services
functionality accessible from user space.

[1] https://www.trustedfirmware.org/projects/trusted-services/
[2] https://developer.arm.com/documentation/den0077/
[3] https://www.arm.com/architecture/security-features/platform-security

* tag 'tee-ts-for-v6.10' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  MAINTAINERS: tee: tstee: Add entry
  Documentation: tee: Add TS-TEE driver
  tee: tstee: Add Trusted Services TEE driver
  tee: optee: Move pool_op helper functions
  tee: Refactor TEE subsystem header files

Link: https://lore.kernel.org/r/20240425073119.GA3261080@rayden
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:29:44 +02:00
Arnd Bergmann d9f843fbd4 OP-TEE Convert to platform remove callback returning void
-----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCgA4FiEEFV+gSSXZJY9ZyuB5LinzTIcAHJcFAmYp+g0aHGplbnMud2lr
 bGFuZGVyQGxpbmFyby5vcmcACgkQLinzTIcAHJf6OBAAvqgiq2gbDF8iJOB+0zz8
 S/h5yOdKDLDrxXU5uv0Kth/+kXVVpuHidRN2mwe2M5xlAr3ZRS/mwvS/KnU4AWTr
 4pOfF35ARq5I7W6EVV6l8iCAWhTIos/L1eKvasvSh+igXvja1Fp9+N1bzCEnOekF
 ifrlq74DWsjH4OKWQbUnasvAmp8C22GAzWFIf5NepyKTdxjRvxfKKs2zOr76ScpP
 lgyBpKPLoi5Ez/gcCyIGs78xtlDZz3JtQ1W7Pa8FvtTSrYqUsbH/ZZcrIxSLQN5n
 +OFJ1jcMhW1jHyFVLHaeTQyGi0NKoGcJ6Q3yM4htKRSDZ6/pIzqoAettFhjMD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RqQS29Tej6fLh4LdAMlqX/F4Z8H3aIKEa6vJnXBWxxrRqW0Z3yhiOIfHBK2/rV3
 cyDvLTOy856SZ0UMEEVniReK1BPb/mq7GalCIsasFjeltlhi8ho=
 =Unfh
 -----END PGP SIGNATURE-----

Merge tag 'optee-convert-platform-remove-callback-for-v6.10' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers

OP-TEE Convert to platform remove callback returning void

* tag 'optee-convert-platform-remove-callback-for-v6.10' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: optee: smc: Convert to platform remove callback returning void

Link: https://lore.kernel.org/r/20240425072835.GA3258167@rayden
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:29:05 +02:00
Arnd Bergmann d1734cfcec MediaTek driver updates for v6.10
This adds a much needed cleanup for the MediaTek CMDQ helper driver and
 also some more helper functions which will be used in drivers using the
 MediaTek Global Command Engine (GCE) HW.
 
 Also adds support for MT8188's VPPSYS mutex for MDP3 support, a new SoC
 in the mtk-socinfo driver and changes the marketing name for the pre
 existing MT8188 SoC.
 -----BEGIN PGP SIGNATURE-----
 
 iJ4EABYKAEYWIQQn3Xxr56ypAcSHzXSaNgTPrZeEeAUCZi+cOCgcYW5nZWxvZ2lv
 YWNjaGluby5kZWxyZWdub0Bjb2xsYWJvcmEuY29tAAoJEJo2BM+tl4R4QsoBAPuI
 rGRlN0B+gFmkv/Q90EXVRd3UoIDCUK7rlqWjegWaAP0eb8s/Rtl2xy0x5OrEFX+R
 AfGVBb6frmdRGFYi7gl7Bg==
 =XSlW
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYwAqUACgkQYKtH/8kJ
 UicmOQ/9HoCY3U9BGmOCLc+XuTS+7BqIkLpeOdFWg9uyResDbTalyrfhzam2RLba
 G83y8HLmlhkQJh844Z/NOU4hMfcgtOD4MM80y6HSMfmI3giWNpgLe8v8wuA1pxJ7
 xAbVfWrmW4PiRdSxEj7TzHN04xYAhroYioSnvljYFinaPuk3Z64ACZlomk6I/tVa
 zh9b+5A7aQsIG6iAJgwYr/pxIiGVyz/TVhulUDAxjuD2GkyFlaqa087P3f+V9Ciq
 ryGkBM4pdmFhK9ajZaCVK0CZcAA++BHEBfZ+PUBkyzoHUSCMINCujvk3wW/GU0j7
 41czEO2z345WeClvOOEMEcGLRPAUvYnd7JgtKthY94vx40di8ddboPRYX4aeYG/M
 4aQHNXetjDoozrzOmT2EyUuMgcVFwz/4l81QHEGuJ6K/9b1DESK8YWS3jVUrtV0/
 bPWrs9ldS9OCtpd8UHMb7n2XunFBrBOmEHmM6qKPPMh7KI11VEScMGe9M5vhDqyh
 ibCw9R5E+FuWjOT5CSws0mVvIalkYcyHbFRC80AVOEdzGLVb3YjzuK1CFANatLUh
 eyCsTOFUUviIgSgl26i9zvKhU4ftGii/9QSXUsPUPxlAMBSTvGk8OFwGldyBZBfF
 p2424FOGjP9n5ZmFblSqgVWDSazJH6SGl0R9Tm0Kh/49p92EMng=
 =Nyho
 -----END PGP SIGNATURE-----

Merge tag 'mtk-soc-for-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/drivers

MediaTek driver updates for v6.10

This adds a much needed cleanup for the MediaTek CMDQ helper driver and
also some more helper functions which will be used in drivers using the
MediaTek Global Command Engine (GCE) HW.

Also adds support for MT8188's VPPSYS mutex for MDP3 support, a new SoC
in the mtk-socinfo driver and changes the marketing name for the pre
existing MT8188 SoC.

* tag 'mtk-soc-for-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux:
  soc: mediatek: mtk-socinfo: Correct the marketing name for MT8188GV
  soc: mediatek: mtk-socinfo: Add entry for MT8395AV/ZA Genio 1200
  soc: mediatek: mtk-mutex: Add support for MT8188 VPPSYS
  soc: mediatek: socinfo: Advertise about unknown MediaTek SoC
  soc: mediatek: cmdq: Don't log an error when gce-client-reg is not found
  soc: mediatek: mtk-cmdq: Add cmdq_pkt_acquire_event() function
  soc: mediatek: mtk-cmdq: Add cmdq_pkt_poll_addr() function
  soc: mediatek: mtk-cmdq: Add cmdq_pkt_mem_move() function
  soc: mediatek: mtk-cmdq: Add specific purpose register definitions for GCE
  soc: mediatek: cmdq: Refine cmdq_pkt_create() and cmdq_pkt_destroy()
  soc: mediatek: cmdq: Remove cmdq_pkt_flush_async() helper function
  soc: mediatek: cmdq: Add cmdq_pkt_eoc() helper function
  soc: mediatek: cmdq: Add cmdq_pkt_jump_rel() helper function
  soc: mediatek: cmdq: Rename cmdq_pkt_jump() to cmdq_pkt_jump_abs()
  soc: mediatek: cmdq: Add parameter shift_pa to cmdq_pkt_jump()
  soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE

Link: https://lore.kernel.org/r/20240429140245.238210-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:27:17 +02:00
Arnd Bergmann 75c0675f1c Memory controller drivers for v6.10
Few cleanups:
 1. Correct module auto-loading - missing aliases in the module.
 2. Document bindings for the Samsung S5Pv210 SoC DMC memory controller.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmYudwcQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1zeHD/4yYa+F1sXXWXPF6nDsiXE3zSftOtAGg6JF
 0FoHjFoq4Argfk/qFmX0QD63yuEI6voSZpC/MwnzHzHNH9JlRIZYf3IbD8HvV4t8
 B58sD9WCAGu5irluNltpNHJaqUxIIgusm45iloXtpM7K1JXGAkCxRvUPAzCc3Qkn
 YWAyuVZkKSUzqnbbMxDA131D7pKxI4tS4BTOhi1EclH1A4JjrUe9V2WxLWkrRmrD
 GSRSEP+NbRs3QUiJvxr+B7OEveIo+QsjrPlg7LtI4LbFdwejOup4IUua7xxFXj6C
 LBtEyOA8TMnMxJYpaO8A1U/jwyYluqM94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QNUSigO
 7LGAN9I6qeviOZ30BexUEMdmwThcG65rwjrEXhzosE0xZosWch23mFLMbR/bJHwg
 sqTMPzd45HhxHhamhKFsW97fLLi7Lem887o26mWJeb3Rs2hPrFo=
 =Zsg1
 -----END PGP SIGNATURE-----

Merge tag 'memory-controller-drv-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers

Memory controller drivers for v6.10

Few cleanups:
1. Correct module auto-loading - missing aliases in the module.
2. Document bindings for the Samsung S5Pv210 SoC DMC memory controller.

* tag 'memory-controller-drv-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: mtk-smi: fix module autoloading
  memory: brcmstb_memc: fix module autoloading
  dt-bindings: memory-controllers: add Samsung S5Pv210 SoC DMC

Link: https://lore.kernel.org/r/20240428162001.28011-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:26:41 +02:00
Arnd Bergmann 75e4eadcf9 Driver updates for ti-sysc
A change to update the handling of no-reset-on-init quirk to make it init
 time only like it should be. And a change to add the missing copyrights.
 
 Also a series of changes to simplify the driver by dropping the old unused
 handling for interconnect targets tagged pm_runtime_irq_safe().
 
 These are all non-urgent changes and can be queued whenever suitable.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAmYt4joRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXNO+g/7BTsnrnPSCOgebdI5UWrPQ316ANM0C9OR
 ENm1FiOGvkBLY25g3wlLlswsKm2Of/4yOsw+KIN53MjOtJm5+1eBome6Dro4RIKE
 nEuZNFIr7w9MGHX/ugB7hoOsqwvlOWUYJsEywfaVyRMjD296mVM/L1L6Xh7GUgDd
 A4ChKAhwSMuAV72ZCofL9a1mRYbUlCgm+vT5b6VP4JoCN9FoAl33eoGZXxRlV96d
 y1lkmVn0ZuiURTZFz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cK/mxMA8rtADgcpQzwqzVJdZTXvxjY3hRPRMuV6M
 c5T245cw4Cq2nOY3hjuz6qB46Ngp7i4+FbvhYfP6YCmQjkk+XG3JIwIOnLJDBWAg
 R+94yvMkA1hj+DH4eXkn8oUaJ9Esd7GngPbuQJ9jSZIjC+i5gooPjCLWNmNWfzzA
 hWyG7ouj0Hi+NvLgKjjhxaeBRFw9HvVCJQMz6Sggww0C1yhHw6c=
 =iLZx
 -----END PGP SIGNATURE-----

Merge tag 'drivers-ti-sysc-for-v6.10-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/drivers

Driver updates for ti-sysc

A change to update the handling of no-reset-on-init quirk to make it init
time only like it should be. And a change to add the missing copyrights.

Also a series of changes to simplify the driver by dropping the old unused
handling for interconnect targets tagged pm_runtime_irq_safe().

These are all non-urgent changes and can be queued whenever suitable.

* tag 'drivers-ti-sysc-for-v6.10-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  bus: ti-sysc: Drop legacy idle quirk handling
  bus: ti-sysc: Drop legacy quirk handling for smartreflex
  bus: ti-sysc: Drop legacy quirk handling for uarts
  bus: ti-sysc: Add a description and copyrights
  bus: ti-sysc: Move check for no-reset-on-init

Link: https://lore.kernel.org/r/pull-1714283210-549557@atomide.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:25:14 +02:00
Arnd Bergmann 02c2c1900f Qualcomm driver updates for v6.10
The Qualcomm SCM driver initialization order is improved, to avoid any
 potential for a client to find a half-initialized SCM instance.
 The handling of download mode bits is updated to not attempt
 QCOM_SCM_BOOT_SET_DLOAD_MODE if a io-address for the update is
 specified, and that path is changed to perform a read-modify-write to
 avoid updating unrelated bits.  Error handling is corrected in the
 peripheral authentication service (PAS) functions, to release
 interconnect bandwidth votes in the case of an error. An unwanted error
 print on allocation error is also removed from this code path.
 
 The QSEECOM allow list is marked __maybe_unused to avoid build warnings
 when built with !OF. The error handling related to the interconnect API
 is cleaned up to avoid handling the impossible IS_ERR() condition.
 
 initcall level is bumped to "core" for cmd-db and rpmh-rsc, as dependent
 drivers like regulators, interconnects and clocks are registered at this
 level.
 
 Another attempt is made to remove the strncpy() usage in cmd-db, this
 time with strtomem_pad() which has the correct characteristics.
 
 The bwmon regmap cache is changed to maple tree.
 
 After an attempt to add missing MODULE_DEVICE_TABLEs to debug drivers,
 the intention of not having them automatically load is documented.
 
 Operations on the pmic_glink client list is put under mutual exclusion,
 to avoid races when clients are being registered. pmic_glink client
 registered after the firmware notification arrived was not informed that
 the firmware was up, this is resolved.
 
 More DSPs and the apss subsystem is added to the Qualcomm sleep stats driver.
 
 Checks for in-flight regulator requests in the RPMh RSC driver is
 improved to deal with the fact that these occupy multiple registers, so
 it's insufficient to just to direct address comparison.
 
 The socinfo drivers learns about X1 Elite and SMB2360 PMIC.
 
 The maintainers entry is split between the linux-arm-msm list and
 subset that is maintained in the qcom-soc tree, to avoid some confusion
 about maintainership.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmYtIvQVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FmLMQANqfDnrplxf3OpL3I8JEqeHYvdLF
 e12jXZyBlSCWRBEbphHZLKj8qSTFqpFgvqxIJ1fNqZ1AG9GeJTP8aGSkSnaYoym8
 7uvSWRv2lZ13mQmaCM8PQMYJ7UhLitVfwKrLfSwV7GgqxqyJ5+tnTGpEdNE3VEhW
 VaiknaR7kV2T3mUmrrgivy+0rMLimDMOVu7TcLkw5aY4SaQuerElXz1/IZO29GLK
 QOqEbDsf8TcImZnMsnmMvbLO+AJ/NgmhpD9SDGTbzYtGEqsbVebklQDZNj9QXjWy
 o6zPoCsPn93x95jBwFp0HgdTye4UWZZ3cix/LkyyLja4l0hMJM2QOdDstmtgymbM
 itmWJ3rGfcK8Gjl6NEh+OSMq0rH84uJfXR0VrT/tRDkn4eTSk6DeZJD6lvp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pF8xrGTnfM19zlznq/JTyafph/gTxTiTUH5ymBLm54xOzYd4E=
 =+dt0
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.10

The Qualcomm SCM driver initialization order is improved, to avoid any
potential for a client to find a half-initialized SCM instance.
The handling of download mode bits is updated to not attempt
QCOM_SCM_BOOT_SET_DLOAD_MODE if a io-address for the update is
specified, and that path is changed to perform a read-modify-write to
avoid updating unrelated bits.  Error handling is corrected in the
peripheral authentication service (PAS) functions, to release
interconnect bandwidth votes in the case of an error. An unwanted error
print on allocation error is also removed from this code path.

The QSEECOM allow list is marked __maybe_unused to avoid build warnings
when built with !OF. The error handling related to the interconnect API
is cleaned up to avoid handling the impossible IS_ERR() condition.

initcall level is bumped to "core" for cmd-db and rpmh-rsc, as dependent
drivers like regulators, interconnects and clocks are registered at this
level.

Another attempt is made to remove the strncpy() usage in cmd-db, this
time with strtomem_pad() which has the correct characteristics.

The bwmon regmap cache is changed to maple tree.

After an attempt to add missing MODULE_DEVICE_TABLEs to debug drivers,
the intention of not having them automatically load is documented.

Operations on the pmic_glink client list is put under mutual exclusion,
to avoid races when clients are being registered. pmic_glink client
registered after the firmware notification arrived was not informed that
the firmware was up, this is resolved.

More DSPs and the apss subsystem is added to the Qualcomm sleep stats driver.

Checks for in-flight regulator requests in the RPMh RSC driver is
improved to deal with the fact that these occupy multiple registers, so
it's insufficient to just to direct address comparison.

The socinfo drivers learns about X1 Elite and SMB2360 PMIC.

The maintainers entry is split between the linux-arm-msm list and
subset that is maintained in the qcom-soc tree, to avoid some confusion
about maintainership.

* tag 'qcom-drivers-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (21 commits)
  soc: qcom: cmd-db: replace deprecated strncpy with strtomem
  soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request
  firmware: qcom: scm: Modify only the download bits in TCSR register
  firmware: qcom: scm: Fix __scm and waitq completion variable initialization
  firmware: qcom: scm: Rework dload mode availability check
  firmware: qcom: scm: Remove redundant scm argument from qcom_scm_waitq_wakeup()
  firmware: qcom: scm: Remove log reporting memory allocation failure
  soc: qcom: pmic_glink: notify clients about the current state
  soc: qcom: pmic_glink: don't traverse clients list without a lock
  soc: qcom: mention intentionally broken module autoloading
  firmware: qcom: qcm: fix unused qcom_scm_qseecom_allowlist
  MAINTAINERS: Split Qualcomm SoC and linux-arm-msm entries
  soc: qcom: qcom_stats: Add DSPs and apss subsystem stats
  dt-bindings: soc: qcom: qcom,pmic-glink: document QCM6490 compatible
  soc: qcom: socinfo: Add SMB2360 PMIC
  soc: qcom: socinfo: Add X1E80100 SoC ID table entry
  dt-bindings: arm: qcom,ids: Add SoC ID for X1E80100
  soc: qcom: Update init level to core_initcall() for cmd-db and rpmh-rsc
  soc: qcom: icc-bwmon: Convert to use maple tree register cache
  firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able()
  ...

Link: https://lore.kernel.org/r/20240427160917.1431354-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:23:14 +02:00
Arnd Bergmann cc0739fe2e soc/tegra: Changes for v6.10-rc1
This contains a single commit that adds a wake event for Ethernet for
 some devices.
 -----BEGIN PGP SIGNATURE-----
 
 iQIyBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmYr5e0ACgkQ3SOs138+
 s6FQxA/xAWCQ3Wdb3+dfPsPtb20/WS5UOYnuB2rw2lg1Xxiv2JvuLbIHKjcl67xy
 4Na0qbkFqZfgeUjEfo0xPb1D1JRAXX1lHNoMMCmDUnoZzBxd2IGORR/GEJ5nct4w
 QstCEwDzQToVzwmcceAiiZkYlblbCMmJDax178nVm1GXVn3lXGJPgODk+QlgRE9s
 q01Hhg0UFmKVx3CQD/9mGOnZXnCE608EjJcC086dn/YSWTWYRp384IvSFCHjW5rV
 SODR7WBevEqmn1JDPmfS0Ab4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RY20z4NcomelVM40QECon4
 eE77/dlrwT/d8XDDvD+4HjKVxiB00k5XjZmfj892hVQCrdZIVmGs/EAywXRuwLwG
 qsLPBI7/SZZDmIPQZrjPod7jKbI7OBvTm1M8LLsqem4B/hArXeZP/hkq3Tz7NE2q
 Hyj+oFKJ+BiQBX7L96/rGYuf1s8RXe9aCfEg0mvR58FjDrCgCMQ=
 =Kd59
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-6.10-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers

soc/tegra: Changes for v6.10-rc1

This contains a single commit that adds a wake event for Ethernet for
some devices.

* tag 'tegra-for-6.10-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Add EQOS wake event for Tegra194 and Tegra234

Link: https://lore.kernel.org/r/20240426180519.3972626-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:22:09 +02:00
Arnd Bergmann 46671fd3e3 STM32 Firewall bus for v6.10, round 1
Highlights:
 ---------
 
 Introduce STM32 Firewall framework for STM32MP1x and STM32MP2x
 platforms. STM32MP1x(ETZPC) and STM32MP2x(RIFSC) Firewall controllers
 register to the framework to offer firewall services such as access
 granting.
 
 This series of patches is a new approach on the previous STM32 system
 bus, history is available here:
 https://lore.kernel.org/lkml/20230127164040.1047583/
 
 The need for such framework arises from the fact that there are now
 multiple hardware firewalls implemented across multiple products.
 Drivers are shared between different products, using the same code.
 When it comes to firewalls, the purpose mostly stays the same: Protect
 hardware resources. But the implementation differs, and there are
 multiple types of firewalls: peripheral, memory, ...
 
 Some hardware firewall controllers such as the RIFSC implemented on
 STM32MP2x platforms may require to take ownership of a resource before
 being able to use it, hence the requirement for firewall services to
 take/release the ownership of such resources.
 
 On the other hand, hardware firewall configurations are becoming
 more and more complex. These mecanisms prevent platform crashes
 or other firewall-related incoveniences by denying access to some
 resources.
 
 The stm32 firewall framework offers an API that is defined in
 firewall controllers drivers to best fit the specificity of each
 firewall.
 
 For every peripherals protected by either the ETZPC or the RIFSC, the
 firewall framework checks the firewall controlelr registers to see if
 the peripheral's access is granted to the Linux kernel. If not, the
 peripheral is configured as secure, the node is marked populated,
 so that the driver is not probed for that device.
 
 The firewall framework relies on the access-controller device tree
 binding. It is used by peripherals to reference a domain access
 controller. In this case a firewall controller. The bus uses the ID
 referenced by the access-controller property to know where to look
 in the firewall to get the security configuration for the peripheral.
 This allows a device tree description rather than a hardcoded peripheral
 table in the bus driver.
 
 The STM32 ETZPC device is responsible for filtering accesses based on
 security level, or co-processor isolation for any resource connected
 to it.
 
 The RIFSC is responsible for filtering accesses based on Compartment
 ID / security level / privilege level for any resource connected to
 it.
 -----BEGIN PGP SIGNATURE-----
 
 iQJRBAABCgA7FiEEctl9+nxzUSUqdELdf5rJavIecIUFAmYqUUkdHGFsZXhhbmRy
 ZS50b3JndWVAZm9zcy5zdC5jb20ACgkQf5rJavIecIWolxAAqUHuLzXyrsCGfPG9
 L5J8dUIeRk6lsQgO62EtS/hsUL5NhlwSiShtNilGw0t2TDCj0LpSMccwDjHoC1DE
 9ks6aj0lO4dBl/d6fQm+4Vn85KiKfKYXW3J9w+6ZtG7pRly9jbmlrELqBIbL+MjU
 /mmPdKM5y/l9KO6vxiua+EtDdd0pZksZLFtms23VoiFgkQ+2heoJ297QGfrWwxzv
 UZg/UnWpQYB10dp93WL97vTdBZR4iUwEJNcip7xM65iBwSkuc9Y3gz0TZTO0ivZJ
 BRsNc/9BJYEV3kNxRJGyf7JeufsaG3meHVxw9sOYi2hMe75pDAANYxvsCYt6NHjL
 i+zugtcM5v//Ksw+HbD1rvRuhEWjFUotCeXJb+RaiY0Sy3HVlKG0WJm2Ybgzlbf+
 vahskAHJxG0NFhPVpktQ/+gh8IU8Gy0PwyErdihhWKCiYBp8xHxW7IF7JtqlXQQS
 KQ4r0Ez/fgGmLQqDobskE+OgaFIuI5QrjH7S/VvxYh0xxZOBK89EmxK7pO3fki0v
 EFcTE/82HWfJo/bRCoq2Yzrh2omjR9ICsxDtVe4nILzjhaLChBz5lITyRO+/+Lr3
 6u/oO09tlQYEK4YzH2Kw0xGtpY7Xfmm4wC+zDTRXKBM3Vp1IoTchHssLS4nZbScq
 ZHJHRPMCX98FdVH3BLX7OSexJys=
 =/Cu0
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYwAI4ACgkQYKtH/8kJ
 UicByw//VzXycIdrOzZeInbrhs0D/7pmb31U1NaAwtK3Y90lxBi5AlB4MKUrM+oq
 x/cxqmmW1RsBc2m1iEuJWkqXS+XJHGptHKAHUqVhI9bIuBZqmGddvcP93Ml9egcN
 OL/Kd/OS4Q07EYc/Md6XrRBo2zJcHT57jGH8fKBmX4eAKfPYo7xgbq5k/0LoCq/i
 cgfQdKeDsR6tTrHyJI0p/+EgS5uglUnIJBm1aLDk883UKH4/EQSR+dpvYsogBcbd
 UnH78QeUymCOYzWylHJHeWFgDnn9NiJy/oCQx7wMc6PVUhcd0l1FXvM7XUeDy7iW
 aNJpgYU8cTx9IYPGBbZJ13NX0+X4QACKpDjJZG90/y4Q4YEn5l/Di9rmv4HYhZgr
 gwYD4EHewKB3PVtmCCUQpurSblshoo9bPWEaR3NFD1mSu46Jb11/zgIQ4oBagixV
 MjiaaP3+Rpz1X0Zo5HSq9F0k4A/SddOo2zjMn3af/77nENsR3yEmPWgL20T+nv9P
 deJ/LqE6mGVFI0c4E2K03Y85wldN6xXyhvCEqlHtK2X4l5JMe+0Vnak+VICZ0jQw
 K/ihBRbifMH7g4GQUjpJUoUAvoyeSJ2jhMF8QV7bk76b6HeRFRYKOpQLnj29v/nd
 MF2rKJwFYqJDF3d2a90I3E8c7huKnqWHQWinKu2Y2NkmH/tqtcI=
 =mgY+
 -----END PGP SIGNATURE-----

Merge tag 'stm32-bus-firewall-for-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into soc/drivers

STM32 Firewall bus for v6.10, round 1

Highlights:
---------

Introduce STM32 Firewall framework for STM32MP1x and STM32MP2x
platforms. STM32MP1x(ETZPC) and STM32MP2x(RIFSC) Firewall controllers
register to the framework to offer firewall services such as access
granting.

This series of patches is a new approach on the previous STM32 system
bus, history is available here:
https://lore.kernel.org/lkml/20230127164040.1047583/

The need for such framework arises from the fact that there are now
multiple hardware firewalls implemented across multiple products.
Drivers are shared between different products, using the same code.
When it comes to firewalls, the purpose mostly stays the same: Protect
hardware resources. But the implementation differs, and there are
multiple types of firewalls: peripheral, memory, ...

Some hardware firewall controllers such as the RIFSC implemented on
STM32MP2x platforms may require to take ownership of a resource before
being able to use it, hence the requirement for firewall services to
take/release the ownership of such resources.

On the other hand, hardware firewall configurations are becoming
more and more complex. These mecanisms prevent platform crashes
or other firewall-related incoveniences by denying access to some
resources.

The stm32 firewall framework offers an API that is defined in
firewall controllers drivers to best fit the specificity of each
firewall.

For every peripherals protected by either the ETZPC or the RIFSC, the
firewall framework checks the firewall controlelr registers to see if
the peripheral's access is granted to the Linux kernel. If not, the
peripheral is configured as secure, the node is marked populated,
so that the driver is not probed for that device.

The firewall framework relies on the access-controller device tree
binding. It is used by peripherals to reference a domain access
controller. In this case a firewall controller. The bus uses the ID
referenced by the access-controller property to know where to look
in the firewall to get the security configuration for the peripheral.
This allows a device tree description rather than a hardcoded peripheral
table in the bus driver.

The STM32 ETZPC device is responsible for filtering accesses based on
security level, or co-processor isolation for any resource connected
to it.

The RIFSC is responsible for filtering accesses based on Compartment
ID / security level / privilege level for any resource connected to
it.

* tag 'stm32-bus-firewall-for-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32:
  bus: stm32_firewall: fix off by one in stm32_firewall_get_firewall()
  bus: etzpc: introduce ETZPC firewall controller driver
  bus: rifsc: introduce RIFSC firewall controller driver
  of: property: fw_devlink: Add support for "access-controller"
  firewall: introduce stm32_firewall framework
  dt-bindings: bus: document ETZPC
  dt-bindings: bus: document RIFSC
  dt-bindings: treewide: add access-controllers description
  dt-bindings: document generic access controllers

Link: https://lore.kernel.org/r/7dc64226-5429-4ab7-a8c8-6053b12e3cf5@foss.st.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:18:22 +02:00
Arnd Bergmann 29a7020067 HiSilicon driver updates for v6.10
- Add the check for obtaining complete port attribute in the HCCS driver
 - Replace MAILBOX dependency with PCC for the HCCS driver
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEQeMYD8qOQTc1R/snC8hXbtmJZlwFAmYpvTMVHHh1d2VpNUBo
 aXNpbGljb24uY29tAAoJEAvIV27ZiWZcm5AP/0/9N7W48vsLHiWzFYUEbe0XK7DY
 ELG83+NhZylWYnYeBj6nxlldvJrWA5dtH+5kfDfR+jllhEi14dLVSF3k7uJ9rNiP
 J1NZrU9oO1BZHPv77/Grg+41+qP3FTCusUasch0OviBuexyf7XPnq5mVPYhX8cie
 DEEC+X3S2NEFdCqh1C7y41ecjHkmawLbmpvQ1bnGumka8y8SdOd86JTwOOoxBHe7
 xqrFh8CzRzCDQF4BKU3HLG54mUGTjrFlGsTmI4wHGOQnYFv0dzZn4NnaOLdpLJxm
 lmxgLfkESsPhZ9yHwQmgX5MIWqkKeuwXiuM4Ecp1blvMkyM0Pma8BPHNdylZZdP7
 AKEaAjFQrHodSUSHGTMD++PFg5uV3MgwOJTTwP8gz8edvJ9C0v2aPFZ4m7NGMZj7
 Ums7kqAfix0EBI+dWQZkxrmKYSy6GOLp6u74iTWfRDf4kmbOKuyNdNYaIKkW0wdO
 Dfl2rsYDqKeEDmw18FCIK+BU5TaUMYdN5JmME/+Ah5pnHWuVtB6uciswzBAFYn09
 eYt1tW+aPxXIIqZJsmk/D8RGVnFcX+gXvWoD7Qia6xOFz6NQb+MCeGnCZgsORqvo
 2tNJChIyPOxEO01NuW6pI5mxhK038zljXlU4luSCy7nE397GaIjcFpbV+9nQJL1o
 CLSeIRM0kIRCsW5N
 =hOU5
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYwADoACgkQYKtH/8kJ
 UicshBAAhEmPzN+q5BDz8S5e/VAgSwor/mxtKbCWTev8Ema1OsrnDpE3KcX8ydOy
 5q9u5vGyv8iOIeEzBzbue71uvjyHHv9ooi733fBftCkbh5DYM/LJ5VkJZ962p8bo
 t9S6mpcyqkx7Dzl6+LHN40s7KOB2QUXgRL25uMF80niyrdt8UCGra5GXi03kwtEJ
 tKhO+/frg2ibposOek+14tet5daE46nkAWuvKuXgC+lXYkzSrEdbuqNFAoHmz2kF
 0/MAPbCUcMmIIPaT5zLd87TFrdFhPWxg0wipG0fdzl642Sxye/I0Saw7pSLAHp3i
 eMuvhL5jhgeQRcJeOexPlunMJg4x6LBT9+vx/8dw0dJUt+Ujy1bzWh0NDFrols36
 KAa/XZCr2/p41ohNtxu+x5y4Ii1JAfe8KKQojWD/kLt782tWyl3uGavNUj62JwS/
 FxDXWcPZjX91uJ23qDQvoTLTAPIrnS8o9UE5PRO5JzsdVb99MQ4k9l5cUDYlQptW
 Ju7oc+yE6C5O5s61YsOzeXRDWlya5/OWeeDPYvLZHwxajQirQJlT7ZsocFLxkD9w
 AepfdxpgWbeHUo7NTaeY2vr+EN+x1eoBrIS1p2UlosKv0BeRQjUIZ9+ikkQNwFwk
 2ChTqjJ69F0fovw8ocFa5ufbbi0YDM4V596gWLdUV/z61jT8GmI=
 =ypb3
 -----END PGP SIGNATURE-----

Merge tag 'hisi-drivers-for-6.10' of https://github.com/hisilicon/linux-hisi into soc/drivers

HiSilicon driver updates for v6.10

- Add the check for obtaining complete port attribute in the HCCS driver
- Replace MAILBOX dependency with PCC for the HCCS driver

* tag 'hisi-drivers-for-6.10' of https://github.com/hisilicon/linux-hisi:
  soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC
  soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete port attribute

Link: https://lore.kernel.org/r/662A3EDE.5070708@hisilicon.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:16:58 +02:00
Arnd Bergmann 7ec7695d0b Renesas driver updates for v6.10
- Identify the new RZ/V2H (R9A09G057) SoC,
   - Enable support for the TMU (Timer Unit) on R-Car Gen2 SoCs.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZhj+tQAKCRCKwlD9ZEnx
 cNkQAP0ZRtdqElbqYvGGHInhpabdkc2+EJQInXrpzP0xDAi8oAD/XHXbfYDv4kRX
 sgplvCaUqUM2ORWp9qxTAohcL8+xvAM=
 =rtx1
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYv/7wACgkQYKtH/8kJ
 UidWqRAAgAkuBHaaPWQfVfuTHkdQf5+GD9rPSAgAM3Co0p1wtUYW50tut1k3fqmv
 Qfr/X1rRtObozxcLH5upnWgkw3K4L6VXvKA+wZK+dPBPdWoeymMLOWRL0bCeBufI
 f2aQ9Dpd67/xrZEWKO89Ezo/csX8MbpQxaDdkXPzj2MReuXAkZKqoa3zrbLnyZs+
 fOKi0qAzaKaKreTDJZ00orip/v0GC83z9UVUppk4a2qIn9ggk0+ah48q1zufEMfG
 oeae+XeBtZ7Wzt3D9zbcRiW9ZPQgZ8k3vB93tXjO88METMMNNx/6tvFOXf6LE/kK
 fLAeXcrUOwQI/OzZwXWdQeCvexHAth6NU7nJ/sCBpIdP99ksGITp3KfksEONvCvP
 UUIfiBWOPhj0C5oNdvxEwnIiCOhiVufcVTfz3e2+UsK84L941Xi/ZLaEV0VBSvtI
 zwNTZAjKC/u1ewzwHkwEze8uhoHZ3QMlMnMV50SPmpwIzCihmy8up307z0Q2LBH1
 dLMYljF2r38MZk3jezZ5B1CSyZyQPtuuLMsUdhA8BO+mTY31AwFkWHDTiI29TiyU
 fsNnDNSDco641mH6IlrlbYA2iVlqCRLvu7/0RE4M7lmu1OEFIGASDqzfpZS9Y/r4
 iYX1qiXFx3grKKXa+mabMwcgRTAe2489X3Yg3GDQgfJWPd5s7JE=
 =7Fri
 -----END PGP SIGNATURE-----

Merge tag 'renesas-drivers-for-v6.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers

Renesas driver updates for v6.10

  - Identify the new RZ/V2H (R9A09G057) SoC,
  - Enable support for the TMU (Timer Unit) on R-Car Gen2 SoCs.

* tag 'renesas-drivers-for-v6.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: Enable TMU support on R-Car Gen2
  soc: renesas: Add identification support for RZ/V2H SoC

Link: https://lore.kernel.org/r/cover.1712915532.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:14:52 +02:00
Jon Hunter de024f63ce soc/tegra: pmc: Add EQOS wake event for Tegra194 and Tegra234
Add the wake event for the EQOS ethernet controller on Tegra194 and
Tegra234 devices, so that system can be woken up by an event from this
ethernet controller.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-04-26 17:36:10 +02:00
Dan Carpenter e4500d7525 bus: stm32_firewall: fix off by one in stm32_firewall_get_firewall()
The "nb_firewall" variable is the number of elements in the firewall[]
array, which is allocated in stm32_firewall_populate_bus().  So change
this > comparison to >= to prevent an out of bound access.

Fixes: 5c9668cfc6 ("firewall: introduce stm32_firewall framework")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2024-04-25 14:44:39 +02:00
Gatien Chevallier 2eeb74c449 bus: etzpc: introduce ETZPC firewall controller driver
ETZPC is a peripheral and memory firewall controller that filter accesses
based on Arm TrustZone secure state and Arm CPU privilege execution level.
It handles MCU isolation as well.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2024-04-25 14:44:39 +02:00
Tony Lindgren 4bcc2e91b9 bus: ti-sysc: Drop legacy idle quirk handling
There are no more users that need the legacy idle quirk so let's drop
the legacy idle quirk handling. This simplifies the PM code to just
sysc_pm_ops with unified handling for all the interconnect targets.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2024-04-25 07:29:41 +03:00
Tony Lindgren 2414277f51 bus: ti-sysc: Drop legacy quirk handling for smartreflex
With the smartreflex driver no longer relying on the use of
pm_runtime_irq_safe(), we can finally drop the related legacy quirk
handling.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2024-04-25 07:29:41 +03:00
Tony Lindgren 5f711f0365 bus: ti-sysc: Drop legacy quirk handling for uarts
With the 8250_omap and omap-serial drivers no longer relying on the use
of pm_runtime_irq_safe(), we can finally drop the related legacy quirk
handling for uarts.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2024-04-25 07:29:41 +03:00
Tony Lindgren 5a85fd3c9d bus: ti-sysc: Add a description and copyrights
The ti-sysc driver is missing coprights and description, let's add
those.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2024-04-25 07:29:41 +03:00
Tony Lindgren f2bd276193 bus: ti-sysc: Move check for no-reset-on-init
We are wrongly checking SYSC_QUIRK_NO_RESET_ON_INIT flag in sysc_reset(),
it can be called also after init from sysc_reinit_module(). Let's move
the check to the init code in preparation for adding reset control support
in the future.

Note that this change is not needed as a fix as there are no known issues
caused by it currently.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2024-04-25 07:29:41 +03:00
Huisong Li 95d6333e06 soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC
The kunpeng_hccs driver depends on the Platform Communication Channel
Driver. If the PCC driver is not enabled, this driver will be failed
to probe. And since the PCC driver depends on the MAILBOX, replace
the MAILBOX dependency with the PCC.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2024-04-25 02:09:46 +00:00
Huisong Li 192f97fe16 soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete port attribute
The hccs_get_all_port_attr() is used to obtain the attribute of all the
ports on a specified DIE from the firmware. However this interface doesn't
ensure whether the firmware reports the complete attribute of all the ports
or not. So this patch adds the check for this.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2024-04-25 01:30:33 +00:00
Gatien Chevallier a182084572 bus: rifsc: introduce RIFSC firewall controller driver
RIFSC is a peripheral firewall controller that filter accesses based on
Arm TrustZone secure state, Arm CPU privilege execution level and
Compartment IDentification of the STM32 SoC subsystems.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2024-04-24 14:30:35 +02:00
Gatien Chevallier 161e83f538 of: property: fw_devlink: Add support for "access-controller"
Allows tracking dependencies between devices and their access
controller.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2024-04-24 14:30:35 +02:00
Jason-ch Chen 8a87e1d21e
soc: mediatek: mtk-socinfo: Correct the marketing name for MT8188GV
Change 'Kompanio 830' to 'Kompanio 838'.

Signed-off-by: Jason-ch Chen <Jason-ch.Chen@mediatek.com>
Reviewed-by: Fei Shao <fshao@chromium.org>
Link: https://lore.kernel.org/r/20240409035355.27659-1-jason-ch.chen@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:56 +02:00
AngeloGioacchino Del Regno bc98f77d80
soc: mediatek: mtk-socinfo: Add entry for MT8395AV/ZA Genio 1200
Add an entry for the MT8395 SoC with commercial name Genio 1200.

Reviewed-by: Christopher Obbard <chris.obbard@collabora.com>
Tested-by: Christopher Obbard <chris.obbard@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20240404082056.93454-1-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:56 +02:00
AngeloGioacchino Del Regno 26bb17dae6
soc: mediatek: mtk-mutex: Add support for MT8188 VPPSYS
Add MT8188 VPPSYS0 and VPPSYS1 mutex info to driver data

Link: https://lore.kernel.org/r/20240322092845.381313-3-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:56 +02:00
AngeloGioacchino Del Regno 7843b6b83d
soc: mediatek: socinfo: Advertise about unknown MediaTek SoC
In case we're running on a MediaTek SoC that is not declared in the
socinfo_data_table, print a message stating that and, with it, also
print out the read eFuse data: this allows to easily add a new SoC
in the table, granted that its actual soc/segment/marketing names
are already previously known.

This is especially useful when booting an already known SoC that
already has socinfo support, but has a different silicon version
and/or revision, hence different model information in the eFuses.

Link: https://lore.kernel.org/r/20240314113015.121940-1-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:56 +02:00
Nícolas F. R. A. Prado 27e69538b8
soc: mediatek: cmdq: Don't log an error when gce-client-reg is not found
Most of the callers to this function do not require CMDQ support, it is
optional, so the missing property shouldn't cause an error message.
However, it could result on degraded performance, so the fact that it's
missing should still be alerted. Furthermore, the callers that do
require CMDQ support already log at the error level when an error is
returned.

Change the log message in this helper to be printed at the warning level
instead.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240229-gce-client-reg-log-dbg-v2-1-4975077173d0@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:55 +02:00
Jason-JH.Lin 69ff68332d
soc: mediatek: mtk-cmdq: Add cmdq_pkt_acquire_event() function
Add cmdq_pkt_acquire_event() function to support CMDQ user making
an instruction for acquiring event.

CMDQ users can use cmdq_pkt_acquire_event() as `mutex_lock`
and cmdq_pkt_clear_event() as `mutex_unlock` to protect the global
resource modified instructions between them.

cmdq_pkt_acquire_event() would wait for event to be cleared.
After event is cleared by cmdq_pkt_clear_event() in other GCE threads,
cmdq_pkt_acquire_event() would set event and keep executing next
instruction. So the mutex would work like this:

    cmdq_pkt_acquire_event() /* mutex lock */

    /* critical secton instructions that modified global resource */

    cmdq_pkt_clear_event() /* mutex unlock */

Prevent the critical section instructions from being affected by other
GCE threads.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240307013458.23550-5-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:55 +02:00
Jason-JH.Lin 400e2fa805
soc: mediatek: mtk-cmdq: Add cmdq_pkt_poll_addr() function
Add cmdq_pkt_poll_addr function to support CMDQ user making
an instruction for polling a specific address of hardware rigster
to check the value with or without mask.

POLL is a legacy operation in GCE, so it does not support SPR and
CMDQ_CODE_LOGIC. To support polling the register address which doesn't
have the subsys id, CMDQ users need to make an instruction with GPR and
CMDQ_CODE_MASK operation to move the register address to be poll into GPR.
Then users can make an POLL instruction with GPR to poll the register
address assigned in previous instruction.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240307013458.23550-4-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:55 +02:00
Jason-JH.Lin 263801f8e5
soc: mediatek: mtk-cmdq: Add cmdq_pkt_mem_move() function
Add cmdq_pkt_mem_move() function to support CMDQ user making
an instruction for moving a value from a source address to a
destination address.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240307013458.23550-3-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:55 +02:00
Jason-JH.Lin 49ddaa495f
soc: mediatek: mtk-cmdq: Add specific purpose register definitions for GCE
Add specific purpose register definitions for GCE, so CMDQ users can
use them as a buffer to store data.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240307013458.23550-2-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:55 +02:00
Chun-Kuang Hu b81b2d5534
soc: mediatek: cmdq: Refine cmdq_pkt_create() and cmdq_pkt_destroy()
cmdq_pkt_create() and cmdq_pkt_destroy() is not suitable for
client drivers so each client driver has implement its own
function. This refinement would pass struct cmdq_pkt pointer into
cmdq_pkt_create(). In addition, client driver has the struct
cmdq_client information, so it's not necessary to store this
information in struct cmdq_pkt. After this refinement, client
drivers could use these helper funciton instead of implementing
its own version.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20240222154120.16959-8-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:54 +02:00
Chun-Kuang Hu 9935af96a7
soc: mediatek: cmdq: Remove cmdq_pkt_flush_async() helper function
cmdq_pkt_flush_async() is not used by all client drivers (MediaTek
drm driver and MediaTek mdp3 driver), so remove it.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20240222154120.16959-7-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:54 +02:00
Chun-Kuang Hu 3d86ced95d
soc: mediatek: cmdq: Add cmdq_pkt_eoc() helper function
cmdq_pkt_eoc() append eoc command to CMDQ packet. eoc command
would ask GCE to generate IRQ. It's usually appended to the end
of packet to notify all command in the packet is done.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20240222154120.16959-6-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:54 +02:00
Chun-Kuang Hu 698cdcb195
soc: mediatek: cmdq: Add cmdq_pkt_jump_rel() helper function
cmdq_pkt_jump_rel() append relative jump command to the packet.
Relative jump change PC to the target address with offset from
current PC.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240222154120.16959-5-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:54 +02:00
Chun-Kuang Hu 7218be3b6f
soc: mediatek: cmdq: Rename cmdq_pkt_jump() to cmdq_pkt_jump_abs()
In order to distinguish absolute jump and relative jump,
cmdq_pkt_jump() append absolute jump command, so rename it to
cmdq_pkt_jump_abs().

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240222154120.16959-4-chunkuang.hu@kernel.org
[Angelo: Added temporary wrapper to avoid build breakage]
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:53 +02:00
Chun-Kuang Hu ade1765341
soc: mediatek: cmdq: Add parameter shift_pa to cmdq_pkt_jump()
In original design, cmdq_pkt_jump() call cmdq_get_shift_pa() every
time to get shift_pa. But the shift_pa is constant value for each
SoC, so client driver just need to call cmdq_get_shift_pa() once
and pass shift_pa to cmdq_pkt_jump() to prevent frequent function
call.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20240222154120.16959-3-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:53 +02:00
Chun-Kuang Hu ed4d5ab179
soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE
For cmdq jump command, offset 0 means relative jump and offset 1
means absolute jump. cmdq_pkt_jump() is absolute jump, so fix the
typo of CMDQ_JUMP_RELATIVE in cmdq_pkt_jump().

Fixes: 946f1792d3 ("soc: mediatek: cmdq: add jump function")
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240222154120.16959-2-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:53 +02:00
Justin Stitt 166db01007 soc: qcom: cmd-db: replace deprecated strncpy with strtomem
strncpy() is an ambiguous and potentially dangerous interface [1]. We
should prefer more robust and less ambiguous alternatives.

@query is marked as __nonstring and doesn't need to be NUL-terminated.

Since we are doing a string to memory copy, we can use the aptly named
"strtomem" -- specifically, the "pad" variant to also ensure NUL-padding
throughout the destination buffer.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240319-strncpy-drivers-soc-qcom-cmd-db-c-v3-1-aeb5c5180c32@google.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:26:47 -05:00
Maulik Shah f592cc5794 soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request
Each RPMh VRM accelerator resource has 3 or 4 contiguous 4-byte aligned
addresses associated with it. These control voltage, enable state, mode,
and in legacy targets, voltage headroom. The current in-flight request
checking logic looks for exact address matches. Requests for different
addresses of the same RPMh resource as thus not detected as in-flight.

Add new cmd-db API cmd_db_match_resource_addr() to enhance the in-flight
request check for VRM requests by ignoring the address offset.

This ensures that only one request is allowed to be in-flight for a given
VRM resource. This is needed to avoid scenarios where request commands are
carried out by RPMh hardware out-of-order leading to LDO regulator
over-current protection triggering.

Fixes: 658628e7ef ("drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs")
Cc: stable@vger.kernel.org
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Elliot Berman <quic_eberman@quicinc.com> # sm8650-qrd
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
Link: https://lore.kernel.org/r/20240215-rpmh-rsc-fixes-v4-1-9cbddfcba05b@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:11:40 -05:00
Mukesh Ojha b9718298e0 firmware: qcom: scm: Modify only the download bits in TCSR register
Crashdump collection is done based on DLOAD bits of TCSR register.
To retain other bits, scm driver need to read the register and
modify only the DLOAD bits, as other bits in TCSR may have their
own significance.

Co-developed-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Tested-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com> # IPQ9574 and IPQ5332
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/1711042655-31948-1-git-send-email-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:08:30 -05:00
Mukesh Ojha 2e4955167e firmware: qcom: scm: Fix __scm and waitq completion variable initialization
It is possible qcom_scm_is_available() gives wrong indication that
if __scm is initialized while __scm->dev is not and similar issue
is also possible with __scm->waitq_comp.

Fix this appropriately by the use of release barrier and read barrier
that will make sure if __scm is initialized so, is all of its field
variable.

Fixes: d0f6fa7ba2 ("firmware: qcom: scm: Convert SCM to platform driver")
Fixes: 6bf3259922 ("firmware: qcom: scm: Add wait-queue handling logic")
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/1711034642-22860-4-git-send-email-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:08:06 -05:00
Mukesh Ojha 398a4c58f3 firmware: qcom: scm: Rework dload mode availability check
QCOM_SCM_BOOT_SET_DLOAD_MODE scm command is applicable for very
older SoCs where this command is supported from firmware and
for newer SoCs, dload mode tcsr registers is used for setting
the download mode.

Currently, qcom_scm_set_download_mode() checks for availability
of QCOM_SCM_BOOT_SET_DLOAD_MODE command even for SoCs where this
is not used. Fix this by switching the condition to keep the
command availability check only if dload mode registers are not
available.

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/1711034642-22860-3-git-send-email-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:08:06 -05:00
Mukesh Ojha 000636d91d firmware: qcom: scm: Remove redundant scm argument from qcom_scm_waitq_wakeup()
Remove redundant scm argument from qcom_scm_waitq_wakeup().

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/1711034642-22860-2-git-send-email-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:08:01 -05:00
Mukesh Ojha 3de990f789 firmware: qcom: scm: Remove log reporting memory allocation failure
Remove redundant memory allocation failure.

WARNING: Possible unnecessary 'out of memory' message
+       if (!mdata_buf) {
+               dev_err(__scm->dev, "Allocation of metadata buffer failed.\n");

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/1711034642-22860-1-git-send-email-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:07:10 -05:00
Dmitry Baryshkov d6cbce2cd3 soc: qcom: pmic_glink: notify clients about the current state
In case the client is registered after the pmic-glink recived a response
from the Protection Domain mapper, it is going to miss the notification
about the state. Notify clients about the current state upon
registration.

Fixes: 58ef4ece1e ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Tested-by: Xilin Wu <wuxilin123@gmail.com> # on QCS8550 AYN Odin 2
Link: https://lore.kernel.org/r/20240403-pmic-glink-fix-clients-v2-2-aed4e02baacc@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:00:10 -05:00
Dmitry Baryshkov 635ce0db89 soc: qcom: pmic_glink: don't traverse clients list without a lock
Take the client_lock before traversing the clients list at the
pmic_glink_state_notify_clients() function. This is required to keep the
list traversal safe from concurrent modification.

Fixes: 58ef4ece1e ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Tested-by: Xilin Wu <wuxilin123@gmail.com> # on QCS8550 AYN Odin 2
Link: https://lore.kernel.org/r/20240403-pmic-glink-fix-clients-v2-1-aed4e02baacc@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:00:10 -05:00
Krzysztof Kozlowski 77706838f8 soc: qcom: mention intentionally broken module autoloading
Qualcomm PMIC ChargerPD ULOG and RPM Master Statistics drivers are
solely for debugging purposes and should not be autoloaded as modules.
Add comments to annotate missing MODULE_DEVICE_TABLE.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240410184522.271889-1-krzk@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 11:22:11 -05:00
Krzysztof Kozlowski bf11908757 memory: mtk-smi: fix module autoloading
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded
based on the alias from of_device_id table.

Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240409204615.83928-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-11 08:22:26 +02:00
Krzysztof Kozlowski 7a40c60c8a memory: brcmstb_memc: fix module autoloading
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded
based on the alias from of_device_id table.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20240410170241.248626-1-krzk@kernel.org
2024-04-11 08:21:49 +02:00