platform/kernel/linux-starfive.git
2 years agoMerge tag 'qcom-drivers-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 9 May 2022 21:14:05 +0000 (23:14 +0200)]
Merge tag 'qcom-drivers-for-5.19' of git://git./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>
2 years agoMerge tag 'memory-controller-drv-tegra-5.19' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Mon, 9 May 2022 21:12:49 +0000 (23:12 +0200)]
Merge tag 'memory-controller-drv-tegra-5.19' of git://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.19 - Tegra SoC

Add support for Tegra234 memory controller and for logging memory
controller errors on Tegra186, Tegra194 and Tegra234.

* tag 'memory-controller-drv-tegra-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  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

Link: https://lore.kernel.org/r/20220509160807.154187-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'imx-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawngu...
Arnd Bergmann [Mon, 9 May 2022 21:10:47 +0000 (23:10 +0200)]
Merge tag 'imx-drivers-5.19' of git://git./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>
2 years agoMerge tag 'ti-driver-soc-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 9 May 2022 21:09:09 +0000 (23:09 +0200)]
Merge tag 'ti-driver-soc-for-v5.19' of git://git./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>
2 years agomemory: tegra: Add MC error logging on Tegra186 onward
Ashish Mhetre [Fri, 6 May 2022 13:23:12 +0000 (15:23 +0200)]
memory: tegra: Add MC error logging on Tegra186 onward

Add support for logging memory controller errors on Tegra186, Tegra194
and Tegra234. On these SoCs, interrupts can occur on multiple channels.
Add support required to read the status of interrupts across multiple
channels, log and clear them.

Also add new interrupts supported on these SoCs.

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20220506132312.3910637-5-thierry.reding@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2 years agomemory: tegra: Add memory controller channels support
Ashish Mhetre [Fri, 6 May 2022 13:23:11 +0000 (15:23 +0200)]
memory: tegra: Add memory controller channels support

From Tegra186 onwards, the memory controller supports multiple channels.
Add support for mapping the address spaces of these channels and specify
the number of channels supported by Tegra186, Tegra194 and Tegra234.

In case of old bindings, channels won't be present. If channels are not
present then print a warning and continue so that backward compatibility
will be preserved in driver.

During error interrupts from memory controller, appropriate registers
from these channels need to be accessed for logging error info.

Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20220506132312.3910637-4-thierry.reding@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2 years agomemory: tegra: Add APE memory clients for Tegra234
Sameer Pujar [Fri, 6 May 2022 13:23:10 +0000 (15:23 +0200)]
memory: tegra: Add APE memory clients for Tegra234

Add the memory clients on Tegra234 which are needed for APE
DMA to properly use the SMMU.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20220506132312.3910637-3-thierry.reding@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2 years agomemory: tegra: Add Tegra234 support
Thierry Reding [Fri, 6 May 2022 13:23:09 +0000 (15:23 +0200)]
memory: tegra: Add Tegra234 support

The memory controller and external memory controller found on Tegra234
is similar to the version found on earlier SoCs but supports a number of
new memory clients.

Add initial memory client definitions for the Tegra234 so that the SMMU
stream ID override registers can be properly programmed at boot time.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20220506132312.3910637-2-thierry.reding@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2 years agoMerge tag 'tegra-for-5.19-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra...
Arnd Bergmann [Fri, 6 May 2022 20:10:56 +0000 (22:10 +0200)]
Merge tag 'tegra-for-5.19-soc' of git://git./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>
2 years agoMerge tag 'renesas-drivers-for-v5.19-tag2' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Fri, 6 May 2022 20:08:22 +0000 (22:08 +0200)]
Merge tag 'renesas-drivers-for-v5.19-tag2' of git://git./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>
2 years agoMerge tag 'samsung-soc-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk...
Arnd Bergmann [Fri, 6 May 2022 20:07:12 +0000 (22:07 +0200)]
Merge tag 'samsung-soc-5.19' of git://git./linux/kernel/git/krzk/linux into arm/drivers

Samsung mach/soc changes for v5.19

Cleanup: drop unneeded CONFIG_S3C24XX_PWM and fix some typos.

* tag 'samsung-soc-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  ARM: s3c: fix typos in comments
  ARM: s3c: Drop config symbol S3C24XX_PWM

Link: https://lore.kernel.org/r/20220506081438.149192-6-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'samsung-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Fri, 6 May 2022 20:03:26 +0000 (22:03 +0200)]
Merge tag 'samsung-drivers-5.19' of git://git./linux/kernel/git/krzk/linux into arm/drivers

Samsung SoC drivers changes for v5.19

Make MCT and USI bindings stricter by describing expected interrupts
per variant and expected child node.

* tag 'samsung-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  dt-bindings: timer: exynos4210-mct: describe known hardware and its interrupts
  dt-bindings: soc: samsung: usi: refer to dtschema for SPI

Link: https://lore.kernel.org/r/20220506081438.149192-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'tee-cleanup-for-v5.19' of https://git.linaro.org/people/jens.wiklander...
Arnd Bergmann [Fri, 6 May 2022 20:02:10 +0000 (22:02 +0200)]
Merge tag 'tee-cleanup-for-v5.19' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers

TEE cleanup

Removes the old and unused TEE_IOCTL_SHM_* flags
Removes unused the unused tee_shm_va2pa() and tee_shm_pa2va() functions

* tag 'tee-cleanup-for-v5.19' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: remove flags TEE_IOCTL_SHM_MAPPED and TEE_IOCTL_SHM_DMA_BUF
  tee: remove tee_shm_va2pa() and tee_shm_pa2va()

Link: https://lore.kernel.org/r/20220506070328.GA1344495@jade
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agonvme-apple: fix sparse endianess warnings
Arnd Bergmann [Fri, 6 May 2022 19:06:25 +0000 (21:06 +0200)]
nvme-apple: fix sparse endianess warnings

The new nvme-apple driver is missing a few conversions to and
from little-endian data:

