3998 Commits

Author SHA1 Message Date
Herve Codina
1934f6aa5e soc: fsl: cpm1: qmc: Remove unneeded parenthesis
checkpatch.pl raises the following issue in several places
  CHECK: Unnecessary parenthesis around ...

Remove them.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-21-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
f06ab938bc soc: fsl: cpm1: qmc: Fix blank line and spaces
checkpatch.pl raises the following issues
  CHECK: Please don't use multiple blank lines
  CHECK: Alignment should match open parenthesis

Fix them.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-20-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
44beb343d8 soc: fsl: cpm1: qmc: Use BIT(), GENMASK() and FIELD_PREP() macros
checkpatch.pl signals the following improvement for qmc.c
  CHECK: Prefer using the BIT macro

Follow its suggestion and convert the code to BIT() and related macros.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-19-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
e8344905b3 soc: fsl: cpm1: qmc: Rename QMC_TSA_MASK
QMC_TSA_MASK is a bitfield. The value defined is a specific value of
this bitfield and correspond to the use of 8bit resolution for the
routing entry.

Be accurate and rename the defined constant to reflect this point.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-18-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
3825890981 soc: fsl: cpm1: tsa: Introduce tsa_serial_get_num()
TSA consumers in CPM1 implementation don't need to know about the serial
device number used by the TSA component. In QUICC Engine implementation,
this information is needed.

Improve the TSA API with tsa_serial_get_num() in order to provide this
information.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-17-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
7ac947021d soc: fsl: cpm1: tsa: Add support for QUICC Engine (QE) implementation
Add support for the time slot assigner (TSA) available in some
PowerQUICC SoC that uses a QUICC Engine (QE) block such as MPC8321.

The QE TSA is similar to the CPM1 TSA except that it uses UCCs (Unified
Communication Controllers) instead of SCCs (Serial Communication
Controllers).
Also, compared against the CPM1 TSA, this QE TSA can handle up to 4 TDMs
instead of 2 and allows to configure the logic level of sync signals.

At a lower level, compared against CPM TSA implementation, some
registers are slightly different even if same features are present.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-15-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
572312a5bb soc: fsl: cpm1: tsa: Introduce tsa_version
Current code handles CPM1 version of TSA.

In order to prepare the support for the QUICC Engine (QE) version of
TSA, introduce tsa_version to identify versions. This will enable the
code to make the distinction between several TSA implementations.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-14-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
9c6c022d1c soc: fsl: cpm1: tsa: Isolate specific CPM1 part from tsa_serial_{dis}connect()
Current code handles the CPM1 version of TSA. Connecting and
disconnecting the SCC to/from the TSA consists in handling SICR register
which is CPM1 specific. The connection and disconnection operation in
the QUICC Engine (QE) version are slightly different.

In order to prepare the support for the QE version, clearly identify
SICR register as specific to CPM1 and isolate its handling done in
connect and disconnect functions.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-13-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
8d600cc337 soc: fsl: cpm1: tsa: Introduce tsa_setup() and its CPM1 compatible version
Current code handles the CPM1 version of TSA. Setting up TSA consists in
handling SIMODE and SIGMR registers. These registers are CPM1 specific.

Setting up the QUICC Engine (QE) version of TSA is slightly different.

In order to prepare the support for QE version, clearly identify these
registers as CPM1 compatible and isolate their handling in a CPM1
specific function.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-12-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
8c8e1ba3e9 soc: fsl: cpm1: tsa: Make SIRAM entries specific to CPM1
Current code handles the CPM1 version of TSA. Compared against QUICC
Engine (QE) version of TSA, CPM1 SIRAM entries are slightly different.

In order to prepare the support for the QE version, clearly identify
these entries and functions handling them as CPM1 compatible.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-11-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
58edcace87 soc: fsl: cpm1: tsa: Use ARRAY_SIZE() instead of hardcoded integer values
Loops handling the tdm array use hardcoded size and the initialization
part uses hardcoded indexes to initialize the array.

Use ARRAY_SIZE() to avoid the hardcoded size and initialize the array
using a loop.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-10-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
442f3799fa soc: fsl: cpm1: tsa: Remove unused registers offset definition
SISTR, SICMR and SIRP registers offset definitions are not used.

In order to avoid unneeded code, remove them.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-9-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
a68757abc0 soc: fsl: cpm1: tsa: Add missing spinlock comment
checkpatch.pl raises the following issue
  CHECK: spinlock_t definition without comment

Add the missing comment.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-7-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
bfd4f092c4 soc: fsl: cpm1: tsa: Fix blank line and spaces
checkpatch.pl raises the following issues
  CHECK: Please don't use multiple blank lines
  CHECK: spaces preferred around that '/' (ctx:VxV)
  CHECK: spaces preferred around that '+' (ctx:VxV)
  CHECK: spaces preferred around that '-' (ctx:VxV)

