Commit Graph

2897 Commits

Author SHA1 Message Date
Krzysztof Kozlowski ec63dcd3c8 soc: qcom: icc-bwmon: use regmap and prepare for BWMON v5
Refactor the code to prepare it for supporting BWMON v5 which comes with
different register layout by:
1. Adding use of MMIO regmap and regmap fields which allows to keep one
   code logic with different register maps.
2. The "clear" type registers do not allow reading, therefore regmap
   requires using cache with default values.
3. regmap has an effect of introducing barriers after each readl/writel,
   which should negligible effect as only few writes were relaxed.
4. Additionally usage of regmap fields removes need of shifting the
   register values.
5. Add "V4" prefix to names of all defines with register addresses (so
   BWMON_V4_xxx) to differentiate it from V5.  The actual register values
   are shared so keep their naming.
6. While changing the defines, pad register addresses to three digits
   for readability.

Cc: Rajendra Nayak <quic_rjendra@quicinc.com>
Cc: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220728113748.170548-8-krzysztof.kozlowski@linaro.org
2022-08-18 14:13:46 -05:00
Krzysztof Kozlowski 650db9fa2c soc: qcom: icc-bwmon: store count unit per variant
Versions v4 and v5 of BWMON on SDM845 use different unit count, so allow
easier variant customization by storing its value in struct
icc_bwmon_data.

Cc: Rajendra Nayak <quic_rjendra@quicinc.com>
Cc: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
Tested-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220728113748.170548-7-krzysztof.kozlowski@linaro.org
2022-08-18 14:13:46 -05:00
Krzysztof Kozlowski 956deab551 soc: qcom: icc-bwmon: clear all registers on init
The hardware programming guide recommends to clear all registers on
first initialization, through separate field in BWMON_CLEAR register.

This makes sense in general but especially if driver is rebound to avoid
spurious/early interrupts.

Cc: Rajendra Nayak <quic_rjendra@quicinc.com>
Cc: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220728113748.170548-6-krzysztof.kozlowski@linaro.org
2022-08-18 14:13:46 -05:00
Krzysztof Kozlowski 1dd5246ea6 soc: qcom: icc-bwmon: store reference to variant data in container
Instead of copying pieces of variant-specific data (struct
icc_bwmon_data) into the state container (struct icc_bwmon), just store
a pointer to it.

This simplifies a bit the code and allows later to grow easily the
variant-specific data for new BWMON v5.

Cc: Rajendra Nayak <quic_rjendra@quicinc.com>
Cc: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
Tested-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220728113748.170548-5-krzysztof.kozlowski@linaro.org
2022-08-18 14:13:46 -05:00
Krzysztof Kozlowski 2b5d8b02f5 soc: qcom: icc-bwmon: drop unused registers
BWMON_GLOBAL_IRQ_STATUS and BWMON_ZONE_COUNT defines are not used.

Cc: Rajendra Nayak <quic_rjendra@quicinc.com>
Cc: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
Tested-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220728113748.170548-4-krzysztof.kozlowski@linaro.org
2022-08-18 14:13:46 -05:00
Krzysztof Kozlowski 6356c7bb53 soc: qcom: icc-bwmon: re-use IRQ enable/clear define
The interrupt enable, status and clear registers have the same layout,
so BWMON_GLOBAL_IRQ_ENABLE_ENABLE define can be used also for clearing
IRQ, instead of hard-coded value.

Cc: Rajendra Nayak <quic_rjendra@quicinc.com>
Cc: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
Tested-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220728113748.170548-3-krzysztof.kozlowski@linaro.org
2022-08-18 14:13:46 -05:00
Marco Felsch b64b46fbaa Revert "soc: imx: imx8m-blk-ctrl: set power device name"
This reverts commit 8239d67f59.

This change confuses the sysfs cleanup path since the rename is done
after the device registration.

Fixes: 8239d67f59 ("soc: imx: imx8m-blk-ctrl: set power device name")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-08-17 16:35:44 +08:00
Lad Prabhakar ebd0e06f30 soc: renesas: Identify RZ/Five SoC
Add support for identifying the (R9A07G043) RZ/Five SoC.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220722141506.20171-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-08-16 09:24:44 +02:00
Geert Uytterhoeven 1b37236de8 soc: renesas: Identify R-Car H3Ne-1.7G
Add support for identifying the R-Car H3Ne-1.7G (R8A779MB) SoC.

As this is a different grading of the already supported R-Car H3-N ES3.0
(R8A77951) SoC, support for it is enabled through the existing
ARCH_R8A77951 configuration symbol.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/8670482178567897571edc0dfc60017453544071.1656072871.git.geert+renesas@glider.be
2022-08-16 09:20:34 +02:00
William Zhang 7bb49d774f arm64: bcmbca: Make BCM4908 drivers depend on ARCH_BCMBCA
With Broadcom Broadband arch ARCH_BCMBCA supported in the kernel, this
patch series migrate the ARCH_BCM4908 symbol to ARCH_BCMBCA. Hence
replace ARCH_BCM4908 with ARCH_BCMBCA in subsystem Kconfig files.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Acked-by: Guenter Roeck <linux@roeck-us.net> (for watchdog)
Acked-by: Bjorn Helgaas <bhelgaas@google.com> (for drivers/pci)
Acked-by: Wolfram Sang <wsa@kernel.org> (for i2c)
Acked-by: Philipp Zabel <p.zabel@pengutronix.de> (for reset)
Link: https://lore.kernel.org/r/20220803175455.47638-7-william.zhang@broadcom.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-08-15 09:55:34 -07:00
Guilherme G. Piccoli 751c3e19d0 soc: bcm: brcmstb: Document panic notifier action and remove useless header
The panic notifier of this driver is very simple code-wise, just a
memory write to a special position with some numeric code. But this
is not clear from the semantic point-of-view, and there is no public
documentation about that either.

After discussing this in the mailing-lists [0] and having Florian
explained it very well, document that in the code for the future
generations asking the same questions. Also, while at it, remove
a useless header.

