Commit graph

2405 commits

Author SHA1 Message Date
Arnd Bergmann 4f22aa4569 qcom: spm: allow compile-testing
ARM_QCOM_SPM_CPUIDLE can be selected when compile-testing on
other architectures, but this causes a Kconfig warning
for QCOM_SPM:

WARNING: unmet direct dependencies detected for QCOM_SPM
  Depends on [n]: ARCH_QCOM [=n]
  Selected by [y]:
  - ARM_QCOM_SPM_CPUIDLE [=y] && CPU_IDLE [=y] && (ARM [=y] || ARM64) && (ARCH_QCOM [=n] || COMPILE_TEST [=y]) && !ARM64 && MMU [=y]

Make it possible to also compile-test this one, which can
be done now that v5.15-rc5 lets you select QCOM_SCM everywhere.

Fixes: a871be6b8e ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Fixes: 498ba2a8a2 ("cpuidle: Fix ARM_QCOM_SPM_CPUIDLE configuration")
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-26 20:01:40 +02:00
Arnd Bergmann e2a3495bf9 More Qualcomm driver updates for v5.16
This introduces the Qualcomm "sleep stats" driver, which aids the
 efforts of bringing various Qualcomm platforms into low power mode.
 
 The SMP2P driver gains support for negotiating the "SSR" feature, which
 is used to better synchronize some corner cases that might appear as the
 remoteproc is recovering from a crash.
 
 The socinfo driver learns about a few new PMICs.
 
 SMEM is updated so that it's possible to put the compatible property
 directly in the reserved-memory node, to avoid having to have a separate
 node just pointing to the memory-region.
 
 Lastly it fixes some bugs in smp2p, apr, rpmhpd drivers, notably
 avoiding the issue where powering on a power-domain using rpmhpd while
 keeping the performance_state at 0 is a nop
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmF4C2sbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3Fh1YP/0ypyzx3b73Fy4VctNSx
 fh++iOaoYSd7nB0Syvd/iUAQxPgDofeZaWt4kyHmdYV2oLdYbkWIbs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4fM0HD4cQQi9u
 v1BxdnC9Xzka7k7gl9I0s1EVs0kwkSNuB0pEdR8a5O3Z3ODogdzVSoD3ZEbesTmC
 JlQqtrflyilwxXvufrYmxMPysrJaSQgIPy6eBVPip3t0WqCLBNgMNMhkmFrb1oFo
 8CHb9oC8TPhYVlhMuwsnZcVUl89b7tdAz7AkUgq/lccFwiGPRRWwhIKBd/E7GowI
 K8T82hUpx0L8+inDd53l0tk8Dv4xVxBQ3vneGThQ9jjw8O37+UmhCtK1YrfxiuI+
 xkBAo6xbCZFg/Tiw6fMFzqMDUAKOpB+L9cgw0WQ0VjgH26ADxhO91RXsd2X/6pyo
 3dnmgcFJJjUmsIqVQvZyACOMI/A+vnNvtPump7gh2VRkxASpc5k=
 =HxRd
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers

More Qualcomm driver updates for v5.16

This introduces the Qualcomm "sleep stats" driver, which aids the
efforts of bringing various Qualcomm platforms into low power mode.

The SMP2P driver gains support for negotiating the "SSR" feature, which
is used to better synchronize some corner cases that might appear as the
remoteproc is recovering from a crash.

The socinfo driver learns about a few new PMICs.

SMEM is updated so that it's possible to put the compatible property
directly in the reserved-memory node, to avoid having to have a separate
node just pointing to the memory-region.

Lastly it fixes some bugs in smp2p, apr, rpmhpd drivers, notably
avoiding the issue where powering on a power-domain using rpmhpd while
keeping the performance_state at 0 is a nop

* tag 'qcom-drivers-for-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  firmware: qcom: scm: Don't break compile test on non-ARM platforms
  soc: qcom: smp2p: Add of_node_put() before goto
  soc: qcom: apr: Add of_node_put() before return
  soc: qcom: qcom_stats: Fix client votes offset
  soc: qcom: rpmhpd: fix sm8350_mxc's peer domain
  dt-bindings: arm: cpus: Document qcom,msm8916-smp enable-method
  ARM: qcom: Add qcom,msm8916-smp enable-method identical to MSM8226
  firmware: qcom: scm: Add support for MC boot address API
  soc: qcom: spm: Add 8916 SPM register data
  dt-bindings: soc: qcom: spm: Document qcom,msm8916-saw2-v3.0-cpu
  soc: qcom: socinfo: Add PM8150C and SMB2351 models
  firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available()
  soc: qcom: smp2p: add feature negotiation and ssr ack feature support
  soc: qcom: Add Sleep stats driver
  dt-bindings: Introduce QCOM Sleep stats bindings
  soc: qcom: socinfo: add two missing PMIC IDs
  soc: qcom: rpmhpd: Make power_on actually enable the domain
  soc: qcom: smem: Support reserved-memory description
  dt-bindings: soc: smem: Make indirection optional
  dt-bindings: sram: Document qcom,rpm-msg-ram

Link: https://lore.kernel.org/r/20211026140706.1205989-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-26 17:17:57 +02:00
Arnd Bergmann 64954d19e0 Samsung SoC drivers changes for v5.16
1. Convert Exynos ChipID and ASV driver to a module and make it a
    default, instead of selected. The driver is not essential, so it
    could be disabled, if needed.
 2. Add support for Exynos850 and Exynos Auto v9 to Exynos ChipID and ASV
    driver.
 3. Get rid of HAVE_S3C_RTC because it was adding just another layer
    instead of direct dependencies.
 4. Minor cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmF3zFcQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1wXED/9VSIwfegbhUkfa9yCetdt8dDrjINAUuZ89
 FZsplj7BdFJVra7KxjZ6WSWqT5bBVF804mPQKi/filUvuZLr8oOVc/BCdARPMqxq
 3rui2xiXvUgDWfJmqFEaVhTTChKAK2NKMgC+aGB0Ah3PK9QbO9fG+E1IcOBLIEUQ
 bQH77+GH4rG8/INWdrqmL7LrJUkOyUsCgK3IxGh08m6nRgn8Xfwk1Y0UPpeGgQTs
 66CnmIgBiN3+w0MeFClHpLXokBnSSFwrtITrwLILffAO18EEFaaErSZhSyge4tdu
 WwH9no+mcp8gpV7mU/b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ncMlLTtJ7r5DX5oU7T8KRngzD4kCvnkP
 gjkBzY1+41/K9RCII6L05miNc36ATf/07bQx4e1F2L9/1RzGnjIl8OxN5OVs89y0
 CvplsgtlYgnGccNbpChO0r4IaR7UWYTDPulXkEdNE+jJxuTYvwI=
 =y2Ab
 -----END PGP SIGNATURE-----

Merge tag 'samsung-drivers-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers

Samsung SoC drivers changes for v5.16

1. Convert Exynos ChipID and ASV driver to a module and make it a
   default, instead of selected. The driver is not essential, so it
   could be disabled, if needed.