Fix them.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-6-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:17 +02:00
Herve Codina
37dbcd596f soc: fsl: cpm1: tsa: Use BIT(), GENMASK() and FIELD_PREP() macros
checkpatch.pl signals the following improvement for tsa.c
  CHECK: Prefer using the BIT macro

Follow its suggestion and convert the code to BIT() and related macros.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-5-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:17 +02:00
Herve Codina
47a347bae9 soc: fsl: cpm1: tsa: Fix tsa_write8()
The tsa_write8() parameter is an u32 value. This is not consistent with
the function itself. Indeed, tsa_write8() writes an 8bits value.

Be consistent and use an u8 parameter value.

Fixes: 1d4ba0b81c1c ("soc: fsl: cpm1: Add support for TSA")
Cc: stable@vger.kernel.org
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-4-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:17 +02:00
Herve Codina
d285cf22f8 soc: fsl: cpm1: qmc: Enable TRNSYNC only when needed
The TRNSYNC feature is enabled whatever the number of time-slots used.
The feature is needed only when more than one time-slot is used.

Improve the driver enabling TRNSYNC only when it is needed.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-3-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:17 +02:00
Herve Codina
c3cc3e69b3 soc: fsl: cpm1: qmc: Update TRNSYNC only in transparent mode
The TRNSYNC feature is available (and enabled) only in transparent mode.