drivers/nvme/host/apple.c:291:19: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] prp1 @@     got restricted __le64 [usertype] prp1 @@
drivers/nvme/host/apple.c:291:19: sparse:     expected unsigned long long [usertype] prp1
drivers/nvme/host/apple.c:291:19: sparse:     got restricted __le64 [usertype] prp1
drivers/nvme/host/apple.c:292:19: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] prp2 @@     got restricted __le64 [usertype] prp2 @@
drivers/nvme/host/apple.c:293:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] length @@     got restricted __le16 [usertype] length @@
drivers/nvme/host/apple.c:351:52: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] next_dma_addr @@     got restricted __le64 [usertype] @@
drivers/nvme/host/apple.c:456:45: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le64 [usertype] @@     got unsigned int [addressable] [usertype] prp_dma @@
drivers/nvme/host/apple.c:459:31: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le64 [usertype] @@     got unsigned long long [assigned] [usertype] dma_addr @@
drivers/nvme/host/apple.c:474:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le64 [usertype] prp1 @@     got unsigned int [usertype] dma_address @@
drivers/nvme/host/apple.c:475:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le64 [usertype] prp2 @@     got unsigned int [usertype] first_dma @@

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agosoc/tegra: pmc: Document core domain fields
Thierry Reding [Fri, 6 May 2022 08:53:15 +0000 (10:53 +0200)]
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>
2 years agosoc: qcom: pdr: use static for servreg_* variables
Tom Rix [Fri, 22 Apr 2022 17:38:06 +0000 (13:38 -0400)]
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
2 years agoMerge tag 'asahi-soc-rtkit-sart-nvme-for-5.19' of https://github.com/AsahiLinux/linux...
Arnd Bergmann [Thu, 5 May 2022 19:07:45 +0000 (21:07 +0200)]
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>
2 years agoMerge tag 'arm-soc/for-5.19/drivers' of https://github.com/Broadcom/stblinux into...
Arnd Bergmann [Thu, 5 May 2022 14:30:15 +0000 (16:30 +0200)]
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>
2 years agoMerge tag 'optee-rpc-arg-for-v5.19' of https://git.linaro.org/people/jens.wiklander...
Arnd Bergmann [Thu, 5 May 2022 14:01:21 +0000 (16:01 +0200)]
Merge tag 'optee-rpc-arg-for-v5.19' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers

OP-TEE RPC argument cache

Adds caching of the OP-TEE argument structure used to pass request to
secure world. This reduces quite a bit of unnecessary alloc/free and
possibly switching back and forth to secure work in order to register
the buffers in some configurations, most notably FF-A.

* tag 'optee-rpc-arg-for-v5.19' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  optee: cache argument shared memory structs
  optee: add FF-A capability OPTEE_FFA_SEC_CAP_ARG_OFFSET
  optee: add OPTEE_SMC_CALL_WITH_RPC_ARG and OPTEE_SMC_CALL_WITH_REGD_ARG
  optee: rename rpc_arg_count to rpc_param_count

Link: https://lore.kernel.org/r/20220504201759.GA180315@jade
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'scmi-updates-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Arnd Bergmann [Thu, 5 May 2022 14:00:19 +0000 (16:00 +0200)]
Merge tag 'scmi-updates-5.19' of git://git./linux/kernel/git/sudeep.holla/linux into arm/drivers

Arm SCMI firmware driver updates/fixes for v5.19

The main theme for most of the changes this time is around the addition
of the support for SCMI v3.1 specification changes. Though one of the main
addition in the specification is the powercap protocol, that is still
work in progress and this set includes all other changes bit and pieces
scattered all around the different parts of the specification. There are
few bugs discovered during the process and associated fixes and some
refactoring to simplify the addition of v3.1 support. It mainly includes
the support for extended names, few newly added notifications and async
command support.

Apart from v3.1 SCMI changes, OPTEE transport gets support for dynamic
shared memory.

* tag 'scmi-updates-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (24 commits)
  firmware: arm_scmi: Fix late checks on pointer dereference
  firmware: arm_scmi: Support optee shared memory in the optee transport
  firmware: arm_scmi: Add SCMI v3.1 VOLTAGE_LEVEL_SET_COMPLETE
  firmware: arm_scmi: Add SCMI v3.1 clock notifications
  firmware: arm_scmi: Add checks for min/max limits in PERFORMANCE_LIMITS_SET
  firmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts
  firmware: arm_scmi: Use common iterators in the perf protocol
  firmware: arm_scmi: Use common iterators in the voltage protocol
  firmware: arm_scmi: Use common iterators in the clock protocol
  firmware: arm_scmi: Add SCMI v3.1 SENSOR_AXIS_NAME_GET support
  firmware: arm_scmi: Use common iterators in the sensor protocol
  firmware: arm_scmi: Add iterators for multi-part commands
  firmware: arm_scmi: Parse clock_enable_latency conditionally
  firmware: arm_scmi: Set clock latency to U32_MAX if it is not supported
  firmware: arm_scmi: Add SCMI v3.1 protocol extended names support
  firmware: arm_scmi: Introduce a common SCMI v3.1 .extended_name_get helper
  firmware: arm_scmi: Split protocol specific definitions in a dedicated header
  firmware: arm_scmi: Remove unneeded NULL termination of clk name
  firmware: arm_scmi: Check CLOCK_RATE_SET_COMPLETE async response
  firmware: arm_scmi: Make name_get operations return a const
  ...

Link: https://lore.kernel.org/r/20220504112906.3491985-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'ffa-updates-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Arnd Bergmann [Thu, 5 May 2022 13:59:27 +0000 (15:59 +0200)]
Merge tag 'ffa-updates-5.19' of git://git./linux/kernel/git/sudeep.holla/linux into arm/drivers

Arm FF-A firmware driver updates/fixes for v5.19

Couple of fixes to handle fragmented memory descriptors and incorrect
UUID parameter passed to ffa_partition_probe. Another fix deals with
the incorrect use of ffa_device's driver_data by the core driver.
Apart from these fixes, there is an addition of ffa_dev_get_drvdata helper
function and its use in optee driver.

* tag 'ffa-updates-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  tee: optee: Use ffa_dev_get_drvdata to fetch driver_data
  firmware: arm_ffa: Add ffa_dev_get_drvdata helper function
  firmware: arm_ffa: Remove incorrect assignment of driver_data
  firmware: arm_ffa: Fix uuid parameter to ffa_partition_probe
  firmware: arm_ffa: Fix handling of fragmented memory descriptors

Link: https://lore.kernel.org/r/20220504112853.3491961-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'tee-shm-vmalloc-for-v5.19' of https://git.linaro.org/people/jens.wiklander...
Arnd Bergmann [Thu, 5 May 2022 13:56:54 +0000 (15:56 +0200)]
Merge tag 'tee-shm-vmalloc-for-v5.19' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers

TEE accept vmalloc()ed buffers for tee_shm_register_kernel_buf()