2. Add support for Exynos850 and Exynos Auto v9 to Exynos ChipID and ASV
   driver.
3. Get rid of HAVE_S3C_RTC because it was adding just another layer
   instead of direct dependencies.
4. Minor cleanups.

* tag 'samsung-drivers-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  soc: samsung: exynos-chipid: add exynosautov9 SoC support
  rtc: s3c: remove HAVE_S3C_RTC in favor of direct dependencies
  soc: samsung: exynos-chipid: Add Exynos850 support
  dt-bindings: samsung: exynos-chipid: Document Exynos850 compatible
  soc: samsung: exynos-chipid: Pass revision reg offsets
  soc: samsung: pm_domains: drop unused is_off field
  arm64: exynos: don't have ARCH_EXYNOS select EXYNOS_CHIPID
  soc: samsung: exynos-chipid: do not enforce built-in
  soc: samsung: exynos-chipid: convert to a module
  soc: samsung: exynos-chipid: avoid soc_device_to_device()
  soc: samsung: exynos-pmu: Fix compilation when nothing selects CONFIG_MFD_CORE

Link: https://lore.kernel.org/r/20211026094709.75692-2-krzysztof.kozlowski@canonical.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-26 17:16:03 +02:00
Chanho Park b417d1e88f soc: samsung: exynos-chipid: add exynosautov9 SoC support
The product id of Exynos Auto v9 is "0xAAA8_0000". Add this id and its
name.

Cc: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Link: https://lore.kernel.org/r/20211021012017.158919-2-chanho61.park@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
2021-10-26 09:16:53 +02:00
Wan Jiabing e1b391e971 soc: qcom: smp2p: Add of_node_put() before goto
Fix following coccicheck warning:
./drivers/soc/qcom/smp2p.c:501:1-33: WARNING: Function
for_each_available_child_of_node should have of_node_put() before goto

Early exits from for_each_available_child_of_node should decrement the
node reference counter.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211014062350.8942-1-wanjiabing@vivo.com
2021-10-24 12:14:52 -05:00
Wan Jiabing 72f1aa6205 soc: qcom: apr: Add of_node_put() before return
Fix following coccicheck warning:

./drivers/soc/qcom/apr.c:485:1-23: WARNING: Function
for_each_child_of_node should have of_node_put() before return

Early exits from for_each_child_of_node should decrement the
node reference counter.

Fixes: 8347356626 ("soc: qcom: apr: Add avs/audio tracking functionality")
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211014083017.19714-1-wanjiabing@vivo.com
2021-10-24 12:12:57 -05:00
Maulik Shah 62563bd99c soc: qcom: qcom_stats: Fix client votes offset
Client votes starts at 0x20 offset. Correct the offset.

Reported-and-suggested-by: Shawn Guo <shawn.guo@linaro.org>
Fixes: 1d77246903 ("soc: qcom: Add Sleep stats driver")
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Reviewed-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1634719753-26064-1-git-send-email-mkshah@codeaurora.org
2021-10-23 23:35:42 -05:00
Dmitry Baryshkov 086f52fdc8 soc: qcom: rpmhpd: fix sm8350_mxc's peer domain
The sm8350_mxc's domain description incorrectly references
sm8150_mmcx_ao as a peer instead of sm8350_mxc_ao. Correct this typo.

Fixes: 639c856287 ("soc: qcom: rpmhpd: Add SM8350 power domains")
Cc: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211020012639.1183806-1-dmitry.baryshkov@linaro.org
2021-10-23 23:34:26 -05:00
Lina Iyer 7f8adb19e9 soc: qcom: spm: Add 8916 SPM register data
Add SPM register information and initialization values for QCOM 8916
SoC.

Link: https://lore.kernel.org/linux-arm-msm/1429314549-6730-5-git-send-email-lina.iyer@linaro.org/
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
[stephan: rebase patch and fix conflicts]
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211004204955.21077-11-stephan@gerhold.net
2021-10-23 22:15:46 -05:00
Bjorn Andersson 87fd343c6e soc: qcom: socinfo: Add PM8150C and SMB2351 models
Add PM8150C and SMB2351 to the list of known PMIC models.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Link: https://lore.kernel.org/r/20211005024025.2037810-1-bjorn.andersson@linaro.org
2021-10-23 22:13:23 -05:00
Chia-Wei Wang c6807970c3
soc: aspeed: Add UART routing support
Add driver support for the UART routing control. Users can perform
runtime configuration of the RX muxes among the UART controllers and
the UART IO pins.

The sysfs interface is also exported for the convenience of routing paths
check and update.

Signed-off-by: Oskar Senft <osk@google.com>
Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Lei YU <yulei.sh@bytedance.com>
Link: https://lore.kernel.org/r/20210927023053.6728-5-chiawei_wang@aspeedtech.com
Link: https://lore.kernel.org/r/20211022000616.481772-1-joel@jms.id.au'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-22 17:32:09 +02:00
Arnd Bergmann ac2561f921 NXP/FSL SoC driver updates for v5.16
DPIO Driver
 - Code cleanup and fix compile warning
 
 RCMP and Guts Driver
 - Make use of the helper function devm_platform_ioremap_resource()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEhb3UXAyxp6UQ0v6khtxQDvusFVQFAmFyCg8ACgkQhtxQDvus
 FVRraxAAsgKVsmUcN6zkn/7qu1hpb6HXYCJRNiudKNeRmKkqgyoKUTT3YzO3+IqK
 wVXoPVDfat19wVTqdAPXSf6ZQkSyG4bigU+c8YwxoPzNBUJg1fQVRHdz9majpYMK
 wUBEGfAxcT7uLBTJpFT/rgMMJbe0EM/Dykyp3xHt0VQRM5tUvnVr2X5WWSJhAEPN
 BJNQW/54UKmpZUEAO6Pas3vH5oUXkAfzmSXpm5z31dMmd5aGckSAwpBzLVGxTdVX
 AKTZ4u1nodWi+AJmItMmgyLGXMMuWjmicwtP2LOiIjmHEv5vTQMWnK9G61K/EwI8
 cP0qm01xThhwFey15L1EAyfh23L+md/aB7X0msPf2t2oRq2uc8dwjeVW2uHdR/oy
 qhsfheYK3m/g7IQK9sAT2uSLVnuNVHlSutIDKvWnJWD9EtoA4RgkQH61hXNjp4zr
 BtUg9M2dnp9zP7K1oQqfWi726FWk/EWj/FVRWKjCWXmHupUBndbrFMux4HFGy/16
 hluEu0OcirFOVhrPLAPBSdzBfQm5n/h7ZxR/9ObyRwtHZ7VM3w4Z1Onh5ByJb3OZ
 1VhIUqVyRm4tKsRqNyFiyLC53JLx90nuZYzd8beyvL6bgCRFvWreZ9kiBWTnElfn
 y/1BCpp7suQWMe0si3qghC2FdncKPYSpYzHr9M840ZxivWKtcBY=
 =SEAL
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFy2VwACgkQmmx57+YA
 GNljYg/+LVeiT/ZBDPMp3gG/bEM1ndH4Spt/8conDVD8h1a4IL7cLo3u+suWbjTt
 26AwSH6bGIBHHh5phlYGuZLtdgjZu4jLGzZofK8DqnRyvBq51kcBrZxeWGkdEn8E
 SaYh9qlevKjy7NdFkNYGLLvFtOoxnqTwTEAe0iO13EgHRKpil/huRGux0yJKjp6/
 EbpqMcmQQKU1C5Gks6q/E7ApWzIZV+BLO3RkBhULYXpQALNIcZoWcdTQVn2xE+Xy
 bALw1MJ4z7Od09PYu4aDrTx6Aaobq1XTEQefprt1NA06LFbrTxRlYM/Rh2tPaYeT
 F7tu9HHe4w9kFAFkrcHTw/WcENCYWhT+TOavWK2BqHQMAa2slNZZaTMwX5VnE9R2
 7G0mLAzPf4wKa4WbInLhWtCarN3aJ5r35Uj8/nozC4qU5yUdJR7D3eFYBSE08sbz
 e4hp/NLjSuGbakJpSK09+IBrpRL/hfCnHi6Vd4yj6veqA2FyS+//HUnIhcn4HeGG
 xotMS8pBemEpC+Qfrr382TzR0X5U9xBzQTV3K2i2un9mHoMY/0vixupwSBmcnZ81
 1mrVTAz7x5RDztnMXbDxl0+SG+40NL+H/uYBuy17MUmYI59QzlAYGavSU0605ZE4
 jjQSu5+S6Blrqgfk43Op/2kC3J/AqtyKKpRUOALenaPAWvygPS0=
 =1cl/
 -----END PGP SIGNATURE-----