[0] https://lore.kernel.org/lkml/781cafb0-8d06-8b56-907a-5175c2da196a@gmail.com

Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Doug Berger <opendmb@gmail.com>
Cc: Justin Chen <justinpopo6@gmail.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Markus Mayer <mmayer@broadcom.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Link: https://lore.kernel.org/r/20220719195325.402745-5-gpiccoli@igalia.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-08-15 09:36:56 -07:00
Lad Prabhakar 41a21e578d soc: renesas: Kconfig: Enable IRQC driver for RZ/G2L SoC
Select RENESAS_RZG2L_IRQC config option if ARCH_RZG2L is enabled
so that IRQC driver is enabled on RZ/G2L (and alike) SoC's.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220718192824.7246-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-08-15 10:19:01 +02:00
Linus Torvalds 507f811f20 More power management updates for 5.20-rc1
- Fix return error code in mtk_cpu_dvfs_info_init (Yang Yingliang).
 
  - Minor cleanups and support for new boards for Qcom cpufreq drivers
    (Bryan O'Donoghue, Konrad Dybcio, Pierre Gondois, and Yicong Yang).
 
  - Fix sparse warnings for Tegra cpufreq driver (Viresh Kumar).
 
  - Make dev_pm_opp_set_regulators() accept NULL terminated list (Viresh
    Kumar).
 
  - Add dev_pm_opp_set_config() and friends and migrate other users and
    helpers to using them (Viresh Kumar).
 
  - Add support for multiple clocks for a device (Viresh Kumar and
    Krzysztof Kozlowski).
 
  - Configure resources before adding OPP table for Venus (Stanimir
    Varbanov).
 
  - Keep reference count up for opp->np and opp_table->np while they are
    still in use (Liang He).
 
  - Minor OPP cleanups (Viresh Kumar and Yang Li).
 
  - Add a trace event for cpuidle to track missed (too deep or too
    shallow) wakeups (Kajetan Puchalski).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmLxUA0SHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxypYQAK/sYS76XzKRjVsPmC082FVlA9Helhsa
 Op50DSnhfzYAWrtRZM5VPsV2CgQkmc5KCmZJSd1ZKIFcOpjlJT/rvaVaSH7Ltcn5
 52GOus6KXKCL3FegQLy3bLcmKkEJIXb3uhWE2VlSuj2cxx6KE2g4bUwPE0pRr++Y
 RkfaT6hcUzxxOAKw1cQhdXgBoXKL/ZeypmpZ95joYuas/mozKskM5SQFX455JCQ9
 t4vaRzrsHzxi5ELiML75TYMY97sF367wSs+4jZSgPBllbJcRXEMg+JkTccKRYrsZ
 k/kDvP5xVFzKT/dYpNpW3u/pl94+xZuh5WLF9/AqwC/qs7kLPJJ0/8mfTTd63DjZ
 3KrkimiQ3d2XMAL4L6FoK+T8v6MwzmlN0elmHHdtmu9mY+v01CwAzjpxdvaFoELK
 V6BCRRX8KNwYsrAJ4EpDK9TvPYJf8yT3jvGDcjPZY9RYlebje0Q825XOcxea4Dfe
 oFxiEWgfK9gzOBvaa24oifKDy2RVy6FvR43qQeiPG4AWAFjr4qP9cDO4q5OL/BuE
 sXpsGY5NE/e8JH9hkgmUK1ms50zk4UMbRC5ZoZuHWyiaFlJdMRF3cUGHe3ylPrxb
 XOFZz8Zl4WeAqBjGGHuiMedwEbmQH2RhdAMCQO1nxoq3UXy6E2/ojI1G1uQ9IEm0
 5FFouJ+bEnqO
 =LBb0
 -----END PGP SIGNATURE-----

Merge tag 'pm-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more power management updates from Rafael Wysocki:
 "These are ARM cpufreq updates and operating performance points (OPP)
  updates plus one cpuidle update adding a new trace point.

  Specifics:

   - Fix return error code in mtk_cpu_dvfs_info_init (Yang Yingliang).

   - Minor cleanups and support for new boards for Qcom cpufreq drivers
     (Bryan O'Donoghue, Konrad Dybcio, Pierre Gondois, and Yicong Yang).

   - Fix sparse warnings for Tegra cpufreq driver (Viresh Kumar).

   - Make dev_pm_opp_set_regulators() accept NULL terminated list
     (Viresh Kumar).

   - Add dev_pm_opp_set_config() and friends and migrate other users and
     helpers to using them (Viresh Kumar).

   - Add support for multiple clocks for a device (Viresh Kumar and
     Krzysztof Kozlowski).

   - Configure resources before adding OPP table for Venus (Stanimir
     Varbanov).

   - Keep reference count up for opp->np and opp_table->np while they
     are still in use (Liang He).

   - Minor OPP cleanups (Viresh Kumar and Yang Li).

   - Add a trace event for cpuidle to track missed (too deep or too
     shallow) wakeups (Kajetan Puchalski)"

* tag 'pm-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (55 commits)
  cpuidle: Add cpu_idle_miss trace event
  venus: pm_helpers: Fix warning in OPP during probe
  OPP: Don't drop opp->np reference while it is still in use
  OPP: Don't drop opp_table->np reference while it is still in use
  cpufreq: tegra194: Staticize struct tegra_cpufreq_soc instances
  dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM6375 compatible
  dt-bindings: opp: Add msm8939 to the compatible list
  dt-bindings: opp: Add missing compat devices
  dt-bindings: opp: opp-v2-kryo-cpu: Fix example binding checks
  cpufreq: Change order of online() CB and policy->cpus modification
  cpufreq: qcom-hw: Remove deprecated irq_set_affinity_hint() call
  cpufreq: qcom-hw: Disable LMH irq when disabling policy
  cpufreq: qcom-hw: Reset cancel_throttle when policy is re-enabled
  cpufreq: qcom-cpufreq-hw: use HZ_PER_KHZ macro in units.h
  cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init()
  OPP: Remove dev{m}_pm_opp_of_add_table_noclk()
  PM / devfreq: tegra30: Register config_clks helper
  OPP: Allow config_clks helper for single clk case
  OPP: Provide a simple implementation to configure multiple clocks
  OPP: Assert clk_count == 1 for single clk helpers
  ...
2022-08-08 14:29:00 -07:00
Linus Torvalds 3bd6e5854b asm-generic: updates for 6.0
There are three independent sets of changes:
 
  - Sai Prakash Ranjan adds tracing support to the asm-generic
    version of the MMIO accessors, which is intended to help
    understand problems with device drivers and has been part
    of Qualcomm's vendor kernels for many years.
 
  - A patch from Sebastian Siewior to rework the handling of
    IRQ stacks in softirqs across architectures, which is
    needed for enabling PREEMPT_RT.
 
  - The last patch to remove the CONFIG_VIRT_TO_BUS option and
    some of the code behind that, after the last users of this
    old interface made it in through the netdev, scsi, media and
    staging trees.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLqPPEACgkQmmx57+YA
 GNlUbQ/+NpIsiA0JUrCGtySt8KrLHdA2dH9lJOR5/iuxfphscPFfWtpcPvcXQWmt
 a8u7wyI8SHW1ku4U0Y5sO0dBSldDnoIqJ5t4X5d7YNU9yVtEtucqQhZf+GkrPlVD
 1HkRu05B7y0k2BMn7BLhSvkpafs3f1lNGXjs8oFBdOF1/zwp/GjcrfCK7KFzqjwU
 dYrX0SOFlKFd4BZC75VfK+XcKg4LtwIOmJraRRl7alz2Q5Oop2hgjgZxXDPf//vn
 SPOhXJN/97i1FUpY2TkfHVH1NxbPfjCV4pUnjmLG0Y4NSy9UQ/ZcXHcywIdeuhfa
 0LySOIsAqBeccpYYYdg2ubiMDZOXkBfANu/sB9o/EhoHfB4svrbPRDhBIQZMFXJr
 MJYu+IYce2rvydA/nydo4q++pxR8v1ES1ZIo8bDux+q1CI/zbpQV+f98kPVRA0M7
 ajc+5GTIqNIsvHzzadq7eYxcj5Bi8Li2JA9sVkAQ+6iq1TVyeYayMc9eYwONlmqw
 MD+PFYc651pKtXZCfkLXPIKSwS0uPqBndAibuVhpZ0hxWaCBBdKvY9mrWcPxt0kA
 tMR8lrosbbrV2K48BFdWTOHvCs2FhHQxPGVPZ/iWuxTA0hHZ9tUlaEkSX+VM57IU
 KCYQLdWzT8J9vrgqSbgYKlb6pSPz6FIjTfut6NZMmshIbavHV/Q=
 =aTR0
 -----END PGP SIGNATURE-----

Merge tag 'asm-generic-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull asm-generic updates from Arnd Bergmann:
 "There are three independent sets of changes:

   - Sai Prakash Ranjan adds tracing support to the asm-generic version
     of the MMIO accessors, which is intended to help understand
     problems with device drivers and has been part of Qualcomm's vendor
     kernels for many years

   - A patch from Sebastian Siewior to rework the handling of IRQ stacks
     in softirqs across architectures, which is needed for enabling
     PREEMPT_RT

   - The last patch to remove the CONFIG_VIRT_TO_BUS option and some of
     the code behind that, after the last users of this old interface
     made it in through the netdev, scsi, media and staging trees"

* tag 'asm-generic-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  uapi: asm-generic: fcntl: Fix typo 'the the' in comment
  arch/*/: remove CONFIG_VIRT_TO_BUS
  soc: qcom: geni: Disable MMIO tracing for GENI SE
  serial: qcom_geni_serial: Disable MMIO tracing for geni serial
  asm-generic/io: Add logging support for MMIO accessors
  KVM: arm64: Add a flag to disable MMIO trace for nVHE KVM
  lib: Add register read/write tracing support
  drm/meson: Fix overflow implicit truncation warnings
  irqchip/tegra: Fix overflow implicit truncation warnings
  coresight: etm4x: Use asm-generic IO memory barriers
  arm64: io: Use asm-generic high level MMIO accessors
  arch/*: Disable softirq stacks on PREEMPT_RT.
2022-08-05 10:07:23 -07:00
Linus Torvalds c1c76700a0 SPDX changes for 6.0-rc1
Here is the set of SPDX comment updates for 6.0-rc1.
 
 Nothing huge here, just a number of updated SPDX license tags and
 cleanups based on the review of a number of common patterns in GPLv2
 boilerplate text.  Also included in here are a few other minor updates,
 2 USB files, and one Documentation file update to get the SPDX lines
 correct.
 
 All of these have been in the linux-next tree for a very long time.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYupz3g8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynPUgCgslaf2ssCgW5IeuXbhla+ZBRAzisAnjVgOvLN
 4AKdqbiBNlFbCroQwmeQ
 =v1sg
 -----END PGP SIGNATURE-----

Merge tag 'spdx-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx

Pull SPDX updates from Greg KH:
 "Here is the set of SPDX comment updates for 6.0-rc1.

  Nothing huge here, just a number of updated SPDX license tags and
  cleanups based on the review of a number of common patterns in GPLv2
  boilerplate text.

  Also included in here are a few other minor updates, two USB files,
  and one Documentation file update to get the SPDX lines correct.

  All of these have been in the linux-next tree for a very long time"

* tag 'spdx-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: (28 commits)
  Documentation: samsung-s3c24xx: Add blank line after SPDX directive
  x86/crypto: Remove stray comment terminator
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_406.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_398.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_391.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_319.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_298.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_179.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2)
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 1)
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_160.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_152.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_149.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_147.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_133.RULE
  ...
2022-08-04 12:12:54 -07:00
Rafael J. Wysocki f6e0b468da OPP updates for 5.20-rc1
- Make dev_pm_opp_set_regulators() accept NULL terminated list (Viresh
   Kumar).
 
 - Add dev_pm_opp_set_config() and friends and migrate other
   users/helpers to using them (Viresh Kumar).
 
 - Add support for multiple clocks for a device (Viresh Kumar and
   Krzysztof Kozlowski).
 
 - Configure resources before adding OPP table for Venus (Stanimir
   Varbanov).
 
 - Keep reference count up for opp->np and opp_table->np while they are
   still in use (Liang He).
 
 - Minor cleanups (Viresh Kumar and Yang Li).
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEx73Crsp7f6M6scA70rkcPK6BEhwFAmLoprIACgkQ0rkcPK6B
 Ehz2nBAApgYUDGkEjWcJufIxW1mH77uonzmWUV2jQBEcCvYnjdwhJ0RpQUT75Xnk
 hTYJ5v9UKwOVl+puPguUe7UzSmWcsI9AzJCj0Vr/LBiln+sawoI51lqOaNjCJkmZ
 VytQJB23DNsYJAG/0xM42+syu+IONJ4vCP/9m35sWlevfFihbfQsEK+iEKsseVgd
 sEwPvHyixLWyeaoAf+6apOBP2Lf+/3R8h6Iv0U8n8jOzUpQQ5r/RSDyZeARP7gze
 64aXvsvr7D0Mc9GpevDJKGtPFbRNfq5I4Lg5MOZ8NQVjXOqlWJil3oYEnKQxIH0Y
 EEzcrSuWi3SEeHrQfj+GFs/D7z2ZHqmbg7yb4P7zSeqLvG+7Ey9aYOXOg5LykrYk
 1rZQzenLMF91RnhdRLI22SJngokOYZjWBFp62mPqmEYtx2VsYQlxqGtJoCHYDRx3
 QRp0ZYJBnHQMt7saiIRFdAAIz7/G5lkiUplVzqAWe7AEpUG3Y7kvIqfwi69s3I5S
 ERSf3qqx3dUGFXYoxwglEwaf8ZvKQnPOzOLmbyc9Hrj2MclfKf9vW+0/4J6iiDlu
 ITpsqEWUhtEjwCt3lbM6PWNRrCJHi6YkKw0sORxEWR639cqckmk6ZAuaRPeOob6a
 nZ/UvwU2LMRG1zZyrsB3bbUkijJ019RPySmjCXApLsoNT1qpUr0=
 =NHBQ
 -----END PGP SIGNATURE-----

Merge tag 'opp-updates-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm

Pull operating performance points (OPP) updates for 5.20-rc1 from Viresh
Kumar:

"- Make dev_pm_opp_set_regulators() accept NULL terminated list (Viresh
   Kumar).

 - Add dev_pm_opp_set_config() and friends and migrate other
   users/helpers to using them (Viresh Kumar).

 - Add support for multiple clocks for a device (Viresh Kumar and
   Krzysztof Kozlowski).

 - Configure resources before adding OPP table for Venus (Stanimir
   Varbanov).

 - Keep reference count up for opp->np and opp_table->np while they are
   still in use (Liang He).

 - Minor cleanups (Viresh Kumar and Yang Li)."

* tag 'opp-updates-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: (43 commits)
  venus: pm_helpers: Fix warning in OPP during probe
  OPP: Don't drop opp->np reference while it is still in use
  OPP: Don't drop opp_table->np reference while it is still in use
  OPP: Remove dev{m}_pm_opp_of_add_table_noclk()
  PM / devfreq: tegra30: Register config_clks helper
  OPP: Allow config_clks helper for single clk case
  OPP: Provide a simple implementation to configure multiple clocks
  OPP: Assert clk_count == 1 for single clk helpers
  OPP: Add key specific assert() method to key finding helpers
  OPP: Compare bandwidths for all paths in _opp_compare_key()
  OPP: Allow multiple clocks for a device
  dt-bindings: opp: accept array of frequencies
  OPP: Make dev_pm_opp_set_opp() independent of frequency
  OPP: Reuse _opp_compare_key() in _opp_add_static_v2()
  OPP: Remove rate_not_available parameter to _opp_add()
  OPP: Use consistent names for OPP table instances
  OPP: Use generic key finding helpers for bandwidth key
  OPP: Use generic key finding helpers for level key
  OPP: Add generic key finding helpers and use them for freq APIs
  OPP: Remove dev_pm_opp_find_freq_ceil_by_volt()
  ...
2022-08-03 17:49:38 +02:00
Linus Torvalds 47b62edcd4 ARM: SoC drivers for 6.0
The SoC driver updates contain changes to improve support for
 additional SoC variants, as well as cleanups an minor bugfixes
 in a number of existing drivers.
 
 Notable updates this time include:
 
  - Support for Qualcomm MSM8909 (Snapdragon 210) in various drivers
 
  - Updates for interconnect drivers on Qualcomm Snapdragon
 
  - A new driver support for NMI interrupts on Fujitsu A64fx
 
  - A rework of Broadcom BCMBCA Kconfig dependencies
 
  - Improved support for BCM2711 (Raspberry Pi 4) power management
    to allow the use of the V3D GPU
 
  - Cleanups to the NXP guts driver
 
  - Arm SCMI firmware driver updates to add tracing support, and
    use the firmware interfaces for system power control and for
    power capping.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLo+0UACgkQmmx57+YA
 GNkkFw//eyeMxsJ/pqp0HeXTX7s2p0+39IQiak0hjFNe3XN12PIMRAHHtutKlt7F
 K0fKksokY9p+o1M86/5D4l7v7S6DcHQk2MdUD5AeMu/If7cfL0TI2mdIAVnoad4o
 p54ABR0q2Tr/Dr/2GK8kZPTnXkPPLd951mgCG/jwrlPgG3KjTgjhEWg86+F2s/B/
 P8ryYakCYfsxPJGnZqyw63JuVet9Tnv87jySxabukNfSRR8RbJ+OVKXxaBBmvYkA
 +UuDEkcuPtlrEyUoNe+WtM07BdxP6tl/jRwZ4EenQtFDSLCQnapgHK3bVRbLs/WL
 naKJZgI7OOwU8fjRi90/zYoPBW6UQ9OoxcmshNwgFM5yBLJtVgGM+Fp8XNfPIvm0
 BYvE7jf8cEtFDAOYWuB8jCdvBen8qzt5eeUpV+uOjHDxiWwfif15yUDxCE3GB7Ov
 vSPRpuTec/6Ry5hIbqcsrTcZRihnJbAJqDOHdlSVX3M+ohXcf5OMLd+IbD+oHgpo
 vSKvitkDnCKvdR6Uw1GSNAgeVm1ItMBlcL/8VsurOEUXR301pFNGdHEGuuxDu1Mm
 rEzk37ajYmiol5uBYIU8mdYrlK2+52sWd5/22zIwhMIEgQbuPbouYWPfUSP9bb+U
 9NlvjGVxK5U73UqcU/56nn7W9uRt0ArzSzON53wnBW3WjkcgMLk=
 =0dZI
 -----END PGP SIGNATURE-----

Merge tag 'arm-drivers-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC drivers from Arnd Bergmann:
 "The SoC driver updates contain changes to improve support for
  additional SoC variants, as well as cleanups an minor bugfixes
  in a number of existing drivers.

  Notable updates this time include:

   - Support for Qualcomm MSM8909 (Snapdragon 210) in various drivers

   - Updates for interconnect drivers on Qualcomm Snapdragon

   - A new driver support for NMI interrupts on Fujitsu A64fx

   - A rework of Broadcom BCMBCA Kconfig dependencies

   - Improved support for BCM2711 (Raspberry Pi 4) power management to
     allow the use of the V3D GPU

   - Cleanups to the NXP guts driver

   - Arm SCMI firmware driver updates to add tracing support, and use
     the firmware interfaces for system power control and for power
     capping"

* tag 'arm-drivers-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (125 commits)
  soc: a64fx-diag: disable modular build
  dt-bindings: soc: qcom: qcom,smd-rpm: add power-controller
  dt-bindings: soc: qcom: aoss: document qcom,sm8450-aoss-qmp
  dt-bindings: soc: qcom,rpmh-rsc: simplify qcom,tcs-config
  ARM: mach-qcom: Add support for MSM8909
  dt-bindings: arm: cpus: Document "qcom,msm8909-smp" enable-method
  soc: qcom: spm: Add CPU data for MSM8909
  dt-bindings: soc: qcom: spm: Add MSM8909 CPU compatible
  soc: qcom: rpmpd: Add compatible for MSM8909
  dt-bindings: power: qcom-rpmpd: Add MSM8909 power domains
  soc: qcom: smd-rpm: Add compatible for MSM8909
  dt-bindings: soc: qcom: smd-rpm: Add MSM8909
  soc: qcom: icc-bwmon: Remove unnecessary print function dev_err()
  soc: fujitsu: Add A64FX diagnostic interrupt driver
  soc: qcom: socinfo: Fix the id of SA8540P SoC
  soc: qcom: Make QCOM_RPMPD depend on PM
  tty: serial: bcm63xx: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  spi: bcm63xx-hsspi: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  clk: bcm: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  hwrng: bcm2835: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  ...
2022-08-02 08:10:10 -07:00
Linus Torvalds e233cc59d0 ARM: SoC updates for 6.0
The updates for arch/arm/mach-* platform code this time are mainly
 minor cleanups.
 
 Most notably, the DaVinci DM644x/DM646x SoC support gets removed. This was
 also scheduled for later removal early next year, but Linus Walleij asked
 for having them removed earlier to avoid problems for the GPIO subsystem.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLo+zkACgkQmmx57+YA
 GNkA9g/7BEprYGJ43eLY+sl4GNcNbtybxNdog62NIb+v/HyiLUuhsApJIbwy8lFn
 IIkaFwDt8xb/tFLtHyDO+ZqCycSlNLqWVT6c3//qhUREj1Ll01zQI8KEYO2GSqnG
 qV1fiF2ARrT/SUWwAEP9Rw+e/dCz3yQvNQQdrIRSOhAJy7D2R25/OSeQ/0I/bswH
 qY6VXUr6obV+fV++CuWjvkPhSI4Oa28j7QC47/rj634KoHXxIky1OH1xMyYCMd7l
 vPj0UbWvQrEM4EhLblLHDba3QBMyN9EzrTvByDDbFNBkYjostIKUXPl9mr2o5rgr
 7c+dfDz7a5LY00te3InxB+0Ij+bnrGUmAc3ohzQbdvRMFMzB67imcv1rEcX4I3K6
 2BekFz33xseYA8sVi4p2kDd8EGeNJrMoQVnD+eRJzPEwxVTRs0OmbRoeZwmsCuqb
 x8BPO9YZtcc/SsnTc2gIGvz2hdzgKro7paSTJGbs+6wQN02ZR7yFO4hSpfWaSpzu
 RcgtSq/wdTSZq721WGCKPP6qHqTxetas/n7VlVBl8u79OclVicfngkYsiKYs65nI
 zmLfMUGthaXny5Q70EYEcpBx8d1V2b5+rl/pp2i2yA8r/ry0EDvkuVTeRZqJgEsa
 zP8i4InDm4ca8vhdzLoyJtHgTTQxoIv+1sa8dUGEgbE6YpzucZ8=
 =LkG0
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC updates from Arnd Bergmann:
 "The updates for arch/arm/mach-* platform code this time are mainly
  minor cleanups.

  Most notably, the DaVinci DM644x/DM646x SoC support gets removed. This
  was also scheduled for later removal early next year, but Linus
  Walleij asked for having them removed earlier to avoid problems for
  the GPIO subsystem"

* tag 'arm-soc-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (38 commits)
  ARM: at91: setup outer cache .write_sec() callback if needed
  ARM: at91: add sam_linux_is_optee_available() function
  ARM: Marvell: Update PCIe fixup
  ARM: bcmbca: Include full family name in Kconfig
  ARM: bcm: NSP: Removed forced thermal selection
  ARM: debug: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  arm: bcmbca: Add BCMBCA sub platforms
  arm: bcmbca: Move BCM63138 ARCH_BCM_63XX to ARCH_BCMBCA
  MAINTAINERS: Move BCM63138 to bcmbca arch entry
  ARM: shmobile: rcar-gen2: Increase refcount for new reference
  ARM: davinci: Delete DM646x board files
  ARM: davinci: Delete DM644x board files
  firmware: xilinx: Add TF_A_PM_REGISTER_SGI SMC call
  cpufreq: zynq: Fix refcount leak in zynq_get_revision
  ARM: OMAP2+: Kconfig: Fix indentation
  ARM: OMAP2+: Fix refcount leak in omap3xxx_prm_late_init
  ARM: OMAP2+: pdata-quirks: Fix refcount leak bug
  ARM: OMAP2+: display: Fix refcount leak bug
  ARM: OMAP2+: Fix refcount leak in omapdss_init_of
  ARM: imx25: support silicon revision 1.2
  ...
2022-08-02 08:02:59 -07:00
Arnd Bergmann 99978d2fd9 More Qualcomm driver changes for v5.20
This adds support for booting secondary cores, SPM, SMD-RPM and RPM
 power-domain support for the MSM8909 platform.
 
 It drops an unnecessary print in icc-bwmon, corrects SA8540P entries in
 socinfo and a Kconfig build dependency for QCOM_RPMPD.
 
 Lastly it continues to clean up up the Devicetree bindings for the
 Qualcomm drivers.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmLYinIbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FryMQANQKam+7lJrykwF3bt8t
 e/ZR1SWPcKTu5dudsnA2GACnycQ8XQr5M06HRVghwveleXbjHyE3beLEy/NwfbTL
 P4ufdDtg/UCwZXJ+p2ZDtbKIWQQU1qgItekYiN3lDEnb3Y5R7vI2h2mhdDOZh8yn
 HtzI5EeI5gMilZ7yYtqPR3DrXpfdYBaGANshyzmP07eDTz+UyaSSKoALsy7jeWB2
 9d4/inH35Tuqv/98oLaf+gK1vH89AVA13N6fVaQxgPOne3FN1bsqBFGc/RvW+phH
 CG+D86lrxq7iChdEcvcoPCkabYi4lNqhbKZOiAAimqrwFCIksVJSE7adDul0JcPF
 g0ml1jWIx+Jsj5TmuRH01CaxCuLtv9WKARi64vqA8dwSYuak8irP3WXbbtv/sNgW
 PokJovzDwwSs71Rh8PmlXC//XY8gbsVj/umI8lEsS5/PrvdCXYsRTjRzvZ5uNtiQ
 5s1fm6xMT2AMbp+Y6ZcnmPhuGntfiJZFj9GivfZuaYF44Ov6mRScHnRADC9oXpBf
 7qlaC1T05PBUHOMB19xpOOsqtBpfX9TCaCqhsVxhH4bjzzYoMuV+yYlI3CqPv3yL
 v9bKfMkbsOpZywCxyve2d6jqCeL8fA2iPw3MzFIlmESRA4MwdXswmxHCE3C7FOHA
 SZkdXKa4EeWQRBf9g5ri3EM/
 =gLQ3
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLZTeMACgkQmmx57+YA
 GNmWzg//eCc5hZXF1HumCX21ueWjwnAaZWZZECe+Plc0GB6nMnPVgCw2S29SCfYQ
 cpR1B0YME/AgK7GiwdxW7mh9wtRzAtR7aSn2Z3nsmF7lMTJI5mJTDVIApoCvgHDu
 5eyFIoiwtWYKFht5TLvC56fnOW73Jp6m5K4HElH2q6A387uurc8ClmuhnG7Dbhsp
 WCYB7aqfqYlMybf8EYo3BAng63v6wLDf93+HyGokRiRHeh/h7xF4liLVY9XCNxOH
 NSxBn8zZDRttEww+xSP+hDpTo316YG3SiNf3XW5ojVMrSUsbJM76DMTuPW70LJvK
 obL4SL7zPeo7yH0NiHK699k+jchozb6Uq9WNnWHc3b5ABXK1RV0BoUNPtTHjiYBs
 ojJnqjPmGJHaLmrvqEihyzRxXJtFMFU22t2EwdUmxQyYdgffS35W6lJtlNP/q7ph
 i+DFoyKsmH8T9zNibNXjoV5NAo73OyKKriWjQS/DYR2/T/kwooXo9h9RS8rppo4M
 kqumzGT2gdLoYI/1hBgXurQpMr231XvesLNSNJpQNz3UfYC0cuC7nAe6EQ5Jn2Da
 hLQrRSj+TMghSq8dw5yOx1fvWjyYT1uFKiSgOkWXvX6Pcui6UC5oJ3zivv7JOXuc
 Jjn+0B31KIBUyh8hq4cNrGaF8edVf8Y0vxp0mKsnnYjQxxuZHkc=
 =TP2T
 -----END PGP SIGNATURE-----

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

More Qualcomm driver changes for v5.20

This adds support for booting secondary cores, SPM, SMD-RPM and RPM
power-domain support for the MSM8909 platform.

It drops an unnecessary print in icc-bwmon, corrects SA8540P entries in
socinfo and a Kconfig build dependency for QCOM_RPMPD.

Lastly it continues to clean up up the Devicetree bindings for the
Qualcomm drivers.

* tag 'qcom-drivers-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  dt-bindings: soc: qcom: qcom,smd-rpm: add power-controller
  dt-bindings: soc: qcom: aoss: document qcom,sm8450-aoss-qmp
  dt-bindings: soc: qcom,rpmh-rsc: simplify qcom,tcs-config
  ARM: mach-qcom: Add support for MSM8909
  dt-bindings: arm: cpus: Document "qcom,msm8909-smp" enable-method
  soc: qcom: spm: Add CPU data for MSM8909
  dt-bindings: soc: qcom: spm: Add MSM8909 CPU compatible
  soc: qcom: rpmpd: Add compatible for MSM8909
  dt-bindings: power: qcom-rpmpd: Add MSM8909 power domains
  soc: qcom: smd-rpm: Add compatible for MSM8909
  dt-bindings: soc: qcom: smd-rpm: Add MSM8909
  soc: qcom: icc-bwmon: Remove unnecessary print function dev_err()
  soc: qcom: socinfo: Fix the id of SA8540P SoC
  soc: qcom: Make QCOM_RPMPD depend on PM

Link: https://lore.kernel.org/r/20220720230648.2113609-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-21 15:00:19 +02:00
Arnd Bergmann f740949d41 soc: a64fx-diag: disable modular build
The NMI infrastructure cannot currently be used in loadable modules:

ERROR: modpost: "free_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!
ERROR: modpost: "request_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!
ERROR: modpost: "enable_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!

Disable this for now to make allmodconfig build again. We may revisit
this and export those symbols instead in the future.

Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-20 17:58:18 +02:00
Stephan Gerhold fddb663de9 soc: qcom: spm: Add CPU data for MSM8909
Given the lack of public documentation for the SPM, the configuration
data is taken without modification from Qualcomm's msm-3.10 release [1].
It is pretty much identical to the one for MSM8916, except that 0x3B is
missing in the sequence for standalone power collapse for some reason.

[1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blob/LA.BR.1.2.3-00910-8x09.0/arch/arm/boot/dts/qcom/msm8909-pm8909-pm.dtsi

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705143523.3390944-7-stephan.gerhold@kernkonzept.com
2022-07-18 18:05:07 -05:00
Stephan Gerhold 488f1d96c3 soc: qcom: rpmpd: Add compatible for MSM8909
MSM8909 has the same power domains as MSM8916, so just define another
compatible for the existing definition.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705143523.3390944-5-stephan.gerhold@kernkonzept.com
2022-07-18 18:05:07 -05:00
Stephan Gerhold 73579f2a99 soc: qcom: smd-rpm: Add compatible for MSM8909
Add the new "qcom,rpm-msm8909" compatible to the driver so the interface
to the Resource Power Manager (RPM) is initialized correctly on MSM8909.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705143523.3390944-3-stephan.gerhold@kernkonzept.com
2022-07-18 18:05:07 -05:00
Yang Li 947bb0d165 soc: qcom: icc-bwmon: Remove unnecessary print function dev_err()
Eliminate the follow coccicheck warning:
./drivers/soc/qcom/icc-bwmon.c:349:2-9: line 349 is redundant because platform_get_irq() already prints an error

Fixes: b9c2ae6cac ("soc: qcom: icc-bwmon: Add bandwidth monitoring driver")
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220714075532.104665-1-yang.lee@linux.alibaba.com
2022-07-18 16:34:11 -05:00
Hitomi Hasegawa 64f89dfaa4
soc: fujitsu: Add A64FX diagnostic interrupt driver
Register the NMI/IRQ corresponding to the A64FX's device definition
dedicated to diagnostic interrupts, so that when this interrupt is
sent using the BMC, it causes a panic. This can be used to obtain
a kernel dump.

Signed-off-by: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
Link: https://lore.kernel.org/r/20220520074119.3574753-2-hasegawa-hitomi@fujitsu.com'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-18 13:37:08 +02:00
Parikshit Pareek 5bed21af00 soc: qcom: socinfo: Fix the id of SA8540P SoC
Change the id of SA8540P to its correct value, i.e., 461.
Also, map the id 460 to its correct values, i.e. SA8295P.

Fixes: 76ee15ae1b ("soc: qcom: socinfo: Add some more PMICs and SoCs")
Signed-off-by: Parikshit Pareek <quic_ppareek@quicinc.com>
Reviewed-by: Eric Chanudet <echanude@redhat.com>
Tested-by: Eric Chanudet <echanude@redhat.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220711083957.12091-1-quic_ppareek@quicinc.com
2022-07-16 10:09:08 -05:00
Konrad Dybcio a6232f2aa9 soc: qcom: Make QCOM_RPMPD depend on PM
QCOM_RPMPD requires PM_GENERIC_DOMAINS/_OF, which in turns requires
CONFIG_PM. I forgot about the latter in my earlier patch (it's still
in -next as of the time of committing, hence no Fixes: tag). Fix it.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220707212158.32684-1-konrad.dybcio@somainline.org
2022-07-16 10:08:56 -05:00
Arnd Bergmann 3c37074f0d Qualcomm driver updates for v5.20
This introduces a new driver that requests interconnect bandwidth based
 on throughput measurements of the bwmon hardware blocks found associated
 with, among other things, the CPU subsystem on many Qualcomm platforms.
 
 It introduces support for the SCM wrapper driver to vote for
 interconnect bandwidth for operations that needs bandwidth to the crypto
 engine. This ensures both performance and guards against issues caused
 by lacking votes for this path.
 
 The socinfo driver gains knowledge about the SC7180P SoC.
 
 It contains a range of fixes for spelling mistakes, refcount leaks in
 various drivers and removes some redundant code from the apr remove
 path.
 
 The SCM DT bindings are updated to declare support for QCS404, SM6125
 and SDX65.
 
 The command db driver has a strncpy() converted to strscpy_pad() and
 then back again with proper documentation to why this was the right API.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmLLop4bHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3F3TMP/ieGyulFlvASz8TxfZyL
 E0nJi29vPdGNfrQTe4Uijtn5v1eQzlunNfWfw2f3+hI2rhs94Y4TuFdHBNU7rTVo
 Ui0aFRRmlq3FZlc0KwUhyAP8tvI59Tna+w/8UgIqcKQpSiLNrYRQfyBGhUfMTI97
 SzwSklRNNTFhIa31n6F4+K9uWwlRBgavoVHaNZw4iJaoC5VKXwcROMLOzgZFh7BB
 dJgdKxnOhKNGAPq6w+WSxbvzF2bdX0GvwcaFJDvXtquEVk7sxEWmEwxhcFpuu1BJ
 WtOyb+GCrxntk3n7tq333ZPVCZBlwePXXP+Bn5Z+P5stbiSFDso4irZzGEScmlyi
 HRhN2h7Mqh/7KkXbkEYwISqL/T+EXuQThFV8l5hodCF2v2bPRIeRoz3a5Z1mZb7H
 M4eoldB0Ow4dcBaJppJ9Ux+xMEqZ7hrXvQmpQdtHi3ty3QceKwjA0byJK2nmwttt
 GmibYaFsm4cynsCIYqclxnSm55rrq+doKE6G5gn6gG8Qijg+TDOAVLKDS6heenH3
 9WCSeYUR4Wnyn6EUTEEfJamErhsVwKJYhLNfzfpst3+6RAoRM+C/js+S0fFqVImC
 1lWRe64nCoGp1QR+h/f8SltnPUfjvCuU5i2pjO+vErq8zo21vcFGuvReps6fDZxh
 /NIw/dMRJMuZEmIv7KBZ6c6q
 =AHeW
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLN4SUACgkQmmx57+YA
 GNnCRA//bthrnU+D0KiuNogJASZZWs1y+PsMHbu27JNZMCaR14+sBKiNGhkfivKt
 6lqZIBSn49OCfL/SGg0E7TTZ/aMkbj+HU6aPxf6417gu1LhICOTZX81ffijwHlZu
 POzvwcTWRMbIlYA/JD68y81uL2jWUpiqLXtPrzzjiEK87MR9OLEjJ/YIXciyOqaX
 ao+/TW0dqHYibxWJQWb98HfuUCL0ZC9tkX3iYBu0yM2y9XJ5dVRfG6Rs++H6X83S
 MIMqKbygFZ9PawzdHuPJDOv5su7PH5Sh6pUGXsxWXtAmVQESBeoRqO0KsAns8Tmi
 +38olZGOuELDo4nllrPrh2fWxQKmrVolXRmwv4sq/yqgsrkXutcJdUVb2XxeiJwt
 mKLDaYr1vN+YuR7XK2B2a68hFFW6a804c3cttXvp5Z4KcNNQmSiT71sILX8vqSmO
 +d5URU7oSbv6c6CqTTP7aAF+sfcZiHHrRoI3IJBzUmtczNp7Eq/7cT8OZMs5eMk7
 yFIIdmr4fL4MvMmYMoibL7dCOpFfVoqlveAukG9utDpziXyMzNDZ89PMmjpdU2nR
 nLrwLe6NaB8h4B6GKO3HZqdiXHkP069+pKy1hOyPavp6g8qVo2JZxwQku4r0onAU
 jy+KhfRGb7W7mnC/hI5UtOQwGVx9S2RkUHEyaL3QNEjAXpDOeQw=
 =0Kp7
 -----END PGP SIGNATURE-----

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

Qualcomm driver updates for v5.20

This introduces a new driver that requests interconnect bandwidth based
on throughput measurements of the bwmon hardware blocks found associated
with, among other things, the CPU subsystem on many Qualcomm platforms.

It introduces support for the SCM wrapper driver to vote for
interconnect bandwidth for operations that needs bandwidth to the crypto
engine. This ensures both performance and guards against issues caused
by lacking votes for this path.

The socinfo driver gains knowledge about the SC7180P SoC.

It contains a range of fixes for spelling mistakes, refcount leaks in
various drivers and removes some redundant code from the apr remove
path.

The SCM DT bindings are updated to declare support for QCS404, SM6125
and SDX65.

The command db driver has a strncpy() converted to strscpy_pad() and
then back again with proper documentation to why this was the right API.

* tag 'qcom-drivers-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: icc-bwmon: Add bandwidth monitoring driver
  dt-bindings: interconnect: qcom,msm8998-cpu-bwmon: add BWMON device
  soc/qcom: Make QCOM_RPMPD select PM_GENERIC_DOMAINS/_OF
  soc: qcom: aoss: Fix refcount leak in qmp_cooling_devices_register
  soc: qcom: llcc: Fix syntax errors in comments
  soc: qcom: ocmem: Fix refcount leak in of_get_ocmem
  dt-bindings: soc: qcom,wcnss: remove unneeded ref for names
  firmware: qcom_scm: Add bw voting support to the SCM interface
  dt-bindings: firmware: qcom-scm: Add interconnects property
  soc: qcom: cmd-db: replace strscpy_pad() with strncpy()
  dt-bindings: firmware: scm: Add compatible for SDX65
  dt-bindings: arm: qcom: switch maintainer to Bjorn
  soc: qcom: rpmhpd: fix typos in comment
  soc: qcom: correct kerneldoc
  soc: qcom: cmd-db: replace strncpy() with strscpy_pad()
  firmware: qcom_scm-legacy: correct kerneldoc
  dt-bindings: firmware: document Qualcomm QCS404 and SM6125 SCM
  soc: qcom: apr: Drop redundant check in .remove()
  firmware: qcom_scm: drop unexpected word "the"
  soc: qcom: socinfo: Add an ID for sc7180P

Link: https://lore.kernel.org/r/20220712021830.1271398-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 23:01:25 +02:00
Arnd Bergmann 9bc697091a This pull request contains Broadcom SoC drivers updatse for 5.20, please
pull the following:
 
 - Julia fixes a typo in the Broadcom STB legacy power management code
 
 - Liang fixes a device_node reference count leak in the Broadcom STB BIU
   driver code error path(s)
 
 - Nicolas and Stefan provide updates to the BCM2835 power management
   driver allowing its use on BCM2711 (Raspberry Pi 4) and to enable the
   use of the V3D GPU driver on such platforms. This is a merge of an
   immutable branch from Lee Jones' MFD tree
 
 - William removes the use of CONFIG_ARCH_BCM_63XX which is removed and
   replaces the dependencies with CONFIG_ARCH_BCMBCA which is how all of
   the DSL/PON SoCs from Broadcom are now supported in the upstream
   kernel.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmLMTtEACgkQh9CWnEQH
 BwSmNw/+KC2qMPJ7e1favA8joQ+YCOWht3URTLDNrWpFrkAWLqjEkeYfSJQ3fBns
 vhDs42nt3318GZKa0YRFkttHEG4ZB5eV4pcf1GGV2/BtnUjr3tgD8iEIDLYeq8Z1
 Y1F5WVXrCx3ta+xADVy1MMIM82ycWjKsrF7f8iADdP/hJtrlpnEdhOIzqz8Az5g+
 ezFrs66/P0X+tc/a41mZ1BHIXa/4nnibo+A+hT/gtDK0g4uv/94XaQVaAn3VvELx
 m/RgkQsrKed3xGnniz9N+LX9oQ/IHQzz6HxZD3TokKlTS1rjHr0YMb++jo0430na
 NQ45Y9U0gl3gwalN+85YTabA0VWkVdkzn0YGydmcrJqphm3s78M+/FiMddaVQtMv
 D4ndLVqr6LXTKtsZIk97shuuxMHMaix5mA2hOOWFO0TjQFzsKOi/k2uZ0mo9hBPC
 FMsetOjmoeA1e01ztuW/3T2yQH1CQkHow/lp1xoidvLzgALraK3wAdhMX0lIR5Fg
 bxPNkrj1mTHPcBO7C7DKbvXt7bybZcn624/55FrTaYu5p0BdaazshMUHKBUb1l5K
 lhB4znh9dKQwc94VGdHzNISEjZSpjRbdnqBr/1qzpwR6SGR9jMFS1wTcjK2iAyMz
 iUR+O3vEeyOfRz2rSkgGSYIqkxdCX4Q6jyk4wz56gYP8FfIqmQ8=
 =O/9g
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLN4J0ACgkQmmx57+YA
 GNnFBQ/8CMZHB963Azx+ybxj95ClLjtKKio7IjQRr4YoawXHYdNipLumrBS3V7BZ
 qu432X9gGHC5QP4U46d4zHUvWeLqPwsns6WnTa8wwbY2kAccnoCtOaVyWM8O2YyS
 n7Zwq6wSEul6GT7ig+eEsZ5NFhC3+i1C/mqCZfcEGWrIfzse5UwKVmcG/dmnavIP
 NtmaWMWr2PUvF3VJpgn71JpWJegkyANjDi7JJC/71h5MzjNrpGsE3XG5QyLpQfRZ
 +lAxT+2zJNbk+eSnISg1bpaeL/S9F8vrmzpgMEcCcydcpgQQ7I/M9nx+mNAbpRwn
 c7DuoXYB9VNX6bsI0pUjavhMc3qAIPtgYknGe/WhAmS6D4y/IfTJ7L91irULH/gC
 ZDH2aDTblhtefiSgd8X9RJyRTZb0CtTUoSR2ST0SfpMI8xJaaswXBS7nYfLib08v
 pSLAU6qalUpJpJ+ADeSEIbfUjuGR6GR1iT1R4dpdp3NfhR8u6bPdkphxzwdzctBL
 bZ+ZcFMlAfSp07FzII+2Ce5fuT5qM7rdqKurL5WFmJOYIHfqGDTESWp5vvViAHPJ
 2c+ONWnPvMXoKxC6d90E8AhOhvOeE1frfu5NWJtzU7OY98rI1J5nFEF9hmVQWZ3p
 hfEzP+wiBuN2mHRDNtgmmJFFhbzPdXlY5QafR2XDm1kpfuFh/cY=
 =yTZT
 -----END PGP SIGNATURE-----

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

This pull request contains Broadcom SoC drivers updatse for 5.20, please
pull the following:

- Julia fixes a typo in the Broadcom STB legacy power management code

- Liang fixes a device_node reference count leak in the Broadcom STB BIU
  driver code error path(s)

- Nicolas and Stefan provide updates to the BCM2835 power management
  driver allowing its use on BCM2711 (Raspberry Pi 4) and to enable the
  use of the V3D GPU driver on such platforms. This is a merge of an
  immutable branch from Lee Jones' MFD tree

- William removes the use of CONFIG_ARCH_BCM_63XX which is removed and
  replaces the dependencies with CONFIG_ARCH_BCMBCA which is how all of
  the DSL/PON SoCs from Broadcom are now supported in the upstream
  kernel.

* tag 'arm-soc/for-5.20/drivers' of https://github.com/Broadcom/stblinux:
  tty: serial: bcm63xx: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  spi: bcm63xx-hsspi: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  clk: bcm: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  hwrng: bcm2835: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  phy: brcm-sata: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  i2c: brcmstb: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  ata: ahci_brcm: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA
  soc: bcm: bcm2835-power: Bypass power_on/off() calls
  soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB
  soc: bcm: bcm2835-power: Resolve ASB register macros
  soc: bcm: bcm2835-power: Refactor ASB control
  mfd: bcm2835-pm: Add support for BCM2711
  mfd: bcm2835-pm: Use 'reg-names' to get resources
  soc: bcm: brcmstb: biuctrl: Add missing of_node_put()
  soc: bcm: brcmstb: pm: pm-arm: fix typo in comment

Link: https://lore.kernel.org/r/20220711164451.3542127-6-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 22:59:09 +02:00
Arnd Bergmann 03e316033c i.MX drivers change for 5.20:
- Update imx8m-blk-ctrl driver to print the name of the power domain,
   so that the error message becomes more useful.
 - Update the error messages in gpcv2 driver by printing the reason why
   a regulator fails to be enabled or disabled.
 - A series from Michael Walle to convert the guts driver from a platform
   driver to an core_initcall for getting rid of all those global static
   variables.
 - A couple of follow-up fixes on guts driver series.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmLJJY8UHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM54iAgAjX40h6w2DOOyVZhM6VGBHmQIzfok
 MiVRjPVLsEf55brvG6IwY4KnWWCOb9bcET7JxBhYsreUsLAC8255B//mLoiLZM4x
 XfCFIaQ9XxnCyfzrJuXr1K0TuwlxVYAbVghcxYFpgCSpM9GwChhQstu1dgfQE3o3
 p8OXlVol3bu0NN5JkbKd2t7e9P2EoCBIb9N2JIjnlxs81W63hoKEhRkhPd2CKBIN
 gKEHrMf3CFFuLpSvwKKsNzwBj2y6LML413k9l7Wp5L/MEX0+Y0G/fuQ3i2fbzoDQ
 OF2SQfngaeSRy8kbp1iZ+GCqfGGoBjwinZ7v2tYElH0pheR074mxIjKntQ==
 =vt6q
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLN3+wACgkQmmx57+YA
 GNmCcw/7BDTCkJw4IzzVEMDj29zqCIaCPB3b3heTfU+RaElkuz8EfasoKbC7TX5X
 XsEi4bULlVza0cKcr+tOur6xtcZSZltjp/DenolNTrQ/qQZSjD0Mh5ypxzsxqjqS
 EvpF7iZcnCpDFIKSji4XWreqmUIsHHFFLDw0zQBkmz5BbQXB7U9HlAP85cuGBq+L
 i1R21OX7ZQqG7Ik6JT+fD/XMmkRCiPlZP/aHoQilZYXy9j0wcuLUaeg4LIEcEj8Z
 fIK/mvNkk2skncPg9ZHdKUxoKLZ0OMl10WBLAsFsYrHFjOzGKB506nvev22FRG0E
 y0AnBbk1iBrwmkoR9zdAzED7AqBAKBdJQW9YXA5UTDgCQpAICsnAGiSWoM8ZFQDS
 biMqlRUcimZHUfmLOWplVYGeeHzTszYapLwjNEWg+/iV5cGC4KrtavYHccw0PNLJ
 896ctvJucK9iZ5GwJRG7oZhmdTTppbKZkFsOq9TIoAowJRICNs/3c8CfQDE+2Rkb
 BN7GJ833zjZiJkppye79pRxoLZNRlds68/zutaAGqIlVs7G1inN+L8FN5Dmc4Xhu
 4Bw59kF+v7I4mqz6gNCmKpDwohKiNWx5J8KDaVe/N/AS6nesKZnWuWBUuVIXY8Dp
 uFwCEztXwDLDHJNj/YJezCQOkMHOO1QWeI95Q1k+j8tpwRNSZd8=
 =FQvj
 -----END PGP SIGNATURE-----

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

i.MX drivers change for 5.20:

- Update imx8m-blk-ctrl driver to print the name of the power domain,
  so that the error message becomes more useful.
- Update the error messages in gpcv2 driver by printing the reason why
  a regulator fails to be enabled or disabled.
- A series from Michael Walle to convert the guts driver from a platform
  driver to an core_initcall for getting rid of all those global static
  variables.
- A couple of follow-up fixes on guts driver series.

* tag 'imx-drivers-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  soc: fsl: guts: check return value after calling of_iomap() in fsl_guts_get_soc_uid()
  soc: fsl: guts: fix return value check in fsl_guts_init()
  soc: imx: imx8m-blk-ctrl: Make error prints useful
  soc: fsl: guts: add serial_number support
  soc: fsl: guts: drop platform driver
  soc: fsl: guts: use of_root instead of own reference
  soc: fsl: guts: allocate soc_dev_attr on the heap
  soc: fsl: guts: embed fsl_guts_get_svr() in probe()
  soc: fsl: guts: remove module_exit() and fsl_guts_remove()
  soc: fsl: guts: machine variable might be unset
  soc: imx: gpcv2: print errno for regulator errors

Link: https://lore.kernel.org/r/20220709082951.15123-1-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 22:56:12 +02:00
Arnd Bergmann 62fcbc5c5d TI Driver updates for v5.20
* pruss: Enable support for AM62, bindings cleanups
 * wkup_m3_ipc: cosmetic cleanup
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmLIszwACgkQ3bWEnRc2
 JJ2NCw/9FP2NbmlUGYeKIBpPwodtyvbu0dFVGcfLycEr5HIugbVtQz7yLUa6HFJa
 siaAaK4ZJXncqkVksEcSnRsoleLJUjVSVUN15a1KqgLOA4eNazeE8Sh6xyhf+nyh
 DSbYWYxh423IQk7pPhO5CAThU/+8piSez/6c2hNPgJ5N1h2eu4H9ZQkz8IPOwthd
 6dLVPfsHLhVoK3E+cQAJxS6vlbZnzfvkC8faEOlo86npWSeVVoHGhuatsPH4ImBt
 90ZhLqu6qjH1WDRDVmb0lrNKSH6uNMEzN9qupikhfPUbM8faYh6IzBjcTAVAFqXP
 UYxTPI84gncLKFBvZcCrmiY061pYfM44YunDjcQ5IlhbQppydIv0adLbELNxlCiG
 pG3comeTRufHNWXYyVomYG1GcMHeB64jBQbj1JbH83KzcfPj4xdJGEj21a5xLWGN
 KjqFSZvviq1hbp1ilpB0PdZYBXn7TaTSEoNswWRznnRo/3G1Snlw18s3z17TAB7V
 TeRMNMUHRkQs3rZToAzZWHZDpAn2lDmECQyd/I85enPq8SdKn8/dtazrgUHOnCVP
 tICxL9zBKeuzxaPWivNnlorgHu2JT4Ic+j3YF660auTtvjNP44UYaVAaza1AOTJ0
 /gtmwyzFc2Y33O0oeO3c6JhrB54JZnCYdTJa6HkWK/WETD2Ah8M=
 =xWMZ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLN36oACgkQmmx57+YA
 GNm25w/+O3guYKzYmLKnUnXa3h8byIN4zMteK7HyaX7gvkoTRj3KZWkAnbmnAuXs
 Jpf6abryCwgO+BGpIBUKH7rGQ5rb1iAVOt7lcomSSM/AY8iiwSPiPoGr/9H29RGs
 o7t5x5Fz3I4y89QrQPZfFqK0DAcAf0mH2raP+wTPoKB+FhXCsXylrVoKFvhhzD+i
 aQVpsKHBiDs414+OeOo0OsHa0j2LAgM+Am/I424DgVQJWJDqvC0knAz3Kq/mZ7DR
 sF7Ebr8cC1a9TK/pMHWe7M6BdUYspywGe11+eiCaByKk+6l60DVpYN/loF5TPfKn
 6PfLYuOXHwgg9AZ4I/pU6z47xwyOZ9RtYyBBbRzHMbQ8nmU4zeGmwDzrpqtEKKc0
 G5H4iP+VN4i/FnbVMJuWcX51EQkvXPbYUWEMBmh6kkJ1Wps6JRlwIqtU0OlDNLWC
 48jyxH+2KTzDTzbDJ64PKrBp5/dMBdOWPM9crQFj17QjqEf3S8QtHuC1m8jgHFh1
 NGTDUJc5AOs6wd8PlES345ZNvi9FYkqSECLkBXPSLiPpkpzpGw80DlHgUVDjFd71
 kptZotYAHqVR6ZIW+EwTuQ/rEXbN6aCUSYJTsA36xAPGfgFs6mSubQIjSHAiDvVr
 RLJ3mFnN9kIJ794v4DufslLJh9BL8ijicB21/t4tO7m3/wr5p0I=
 =n8Bj
 -----END PGP SIGNATURE-----

Merge tag 'ti-driver-soc-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/drivers

TI Driver updates for v5.20

* pruss: Enable support for AM62, bindings cleanups
* wkup_m3_ipc: cosmetic cleanup

* tag 'ti-driver-soc-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: pruss: Enable support for PRUSS-M subsystem on K3 AM62x SoCs
  dt-bindings: soc: ti: pruss: Update bindings for K3 AM62x SoCs
  dt-bindings: soc: ti: pruss: Re-arrange "compatible" in alphabetic order
  soc: ti: wkup_m3_ipc: Remove unneeded semicolon

Link: https://lore.kernel.org/r/20220708232655.reqjdbib52ejdja4@unadvised
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 22:55:06 +02:00
Arnd Bergmann ff6c226953 pmic wrapper:
- code style improvements
 
 devapc:
 - add support for MT8186
 
 Smart Voltage Scaling (SVS)
 - add support for MT8183 and MT8192
 
 MMSYS:
 - Add more display paths for MT8365
 
 Mutex:
 - Add common interface for MOD and SOF table
 - Add support for MDP on MT8183
 - Move binding to soc folder
 - Add support to use CMDQ to enable the mutex, needed by MDP3
 
 Power domains:
 - Add support for MT6795
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmLIYUUXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH5PJQ/9Ffxj2hvBIijbiomaah+854GZ
 Z6pJjozFRFLfsJW1EcVXVCGWGXm2b1Zj6SY0ReAw+SG0wb983N+ldym0onBjMozd
 Pzo5oImxgZzQVXIW9xreFDf0HsSI9i8IJJaABckW/ZjGPv15z1DRWhw99jeH3C/7
 /eogSqMZrKjxWO5AnGL+3VJxSadFr8sXkxSy0bCr4C0y13hKmp8d9udn5zlnjR/K
 Ubavm0oruCuOPilWgkJi2rwql85cQN+3/21dQTdr6klQK76yfeJgwEGKlqXShrzP
 Heuzn6STHhMaLcXm4I/65jwXIiBmyiLL9jdLtlfHvR4d+2o9oUd0fD+sqcjn6LF2
 K04vmKQ10cSFdXJq+YOzx/h+UThCrb8w0SSyHv83xNMNrjzLEf5ozfD9vjm+ogBd
 oYjrt/y6C61wQcRS/yqnb9AeNLxHdiOFcAmL8c4uwJwdH01OKOWxFfHGX+bGRt0M
 qvmvG9ctdZmQbo1sQmnIdU4za+rEzjMktCjuFY2bdy9CvgKYEUWir1/OGPkrnPQa
 7A+0Pd2QbpDFSLK6kD4Mut8QXckMq9mitMMKFWO4xHstAN0FYvvSIoUPwSTksIaa
 QMNPhKI3wIXFtWnHKyHTLY7IyIUNo34RrOsH5vLFnX63mjrwop+XAwDoa9mwIdN7
 7vZ0XlkI0Xkjkm8V0dI=
 =VZvg
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLNcKsACgkQmmx57+YA
 GNmT6A/7BZy2sgLVuM8Z3rdvpWkuIw1LcvKs+66iAVEeZNrEOh5SWSuY1RffTMiL
 8cGbenKJlmIalBQkUUVVp3dNsGIU89sExdnYSTfKNuKaZpQw1dbY+5s7w6Y72C2h
 /tJ+10LnG2fUJunvdEluENBNqapy+nACazJu1sfXkTp7wD+WQO+bYv0nZrk9sAoo
 YjBU42SpJUX3y7nX/ljnqIqBbyHHIeF7JUByUa5wUlMfA3DnOqlA02DkOGxDUqn+
 F2e7Xozaj5P4pbxddTWX91CWfRcA77ho3R4jre2u8XZMzrClDnajQCtP+PwMssre
 WdWGUo6ENiy85ZohXIl5kBzXy8CoIgjsn6M09lqaEfQh+VVjHK54Ti3KX6ziGLeI
 Gfh12l2zcCtNa40L1oypsISdCDc3SSY79MXiEu8Ux1TJ7O9cmsMyjyKDCwhWixlL
 DFAe1bXMIcwjjC+eOEyBHaAmWOb1xLIn4bsp/A7XzmalSzgYyiU0G8hzx73VS3Q5
 MslcSVwPlHoR6G+RuFjwWJ6fcS/765E3mRN8lbaYUgO5vaJT9faFmgkH7ubOCk8g
 oBV/57f4nd8+ifDqPgDwv6DJNWq8jNBtyEQ+oHSc4lj7UE+jZMor7XPKnArdtL3Q
 /qMqQhTA6rCsXUij6ayKBg3IGia7M13ffP30WerMc8TOixUjQvY=
 =KbI7
 -----END PGP SIGNATURE-----

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

pmic wrapper:
- code style improvements

devapc:
- add support for MT8186

Smart Voltage Scaling (SVS)
- add support for MT8183 and MT8192

MMSYS:
- Add more display paths for MT8365

Mutex:
- Add common interface for MOD and SOF table
- Add support for MDP on MT8183
- Move binding to soc folder
- Add support to use CMDQ to enable the mutex, needed by MDP3

Power domains:
- Add support for MT6795

* tag 'v5.19-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (29 commits)
  soc: mediatek: mutex: Simplify with devm_platform_get_and_ioremap_resource()
  soc: mediatek: pm-domains: Add support for Helio X10 MT6795
  dt-bindings: power: Add MediaTek Helio X10 MT6795 power domains
  soc: mediatek: SVS: Use DEFINE_SIMPLE_DEV_PM_OPS for svs_pm_ops
  soc: mediatek: mtk-pm-domains: Allow probing vreg supply on two MFGs
  soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume()
  soc: mediatek: mutex: Use DDP_COMPONENT_DITHER0 mod index for MT8365
  soc: mediatek: mutex: add functions that operate registers by CMDQ
  dt-bindings: soc: mediatek: add gce-client-reg for MUTEX
  dt-bindings: soc: mediatek: move out common module from display folder
  soc: mediatek: mutex: add 8183 MUTEX MOD settings for MDP
  soc: mediatek: mutex: add common interface for modules setting
  soc: mediatek: pm-domains: Add support always on flag
  soc: mediatek: mt8365-mmsys: add DPI/HDMI display path
  soc: mediatek: mutex: add MT8365 support
  soc: mediatek: SVS: add mt8192 SVS GPU driver
  dt-bindings: soc: mediatek: add mt8192 svs dt-bindings
  soc: mediatek: SVS: add debug commands
  soc: mediatek: SVS: add monitor mode
  soc: mediatek: SVS: introduce MTK SVS engine
  ...

Link: https://lore.kernel.org/r/b733bd82-6d99-23ef-0541-98e98eb8d3bc@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 15:01:31 +02:00
Arnd Bergmann 611f6810aa - build mbus driver only for ARM/ARM64
-----BEGIN PGP SIGNATURE-----
 
 iHQEABYIAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCYsheqwAKCRB0Ba7+DO8k
 k7xXAPUaMzZC7hw5aig/vfEbE9Q8NFijF6RNNr0U/S/v/+SyAP9DCz+VFenf4PlS
 7jYPclrQe96RVe6hiPiQUJ+IWbxdBg==
 =qzHn
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLNcG0ACgkQmmx57+YA
 GNkGLQ/+MkLSKGKeemsL/Q7B+cGcQT87J08qHbVsI2le7JiO3G6uhdKssxbta0np
 Y3vW8YFhYYxPLS7o2XqghBKWMTr6dbmlwEKWechq73Zi5mHmb846lDUZ3CHMVbQN
 r65n2FghXdRM1dNrpqVGv5jHBSJnCaZwrNYfXXfEw5ETLTXMMtdBqsxLj1JHYGWJ
 HijfV5cR+iuW5LykmSsUSD3oj0JrxndGIrjh6qZ3fpSNdanGV1Z26vHfIfL/UMOu
 6m0SVLrlmQmNfdHOZEcz4/aaN3I5aVxOGXruw0jKVCCEQZzkIYHtI2D+2RbJDGMz
 9nkQOsH98AMgp46EPfBYZ19XofcFvomJvtq02jEEHyV8HrXZVSMt1jK77vvxjFJV
 XVpZr5UpnSVQx3ritRIG2yVYj2QGJGl1bJ+O2ypazz/shH/Fc2PbGKlsteboRNi4
 T3dSIrTy9B+tAonkXMwQ1l6Uc+4yQWgzOvIr5MK4WPJWq8TlRPr7i5ABZdT5krFM
 OqYwv1YCVZuNOjEU67/HWt+ICnU1OPZS8mLZUUMfb6nF3PuxH1F7GMhItaBfz75E
 cCa4+CglrGSedXnLAjw3ZrZ4BGhW+Hr8CbGmnNQNtdzUCzJasetUTyW6Z3aOTAIR
 Os9rKkUY3LmUMg7/9ogZaTMPp7w3BbNvUA0oBhppIZPangLHws0=
 =rne0
 -----END PGP SIGNATURE-----

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

- build mbus driver only for ARM/ARM64

* tag 'sunxi-drivers-for-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  soc: sunxi: mbus: Only build the driver on ARM/ARM64

Link: https://lore.kernel.org/r/YshfPux1c2x9S7Fi@kista.localdomain
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 15:00:29 +02:00
AngeloGioacchino Del Regno 4d3ddc9bce soc: mediatek: mutex: Simplify with devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

While at it, also remove a redundant call to of_address_to_resource(),
as this was getting the address of the same resource index 0: we can
as well get the iostart from the 'regs' pointer.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220623121701.107512-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-08 10:29:17 +02:00
AngeloGioacchino Del Regno 2b5764fb7b soc: mediatek: pm-domains: Add support for Helio X10 MT6795
Add pm-domains (mtcmos) data for MediaTek Helio X10 MT6795 SoC.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220503141441.125852-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-08 10:26:30 +02:00
Arnd Bergmann 8fcdf10295 arm64: ZynqMP SoC changes for v5.20
- Register SGI separately out of EEMI
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCYsbo6QAKCRDKSWXLKUoM
 IRL/AJ9mGQtMNdf1hmlf6M+9IMGWcIFJ+gCeKzBZ5LTEDLszQDxqHyHrtxDQ0Uw=
 =SSyQ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLH2J0ACgkQmmx57+YA
 GNkNcg//VEbdBHgjNmTriDMWV1+g8dz4l0wrlUHBgza0ZEKZJ4DuM61r7WT5+M/3
 u+ahD4ZV2EdUk95OhHFRPI2bjKZBvHLJSdWColjD/Xd8Vd4PqmYkviv/080hB5tF
 lcM86m3G0IFWoeBExn7kdvc7q9uLEl7jn4UhqiukTqOeVquv54w/MG5df4k70oKX
 60KUY+eScYenj2cGKnb+/D1XMWde1bhAoADss3UtlxdS6PTc8zdHsoi6L/0BslPg
 5zOAH0Bat/Y+9Z92jHatw1LBpwh4pB8MRzD6E+m4t/hA7YvhF7MfWXEEKBRJ1XcI
 ekHzKqDO1+GBEfiZ1/+ZpgB4rGcTFqdtOYJPp5GiJbt/ju281fm7gq5WSP107kLN
 l6TR8WLC+PjJaR60oqWH9uooUWaMWP84WPwPGIWYt5En13KFDkQNlZnS2EKDMzlR
 c3O3v2FXkSrPb7XV7sg///dSuS4G2Qkt6LD5ZnU+qRE4mlOYhHdCZvC5e8bX4iFV
 vDTe8cUbmTmfdRI2kZrHeWKwRuMNLk9WM7w5OtL5NdD9155ZSUMs6VEtoWyDbFHT
 BEMMOm5YfufYG/h3ZvT3ylTeCO9BQ1T8biuKwmdvshy5t9OiJ5rthgtLIYwzWfZx
 M5XdESDnwCJVdnSpwvhSsDJ1HgU9tndVIHyubFPLg4sxb3U3TBw=
 =CF+P
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-soc-for-v5.20' of https://github.com/Xilinx/linux-xlnx into arm/soc

arm64: ZynqMP SoC changes for v5.20

- Register SGI separately out of EEMI

* tag 'zynqmp-soc-for-v5.20' of https://github.com/Xilinx/linux-xlnx:
  firmware: xilinx: Add TF_A_PM_REGISTER_SGI SMC call

Link: https://lore.kernel.org/r/0196d1f3-e9c7-ef51-143d-e98b14980f63@monstr.eu
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-08 09:11:25 +02:00
Viresh Kumar 25a18559b8 soc/tegra: Migrate to dev_pm_opp_set_config()
The OPP core now provides a unified API for setting all configuration
types, i.e. dev_pm_opp_set_config().

Lets start using it.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-07-08 11:27:33 +05:30
Viresh Kumar a6db3b9232 soc/tegra: Add comment over devm_pm_opp_set_clkname()
Explain why special handling was required here, it isn't obvious at all.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-07-08 11:27:33 +05:30
Viresh Kumar 87686cc845 OPP: Make dev_pm_opp_set_regulators() accept NULL terminated list
Make dev_pm_opp_set_regulators() accept a NULL terminated list of names
instead of making the callers keep the two parameters in sync, which
creates an opportunity for bugs to get in.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Steven Price <steven.price@arm.com> # panfrost
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-07-08 11:26:44 +05:30
Nathan Chancellor c749d676a3 soc: mediatek: SVS: Use DEFINE_SIMPLE_DEV_PM_OPS for svs_pm_ops
When building this driver for an architecture that does not support
CONFIG_PM_SLEEP, such as hexagon, the following warnings occur:

  drivers/soc/mediatek/mtk-svs.c:1481:12: error: unused function 'svs_suspend' [-Werror,-Wunused-function]
  static int svs_suspend(struct device *dev)
             ^
  drivers/soc/mediatek/mtk-svs.c:1515:12: error: unused function 'svs_resume' [-Werror,-Wunused-function]
  static int svs_resume(struct device *dev)
             ^
  2 errors generated.

This happens because SIMPLE_DEV_PM_OPS uses SET_SYSTEM_SLEEP_PM_OPS,
which evaluates to nothing when CONFIG_PM_SLEEP is not set, leaving the
functions unused in the eyes of the compiler.

This problem was rectified in commit 1a3c7bb088 ("PM: core: Add new
*_PM_OPS macros, deprecate old ones") with new macros. Use
DEFINE_SIMPLE_DEV_PM_OPS to fix the warning while not changing
svs_pm_ops when CONFIG_PM_SLEEP is set.

Fixes: 681a02e950 ("soc: mediatek: SVS: introduce MTK SVS engine")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20220622175649.1856337-1-nathan@kernel.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 12:07:23 +02:00
AngeloGioacchino Del Regno 13bde169c6 soc: mediatek: mtk-pm-domains: Allow probing vreg supply on two MFGs
MediaTek SoCs have multiple MFG power-domains, exclusively used for
the GPU which, in turn, requires external power supplies: make sure
to have the MTK_SCPD_DOMAIN_SUPPLY cap on the two topmost MFGs to
allow voting for regulators on/off upon usage of these power domains.

This also ensures that the SRAM is actually powered and that we're
not relying on the bootloader leaving this supply on when performing
the first (and latter) poweron sequence for these domains' sram.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220623123850.110225-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 12:07:23 +02:00
Kishon Vijay Abraham I f16afe238a soc: ti: pruss: Enable support for PRUSS-M subsystem on K3 AM62x SoCs
The K3 AM62x family of SoC has one PRUSS-M instance and it has two
Programmable Real-Time Units (PRU0 and PRU1). This does not support
Industrial Communications Subsystem features like Ethernet.

The existing pruss platform driver has been updated to support this
through a new AM62x specific compatible.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220602120613.2175-4-kishon@ti.com
2022-07-06 19:34:45 -05:00
Krzysztof Kozlowski b9c2ae6cac soc: qcom: icc-bwmon: Add bandwidth monitoring driver
Bandwidth monitoring (BWMON) sits between various subsytems like CPU,
GPU, Last Level caches and memory subsystem.  The BWMON can be
configured to monitor the data throuhput between memory and other
subsytems.  The throughput is measured within specified sampling window
and is used to vote for corresponding interconnect bandwidth.

Current implementation brings support for BWMON v4, used for example on
SDM845 to measure bandwidth between CPU (gladiator_noc) and Last Level
Cache (memnoc).  Usage of this BWMON allows to remove fixed bandwidth
votes from cpufreq (CPU nodes) thus achieve high memory throughput even
with lower CPU frequencies.

The driver was tested on SDM845.

Co-developed-by: Thara Gopinath <thara.gopinath@gmail.com>
Signed-off-by: Thara Gopinath <thara.gopinath@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220704121730.127925-3-krzysztof.kozlowski@linaro.org
2022-07-06 15:57:51 -05:00
Florian Fainelli 681f872a2e Immutable branch between MFD and SoC due for the v5.20 merge window
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmLFdx8ACgkQUa+KL4f8
 d2H8RxAAqTUJPtcFTM3Yy3xBJo4kdVHac/aok5nn+GOQ4yP+UmZgsl6PA35Ly2dL
 fuNmGZonlMxiQ56S0vX1/AxJukTGDPti6bO1uIl2hd+9hk3CQLMEbu4l1FQ0sFW1
 6iUxKKu8VcfYqEVck6Hew2hn7xa/SlpaUcnb3bUj8+w/+0m9ejOQ2MjQD8WdvlFy
 QEDl4CY5MF/tYUCzqFbvMTGhpoCRi6XK0DTV9BIt9kogsYV7gmaIp0E3nr67BaUX
 hR9+yBfzjFqzzrqyMsVu+8kLeMi9rBFSKgiCn6Uvmgkpn6lz8wk2gQurs6bJSGo4
 B94DwaWpYCMBC6pv5VHCRESPSIbLbwiB8ct26TW2FWroVsp26G+ssXRpst2hn272
 ByVjyv3waewFTzCAmvXYrbdgBp7lvBvsnodEfPcaCfGdKOAe28j2qD1iutQUhA8S
 MwabDnhNr1X9zrtKfh0p+xJXQTby88euBnRBZn0r/gFH14mMiJiYHiU8u7+HedLH
 S/WypbJbhlNSXvhVrkaWP1krJfoD1eeuqlERvoADXHqquZQHaL2V2/9P0wwr0wFr
 2x4gROE8jmd+zKkuWNHCHgMl6AUOmoDOmZE7P3SVvh4f9tCcR/KO0uDT9DwW/cQk
 qWGdEcxGIeRyrEIoCOZs6LBEjNKHWg1e+Zau0pSPlJIbtugxjpI=
 =a2u7
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmLFtcYACgkQh9CWnEQH
 BwTaog/+OO0ibxO2+okYcxVM5JQN3eYEc5iMGvNH53kyIe6+vA5S7hq2ceOkhkCs
 n6K0KyblYP9aqk9RXKFT41vXN1A3vdDc1Hbm0G+H8uPRmzkmgUAzoKp5H7cypGLB
 vq0x0QFgYau0HxDgTmr2BEes247SOFKj3t18CMn3WaUgGipbO4xIcL4ghHTPWgYc
 21NYupCBobikzZEGlDSl8N1J/MH8IpmaJyCeFzLySsL+Q2TpbtXsCGp/z4hm2KXn
 LcQONpL3aRKmGw91F2kgV3Hj1gVYLGD1dC62R+KtmFLfUW42+mLl32zQjVfEe5xm
 CdnEL3X4J2yyPxEU33dNCAldV6uq3UGjOdXCjn5pOSF9ZROer8Xuq7TEw7lrZYEP
 XCwyfmbddYtIXNk99IdupQz2QiGi9H8MBYjG4Mqw4xL/dw2wBvalNOWKnJc6kqOD
 dNvtlQEYxN7FOZILJmGF2K2rCNYi1AOmGRAlA1cBk3a0+ylL+T3TVALUlfpQAqN4
 Oro9HXeKBA9L09mNyK3by3ZgmpP8flYwmKbpwtINgIWMPzoirgZx4m5BK6XqVaMB
 LJ7RvxqYjroptAiAV+nZzlFF3a/gLQhu1SByDLP5phySnJIzPSmiP2Z9VzCld3k7
 /O8jMj+qTI7VoTqVLP7b5OjboMEfzTtfoWmt+DEqG+f4RbYYX6Q=
 =nZ56
 -----END PGP SIGNATURE-----

Merge tag 'tags/ib-mfd-soc-bcm-v5.20' into drivers/next

Immutable branch between MFD and SoC due for the v5.20 merge window

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-07-06 09:18:05 -07:00
Samuel Holland db1bfbd60e soc: sunxi: mbus: Only build the driver on ARM/ARM64
This driver exists as a workaround for old devicetrees which are missing
interconnects properties, so it is only useful for those specific
platforms, which all happen to be ARM or ARM64.

This solves the issue that the driver fails to build on RISC-V, where
PHYS_OFFSET is not defined.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220702032520.22129-1-samuel@sholland.org
2022-07-05 22:05:59 +02:00
Konrad Dybcio 7d0221fb59 soc/qcom: Make QCOM_RPMPD select PM_GENERIC_DOMAINS/_OF
The driver uses generic genpd OF APIs and with a very minimal config
where nothing else selects them, this driver will not probe, as
of_genpd_add_provider_onecell will return -EOPNOTSUPP.

Make sure to select these in Kconfig to prevent that.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220701073700.17124-1-konrad.dybcio@somainline.org
2022-07-05 11:16:46 -05:00
Yang Yingliang 63f9815307 soc: fsl: guts: check return value after calling of_iomap() in fsl_guts_get_soc_uid()
of_iomap() may return NULL, so we need check the return value.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-07-05 08:41:55 +08:00
Yang Yingliang edf12b913a soc: fsl: guts: fix return value check in fsl_guts_init()
In case of error, of_iomap() returns NULL pointer not ERR_PTR().
The IS_ERR() test in the return value check should be replaced
with NULL test and return -ENOMEM as error value.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-07-05 08:41:20 +08:00
Bill Wendling 0ec29ccf94 soc: qcom: smem: use correct format characters
When compiling with -Wformat, clang emits the following warnings:

drivers/soc/qcom/smem.c:847:41: warning: format specifies type 'unsigned
short' but the argument has type 'unsigned int' [-Wformat]
                        dev_err(smem->dev, "bad host %hu\n", remote_host);
                                                     ~~~     ^~~~~~~~~~~
                                                     %u
./include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
        dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
                                                               ~~~     ^~~~~~~~~~~
./include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
                _p_func(dev, fmt, ##__VA_ARGS__);                       \
                             ~~~    ^~~~~~~~~~~
drivers/soc/qcom/smem.c:852:47: warning: format specifies type 'unsigned
short' but the argument has type 'unsigned int' [-Wformat]
                        dev_err(smem->dev, "duplicate host %hu\n", remote_host);
                                                           ~~~     ^~~~~~~~~~~
                                                           %u
./include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
        dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
                                                               ~~~     ^~~~~~~~~~~
./include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
                _p_func(dev, fmt, ##__VA_ARGS__);                       \
                             ~~~    ^~~~~~~~~~~

The types of these arguments are unconditionally defined, so this patch
updates the format character to the correct one and change type of
remote_host to "u16" to match with other types.

Signed-off-by: Bill Wendling <morbo@google.com>
Tested-by: Justin Stitt <jstitt007@gmail.com>
Reviewed-by: Justin Stitt <jstitt007@gmail.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/378
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-04 14:26:51 +02:00
Nicolas Saenz Julienne 9e95c67efa soc: bcm: bcm2835-power: Bypass power_on/off() calls
Bypass power_on/power_off() when running on BCM2711 as they are not
needed.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220625113619.15944-12-stefan.wahren@i2se.com
2022-07-04 11:59:55 +01:00
Stefan Wahren a7120238c2 soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB
In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
with the ISP and H264 bits, and V3D is in the same place in the new ASB
as the old one.

Use the fact that 'pm->rpivid_asb' is populated as a hint that we're on
BCM2711.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220625113619.15944-11-stefan.wahren@i2se.com
2022-07-04 11:59:43 +01:00
Stefan Wahren a6a1747a5c soc: bcm: bcm2835-power: Resolve ASB register macros
The macros in order to access the ASB registers have a hard coded base
address. So extending them for other platforms would make them harder
to read. As a solution resolve these macros.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220625113619.15944-10-stefan.wahren@i2se.com
2022-07-04 11:59:32 +01:00
Stefan Wahren c494a447c1 soc: bcm: bcm2835-power: Refactor ASB control
The functions to control the async AXI bridges are almost identical.
So define a general function to handle it and keep the original ones as
wrapper. This should make this driver easier to extend.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220625113619.15944-9-stefan.wahren@i2se.com
2022-07-04 11:59:21 +01:00
Arnd Bergmann aa61fa3e36 Amlogic Drivers changes for v5.20:
- Fix refcount leak in meson-secure-pwrc.c
 - Fix refcount leak in meson_mx_socinfo_init
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmK+qqwACgkQd9zb2sjI
 SdERLRAA0CWCXOmUbHvpLZc/Pjac16sMJ5Cc7Y8Az/tf17UAAekuay6w11ZIdKWW
 XBSY7McC/+hVaJcT2QANo4Axo3Br2T80osGMEv2CdQ6X6m7fP/rAVCaq2T1CeuZS
 Vombc5tgqTdiNh3pT8sFV6dTorGe+mEUxy1p1epKIoHTm2TR9erbrCsV1yG+O83q
 yC+M89dqAtb925uAp6FbQX/e81vnbezBCdyWd3iNaseZ0pmPlOXHrTgtPmAcb2eC
 RxVOJo0Uc0SeEOd6Cq5sD92pNQ53jwJcs4KUzZZC52/Ni7TkDexcwIn7UqazFYe2
 vPPE66CgI0wWveDRPPyOVkh1QJrsk+TPDIBGLX8vxRv2VhEUykFle8tao1Tn4Cpx
 Nd0ApfuB60yEGsZnqbV1SxnJu59BbFETGKOWKcImKEnC/c1sne6DVbzkFfzUKyIr
 dIy48lIku9gQko6vk90iRzFIP0Dd2KhwJhWUbm0necakzNWBD2sB19r9dTmtfJ/Q
 SsiKo4Ts/oKAMfdttGt9iPdtfsysX8wnAuCo9UXdjPS60zuke64GEQ2ISKc/6VJN
 vny5ebNhkJbmdjqYlJZ5BzBbYTN307qSmHs8ZBhdLiSLMgfhyBtnooLyGtb+Ddb8
 P/L5g95jlpKzqaQAiMrvz2kmIjpPm2rZp9imGr7akL8sG50y1eU=
 =T3Kd
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmK/V6IACgkQmmx57+YA
 GNkBGw//WcS2pTHRjQUYg5Bcy+13dDgWq4XHwtoBuBPBg7J6CNVfbNKUqO9ukcY+
 paYroFcb+KVSP+aQqJndit4fSp+Pr4eKb5rwKnjbXg/OiJhpmiOrUb0xzoJCHIH/
 jtBJ/H7NLzY4gCGMy3bD7RyrE1J7KblenlYy8b+6c26zdGnQRI5tATTqNM3N6Y8X
 wMRphRGbdv87eZ0akGTp/lWgVlsD4LPpOGaxWpLyzRUwElDz2IE68rj5y5X14KBu
 yU2rvmx2Us3rVSKMA4xp6nlTzHkCN3Q/S8R4j2aR6DaYDpdSTmthk6Hm5/RR3il7
 xwWTQRB2U2Ap0zYDymmFd6KOnViM1sWghiQEL0celQVpkxWDKcFwbURiRLgnK+5z
 2sms67A2IcUpXNulZVoBFwwjlKlS4H4u5lW/B89Xm9lS2WYACEiPuBSixJ4C+vBY
 eYOvE2YqXQTY9Ylqv78ceAnpokcDrHPBz6ZQ8O7xWFF27yRihcoU8jS7RH2XB6DH
 zeQK6B0+btbFo9u7FTvhwFgVKkCg5z5VXjI1+nzZYyfOrApYDI7MCe3Vx2rfS/fu
 dmBZ+j/8GyDlpSYX5IWBMs3pBFEk37nHRckpLsRldKvK75wMrlMqDx9e5QaP6nTc
 2j+pjIVQt+PwdmQSt/bcTZOoO8AxYAE0q+a8pHFHgW9oHJs3Vuc=
 =KaI8
 -----END PGP SIGNATURE-----

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

Amlogic Drivers changes for v5.20:
- Fix refcount leak in meson-secure-pwrc.c
- Fix refcount leak in meson_mx_socinfo_init

* tag 'amlogic-drivers-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  soc: amlogic: Fix refcount leak in meson-secure-pwrc.c
  meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init

Link: https://lore.kernel.org/r/0c01e173-9abf-69ac-7882-e6ecc3935c33@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-01 22:22:57 +02:00
Arnd Bergmann 92a1691b9d Renesas driver updates for v5.20
- Small fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCYrVvaQAKCRCKwlD9ZEnx
 cErcAP9I7JffzrhKlkPAxuVWcjW1skuj4y5K31M2Wsz3sFRddgEAoyYRm9H2cUHu
 CJMqvds7W1MVtgvTbOKjnMx6pjx3egQ=
 =tqeB
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmK/V0sACgkQmmx57+YA
 GNnXFw/+MIOR9IgRmkb71G91IB4Y++e2TW5dTIu4elmWBgfLWx963wYSAsLAqSsn
 6kGqBoKOJCv5UM+EROeN/yiG97YtsDWa4nTZHHP0sTPmL8uzy9AeT2PhSE1weL8U
 R0BVnOL8WG94j/eQS9KbSDg1A6wvbxcp7796nCGkI2n7jCir0Tmu83Fa/TvWMtP+
 iq0ziZbXse1aPK4y/AVbg6yF9ONLo6WcebLu8tWkVUEAU4T8TvyM1pPiBVUlTqPB
 3dfKfnZ+xjTnJzCi15MuIvopYOozrSjYFmD4Wt9WIns6+ZZIccTzae0c9hfGpYFd
 ZfC6uS5ILWxUyyRbIwBW1EzcCkI7479g27wVWSuxc4inV1Y5MKp4yc0hsbX4vqZD
 po6AC0ciwG1NfE7pmPEPzcrxsxNLOdQ6UmtKQT9wHVik/b6vl7MkmFXV8Co13qNu
 Nz/4fh/Cq4+JdhFxYBUPAXTcEzWLmeUgozIXZKVy1xKTWP/9RoLtOmJkXsYZuyWo
 ZvJ23Q3zPu3/wkvVPBlUTHddt9m5t6bwt1KvCTA7SqJ2iwnr9NW3Wbyc0qYjoAqi
 ZS2Mjfhq4Wfme4eF+gXHfIO2Qx7Sln4pnzQzE1wz7jdj/wKhXYR/lzxt24BKlBKC
 HwcrnYlf8seQT8eTUPmuIMW7VkQHUrUHCMSHqr2/QRa0nBflR5g=
 =Y6m1
 -----END PGP SIGNATURE-----

Merge tag 'renesas-drivers-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.20

  - Small fixes and improvements.

* tag 'renesas-drivers-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: rcar-sysc: Optimize rcar_sysc_area struct sizes
  soc: renesas: r8a779a0-sysc: Fix A2DP1 and A2CV[2357] PDR values

Link: https://lore.kernel.org/r/cover.1656069638.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-01 22:21:31 +02:00
Arnd Bergmann a38dbb4f20 AT91 fixes for 5.19
It contains 3 SoC fixes and 2 DT fixes:
 SoC:
 - fix the wakeup from RTC and RTT for ULP1 mode
 - fix section mismatch warning
 - fix SAM9X60 SiP detection
 
 DT:
 - fixes the EEPROMs compatibles for sama5d2_icp and sam9x60ek and EEPROM
   size for sam9x60ek
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTsZ8eserC1pmhwqDmejrg/N2X7/QUCYrraHQAKCRCejrg/N2X7
 /SttAQDmoJ4WB6+osorxNV+G9CnHZHQJHjI0X2ZTUGj59k6vIAEAu+LGjHyUmxVe
 TfYbnfaAgOICc8HsC2CbdkeR01RqNAM=
 =x+2+
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmK+81wACgkQmmx57+YA
 GNlQiBAAjEhrj2SQkigFGgGR+YFo+se/gNwOBz3OXZ6VyVFVqAKaaqC0MBM9OyBD
 Yyf6nGTT+VLe+Ekc/y7GtIW2oaCDTansk6E+MXe8QSHzs3T6BmKONAIH1YqUFZ3a
 0YCR9jBlIL16l3X08KnAhOm35iaqO0SgEZ9RDfGfTIWDAFmBis5rst5VreAlEbPp
 9LPsKYFjd7tqP1jFYpgE8UTkDZgS3rQHnsBAKKCLXT0tFTudgGk5B9/3Ni0V1wM2
 3ubf+1CW2vvbfXFtpruRzNlZ+Li3fZ0/b1bXRGXLZLRh2+/LvMVLEb/KN9Ln20hZ
 pYT0IYJhfu8MWgcZUof1Qnc437nDie7YoJ1JrDV13uhDhlBwW/E3KMtXLWvX07n3
 9p6IvbVGX/Wen7j1MWyOztJ55j4XbJebNcm2s/uXygjT3f4zsVk9HbFHpfiElPSZ
 xfqGRz+3ygRRA/itE3SMnmiCKRKip99NH9ohstzPg6xJ882fPQo+3BGFGo1AN4Mw
 Evj4bvDWX6NBgR1LSJFv0JG82wWWKm9byxcpKGXJ6g5dTwmyC/a+HHnmZ+iDWiq/
 BYtyS3iuE/5YFp7tO9AXYBfQyiMZ3VlKt0KqCK2GFxa7KN7CY2fALusVt44WJY7E
 FFwDvQ5kvAdERvVG4ddYGHj7Hjg9euDpht/l3fqIkNaFtWM27fo=
 =CHPb
 -----END PGP SIGNATURE-----

Merge tag 'at91-fixes-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes

AT91 fixes for 5.19

It contains 3 SoC fixes and 2 DT fixes:
SoC:
- fix the wakeup from RTC and RTT for ULP1 mode
- fix section mismatch warning
- fix SAM9X60 SiP detection

DT:
- fixes the EEPROMs compatibles for sama5d2_icp and sam9x60ek and EEPROM
  size for sam9x60ek

* tag 'at91-fixes-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: at91: pm: Mark at91_pm_secure_init as __init
  ARM: at91: fix soc detection for SAM9X60 SiPs
  ARM: dts: at91: sama5d2_icp: fix eeprom compatibles
  ARM: dts: at91: sam9x60ek: fix eeprom compatible and size
  ARM: at91: pm: use proper compatibles for sama7g5's rtc and rtt
  ARM: at91: pm: use proper compatibles for sam9x60's rtc and rtt
  ARM: at91: pm: use proper compatible for sama5d2's rtc

Link: https://lore.kernel.org/r/20220628135130.3114878-1-claudiu.beznea@microchip.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-01 15:15:08 +02:00
Linus Walleij 620f83b832
soc: ixp4xx/npe: Fix unused match warning
The kernel test robot found this inconsistency:

  drivers/soc/ixp4xx/ixp4xx-npe.c:737:34: warning:
  'ixp4xx_npe_of_match' defined but not used [-Wunused-const-variable=]
     737 | static const struct of_device_id ixp4xx_npe_of_match[] = {

This is because the match is enclosed in the of_match_ptr()
which compiles into NULL when OF is disabled and this
is unnecessary.

Fix it by dropping of_match_ptr() around the match.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220626074315.61209-1-linus.walleij@linaro.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-01 15:14:26 +02:00
Miaoqian Lin e6e0951414 soc: qcom: aoss: Fix refcount leak in qmp_cooling_devices_register
Every iteration of for_each_available_child_of_node() decrements
the reference count of the previous node.
When breaking early from a for_each_available_child_of_node() loop,
we need to explicitly call of_node_put() on the child node.
Add missing of_node_put() to avoid refcount leak.

Fixes: 05589b30b2 ("soc: qcom: Extend AOSS QMP driver to support resources that are used to wake up the SoC.")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220606064252.42595-1-linmq006@gmail.com
2022-06-30 22:03:58 -05:00
Xiang wangx a3e7259f9e soc: qcom: llcc: Fix syntax errors in comments
Delete the redundant word 'and'.

Signed-off-by: Xiang wangx <wangxiang@cdjrlc.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220604142327.14714-1-wangxiang@cdjrlc.com
2022-06-30 22:00:27 -05:00
Miaoqian Lin 92a563fcf1 soc: qcom: ocmem: Fix refcount leak in of_get_ocmem
of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.
of_node_put() will check NULL pointer.

Fixes: 88c1e9404f ("soc: qcom: add OCMEM driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220602042430.1114-1-linmq006@gmail.com
2022-06-30 21:50:46 -05:00
Tanmay Shah acd6510dd7 firmware: xilinx: Add TF_A_PM_REGISTER_SGI SMC call
SGI interrupt register and reset is performed by EEMI ioctl
IOCTL_REGISTER_SGI. However, this is not correct use of EEMI call.
SGI registration functionality does not qualify as energy management
activity and so shouldn't be mapped to EEMI call.

This new call will replace IOCTL_REGISTER_SGI and will  be handled by TF-A
specific handler in TF-A. To maintain backward compatibility for a while
firmware driver will still use IOCTL_REGISTER_SGI as fallback strategy if
new call fails or is not supported by TF-A.

This new design also helps to make TF-A as pass through layer for EEMI
calls. So we don't have to maintain PM_IOCTL as EEMI API ID in TF-A.

Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20220607224253.54919-1-tanmay.shah@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2022-06-29 14:46:22 +02:00
Douglas Anderson fe72f9bce1 soc: qcom: cmd-db: replace strscpy_pad() with strncpy()
Commit ac0126a017 ("soc: qcom: cmd-db: replace strncpy() with
strscpy_pad()") breaks booting on my sc7280-herobrine-herobrine
device. From printouts I see that at bootup the function is called
with an id of "lnbclka2" which is 8 bytes big.

Previously all 8 bytes of this string were copied to the
destination. Now only 7 bytes will be copied since strscpy_pad() saves
a byte for '\0' termination.

We don't need the '\0' termination in the destination. Let's go back
to strncpy(). According to the warning:
  If a caller is using non-NUL-terminated strings, strncpy() can still
  be used, but destinations should be marked with the __nonstring
  attribute to avoid future compiler warnings.
...so we'll do that.

While we're at it, let's change the query array to use
"sizeof(ent->id)" so it can't possibly go out of sync with our later
copy.

Fixes: ac0126a017 ("soc: qcom: cmd-db: replace strncpy() with strscpy_pad()")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220628064301.v3.1.Ie7b480cd99e2c13319220cbc108caf2bcd41286b@changeid
2022-06-28 14:44:44 -05:00
Mihai Sain 35074df65a ARM: at91: fix soc detection for SAM9X60 SiPs
Fix SoC detection for SAM9X60 SiPs:
SAM9X60D5M
SAM9X60D1G
SAM9X60D6K

Fixes: af3a10513c ("drivers: soc: atmel: add per soc id and version match masks")
Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220616081344.1978664-1-claudiu.beznea@microchip.com
2022-06-28 12:55:32 +03:00
Marek Vasut 1ec32a4f1c soc: imx: imx8m-blk-ctrl: Make error prints useful
Print the name of the power domain which failed to make the error
prints actually useful for finding the error.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Martyn Welch <martyn.welch@collabora.com>
Cc: Paul Elder <paul.elder@ideasonboard.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-06-27 16:16:15 +08:00
Michael Walle 786dde1e59 soc: fsl: guts: add serial_number support
Most layerscapes provide a security fuse processor where the vendor
will store a unique id per part. Unfortunately, we cannot use the
corresponding efuse driver because this driver needs to be ready
early during the boot phase. To get the unique identifier, we just
need to access two registers. Thus we just search the device tree
for the corresponding device, map its memory to read the id and then
unmap it again.

Because it is likely that the offset within the fuses is dependent
on the SoC, we need a per SoC data. Also, the compatible string is
different among the SoCs. For now, this add support for the LS1028A
SoC.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-06-27 14:52:02 +08:00
Michael Walle 55488c90b3 soc: fsl: guts: drop platform driver
This driver cannot be unloaded and it will be needed very early in the
boot process because other driver (weakly) depend on it (eg. for chip
errata handling). Drop all the platform driver and devres stuff and
simply make it a core_initcall.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-06-27 14:51:59 +08:00
Michael Walle b46dd0cb93 soc: fsl: guts: use of_root instead of own reference
There is already a global of_root reference. Use that instead of getting
one on our own. We don't need to care about the reference count either
this way.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-06-27 14:51:56 +08:00
Michael Walle 5d707e4e3f soc: fsl: guts: allocate soc_dev_attr on the heap
This is the last global static variable. Drop it and allocate the memory
on the heap instead.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-06-27 14:51:54 +08:00
Michael Walle ab4988d6a3 soc: fsl: guts: embed fsl_guts_get_svr() in probe()
Move the reading of the SVR into the probe function as
fsl_guts_get_svr() is the only user of the static guts variable and this
lets us drop that as well as the malloc() for this variable. Also, we
can unmap the memory region after we accessed it, which will simplify
error handling later.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-06-27 14:51:51 +08:00
Michael Walle 6de6cb89fc soc: fsl: guts: remove module_exit() and fsl_guts_remove()
This driver will never be unloaded. Firstly, it is not available as a
module, but more importantly, other drivers will depend on this one to
apply possible chip errata.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-06-27 14:51:48 +08:00
Michael Walle ab3f045774 soc: fsl: guts: machine variable might be unset
If both the model and the compatible properties are missing, then
machine will not be set. Initialize it with NULL.

Fixes: 34c1c21e94 ("soc: fsl: fix section mismatch build warnings")
Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-06-27 14:51:28 +08:00
Julia Lawall a20e55d477 soc: qcom: rpmhpd: fix typos in comment
Spelling mistakes (triple letters) in comment.
Detected with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220521111145.81697-9-Julia.Lawall@inria.fr
2022-06-25 22:36:13 -05:00
Krzysztof Kozlowski d11a34a404 soc: qcom: correct kerneldoc
Correct kerneldoc warnings like:

  drivers/soc/qcom/mdt_loader.c:126:
    warning: Function parameter or member 'fw_name' not described in 'qcom_mdt_read_metadata'

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220519073301.7072-2-krzysztof.kozlowski@linaro.org
2022-06-25 22:05:31 -05:00
Krzysztof Kozlowski ac0126a017 soc: qcom: cmd-db: replace strncpy() with strscpy_pad()
The use of strncpy() is considered deprecated for NUL-terminated
strings[1].  Replace strncpy() with strscpy_pad(), to keep existing
pad-behavior of strncpy.  This fixes W=1 warning:

  drivers/soc/qcom/cmd-db.c: In function ‘cmd_db_get_header.part.0’:
  drivers/soc/qcom/cmd-db.c:151:9: warning: ‘strncpy’ specified bound 8 equals destination size [-Wstringop-truncation]
    151 |         strncpy(query, id, sizeof(query));

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220519073301.7072-1-krzysztof.kozlowski@linaro.org
2022-06-25 22:05:31 -05:00
Uwe Kleine-König bc0f149376 soc: qcom: apr: Drop redundant check in .remove()
The remove callback is only called by the driver core if there is a
driver to unbind, so there is no need to check dev->driver to be
non-NULL.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220618203913.35785-1-u.kleine-koenig@pengutronix.de
2022-06-25 22:01:02 -05:00
Douglas Anderson 0f0eca0ccb soc: qcom: socinfo: Add an ID for sc7180P
Some sc7180 Chromebooks actually have sc7180P (known by many names,
apparently, including possibly sc7180 Pro and sc7185). This is a
sc7180 part that has slightly higher clock speeds.

The official ID number allocated to these devices by Qualcomm is 495
so we'll add an entry to the table for them. Note that currently
shipping BIOS for these devices will actually end up reporting an ID
of 407 due to a bug but eventually a new BIOS will be released which
corrects it to 495.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220523085437.v3.1.I26eca1856f99e6160d30de6d50ecab60e6226354@changeid
2022-06-25 14:52:39 -05:00
Peng Wu a825d72f74 soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume()
Fix the missing clk_disable_unprepare() before return
from svs_resume() in the error handling case.

Signed-off-by: Peng Wu <wupeng58@huawei.com>
Reported-by: Hulk Robot <hulkci@huawei.com>
Link: https://lore.kernel.org/r/20220623070240.63382-1-wupeng58@huawei.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-23 10:50:53 +02:00
AngeloGioacchino Del Regno 44e36d7552 soc: mediatek: mutex: Use DDP_COMPONENT_DITHER0 mod index for MT8365
In commit
4e8988c634 ("soc: mediatek: add DDP_DOMPONENT_DITHER0 enum for mt8195 vdosys0")
the enum mtk_ddp_comp_id was modified to add an index number to the
DITHER component because some new SoCs have multiple dither blocks.

As a result, all of the mutex mod arrays have been changed to use the
new definition instead of the old one (even if that's retained): for
consistency purposes, follow the same trend on the newly introduced
MT8365 mutex mod array.

This commit brings no functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220620102454.131417-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-22 16:06:41 +02:00
Martin Kepplinger 43b240d41b soc: imx: gpcv2: print errno for regulator errors
Make debugging of power management issues easier by printing the reason
why a regulator fails to be enabled or disabled.

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-06-19 15:14:39 +08:00
Yang Li b710673e2d soc: ti: wkup_m3_ipc: Remove unneeded semicolon
Eliminate the following coccicheck warning:
./drivers/soc/ti/wkup_m3_ipc.c:691:2-3: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220504225125.45830-1-yang.lee@linux.alibaba.com
2022-06-17 20:25:01 -05:00
Liang He 9a073d4fbb soc: bcm: brcmstb: biuctrl: Add missing of_node_put()
In brcmstb_biuctrl_init(), of_find_compatible_node() will return a
node pointer with refcount incremented. We should use of_node_put()
in each fail path or when it is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-06-17 14:54:22 -07:00
Moudy Ho e5758850c2 soc: mediatek: mutex: add functions that operate registers by CMDQ
Due to HW limitations, MDP3 is necessary to enable MUTEX in each frame
for SOF triggering and cooperate with CMDQ control to reduce the amount
of interrupts generated(also, reduce frame latency).

In response to the above situation, a new interface
"mtk_mutex_enable_by_cmdq" has been added to achieve the purpose.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://lore.kernel.org/r/20220610063424.7800-7-moudy.ho@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-17 15:51:52 +02:00
Moudy Ho 2c9f8d1e01 soc: mediatek: mutex: add 8183 MUTEX MOD settings for MDP
For the purpose of module independence, related settings should be moved
from MDP to the corresponding driver.
This patch adds 8183 MUTEX MOD settings for MDP.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://lore.kernel.org/r/20220610063424.7800-3-moudy.ho@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-17 15:51:51 +02:00
Moudy Ho d0804085c5 soc: mediatek: mutex: add common interface for modules setting
In order to allow multiple modules to operate MUTEX hardware through
a common interfrace, two flexible indexes "mtk_mutex_mod_index" and
"mtk_mutex_sof_index" need to be added to replace original component
ID so that like DDP and MDP can add their own MOD table or SOF
settings independently.

In addition, 2 generic interface "mtk_mutex_write_mod" and
"mtk_mutex_write_sof" have been added, which is expected to replace
the "mtk_mutex_add_comp" and "mtk_mutex_remove_comp" pair originally
dedicated to DDP in the future.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://lore.kernel.org/r/20220610063424.7800-2-moudy.ho@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-17 15:51:51 +02:00
Chunfeng Yun 72be1e7a44 soc: mediatek: pm-domains: Add support always on flag
There is a t-phy shared by PCIe and USB3 on mt8195, if the t-phy is
used by PCIe, when power off its mtcmos, need software reset it
(workaround way, usually hardware do it, but has an issue on mt8195),
but it has side effect to USB2 phy(works with USB3 phy to support
USB3.2 Gen1), so add support GENPD_FLAG_ALWAYS_ON flag, and make its
power always on.
Another reason is that USB3.2 Gen1/2 need keep power always on when
support runtime-pm due to hardware limitation until now.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220617095841.23031-1-chunfeng.yun@mediatek.com
[mb: smaller nit fixes on commit message]
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-17 13:49:37 +02:00
Fabien Parent 38077cb39b soc: mediatek: mt8365-mmsys: add DPI/HDMI display path
Right now only the DSI path connections are described in the mt8365
mmsys driver. The external path will be DPI/HDMI. This commit adds
the connections for DPI/HDMI.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://lore.kernel.org/r/20220530201436.902505-5-fparent@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-17 12:25:57 +02:00
Fabien Parent 141311b856 soc: mediatek: mutex: add MT8365 support
Add mutex support for MT8365 SoC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://lore.kernel.org/r/20220530201436.902505-4-fparent@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-17 12:25:57 +02:00
Roger Lu 0bbb09b2af soc: mediatek: SVS: add mt8192 SVS GPU driver
mt8192 SVS GPU uses 2-line (high/low bank) HW architecture to provide
bank voltages. High bank helps update higher frequency's voltage
and low bank helps update lower frequency's voltage.

Signed-off-by: Roger Lu <roger.lu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20220516004311.18358-8-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-17 10:50:08 +02:00
Roger Lu 13f1bbcfb5 soc: mediatek: SVS: add debug commands
The purpose of SVS is to help find the suitable voltages
for DVFS. Therefore, if SVS bank voltages are concerned
to be wrong, we can show/disable SVS bank voltages by
this patch.

Signed-off-by: Roger Lu <roger.lu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20220516004311.18358-6-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-17 10:50:07 +02:00
Roger Lu 6c69271926 soc: mediatek: SVS: add monitor mode
SVS monitor mode is based on different thermal temperature
to provide suitable SVS bank voltages.

Signed-off-by: Roger Lu <roger.lu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20220516004311.18358-5-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-17 10:50:07 +02:00
Roger Lu 681a02e950 soc: mediatek: SVS: introduce MTK SVS engine
The Smart Voltage Scaling(SVS) engine is a piece of hardware
which calculates suitable SVS bank voltages to OPP voltage table.
Then, DVFS driver could apply those SVS bank voltages to PMIC/Buck
when receiving OPP_EVENT_ADJUST_VOLTAGE.

Signed-off-by: Roger Lu <roger.lu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20220516004311.18358-4-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-17 10:50:07 +02:00
Liang He d18529a4c1 soc: amlogic: Fix refcount leak in meson-secure-pwrc.c
In meson_secure_pwrc_probe(), there is a refcount leak in one fail
path.

Signed-off-by: Liang He <windhl@126.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Fixes: b3dde5013e ("soc: amlogic: Add support for Secure power domains controller")
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20220616144915.3988071-1-windhl@126.com
2022-06-17 09:40:40 +02:00
Sai Prakash Ranjan 6f1de1da81 soc: qcom: geni: Disable MMIO tracing for GENI SE
Disable MMIO tracing for GENI SE driver to prevent excessive
logging. Any access over serial console would involve a lot of
TX and RX register accesses (and few others), so these MMIO
read/write trace events in these drivers cause a lot of unwanted
noise because of the high frequency of such operations and it is
not very useful tracing these events for such drivers.
Given we want to enable these trace events on development devices
(maybe not production devices) where performance also really
matters so that we don't regress other components by wasting CPU
cycles and memory collecting these traces, it makes more sense to
disable these  traces from such drivers.

Also another reason to disable these traces would be to prevent
recursive tracing when we display the trace buffer containing
these MMIO trace events since writing onto serial console would
further record MMIO traces.

Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-06-15 17:41:12 +02:00
Arnd Bergmann 11bb764fbf This pull request contains Broadcom ARM-based SoCs driver fixes for
5.19, please pull the following:
 
 - Miaoqian fixes a device tree node reference count in the system sleep
   code for Broadcom STB chips
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmKgbBUACgkQh9CWnEQH
 BwQF9xAA38EssKFHnhPvczIEQZLPJNdoNFow7/Dr1ePrGrMlHzU1C1Ot9FIs45hM
 NBlOmV336GzIiRib3QxWAjBAAEf+kXGfecMcS9x3DDDq5cI5hRo1gX7HM5toKSLJ
 eMjeDJ89AGFKBSUSNgJrctt/h0l6ZViN4GlGgd6a2+QYG/+lcIsdqsz61+jbO4cy
 qh9LLBcUi6spHOOSXeIIjQSaQumcwXrAija4Zuo/7jHmDbMt4HWjCnhmOncNpEmG
 J/2QqZW8n21iw7MXO1tzXXCQLFmIJich7vAAZ8j3aOCrDBMnXINeKJeXJ0+mL7YA
 Uho3M8h+uYlAiW4IsIV9w7BOs/XtRXuSPPML2CMPHGDbIjdg0SilEZKIoQNbK1z+
 mRSMCBIgMVYO9Oh5nFo+Jwkr/0lkEwjkLqJMohv3PnPe3ONuhhEKBbNq5FQNh/e1
 u0gjKwjAvMFdyinRxHK3xahdACqx6CgrxhUSGEcnrHrh74LfDjXaUvKQ5lSoZvdb
 dv/8zVDuAsYWvF66KaR7dhJ4PzLBVcc3YjAycMdjss1GCD0lzy5LzYJ+vxOspMKL
 ZJasoJOK5j8wVzZyjUKAOs8XwOagNA1nuUraNNo+4ONCgIo/a/aE68X+MWlUI8vU
 QJX2nmECphqPazq0t3fmboMcXY5Zv/s9LPFtKpJVJuqAvc1qjMo=
 =Da3i
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmKoYO8ACgkQmmx57+YA
 GNlSgA/6AoZqvQXG66RO8PRF3rHoTmAKVFGl7GjK8FSJfB8ioJAgfW75k+0F3rZD
 uLRn+XxrRuEunJUNl+CIa3BM4bGTa4m/jGwsiCF7y2i1rnsdcKvFwz0ZXzgnExb8
 I2nlfATpQIEA6CQB9HieaaO87x/ZxB+3rzBLw5zRrD+Ir4mLNDu8M7mMXKE9ZhLA
 5VMOdPkLpPNaymaIVEahFGwBZWcDQp31ZMdgHr4keWZ8YO5Dos3Z5eQU8Bh99wei
 O/upy50+hgl1V/PJLq6H/6HNNrKXRSDS2HmCsUoPRXIPp1V9DsTPdj+66r30CuNx
 ImYBT3nnTJWUBO+J50fxqy7VggRcarXvXvTE/T9WZHaYTwCvFgGwLYSzdsbRlKuN
 WcI45f7/d0L4K3OYBdwuhtwjo3O7wLi52DVfMLL8jTGRsugi4pzblZZ3wS2x9mWT
 TM/LW81KibkFPlXWd4hsQYPWMZUqHhuUhVvreJAhbHFONzFZpcWJHfgiTI+RISA0
 WEq2gki3OyHUUfM6dcYG82zPb/4VNmhxLvjubKUn/8cd6kL7bvEi7a8I5pP5c7fN
 RjwPbNHeRfC142CcFL75VBmEFPWicXnqQgN9krX3vgUZ0/4VRe19zO1ikYJOf0fH
 Mky9eL8gZGIPur4WAH/D8xQ8AaKZvLWGypiV25MHUip98dxDsQo=
 =gf3s
 -----END PGP SIGNATURE-----

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

This pull request contains Broadcom ARM-based SoCs driver fixes for
5.19, please pull the following:

- Miaoqian fixes a device tree node reference count in the system sleep
  code for Broadcom STB chips

* tag 'arm-soc/for-5.19/drivers-fixes' of https://github.com/Broadcom/stblinux:
  soc: bcm: brcmstb: pm: pm-arm: Fix refcount leak in brcmstb_pm_probe

Link: https://lore.kernel.org/r/20220608093132.1465703-1-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-06-14 12:20:31 +02:00
Alexander Stein 7c7eaeefb0 soc: imx: imx8m-blk-ctrl: fix display clock for LCDIF2 power domain
LCDIF2 has its own display clock, use this one.

Fixes: 07614fed00 ("soc: imx: imx8m-blk-ctrl: Add i.MX8MP media blk-ctrl")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Martyn Welch <martyn.welch@collabora.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-06-14 11:53:42 +08:00
Geert Uytterhoeven 4f5bc54d28 soc: renesas: rcar-sysc: Optimize rcar_sysc_area struct sizes
Reduce the sizes of the rcar_sysc_area and rcar_gen4_sysc_area
structures:
  - parent is in the range [-1..32] or [-1..64], so s8 is sufficient,
  - flags needs just 3 bits (for now), so u8 is plenty.

This reduces kernel size by:
  - 288 bytes for an R-Car Gen1+Gen2 kernel (arm32),
  - 1772 bytes for an R-Car Gen3+Gen4 kernel (arm64).

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/cbbc8f464743d636895c048de61aa610d75392de.1654701156.git.geert+renesas@glider.be
2022-06-13 11:43:50 +02:00
Geert Uytterhoeven bccceabb92 soc: renesas: r8a779a0-sysc: Fix A2DP1 and A2CV[2357] PDR values
The PDR values for the A2DP1 and A2CV[2357] power areas on R-Car V3U are
incorrect (copied-and-pasted from A2DP0 and A2CV[0146]).
Fix them.

Reported-by: Renesas Vietnam via Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fixes: 1b4298f000 ("soc: renesas: r8a779a0-sysc: Add r8a779a0 support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/87bc2e70ba4082970cf8c65871beae4be3503189.1654696188.git.geert+renesas@glider.be
2022-06-13 11:43:50 +02:00
Thomas Gleixner 2aec85b26f treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2)
Based on the normalized pattern:

    this program is free software you can redistribute it and/or modify it
    under the terms of the gnu general public license as published by the
    free software foundation version 2  this program is distributed as is
    without any warranty of any kind whether express or implied without
    even the implied warranty of merchantability or fitness for a
    particular purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

has been chosen to replace the boilerplate/reference.

Reviewed-by: Allison Randal <allison@lohutok.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10 14:51:35 +02:00
Miaoqian Lin 37d838de36 soc: bcm: brcmstb: pm: pm-arm: Fix refcount leak in brcmstb_pm_probe
of_find_matching_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

In brcmstb_init_sram, it pass dn to of_address_to_resource(),
of_address_to_resource() will call of_find_device_by_node() to take
reference, so we should release the reference returned by
of_find_matching_node().

Fixes: 0b741b8234 ("soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM)")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-06-08 02:21:17 -07:00
Julia Lawall 9b65687904 soc: bcm: brcmstb: pm: pm-arm: fix typo in comment
Spelling mistake (triple letters) in comment.
Detected with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-06-08 00:50:50 -07:00
Rex-BC Chen 1c9faace10 soc: mediatek: devapc: Add support for MT8186
Add devapc data and compatible to support MT8186 devapc.

Signed-off-by: Runyang Chen <runyang.chen@mediatek.com>
Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220504115501.3490-4-rex-bc.chen@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-07 18:25:15 +02:00
Rex-BC Chen 2cb41ed0d7 soc: mediatek: devapc: Separate register offsets from mtk_devapc_data
The register offsets is the same between MT6779 and MT8186. To reuse the
register offsets, we move these register offsets to another structure
"mtk_devapc_regs_ofs".

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220504115501.3490-3-rex-bc.chen@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-07 18:25:15 +02:00
AngeloGioacchino Del Regno f1a95a356d soc: mediatek: pwrap: Compress of_device_id entries to one line
Compress each entry of the of_device_id tables in this driver to one
line instead of three, as they fit just fine in a single line.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220517104712.24579-6-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-07 18:25:15 +02:00
AngeloGioacchino Del Regno 43406cebf0 soc: mediatek: pwrap: Move IO pointers to new structure
In the PMIC Wrapper driver each PMIC has its own regmap configuration
and its own pwrap_{read/write}() callbacks, but it's just about either
a 32 bits vs 16 bits register, and only one of them uses 32bits regs:
this means that the same ops are assigned over and over again to all
of the supported PMICs.

It is therefore possible to avoid reassigning the same things over
and over, reducing the amount of lines, without any impact on human
readability of this driver: add a pwrap_slv_regops structure and
move the callbacks and regmap_config pointer in there instead.
This allows to assign just one pointer to that shared data in the
per-pmic struct pwrap_slv_type.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220517104712.24579-5-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-07 18:25:15 +02:00
AngeloGioacchino Del Regno 56a468b5f6 soc: mediatek: pwrap: Check return value of platform_get_irq()
Check for the return value of platform_get_irq(): if no interrupt
is specified, it wouldn't make sense to call devm_request_irq().

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220517104712.24579-4-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-07 18:25:14 +02:00
AngeloGioacchino Del Regno e84187fa6f soc: mediatek: pwrap: Switch to devm_platform_ioremap_resource_byname()
In order to simplify ioremapping resources, instead of calling
platform_get_resource_byname() and then devm_ioremap_resource(),
simply call devm_platform_ioremap_resource_byname().

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220517104712.24579-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-07 18:25:14 +02:00
AngeloGioacchino Del Regno 18c7deca2b soc: mediatek: pwrap: Use readx_poll_timeout() instead of custom function
Function pwrap_wait_for_state() is a function that polls an address
through a helper function, but this is the very same operation that
the readx_poll_timeout macro means to do.
Convert all instances of calling pwrap_wait_for_state() to instead
use the read_poll_timeout macro.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220517104712.24579-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-06-07 18:25:14 +02:00
Linus Torvalds 6f9b5ed8ca Char / Misc / Other smaller driver subsystem updates for 5.19-rc1
Here is the large set of char, misc, and other driver subsystem updates
 for 5.19-rc1.  The merge request for this has been delayed as I wanted
 to get lots of linux-next testing due to some late arrivals of changes
 for the habannalabs driver.
 
 Highlights of this merge are:
 	- habanalabs driver updates for new hardware types and fixes and
 	  other updates
 	- IIO driver tree merge which includes loads of new IIO drivers
 	  and cleanups and additions
 	- PHY driver tree merge with new drivers and small updates to
 	  existing ones
 	- interconnect driver tree merge with fixes and updates
 	- soundwire driver tree merge with some small fixes
 	- coresight driver tree merge with small fixes and updates
 	- mhi bus driver tree merge with lots of updates and new device
 	  support
 	- firmware driver updates
 	- fpga driver updates
 	- lkdtm driver updates (with a merge conflict, more on that
 	  below)
 	- extcon driver tree merge with small updates
 	- lots of other tiny driver updates and fixes and cleanups, full
 	  details in the shortlog.
 
 All of these have been in linux-next for almost 2 weeks with no reported
 problems.
 
 Note, there are 3 merge conflicts when merging this with your tree:
 	- MAINTAINERS, should be easy to resolve
 	- drivers/slimbus/qcom-ctrl.c, should be straightforward
 	  resolution
 	- drivers/misc/lkdtm/stackleak.c, not an easy resolution.  This
 	  has been noted in the linux-next tree for a while, and
 	  resolved there, here's a link to the resolution that Stephen
 	  came up with and that Kees says is correct:
 	  	https://lore.kernel.org/r/20220509185344.3fe1a354@canb.auug.org.au
 
 I will be glad to provide a merge point that contains these resolutions
 if that makes things any easier for you.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYpnkbA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ylOrgCggbbAFwESBY9o2YfpG+2VOLpc0GAAoJgY1XN8
 P/gumbLEpFvoBZ5xLIW8
 =KCgk
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char / misc / other smaller driver subsystem updates from Greg KH:
 "Here is the large set of char, misc, and other driver subsystem
  updates for 5.19-rc1. The merge request for this has been delayed as I
  wanted to get lots of linux-next testing due to some late arrivals of
  changes for the habannalabs driver.

  Highlights of this merge are:

   - habanalabs driver updates for new hardware types and fixes and
     other updates

   - IIO driver tree merge which includes loads of new IIO drivers and
     cleanups and additions

   - PHY driver tree merge with new drivers and small updates to
     existing ones

   - interconnect driver tree merge with fixes and updates

   - soundwire driver tree merge with some small fixes

   - coresight driver tree merge with small fixes and updates

   - mhi bus driver tree merge with lots of updates and new device
     support

   - firmware driver updates

   - fpga driver updates

   - lkdtm driver updates (with a merge conflict, more on that below)

   - extcon driver tree merge with small updates

   - lots of other tiny driver updates and fixes and cleanups, full
     details in the shortlog.

  All of these have been in linux-next for almost 2 weeks with no
  reported problems"

* tag 'char-misc-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (387 commits)
  habanalabs: use separate structure info for each error collect data
  habanalabs: fix missing handle shift during mmap
  habanalabs: remove hdev from hl_ctx_get args
  habanalabs: do MMU prefetch as deferred work
  habanalabs: order memory manager messages
  habanalabs: return -EFAULT on copy_to_user error
  habanalabs: use NULL for eventfd
  habanalabs: update firmware header
  habanalabs: add support for notification via eventfd
  habanalabs: add topic to memory manager buffer
  habanalabs: handle race in driver fini
  habanalabs: add device memory scrub ability through debugfs
  habanalabs: use unified memory manager for CB flow
  habanalabs: unified memory manager new code for CB flow
  habanalabs/gaudi: set arbitration timeout to a high value
  habanalabs: add put by handle method to memory manager
  habanalabs: hide memory manager page shift
  habanalabs: Add separate poll interval value for protocol
  habanalabs: use get_task_pid() to take PID
  habanalabs: add prefetch flag to the MAP operation
  ...
2022-06-03 11:36:34 -07:00
Linus Torvalds 09a018176b ARM: SoC changes, part 2
This is the second part of the general SoC updates, containing
 everything that did not make it in the initial pull request,
 or that came in as a bugfix later.
 
  - Devicetree updates for SoCFPGA, ASPEED, AT91 and Rockchip, including
    a new machine using an ASPEED BMC.
 
  - More DT fixes from Krzysztof Kozlowski across platforms
 
  - A new SoC platform for the GXP baseboard management controller,
    used in current server products from HPE.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmKY3lwACgkQmmx57+YA
 GNlwLQ//YCbh/iH0OfNYiyT8ugFQYmKxLccdnkW/5uJ+WHO4lPbxcXfw+SxPZl2X
 uxlrBn1/+LH+UUzeqmIUVJzmLE2x/mO6LKp3PwKdD0k+NeiFPKQYTVhUgIsLXN3c
 H79Hmgid1P1FoyaO9u3ZP/v8j4xTFaPN4JD+VsMzXup+yalkj+FZPK0vaWcuen4I
 xaf75FclA4hJ1KosoWHUs2kgMOCF+oxfHH4ikloBoDnpfhCPnNoTeXBHMQN+5+5V
 X+8YW8J/1y0v2pVKX+Zgb7iWA8e9SMUvI1NVv5v3K5JY03Pbp3g1FfiTvYVdIbb6
 OMaFlzu/DKmYuzvbWPawx5paq38GbjmlTVD/EfHx/vjaviVqXDrbnjetYW4sVE/x
 GP4ovMu5d9IijZMM5Oa0SxBOObBEmdcoWcDbSUWI91autPBdsPTEYr7m+R9eD6hZ
 GOsFAU4Jt9p0xVsnXGUNQIzU8J+7Rj1ZqtPqdvDQm99mri/2PqOdAIgb/zj563Ut
 6/BpqIiQm4Yfg/6YYQ6JPSaNYnsFhbwLkE2j/wBRRnCcWjsK3bb16nCV8977xFrX
 89Gy01Z9VlSBaZpoeXQFT4kmMn7edS86kDAVdF0NP5eCI9TpO3mt6WsQbMQoe9Dt
 Y3q0TuRjucBB7Re1uIIzWyfMvDePCan2rpDF4sDiqtR9188R9rg=
 =2qok
 -----END PGP SIGNATURE-----

Merge tag 'arm-late-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull more ARM SoC updates from Arnd Bergmann:
 "This is the second part of the general SoC updates, containing
  everything that did not make it in the initial pull request, or that
  came in as a bugfix later.

   - Devicetree updates for SoCFPGA, ASPEED, AT91 and Rockchip,
     including a new machine using an ASPEED BMC.

   - More DT fixes from Krzysztof Kozlowski across platforms

   - A new SoC platform for the GXP baseboard management controller,
     used in current server products from HPE"

* tag 'arm-late-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (56 commits)
  ARM: configs: Enable more audio support for i.MX
  tee: optee: Pass a pointer to virt_addr_valid()
  arm64: dts: rockchip: rename Quartz64-A bluetooth gpios
  arm64: dts: rockchip: add clocks property to cru node rk3368
  arm64: dts: rockchip: add clocks property to cru node rk3308
  arm64: dts: rockchip: add clocks to rk356x cru
  ARM: dts: rockchip: add clocks property to cru node rk3228
  ARM: dts: rockchip: add clocks property to cru node rk3036
  ARM: dts: rockchip: add clocks property to cru node rk3066a/rk3188
  ARM: dts: rockchip: add clocks property to cru node rk3288
  ARM: dts: rockchip: Remove "amba" bus nodes from rv1108
  ARM: dts: rockchip: add clocks property to cru node rv1108
  arm64: dts: sprd: use new 'dma-channels' property
  ARM: dts: da850: use new 'dma-channels' property
  ARM: dts: pxa: use new 'dma-channels/requests' properties
  soc: ixp4xx/qmgr: Fix unused match warning
  ARM: ep93xx: Make ts72xx_register_flash() static
  ARM: configs: enable support for Kontron KSwitch D10
  ep93xx: clock: Do not return the address of the freed memory
  arm64: dts: intel: add device tree for n6000
  ...
2022-06-02 15:27:44 -07:00
Linus Torvalds 96479c0980 ARM: multiplatform changes, part 2
The second part of the multiplatform changes now converts the
 Intel/Marvell PXA platform along with the rest. The patches went through
 several rebases before the merge window as bugs were found, so they
 remained separate.
 
 This has to touch a lot of drivers, in particular the touchscreen,
 pcmcia, sound and clk bits, to detach the driver files from the
 platform and board specific header files.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmKZKqsACgkQmmx57+YA
 GNnO/w//dgJBlkmoIIKlG2eJsvoUKwDt7MuLEMCqSqYYUSvMENFwKK66INMDIJ3l
 PmKf94JadlpBm2OB2vzW+D1EtaLGX9eXZkKD+vyB1I1yFkKdzEPcAfitfrRwe58E
 pR4nQd/jVL4UCY+pp442O1q9VvMpMV9P4ILJGPS/PpsD5CT9Gn8m9svIIuNuDRFd
 nwpyZC3l32jVLo9iuLmwZUvxtOWI3hTqZrnxhByBhlvtnGexRsq/VhfubK2uzBi1
 CyWHjqzOSmseGmsUDwv9LFqVV9YRCeisS3IElA5L0VgM0XvHKA+f9qyF7V6zI20g
 y9LtqhdAtiTpE/aUrOW2LDYaM/bc7RilYZrWchoZbCEsHhV4C+ld3QoTyxvGscvG
 tbznhvZKdUNX8LHS0J9NqIj1q1YGN5ei5r/C5R8DBj1q8VcTVnq3dms8xzVTd35o
 xS5BbLFliiI96jc7S6LaQizXheYjAfdPhmXUAxNXvWIVQ6SXnf8/U/RB9Zzjb8hm
 FH2Gu8m/Dh2MHKBBRWSVw8VahV0V7WiEaWeYuwwTbW1wUrsWiizVaPnqrt6Cq9DW
 oJZgBvktWEXUQz73qrnvwo9GjcKqAxaWKWq05hHKHKuLGezsPAyIhIKr51V2xqqw
 cp2OIMCsN5GYENOhHvt6BMRAI5iA4VyFDtWAqw9B6EIwno6N7Z4=
 =cnSb
 -----END PGP SIGNATURE-----

Merge tag 'arm-multiplatform-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull more ARM multiplatform updates from Arnd Bergmann:
 "The second part of the multiplatform changes now converts the
  Intel/Marvell PXA platform along with the rest. The patches went
  through several rebases before the merge window as bugs were found, so
  they remained separate.

  This has to touch a lot of drivers, in particular the touchscreen,
  pcmcia, sound and clk bits, to detach the driver files from the
  platform and board specific header files"

* tag 'arm-multiplatform-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (48 commits)
  ARM: pxa/mmp: remove traces of plat-pxa
  ARM: pxa: convert to multiplatform
  ARM: pxa/sa1100: move I/O space to PCI_IOBASE
  ARM: pxa: remove support for MTD_XIP
  ARM: pxa: move mach/*.h to mach-pxa/
  ARM: PXA: fix multi-cpu build of xsc3
  ARM: pxa: move plat-pxa to drivers/soc/
  ARM: mmp: rename pxa_register_device
  ARM: mmp: remove tavorevb board support
  ARM: pxa: remove unused mach/bitfield.h
  ARM: pxa: move clk register definitions to driver
  ARM: pxa: move smemc register access from clk to platform
  cpufreq: pxa3: move clk register access to clk driver
  ARM: pxa: remove get_clk_frequency_khz()
  ARM: pxa: pcmcia: move smemc configuration back to arch
  ASoC: pxa: i2s: use normal MMIO accessors
  ASoC: pxa: ac97: use normal MMIO accessors
  ASoC: pxa: use pdev resource for FIFO regs
  Input: wm97xx - get rid of irq_enable method in wm97xx_mach_ops
  Input: wm97xx - switch to using threaded IRQ
  ...
2022-06-02 15:23:54 -07:00
Linus Torvalds 1ff7bc3ba7 More power management updates for 5.19-rc1
- Add Tegra234 cpufreq support (Sumit Gupta).
 
  - Clean up and enhance the Mediatek cpufreq driver (Wan Jiabing,
    Rex-BC Chen, and Jia-Wei Chang).
 
  - Fix up the CPPC cpufreq driver after recent changes (Zheng Bin,
    Pierre Gondois).
 
  - Minor update to dt-binding for Qcom's opp-v2-kryo-cpu (Yassine
    Oudjana).
 
  - Use list iterator only inside the list_for_each_entry loop (Xiaomeng
    Tong, and Jakob Koschel).
 
  - New APIs related to finding OPP based on interconnect bandwidth
    (Krzysztof Kozlowski).
 
  - Fix the missing of_node_put() in _bandwidth_supported() (Dan
    Carpenter).
 
  - Cleanups (Krzysztof Kozlowski, and Viresh Kumar).
 
  - Add Out of Band mode description to the intel-speed-select utility
    documentation (Srinivas Pandruvada).
 
  - Add power sequences support to the system reboot and power off
    code and make related platform-specific changes for multiple
    platforms (Dmitry Osipenko, Geert Uytterhoeven).
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmKU8lESHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxVz0P91LNCbkDSt60jzNkXdEjsvUnI/YjJ+QJ
 /+ta7iCwf90obb6s9soBkTyU8Ia7hJ/IWDJW/5xhdG0ySYF17hGNIGKK9xKGsJFK
 tzzWtjFsvT3PeUZQERekqWp8OYskHYmQMj8o4jqqFF7DZD/AswTgkVLALUd7YhVL
 UvLmcKsUA7eXy3ZrhtrGSzVSEbKOGXBLFyjy3IuWjfz6Uk/nGQRNKGf7byRWLM44
 y7zb75/5+p4MPyyJP8M/uiXzEYDKuubRtfx9PdmLgBUSMbtho6eB1x47dZWooaxe
 YKmcFjF80AmnwxHb+Te2rZHPeIYr+5hLBaEq7xaLQf/nAS3y5z1PIfI2wVQ5mXPz
 D599jHHda/6oSAKCVTq2fKfnlR6fetm5j66xOQINpD+G5b5tNSpllXJDamFZxFgP
 DiQAOFzdnRYnK7yTiLWVl1q76SVRxqsGz7/5Ak+NRj2OQK2wRkLzHuZfiV/8r0pk
 ksi6Ew9TerXkstoTQsSToPQxB2VvosSajNU3Oy27pmM0oal1XxP0LIPz9sMor5/g
 tfk5f6Yz/+FFIfXj3cZffZNdhsJgejmcqPdrSdCOV3sBrblnIMQNpHiYg4jGztoj
 IjYKYPVpSaWiSZLQOaK2moTEvm9CfQz1TQCF+/Kz88LX6/7ZaDJFxHG2FDEob0sg
 6KVbrZWweLI=
 =PAh+
 -----END PGP SIGNATURE-----

Merge tag 'pm-5.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more power management updates from Rafael Wysocki:
 "These update the ARM cpufreq drivers and fix up the CPPC cpufreq
  driver after recent changes, update the OPP code and PM documentation
  and add power sequences support to the system reboot and power off
  code.

  Specifics:

   - Add Tegra234 cpufreq support (Sumit Gupta)

   - Clean up and enhance the Mediatek cpufreq driver (Wan Jiabing,
     Rex-BC Chen, and Jia-Wei Chang)

   - Fix up the CPPC cpufreq driver after recent changes (Zheng Bin,
     Pierre Gondois)

   - Minor update to dt-binding for Qcom's opp-v2-kryo-cpu (Yassine
     Oudjana)

   - Use list iterator only inside the list_for_each_entry loop
     (Xiaomeng Tong, and Jakob Koschel)

   - New APIs related to finding OPP based on interconnect bandwidth
     (Krzysztof Kozlowski)

   - Fix the missing of_node_put() in _bandwidth_supported() (Dan
     Carpenter)

   - Cleanups (Krzysztof Kozlowski, and Viresh Kumar)

   - Add Out of Band mode description to the intel-speed-select utility
     documentation (Srinivas Pandruvada)

   - Add power sequences support to the system reboot and power off code
     and make related platform-specific changes for multiple platforms
     (Dmitry Osipenko, Geert Uytterhoeven)"

* tag 'pm-5.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (60 commits)
  cpufreq: CPPC: Fix unused-function warning
  cpufreq: CPPC: Fix build error without CONFIG_ACPI_CPPC_CPUFREQ_FIE
  Documentation: admin-guide: PM: Add Out of Band mode
  kernel/reboot: Change registration order of legacy power-off handler
  m68k: virt: Switch to new sys-off handler API
  kernel/reboot: Add devm_register_restart_handler()
  kernel/reboot: Add devm_register_power_off_handler()
  soc/tegra: pmc: Use sys-off handler API to power off Nexus 7 properly
  reboot: Remove pm_power_off_prepare()
  regulator: pfuze100: Use devm_register_sys_off_handler()
  ACPI: power: Switch to sys-off handler API
  memory: emif: Use kernel_can_power_off()
  mips: Use do_kernel_power_off()
  ia64: Use do_kernel_power_off()
  x86: Use do_kernel_power_off()
  sh: Use do_kernel_power_off()
  m68k: Switch to new sys-off handler API
  powerpc: Use do_kernel_power_off()
  xen/x86: Use do_kernel_power_off()
  parisc: Use do_kernel_power_off()
  ...
2022-05-30 11:37:26 -07:00
Arnd Bergmann 4a4e81ddb8 Refcount leak for a used of-node in the grf-init.
-----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmKD9OcQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgZDNB/9QBkDadcTEzn1GpRDZb8b4tpBrBiyYzNEl
 458EpbcqHi40HejXq4ZlzdniyZtl1eeRGd76aXpmc5azHPK+DhjvChKfhV+YWi/y
 aTJtLIreZEZuu3TH74PVrHr81sj+5TuZBVat5M3/dGNzIEkTm6CsiM07U9h2f5sD
 uktLk1aUioC5DRMxHCrEtmZmsiQT/uukwwiNVckuSjiRRlVlTd1NFzKqggs1yqNh
 TSQ3d/vnl1C+nw7ErwludYVtkUiVpoShKQp8GCvAMXo4aPuxEnto87UvOsdbibJW
 Xp8R/NuoE7W+iXLvwg4AuHS27/8oyJfxIt2PDA1Cw57A1oumtVeG
 =fSY+
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmKRMmQACgkQmmx57+YA
 GNmu6w/+JD6MYF81WZEUosKh7qOjfuLMAsJvjAV/x3ibYHIM7NBF6PwarDqAN5Z7
 QNNGDK4kVF5IJBWHohWVk0YhR8JKkwWSFlaGJxwRTRGoKEfK3aAH5en5yCrxDRRO
 Vsft5DT2fxELhE2bD8VweqPrKibH6nKUwadfAzWLdKBFFITU/lv2hDU4HL+ett0t
 Rlppu2lu674iWD18W8q8ozpZArchgQ76vW2ZfYoq8vNVY1B6WxjmdGKw9brMBqaM
 dd03tEJ1qaL8j6eO91GfEHGWm8+rL5QLTILNSZ9ma/vg/RaXyn18VCuuU+hG06DK
 aLsplf7GXNxcR/QVWEeT9vUCzGCQAr9EGyZ33qgmZv/bBhfTQOcGuE76SKxbn/6I
 eBFFPoM9dHtk2GM3qhTARHa4UqSWD6lfFGD0NhDBpVVHUN3N4RFXVuoOradz2Oj3
 DvBRyysYmkVzGOzHaqCjRz0A08Gms6U1KwHt0+4Fwf0kcs+zdvLS7mkVHOF5LuVY
 5XVgp+Z8eZtOH1utoC8/bXcGymi2ij8GHZ5PCG3piYalriTuvZExZThnKzpcMQ4A
 HVmfMJ9oroUArmgzbEHGBWSR8QQa6OCEoRHPj9gJGaKaTqNJTybNxhlk58qI7twP
 EfJ7MGQlpE6dRcAuL1tVD0CqFyGEO7pMwUNDLY0ltD7gMOYDA5k=
 =qzen
 -----END PGP SIGNATURE-----

Merge tag 'v5.19-rockchip-drivers2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/late

Refcount leak for a used of-node in the grf-init.

* tag 'v5.19-rockchip-drivers2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  soc: rockchip: Fix refcount leak in rockchip_grf_init

Link: https://lore.kernel.org/r/4541398.Icojqenx9y@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-27 22:19:48 +02:00
Linus Walleij 526f3f3b10
soc: ixp4xx/qmgr: Fix unused match warning
The kernel test robot found this inconsistency:

>> drivers/soc/ixp4xx/ixp4xx-npe.c:737:34: warning:
  'ixp4xx_npe_of_match' defined but not used [-Wunused-const-variable=]
     737 | static const struct of_device_id ixp4xx_npe_of_match[] = {

This is because the match is enclosed in the of_match_ptr()
which compiles into NULL when OF is disabled and this
is unnecessary.

Fix it by dropping of_match_ptr() around the match.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220523085520.913217-1-linus.walleij@linaro.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-27 16:02:21 +02:00
Linus Torvalds cc3c470ae4 ARM: driver changes for 5.19
There are minor updates to SoC specific drivers for chips by Rockchip,
 Samsung, NVIDIA, TI, NXP, i.MX, Qualcomm, and Broadcom. Noteworthy
 driver changes include:
 
 - Several conversions of DT bindings to yaml format.
 
 - Renesas adds driver support for R-Car V4H, RZ/V2M and RZ/G2UL SoCs.
 
 - Qualcomm adds a bus driver for the SSC (Snapdragon Sensor Core),
   and support for more chips in the RPMh power domains and the soc-id.
 
 - NXP has a new driver for the HDMI blk-ctrl on i.MX8MP.
 
 - Apple M1 gains support for the on-chip NVMe controller, making it
   possible to finally use the internal disks. This also includes SoC
   drivers for their RTKit IPC and for the SART DMA address filter.
 
 For other subsystems that merge their drivers through the SoC tree,
 we have
 
 - Firmware drivers for the ARM firmware stack including TEE, OP-TEE,
   SCMI and FF-A get a number of smaller updates and cleanups. OP-TEE
   now has a cache for firmware argument structures as an optimization,
   and SCMI now supports the 3.1 version of the specification.
 
 - Reset controller updates to Amlogic, ASpeed, Renesas and ACPI drivers
 
 - Memory controller updates for Tegra, and a few updates for other
   platforms.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmKOXOoACgkQmmx57+YA
 GNlpVQ//eQGfL0WktE5G/y0mCVuVHtXT5nSjHMgjTOdb9+QvaATCfxnLXvP7Gq7C
 7YzJd68G+2ZC4rUkkjTxyMICT7eIrJSAIAFn4PWee4EQ5DfbHgG+1tToTjxqb+QQ
 6wGB5MVaYUhjZE30kY2E8a+OKxHtEnkt9wcch6ei0vzsMZquQJF6byfHd5+I4Knd
 CyDmXX8ZGXK3FnhvuBLr3Rgwyhs0X4Ju7UaONLZxBYxdnh8WmymRszmMnv5qEkub
 KDe8fbhFamOT3Z55JdCA5xq7LvUzjsKpTGFxFcS0ptbkTmtAsuyYqqiWvAPx3D5u
 5TxVGSx9QKid6fpIsITZ2ptO6fgljh1W9b/3Y3/eltudXsM1qqSxyN2Hre+M9egf
 WEDADqbNR5Y5+bq1iZWI348jXkNHVPpsLHI9Ihqf4yyrKwFkmRmNLnws53XTAPH2
 FPXZvJjwFDBDHGfewSoLFePXUPNytVLXbr6Mq72ZyTDIBDU8Mxh666Wd8bu4tgbG
 1Y2pMjDIdXDOsljM6Of5D3XjM1kuDwEmFxWGy+cKLgoEbHLeE1xIbTjUir4687+d
 VNHdtsIRFPRZzz2lUSmI8vlA2aewMWrkOF/Ulz8xh6gG8uitMSfOxghg4IWOfRVM
 mlvgFP5eqTInmQcbWRxaRO9JzP+rPp1sAcEpsBmuEHw5Akflbc8=
 =XoLF
 -----END PGP SIGNATURE-----

Merge tag 'arm-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM driver updates from Arnd Bergmann:
 "There are minor updates to SoC specific drivers for chips by Rockchip,
  Samsung, NVIDIA, TI, NXP, i.MX, Qualcomm, and Broadcom.

  Noteworthy driver changes include:

   - Several conversions of DT bindings to yaml format.

   - Renesas adds driver support for R-Car V4H, RZ/V2M and RZ/G2UL SoCs.

   - Qualcomm adds a bus driver for the SSC (Snapdragon Sensor Core),
     and support for more chips in the RPMh power domains and the
     soc-id.

   - NXP has a new driver for the HDMI blk-ctrl on i.MX8MP.

   - Apple M1 gains support for the on-chip NVMe controller, making it
     possible to finally use the internal disks. This also includes SoC
     drivers for their RTKit IPC and for the SART DMA address filter.

  For other subsystems that merge their drivers through the SoC tree, we
  have

   - Firmware drivers for the ARM firmware stack including TEE, OP-TEE,
     SCMI and FF-A get a number of smaller updates and cleanups. OP-TEE
     now has a cache for firmware argument structures as an
     optimization, and SCMI now supports the 3.1 version of the
     specification.

   - Reset controller updates to Amlogic, ASpeed, Renesas and ACPI
     drivers

   - Memory controller updates for Tegra, and a few updates for other
     platforms"

* tag 'arm-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (159 commits)
  memory: tegra: Add MC error logging on Tegra186 onward
  memory: tegra: Add memory controller channels support
  memory: tegra: Add APE memory clients for Tegra234
  memory: tegra: Add Tegra234 support
  nvme-apple: fix sparse endianess warnings
  soc/tegra: pmc: Document core domain fields
  soc: qcom: pdr: use static for servreg_* variables
  soc: imx: fix semicolon.cocci warnings
  soc: renesas: R-Car V3U is R-Car Gen4
  soc: imx: add i.MX8MP HDMI blk-ctrl
  soc: imx: imx8m-blk-ctrl: Add i.MX8MP media blk-ctrl
  soc: imx: add i.MX8MP HSIO blk-ctrl
  soc: imx: imx8m-blk-ctrl: set power device name
  soc: qcom: llcc: Add sc8180x and sc8280xp configurations
  dt-bindings: arm: msm: Add sc8180x and sc8280xp LLCC compatibles
  soc/tegra: pmc: Select REGMAP
  dt-bindings: reset: st,sti-powerdown: Convert to yaml
  dt-bindings: reset: st,sti-picophyreset: Convert to yaml
  dt-bindings: reset: socfpga: Convert to yaml
  dt-bindings: reset: snps,axs10x-reset: Convert to yaml
  ...
2022-05-26 10:32:47 -07:00
Linus Torvalds c011dd537f ARM: updates for 32-bit SoCs
These updates are for platform specific code in arch/arm/, mostly fixing
 minor issues. The at91 platform gains support for better power
 management on the lan966 platform and new firmware on the sama5
 platform. The mediatek soc drivers in turn are enabled for the new
 mt8195 SoC.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmKORHMACgkQmmx57+YA
 GNnKYA//QhTTZePOMqHZHBVU4dqJuHrjd+rwME5u7a6hqSe3VYaFao6LF+P5fAzR
 IWk8svgCJLIdRx4tnA+kE7LIBsJoPwXYxhGUlgM5CfrxYClQuofnWP58Z+EbIAXx
 VIboLBW1Anw5y7zw+0JkB01DMuGzDDFnUJ4Y+0M3aW3VGC8wJXc+dM+t8BWOn7OW
 DNTcXfJgkRJBtzT++tMU4Z7Kmn//i4xohuT7dwJW4vvIfTL350Bl5Z1EHGnScfMk
 HgbJD5iF7Z12jj7ureuWengr/MN1eAPs18ZdWRcmo4Ie5IDWB50dMoYifjp/tslO
 oXRODrGCuX9yOjcjleGU1mAbb7zqoaThZcbI0yjVOaVwyU0fQR9NFJTqmSEEX97p
 LPZHU1CtAjRns7BW3ons9wPhy4s1xSPopJaHiXDwMMzAlx+kTcoFlFFvWCSlrcOC
 MMo+eN1BQ3SbIxi3Ji3p6MnmSLIiE/wq4nKCEagKAv+AjtqRXYDIsT+28A96Xgeo
 1R5agDamDMp0h6ZrhHMGSIgppWe+qvX14Jp3Hw0Nocgdyf8ABDR9H3/gZasXKbZu
 LrbNLn3vNVKTMn9YpM0T94Uwf0nFPH6MOzFVmjahRute3TU7ioSXxbVPpNuiOkXj
 RFXe1YUoILjLJgHZSUEpdHP+meGUjeScHTQt6jV97WfTeq2ZALg=
 =Eoh1
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull 32-bit ARM SoC updates from Arnd Bergmann:
 "These updates are for platform specific code in arch/arm/, mostly
  fixing minor issues.

  The at91 platform gains support for better power management on the
  lan966 platform and new firmware on the sama5 platform. The mediatek
  soc drivers in turn are enabled for the new mt8195 SoC"

* tag 'arm-soc-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (34 commits)
  ARM: at91: debug: add lan966 support
  ARM: at91: pm: add support for sama5d2 secure suspend
  ARM: at91: add code to handle secure calls
  ARM: at91: Kconfig: implement PIT64B selection
  ARM: at91: pm: add quirks for pm
  ARM: at91: pm: use kernel documentation style
  ARM: at91: pm: introduce macros for pm mode replacement
  ARM: at91: pm: keep documentation inline with structure members
  orion5x: fix typos in comments
  ARM: hisi: Add missing of_node_put after of_find_compatible_node
  ARM: shmobile: rcar-gen2: Drop comma after OF match table sentinel
  ARM: shmobile: Drop commas after dt_compat sentinels
  soc: mediatek: mutex: remove mt8195 MOD0 and SOF0 definition
  MAINTAINERS: Add Broadcom BCMBCA entry
  arm: bcmbca: add arch bcmbca machine entry
  MAINTAINERS: Broadcom internal lists aren't maintainers
  dt-bindings: pwrap: mediatek: Update pwrap document for mt8195
  soc: mediatek: add DDP_DOMPONENT_DITHER0 enum for mt8195 vdosys0
  soc: mediatek: add mtk-mutex support for mt8195 vdosys0
  soc: mediatek: add mtk-mmsys support for mt8195 vdosys0
  ...
2022-05-26 10:25:22 -07:00
Rafael J. Wysocki 14c03a4a75 Merge back reboot/poweroff notifiers rework for 5.19-rc1. 2022-05-25 14:38:29 +02:00
Miaoqian Lin a2106f3807 meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init
of_find_matching_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: 5e68c0fc8d ("soc: amlogic: Add Meson6/Meson8/Meson8b/Meson8m2 SoC Information driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20220524065729.33689-1-linmq006@gmail.com
2022-05-25 09:19:01 +02:00
Dmitry Osipenko eae813b755 soc/tegra: pmc: Use sys-off handler API to power off Nexus 7 properly
Nexus 7 Android tablet can be turned off using a special bootloader
command which is conveyed to bootloader by putting magic value into the
special scratch register and then rebooting normally. This power-off
method should be invoked if USB cable is connected. Bootloader then will
display battery status and power off the device. This behaviour is
borrowed from downstream kernel and matches user expectations, otherwise
it looks like device got hung during power-off and it may wake up on
USB disconnect.

Switch PMC driver to sys-off handler API, which provides drivers with
chained power-off callbacks functionality that is required for powering-off
devices properly. It also brings resource-managed API for the restart
handler registration that makes PMC driver code cleaner.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-05-19 19:30:31 +02:00
Abhyuday Godhasara e6d3c99adf driver: soc: xilinx: Update function prototype for xlnx_unregister_event
As per the current implementation only single callback data gets saved per
event, driver is throwing an error if try to register multiple callback for
same event. So at time of unregistration of any event required things are
event details and callback handler as parameter of xlnx_unregister_event().

As part of adding support of multiple callbacks for same event also require
change in prototype of xlnx_unregister_event().
During unregistration of any events, now required things are event details,
callback handler and agent's private data as parameter of
xlnx_unregister_event().

Also modify the usage of xlnx_unregister_event() in xilinx/zynqmp_power.c
driver as per new implementation.

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Link: https://lore.kernel.org/r/20220427074803.19009-3-abhyuday.godhasara@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-19 18:57:28 +02:00
Abhyuday Godhasara 05e5ba40ea driver: soc: xilinx: Add support of multiple callbacks for same event in event management driver
As per the current implementation of only single callback data gets
saved per event, driver is throwing an error if try to register multiple
callback for same event.

Add support of multiple callbacks data for same event. So agent can
register for same event with multiple callbacks. Here event management
driver will store the callbacks as list in Hash table entry for that event.

Here each callback data contain 2 element as callback handler and private
data of agent driver.

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Link: https://lore.kernel.org/r/20220427074803.19009-2-abhyuday.godhasara@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-19 18:57:28 +02:00
Rafael J. Wysocki d44d6c4a3a Update devfreq next for v5.19
Detailed description for this pull request:
 1. Update devfreq core
 - Add cpu based scaling support to passive governor. Some device like
 cache might require the dynamic frequency scaling. But, it has very
 tightly to cpu frequency. So that use passive governor to scale
 the frequency according to current cpu frequency.
 
 To decide the frequency of the device, the governor does one of the following:
 : Derives the optimal devfreq device opp from required-opps property of
   the parent cpu opp_table.
 
 : Scales the device frequency in proportion to the CPU frequency. So, if
   the CPUs are running at their max frequency, the device runs at its
   max frequency. If the CPUs are running at their min frequency, the
   device runs at its min frequency. It is interpolated for frequencies
   in between.
 
 2. Update devfreq driver
 - Update rk3399_dmc.c as following:
 : Convert dt-binding document to YAML and deprecate unused properties.
 
 : Use Hz units for the device-tree properties of rk3399_dmc.
 
 : rk3399_dmc is able to set the idle time before changing the dmc clock.
   Specify idle time parameters by using nano-second unit on dt bidning.
 
 : Add new disable-freq properties to optimize the power-saving feature
   of rk3399_dmc.
 
 : Disable devfreq-event device on remove() to fix unbalanced
   enable-disable count.
 
 : Use devm_pm_opp_of_add_table()
 
 : Block PMU (Power-Management Unit) transitions when scaling frequency
   by ARM Trust Firmware in order to fix the conflict between PMU and DMC
   (Dynamic Memory Controller).
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEsSpuqBtbWtRe4rLGnM3fLN7rz1MFAmKDddYWHGN3MDAuY2hv
 aUBzYW1zdW5nLmNvbQAKCRCczd8s3uvPU1o0EACGE7FV/pA/sbOFhhLXQlI1XMQf
 C2XVvjigP5M7Y9qgM6qLBKCSmRPbBjuO4VLKkIycmo2GRcUs+Sk5CqALjWZF0tDR
 aiAV+P3wIC2pCZNtAXJG6BhP5GNzGYYdv2zJfNmVUsYUYVC3ezppuE1Yp2Sscq5t
 K43eAOq0c9+TTeLfdDKdi07QtevMHwbOxjNUhwnzN5+yD9cknK1Ht5FVjDc8eYTG
 yBJPgMy9qhNqEZ4gl9zpKJkpAJMOhquT4ZtytNioIfnmKCrpyiOy+yApvW5WiU1d
 /8KMiG42C47rUBYCiEGEdn6PaTOpuOK0hnuoxlxE07dqJP349SbozFTqZxfbCJhI
 OjZSdLTolPFq82zuAafBJmijmeAiYdI0FKrhXmQo4doeleIQG9z0h8YpkQSnF47L
 xsj7QswD0LxtMQbYv5zds1NoGnUn/U+TpoJ8mbpg5gPWKaBTNdTZFJQj+HXtrDyy
 1ouR41u6kOoLLDHu2I5f9dTMptJRg3jS+kQfDv17K8u5mAmcwFidpOiyac6m2xad
 Nnn85NAE9JaxpzVe3+S3uQdscEe2FBWEZCkbrCcPn2T88BZwrfcby02YRBw22WkS
 p4xPAOncw4lhZ6z3pedcH/1+kk6uoTube5QK8ddSRxYrRavtOsqchAaec+hYRNif
 CbjJOqsdbDLa7ANLxw==
 =/3W8
 -----END PGP SIGNATURE-----

Merge tag 'devfreq-next-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux

Pull devfreq changes for 5.19-rc1 from Chanwoo Choi:

"1. Update devfreq core

 - Add cpu based scaling support to passive governor. Some device like
   cache might require the dynamic frequency scaling. But, it has very
   tightly to cpu frequency. So that use passive governor to scale
   the frequency according to current cpu frequency.

  To decide the frequency of the device, the governor does one of the following:
  : Derives the optimal devfreq device opp from required-opps property of
    the parent cpu opp_table.

  : Scales the device frequency in proportion to the CPU frequency. So, if
    the CPUs are running at their max frequency, the device runs at its
    max frequency. If the CPUs are running at their min frequency, the
    device runs at its min frequency. It is interpolated for frequencies
    in between.

 2. Update devfreq drivers

  - Update rk3399_dmc.c as following:

   : Convert dt-binding document to YAML and deprecate unused properties.

   : Use Hz units for the device-tree properties of rk3399_dmc.

   : rk3399_dmc is able to set the idle time before changing the dmc clock.
     Specify idle time parameters by using nano-second unit on dt bidning.

   : Add new disable-freq properties to optimize the power-saving feature
     of rk3399_dmc.

   : Disable devfreq-event device on remove() to fix unbalanced
     enable-disable count.

   : Use devm_pm_opp_of_add_table()

   : Block PMU (Power-Management Unit) transitions when scaling frequency
     by ARM Trust Firmware in order to fix the conflict between PMU and DMC
     (Dynamic Memory Controller)."

* tag 'devfreq-next-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux:
  PM / devfreq: passive: Keep cpufreq_policy for possible cpus
  PM / devfreq: passive: Reduce duplicate code when passive_devfreq case
  PM / devfreq: Add cpu based scaling support to passive governor
  PM / devfreq: Export devfreq_get_freq_range symbol within devfreq
  PM / devfreq: rk3399_dmc: Block PMU during transitions
  soc: rockchip: power-domain: Manage resource conflicts with firmware
  PM / devfreq: rk3399_dmc: Avoid static (reused) profile
  PM / devfreq: rk3399_dmc: Use devm_pm_opp_of_add_table()
  PM / devfreq: rk3399_dmc: Disable edev on remove()
  PM / devfreq: rk3399_dmc: Support new *-ns properties
  PM / devfreq: rk3399_dmc: Support new disable-freq properties
  PM / devfreq: rk3399_dmc: Use bitfield macro definitions for ODT_PD
  PM / devfreq: rk3399_dmc: Drop excess timing properties
  PM / devfreq: rk3399_dmc: Drop undocumented ondemand DT props
  dt-bindings: devfreq: rk3399_dmc: Add more disable-freq properties
  dt-bindings: devfreq: rk3399_dmc: Specify idle params in nanoseconds
  dt-bindings: devfreq: rk3399_dmc: Fix Hz units
  dt-bindings: devfreq: rk3399_dmc: Deprecate unused/redundant properties
  dt-bindings: devfreq: rk3399_dmc: Convert to YAML
2022-05-18 20:55:34 +02:00
Miaoqian Lin 9b59588d8b soc: rockchip: Fix refcount leak in rockchip_grf_init
of_find_matching_node_and_match returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: 4c58063d42 ("soc: rockchip: add driver handling grf setup")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220516072013.19731-1-linmq006@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-05-17 10:49:37 +02:00
Arnd Bergmann d4a3b44233 Powerdomain fixes and improvements, some GRF compatible properties
and a rk3566 GRF clocksource default setup.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmJ8Q84QHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgT31B/9d8fq4fBg9mkF6s0CtFMzw/KOO0ybaxcmx
 6KmIbFPOFJfhgXf1EZOl5S555XiIK4Sj24PQA8ySCnu/8jt9SV3dss5rTnaEiG+b
 TTxzndBFITLunvqMNa0wSSeGyQP1Hh5Y9QAEQS9Xy+L4Hnn1t+F8dX92JUEHos9E
 Ox9mPAiTN/dj/FFT8gYTv4gEIwtxf3y0VpwdejeyLkOmIHiwK/Te1nclty9q9aMM
 2OQsSZdF0cAV2oxjEaeVoTRowAWqrlY+RF0px12RFAa/CwrNkW57qHCWKfCjfmoI
 WIJ44bxPWF4OhEG4/sRTYRysklofGRw3dtQSxZlUKbMy9v67pyFU
 =vglc
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ+JfUACgkQmmx57+YA
 GNkU7w//ZhChli63CICSuwykKyvgp7esVMmjUZ08WpPHAPrvG/CBKO3QkQbqcixY
 DTtWNnZau4gOEizOmLn7McvSe3K6f1C3HGtgoNIt7JhQFe0b7zDZ9/xRv7lE/u5a
 XxnS/0s/JYzkzXsfsSLEvzV+9cgsRQyO5gD3ZlAtPpbHReNCFjcA44Bzk5eoXgY9
 ZTL/8yryreHc6cnOiERaKyf3+lTfAXcF6gk0q07psFT61ofl4BwQVNe+esKDiU3l
 DqekGWDfF0HWLYWmhXqmFPVIgnuRzlbvBpkb6R8QgTxIvopKWeUFs2GoqPKs1bln
 sVsevaW4GSO138J0K2l+SeeW/KVskSGblZlVEtlQhztD3yOhuVnVabKu+Mc3rNaC
 LzKgt0qjzddtHGwPMbvQdig/XkgCMIy8ZTPLn73BH8kQGmBORBc+pvTlhsgvXCXc
 t/4ixo3jOjDo+fRe2/4cNpPOSqj0Wdm8WYGdwuLs6K42EH553MtVFGLOVN45+Dzd
 5pwzOf9UaDtOcGDQ0mpJztNKWhAn3j6RyvnLnBqDS+pE1Evf5hu1zvRAXaNNKw7b
 9L08VMf27d1eZQqsc3vTBb/M/YNV9zq4DwcaJJCpISCRlDQDqIEUdJSlG3rjV2jo
 YIL85kEnYnx0iuHJYN24JtymttXykdx8Qsk6M8wFkxu/QC7rWZ8=
 =M9KR
 -----END PGP SIGNATURE-----

Merge tag 'v5.19-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/drivers

Powerdomain fixes and improvements, some GRF compatible properties
and a rk3566 GRF clocksource default setup.

* tag 'v5.19-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  soc: rockchip: Fix compile-testing SoC drivers
  soc: rockchip: power-domain: Replace dsb() with smb()
  soc: rockchip: Clean up Kconfig whitespace
  soc: rockchip: set dwc3 clock for rk3566
  dt-bindings: soc: rockchip: add rk3566-pipe-grf compatible
  soc: rockchip: pm_domains: Fix typo in comment
  dt-bindings: soc: rockchip: add naneng combo phy register compatible

Link: https://lore.kernel.org/r/3998951.tdWV9SEqCh@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-13 11:33:41 +02:00
Arnd Bergmann 3f656f2618 Qualcomm driver updates for v5.19
This converts a wide range of Qualcomm-related DeviceTree bindings to
 YAML, in order to improve our ability to validate the DeviceTree source.
 
 The RPMh power-domain driver gains support for the modem platform SDX65,
 the compute platform SC8280XP and the automotive platform SA8540p. While
 LLCC gains support for SC8180X and SC8280XP and gains a
 MODULE_DEVICE_TABLE() to make it functional as a module.
 
 It adds a driver for configuring the SSC bus, providing Linux access to
 the hardware blocks in the sensor subsystem.
 
 The socinfo driver gets confusion related to MSM8974 Pro sorted out and
 adds new ids for SM8540 and SC7280.
 
 The SCM driver gains support for MSM8974.
 
 Add missing of_node_put() in smp2p and smsm drivers.
 Stop using iterator after list_for_each_entry() and define static
 definitions as such, in the PDR driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmJ5WsYbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FIo8P+wcc78TQQuG67nqPr2gb
 QFqVK8U2mz07XW0H1rnGZKsTSrZxFs/YWRBaw+dYC5OZVJHx/uoZM04Njsyy/DFh
 UaNQgTgsS4+D5+butveh4lBdmk4ja5sreLHw25/azw5VBzeHb9+4HeAd7QMMQ+BO
 /EvIlykPwsgGIZwabzDHkY8w/xt64CPiajps1qGlFDJedSLsdJ8bKHctvcFD03v3
 3utJku3jAc5SZMBQgDttpPwpn7UnHXjCvWxyz8oSFaWDQBROztH0FbiJsZnjMuFI
 9RfRqblgb2PkvaG23W7jv68aJf3yQ6siY8ezPPs3/1F6T6tMQaAKEhwrY93ZQiWc
 gDDx33TvX3YJiRRdC2Gvg1QpL4xMFUERR8o4ooQ0t+b8bG6TkGP44VVg3/n1wrMK
 Q5xdgDigfrNnVZV1b2flQHc4qke4hNoV23SQ7iFWvtSJO09xklVJhXFGQ6mthEkb
 PnBFurLyxglKw6afs1/2P8tplS52K0l19lgNJu6vtUzC6fMOg50cX0mmWP8+rkFb
 njhXlPqCDataECZazyxnn7KORAn3E7zQceJ/LJeV+XZ9i5DJLXup+JkuBCWem4Nd
 ucEeYtQVRel5FCWZZzkXviPCTlWgTB7ya7pJPCzvZpnNFHeSWSjr9YK6xtWwy9rP
 CBRXYrz2gJLV/MGkB1piAwkm
 =/Dqp
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5hB4ACgkQmmx57+YA
 GNksBxAAj09+d2U1sFSJl3HiHTrXyg3MYoG0dA1QK2CRKucdwMf6KBGpEHTQyL6a
 Iqan6URrTqEM3WP4suBsZh8vbv1C8u7KGWwDAMqJ18BkigoGHEV1PyvmHYRvPoT2
 6DSHAkGbYfDglxXZ4JcxNaQk3+t6rZpe5LcRRgQ7JpoKfzlqKxfSJfPFLzYAvhSV
 qThiyd3GvfcgkVHL9noh4BrBrnNRj7wMzUwQnhW5aWebN+DqgG8zlzmmZEQx61uR
 sjMogRZNpGXVAR+4yvPZNoxTGM0plssxlkDQGS4b0XLP1t7ohr22eFPTrWqcsYCi
 h4fa3nXxUIoTDJXQ7nmU04VXp5xVUtQKKe+zXIvQBT98OkM1f6ep5i7rrEh5DZxJ
 TWVdRLuIVpHVsVARqq+qpEnwyDeiF3Hgmope3xPYhEIs1WcIOQzWBjHbNTNeiFdy
 fQMrmAQjirXJBV18ImRSMcAXW+Shc72vnj6fViQcrL5Pzj1HJFMjh/bpPzAhIUYJ
 w9to8mpNgHUpMwnkfMUqQDV6FANVbYPqancK/z4rEPd8mj6bq1z2GEQq2e9+cAfM
 imyD30+g7fm7e4mxp53mv/oxqf4NJExE0eIjXAQY53at0TCk+ngsxJd96Wz3aIpB
 eL9YN5x+y6vXkFC+hsnX2/QdUiVCmfpbrez2QqzoZncSkJ4mjdI=
 =rjVH
 -----END PGP SIGNATURE-----

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

Qualcomm driver updates for v5.19

This converts a wide range of Qualcomm-related DeviceTree bindings to
YAML, in order to improve our ability to validate the DeviceTree source.

The RPMh power-domain driver gains support for the modem platform SDX65,
the compute platform SC8280XP and the automotive platform SA8540p. While
LLCC gains support for SC8180X and SC8280XP and gains a
MODULE_DEVICE_TABLE() to make it functional as a module.

It adds a driver for configuring the SSC bus, providing Linux access to
the hardware blocks in the sensor subsystem.

The socinfo driver gets confusion related to MSM8974 Pro sorted out and
adds new ids for SM8540 and SC7280.

The SCM driver gains support for MSM8974.

Add missing of_node_put() in smp2p and smsm drivers.
Stop using iterator after list_for_each_entry() and define static
definitions as such, in the PDR driver.

* tag 'qcom-drivers-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (33 commits)
  soc: qcom: pdr: use static for servreg_* variables
  soc: qcom: llcc: Add sc8180x and sc8280xp configurations
  dt-bindings: arm: msm: Add sc8180x and sc8280xp LLCC compatibles
  soc: qcom: rpmhpd: add sc8280xp & sa8540p rpmh power-domains
  soc: qcom: rpmhpd: Don't warn about sparse rpmhpd arrays
  dt-bindings: power: rpmpd: Add sc8280xp RPMh power-domains
  spi: dt-bindings: qcom,spi-geni-qcom: convert to dtschema
  soc: qcom: socinfo: Sort out 8974PRO names
  dt-bindings: soc: qcom,smp2p: convert to dtschema
  dt-bindings: qcom: geni-se: Update UART schema reference
  dt-bindings: qcom: geni-se: Update I2C schema reference
  dt-bindings: soc: qcom,rpmh-rsc: convert to dtschema
  bus: add driver for initializing the SSC bus on (some) qcom SoCs
  dt-bindings: bus: add device tree bindings for qcom,ssc-block-bus
  dt-bindings: qcom: qcom,geni-se: refer to dtschema for SPI
  dt-bindings: soc: qcom,smd: convert to dtschema
  firmware: qcom_scm: Add compatible for MSM8976 SoC
  dt-bindings: firmware: qcom-scm: Document msm8976 bindings
  soc: qcom: smem: validate fields of shared structures
  soc: qcom: smem: map only partitions used by local HOST
  ...

Link: https://lore.kernel.org/r/20220509181839.316655-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:14:06 +02:00
Arnd Bergmann 2b6866d70d i.MX drivers update for 5.19:
- A series from Lucas and Paul to update GPCv2 driver for i.MX8MP power
   domains, and add HSIO and HDMI block control support.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmJ3IvYUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM6lhwf7BpYDyiaYHBKQLXWWDZj1QanO6bjM
 fMlxvVdggfeLW6ijerCb+wf2jNQY75lWRRny4x4WWP+sSVZ4u9SUJlxLrwo/aWYr
 44KWWr4PkSMDm5j2bQyy8S9o01ZpxT/FOqqTC51PwgMx7yxB7+d1Z1txWwp5W0jB
 Ps92O4bKRfvCCF7Mgjw3/FDu5iek6+9pHx5dQxQ1CWPuvVJos6M9Ktkv27x3oOvI
 S4v6Y7v5m1WxSjUK2p09pIGP9AJrHhmRNJF3R/ZrXqUKAlpCQFK6DwZ9mY/rfcfj
 tPoqCwj9/UmzG+GlBo8z7I2GQmF7vmwH6bqjP/T6SHOoxE9/fiqT2Swc5A==
 =S4x7
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5g1gACgkQmmx57+YA
 GNmd7A/7BR8AlCUX1H5SrWAiJbu0iR64vXRG+K6iqvEQV99K8zivQ7Sg6D+EwonR
 YiLFOGTkk3O2hfZWbamNGDxmYrcjC5Kg3Zo0ZMJ2Cg91oBNB5olK/9hKOyrIfPMH
 JTZJ/7n7nFi5xUFKBcof3VwNsqsHDp7XGl+jD7la8Dd9m4Yytofz3L4YxQLAkLhU
 fobCmW/Nb9QxoKJL1aa+ix0HzZc00cvnUD3CqxFmqamJVJiPPnLFh+VgvDc1vP2P
 q0bYvXuqL3lXVVbbi3jHqVldCwyzx7egcv72q33yGQPSaNEJ04jV/JUEz6sIj2XI
 HfoQ5iyqczLPZMvJQiXxBsAy9wxde+qoMUwq7OvkLBBF+xEbwrkvp3wTElySRA6Y
 YjP8nf39vuQ7qT9Lj4vNBJvQDoLbrKw+xEnFxjmCdJWgdqxVD0yVnPLjCFvmtFfl
 /b3g8CePnUwupaI4K8nmo9dvMG46oe7xA86M6KphYdIUg0NVB+/kmxMnwSLBZ3Qz
 HRIUyeqV6knzMo413GsQSe9zCiMRcsuDiQ8xHwe5Ko0P8Kr3kyPFX6ofv5D5I54W
 leog0kQU/eYXMEveCqIaxjUFRb9SE8UY9SK//mAqzreLNFT896yG5GeD0WzRxwQl
 oxtn+DdzpRHdjiDnS2OC4v22BvxVb3qLr0rVlCC1V3KFalxyRjU=
 =2GwC
 -----END PGP SIGNATURE-----

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

i.MX drivers update for 5.19:

- A series from Lucas and Paul to update GPCv2 driver for i.MX8MP power
  domains, and add HSIO and HDMI block control support.

* tag 'imx-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  soc: imx: fix semicolon.cocci warnings
  soc: imx: add i.MX8MP HDMI blk-ctrl
  soc: imx: imx8m-blk-ctrl: Add i.MX8MP media blk-ctrl
  soc: imx: add i.MX8MP HSIO blk-ctrl
  dt-bindings: power: imx8mp: add defines for HDMI blk-ctrl domains
  dt-bindings: soc: Add i.MX8MP media block control DT bindings
  soc: imx: imx8m-blk-ctrl: set power device name
  soc: imx: gpcv2: add support for i.MX8MP power domains
  soc: imx: gpcv2: add PGC control register indirection

Link: https://lore.kernel.org/r/20220508033843.2773685-2-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:10:48 +02:00
Arnd Bergmann 1901300bf3 TI Driver updates for v5.19
* wkup_m3: io isolation, voltage scaling, vtt regulator and a debug option to stop m3 in suspend.
 * tisci: support for polled mode for system suspend, reset driver is now enabled for COMPILE_TEST
 * knav, dma.. misc cleanups for IS_ERR, pm_run_time*, and various other fixups.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmJ2m64ACgkQ3bWEnRc2
 JJ0VrxAAkwYvb9VDyF2o0WqJZfllt7KqUXPMZ2ijayNwnDy1EVTmcHgjX7K4hA5Z
 z9RX2kzeCobah2urRWVJvVnfsqUlAQB8xjtg9UMskjoicbmJ1OZ8/eOS+Ctwuco9
 7VNVTDhqu7vIOdOtahJ6M9ajIWJorrWNrXf2s9eZZJLaJ3apGolOY6mqGKURq6QY
 jnLvESmPIEtBrYjWr/dkrrPmGuffygM2i7J6RF9RJ3fKuNX7uS72nnYRHN714WU8
 hRuJG4AaYRaEZmWfByXIktdakHBFiBP2g4Zvkeds8KXtRGoamYrrGXuPE1pb1w4p
 kVhumbktMFMSNf37yWdjwo5M1hemhw6SNR3i/021Bt7DSmA7BC0+iLVDJwA+dsrr
 XoCt8V6s3KydeNRDGYSQVECPExYqVyCp3bnHVWPjfS21zpLPmaOQvTA2TTRb737t
 iRKnprDXAD/ALBq9XZbsC2L8jelcXkCOT/+vpCMR4jjyM8OZcmWFU3Nkgp/Uhst/
 3zaL34i4EzvUlrkuHKu92GdNkzkfdd/bk/Emve+12v54QeyM/go8Tn3DLRsWVvg3
 CRgMY5ldELIsPR3VHSTmE8M0YxpmpxM9ixiM0Yrs/V21EZLdiwejqznM9yaLgwM3
 AwPo/WUImn+l+RINY3VdwoHV4dr6CMxkn2laFcQ/c9KEG39ZWH8=
 =Nlpv
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5gvYACgkQmmx57+YA
 GNlMFRAAhKFLeAl8aXmFzApW0oFLc8cU81wp5cd/5Y/985sph8Lf1TX/ipYxy4oW
 bvq3zhSwS/oxiU7WAPqnOp8zjPmMO5EaK1sbHFT3JgtUVqQk7ZDLs6RMkSbLaXro
 jxYM7UKF8evwTJwBAaXXo9NqXg35Jl24pnZ4oUDib2d5voneOKOpAt1SSqTqUFeT
 y3zlX61j3YANo9KE93ghCON2rq0QSiaq9IUaOcP9BITpM8IjW5yMGmL7/K/GwIxf
 iW5j0yytZ0sh+oA9PGxWvchoQoxgNz3HizC8ksPPoRXFF9umRHZsPRso5NSLCfG7
 9uh6n0dsQ4ua9iTgaMQOCvVsmCY9nawf8xuUxoUCdNK533Pl6T/9gM8D3IwHROLb
 tlk7cW8R5e3CFUL3uKFgmcec/gUAwvraarIkFjwRRpDm68HKWfbU+Ck1BvnaiTje
 mAVi6UewQwjQHL1Q3cpjSAEVlLk0CIEDZtZrgqMyPTl9zfZWkKoFt1XbLM0EMtfw
 LXiFX+wYoHPVIsmRpjh/gQe3BMPNHmYiRHIZFXb+fWZNCIlVXit1yN10WbG+fhC6
 FISfaBj5vSogZ/4kFy8mcD+VsWOsq47cckslQPphRxXGtDfmB/TnQmRAL04D/hlu
 +g7PrPwCIGZL1rbk2eOeZUA56SUyzHa+B21l/6s1F+SnEG+UpZY=
 =7h5b
 -----END PGP SIGNATURE-----

Merge tag 'ti-driver-soc-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/drivers

TI Driver updates for v5.19

* wkup_m3: io isolation, voltage scaling, vtt regulator and a debug option to stop m3 in suspend.
* tisci: support for polled mode for system suspend, reset driver is now enabled for COMPILE_TEST
* knav, dma.. misc cleanups for IS_ERR, pm_run_time*, and various other fixups.

* tag 'ti-driver-soc-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: wkup_m3_ipc: Add debug option to halt m3 in suspend
  soc: ti: wkup_m3_ipc: Add support for i2c voltage scaling
  soc: ti: wkup_m3_ipc: Add support for IO Isolation
  soc: ti: knav_qmss_queue: Use IS_ERR instead of IS_ERR_OR_NULL when checking knav_queue_open() result
  soc: ti: pm33xx: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
  firmware: ti_sci: Switch transport to polled mode during system suspend
  soc: ti: wkup_m3_ipc: Add support for toggling VTT regulator
  soc: ti: knav_qmss_queue: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync
  soc: ti: knav_dma: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync
  reset: ti-sci: Allow building under COMPILE_TEST
  soc: ti: ti_sci_pm_domains: Check for null return of devm_kcalloc
  soc: ti: omap_prm: Use of_device_get_match_data()
  soc: ti: pruss: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
  soc: ti: replace usage of found with dedicated list iterator variable
  soc: ti: wkup_m3_ipc: fix platform_get_irq.cocci warning

Link: https://lore.kernel.org/r/20220507163424.pvqnwrxpoo73lmp2@debtless
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:09:10 +02:00
Brian Norris defec178df soc: rockchip: power-domain: Manage resource conflicts with firmware
On RK3399 platforms, power domains are managed mostly by the kernel
(drivers/soc/rockchip/pm_domains.c), but there are a few exceptions
where ARM Trusted Firmware has to be involved:

(1) system suspend/resume
(2) DRAM DVFS (a.k.a., "ddrfreq")

Exception (1) does not cause much conflict, since the kernel has
quiesced itself by the time we make the relevant PSCI call.

Exception (2) can cause conflict, because of two actions:

(a) ARM Trusted Firmware needs to read/modify/write the PMU_BUS_IDLE_REQ
    register to idle the memory controller domain; the kernel driver
    also has to touch this register for other domains.
(b) ARM Trusted Firmware needs to manage the clocks associated with
    these domains.

To elaborate on (b): idling a power domain has always required ungating
an array of clocks; see this old explanation from Rockchip:
https://lore.kernel.org/linux-arm-kernel/54503C19.9060607@rock-chips.com/

Historically, ARM Trusted Firmware has avoided this issue by using a
special PMU_CRU_GATEDIS_CON0 register -- this register ungates all the
necessary clocks -- when idling the memory controller. Unfortunately,
we've found that this register is not 100% sufficient; it does not turn
the relevant PLLs on [0].

So it's possible to trigger issues with something like the following:

1. enable a power domain (e.g., RK3399_PD_VDU) -- kernel will
   temporarily enable relevant clocks/PLLs, then turn them back off
   2. a PLL (e.g., PLL_NPLL) is part of the clock tree for
      RK3399_PD_VDU's clocks but otherwise unused; NPLL is disabled
3. perform a ddrfreq transition (rk3399_dmcfreq_target() -> ...
   drivers/clk/rockchip/clk-ddr.c / ROCKCHIP_SIP_DRAM_FREQ)
   4. ARM Trusted Firmware unagates VDU clocks (via PMU_CRU_GATEDIS_CON0)
   5. ARM Trusted firmware idles the memory controller domain
   6. Step 5 waits on the VDU domain/clocks, but NPLL is still off

i.e., we hang the system.

So for (b), we need to at a minimum manage the relevant PLLs on behalf
of firmware. It's easier to simply manage the whole clock tree, in a
similar way we do in rockchip_pd_power().

For (a), we need to provide mutual exclusion betwen rockchip_pd_power()
and firmware. To resolve that, we simply grab the PMU mutex and release
it when ddrfreq is done.

The Chromium OS kernel has been carrying versions of part of this hack
for a while, based on some new custom notifiers [1]. I've rewritten as a
simple function call between the drivers, which is OK because:

 * the PMU driver isn't enabled, and we don't have this problem at all
   (the firmware should have left us in an OK state, and there are no
   runtime conflicts); or
 * the PMU driver is present, and is a single instance.

And the power-domain driver cannot be removed, so there's no lifetime
management to worry about.

For completeness, there's a 'dmc_pmu_mutex' to guard (likely
theoretical?) probe()-time races. It's OK for the memory controller
driver to start running before the PMU, because the PMU will avoid any
critical actions during the block() sequence.

[0] The RK3399 TRM for PMU_CRU_GATEDIS_CON0 only talks about ungating
    clocks. Based on experimentation, we've found that it does not power
    up the necessary PLLs.

[1] CHROMIUM: soc: rockchip: power-domain: Add notifier to dmc driver
    https://chromium-review.googlesource.com/q/I242dbd706d352f74ff706f5cbf42ebb92f9bcc60
    Notably, the Chromium solution only handled conflict (a), not (b).
    In practice, item (b) wasn't a problem in many cases because we
    never managed to fully power off PLLs. Now that the (upstream) video
    decoder driver performs runtime clock management, we often power off
    NPLL.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2022-05-09 03:36:52 +09:00
Arnd Bergmann 64dbc4dd7a ARM: pxa: move plat-pxa to drivers/soc/
There are two drivers in arch/arm/plat-pxa: mfp and ssp. Both
of them should ideally not be needed at all, as there are
proper subsystems to replace them.

OTOH, they are self-contained and can simply be normal
SoC drivers, so move them over there to eliminate one more
of the plat-* directories.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> (mach-pxa)
Acked-by: Lubomir Rintel <lkundrak@v3.sk> (mach-mmp)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:56:16 +02:00
Arnd Bergmann 68edb53a4f soc/tegra: Changes for v5.19-rc1
This set of changes adds nvmem cell lookup entries for Tegra194 that are
 used to read calibration data from the SoC fuses, and updates the reset
 sources for Tegra234.
 
 Other than that, included is a minor build fix for a missing dependency
 that can be encountered very rarely in random config builds. Lastly some
 kerneldoc comments are added to avoid build warnings.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmJ1LD8THHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoYh8D/9PZ9Z6MfFP/4mU+LQccO7OW4iw+nUq
 J3LSOby2SRlTBLz0BsgYYoxEd1jDcPTvN9ND9tkmy8I77doVfgq2tcnBxqKZSwdy
 w+mhr68cjx5yy0KieevSb3JSEp6hXL728j1CnxofHFy51NY2yuqcIwNRMEfYYX1d
 UkCGaFnEjU1PvawDSKiruNy2r8oZaPDKXwtkhGxJedQ83CkCtkE2qNHi1GcJogo9
 O8RB7eGIiZflloY83SlhoLm/qILBTGuARKUeXIEC66Ss6tbl1DccJ1i8iZlMr4uV
 mOd+jnCiAkzL+EY9geD8e8cltAPqD5lhIwQB4kseB3Jw0+BRgmSMo/qlKo6zoC2x
 nxaq5haxKAcE+fY1o5/h36hXCD5ZoeSTRlXowyXuLzvLkzhE/tMdC7SqqjTuDMe4
 Yjf4yp50vEnbjdbnSx57yPqT7q1vclcV/or9MkravkV5zSxhzSUgfnuCAabrKNrQ
 a/aiGy1yJD2V3iC1jhTQNaja/e7iUNF+TNmEGLlkZSpLzp9nDHJra5h+BklulGVb
 qApf2o7sc6I5n7iyb+6WypBbHP+sX6PkkNWx4KDvUmsp3jG7LQiJQPdRiq60iicV
 KQ1FqzDjhTyfxxiR2PwDGNZQsyK6DO3qST1oqk3pav55G6aHLsQx4+g3+tFIMhnN
 oXskT6rAWqmjyw==
 =Gmv7
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ1gNEACgkQmmx57+YA
 GNnOGg//bt18Pfhk53a9cLhiJEip4xkJ3uC0mAVZGGWLEGuxSjUDcS2KGnUQNgCV
 2T+WAIcPVW1gpoQriDGqEJtDGSeiwSqGFuyndeAJZLZunPB4hGcUA/js21yhfZNb
 DVPyi9MT2DHQLIveSN3BFOjulBsKTNG86MZ9Y/wlboDZCEblIzutnx7E2BKULrlj
 8FADgd0Smk4giUoucelfn8Vt0B4ECl4+PZOpM5Gau3iTd2Ku++Sd42NZEIv4QFOx
 7/WJAhDsFc/ZH1D7eJZl3xAECC9u5+Th3ulGFIE0YqmmKOPSTumIX0C1Beg8J9RA
 9V5PQ6zrPoevpFct+JdHmqRDh1XPBp/OrPazj8Kommm3HZaP1mEpBwFswUk9ElkG
 CInmEMRCDl4bZaUcwZX9vkoaKTfILDPQp32nFHZcznkJUu3AVdOz+cS90WSp6vC0
 aX+5PGUv0WAkxXUNP1sNjDn4yLT+lJhGYYsna4ocVLx6UBlDET6VzmXZ4fjojbWh
 3VUC5xCEm+JQBONmbnYNoX8VQe6zkCKruESBpOqNA8+AQfrsRVdqTQ4At40+znJ7
 HmoHVHEvYXE1SJgSo8GisG4hnrrXLWTAkzVfh51YEfXywBLB067ToLquNjS8a0eS
 J/80qkkS5RgOfun0cuGWKRXmvDrzZGQJjhbAdDj4sQSyrNWf1+A=
 =S4fJ
 -----END PGP SIGNATURE-----

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

soc/tegra: Changes for v5.19-rc1

This set of changes adds nvmem cell lookup entries for Tegra194 that are
used to read calibration data from the SoC fuses, and updates the reset
sources for Tegra234.

Other than that, included is a minor build fix for a missing dependency
that can be encountered very rarely in random config builds. Lastly some
kerneldoc comments are added to avoid build warnings.

* tag 'tegra-for-5.19-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Document core domain fields
  soc/tegra: pmc: Select REGMAP
  soc/tegra: pmc: Update Tegra234 reset sources
  soc/tegra: fuse: Add nvmem cell lookup entries for Tegra194

Link: https://lore.kernel.org/r/20220506143005.3916655-2-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-06 22:10:57 +02:00
Arnd Bergmann 819ed6f07d Renesas driver updates for v5.19 (take two)
- Initial support for the R-Car V4H and RZ/V2M SoCs,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCYnThKAAKCRCKwlD9ZEnx
 cDtZAQDveNky2MIYx0nNb88JzK5PS1zo85KcU5g6ybf/QEnMdQEA7GYKKKi9q3rF
 5Q1h6kUvIW6e8c7lcva2DI4D7ZUIoAk=
 =M1iB
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ1gDcACgkQmmx57+YA
 GNl8LhAAjqsrH2O/ufjr/7SK1hHpqGdPo08RwHOvHNLOX35si9l4sSswf5xpI0M5
 NtpS1DaDH5X7z/VteRC2CYqRR5L2pKogmjpEVxPCQxgVGfeicg4ntw59O6vuBmml
 w1bZ5a9Ipd/8AU5mEOXCZlb+96I16T9wfetlerSYyYsmt8pCLYwQrXijoIwUhrS0
 i8YxzfUD5MZ7RZd8mzxxGs8vKDmgMZMuoxzdRxpoLIfgaRNyqCboLoP1lvQhXLFY
 XHLJZOW1pHd41sx5f1cJv3wKwsBHBVxzXFNGGz2i60BaVjrBSbSpixM+C/LUddIl
 h+QhR9PLKk2iIbDuiD6x9G6fv20LA0Gz5BI57XiJcuPK/SIB8R4hISYpQ6GVAh1L
 ve2NPE6o4hJC7UhJRH6JFNyfaF6pmPK9VVvG9BOPvd8L6SKyyeWHiVgaOzCBgJKm
 5ZPKPZ8KCC9Rky7secioIFb2eyGg73CKWVi+cZzSb9wVkPC7rZsTTbErWTAI4FEn
 slyJrA36bfQXk2kDaWIXdN55xXD+oZhkHtwVVX61Srp6DEnaUABocGJ+TtrrfdkE
 9OlsQE9fivl6WPtTZJ11RivT3qnpiUFl/owaG+l3q01Ryvtm9GJAJuBDhl1qN9AM
 /5endo466iMqS9zlNol+2MjPplGek43XSBE//24/+7BSmzPwcNs=
 =P6fe
 -----END PGP SIGNATURE-----

Merge tag 'renesas-drivers-for-v5.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.19 (take two)

  - Initial support for the R-Car V4H and RZ/V2M SoCs,
  - Miscellaneous fixes and improvements.

* tag 'renesas-drivers-for-v5.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: R-Car V3U is R-Car Gen4
  soc: renesas: rzn1: Select PM and PM_GENERIC_DOMAINS configs
  soc: renesas: Add RZ/V2M (R9A09G011) config option
  soc: renesas: rcar-rst: Add support for R-Car V4H
  soc: renesas: Identify R-Car V4H
  soc: renesas: r8a779g0-sysc: Add r8a779g0 support
  dt-bindings: clock: Add r8a779g0 CPG Core Clock Definitions
  dt-bindings: power: Add r8a779g0 SYSC power domain definitions

Link: https://lore.kernel.org/r/cover.1651828613.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-06 22:08:23 +02:00
Thierry Reding d3a20dcbca soc/tegra: pmc: Document core domain fields
These fields are used to track the state of the core domain. Add basic
descriptions so that kerneldoc can be properly generated for them.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-05-06 10:53:19 +02:00
Tom Rix 28e3dc8f8c soc: qcom: pdr: use static for servreg_* variables
Sparse reports this repesentative issue
pdr_internal.h:31:22: warning: symbol 'servreg_location_entry_ei' was not declared. Should it be static?
Similar for other servreg_*

Global variables should not be defined in header files.
This only works because pdr_internal.h is only included
by pdr_interface.c.  Single file use variables should be
static so add static to their storage-class specifiers.

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220422173806.21982-1-trix@redhat.com
2022-05-05 22:08:15 -05:00
Arnd Bergmann bdc33dad34 Apple SoC NVMe driver and dependencies:
- RTKit IPC library required to boot and communicate with
     co-processors embedded inside Apple SoCs
   - SART DMA address filter required to allow some DMA transactions for
     the NVMe co-processor
   - NVMe platform driver
 
 The following minor changes since v3 on the mailing list have been
 folded in:
 
   - sart: %llx -> %pa for a phys_addr_t
   - rtkit:/sart: Drop IS_ENABLED inside headers
   - rtkit: Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL
   - nvme: Set NVME_REQ_CANCELLED in the timeout handler
   - nvme: Use DEFINE_SIMPLE_DEV_PM_OPS instead of #ifdef CONFIG_PM_SLEEP
 -----BEGIN PGP SIGNATURE-----
 
 iIkEABYKADEWIQRUAfN3OZ14tapALxsd6alOrecRcQUCYm/5lhMcc3ZlbkBzdmVu
 cGV0ZXIuZGV2AAoJEB3pqU6t5xFxITsBAI02bdBvHQAFouu1WzhLzlAPNqjGv3Th
 YFOJL4y2oyigAP9zkIGP0e1JcpApPxvlmQnM340ZY+TCth+ahoCWlS4VAg==
 =b0QX
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ0IIIACgkQmmx57+YA
 GNnxlg/+M0d7awpSyiN2g2aoPN9PzaDiWgjSDJ30THfY+JodFmK/Uw1L2dO32+md
 0UMuMH9Vtiy3NXf/dDoLU+kiNQgT1ZY7Iw2220GZyHxRUC/7RZ/zGNvAb1FclDhK
 YEYtlA2fK1MvlhEcriD8ytP78R80UA7Cx4o5T8CkgfN2OtjLip72aMCFtzRfxMk6
 W0GQvkTpDtp3qn59Wlz/JEJKMT+q0txxq1QkPW93Su190S/7Lk/nd+CkmFDHx54n
 2LFa33JuZZfNbzPMN9emTl7G5Z7Y241zYBMHvtAzd3WdaDZ6I1apeVnDXrNRhysC
 4B8si4qbo9NORhWR96okll0MCiBNZ1UfvS4U+/8A1b0CHwX5rEUKLNOXIfO8xApi
 L3HvVUpYPJw8w3aK2SKGVt2aQcnbluy9+LJQgHByPFbeIV80OjWoR4xSSZi2XErl
 tp4vmyUBTR8g85EnCqcc8OWCdl+yMjX+NmftLk/XB7/xD+HtqKocqizOVho/9u+K
 rv6Ivx6JHk33LFG/jJkN6q8OncgfSRirg0oy6IF/dy2xS2U3OtfaIXHIy9NosC36
 B3bm8mb3CVQJxazMYl3rstBGQoN1YpuwOsHRUWiWG1jDnXFwCSck9b5OH+y64PME
 45V27Rx1ftTgrOWgsllIqsviWADO4Qj7n5YXYvC+hGrBeDnM8pQ=
 =gi38
 -----END PGP SIGNATURE-----

Merge tag 'asahi-soc-rtkit-sart-nvme-for-5.19' of https://github.com/AsahiLinux/linux into arm/drivers

Apple SoC NVMe driver and dependencies:

  - RTKit IPC library required to boot and communicate with
    co-processors embedded inside Apple SoCs
  - SART DMA address filter required to allow some DMA transactions for
    the NVMe co-processor
  - NVMe platform driver

The following minor changes since v3 on the mailing list have been
folded in:

  - sart: %llx -> %pa for a phys_addr_t
  - rtkit:/sart: Drop IS_ENABLED inside headers
  - rtkit: Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL
  - nvme: Set NVME_REQ_CANCELLED in the timeout handler
  - nvme: Use DEFINE_SIMPLE_DEV_PM_OPS instead of #ifdef CONFIG_PM_SLEEP

* tag 'asahi-soc-rtkit-sart-nvme-for-5.19' of https://github.com/AsahiLinux/linux:
  nvme-apple: Add initial Apple SoC NVMe driver
  dt-bindings: nvme: Add Apple ANS NVMe
  soc: apple: Add SART driver
  dt-bindings: iommu: Add Apple SART DMA address filter
  soc: apple: Add RTKit IPC library
  soc: apple: Always include Makefile

Link: https://lore.kernel.org/r/20220505154020.84638-1-sven@svenpeter.dev
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-05 21:07:46 +02:00
Arnd Bergmann dbdaca1300 This pull request contains Broadcom ARM/ARM64 SoCs drivers changes for
5.19, please pull the following:
 
 - Qintao adds a missing NULL check to the Broadcom PMB driver after a
   memory allocation
 
 - Li removes the redundant suppress_bind_attrs from the brcmstb_gisb
   driver which only has a probe and no remove function
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmJy6BUACgkQh9CWnEQH
 BwRzjxAA56LdLa1ucGBLuXaLMzhN7JBQwqFbJRhJnig6gYMoOu4eJf2tD9Bfq/XN
 Mu5tAqE19orfBsu1xm67hzVUDpwL3DKN11FVDjYBKqmVU8PMEjd8F619ak6DLs+4
 D5R/wC+4sanfwotk7Ud3MAb+F8zUGwFM5NdaMwHdFAZOq++c5zU9xNFHhU3IfJBR
 OdbGKwaFmRT9iF4mztx1C9s3aBSggDqMeCpJeLqlS7jPim14gN3nl+l06n480kw/
 dMgJxnI3sCydefJiGYNDLV833Wfj2XFkLnVbK2erDUL9UTRQSetwPuvIJKI4jPSW
 uAiWM8l8y9DrOTSauVQs8khgx7hzdJ6haYydXfJKI8ZidOHHE7DcOuUkIgvXidpY
 iT5QgVTfVK9l48pFN1xCC+TkfizlbaVVbdTqlp0hPfB/Jb7ZUtKCtcq4A0T4HgdT
 5W8z1bwMdKZpbKj931IcTPO4CH6VVKzJXBks75+17QxPWU7lu883kr81fclYbYD8
 q+VbAMY1lEaWEOUhSuXtK3ubpM4ygVrjrHPpm2qWfeK2RqUTNnQrXy1JSafPwl/2
 zcYjExr6MWNDaXD/oI/udKnEiul+quoW6rXmDdYQHE/t+pOqbPKPNOGRF/pFSW2q
 WJo1seJG20fiCmhOyoTinT4Gfen42a5Tr03ONOP8uS2K9ca4+mU=
 =DrJC
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJz33gACgkQmmx57+YA
 GNlLjhAAnwpXm0Oco9a+OA3vKPiw4JZzpUvBUW1uCcT6YNRdZKNLhXE50VgshX/s
 L0bK9yarJ/3H2ULs6zsAb4YWDsIrhdrIuARBYuJqJEnXAPCYQO77CJt6K+XPRARf
 maKOfbK4dOrGyXOqqsMKfM3EUWECGK1Z45QBOxi4xj1/U/b0kQc/N8feznzx/uer
 9uzlIleZrixGi3ez/BCmUrqdEMRDKu2AgpUWZQ6J6dwaWSBs8/upeyedEaDc3HgD
 InMsJgkDh/K8dRjuqZQXzsSIVuc/XYiDCVisuCLP+C+a8MTq3We9Y8inu7tv625O
 p1/iiDXO4JAFoD3g0wxH2SetcT1fNIwPv9icG4Lsz2BNav/nAm2/dWc/Py8jvPN+
 hjIqm2IuNL9yxtyMREZ83TWc81688o5laEvw9JslhSaAddhave974vF/bSywryFi
 qZsMpXrTk6q68HzwKpieV/Mx8iNDNkj6peXmAwR5pZ7Uhi/bjYVPnPG0CvMOEstt
 zcjOADLSJPoqjWxqBuPw/71gEoBmv+eJFCXV7mhBBjt+CngmdEAsUmEnMKZPL6SY
 nYCqEy/N5C57FeXbcmMnBbauHdcuoyMrb6RIsVExhbboaLKF0JtEow5z9tM15yqv
 8++HBYsZTA0R+VO4/sn7CX5rG/F+eo0YusN/dUfy7EFr2rK5iSU=
 =ycAK
 -----END PGP SIGNATURE-----

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

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

- Qintao adds a missing NULL check to the Broadcom PMB driver after a
  memory allocation

- Li removes the redundant suppress_bind_attrs from the brcmstb_gisb
  driver which only has a probe and no remove function

* tag 'arm-soc/for-5.19/drivers' of https://github.com/Broadcom/stblinux:
  bus: brcmstb_gisb: Remove the suppress_bind_attrs attribute of the driver
  soc: bcm: Check for NULL return of devm_kzalloc()

Link: https://lore.kernel.org/r/20220504210942.1838248-4-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-05 16:30:16 +02:00
kernel test robot 7a0c5cb671 soc: imx: fix semicolon.cocci warnings
drivers/soc/imx/imx8mp-blk-ctrl.c:227:61-62: Unneeded semicolon
drivers/soc/imx/imx8mp-blk-ctrl.c:192:61-62: Unneeded semicolon

 Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 556f5cf956 ("soc: imx: add i.MX8MP HSIO blk-ctrl")
CC: Lucas Stach <l.stach@pengutronix.de>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 20:51:52 +08:00
Geert Uytterhoeven 27e7657a7c soc: renesas: R-Car V3U is R-Car Gen4
Despite the name, R-Car V3U is the first member of the R-Car Gen4
family.  Hence reflect this in the SoC Family field.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/2bbecad7b6c24c0d5c1797b3f7f0733d5ba33842.1651497066.git.geert+renesas@glider.be
2022-05-05 12:31:22 +02:00
Lucas Stach e3442022f5 soc: imx: add i.MX8MP HDMI blk-ctrl
This adds driver support for the HDMI blk-ctrl found on the
i.MX8MP SoC.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 09:28:58 +08:00
Paul Elder 07614fed00 soc: imx: imx8m-blk-ctrl: Add i.MX8MP media blk-ctrl
Add the description for the i.MX8MP media blk-ctrl.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de> # MX8MP LCDIF #1 and #2
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 09:28:57 +08:00
Lucas Stach 556f5cf956 soc: imx: add i.MX8MP HSIO blk-ctrl
The i.MX8MP added some blk-ctrl peripherals that don't follow the regular
structure of the blk-ctrls in the previous SoCs. Add a new file for those
with currently only the HSIO blk-ctrl being supported. Others will be added
later on.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 09:28:57 +08:00
Lucas Stach 8239d67f59 soc: imx: imx8m-blk-ctrl: set power device name
Set the name for the virtual power device to the name of the attached
blk-ctrl domain. Makes the debug output for the power domains a lot
more pleasant to read.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 09:07:56 +08:00
Bjorn Andersson ec69dfbdc4 soc: qcom: llcc: Add sc8180x and sc8280xp configurations
Add LLCC configuration data for the SC8180X and SC8280XP platforms,
based on the downstream tables.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Link: https://lore.kernel.org/r/20220502215406.612967-3-bjorn.andersson@linaro.org
2022-05-04 11:39:40 -05:00
Thierry Reding 9767d1be15 soc/tegra: pmc: Select REGMAP
Commit 9d5e7c3e36 ("soc/tegra: pmc: Provide USB sleepwalk register
map") introduced a dependency on the regmap infrastructure, so select
the corresponding Kconfig entry. This avoids failures in random builds
that may otherwise end up having SOC_TEGRA_PMC enabled but not REGMAP.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-05-04 11:09:49 +02:00
Dave Gerlach 2a21f9e6d9 soc: ti: wkup_m3_ipc: Add debug option to halt m3 in suspend
Add a debugfs option to allow configurable halting of the wkup_m3
during suspend at the last possible point before low power mode entry.
This condition can only be resolved through JTAG and advancing beyond
the while loop in a8_lp_ds0_handler [1]. Although this hangs the system
it forces the system to remain active once it has been entirely
configured for low power mode entry, allowing for register inspection
through JTAG to help in debugging transition errors.

Halt mode can be set using the enable_off_mode entry under wkup_m3_ipc
in the debugfs.

[1] https://git.ti.com/cgit/processor-firmware/ti-amx3-cm3-pm-firmware/tree/src/pm_services/pm_handlers.c?h=08.02.00.006#n141

Suggested-by: Brad Griffis <bgriffis@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
[dfustini: add link for a8_lp_ds0_handler() in ti-amx3-cm3-pm-firmware]
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220502033211.1383158-1-dfustini@baylibre.com
2022-05-03 08:02:09 -05:00
Dave Gerlach ea082040fe soc: ti: wkup_m3_ipc: Add support for i2c voltage scaling
Allow loading of a binary containing i2c scaling sequences to be
provided to the wkup_m3 firmware in order to properly scale voltage
rails on the PMIC during low power modes like DeepSleep0. Proper binary
format is determined by the FW in use.

Code expects firmware to have 0x0C57 present as the first two bytes
followed by one byte defining offset to sleep sequence followed by one
byte defining offset to wake sequence and then lastly both sequences.
Each sequence is a series of I2C transfers in the form:

u8 length | u8 chip address | u8 byte0/reg address | u8 byte1 | u8 byteN
..

The length indicates the number of bytes to transfer, including the
register address. The length of each transfer is limited by the I2C
buffer size of 32 bytes.

Based on previous work by Russ Dill.

[dfustini: replace FW_ACTION_HOTPLUG with FW_ACTION_UEVENT]

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
[dfustini: add NULL argument to rproc_da_to_va() call]
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220426200741.712842-3-dfustini@baylibre.com
2022-05-03 08:02:09 -05:00
Dave Gerlach 1dcbae86ee soc: ti: wkup_m3_ipc: Add support for IO Isolation
AM43xx support isolation of the IOs so that control is taken
from the peripheral they are connected to and overridden by values
present in the CTRL_CONF_* registers for the pad in the control module.

The actual toggling happens from the wkup_m3, so use a DT property from
the wkup_m3_ipc node to allow the PM code to communicate the necessity
for placing the IOs into isolation to the firmware.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220414192722.2978837-3-dfustini@baylibre.com
2022-05-03 08:02:09 -05:00
Haowen Bai d4c41d32cf soc: ti: knav_qmss_queue: Use IS_ERR instead of IS_ERR_OR_NULL when checking knav_queue_open() result
As the usage of knav_queue_open():

* Returns a handle to the open hardware queue if successful. Use IS_ERR()
* to check the returned value for error codes.

It will only return error codes, not null.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/1650765944-20170-1-git-send-email-baihaowen@meizu.com
2022-05-03 08:02:05 -05:00
Minghao Chi 2b7042500c soc: ti: pm33xx: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tony Lindgren <tony@aotmide.com>
Link: https://lore.kernel.org/r/20220418063059.2558074-1-chi.minghao@zte.com.cn
2022-05-03 06:58:10 -05:00
Sven Peter b170143ae1 soc: apple: Add SART driver
The NVMe co-processor on the Apple M1 uses a DMA address filter called
SART for some DMA transactions. This adds a simple driver used to
configure the memory regions from which DMA transactions are allowed.

Unlike a real IOMMU, SART does not support any pagetables and can't be
implemented inside the IOMMU subsystem using iommu_ops.

It also can't be implemented using dma_map_ops since not all DMA
transactions of the NVMe controller are filtered by SART.
Instead, most buffers have to be registered using the integrated NVMe
IOMMU and we can't have two separate dma_map_ops implementations for a
single device.

Co-developed-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-05-02 17:24:45 +02:00
Sven Peter 9bd1d9a0d8 soc: apple: Add RTKit IPC library
Apple SoCs such as the M1 come with multiple embedded co-processors
running proprietary firmware. Communication with those is established
over a simple mailbox using the RTKit IPC protocol.

This cannot be implemented inside the mailbox subsystem since on top
of communication over channels we also need support for starting,
hibernating and resetting these co-processors. We also need to
handle shared memory allocations differently depending on the
co-processor and don't want to split that across multiple drivers.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-05-01 16:55:06 +02:00
Sven Peter cbb0f00131 soc: apple: Always include Makefile
We want to allow the code inside drivers/soc/apple to be compiled with
COMPILE_TEST but this will currently result in linking errors because
ARCH_APPLE is not set and make will never recurse into
drivers/soc/apple.
Let's just unconditionally recurse into apple/ since all drivers
in there are guarded by config options anyways.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-05-01 16:55:05 +02:00