* tag 'tee-shm-vmalloc-for-v5.19' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: make tee_shm_register_kernel_buf vmalloc supported

Link: https://lore.kernel.org/r/20220503192916.GA3288817@jade
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'tee-menu-for-v5.19' of https://git.linaro.org/people/jens.wiklander/linux...
Arnd Bergmann [Thu, 5 May 2022 13:48:31 +0000 (15:48 +0200)]
Merge tag 'tee-menu-for-v5.19' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers

Combine TEE config and menu in one line

* tag 'tee-menu-for-v5.19' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: combine "config" and "menu" for TEE's menuconfig

Link: https://lore.kernel.org/r/20220503191626.GA3278203@jade
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'reset-for-v5.19' of git://git.pengutronix.de/pza/linux into arm/drivers
Arnd Bergmann [Thu, 5 May 2022 13:21:00 +0000 (15:21 +0200)]
Merge tag 'reset-for-v5.19' of git://git.pengutronix.de/pza/linux into arm/drivers

Reset controller updates for v5.19

Add Meson-S4 SoC reset controller support to reset-meson, AST2600 LPC
reset controller support to reset-simple, and R9A07G054 USBPHY reset
controller support to reset-rzg2l-usbphy-ctrl. Add ACPI _RST support to
device_reset(), simplify the uniphier-glue reset driver using bulk API
and devres and clean up its dt-bindings docs. Convert most dt-bindings
docs from txt to yaml.

* tag 'reset-for-v5.19' of git://git.pengutronix.de/pza/linux:
  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
  dt-bindings: reset: nuvoton,npcm-reset: Convert to yaml
  dt-bindings: reset: lantiq,reset: Convert to yaml
  dt-bindings: reset: bitmain,bm1880-reset: Convert to yaml
  dt-bindings: reset: berlin: Convert to yaml
  dt-bindings: reset: ath79: Convert to yaml
  dt-bindings: reset: amlogic,meson-axg-audio-arb: Convert to yaml
  dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string
  reset: Kconfig: Make RESET_RZG2L_USBPHY_CTRL depend on ARCH_RZG2L
  reset: ACPI reset support
  reset: simple: Add AST2600 compatible
  reset: reset-meson: add support for the Meson-S4 SoC Reset Controller
  dt-bindings: reset: add bindings for the Meson-S4 SoC Reset Controller
  dt-bindings: reset: Add compatible for Meson-S4 Reset Controller
  reset: uniphier-glue: Use devm_add_action_or_reset()
  reset: uniphier-glue: Use reset_control_bulk API