Merge tag 'soc-fsl-next-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers

NXP/FSL SoC driver updates for v5.16

DPIO Driver
- Code cleanup and fix compile warning

RCMP and Guts Driver
- Make use of the helper function devm_platform_ioremap_resource()

* tag 'soc-fsl-next-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux:
  soc: fsl: dpio: rename the enqueue descriptor variable
  soc: fsl: dpio: use an explicit NULL instead of 0
  soc: fsl: rcpm: Make use of the helper function devm_platform_ioremap_resource()
  soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource()

Link: https://lore.kernel.org/r/20211022010027.11866-2-leoyang.li@nxp.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-22 17:31:40 +02:00
Youri Querry 54c8b5b6f8 soc: fsl: dpio: rename the enqueue descriptor variable
The struct qbman_eq_desc 'd' variable declaration is covering one of the
function parameters. This has no functional impact since this function
parameter was not used after the new declaration.
Even so, rename the variable so that we make the code more readable.

Fixes: 3b2abda7d2 ("soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue")
Signed-off-by: Youri Querry <youri.querry_1@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
2021-10-21 19:38:56 -05:00
Ioana Ciornei a7ff7dcaf4 soc: fsl: dpio: use an explicit NULL instead of 0
Use an explicit NULL pointer when calling qbman_swp_enqueue_multiple()
instead of a plain integer. Without this fix, we get the following
compile time error.

drivers/soc/fsl/dpio/dpio-service.c:466:60: warning: Using plain integer as NULL pointer

Fixes: 9d98809711 ("soc: fsl: dpio: Adding QMAN multiple enqueue interface")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
2021-10-21 19:38:49 -05:00
Cai Huoqing ea41191165 soc: fsl: rcpm: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
2021-10-21 19:37:32 -05:00
Cai Huoqing e0162129c6 soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
2021-10-21 19:34:47 -05:00
Arnd Bergmann 409d8a9c1d Some new drivers changes for the Allwinner SoCs, converting to a helper
and improving logging.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYW0p4gAKCRDj7w1vZxhR
 xQmwAPsFDSF9fDz1/75sF2FosGV2dPIOBCMUeNFbMesvBKlZMQD/WVAyu7jjiL7k
 i3LThqHE8Jsefv0gqvu2nXaHfxuGmAo=
 =yWZX
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwOZ4ACgkQmmx57+YA
 GNlulQ//XGFn9YDqbZwD6/uNCuKjzOB+8oeRb3K9MKjGn/5eGO3okyBoY4L3VfyR
 eApQamfzuUleTneGjJ+h0CbYwSjl51pTQTatWdcx2hgMSGWVRJoPAkfd5xlV9jpq
 TwnUe0rInujICf2NFYfY7KZ1IUfDYpWqRG2QHsLjpE5D0TYItHbnGdjomkJrxe1d
 7ygUG5vYnAuwnNZM/NSGZYhtaMRLFO/M99d2ulAa8NMx1EsqO1Ms1600pIE0OGWZ
 t2LdwsYXcaLuoZQuns7Fdvmoy+k+E0M68OgbW1oP1WCT4OTxneCoIo3JazXAzwnZ
 T8sVI5rhAGzWtl4m5eTUchk7oZtMLM4jmUUYIl03LNJqfb+/BtgsjKhu8qkYQFzY
 qmoxT2ezTNAXOBuc1Fby931uPWNLTJyLWpwnIwq1gVs3XsSUKVoojfX9yGfzOhAX
 2gf7PGbhGNnUXsQNCLOrg12S+xPSRhTdwu774NeXFCkoedBcqrXsuU/xlpsRhl9V
 bghfsGWNs7m0ZI0pZwpGZeXyTgpyP4zTaFSU1OD0Vxi1SHx/QvkID2bYh8N15WSL
 Mn9RTIGG/HCrs2KkzdOHEWWKdd2QXAerCKBd8GZ1yqDHi8PoCK8BuPfeajfHPNdJ
 tTMHfdYPnMBn5u4fzFuPHpLgeWar6s7KNgK8VMJB10BhALbwyyk=
 =jasz
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-drivers-for-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/drivers

Some new drivers changes for the Allwinner SoCs, converting to a helper
and improving logging.

* tag 'sunxi-drivers-for-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  bus: sun50i-de2: Adjust printing error message
  soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource()