Since commit 7cc9bda9c163 ("soc: fsl: cpm1: qmc: Handle timeslot entries
at channel start() and stop()") TRNSYNC register is updated in
transparent and hdlc mode. In hdlc mode, the address of the TRNSYNC
register is used by the QMC for other internal purpose. Even if no weird
results were observed in hdlc mode, touching this register in this mode
is wrong.

Update TRNSYNC only in transparent mode.

Fixes: 7cc9bda9c163 ("soc: fsl: cpm1: qmc: Handle timeslot entries at channel start() and stop()")
Cc: stable@vger.kernel.org
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-2-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:17 +02:00
Arnd Bergmann
e99769bf7a soc/tegra: Changes for v6.12-rc1
This is a single patch that simplifies code a little by employing the
 new scoped OF helpers.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmbR0JYACgkQ3SOs138+
 s6EA/A/8Dl0CPn7xL0Ud3onZqptXt5pKW7RWT4nNPIReNpzQ/1llTx626ZadfHtj
 HqCVPIDaP3+cHiLt/du9u+BxZezx+GUtL12eICVAWMhmX1raueZsrYrB2QohNnOT
 jW7AcvaG1Z6BKWHR01iaZsU3hrDCbVzjgJltLDsiLfVUOfpUoe52dv5Xv13jwspK
 U4Uf7kfR0zsPy9afmA+eXLRjyYSe68+3BFb/fh0RxdI/uHKvyDk+G3VliZc70EjZ
 Y/Nx4eZjmhOeHACZYiz37xYatu0lyjXajInYZVE1oYsd38gIueXVtxTA43OXnF5h
 DS6McDxPPGbxxdvoq5xVq9mhc2Ys+1QXeiQBb4Xo0pmG/1Frmg6CU4ud5dL1tHOR
 3Zg5aGCOAN+AEasMMJwu2/BebkzTqTo80Xbm+K1bUDiFtMkju3WNCQqgPegxFDtt
 xzRIreAH1hE7kj0iSZsJuoQYDa4qCWGQ9YZtG1FsJKflsQijS58WOh4wZh2G1ex6
 ar/awTUV3kO0H7HntYqosXDaKzG8FjHivdAe1raDRGDagIG/84ahbmFqGn0eHyIW
 X6Bf32apLcR+ERA0yGMNq8fngltbWKhma9xaRKppdHnDaQsvqZIPyYsSxVr6j0Xr
 TzCaOYUTmamUFJov4sGPOClIb+Ew0xeAhz1KKNJeHcJNX4h8ni0=
 =oeVs
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbVkdwACgkQYKtH/8kJ
 UifxWg/9Hb59ZiGcIAnH+UTGgiXpxszBkp0JOTo54BxKfFJC6Cbhw3sJf6PeUZbz
 6803b40BlTvYb/C+XFCMeBJEuVgjuUw/jCU17Nn51Xw/qKsH+HrOJdUqeAf/7MYk
 Ce/7e2QtYF+SbWaXFohQtpM95/j4B4AiyPMFF7cshxcr9PofYvs0WmT1nhd06qwo
 wPEya+eeghrRV9ajlo4t4gV049Y9174QRfs3vWFli8HsJv76T6Ex/KUtDTQOQPoV
 RBNDhjXauk6PP8la/NDxZbS2apJlHPbnOD2F3g3QOuf40aYcuXOYBAi+Q7vWw2gr
 oJxwF0DtHIrlFWpfKzJVT0NMxWdKcb/WMl6iU+KpnWedQJpHbiSEUJbg6YxSGaTJ
 1JHaW/R+Im6kbKB3S6mkbsFbP70qW8JqSqxbgh01vLFwgUgFlHfqXkwM2ESH/qZ5
 f4BCDp3MDNX17hH4NQ+FQV+V2s9DaASLH9S3g8lS5+SNabT/2jPyU7YnwgFtbp3h
 Ik8Lp6X2tNp75iTlS9j9b5Vil6VfwfPmt8acRXVwNIs001t2CpgLEVR5oGdMzfq4
 x7CQf5bTxRWIBkUdeJO7ubAxxes7yL6vq14zOlukBWxmwcQTLppOHdoW3c44k8Vs
 cLXe9DYyfa/HXnAGnfOxj2wOlKsToNlxOuitenwjso9Bm+aKalU=
 =Fjd+
 -----END PGP SIGNATURE-----

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

soc/tegra: Changes for v6.12-rc1

This is a single patch that simplifies code a little by employing the
new scoped OF helpers.

* tag 'tegra-for-6.12-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Simplify with scoped for each OF child loop

Link: https://lore.kernel.org/r/20240830141004.3195210-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 10:22:20 +00:00
Arnd Bergmann
ef5651a4a0 Some long due cleanups and modernizations of the Versatile
SoC drivers from Krzysztof:
 
 - Put OF handle
 - Use devres to avoid memory leaks
 - Enable compile testing
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmbRzGsACgkQQRCzN7AZ
 XXMVOg//StcurySV+cz7OpeqCrVvk3qZfu1rFR7o+U1yc8e9ZWLuJgE5Ah/ZmQo5
 hx8cHLO2yo1NkhNjCYcJ7diZvnq2mRsjRU+R8Hw3Ae7iN/BjDml3qGc0Xmkk3i+y
 G1I8o2z4oKhMW7ZutUQQGKCcazWH/E4SW7GBJu+jbytzQ5gue/tope54ifN08kYF
 ZOkxUdwXVmzxqMRj3WzHM+M3Execk/PQKEF0E1ihonfa1dAW6PRhZORjvC5ZO+r5
 JQCyUbUokD5vW9DyuqB6TgHhrUlA8wevG4V62bEXIc+a9SmHdmcXYc8gvrLtvDW0
 mvIfLhL38R2C/QbKCf46GzVHUt+TefvHduC8pB/ilvP9QPqk/FsJon/CocGii21b
 QEHRHmo9IxWiwTxu6n15e3rtPaubCLyZDwdXgmFpdb7/jT/QHh/DrBvo/L/Q5837
 oKbzbC3sum+VSWWPyjltzKHG+jyTzMYzYYWAKnl5gTIl0cS+GnKQRM7c2LXJUwf7
 1Hec1oalbLIvSlGblyAZlj+TlInG7T9SPVRejUaRQQuuvkjuh9boD27C0SHJmA+g
 oEsUeQMe6cm9rUTjeYTz0hififzy32jEth0SBDxT/ES80C/XRErBMCjdbHbQ8gBn
 IldZDCbAUX3vQ9LZi3mramPnDee1WRSXvzROfmeFTrzUzbIY6OA=
 =LG/2
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbVkMcACgkQYKtH/8kJ
 UicwUg//dVujh6bjjb1DpY4XdZyHBPbp0ab9drj6ld78Yqk7xSRKteGT7w4pBMA3
 3Up1r2gDDbCtZVfkVkKMAkrFIYUJe3rwSoiEcU+rH2ZNvwV1Bv+kNrKwxpHJaK6C
 1PhuIIT4aX/Oz3bcuwFMxQ9bN1JCGIe7TlgrA/t7M4ykSPQtYU1aZY1gBg5uba0A
 tgBO2Fs2E3m5h4xyihjHrfaGsJkIidXPQdEzsqqjoB0dFTpMYzFs0LcoplfSdSF9
 AqGtwUVJHzqgrrFCy9SArtzUBAkg4M4xUe+3+WYgpq5nZ23coCVjliPU2bcatMRQ
 xLopfCeaalvXDeKyu0TpU4o/IG5a8ZJcYW83AjGs5xG1GPFqHZhgB6YIDsSx2qLo
 lfzfeSwNfaQ865W2G9caam7RY9ziSuhWtbcIrlpa9KYKoTZcIHNy30BsJaF3pgUZ
 wz57jd8+5PGsXc607YjYmv/2TEdj6apKK3GP1nAHjD3qbOmtldZ4t+m50pi0Vga3
 G9pQW17dl4/rx4H/x91JqqzZhUUbXq4qgyC8MrObOVdO//wbFDW8/jvWP8LQfiXi
 aVpfJd3tkIwn2yS2CGDl+ZQFLnmB8koKFh1OASvvQEJzSXl8SYkYTjAchpD2HK1U
 JoFIcwB7x2OsNWnZ8RMCvnOUJ7SuHszsRZkV+s8LF+3iziHg1S4=
 =/uxG
 -----END PGP SIGNATURE-----

Merge tag 'versatile-soc-for-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into soc/drivers

Some long due cleanups and modernizations of the Versatile
SoC drivers from Krzysztof:

- Put OF handle
- Use devres to avoid memory leaks
- Enable compile testing

* tag 'versatile-soc-for-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
  soc: versatile: enable compile testing
  soc: versatile: realview: fix soc_dev leak during device remove
  soc: versatile: realview: fix memory leak during device remove
  soc: versatile: integrator: fix OF node leak in probe() error path

Link: https://lore.kernel.org/r/CACRpkda244rFHnnXPDPOhmKiJsRP08tNCcfFzpH5zR2cx1DFpw@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 10:17:43 +00:00
Arnd Bergmann
9a2f5cbf8f rk3308 io-domains, and some default settings for bits in the general
register files for rk3128 and the new rk3576 soc.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmbU3/wQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgTtZCACdufbwkqdabyJXm0FK81HUpHCWADzsgNwk
 j5F7X7V4xXLqSjD7jWEeqhT6ZH8un2Nd2cOFh0E2RrPfuBi6Jl/DVyFWQE5s19j+
 duso5cw7E1MiJUDB9TjXD7RAJj2HQYzHFgqeEaigE7j0V7LFug72O4fOg27GUmH4
 soFA5VOVuWB4GzPgqCBFd6Pv7Zi+oikg8gTugyKeNrFUWqunFgVTBNN1t0eoE26Q
 Ycxfth8ovd6CI3o6SxeZu1Yge/Aum6jjhRn6CBcQIBDOyMCJaV1eM5c9LzkB+4sc
 aMVVe2ko/nZ74xiCEUuhrH2VJQ5f/HeSaVvrdOHApoyKUQ69eKq+
 =QvOa
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbVicMACgkQYKtH/8kJ
 UicAlA/+Iv8qCNc33YNV6bQctYW9E6cJU6EViasPu8fK8E7ZKMqOPkULP5uY09Ck
 LHlq6hpYzwwhCZbgBjiN8+yAXHsp99qRLrWOXHveYAwFH5Wy1xox98819gnvpFwu
 w5YkebSnrcHFVDFnYtXBtxKHdRLxaAFoFLXGE8YW9WkqVe2ZamErup7mo/3QVXVF
 cTh5rYkuyMc0M9ZbIfBsO8aBKZmi/yxornW9u5et/5cuCp820ZdskzKHIXUFd8ub
 I9gf/kiLQYhrqPj/IlVxHB+MhrPHWdDfM64CsO2mFi+TdDHbJm0uv/WBR8ftQzga
 FzODKHN+bIOU4WFjm0O5fS4RYiHnh1Aek0yCDzzatr+CMELho2uAQKhrgRzGGC9M
 KDtNtzacpfweO/XypMbhZ08ty7MUFDH/EyWWUnZtNS8/C3VSHe5PS7kyjotwZVp6
 R/jbGWN1jY0D2zcUaH3D3Q8kMaihdP5EYDZtd+vVxb3HNNb85DMqd3ljRIDjQMW/
 RUW+Dwu9G+uU4DfBAvcuz9RtyoACEYuKrxWnUo3PePCrWual9XBXtbOJfeNRXEec
 cEC6O9EuE44KFUwpK0d+Ak2SmtbJ2TP0v1yacgLRB11R8ymhsApb0VfdqqE7NAuH
 ZbwWgqehwWiPnBrbtr4uVmAeY2ad0a2wDRLpdWD3uwVXl07qc9M=
 =XanP
 -----END PGP SIGNATURE-----

Merge tag 'v6.12-rockchip-drivers-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/drivers

rk3308 io-domains, and some default settings for bits in the general
register files for rk3128 and the new rk3576 soc.

* tag 'v6.12-rockchip-drivers-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  soc: rockchip: grf: Add rk3576 default GRF values
  dt-bindings: soc: rockchip: Add rk3576 syscon compatibles
  soc: rockchip: grf: Set RK3128's vpu main clock
  soc: rockchip: io-domain: Add RK3308 IO voltage domains
  dt-bindings: power: rockchip: Document RK3308 IO voltage domains

Link: https://lore.kernel.org/r/23316481.ssLaC8jLEa@diego
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:47:47 +00:00
Krzysztof Kozlowski
2f05726171 soc: versatile: enable compile testing
Enable compile testing for broader build coverage.  None of the drivers
use anything from "asm", so code should build everywhere.
CONFIG_PLAT_VERSATILE is being selected by driver dependencies
(CONFIG_ARCH_INTEGRATOR and CONFIG_ARCH_REALVIEW), so directory can be
always added to Makefile targets without impacting other configurations.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-4-ff4b35abed83@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-08-30 15:40:11 +02:00
Krzysztof Kozlowski
c774f2564c soc: versatile: realview: fix soc_dev leak during device remove
If device is unbound, the soc_dev should be unregistered to prevent
memory leak.

Fixes: a2974c9c1f83 ("soc: add driver for the ARM RealView")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-3-ff4b35abed83@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-08-30 15:40:11 +02:00
Krzysztof Kozlowski
1c4f26a41f soc: versatile: realview: fix memory leak during device remove
If device is unbound, the memory allocated for soc_dev_attr should be
freed to prevent leaks.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-2-ff4b35abed83@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-08-30 15:40:11 +02:00
Krzysztof Kozlowski
874c5b6018 soc: versatile: integrator: fix OF node leak in probe() error path
Driver is leaking OF node reference obtained from
of_find_matching_node().

Fixes: f956a785a282 ("soc: move SoC driver for the ARM Integrator")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-1-ff4b35abed83@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-08-30 15:40:11 +02:00
Jinjie Ruan
4d57a84056 soc/tegra: pmc: Simplify with scoped for each OF child loop
Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-08-29 17:43:43 +02:00
Arnd Bergmann
d8f2638b83 Qualcomm driver fixes for v6.11
This corrects the tzmem virt-to-phys conversion, which caused issues for
 the uefisecapp implementation of EFI variable access. SDM670 is excluded
 from tzmem usage due to reported issues.
 
 The SCM get wait queue context call is corrected to be marked ATOMIC and
 some dead code in qseecom, following the tzmem conversion, is removed.
 
 The memory backing command DB is remapped writecombined, to avoid XPU
 violations when Linux runs without the Qualcomm hypervisor.
 
 Two compile fixes are added for pd-mapper, and the broken reference
 count is corrected, to make pd-mapper deal with remoteprocs going away.
 
 In pmic_glink a race condition where the client callbacks might be
 called before we returned the client handle is corrected. The broken conditions
 for when to signal that the firmware is going down is also corrected.
 
 In the pmic_glink UCSI driver, the ucsi_unregister() is moved out of the
 pdr callback, as this is being invoked in atomic context.
 
 Konrad's email address is updated in MAINTAINERS, and related mailmap
 entries are added.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmbMlmAVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FwZwP/iXn8Okj8Xsg0paofr9jwetFaGAr
 b6BGd09Ygm8xdNi9zNqLHBZFJQaKlX5Ah5iG0trX1ljDZvdK6JjDz5IUGxXY8T5l
 R0TW/h/kHiA0UdsQDiGiwK68r4k/9rCwHP14CFSFMSLbTyrX/fiVZy2+GyjJ4/CS
 53Dn3swGVeGU4HOZzh9AN4GVtzQu4ECUUZp50StuRvuDqCdjaHbc3JWieTtEWcSt
 1dJkacNi1yJi1XxHSW6o7jR7ogDxLvMz95x26zhramPBzbsfAAjrkiwNDMz4w2Cj
 P+TjGunlYAOUoqwx0r3ffawNqQg5IoQRSH5fe/39UjzAAXdZoBv81BiQYypkWAdz
 9Iyc13oEkKXUViS9tad9Qba31Ajxdgs2k0T8+XkLoEiFy9CIx7TtTcAP7549wxUI
 89U1LMMZN0iAnEtSmGIc/C7Pr5iap+0beVOJuIZ8tX2vPf2QP8rxe52gvNW39mD3
 IQeLnmxrmTSB9wk/ObddGNfftzA4yEOsnzHddv4w9AVoUH9dsvLuv+Y7C7oALTU+
 RRvHcuUjJ0NJp7xcK0iTR0iqCKg0Rs+VHTnvWxFaIDGH6QdUMMgdBHXWF/f5mR7K
 Jx19VHm2u4IyNLxE6tzC/048PM0qEFEQws1C+dXvtuaC38VX5PBIVWGHTeU4ctsN
 nfkPYQDcEo71FNI5
 =Zo90
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbPiDsACgkQYKtH/8kJ
 Uifk1xAAzHhy/tsQXK0IPSSzvJZJN9NeTkkGad6Nt6nN+jMXf9c+vTtDcPFlKMlp
 hPgXLJ/lh3l6NkEZ+3oI11CL/s3XJEbJaXJ9sqG3E6CUzzO15yII4hd4IqZWIa6x
 +YxdOlAgoQ6LgumidlgeiwRMxBM51KY7kgJIjv3aNQR0EL1F8tgBOqWCpU7cf8nC
 dtAdMy7oaVQFLzW4vtSMipmp0ppr2Evgae/u7qAZuSBunFReeQWggIMI3+hAJvtb
 hInoo8DNksZPfkfLteBmMPO1eyh6ByL2c8PvsriCf+QOK8ADKTwON+6mIya6ubLI
 Azvvz9cBOuXFPhc5OJKG7ZaN1SLRbuhwN2bf//5H6s54/WZFW9/lKQtxq8zjpGW5
 NHKUGoIk/DgyfLs/rEZhvSEXr3jQUCBDNyMAAY0xoPwfqXhPS9flV4FcZn4qiIRh
 bnW1O4a1xwAT5Dwwla62LnzGbYJiKZ6Xi/VJQqg0uZABGdtw0FtjvY/Z8KJCEzYL
 H7T4iu9u+K43SNL/TytBXqMkVZNYMzSncu6NkYFpI0G3Pzw+h5q+BjncODn0Y8tX
 b8ZP/ee84Mumwi8k5lDBllaMoP3I7fyowgFsq5vrE9zpxRiMGJFDf9pxALXJddzN
 jgm/qia9XIU9VZe+Vnq9O73IPjd5P44v/HgUTRcJAB+5aHcylAk=
 =pkFq
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes

Qualcomm driver fixes for v6.11

This corrects the tzmem virt-to-phys conversion, which caused issues for
the uefisecapp implementation of EFI variable access. SDM670 is excluded
from tzmem usage due to reported issues.

The SCM get wait queue context call is corrected to be marked ATOMIC and
some dead code in qseecom, following the tzmem conversion, is removed.

The memory backing command DB is remapped writecombined, to avoid XPU
violations when Linux runs without the Qualcomm hypervisor.

Two compile fixes are added for pd-mapper, and the broken reference
count is corrected, to make pd-mapper deal with remoteprocs going away.

In pmic_glink a race condition where the client callbacks might be
called before we returned the client handle is corrected. The broken conditions
for when to signal that the firmware is going down is also corrected.

In the pmic_glink UCSI driver, the ucsi_unregister() is moved out of the
pdr callback, as this is being invoked in atomic context.

Konrad's email address is updated in MAINTAINERS, and related mailmap
entries are added.

* tag 'qcom-drivers-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: pd-mapper: Fix singleton refcount
  firmware: qcom: tzmem: disable sdm670 platform
  soc: qcom: pmic_glink: Actually communicate when remote goes down
  usb: typec: ucsi: Move unregister out of atomic section
  soc: qcom: pmic_glink: Fix race during initialization
  firmware: qcom: qseecom: remove unused functions
  firmware: qcom: tzmem: fix virtual-to-physical address conversion
  firmware: qcom: scm: Mark get_wq_ctx() as atomic call
  MAINTAINERS: Update Konrad Dybcio's email address
  mailmap: Add an entry for Konrad Dybcio
  soc: qcom: pd-mapper: mark qcom_pdm_domains as __maybe_unused
  soc: qcom: cmd-db: Map shared memory as WC, not WB
  soc: qcom: pd-mapper: Depend on ARCH_QCOM || COMPILE_TEST

Link: https://lore.kernel.org/r/20240826145209.1646159-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-08-28 20:27:39 +00:00
Kousik Sanagavarapu
68123510b7 soc: ti: pm33xx: do device_node auto cleanup
Use scope based cleanup instead of manual of_node_put() calls, hence
simplifying the handling of error paths.

Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
Link: https://lore.kernel.org/r/20240825085714.10736-5-five231003@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
2024-08-28 12:18:02 -05:00
Kousik Sanagavarapu
b0289dbf1c soc: ti: knav_qmss_queue: do device_node auto cleanup
Use scope based cleanup, instead of manual of_node_put() calls, which
automatically free()s "struct device_node".

While at it, refactor the code from knav_queue_probe() into the separate
functions to make auto cleanup look more neat.

Doing the cleanup this way has the advantage of reducing the chance of
memory leaks in case we need to read from new OF nodes in the future
when we probe.

Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
Link: https://lore.kernel.org/r/20240825085714.10736-4-five231003@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
2024-08-28 12:18:02 -05:00
Kousik Sanagavarapu
df70c0b482 soc: ti: pruss: do device_node auto cleanup
Use scope based cleanup instead of manual of_node_put() calls, hence
simplifying the handling of error paths at various places.

While at it, use dev_err_probe() instead of dev_err() in all the code
paths touched.

Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
Link: https://lore.kernel.org/r/20240825085714.10736-3-five231003@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
2024-08-28 12:18:02 -05:00
Kousik Sanagavarapu
952ceb0378 soc: ti: pruss: factor out memories setup
Factor out memories setup code from probe() into a new function
pruss_of_setup_memories().  This sets the stage for introducing auto
cleanup of the device node (done in the subsequent patch), since the
clean up depends on the scope of the pointer and factoring out
code into a separate function obviously limits the scope of the various
variables used in that function.

Apart from the above, this change also has the advantage of making the
code look more neat.

While at it, use dev_err_probe() instead of plain dev_err() as this new
function is called by the probe().

Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
Link: https://lore.kernel.org/r/20240825085714.10736-2-five231003@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
2024-08-28 12:18:02 -05:00
Detlev Casanova
e1aaecacfa soc: rockchip: grf: Add rk3576 default GRF values
Set SW controlled i3c weak pull up and disable JTAG function on SDMMC IO.

The i3c weak pull up is activated to let all gpio banks be controlled
by the pinctrl driver.

Disabling the JTAG function lets the SDMMC core use its full IO width.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Acked-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/20240822195706.920567-3-detlev.casanova@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-08-23 12:33:58 +02:00
Alex Bee
7bd76f405d soc: rockchip: grf: Set RK3128's vpu main clock
RK3128 has a setting in GRF which selects whether the vpu attached iommu
uses the AXI clock of the decoder (vdpu) or the encoder (vepu). The
default is vepu but some part of the vendor firmware sets it to vdpu.

In order to be independent on whether any of those vendor firmware blobs is
used to boot the SoC reset "vpu main clock" setting to it's default value.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Link: https://lore.kernel.org/r/20240523185633.71355-3-knaerzche@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-08-23 11:52:53 +02:00
David Wu
f0d7047889 soc: rockchip: io-domain: Add RK3308 IO voltage domains
Add IO voltage domains support for the RK3308 SoC.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Link: https://lore.kernel.org/r/20240521211029.1236094-11-jonas@kwiboo.se
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-08-23 11:52:53 +02:00
Bjorn Andersson
c158ceb826 soc: qcom: pd-mapper: Fix singleton refcount
The Qualcomm pd-mapper is a refcounted singleton, but the refcount is
never incremented, which means the as soon as any remoteproc instance
stops the count will hit 0.

At this point the pd-mapper QMI service is stopped, leaving firmware
without access to the PD information. Stopping any other remoteproc
instances will result in a use-after-free, which best case manifest
itself as a refcount underflow:

  refcount_t: underflow; use-after-free.
  WARNING: CPU: 1 PID: 354 at lib/refcount.c:87 refcount_dec_and_mutex_lock+0xc4/0x148
  ...
  Call trace:
   refcount_dec_and_mutex_lock+0xc4/0x148
   qcom_pdm_remove+0x40/0x118 [qcom_pd_mapper]
   ...

Fix this by incrementing the refcount, so that the pd-mapper is only
torn down when the last remoteproc stops, as intended.

Fixes: 1ebcde047c54 ("soc: qcom: add pd-mapper implementation")
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240820-pd-mapper-refcount-fix-v1-1-03ea65c0309b@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-21 09:50:48 -05:00
Bjorn Andersson
ad51126037 soc: qcom: pmic_glink: Actually communicate when remote goes down
When the pmic_glink state is UP and we either receive a protection-
domain (PD) notification indicating that the PD is going down, or that
the whole remoteproc is going down, it's expected that the pmic_glink
client instances are notified that their function has gone DOWN.

This is not what the code does, which results in the client state either
not updating, or being wrong in many cases. So let's fix the conditions.

Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
Cc: stable@vger.kernel.org
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Link: https://lore.kernel.org/r/20240820-pmic-glink-v6-11-races-v3-3-eec53c750a04@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-21 08:37:37 -05:00
Bjorn Andersson
11bb2ffb67 usb: typec: ucsi: Move unregister out of atomic section
Commit '9329933699b3 ("soc: qcom: pmic_glink: Make client-lock
non-sleeping")' moved the pmic_glink client list under a spinlock, as it
is accessed by the rpmsg/glink callback, which in turn is invoked from
IRQ context.

This means that ucsi_unregister() is now called from atomic context,
which isn't feasible as it's expecting a sleepable context. An effort is
under way to get GLINK to invoke its callbacks in a sleepable context,
but until then lets schedule the unregistration.

A side effect of this is that ucsi_unregister() can now happen
after the remote processor, and thereby the communication link with it, is
gone. pmic_glink_send() is amended with a check to avoid the resulting NULL
pointer dereference.
This does however result in the user being informed about this error by
the following entry in the kernel log:

  ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: failed to send UCSI write request: -5

Fixes: 9329933699b3 ("soc: qcom: pmic_glink: Make client-lock non-sleeping")
Cc: stable@vger.kernel.org
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Link: https://lore.kernel.org/r/20240820-pmic-glink-v6-11-races-v3-2-eec53c750a04@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-21 08:37:37 -05:00
Bjorn Andersson
3568affcdd soc: qcom: pmic_glink: Fix race during initialization
As pointed out by Stephen Boyd it is possible that during initialization
of the pmic_glink child drivers, the protection-domain notifiers fires,
and the associated work is scheduled, before the client registration
returns and as a result the local "client" pointer has been initialized.

The outcome of this is a NULL pointer dereference as the "client"
pointer is blindly dereferenced.

Timeline provided by Stephen:
 CPU0                               CPU1
 ----                               ----
 ucsi->client = NULL;
 devm_pmic_glink_register_client()
  client->pdr_notify(client->priv, pg->client_state)
   pmic_glink_ucsi_pdr_notify()
    schedule_work(&ucsi->register_work)
    <schedule away>
                                    pmic_glink_ucsi_register()
                                     ucsi_register()
                                      pmic_glink_ucsi_read_version()
                                       pmic_glink_ucsi_read()
                                        pmic_glink_ucsi_read()
                                         pmic_glink_send(ucsi->client)
                                         <client is NULL BAD>
 ucsi->client = client // Too late!

This code is identical across the altmode, battery manager and usci
child drivers.

Resolve this by splitting the allocation of the "client" object and the
registration thereof into two operations.

This only happens if the protection domain registry is populated at the
time of registration, which by the introduction of commit '1ebcde047c54
("soc: qcom: add pd-mapper implementation")' became much more likely.

Reported-by: Amit Pundir <amit.pundir@linaro.org>
Closes: https://lore.kernel.org/all/CAMi1Hd2_a7TjA7J9ShrAbNOd_CoZ3D87twmO5t+nZxC9sX18tA@mail.gmail.com/
Reported-by: Johan Hovold <johan@kernel.org>
Closes: https://lore.kernel.org/all/ZqiyLvP0gkBnuekL@hovoldconsulting.com/
Reported-by: Stephen Boyd <swboyd@chromium.org>
Closes: https://lore.kernel.org/all/CAE-0n52JgfCBWiFQyQWPji8cq_rCsviBpW-m72YitgNfdaEhQg@mail.gmail.com/
Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
Cc: stable@vger.kernel.org
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Link: https://lore.kernel.org/r/20240820-pmic-glink-v6-11-races-v3-1-eec53c750a04@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-21 08:37:30 -05:00
Xianwei Zhao
009ff80bfa soc: amlogic: meson-gx-socinfo: add new SoCs id
Add new definition for Amlogi SoCs, include S4, C3, T7, A4, A5.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240719-soc_info-v3-2-020a3b687c0c@amlogic.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-08-20 17:27:27 +02:00
Danila Tikhonov
79b26c1105 soc: qcom: pd_mapper: Add SM7325 compatible
The Qualcomm SM7325 platform is identical to SC7280, so add
compatibility leading to SC7280.

Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240808184048.63030-5-danila@jiaxyga.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-15 15:52:05 -05:00
Danila Tikhonov
31150c9e87 soc: qcom: socinfo: Add Soc IDs for SM7325 family
Add Soc ID table entries for Qualcomm SM7325 family.

Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240808184048.63030-3-danila@jiaxyga.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-15 15:52:05 -05:00
Jingyi Wang
dff75ec576 soc: qcom: socinfo: add QCS8275/QCS8300 SoC ID
Add SoC ID for Qualcomm QCS8275/QCS8300.

Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com>
Link: https://lore.kernel.org/r/20240814072806.4107079-4-quic_jingyw@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:43 -05:00
Krzysztof Kozlowski
f728778272 soc: qcom: smp2p: use scoped device node handling to simplify error paths
Obtain the device node reference with scoped/cleanup.h to reduce error
handling and make the code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240813-b4-cleanup-h-of-node-put-other-v1-6-cfb67323a95c@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:43 -05:00
Krzysztof Kozlowski
a29e97bdc1 soc: qcom: pbs: use scoped device node handling to simplify error paths
Obtain the device node reference with scoped/cleanup.h to reduce error
handling and make the code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240813-b4-cleanup-h-of-node-put-other-v1-5-cfb67323a95c@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:43 -05:00
Krzysztof Kozlowski
f4c1c19f5c soc: qcom: ocmem: use scoped device node handling to simplify error paths
Obtain the device node reference with scoped/cleanup.h to reduce error
handling and make the code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240813-b4-cleanup-h-of-node-put-other-v1-4-cfb67323a95c@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:43 -05:00
Krzysztof Kozlowski
877840f13b soc: qcom: ice: use scoped device node handling to simplify error paths
Obtain the device node reference with scoped/cleanup.h to reduce error
handling and make the code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240813-b4-cleanup-h-of-node-put-other-v1-3-cfb67323a95c@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:43 -05:00
Krzysztof Kozlowski
c50203cbba soc: qcom: aoss: simplify with scoped for each OF child loop
Use scoped for_each_available_child_of_node_scoped() when iterating over
device nodes to make code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240813-b4-cleanup-h-of-node-put-other-v1-2-cfb67323a95c@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:43 -05:00
Krzysztof Kozlowski
6c26d9c764 soc: qcom: apr: simplify with scoped for each OF child loop
Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240813-b4-cleanup-h-of-node-put-other-v1-1-cfb67323a95c@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:43 -05:00
Dmitry Baryshkov
b14c150d19 soc: qcom: smd-rpm: add qcom,smd-rpm compatible
Add the generic qcom,smd-rpm and qcom,glink-smd-rpm compatibles so that
there is no need to add further compat strings to the list. Existing
strings are intact to keep compatibility with existing DTS.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240729-fix-smd-rpm-v2-3-0776408a94c5@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:42 -05:00
Dmitry Baryshkov
b171551333 Revert "soc: qcom: smd-rpm: Match rpmsg channel instead of compatible"
The rpm_requests device nodes have the compatible node. As such the
rpmsg core uses OF modalias instead of a native rpmsg modalias. Thus if
smd-rpm is built as a module, it doesn't get autoloaded for the device.

Revert the commit bcabe1e09135 ("soc: qcom: smd-rpm: Match rpmsg channel
instead of compatible")

Fixes: bcabe1e09135 ("soc: qcom: smd-rpm: Match rpmsg channel instead of compatible")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240729-fix-smd-rpm-v2-1-0776408a94c5@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:42 -05:00