Link: https://lore.kernel.org/r/20220503160057.46625-1-p.zabel@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agosoc: imx: fix semicolon.cocci warnings
kernel test robot [Thu, 5 May 2022 11:29:01 +0000 (19:29 +0800)]
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: 556f5cf9568a ("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>
2 years agosoc: renesas: R-Car V3U is R-Car Gen4
Geert Uytterhoeven [Mon, 2 May 2022 13:35:24 +0000 (15:35 +0200)]
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
2 years agosoc: imx: add i.MX8MP HDMI blk-ctrl
Lucas Stach [Wed, 6 Apr 2022 15:33:58 +0000 (17:33 +0200)]
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>
2 years agosoc: imx: imx8m-blk-ctrl: Add i.MX8MP media blk-ctrl
Paul Elder [Wed, 6 Apr 2022 15:33:55 +0000 (17:33 +0200)]
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>
2 years agosoc: imx: add i.MX8MP HSIO blk-ctrl
Lucas Stach [Wed, 6 Apr 2022 15:33:53 +0000 (17:33 +0200)]
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>
2 years agoMerge commit 'f11cf9e35e7f' into imx/drivers
Shawn Guo [Thu, 5 May 2022 01:28:24 +0000 (09:28 +0800)]
Merge commit 'f11cf9e35e7f' into imx/drivers

2 years agodt-bindings: power: imx8mp: add defines for HDMI blk-ctrl domains
Lucas Stach [Wed, 6 Apr 2022 15:33:56 +0000 (17:33 +0200)]
dt-bindings: power: imx8mp: add defines for HDMI blk-ctrl domains

This adds the defines for the power domains provided by the HDMI
blk-ctrl on the i.MX8MP.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: soc: Add i.MX8MP media block control DT bindings
Paul Elder [Wed, 6 Apr 2022 15:33:54 +0000 (17:33 +0200)]
dt-bindings: soc: Add i.MX8MP media block control DT bindings

The i.MX8MP Media Block Control (MEDIA BLK_CTRL) is a top-level
peripheral providing access to the NoC and ensuring proper power
sequencing of the peripherals within the MEDIAMIX domain. Add DT
bindings for it.

There is already a driver for block controls of other SoCs in the i.MX8M
family, so these bindings will expand upon that.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agosoc: imx: imx8m-blk-ctrl: set power device name
Lucas Stach [Wed, 6 Apr 2022 15:33:52 +0000 (17:33 +0200)]
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>
2 years agosoc: qcom: llcc: Add sc8180x and sc8280xp configurations
Bjorn Andersson [Mon, 2 May 2022 21:54:06 +0000 (14:54 -0700)]
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
2 years agodt-bindings: arm: msm: Add sc8180x and sc8280xp LLCC compatibles
Bjorn Andersson [Mon, 2 May 2022 21:54:05 +0000 (14:54 -0700)]
dt-bindings: arm: msm: Add sc8180x and sc8280xp LLCC compatibles

Add compatibles for the SC8180X and SC8280XP platforms to the existing
LLCC binding.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220502215406.612967-2-bjorn.andersson@linaro.org
2 years agosoc/tegra: pmc: Select REGMAP
Thierry Reding [Wed, 4 May 2022 09:08:14 +0000 (11:08 +0200)]
soc/tegra: pmc: Select REGMAP

Commit 9d5e7c3e36eb ("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>
2 years agodt-bindings: reset: st,sti-powerdown: Convert to yaml
Philipp Zabel [Thu, 7 Apr 2022 15:43:37 +0000 (17:43 +0200)]
dt-bindings: reset: st,sti-powerdown: Convert to yaml

Convert the device tree bindings for the STMicroelectronics STi
Peripheral Powerdown reset controller to YAML schema to allow
participating in DT validation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220407154338.4190674-13-p.zabel@pengutronix.de
2 years agodt-bindings: reset: st,sti-picophyreset: Convert to yaml
Philipp Zabel [Thu, 7 Apr 2022 15:43:36 +0000 (17:43 +0200)]
dt-bindings: reset: st,sti-picophyreset: Convert to yaml

Convert the device tree bindings for the STMicroelectronics STi
SoftReset controller to YAML schema to allow participating in DT
validation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220407154338.4190674-12-p.zabel@pengutronix.de
2 years agodt-bindings: reset: socfpga: Convert to yaml
Philipp Zabel [Thu, 7 Apr 2022 15:43:35 +0000 (17:43 +0200)]
dt-bindings: reset: socfpga: Convert to yaml

Convert the device tree bindings for the Altera SOCFPGA reset manager to
YAML schema to allow participating in DT validation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Dinh Nguyen <dinguyen@altera.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220407154338.4190674-11-p.zabel@pengutronix.de
2 years agodt-bindings: reset: snps,axs10x-reset: Convert to yaml
Philipp Zabel [Thu, 7 Apr 2022 15:43:32 +0000 (17:43 +0200)]
dt-bindings: reset: snps,axs10x-reset: Convert to yaml

Convert the device tree bindings for the AXS10x reset controller to YAML
schema to allow participating in DT validation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220407154338.4190674-8-p.zabel@pengutronix.de
2 years agodt-bindings: reset: nuvoton,npcm-reset: Convert to yaml
Philipp Zabel [Thu, 7 Apr 2022 15:43:30 +0000 (17:43 +0200)]
dt-bindings: reset: nuvoton,npcm-reset: Convert to yaml

Convert the device tree bindings for the Nuvoton NPCM reset controller
to YAML schema to allow participating in DT validation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Avi Fishman <avifishman70@gmail.com>
Cc: Tomer Maimon <tmaimon77@gmail.com>
Cc: Tali Perry <tali.perry1@gmail.com>
Cc: Patrick Venture <venture@google.com>
Cc: Nancy Yuen <yuenn@google.com>
Cc: Benjamin Fair <benjaminfair@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220407154338.4190674-6-p.zabel@pengutronix.de
2 years agodt-bindings: reset: lantiq,reset: Convert to yaml
Philipp Zabel [Thu, 7 Apr 2022 15:43:29 +0000 (17:43 +0200)]
dt-bindings: reset: lantiq,reset: Convert to yaml

Convert the device tree bindings for the Lantiq XWAY SoC RCU reset
controller to YAML schema to allow participating in DT validation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220407154338.4190674-5-p.zabel@pengutronix.de
2 years agodt-bindings: reset: bitmain,bm1880-reset: Convert to yaml
Philipp Zabel [Thu, 7 Apr 2022 15:43:28 +0000 (17:43 +0200)]
dt-bindings: reset: bitmain,bm1880-reset: Convert to yaml

Convert the device tree bindings for the Bitmain BM1880 reset controller
to YAML schema to allow participating in DT validation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220407154338.4190674-4-p.zabel@pengutronix.de
2 years agodt-bindings: reset: berlin: Convert to yaml
Philipp Zabel [Thu, 7 Apr 2022 15:43:27 +0000 (17:43 +0200)]
dt-bindings: reset: berlin: Convert to yaml

Convert the device tree bindings for the Marvell Berlin reset controller
to YAML schema to allow participating in DT validation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Antoine Tenart <atenart@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220407154338.4190674-3-p.zabel@pengutronix.de
2 years agodt-bindings: reset: ath79: Convert to yaml
Philipp Zabel [Thu, 7 Apr 2022 15:43:26 +0000 (17:43 +0200)]
dt-bindings: reset: ath79: Convert to yaml

Convert the device tree bindings for the Qualcomm Atheros AR7xxx/AR9XXX
reset controller to YAML schema to allow participating in DT validation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Alban Bedel <albeu@free.fr>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220407154338.4190674-2-p.zabel@pengutronix.de
2 years agodt-bindings: reset: amlogic,meson-axg-audio-arb: Convert to yaml
Philipp Zabel [Thu, 7 Apr 2022 15:43:25 +0000 (17:43 +0200)]
dt-bindings: reset: amlogic,meson-axg-audio-arb: Convert to yaml

Convert the device tree bindings for the Amlogic audio memory arbiter
controller to YAML schema to allow participating in DT validation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220407154338.4190674-1-p.zabel@pengutronix.de
2 years agodt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using...
Kunihiko Hayashi [Tue, 5 Apr 2022 07:56:18 +0000 (16:56 +0900)]
dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string

Instead of "oneOf:" choices, use "allOf:" and "if:" to define clocks,
resets, and their names that can be taken by the compatible string.

The order of clock-names and reset-names doesn't change here.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/1649145378-30358-1-git-send-email-hayashi.kunihiko@socionext.com
2 years agoreset: Kconfig: Make RESET_RZG2L_USBPHY_CTRL depend on ARCH_RZG2L
Lad Prabhakar [Wed, 6 Apr 2022 07:16:47 +0000 (08:16 +0100)]
reset: Kconfig: Make RESET_RZG2L_USBPHY_CTRL depend on ARCH_RZG2L

The USBPHY Control block is identical on Renesas RZ/G2L and RZ/V2L SoC's,
so instead of adding dependency for each SoC's add dependency on
ARCH_RZG2L. The ARCH_RZG2L config option is already selected by
ARCH_R9A07G044 and ARCH_R9A07G054.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220406071647.14037-1-prabhakar.mahadev-lad.rj@bp.renesas.com
2 years agoreset: ACPI reset support
Krishna Yarlagadda [Mon, 7 Mar 2022 13:56:26 +0000 (19:26 +0530)]
reset: ACPI reset support

Some of the IO devices like I2C or SPI require reset at runtime to
recover from an error condition without changing the power state of
the system. Added check for ACPI handle and a call to method '__RST'
if supported. Devices using device tree method are unaffected by this.

Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
[p.zabel@pengutronix.de: wrap in #ifdef CONFIG_ACPI due to missing stubs]
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220307135626.16673-1-kyarlagadda@nvidia.com
2 years agoreset: simple: Add AST2600 compatible
Joel Stanley [Mon, 21 Feb 2022 07:26:50 +0000 (17:56 +1030)]
reset: simple: Add AST2600 compatible

Similar to the 2400 and 2500, the LPC controller has some simple reset
lines that are used by the UART devices.

This is already documented in LPC bindings document.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220221072650.129348-1-joel@jms.id.au
2 years agoreset: reset-meson: add support for the Meson-S4 SoC Reset Controller
Zelong Dong [Fri, 7 Jan 2022 02:39:31 +0000 (10:39 +0800)]
reset: reset-meson: add support for the Meson-S4 SoC Reset Controller

Compared to the A1 SoCs the number of RESET registers is different
and the offset for the level registers is the same. Add a new
compatible string and struct meson_reset_param to add support for the
reset controller on the S4 SoC.

Signed-off-by: Zelong Dong <zelong.dong@amlogic.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220107023931.13251-4-zelong.dong@amlogic.com
2 years agodt-bindings: reset: add bindings for the Meson-S4 SoC Reset Controller
Zelong Dong [Fri, 7 Jan 2022 02:39:30 +0000 (10:39 +0800)]
dt-bindings: reset: add bindings for the Meson-S4 SoC Reset Controller

Add DT bindings for the Meson-S4 SoC Reset Controller include file.

Signed-off-by: Zelong Dong <zelong.dong@amlogic.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220107023931.13251-3-zelong.dong@amlogic.com
2 years agodt-bindings: reset: Add compatible for Meson-S4 Reset Controller
Zelong Dong [Fri, 7 Jan 2022 02:39:29 +0000 (10:39 +0800)]
dt-bindings: reset: Add compatible for Meson-S4 Reset Controller

Add new compatible for Amlogic's Meson-S4 Reset Controller

Signed-off-by: Zelong Dong <zelong.dong@amlogic.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220107023931.13251-2-zelong.dong@amlogic.com
2 years agoreset: uniphier-glue: Use devm_add_action_or_reset()
Philipp Zabel [Wed, 15 Dec 2021 09:38:29 +0000 (10:38 +0100)]
reset: uniphier-glue: Use devm_add_action_or_reset()

Slightly simplify uniphier_glue_reset_probe() and drop
uniphier_glue_reset_remove() by using devm_add_action_or_reset()
for clock and reset cleanup.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/20211215093829.3209416-2-p.zabel@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2 years agoreset: uniphier-glue: Use reset_control_bulk API
Philipp Zabel [Wed, 15 Dec 2021 09:38:28 +0000 (10:38 +0100)]
reset: uniphier-glue: Use reset_control_bulk API

This driver already uses the clk_bulk API. Simplify the driver by using
the reset_control_bulk API as well.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/20211215093829.3209416-1-p.zabel@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2 years agofirmware: arm_scmi: Fix late checks on pointer dereference
Cristian Marussi [Tue, 3 May 2022 12:10:47 +0000 (13:10 +0100)]
firmware: arm_scmi: Fix late checks on pointer dereference

A few dereferences could happen before the iterator pointer argument was
checked for NULL, causing the following smatch warnings:

drivers/firmware/arm_scmi/driver.c:1214 scmi_iterator_run() warn: variable
dereferenced before check 'i' (see line 1210)

Fix by moving the checks early and dropping some unneeded local references.

No functional change.

Link: https://lore.kernel.org/r/20220503121047.3590340-1-cristian.marussi@arm.com
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agoMerge tag 'omap-for-v5.19/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kerne...
Arnd Bergmann [Tue, 3 May 2022 13:09:08 +0000 (15:09 +0200)]
Merge tag 'omap-for-v5.19/ti-sysc-signed' of git://git./linux/kernel/git/tmlind/linux-omap into arm/drivers

Driver changes for omaps

One patch to remove commas from sentinels for ti-sysc.

* tag 'omap-for-v5.19/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  bus: ti-sysc: Drop commas after SoC match table sentinels

2 years agoMerge tag 'renesas-drivers-for-v5.19-tag1' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Tue, 3 May 2022 13:03:28 +0000 (15:03 +0200)]
Merge tag 'renesas-drivers-for-v5.19-tag1' of git://git./linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.19

  - Initial support for the new RZ/G2UL SoC.

* tag 'renesas-drivers-for-v5.19-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: Identify RZ/G2UL SoC

Link: https://lore.kernel.org/r/cover.1650638515.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agosoc: ti: wkup_m3_ipc: Add debug option to halt m3 in suspend
Dave Gerlach [Mon, 2 May 2022 03:32:12 +0000 (20:32 -0700)]
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
2 years agosoc: ti: wkup_m3_ipc: Add support for i2c voltage scaling
Dave Gerlach [Tue, 26 Apr 2022 20:07:44 +0000 (13:07 -0700)]
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
2 years agosoc: ti: wkup_m3_ipc: Add support for IO Isolation
Dave Gerlach [Thu, 14 Apr 2022 19:27:24 +0000 (12:27 -0700)]
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
2 years agosoc: ti: knav_qmss_queue: Use IS_ERR instead of IS_ERR_OR_NULL when checking knav_que...
Haowen Bai [Sun, 24 Apr 2022 02:05:43 +0000 (10:05 +0800)]
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
2 years agoMerge tag 'memory-controller-drv-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 3 May 2022 12:27:31 +0000 (14:27 +0200)]
Merge tag 'memory-controller-drv-5.19-2' of git://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.19, part two

1. Cleanup: simplify platform_get_resource() calls by using
   devm_platform_get_and_ioremap_resource() helper.
2. OMAP: allow building omap-gpmc as module and make it visible (it is
   not selected by platform anymore).

* tag 'memory-controller-drv-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: omap-gpmc: Allow building as a module
  memory: omap-gpmc: Make OMAP_GPMC config visible and selectable
  memory: renesas-rpc-if: simplify platform_get_resource_byname()
  memory: brcmstb_dpfe: simplify platform_get_resource_byname()
  memory: tegra: mc: simplify platform_get_resource()
  memory: ti-emif-pm: simplify platform_get_resource()
  memory: ti-emif: simplify platform_get_resource()
  memory: emif: simplify platform_get_resource()
  memory: da8xx-ddrctl: simplify platform_get_resource()

Link: https://lore.kernel.org/r/20220503070652.54091-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agosoc: ti: pm33xx: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Minghao Chi [Mon, 18 Apr 2022 06:30:59 +0000 (06:30 +0000)]
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
2 years agofirmware: ti_sci: Switch transport to polled mode during system suspend
Dave Gerlach [Tue, 12 Apr 2022 19:21:38 +0000 (14:21 -0500)]
firmware: ti_sci: Switch transport to polled mode during system suspend

During system suspend it is completely valid for devices to invoke TISCI
commands during the noirq phase of the suspend path. Specifically this
will always be seen for devices that define a power-domains DT property
and make use of the ti_sci_pm_domains genpd implementation.
The genpd_finish_suspend call will power off devices during the noirq
phase, which will invoke TISCI.

In order to support this, the ti_sci driver must switch to not use
wait_for_completion_timeout during suspend, but instead rely on a manual
check for if the completion is not yet done, and proceed only if this is
the case.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220412192138.31189-1-d-gerlach@ti.com
2 years agonvme-apple: Add initial Apple SoC NVMe driver
Sven Peter [Sun, 1 May 2022 14:55:12 +0000 (16:55 +0200)]
nvme-apple: Add initial Apple SoC NVMe driver

Apple SoCs such as the M1 come with an embedded NVMe controller that
is not attached to any PCIe bus. Additionally, it doesn't conform
to the NVMe specification and requires a bunch of changes to command
submission and IOMMU configuration to work.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2 years agodt-bindings: nvme: Add Apple ANS NVMe
Sven Peter [Sun, 1 May 2022 14:55:09 +0000 (16:55 +0200)]
dt-bindings: nvme: Add Apple ANS NVMe

Apple SoCs such as the M1 come with an embedded NVMe coprocessor called
ANS2.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2 years agosoc: apple: Add SART driver
Sven Peter [Sun, 1 May 2022 14:55:08 +0000 (16:55 +0200)]
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>
2 years agodt-bindings: iommu: Add Apple SART DMA address filter
Sven Peter [Sun, 1 May 2022 14:55:07 +0000 (16:55 +0200)]
dt-bindings: iommu: Add Apple SART DMA address filter

Apple SoCs such as the M1 come with a simple DMA address filter called
SART. Unlike a real IOMMU no pagetables can be configured but instead
DMA transactions can be allowed for up to 16 paddr regions. The consumer
also needs special support since not all DMA allocations have to be
added to this filter.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2 years agosoc: apple: Add RTKit IPC library
Sven Peter [Sun, 1 May 2022 14:55:06 +0000 (16:55 +0200)]
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>
2 years agosoc: apple: Always include Makefile
Sven Peter [Sun, 1 May 2022 14:55:05 +0000 (16:55 +0200)]
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>
2 years agotee: optee: Use ffa_dev_get_drvdata to fetch driver_data
Sudeep Holla [Fri, 29 Apr 2022 11:39:46 +0000 (12:39 +0100)]
tee: optee: Use ffa_dev_get_drvdata to fetch driver_data

Due to lack of an helper like ffa_dev_get_drvdata, this driver was
fetching driver_data directly accessing the structure member. Now that
we have added an helper, just use the same instead.

Link: https://lore.kernel.org/r/20220429113946.2087145-4-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Add ffa_dev_get_drvdata helper function
Sudeep Holla [Fri, 29 Apr 2022 11:39:45 +0000 (12:39 +0100)]
firmware: arm_ffa: Add ffa_dev_get_drvdata helper function

Add a helper function to fetch ffa_dev's driver_data using
dev_get_drvdata. At the same time move existing ffa_dev_set_drvdata
to use dev_set_drvdata.

Link: https://lore.kernel.org/r/20220429113946.2087145-3-sudeep.holla@arm.com
Suggested-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Remove incorrect assignment of driver_data
Sudeep Holla [Fri, 29 Apr 2022 11:39:44 +0000 (12:39 +0100)]
firmware: arm_ffa: Remove incorrect assignment of driver_data

The ffa core driver currently assigns its own driver information
to individual ffa device driver_data which is wrong. Firstly, it leaks
this core driver information to individual ffa_device and hence to
ffa_driver. Secondly the ffa_device driver_data is for use by individual
ffa_driver and not for this core driver managing all those devices.

Link: https://lore.kernel.org/r/20220429113946.2087145-2-sudeep.holla@arm.com
Fixes: d0c0bce83122 ("firmware: arm_ffa: Setup in-kernel users of FFA partitions")
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Fix uuid parameter to ffa_partition_probe
Sudeep Holla [Fri, 29 Apr 2022 11:39:43 +0000 (12:39 +0100)]
firmware: arm_ffa: Fix uuid parameter to ffa_partition_probe

While we pass uuid_null intentionally to ffa_partition_probe in
ffa_setup_partitions to get the count of the partitions, it must not be
uuid_null in ffa_partition_info_get which is used by the ffa_drivers
to fetch the specific partition info passing the UUID of the partition.

Fix ffa_partition_info_get by passing the received uuid down to
ffa_partition_probe so that the correct partition information is fetched.

Link: https://lore.kernel.org/r/20220429113946.2087145-1-sudeep.holla@arm.com
Fixes: d0c0bce83122 ("firmware: arm_ffa: Setup in-kernel users of FFA partitions")
Reported-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agomemory: omap-gpmc: Allow building as a module
Roger Quadros [Tue, 26 Apr 2022 08:26:11 +0000 (11:26 +0300)]
memory: omap-gpmc: Allow building as a module

Allow OMAP_GPMC to be built as a module.

When building this driver as a module, the symbol
'of_default_bus_match_table' will not be found as it is not being
exported.

The of_match_node() call is redundant anyways as
of_platform_default_populate() already takes care of matching with
'of_default_bus_match_table'. So get rid of that call. This will also
resolve the module build failure.

Move compatible match table to the end where it is usually expected.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/r/20220426082611.24427-3-rogerq@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2 years agomemory: omap-gpmc: Make OMAP_GPMC config visible and selectable
Roger Quadros [Tue, 26 Apr 2022 08:26:10 +0000 (11:26 +0300)]
memory: omap-gpmc: Make OMAP_GPMC config visible and selectable

So far for armv7 TI platforms, GPMC was being selected by
arch/arm/mach-* architecture Kconfig files.

For K3 platforms, GPMC is no longer required for basic boot and cannot
be always enabled by default by mach- Kconfig.

We need a way for user (or board defconfig) to enable it if required so
make OMAP_GPMC Kconfig option always visible.

Drop COMPILE_TEST as build fails if IRQ_DOMAIN is not enabled.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/r/20220426082611.24427-2-rogerq@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2 years agosoc: qcom: rpmhpd: add sc8280xp & sa8540p rpmh power-domains
Bjorn Andersson [Tue, 26 Apr 2022 23:35:08 +0000 (16:35 -0700)]
soc: qcom: rpmhpd: add sc8280xp & sa8540p rpmh power-domains

The Qualcomm sc8280xp platform has 13 and the sa8540p platform has 11
power-domains. Add compatibles, the typically used ones power-domains
and their relevant active-only variants, to the RPMh power-domain
driver.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220426233508.1762345-4-bjorn.andersson@linaro.org
2 years agosoc: qcom: rpmhpd: Don't warn about sparse rpmhpd arrays
Bjorn Andersson [Tue, 26 Apr 2022 23:35:07 +0000 (16:35 -0700)]
soc: qcom: rpmhpd: Don't warn about sparse rpmhpd arrays

In some cases the DT binding will fully describe the set of available
RPMh power-domains, but there is no reason for exposing them all in the
implementation.

Omitting individual data->domains is handle gracefully by
of_genpd_add_provider_onecell(), so there's no reason for printing a
warning when this occurs.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220426233508.1762345-3-bjorn.andersson@linaro.org
2 years agodt-bindings: power: rpmpd: Add sc8280xp RPMh power-domains
Bjorn Andersson [Tue, 26 Apr 2022 23:35:06 +0000 (16:35 -0700)]
dt-bindings: power: rpmpd: Add sc8280xp RPMh power-domains

The sc8280xp has 13 power-domains controlled through the RPMh, document
the compatible and provide definitions for the power-domains - and their
active-only variants where applicable.

The SA8540p differs slightly in the power domains exposed, so add a
separate compatible for this, but reuse the constants to allow sharing
the DeviceTree source.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220426233508.1762345-2-bjorn.andersson@linaro.org
2 years agofirmware: arm_scmi: Support optee shared memory in the optee transport
Etienne Carriere [Mon, 25 Apr 2022 08:51:27 +0000 (10:51 +0200)]
firmware: arm_scmi: Support optee shared memory in the optee transport

Add support for TEE shared memory in optee scmi transport. When using
tee shared memory, scmi optee transport manages SCMI messages using
msg protocol(from msg.c) in shared memory, whereas smt(from shmem.c)
protocol is used with static IOMEM based shared buffers.

Link: https://lore.kernel.org/r/20220425085127.2009-1-etienne.carriere@linaro.org
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Add SCMI v3.1 VOLTAGE_LEVEL_SET_COMPLETE
Cristian Marussi [Wed, 30 Mar 2022 15:05:49 +0000 (16:05 +0100)]
firmware: arm_scmi: Add SCMI v3.1 VOLTAGE_LEVEL_SET_COMPLETE

Add SCMI v3.1 voltage protocol support for asynchronous VOLTAGE_LEVEL_SET
command.

Note that, if a voltage domain is advertised to support the asynchronous
version of VOLTAGE_LEVEL_SET, the command will be issued asynchronously
unless explicitly requested to use the synchronous version by setting the
mode to SCMI_VOLTAGE_LEVEL_SET_SYNC when calling voltage_ops->level_set.

The SCMI regulator driver level_set invocation has been left unchanged
so that it will transparently use the asynchronous version if available.

Link: https://lore.kernel.org/r/20220330150551.2573938-21-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Add SCMI v3.1 clock notifications
Cristian Marussi [Wed, 30 Mar 2022 15:05:48 +0000 (16:05 +0100)]
firmware: arm_scmi: Add SCMI v3.1 clock notifications

Add SCMI v3.1 clock pre and post notifications.

Link: https://lore.kernel.org/r/20220330150551.2573938-20-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Add checks for min/max limits in PERFORMANCE_LIMITS_SET
Cristian Marussi [Wed, 30 Mar 2022 15:05:51 +0000 (16:05 +0100)]
firmware: arm_scmi: Add checks for min/max limits in PERFORMANCE_LIMITS_SET

Starting with SCMI v3.1, the PERFORMANCE_LIMITS_SET command allows a user
to request only one between max and min ranges to be changed, while leaving
the other untouched if set to zero in the request. Anyway SCMI v3.1 states
also explicitly that you cannot leave both of those unchanged (zeroed) when
issuing such command, so add a proper check for this condition.

Link: https://lore.kernel.org/r/20220330150551.2573938-23-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
[sudeep.holla: Dropped check for v3.0 and above to make the check
unconditional, updated the subject accordingly]
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts
Cristian Marussi [Wed, 30 Mar 2022 15:05:50 +0000 (16:05 +0100)]
firmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts

Add SCMI v3.1 internal support for parsing message attributes reporting
the capability of a performance domain to report power-cost in microwatts.

Link: https://lore.kernel.org/r/20220330150551.2573938-22-cristian.marussi@arm.com
Cc: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Use common iterators in the perf protocol
Cristian Marussi [Wed, 30 Mar 2022 15:05:47 +0000 (16:05 +0100)]
firmware: arm_scmi: Use common iterators in the perf protocol

Make SCMI perf protocol use the common iterator protocol helpers for
issuing the multi-part commands.

Link: https://lore.kernel.org/r/20220330150551.2573938-19-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Use common iterators in the voltage protocol
Cristian Marussi [Wed, 30 Mar 2022 15:05:46 +0000 (16:05 +0100)]
firmware: arm_scmi: Use common iterators in the voltage protocol

Make SCMI voltage protocol use the common iterator protocol helpers for
issuing the multi-part commands.

Link: https://lore.kernel.org/r/20220330150551.2573938-18-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Use common iterators in the clock protocol
Cristian Marussi [Wed, 30 Mar 2022 15:05:45 +0000 (16:05 +0100)]
firmware: arm_scmi: Use common iterators in the clock protocol

Make SCMI clock protocol use the common iterator protocol helpers for
issuing the multi-part commands.

Link: https://lore.kernel.org/r/20220330150551.2573938-17-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Add SCMI v3.1 SENSOR_AXIS_NAME_GET support
Cristian Marussi [Wed, 30 Mar 2022 15:05:44 +0000 (16:05 +0100)]
firmware: arm_scmi: Add SCMI v3.1 SENSOR_AXIS_NAME_GET support

Add support for SCMI v3.1 SENSOR_AXIS_NAME_GET multi-part command using the
common iterator protocol helpers.

Link: https://lore.kernel.org/r/20220330150551.2573938-16-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Use common iterators in the sensor protocol
Cristian Marussi [Wed, 30 Mar 2022 15:05:43 +0000 (16:05 +0100)]
firmware: arm_scmi: Use common iterators in the sensor protocol

Make SCMI sensor protocol use the common iterator protocol helpers
for issuing the multi-part commands.

Link: https://lore.kernel.org/r/20220330150551.2573938-15-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Add iterators for multi-part commands
Cristian Marussi [Wed, 30 Mar 2022 15:05:42 +0000 (16:05 +0100)]
firmware: arm_scmi: Add iterators for multi-part commands

SCMI specification defines some commands as optionally issued over multiple
messages in order to overcome possible limitations in payload size enforced
by the configured underlyinng transport.

Introduce some common protocol helpers to provide a unified solution for
issuing such SCMI multi-part commands.

Link: https://lore.kernel.org/r/20220330150551.2573938-14-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Parse clock_enable_latency conditionally
Cristian Marussi [Wed, 30 Mar 2022 15:05:41 +0000 (16:05 +0100)]
firmware: arm_scmi: Parse clock_enable_latency conditionally

The clock_enable_latency field in CLOCK_ATTRIBUTES response message has
been added only since SCMI v3.1. Use the advertised SCMI clock protocol
version as a proper condition check for parsing it, instead of the bare
message length lookup.

Link: https://lore.kernel.org/r/20220330150551.2573938-13-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Set clock latency to U32_MAX if it is not supported
Sudeep Holla [Thu, 28 Apr 2022 12:29:13 +0000 (13:29 +0100)]
firmware: arm_scmi: Set clock latency to U32_MAX if it is not supported

As per the spec, the clock_enable_delay is the worst case latency
incurred by the platform to enable the clock. The value of 0 indicates
that the platform doesn't support the same and must be considered as
maximum latency for practical purposes.

Currently the value of 0 is assigned as is and is propogated to the clock
framework which can assume that the clock can support atomic enable operation.

Link: https://lore.kernel.org/r/20220428122913.1654821-1-sudeep.holla@arm.com
Fixes: 18f295b758b2 ("firmware: arm_scmi: Add support for clock_enable_latency")
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Add SCMI v3.1 protocol extended names support
Cristian Marussi [Wed, 30 Mar 2022 15:05:40 +0000 (16:05 +0100)]
firmware: arm_scmi: Add SCMI v3.1 protocol extended names support

Using the common protocol helper implementation add support for all new
SCMIv3.1 extended names commands related to all protocols with the
exception of SENSOR_AXIS_GET_NAME.

Link: https://lore.kernel.org/r/20220330150551.2573938-12-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Introduce a common SCMI v3.1 .extended_name_get helper
Cristian Marussi [Wed, 30 Mar 2022 15:05:39 +0000 (16:05 +0100)]
firmware: arm_scmi: Introduce a common SCMI v3.1 .extended_name_get helper

Introduce a new set of common protocol operations bound to the protocol
handle structure so that can be invoked by the protocol implementation code
even when protocols are built as distinct loadable kernel module without
the need of exporting new symbols, like already done with scmi_xfer_ops.

Add at first, as new common protocol helper, an .extended_name_get helper
which will ease implementation and will avoid code duplication when adding
new SCMIv3.1 per-protocol _NAME_GET commands.

Link: https://lore.kernel.org/r/20220330150551.2573938-11-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Split protocol specific definitions in a dedicated header
Cristian Marussi [Wed, 30 Mar 2022 15:05:38 +0000 (16:05 +0100)]
firmware: arm_scmi: Split protocol specific definitions in a dedicated header

Move some SCMI protocol specific definitions from common.h into a the new
dedicated protocols.h header so that SCMI protocols core code can include
only what it needs; this is going to be useful to avoid the risk of growing
indefinitely the dimension of common.h, especially when introducing some
common protocols helper functions.

Header common.h will continue to be included by SCMI core and transport
layers.

Link: https://lore.kernel.org/r/20220330150551.2573938-10-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Remove unneeded NULL termination of clk name
Cristian Marussi [Wed, 30 Mar 2022 15:05:37 +0000 (16:05 +0100)]
firmware: arm_scmi: Remove unneeded NULL termination of clk name

The string array 'name' inside struct scmi_clock_info holds the clock name
which was successfully retrieved by querying the SCMI platform, unless the
related underlying SCMI command failed.

Anyway, such scmi_clock_info structure is allocated using devm_kcalloc()
which in turn internally appends a __GFP_ZERO flag to its invocation:
as a consequence the string 'name' field does not need to be zeroed when
we fail to get the clock name via SCMI, it is already NULL terminated.

Remove unneeded explicit NULL termination.

Link: https://lore.kernel.org/r/20220330150551.2573938-9-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Check CLOCK_RATE_SET_COMPLETE async response
Cristian Marussi [Wed, 30 Mar 2022 15:05:36 +0000 (16:05 +0100)]
firmware: arm_scmi: Check CLOCK_RATE_SET_COMPLETE async response

When CLOCK_RATE_SET command is issued in asynchronous mode the delayed
response CLOCK_RATE_SET_COMPLETE comes back once the SCMI platform has
effectively operated the requested change: such delayed response carries
also the clock ID and the final clock rate that has been set.

As an aid to debug issues, check that the clock ID in the delayed
response matches the expected one and debug print the rate value.

Link: https://lore.kernel.org/r/20220330150551.2573938-8-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Make name_get operations return a const
Cristian Marussi [Wed, 30 Mar 2022 15:05:35 +0000 (16:05 +0100)]
firmware: arm_scmi: Make name_get operations return a const

A few protocol operations are available that returns a pointer to an
internal character array representing resource name. Make those functions
return a const pointer to such array.

Link: https://lore.kernel.org/r/20220330150551.2573938-7-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_scmi: Dynamically allocate implemented protocols array
Cristian Marussi [Wed, 30 Mar 2022 15:05:34 +0000 (16:05 +0100)]
firmware: arm_scmi: Dynamically allocate implemented protocols array

Move away from a statically allocated array for holding the current set of
protocols implemented by the platform in favour of allocating it
dynamically based on the number of protocols effectively advertised by the
platform via BASE protocol exchanges.

While at that, rectify the BASE_DISCOVER_LIST_PROTOCOLS loop iterations to
terminate only when a number of protocols equal to the advertised ones has
been received, instead of looping till the platform returns no more
protocols descriptors. This new behaviour is better compliant with the
specification and it has been tested to work equally well against an SCMI
stack running on top of an official SCP firmware on a JUNO board.

Link: https://lore.kernel.org/r/20220330150551.2573938-6-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>