Link: https://lore.kernel.org/r/ad0aa469-9e1b-4bb6-a116-92648ed774fa.lettre@localhost
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 17:45:34 +02:00
Arnd Bergmann 4a47ce1fab i.MX drivers update for 5.16:
- Select REGMAP_MMIO for i.MX GPCv2 driver to avoid build issue.
 - A couple of i.MX GPCv2 driver changes from Marek Vasut to turn
   domain->pgc into bitfield for i.MX8MM GPU domain support.
 - A series from Lucas Stach adding support of i.MX8MM nested power
   domains like VPUMIX and DISPMIX which contains the ADB and BLK_CTRL.
 - An off-by-one fix on Lucas' i.MX8M blk-ctrl driver code.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmFqh8YUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM6v0wf/cc+xouEGoKRrAvj3QNB/2pxnDSbk
 EmObg5/JG5s7+elWGXVxTQ21OFoiapQvj1MDHh1uv2sqX/EOMql45kbvjqOResht
 4mEe1sB9Nr1xe5FmBK2XS6MhSjmYGTBrsNvLY4ctSITzb1FFE3QCmzIO5/TBrBgi
 8oD9Uj8rauagxtcyG6/qXKCO5sBdfQ6BeEe22DKB0rstPkQOga2Ks8lsHeP6igvi
 wuYUOEaQ6wBZfVaFm/l0KqjapmILyspM4FGW1q0vQ4cW8VcOTDK4tz8UpmXYQaaP
 ovQIfnF7Nvk7acs62wT7Vd5t7UOQOfvT6YY2pSKQqotv1M1ip3jT9tPKyQ==
 =MHbD
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwLW4ACgkQmmx57+YA
 GNnyghAAwnKB8nxoLkfjPSeF99rHcAhVLKPUHp9B90TEqvnsF15wQNNgyWuWw74/
 HbBf/tXTo+q56GJVnbvxx0NQllopHI8xyVbZplTrDgO6tYmMwphiJXHPqzdKgxuB
 QLOJzAXSnBfnrFQX8cQXsNYwF/lvoVezpj1zBunNesU0S8Ax2HRWke28fmnN4fDx
 g+Tiqg8PO1Qkf1DIGGgUTY/KQBeuxyNbv5MzJWwKJShr6xrrsAITpHPazRfeGzB1
 RKGstvf/4459rtOowGmZ/H4Yd0dPO1RuDDhkbue6Z2gYjFB7hoL1JtuPoRhHictZ
 D0ZtbcgwK3HJHsjMn7iIz59OFgTB/ce8vWiCwmze+OIUfBsBf4AXLOdlrclXeCap
 t+r6vudG/zqecyUJqlRekh0cdYTdBMSnxXY1kvQph3jS49z6Wl17iK4kSjckeo32
 uEp5IDil85l+IcZwA+lxovaTGXElT/Qlw2VFALRW1iVQgwQIth/d7mynXwmlMW2c
 Fcmkr09CN2kscA37LBQ0uCsLEfGjUcNmPfVm7/DCXRKHHfwjaGgwW5ui//cDqLTo
 hhYVelqIoX2x/5IFdViWev+CUuu0wR0hJGhBeRzBVrs+B9r8zgM1sxlXYREyKhlW
 DM0NXsUKjSh6JFe669gubXJ81wnVKT83fvGxw3oAx0YbbZVBlLI=
 =A9t6
 -----END PGP SIGNATURE-----

Merge tag 'imx-drivers-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers

i.MX drivers update for 5.16:

- Select REGMAP_MMIO for i.MX GPCv2 driver to avoid build issue.
- A couple of i.MX GPCv2 driver changes from Marek Vasut to turn
  domain->pgc into bitfield for i.MX8MM GPU domain support.
- A series from Lucas Stach adding support of i.MX8MM nested power
  domains like VPUMIX and DISPMIX which contains the ADB and BLK_CTRL.
- An off-by-one fix on Lucas' i.MX8M blk-ctrl driver code.

* tag 'imx-drivers-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  soc: imx: imx8m-blk-ctrl: off by one in imx8m_blk_ctrl_xlate()
  soc: imx: imx8m-blk-ctrl: add DISP blk-ctrl
  soc: imx: add i.MX8M blk-ctrl driver
  soc: imx: gpcv2: support system suspend/resume
  soc: imx: gpcv2: keep i.MX8M* bus clocks enabled
  soc: imx: gpcv2: add domain option to keep domain clocks enabled
  soc: imx: gpcv2: add lockdep annotation
  Revert "soc: imx: gpcv2: move reset assert after requesting domain power up"
  soc: imx: gpcv2: allow to disable individual power domains
  imx: soc: Select REGMAP_MMIO
  soc: imx: gpcv2: Set both GPC_PGC_nCTRL(GPU_2D|GPU_3D) for MX8MM GPU domain
  soc: imx: gpcv2: Turn domain->pgc into bitfield

Link: https://lore.kernel.org/r/20211016140138.1603-2-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 16:53:34 +02:00
Chris Lew 85f755083b soc: qcom: smp2p: add feature negotiation and ssr ack feature support
This patch adds feature negotiation and ssr ack feature between
local host and remote processor. Local host can negotiate on common
features supported with remote processor.

When ssr ack feature bit is set, the remote processor will tell local
host when it is reinitialized. All clients registered for falling edge
interrupts will be notified when the smp2p entries are cleared for ssr.

Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1633450403-21281-1-git-send-email-deesin@codeaurora.org
2021-10-17 11:43:31 -05:00
Mahesh Sivasubramanian 1d77246903 soc: qcom: Add Sleep stats driver
Let's add a driver to read the stats from remote processor and
export to debugfs.

The driver creates "qcom_sleep_stats" directory in debugfs and
adds files for various low power mode available. Below is sample
output with command

cat /sys/kernel/debug/qcom_sleep_stats/ddr
count = 0
Last Entered At = 0
Last Exited At = 0
Accumulated Duration = 0

Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
[mkshah: add subsystem sleep stats, create one file for each stat]
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1634107104-22197-3-git-send-email-mkshah@codeaurora.org
2021-10-16 18:23:30 -05:00
Dmitry Baryshkov 2fae3ecc70 soc: qcom: socinfo: add two missing PMIC IDs
Add IDs for PMK8001 and PMI8996. They also fall in the list of
'duplicated' IDs, where the same index was used for multiple chips.

Fixes: 7fda2b0bfb ("soc: qcom: socinfo: import PMIC IDs from pmic-spmi")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211016190607.49866-1-dmitry.baryshkov@linaro.org
2021-10-16 18:19:56 -05:00
Bjorn Andersson e3e56c050a soc: qcom: rpmhpd: Make power_on actually enable the domain
The general expectation is that powering on a power-domain should make
the power domain deliver some power, and if a specific performance state
is needed further requests has to be made.

But in contrast with other power-domain implementations (e.g. rpmpd) the
RPMh does not have an interface to enable the power, so the driver has
to vote for a particular corner (performance level) in rpmh_power_on().

But the corner is never initialized, so a typical request to simply
enable the power domain would not actually turn on the hardware. Further
more, when no more clients vote for a performance state (i.e. the
aggregated vote is 0) the power domain would be turned off.

Fix both of these issues by always voting for a corner with non-zero
value, when the power domain is enabled.

The tracking of the lowest non-zero corner is performed to handle the
corner case if there's ever a domain with a non-zero lowest corner, in
which case both rpmh_power_on() and rpmh_rpmhpd_set_performance_state()
would be allowed to use this lowest corner.

Fixes: 279b7e8a62 ("soc: qcom: rpmhpd: Add RPMh power domain driver")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20211005033732.2284447-1-bjorn.andersson@linaro.org
2021-10-15 18:03:20 -05:00
Sam Protsenko 81a51eb6be soc: samsung: exynos-chipid: Add Exynos850 support
Add chip-id support for Exynos850 SoC. Despite its "E3830" ID, the
actual SoC name is Exynos850 (Exynos3830 name is internal and outdated).

Format of Product_ID register in Exynos850 (offset 0x0):

     [31:0] Product ID (identification)

Format of CHIPID_REV register in Exynos850 (offset 0x10):

    [23:20] Main revision
    [19:16] Sub revision

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Link: https://lore.kernel.org/r/20211014133508.1210-3-semen.protsenko@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
2021-10-15 09:48:52 +02:00
Sam Protsenko c072c4ef7e soc: samsung: exynos-chipid: Pass revision reg offsets
Old Exynos SoCs have both Product ID and Revision ID in one single
register, while new SoCs tend to have two separate registers for those
IDs. Implement handling of both cases by passing Revision ID register
offsets in driver data.

Previously existing macros for Exynos4210 (removed in this patch) were
incorrect:

    #define EXYNOS_SUBREV_MASK         (0xf << 4)
    #define EXYNOS_MAINREV_MASK        (0xf << 0)

Actual format of PRO_ID register in Exynos4210 (offset 0x0):

    [31:12] Product ID
      [9:8] Package information
      [7:4] Main Revision Number
      [3:0] Sub Revision Number

This patch doesn't change the behavior on existing platforms, so
'/sys/devices/soc0/revision' will show the same string as before.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Henrik Grimler <henrik@grimler.se>
Link: https://lore.kernel.org/r/20211014133508.1210-1-semen.protsenko@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
2021-10-15 09:48:40 +02:00
Dan Carpenter 72949f7656 soc: imx: imx8m-blk-ctrl: off by one in imx8m_blk_ctrl_xlate()
The > comparison should be >= to prevent reading one element beyond the
end of the array.  The onecell_data->domains[] array is allocated in
imx8m_blk_ctrl_probe() and it has "onecell_data->num_domains" elements.

Fixes: 5b340e7813d4 ("soc: imx: add i.MX8M blk-ctrl driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-15 11:10:05 +08:00
Bjorn Andersson b5af64fceb soc: qcom: smem: Support reserved-memory description
Practically all modern Qualcomm platforms has a single reserved-memory
region for SMEM. So rather than having to describe SMEM in the form of a
node with a reference to a reserved-memory node, allow the SMEM device
to be instantiated directly from the reserved-memory node.

The current means of falling back to dereferencing the "memory-region"
is kept as a fallback, if it's determined that the SMEM node is a
reserved-memory node.

The "qcom,smem" compatible is added to the reserved_mem_matches list, to
allow the reserved-memory device to be probed.

In order to retain the readability of the code, the resolution of
resources is split from the actual ioremapping.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Link: https://lore.kernel.org/r/20210930182111.57353-4-bjorn.andersson@linaro.org
2021-10-14 19:57:16 -05:00
Arnd Bergmann 790f42a61e This pull request contains Broadcom ARM/ARM64 SoC drivers changes for
5.16, please pull the following:
 
 - Cai updates the bcm-pmb and bcm63xx-power drivers to use the
   devm_platform_ioremap_resource() helper
 
 - Florian updates the Bus Interface Unit code to tune the 72116 and
   72113 chips according to their existing counterparts. The GISB driver is
   updated to be built as a non-removable module
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmFlvVUACgkQh9CWnEQH
 BwRmlg/+OODOgiL6Sorp4uXVZS3jhPGsXon2/FaaXlcB51KgAW3EX5CveAGVA0s5
 8nof7r2J4THXyarEirtqNl07EsOQ63ivLfaUWI8INByu7lQ7S8EycSHdcpNpoadn
 lbsy4ytFZBBCn/uOJWbye+Oerk8LD02ShwZ+/Hd4OEyb3T/vPLJJ6kFRcuuDkaWD
 ZcgiWvUwtUwGj51PqUinG6xoYa0JoquhCuu1KvXBzTIdQFUUTo+82XUwzCs6nv2I
 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NxDKbCzTKz8MhyTwvrl
 boOQtRhOiG5Abe9NKQK+nAn5x6Fq5kYSTiJXUCOw+wCbxHxgUbdzlGFH/vgTBGOx
 MznHVvgpIuMATf1qaHyp85r4pPlzVcHZI6x9K9uxIHAoO8aK2knoMIkNoSr89fAy
 5EXAHHfQ5Pvf9qicr163LPSaDRQoUnEsi9C27qdpXgE7lcng5g==
 =Is9X
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-5.16/drivers' of https://github.com/Broadcom/stblinux into arm/drivers

This pull request contains Broadcom ARM/ARM64 SoC drivers changes for
5.16, please pull the following:

- Cai updates the bcm-pmb and bcm63xx-power drivers to use the
  devm_platform_ioremap_resource() helper

- Florian updates the Bus Interface Unit code to tune the 72116 and
  72113 chips according to their existing counterparts. The GISB driver is
  updated to be built as a non-removable module

* tag 'arm-soc/for-5.16/drivers' of https://github.com/Broadcom/stblinux:
  bus: brcmstb_gisb: Allow building as module
  soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72116
  soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72113
  soc: bcm63xx-power: Make use of the helper function devm_platform_ioremap_resource()
  soc: bcm: bcm-pmb: Make use of the helper function devm_platform_ioremap_resource()

Link: https://lore.kernel.org/r/20211013174016.831348-3-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-13 23:01:40 +02:00
Arnd Bergmann 936fc53f3d Qualcomm driver updates for v5.16
This drops the use of power-domains for exposing the load_state from the
 QMP driver to clients, to avoid issues related to system suspend.
 
 SMP2P becomes wakeup capable, to allow dying remoteprocs to wake up
 Linux from suspend to perform recovery.
 
 It adds RPM power-domain support for SM6350 and MSM8953 and base RPM
 support for MSM8953 and QCM2290.
 
 It adds support for MSM8996, SDM630 and SDM660 in the SPM driver, which
 will enable the introduction of proper voltage scaling of the CPU
 subsystem.
 
 Support for releasing secondary CPUs on MSM8226 is introduced.
 
 The Asynchronous Packet Router (APR) driver is extended to support the
 new Generic Packet Router (GPR) variant, which is used to communicate
 with the firmware in the new AudioReach audio driver.
 
 Lastly it transitions a number of drivers to safer string functions, as
 well as switching things to use devm_platform_ioremap_resource().
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmFlxugbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3F3A0P/ixLiu0XktPOyFZ+3Ag/
 5KKan6wlH8JO0AfxbOolk0MkC1/8uk1V+Kuw4b/22jTO4w/9Illi9jSmV0wR3IBh
 26sWpyxNK7N+7uAnBDqlZekQYTg5xKqJGn69kxe0oIm8yAogGkxZnlIWt7JGtWS0
 NcyLLe9gS/B/q6ppTkxlYhSMB3Qp6bU/lRjBWTcHlxaNxGyNbGw4zp5ncze8ui9R
 s0JdFhJ/T1ptuWuIhrEWXEVapQtf0pgPvYSWxRYoBRU4N1F4HcRcLVpUU6eSvFEg
 BKxN11dCW4o0njLBpdPtg3u7AL31A95OPFiVwpWEb6Wov1DAdQYfYSoc7r2uqKvL
 QgvE/Fq1uPNPsFH2AgJjmku7nb2S0UP2msIhsZjugwxCQXtHgv2uPdYSN/MOudEZ
 MdjbbAHKW9+TR4gTVzA7b7OVzB73+tjHo/4hUjy8J5RlRKujbzHHXLRjvpNAILqn
 y457eUFqYxR1C3CKy2GrgR/PvNcBdDVq0ikuv4elYZEIaPL/Wxg6V7RJSHzgAgU/
 7XArrGvCXdLXy/e07KJ4Su74OBOsXnqLLr+Xsw5+h42XCnDfmI3caQlQjTXxJxN4
 EifHOoPCa8JNtXzWKSBSO7Pb5teSYh5XlAQs8nGVbrKMhly/MDLeNzSL+uu8DGNw
 B9Cf/mM9bhs3Q69Z37WgOdK0
 =FE4j
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFnQuMACgkQmmx57+YA
 GNk90g/9F5Sh8wfMQ3WYZMu10L431dXYKkafccK8SFgNhTxTuJ7xPbJzXxFQW6Qp
 Ky0DAKcJB/tW/jCMh7L/d7pET4tedRncZd6Pk8kkn8uRC9qiTEFyPKP+4trADnhw
 Q/gf8xbEJz13aDzFbfW2Ko9Rx0HJQ/BSWVzZ5fpkUmoSSBnxm+rq9T3e10BNX1QT
 /Bg1M77zyYWtlPKexjxBEz7EZuQIEmN9gkCCriYTMw34hfVYszsNkIZnIGfe/wAa
 F6iSjIwVqf4DbM6QzabNoCUzZf50Ij4Vdlhvk5FUt3quPIvcULzIxQxI3o/J5sJ2
 2mowPuiVjmqx4R8XFILod0+KU4NNUGcb2YFLZg+XjbopArfLZaa2OV40m2QDY/Ay
 /BHXBtxLDDcDqwOX6Y7NEfbNFUqLlFv00vuZEJ9KT/19ZfJgCw4qoxw44aldjQEo
 3pvEACOHLKoI+FOeb6LHL0erfc1jz/qul37oWI361rDIfWsWsZtbyc+gItMDLGYa
 C1qUHoP5vMmse0tILT6AJNR23aGJFapKkzTNWB6j5Pi/0sdv3zGbhxubf+TxMRtx
 5BhEP2N5pHdKVopxVSG2JVOtT12jE68tV0E00erEoPIG35C+DyADn5i9lg4g20Ix
 MwxwtgAC0cws8tpwsDvFOCj8SPn9HDtEGMJMejo5xuEIxqjAb2E=
 =LLU7
 -----END PGP SIGNATURE-----

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

Qualcomm driver updates for v5.16

This drops the use of power-domains for exposing the load_state from the
QMP driver to clients, to avoid issues related to system suspend.

SMP2P becomes wakeup capable, to allow dying remoteprocs to wake up
Linux from suspend to perform recovery.

It adds RPM power-domain support for SM6350 and MSM8953 and base RPM
support for MSM8953 and QCM2290.

It adds support for MSM8996, SDM630 and SDM660 in the SPM driver, which
will enable the introduction of proper voltage scaling of the CPU
subsystem.

Support for releasing secondary CPUs on MSM8226 is introduced.

The Asynchronous Packet Router (APR) driver is extended to support the
new Generic Packet Router (GPR) variant, which is used to communicate
with the firmware in the new AudioReach audio driver.

Lastly it transitions a number of drivers to safer string functions, as
well as switching things to use devm_platform_ioremap_resource().

* tag 'qcom-drivers-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (40 commits)
  soc: qcom: apr: Add GPR support
  soc: dt-bindings: qcom: add gpr bindings
  soc: qcom: apr: make code more reuseable
  soc: dt-bindings: qcom: apr: deprecate qcom,apr-domain property
  soc: dt-bindings: qcom: apr: convert to yaml
  dt-bindings: soc: qcom: aoss: Delete unused power-domain definitions
  dt-bindings: msm/dp: Remove aoss-qmp header
  soc: qcom: aoss: Drop power domain support
  dt-bindings: soc: qcom: aoss: Drop the load state power-domain
  soc: qcom: smp2p: Add wakeup capability to SMP2P IRQ
  dt-bindings: power: rpmpd: Add SM6350 to rpmpd binding
  dt-bindings: soc: qcom: aoss: Add SM6350 compatible
  soc: qcom: llcc: Disable MMUHWT retention
  soc: qcom: smd-rpm: Add QCM2290 compatible
  dt-bindings: soc: qcom: smd-rpm: Add QCM2290 compatible
  firmware: qcom_scm: Add compatible for MSM8953 SoC
  dt-bindings: firmware: qcom-scm: Document msm8953 bindings
  soc: qcom: pdr: Prefer strscpy over strcpy
  soc: qcom: rpmh-rsc: Make use of the helper function devm_platform_ioremap_resource_byname()
  soc: qcom: gsbi: Make use of the helper function devm_platform_ioremap_resource()
  ...

Link: https://lore.kernel.org/r/20211012173442.1017010-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-13 22:34:43 +02:00
Arnd Bergmann 24e18b0f45 - mt8192: add mutex support
- mmsys:
   add more components
   add routing table for mt8192
   add reset controller support
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmFj71gXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH5NxxAAlJaPI386Ol0VAZCBrm3zce4X
 dRaHBnA0f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Yy5tK7kTF8cKcPIbrQdkiaZE3WtzSjOnXSwe330gneXUH+QF3
 RsLX46ClmQlVyvIHNZ9r+9R9rXtsR7xjq7TzwFBlgA5+i5pQbRAh8Q0FqS7CE/rM
 S/UorL1vif//yZyfMrHyIjpXgq/TxIIkDIMB649IKZ11Q3VQwF9nPouH7iv82ck8
 9JV92zl1E8xwLOTdQEEYc7FMknmWVJVTyYF68NAei6/qJjFmnT3hPwa8HsS0+Sfc
 W08QfdoKkZdoYohz8yAJohEZXGt1ik9CJ5Gco/1dNxknEn8su9qJ+BqwiAT9abOt
 7rIemafCls3XYy90Yw6r+gZwZPQqFcnGCSojVr+3aPdeF375Yh+XaKBoVRZI+NRq
 UGrqz8lCUWLQ/xA9yxWySFbUpRF7vgSXHWJdoHuJe1jkUKEDWWo=
 =puDg
 -----END PGP SIGNATURE-----

Merge tag 'v5.15-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers

- mt8192: add mutex support
- mmsys:
  add more components
  add routing table for mt8192
  add reset controller support

* tag 'v5.15-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  drm/mediatek: mtk_dsi: Reset the dsi0 hardware
  soc: mediatek: mmsys: Add reset controller support
  soc: mediatek: add mtk mutex support for MT8192
  soc: mediatek: mmsys: Add mt8192 mmsys routing table
  soc: mediatek: mmsys: add comp OVL_2L2/POSTMASK/RDMA4

Link: https://lore.kernel.org/r/b1d364d0-f2ae-488b-b3f7-c694049c20d3@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-11 12:09:08 +02:00
Arnd Bergmann 94b847c766 soc/tegra: Changes for v5.16-rc1
This set consists of stub additions to enable compile testing for more
 drivers, exposes the PMC's USB regmap on all SoC generations, removes a
 state synchronization workaround that is no longer needed and adds an
 error reporting driver that can help troubleshoot crashes.
 
 To top it all off, an error handling path in the powergating code is
 fixed and the devm_platform_ioremap_resource() function is used to
 remove some boilerplate code.
 -----B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YjrEZou8T9Fe934Iad
 3l7N20pnGA5JNK0MxWh0ETjfGCWOnB/GfYLCcxnv6kts5zqcRStzBr+L14Ort5mC
 XZz3GApVGOM9LN/UB+KUVzRDZxSKNIekT8QaxUIPNpvZmRyUxw/Z4zdU8tT33hZa
 e/yKi60LLpkGgcj5HYkyYIgjriqUpjEFgObCZ6MXA9HoxFajAq5jkeBm23/tirZR
 rQmH3xq7vLFUtmmv4bVeAxxomnVdIXv5TwzXew0KyeqW4DG4T8h9h7095vWpW2ys
 hR90JhoiG2Kksa0+KlX15ZEaEVmojNV2IAFsfq9n5mDNFFEgOt8vqxSfVjGHYXFn
 kyQb4b4MSt87qczRL/lhx6YKFK3R0u99NFnJkSlZ3Q4kNQn2WgvGaeYiPZdwcAWX
 52HQBnYLp3cyDgDnOSD/wKX+BSoTZrBNE5SKLhoaSLNowyGpAPOcrAs1ob+myF6g
 BebTd3+8Vf1m/h7iuIsCf4CMCRxp86Z2V+eMGwG+HZjAmpZAlXf4mQMsKp4aeZuZ
 yObANkb1CgeSvzDKK+/ej/JDMYwBdhfhES2JpfuSD01+zqJASHA=
 =DXSR
 -----END PGP SIGNATURE-----

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

soc/tegra: Changes for v5.16-rc1

This set consists of stub additions to enable compile testing for more
drivers, exposes the PMC's USB regmap on all SoC generations, removes a
state synchronization workaround that is no longer needed and adds an
error reporting driver that can help troubleshoot crashes.

To top it all off, an error handling path in the powergating code is
fixed and the devm_platform_ioremap_resource() function is used to
remove some boilerplate code.

* tag 'tegra-for-5.16-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Use devm_platform_ioremap_resource()
  soc/tegra: Add Tegra186 ARI driver
  soc/tegra: Fix an error handling path in tegra_powergate_power_up()
  soc/tegra: pmc: Expose USB regmap to all SoCs
  soc/tegra: pmc: Disable PMC state syncing
  soc/tegra: pm: Make stubs usable for compile testing
  soc/tegra: irq: Add stubs needed for compile testing
  soc/tegra: fuse: Add stubs needed for compile testing

Link: https://lore.kernel.org/r/20211008201132.1678814-4-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-11 11:11:02 +02:00
Arnd Bergmann 8855761890 Amlogic Drivers updates for v5.16:
- soc: amlogic: meson-gx-socinfo: Add the SOC ID for the S905Y2 used in the Radxa Zero
 - soc: amlogic: meson-clk-measure/canvas: Make use of devm_platform_ioremap_resource()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmFev70ACgkQd9zb2sjI
 SdFiXw/+Km5OZ2wpfejVx0maFbNOg8tEYa1nJJhkxX5yTFfxkViSyjSu69w8Uydt
 HqNJDOdy+YJsxVUsC/HMBwe0D5x7/V+sVkmEH0eV56EtpJ71s286uLXMlwX2Bwv4
 3fPN2Mzmsd08Nkk++LbVIUjC5bY0NO25QiytDmS5/VKqnKSJyK0jRHHYlWkWbTKR
 7V3Xm4Kvfp4/LS1j99/gVLCnsp4fIN90lbGDBcZfRV905J1HvNU6pZClqhHaaoOa
 UyWNxQH/c0MUDOO35IQVZvaynxosSVaI2f6Sca1LIAPmlPU2axJ0oaN7Tgzsfrg4
 ZVNDQTpqOTiBfbBF2HPP7rm1b6YhwjXK4v2HVgaXcBP1my+QKa0L1hQ+1F5guYy1
 l94QHPgjXjKIL00VmmorOA01g8DLIQKYdImqTs0HITdFPaI8vqdv5KnbGmWLAZuq
 B17Q4q2t4fxFeT7qMfdNsN9zNzPyyiZSAU254kNAxtzfExCI1XQtREGuBOGpu1jK
 0Nnyz2XXf4KmwAYSsU+KJbkN/MLZl/UxcAOD0UU0it9bkOb4bD2/cStZ7pbBJMR8
 lELV1ebZDjQVgDgWNQhuo98D0kBDG2mXaGiLxKMvUdmWtBbIifyctmFbHeRWlVZd
 dSyQc4BL+ciGBcmtsHprCECPSDyDloRR1bhvITBHYhdBp3XyjgM=
 =hK3p
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-drivers-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/drivers

Amlogic Drivers updates for v5.16:

Minor cleanups, and the addition of the S905Y2 SoC ID

* tag 'amlogic-drivers-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  soc: amlogic: meson-clk-measure: Make use of the helper function devm_platform_ioremap_resource()
  soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource()
  soc: amlogic: meson-gx-socinfo: Add S905Y2 ID for Radxa Zero

Link: https://lore.kernel.org/r/f8e020d3-29f7-0745-3864-01975edd20f7@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-11 10:36:16 +02:00
Krzysztof Kozlowski 178d6c1b83 soc: samsung: pm_domains: drop unused is_off field
The 'is_off' member of internal state structure 'exynos_pm_domain' is
not used anymore.

Fixes: 2ed5f23671 ("ARM: EXYNOS: Detect power domain state on registration from DT")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20211008075253.67961-1-krzysztof.kozlowski@canonical.com
2021-10-10 19:18:03 +02:00
Cai Huoqing 76d8947431 soc/tegra: pmc: Use devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling
platform_get_resource() and devm_ioremap_resource() separately.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2021-10-08 21:42:41 +02:00
Mikko Perttunen 29962197e6 soc/tegra: Add Tegra186 ARI driver
Add a driver to hook into panic notifiers and print machine check
status for debugging. Status information is retrieved via SMC. This
is supported by upstream ARM Trusted Firmware.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2021-10-08 21:42:38 +02:00
Enric Balletbo i Serra f27ef28563 soc: mediatek: mmsys: Add reset controller support
Among other features the mmsys driver should implement a reset
controller to be able to reset different bits from their space.

Cc: Jitao Shi <jitao.shi@mediatek.com>
Suggested-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20210930103105.v4.6.I15e2419141a69b2e5c7e700c34d92a69df47e04d@changeid
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2021-10-08 15:15:26 +02:00
Yongqiang Niu 13d9624da4 soc: mediatek: add mtk mutex support for MT8192
Add mtk mutex support for MT8192 SoC.

Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://lore.kernel.org/r/20210930155222.5861-5-yongqiang.niu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2021-10-08 13:25:43 +02:00
Christophe JAILLET 986b509470 soc/tegra: Fix an error handling path in tegra_powergate_power_up()
If an error occurs after a successful tegra_powergate_enable_clocks()
call, it must be undone by a tegra_powergate_disable_clocks() call, as
already done in the below and above error handling paths of this function.

Update the 'goto' to branch at the correct place of the error handling
path.

Fixes: a38045121b ("soc/tegra: pmc: Add generic PM domain support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2021-10-07 20:01:54 +02:00
Lucas Stach 926e57c065 soc: imx: imx8m-blk-ctrl: add DISP blk-ctrl
This adds the description for the i.MX8MM disp blk-ctrl.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-06 20:13:51 +08:00
Lucas Stach 2684ac05a8 soc: imx: add i.MX8M blk-ctrl driver
This adds a driver for the blk-ctrl blocks found in the i.MX8M* line of
SoCs. The blk-ctrl is a top-level peripheral located in the various *MIX
power domains and interacts with the GPC power controller to provide the
peripherals in the power domain access to the NoC and ensures that those
peripherals are properly reset when their respective power domain is
brought back to life.

Software needs to do different things to make the bus handshake happen
after the GPC *MIX domain is powered up and before it is powered down.
As the requirements are quite different between the various blk-ctrls
there is a callback function provided to hook in the proper sequence.

The peripheral domains are quite uniform, they handle the soft clock
enables and resets in the blk-ctrl address space and sequencing with the
upstream GPC power domains.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-06 20:13:47 +08:00
Lucas Stach da4112230f soc: imx: gpcv2: support system suspend/resume
Our usage of runtime PM to control the hierarchy of power domains is
slightly unusual and means that powering up a domain may fail in early
system resume, as runtime PM is still disallowed at this stage.

However the system suspend/resume path takes care of powering down/up
the power domains in the order defined by the device parent/child and
power-domain provider/consumer hierarachy. So we can just runtime
resume all our power-domain devices to allow the power-up to work
properly in the resume path. System suspend will still disable all
domains as intended.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-06 20:13:45 +08:00
Lucas Stach 656ade7aa4 soc: imx: gpcv2: keep i.MX8M* bus clocks enabled
Annotate the domains with bus clocks to keep those clocks enabled
as long as the domain is active.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-06 20:13:42 +08:00
Lucas Stach 18c98573a4 soc: imx: gpcv2: add domain option to keep domain clocks enabled
Some of the MIX domains are using clocks to drive the bus bridges. Those
must be enabled at all times, as long as the domain is powered up and
they don't have any other consumer than the power domain. Add an option
to keep the clocks attached to a domain enabled as long as the domain
is power up and only disable them after the domain is powered down.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-06 20:13:39 +08:00
Lucas Stach fadf79a07b soc: imx: gpcv2: add lockdep annotation
Some of the GPCv2 power domains are nested inside each other without
visibility to lockdep at the genpd level, as they are in separate
driver instances and don't have a parent/child power-domain relationship.

Add a subclass annotation to the nested domains to let lockdep know that
it is okay to take the genpd lock in a nested fashion.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-06 20:13:23 +08:00
Lucas Stach 2b2f106eb5 Revert "soc: imx: gpcv2: move reset assert after requesting domain power up"
This reverts commit a77ebdd9f553. It turns out that the VPU domain has no
different requirements, even though the downstream ATF implementation seems
to suggest otherwise. Powering on the domain with the reset asserted works
fine. As the changed sequence has caused sporadic issues with the GPU
domains, just revert the change to go back to the working sequence.

Cc: <stable@vger.kernel.org> # 5.14
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Adam Ford <aford173@gmail.com> #imx8mm-beacon
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-05 14:29:19 +08:00
Lucas Stach 8da8bd5399 soc: imx: gpcv2: allow to disable individual power domains
Some board designs don't supply power to all of the power domains,
as they are not used anyways. In that case we must make sure to
not touch those power domains at all, as trying to power up a
domain that has no power supplied to it will obviously end in a
system crash. Allow to disable those domains via the standard DT
status property.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-By: Tim Harvey <tharvey@gateworks.com>
Tested-By: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-05 14:27:52 +08:00
Ezequiel Garcia f617a87176 imx: soc: Select REGMAP_MMIO
The imx-gpcv2 driver needs Regmap MMIO. Select it, and fix:

drivers/soc/imx/gpcv2.c:420:34: error: array type has incomplete element type ‘struct regmap_range’
  420 | static const struct regmap_range imx7_yes_ranges[] = {
      |                                  ^~~~~~~~~~~~~~~
drivers/soc/imx/gpcv2.c:421:17: error: implicit declaration of function ‘regmap_reg_range’; did you mean ‘remap_pfn_range’? [-Werror=implicit-function-declaration]
  421 |                 regmap_reg_range(GPC_LPCR_A_CORE_BSC,
      |                 ^~~~~~~~~~~~~~~~
      |                 remap_pfn_range

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-05 13:54:44 +08:00
Dmitry Osipenko ceba814b37 soc/tegra: pmc: Expose USB regmap to all SoCs
All Tegra SoCs prior to Tegra186 have USB power controls within the Power
Management controller. These controls need to be configured by USB driver.
Expose the regmap to these SoCs.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2021-10-04 23:11:09 +02:00
Dmitry Osipenko 33110589a3 soc/tegra: pmc: Disable PMC state syncing
Disable PMC state syncing in order to ensure that we won't break older
kernels once device-trees will be updated with the addition of the power
domains. This also allows to apply device-tree PM patches independently
from the driver patches.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2021-10-04 22:10:54 +02:00
Marek Vasut 19791f518f soc: imx: gpcv2: Set both GPC_PGC_nCTRL(GPU_2D|GPU_3D) for MX8MM GPU domain
To bring up the MX8MM GPU domain, it is necessary to configure both
GPC_PGC_nCTRL(GPU_2D) and GPC_PGC_nCTRL(GPU_3D) registers. Without
this configuration, the system might hang on boot when bringing up
the GPU power domain. This is sporadically observed on multiple
disparate systems.

Add the GPU3D bit into MX8MM GPU domain pgc bitfield, so that both
GPC_PGC_nCTRL(GPU_2D) and GPC_PGC_nCTRL(GPU_3D) registers are
configured when bringing up the GPU domain. This fixes the sporadic
hang.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-04 15:53:57 +08:00
Marek Vasut 34a01d9ea7 soc: imx: gpcv2: Turn domain->pgc into bitfield
There is currently the MX8MM GPU domain, which is in fact a composite domain
for both GPU2D and GPU3D. To correctly configure this domain, it is necessary
to control both GPC_PGC_nCTRL(GPU_2D) and GPC_PGC_nCTRL(GPU_3D) at the same
time. This is currently not possible.

Turn the domain->pgc from value into bitfield and use for_each_set_bit() to
iterate over all bits set in domain->pgc when configuring GPC_PGC_nCTRL
register array. This way it is possible to configure all GPC_PGC_nCTRL
registers required in a particular domain.

This is a preparatory patch, no functional change.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-04 15:53:01 +08:00