platform/kernel/linux-starfive.git
15 months agoMerge tag 'scmi-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Arnd Bergmann [Mon, 17 Apr 2023 15:38:41 +0000 (17:38 +0200)]
Merge tag 'scmi-updates-6.4' of git://git./linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm SCMI updates for v6.4

The main and only new addition this time around is the support for
unidirectional mailbox channels. SCMI communicates between the agent
and the platform using one bidirectional 'a2p' channel used by the agent
to send SCMI commands and synchronously receive the related replies, and
an optional 'p2a' unidirectional channel used to asynchronously receive
delayed responses and notifications emitted from the platform.

In order to support platforms that support only unidirectional mailbox
hardware channels, the existing bindings are extended to support the
same. Both bidirectional and unidirectional channels support for the
SCMI mailbox can coexist. The correct and effective combination of
defined 'mboxes' and 'shmem' descriptors determines the type of the
mailbox channel.

This also contains a fix for the transfers allocation on Rx channel
especially when the base protocol doesn't use Rx channel while some
of the protocols can have dedicated Rx channels.

* tag 'scmi-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Add support for unidirectional mailbox channels
  dt-bindings: firmware: arm,scmi: Support mailboxes unidirectional channels
  firmware: arm_scmi: Fix xfers allocation on Rx channel
  firmware: arm_scmi: Use the bitmap API to allocate bitmaps
  firmware: arm_scmi: Fix device node validation for mailbox transport
  firmware: arm_scmi: Fix raw coexistence mode behaviour on failure path
  firmware: arm_scmi: Remove duplicate include header inclusion
  firmware: arm_scmi: Return a literal instead of a variable
  firmware: arm_scmi: Clean up a return statement in scmi_probe

Link: https://lore.kernel.org/r/20230417145743.1904318-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'vexpress-update-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 17 Apr 2023 15:38:32 +0000 (17:38 +0200)]
Merge tag 'vexpress-update-6.4' of git://git./linux/kernel/git/sudeep.holla/linux into soc/drivers

Armv7/v8 Vexpress update for v6.4

Addition of explicit of_platform.h header inclusion and removal of
soon to be removed of_device.h

* tag 'vexpress-update-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  bus: vexpress-config: Add explicit of_platform.h include

Link: https://lore.kernel.org/r/20230417145724.1904259-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'memory-controller-drv-6.4-2' of https://git.kernel.org/pub/scm/linux/kerne...
Arnd Bergmann [Mon, 17 Apr 2023 15:38:04 +0000 (17:38 +0200)]
Merge tag 'memory-controller-drv-6.4-2' of https://git./linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers

Memory controller drivers for v6.4, part two

1. Tegra210 EMC: correct reading of MR18 register.
2. MediaTek SMI: add support for MT8365.

* tag 'memory-controller-drv-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: mtk-smi: mt8365: Add SMI Support
  dt-bindings: memory-controllers: mediatek,smi-larb: add mt8365
  dt-bindings: memory-controllers: mediatek,smi-common: add mt8365
  memory: tegra: read values from correct device

Link: https://lore.kernel.org/r/20230416143248.308942-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'v6.3-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias...
Arnd Bergmann [Fri, 14 Apr 2023 20:39:49 +0000 (22:39 +0200)]
Merge tag 'v6.3-next-soc' of https://git./linux/kernel/git/matthias.bgg/linux into soc/drivers

mtk-svs:
smaller coding style changes

mtk-mutex:
- add support for mt8365 display and mt8195 VPP mutex
- add support for more then 32 mods
- use module_platform_driver instead of open coding

mtk-mmsys:
- add support for mt8195 RSZ switching
- add remove function
- use module_platform_driver instead of open coding
- split out mt8173 routing table from the legacy table
- bump up resets in mt8173 to 64
- add support for mt6795 (Helio X10)
- clean-up IS_REACHABLE code for cmdq

* tag 'v6.3-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (25 commits)
  soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS
  soc: mediatek: mutex: Use dev_err_probe()
  soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
  soc: mediatek: mtk-mmsys: Change MT8173 num_resets to 64
  soc: mediatek: mtk-mmsys: Split out MT8173 mmsys DDP routing table
  soc: mediatek: Cleanup ifdefs for IS_REACHABLE(CONFIG_MTK_CMDQ)
  soc: mediatek: cmdq: Add inline functions for !CONFIG_MTK_CMDQ
  soc: mediatek: mtk-mutex: Use module_platform_driver() macro
  soc: mediatek: mtk-mutex: Replace max handles number with definition
  soc: mediatek: mtk-mutex: Compress of_device_id array entries
  soc: mediatek: mtk-mmsys: Add MODULE_DEVICE_TABLE() to allow auto-load
  soc: mediatek: mtk-mmsys: Compress of_device_id array entries
  soc: mediatek: mtk-mmsys: Use module_platform_driver() macro
  soc: mediatek: mtk-mmsys: Add .remove() callback
  dt-bindings: soc: mediatek: add display mutex for MT8365 SoC
  dt-bindings: soc: mediatek: specify which compatible requires clocks property
  soc: mediatek: mtk-svs: add thermal voltage compensation if needed
  soc: mediatek: mtk-svs: fix passing zero to 'PTR_ERR'
  soc: mediatek: mtk-svs: delete node name check
  soc: mediatek: mutex: support MT8195 VPPSYS
  ...

Link: https://lore.kernel.org/r/bc9f7a74-ce12-b323-021c-ff2c0473e979@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agosoc: ti: smartreflex: Simplify getting the opam_sr pointer
Uwe Kleine-König [Wed, 12 Oct 2022 14:00:32 +0000 (16:00 +0200)]
soc: ti: smartreflex: Simplify getting the opam_sr pointer

The probe function stores the sr_info pointer using
platform_set_drvdata(). Use the corresponding platform_get_drvdata() to
retrieve that pointer in the remove and shutdown functions.

This simplifies these functions and makes error handling unnecessary.
This is a good thing as at least for .remove() returning an error code
doesn't have the desired effect.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'qcom-drivers-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Fri, 14 Apr 2023 12:55:48 +0000 (14:55 +0200)]
Merge tag 'qcom-drivers-for-6.4-2' of https://git./linux/kernel/git/qcom/linux into soc/drivers

A few more Qualcomm driver updates for v6.4

This introduces a new binding and a dedicated driver for the Qualcomm
Inline-Crypto-Engine (ICE), in order to support a single shared instance
between SDHCI and UFS, found in recent platforms.

RSC version check is updated to support minor revisions of v3 of the ip
block, the SMD-RPM interface is transitioned to GFP_ATOMIC to avoid the
shrinker to kick in underneath the GPU and QCM2290 support is added to
the SCM binding.

* tag 'qcom-drivers-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  dt-bindings: crypto: Add Qualcomm Inline Crypto Engine
  soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver
  dt-bindings: firmware: document Qualcomm QCM2290 SCM
  soc: qcom: rpmh-rsc: Support RSC v3 minor versions
  soc: qcom: smd-rpm: Use GFP_ATOMIC in write path

Link: https://lore.kernel.org/r/20230414024302.2411985-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'arm-soc/for-6.4/drivers' of https://github.com/Broadcom/stblinux into...
Arnd Bergmann [Fri, 14 Apr 2023 12:54:33 +0000 (14:54 +0200)]
Merge tag 'arm-soc/for-6.4/drivers' of https://github.com/Broadcom/stblinux into soc/drivers

This pull request contains Broadcom SoCs drivers changes for 6.4, please
pull the following:

- Zhaoyang fixes an of_iomap() leak in the STB BIU driver

- Florian removes the bare-metal ARM suspend/resume code which has long
  been replaced by the standard PSCI suspend/resume.

* tag 'arm-soc/for-6.4/drivers' of https://github.com/Broadcom/stblinux:
  soc: bcm: brcmstb: biuctrl: fix of_iomap leak
  soc: bcm: brcmstb: Remove bare-metal ARM suspend/resume code
  kbuild, soc: bcm: bcm2835-power: remove MODULE_LICENSE in non-modules
  kbuild, soc: bcm: raspberrypi-power: remove MODULE_LICENSE in non-modules
  bus: brcmstb_gisb: Use devm_platform_get_and_ioremap_resource()

Link: https://lore.kernel.org/r/20230410232606.1917803-3-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'qcom-drivers-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Fri, 14 Apr 2023 12:34:17 +0000 (14:34 +0200)]
Merge tag 'qcom-drivers-for-6.4' of https://git./linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.4

The Qualcomm SCM driver will now always clear the download bit, avoiding
entering download mode on a clean reboot because the bootloader left it
set. The vmid bitmap passed to qcom_scm_assign_mem() is transitioned to
a well defined size. SM6375 support is added, and SC8180X,
QDU1000/QRU1000, IPQ5332 and IPQ9574 compatibles are documented.

GENI gains support for newer hardware with deeper FIFOs.

The BWMON driver is updated to better handle the two register blocks,
which are not consistent between MSM8998 and newer platforms.

The LLCC driver no longer assumes a fixes stride across the various
banks, and instead acquire the bank placement from DeviceTree. EDAC
support for polling is introduced. EDAC support on SDM845 is disabled,
as its been observed that accessing relevant registers is not permitted
on most devices.

PMIC GLINK is reworked to support defining which auxiliary children to
spawn per platform, support for spawning a UCSI child is added and
SM8450 and SM8550 is introduced.

The RPM power-domain driver is cleaned up by moving and generalizing
structures that are common between platforms, rather than duplicating
everything. Macros are replaced with just direct definition of the
relevant structures. Support for defining parent relationships between
the power-domains is introduced, like it has been in rpmhpd for a long
time.

Number of processors has gone up, so max processor count in SMEM
is bumped again. Error handling in SMSM is cleaned up using
dev_err_probe().

Socinfo is taught about IPQ9574, QCM2290, QRB2210, QRB4210, SM7150,
SA8775P and a number of PMICs.

* tag 'qcom-drivers-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (51 commits)
  dt-bindings: firmware: document Qualcomm SC8180X SCM
  dt-bindings: sram: qcom,imem: document SM6375 IMEM
  soc: qcom: icc-bwmon: Handle global registers correctly
  soc: qcom: icc-bwmon: Remove unused struct member
  soc: qcom: smsm: Use dev_err_probe()
  firmware: qcom_scm: Add SM6375 compatible
  soc: qcom: llcc: Add configuration data for SM7150
  dt-bindings: arm: msm: Add LLCC for SM7150
  dt-bindings: soc: qcom: smd-rpm: re-add missing qcom,rpm-msm8994
  soc: qcom: pmic_glink: register ucsi aux device
  dt-bindings: soc: qcom: qcom,pmic-glink: document SM8550 compatible
  dt-bindings: soc: qcom: qcom,pmic-glink: document SM8450 compatible
  firmware: qcom_scm: Clear download bit during reboot
  dt-bindings: soc: qcom: aoss: Document QDU1000/QRU1000 compatible
  dt-bindings: firmware: qcom,scm: Update QDU1000/QRU1000 compatible
  dt-bindings: soc: qcom: smd-rpm: Add IPQ9574 compatible
  firmware: qcom_scm: Use fixed width src vm bitmap
  dt-bindings: firmware: qcom,scm: document IPQ5332 SCM
  dt-bindings: scm: Add compatible for IPQ9574
  soc: qcom: rpmpd: Remove useless comments
  ...

Link: https://lore.kernel.org/r/20230410152421.4477-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'ti-driver-soc-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Fri, 14 Apr 2023 12:33:36 +0000 (14:33 +0200)]
Merge tag 'ti-driver-soc-for-v6.4' of git://git./linux/kernel/git/ti/linux into soc/drivers

TI SoC driver updates for v6.4

* Minor fixups for of_property, using devm_platform_ioremap
* Fixups for refcount leaks in pm33xx
* Fixups for k3-ringacc for dmaring_request
* SoCinfo detection for J784S4 SoC.

* tag 'ti-driver-soc-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: Use devm_platform_ioremap_resource()
  soc: ti: k3-socinfo: Add entry for J784S4 SOC
  soc: ti: Use of_property_read_bool() for boolean properties
  soc: ti: Use of_property_present() for testing DT property presence
  soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe
  soc: ti: k3-ringacc: Add try_module_get() to k3_dmaring_request_dual_ring()

Link: https://lore.kernel.org/r/20230410140506.ucvkwq7vz2h47vyj@stipulate
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'renesas-drivers-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kerne...
Arnd Bergmann [Fri, 14 Apr 2023 12:32:54 +0000 (14:32 +0200)]
Merge tag 'renesas-drivers-for-v6.4-tag2' of git://git./linux/kernel/git/geert/renesas-devel into soc/drivers

Renesas driver updates for v6.4 (take two)

  - Add "renesas," file contents pattern to MAINTAINERS,
  - Fix a small leak on OOM.

* tag 'renesas-drivers-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: renesas-soc: Release 'chipid' from ioremap()
  MAINTAINERS: renesas: Add "renesas," file contents pattern

Link: https://lore.kernel.org/r/cover.1681113115.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'sunxi-drivers-for-6.4-1' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Fri, 14 Apr 2023 12:32:12 +0000 (14:32 +0200)]
Merge tag 'sunxi-drivers-for-6.4-1' of https://git./linux/kernel/git/sunxi/linux into soc/drivers

- remove MODULE_LICENSE from sram driver
- use of_property_present() in mbus driver

* tag 'sunxi-drivers-for-6.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  kbuild, soc: sunxi: sram: remove MODULE_LICENSE in non-modules
  soc: sunxi: Use of_property_present() for testing DT property presence

Link: https://lore.kernel.org/r/20230408125255.GA17134@jernej-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'imx-drivers-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Arnd Bergmann [Fri, 14 Apr 2023 12:30:59 +0000 (14:30 +0200)]
Merge tag 'imx-drivers-6.4' of git://git./linux/kernel/git/shawnguo/linux into soc/drivers

i.MX drivers update for 6.4:

- Use dev_err_probe() for imx-scu driver to silences EPROBE_DEFER
  messages.
- Add LVDS LPI2C and PWM power domains for scu-pd driver.
- A series from Jindong Yue to support module build of imx8m soc driver.
- Update imx8m-blk-ctrl driver to scan child nodes for binding drivers.
- Reorder structure members in imx8m-blk-ctrl driver by following
  clang-analyzer suggestion.
- Update imx-weim bus driver to use helper function for "ranges"
  parsing.

* tag 'imx-drivers-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  soc: imx: imx8m-blk-ctrl: reordering the fields
  soc: imx8m: Support building imx8m soc driver as module
  soc: imx8m: Add MODULE_LICENSE
  soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE
  soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name
  soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE
  soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match
  soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name
  soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
  firmware: imx: scu-pd: add missed lvds lpi2c and pwm power domains
  bus: imx-weim: Remove open coded "ranges" parsing
  firmware: imx: scu: use dev_err_probe

Link: https://lore.kernel.org/r/20230408101928.280271-1-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'riscv-soc-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Fri, 14 Apr 2023 12:30:13 +0000 (14:30 +0200)]
Merge tag 'riscv-soc-for-v6.4' of https://git./linux/kernel/git/conor/linux into soc/drivers

RISC-V SoC drivers for v6.4

Microchip:
Mailbox controller & client changes for the system controller on
PolarFire SoC. The controller bits have been acked by Jassi.
Primarily the changes work around a "hardware" bug (really the system
controller's software, but it may as well be hardware as customers
cannot change it) where interrupts are not generated if a service fails.
The mailbox controller driver is tweaked to use polling, rather than
interrupt, mode and there are some changes to timeout code required in
the client driver as a result. There's some opportunistic cleanup that I
performed while doing the swap too.

Canaan:
A single fix for some randconfig issues that crop up when !mmu is
enabled for 32-bit kernels, due to my changes in a previous release that
swapped out select based entablement of the driver.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* tag 'riscv-soc-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  soc: microchip: mpfs: add a prefix to rx_callback()
  soc: microchip: mpfs: handle timeouts and failed services differently
  soc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction()
  soc: microchip: mpfs: use a consistent completion timeout
  soc: microchip: mpfs: fix some horrible alignment
  mailbox: mpfs: check the service status in .tx_done()
  mailbox: mpfs: ditch a useless busy check
  mailbox: mpfs: switch to txdone_poll
  mailbox: mpfs: fix an incorrect mask width
  soc: canaan: Make K210_SYSCTL depend on CLK_K210

Link: https://lore.kernel.org/r/20230406-islamist-mop-81d651b8830d@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'tegra-for-6.4-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Fri, 14 Apr 2023 12:16:11 +0000 (14:16 +0200)]
Merge tag 'tegra-for-6.4-firmware' of git://git./linux/kernel/git/tegra/linux into soc/drivers

soc/tegra: Changes for v6.4-rc1

This contains minor fixes and cleanups. Note that one of the patches
here includes ARM firmware changes, but I picked that up after checking
with Sudeep and Rob because it didn't seem worth splitting it up any
further.

* tag 'tegra-for-6.4-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: Use of_property_present() for testing DT property presence
  firmware: tegra: bpmp: Fix error paths in debugfs

Link: https://lore.kernel.org/r/20230406124804.970394-3-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'tegra-for-6.4-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra...
Arnd Bergmann [Fri, 14 Apr 2023 12:15:19 +0000 (14:15 +0200)]
Merge tag 'tegra-for-6.4-soc' of git://git./linux/kernel/git/tegra/linux into soc/drivers

soc/tegra: Changes for v6.4-rc1

Contains various minor cleanups and fixes as well as support for several
more wake events on Tegra234.

* tag 'tegra-for-6.4-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: fuse: Remove nvmem root only access
  soc/tegra: cbb: tegra194: Use of_address_count() helper
  soc/tegra: cbb: Remove MODULE_LICENSE in non-modules
  soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource()
  soc: tegra: cbb: Drop empty platform remove function
  soc/tegra: pmc: Support software wake-up for SPE
  soc/tegra: pmc: Add wake source interrupt for MGBE
  soc/tegra: pmc: Add the PMIC wake event for Tegra234
  soc/tegra: bpmp: Actually free memory on error path
  soc/tegra: cbb: remove linux/version.h

Link: https://lore.kernel.org/r/20230406124804.970394-2-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'tegra-for-6.4-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Fri, 14 Apr 2023 12:12:48 +0000 (14:12 +0200)]
Merge tag 'tegra-for-6.4-arm-core' of git://git./linux/kernel/git/tegra/linux into soc/drivers

ARM: tegra: Core changes for v6.4-rc1

This contains a single commit to drop MODULE_LICENSE() from a driver
that can't be built as a module since that can now confuse tooling.

* tag 'tegra-for-6.4-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  ARM: tegra: Remove MODULE_LICENSE in non-modules

Link: https://lore.kernel.org/r/20230406124804.970394-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agoMerge tag 'asahi-soc-rtkit-6.4' of https://github.com/AsahiLinux/linux into soc/drivers
Arnd Bergmann [Fri, 14 Apr 2023 12:12:05 +0000 (14:12 +0200)]
Merge tag 'asahi-soc-rtkit-6.4' of https://github.com/AsahiLinux/linux into soc/drivers

Apple SoC RTKit updates for 6.4.

Just one bugfix and one improvement to how forwarded syslogs are sent to
dmesg.

* tag 'asahi-soc-rtkit-6.4' of https://github.com/AsahiLinux/linux:
  soc: apple: rtkit: Crop syslog messages
  soc: apple: rtkit: Fix buffer address field width

Link: https://lore.kernel.org/r/0dbd2dc1-6a2c-5b21-354b-d8314937e8e7@marcan.st
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agobus: vexpress-config: Add explicit of_platform.h include
Rob Herring [Mon, 10 Apr 2023 23:27:26 +0000 (18:27 -0500)]
bus: vexpress-config: Add explicit of_platform.h include

vexpress-config uses of_platform_* functions which are declared in
of_platform.h. of_platform.h gets implicitly included by of_device.h,
but that is going to be removed soon. Nothing else depends on
of_device.h so it can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://lore.kernel.org/r/20230410232727.1562115-1-robh@kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
15 months agosoc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS
AngeloGioacchino Del Regno [Mon, 3 Apr 2023 09:33:04 +0000 (11:33 +0200)]
soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS

The mtk-mmsys and mutex drivers do have a dependency on MTK_CMDQ,
even though both can work with *or* without it: since CMDQ support
can be enabled either as module or as built-in, it is necessary to
add a depends rule in Kconfig, so that we disallow building both
mtk-mmsys and mtk-mutex as built-in if mtk-cmdq-helper is built as
a module, otherwise obvious linker issues appear.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230403093304.276418-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
15 months agomemory: mtk-smi: mt8365: Add SMI Support
Alexandre Mergnat [Fri, 7 Apr 2023 09:13:51 +0000 (11:13 +0200)]
memory: mtk-smi: mt8365: Add SMI Support

Add MT8365 SMI common support.

Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230407-smi-driver-v2-1-8da6683cdb5c@baylibre.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
15 months agodt-bindings: memory-controllers: mediatek,smi-larb: add mt8365
Alexandre Mergnat [Fri, 7 Apr 2023 09:13:53 +0000 (11:13 +0200)]
dt-bindings: memory-controllers: mediatek,smi-larb: add mt8365

Add binding description for mediatek,mt8365-smi-larb

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230407-smi-driver-v2-3-8da6683cdb5c@baylibre.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
15 months agodt-bindings: memory-controllers: mediatek,smi-common: add mt8365
Alexandre Mergnat [Fri, 7 Apr 2023 09:13:52 +0000 (11:13 +0200)]
dt-bindings: memory-controllers: mediatek,smi-common: add mt8365

Add binding description for mediatek,mt8365-smi-common

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230407-smi-driver-v2-2-8da6683cdb5c@baylibre.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
15 months agomemory: tegra: read values from correct device
Diogo Ivo [Wed, 22 Mar 2023 23:40:50 +0000 (23:40 +0000)]
memory: tegra: read values from correct device

When reading MR18 for Dev1 the code was incorrectly reading the
value corresponding to Dev0, so fix this by adjusting the index
according to the Tegra X1 TRM.

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20230322234050.47332-1-diogo.ivo@tecnico.ulisboa.pt
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
15 months agodt-bindings: crypto: Add Qualcomm Inline Crypto Engine
Abel Vesa [Fri, 7 Apr 2023 10:50:24 +0000 (13:50 +0300)]
dt-bindings: crypto: Add Qualcomm Inline Crypto Engine

Add schema file for new Qualcomm Inline Crypto Engine driver.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230407105029.2274111-2-abel.vesa@linaro.org
15 months agoMerge tag '20230407105029.2274111-4-abel.vesa@linaro.org' into drivers-for-6.4
Bjorn Andersson [Fri, 7 Apr 2023 19:12:27 +0000 (12:12 -0700)]
Merge tag '20230407105029.2274111-4-abel.vesa@linaro.org' into drivers-for-6.4

The dedicated ICE driver was merged through a immutable tag, to make it
available to other maintainers.

15 months agosoc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver
Abel Vesa [Fri, 7 Apr 2023 10:50:26 +0000 (13:50 +0300)]
soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver

This takes the already existing duplicated support in both ufs-qcom
and sdhci-msm drivers and makes it a dedicated driver that can be used
by both mentioned drivers.

The reason for this is because, staring with SM8550, the ICE IP block
is shared between UFS and SDCC, which means we need to probe a dedicated
device and share it between those two consumers.

So let's add the ICE dedicated driver as a soc driver.

Platforms that already have ICE supported, will use it as a library
as the of_qcom_ice_get will return an ICE instance created for the
consumer device. This allows the backwards compatibility with old-style
devicetree approach.

Also, add support to HW version 4.x since it works out-of-the-box with
the current driver. The 4.x HW version is found on SM8550 platform.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230407105029.2274111-4-abel.vesa@linaro.org
15 months agodt-bindings: firmware: document Qualcomm QCM2290 SCM
Konrad Dybcio [Wed, 5 Apr 2023 15:50:30 +0000 (17:50 +0200)]
dt-bindings: firmware: document Qualcomm QCM2290 SCM

Add a compatible for Qualcomm QCM2290 SCM and add it to the core clock
users list.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230403-topic-rb1_qcm-v2-1-dae06f8830dc@linaro.org
15 months agosoc: qcom: rpmh-rsc: Support RSC v3 minor versions
Tushar Nimkar [Thu, 6 Apr 2023 11:57:32 +0000 (17:27 +0530)]
soc: qcom: rpmh-rsc: Support RSC v3 minor versions

RSC v3 register offsets are same for all minor versions of v3. Fix a
minor version check to pick correct offsets for all v3 minor versions.

Fixes: 40482e4f7364 ("soc: qcom: rpmh-rsc: Add support for RSC v3 register offsets")
Signed-off-by: Tushar Nimkar <quic_tnimkar@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230406115732.9293-1-quic_tnimkar@quicinc.com
15 months agosoc: qcom: smd-rpm: Use GFP_ATOMIC in write path
Rob Clark [Mon, 20 Mar 2023 14:43:42 +0000 (07:43 -0700)]
soc: qcom: smd-rpm: Use GFP_ATOMIC in write path

Preparing for better lockdep annotations for things that happen in runpm
suspend/resume path vs shrinker/reclaim in the following patches, we
need to avoid allocations that can trigger reclaim in the icc_set_bw()
path.  In the RPMh case, rpmh_write_batch() already uses GFP_ATOMIC, so
it should be reasonable to use in the smd-rpm case as well.

Alternatively, 256bytes is small enough for a function that isn't called
recursively to allocate on-stack.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230320144356.803762-21-robdclark@gmail.com
15 months agoMerge tag 'optee-load-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux...
Arnd Bergmann [Thu, 6 Apr 2023 08:19:33 +0000 (10:19 +0200)]
Merge tag 'optee-load-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers

Add SMC for OP-TEE image loading

Adds an SMC call for loading OP-TEE by the kernel.

* tag 'optee-load-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: optee: Add SMC for loading OP-TEE image

Link: https://lore.kernel.org/r/20230405062701.GA3391925@rayden
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 months agosoc/tegra: fuse: Remove nvmem root only access
Kartik [Tue, 17 Jan 2023 08:30:55 +0000 (14:00 +0530)]
soc/tegra: fuse: Remove nvmem root only access

To read fuse values, various "non-root" userspace applications require
access to nvmem binary interface.

Remove root only access for nvmem userspace binary interface.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
15 months agosoc/tegra: cbb: tegra194: Use of_address_count() helper
Yang Yingliang [Thu, 27 Oct 2022 06:56:25 +0000 (14:56 +0800)]
soc/tegra: cbb: tegra194: Use of_address_count() helper

After commit 16988c742968 ("of/address: introduce of_address_count() helper"),
We can use of_address_count() to instead of open-coding it.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
15 months agosoc/tegra: cbb: Remove MODULE_LICENSE in non-modules
Nick Alcock [Tue, 28 Feb 2023 13:02:15 +0000 (13:02 +0000)]
soc/tegra: cbb: Remove MODULE_LICENSE in non-modules

Since commit 8b41fc4454e ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.

So remove it in the files in this commit, none of which can be built as
modules.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Thierry Reding <treding@nvidia.com>
15 months agoARM: tegra: Remove MODULE_LICENSE in non-modules
Nick Alcock [Fri, 17 Feb 2023 14:10:44 +0000 (14:10 +0000)]
ARM: tegra: Remove MODULE_LICENSE in non-modules

Since commit 8b41fc4454e ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.

So remove it in the files in this commit, none of which can be built as
modules.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Thierry Reding <treding@nvidia.com>
15 months agosoc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource()
Ye Xingchen [Wed, 15 Feb 2023 09:18:03 +0000 (17:18 +0800)]
soc/tegra: flowctrl: Use 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.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Thierry Reding <treding@nvidia.com>
15 months agosoc: tegra: cbb: Drop empty platform remove function
Uwe Kleine-König [Mon, 12 Dec 2022 22:25:49 +0000 (23:25 +0100)]
soc: tegra: cbb: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
15 months agofirmware: arm_scmi: Add support for unidirectional mailbox channels
Cristian Marussi [Tue, 4 Apr 2023 11:50:26 +0000 (12:50 +0100)]
firmware: arm_scmi: Add support for unidirectional mailbox channels

Extend the SCMI transport layer to support mailbox controllers that expose
communication channels that are unidirectional by nature.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230404115026.2828149-3-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
15 months agodt-bindings: firmware: arm,scmi: Support mailboxes unidirectional channels
Cristian Marussi [Tue, 4 Apr 2023 11:50:25 +0000 (12:50 +0100)]
dt-bindings: firmware: arm,scmi: Support mailboxes unidirectional channels

SCMI defines two kinds of communication channels between the agent and the
platform: one bidirectional 'a2p' channel used by the agent to send SCMI
commands and synchronously receive the related replies, and an optional
'p2a' unidirectional channel used to asynchronously receive delayed
responses and notifications emitted from the platform.

When configuring an SCMI transport based on mailboxes, the current binding
supports only mailboxes providing bidirectional channels: in such a case
one mailbox channel can be easily assigned to each SCMI channel as above
described.

In case, instead, to have to deal with mailboxes providing only distinct
unidirectional channels, it becomes necessary to extend the binding in
order to be able to bind 2 distinct unidirectional mailbox channels to the
same SCMI 'a2p' channel.

Bidirectional and unidirectional channels support for the SCMI mailbox
transport can coexist by carefully considering the effective combination
of defined 'mboxes' and 'shmem' descriptors.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230404115026.2828149-2-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
15 months agodt-bindings: firmware: document Qualcomm SC8180X SCM
Vinod Koul [Sat, 25 Mar 2023 12:24:33 +0000 (17:54 +0530)]
dt-bindings: firmware: document Qualcomm SC8180X SCM

Document the compatible for Qualcomm sc8180x SCM.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230325122444.249507-2-vkoul@kernel.org
15 months agodt-bindings: sram: qcom,imem: document SM6375 IMEM
Konrad Dybcio [Thu, 16 Mar 2023 14:12:52 +0000 (15:12 +0100)]
dt-bindings: sram: qcom,imem: document SM6375 IMEM

Add a compatible for SM6375 IMEM.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-3-708b8191f7eb@linaro.org
15 months agofirmware: Use of_property_present() for testing DT property presence
Rob Herring [Fri, 10 Mar 2023 14:47:04 +0000 (08:47 -0600)]
firmware: Use of_property_present() for testing DT property presence

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
15 months agosoc: qcom: icc-bwmon: Handle global registers correctly
Konrad Dybcio [Wed, 15 Mar 2023 14:11:21 +0000 (15:11 +0100)]
soc: qcom: icc-bwmon: Handle global registers correctly

The BWMON hardware has two sets of registers: one for the monitor itself
and one called "global". It has what seems to be some kind of a head
switch and an interrupt control register. It's usually 0x200 in size.

On fairly recent SoCs (with the starting point seemingly being moving
the OSM programming to the firmware) these two register sets are
contiguous and overlapping, like this (on sm8450):

/* notice how base.start == global_base.start+0x100 */
reg = <0x90b6400 0x300>, <0x90b6300 0x200>;
reg-names = "base", "global_base";

Which led to some confusion and the assumption that since the
"interesting" global registers begin right after global_base+0x100,
there's no need to map two separate regions and one can simply subtract
0x100 from the offsets.

This is however not the case for anything older than SDM845, as the
global region can appear in seemingly random spots on the register map.

Handle the case where the global registers are mapped separately to allow
proper functioning of BWMONv4 on MSM8998 and older. Add specific
compatibles for 845, 8280xp, 7280 and 8550 (all of which use the single
reg space scheme) to keep backwards compatibility with old DTs.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-3-77a050c2fbda@linaro.org
15 months agosoc: qcom: icc-bwmon: Remove unused struct member
Konrad Dybcio [Wed, 15 Mar 2023 14:11:20 +0000 (15:11 +0100)]
soc: qcom: icc-bwmon: Remove unused struct member

bwmon->regmap was never used, as the regmap for bwmon is registered
through devres and accessed through bwmon's regmap_field members.
Remove it

Fixes: ec63dcd3c863 ("soc: qcom: icc-bwmon: use regmap and prepare for BWMON v5")
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-2-77a050c2fbda@linaro.org
16 months agoMerge tag 'amlogic-drivers-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 4 Apr 2023 14:10:21 +0000 (16:10 +0200)]
Merge tag 'amlogic-drivers-for-v6.4' of https://git./linux/kernel/git/amlogic/linux into soc/drivers

Amlogic Drivers changes for v6.4:
- convert clk-measure.txt to dt-schema
- meson-pwrc: Use dev_err_probe()
- meson_sm: populate platform devices from sm device tree data
- dt-bindings: Drop unneeded quotes

* tag 'amlogic-drivers-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  dt-bindings: soc: amlogic: Drop unneeded quotes
  firmware: meson_sm: populate platform devices from sm device tree data
  soc: amlogic: meson-pwrc: Use dev_err_probe()
  dt-bindings: soc: amlogic: convert clk-measure.txt to dt-schema

Link: https://lore.kernel.org/r/aebef87f-e0a3-17dd-12b7-7231ca6b0923@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'optee-per-cpu-irq-for-v6.4' of https://git.linaro.org/people/jens.wiklande...
Arnd Bergmann [Tue, 4 Apr 2023 14:09:31 +0000 (16:09 +0200)]
Merge tag 'optee-per-cpu-irq-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers

Add OP-TEE per cpu asynchronous notification

Adds support for signalling from secure world with per-cpu interrupts in
addition to edge-triggered peripheral interrupts.

* tag 'optee-per-cpu-irq-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  optee: add per cpu asynchronous notification
  dt-bindings: optee driver interrupt can be a per-cpu interrupt

Link: https://lore.kernel.org/r/20230404062727.GA2765560@rayden
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'memory-controller-drv-6.4' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 4 Apr 2023 14:08:43 +0000 (16:08 +0200)]
Merge tag 'memory-controller-drv-6.4' of https://git./linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers

Memory controller drivers for v6.4

1. STM32 FMC2: allow using driver on all STM32MP SoCs.
2. Cleanups:
   - Atmel EBI: use preferred of_property_present() API.
   - Tegra210 MC: drop redundant variable initialization.
   - Drop redundant quotes in Devicetree bindings.
   - Remove MODULE_LICENSE in non-modules (several drivers).

* tag 'memory-controller-drv-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  dt-bindings: memory-controller: Drop unneeded quotes
  memory: stm32-fmc2-ebi: depends on ARCH_STM32 instead of MACH_STM32MP157
  memory: tegra: remove redundant variable initialization
  memory: atmel-ebi: Use of_property_present() for testing DT property presence
  memory: remove MODULE_LICENSE in non-modules
  memory: tegra: remove MODULE_LICENSE in non-modules

Link: https://lore.kernel.org/r/20230403161427.328128-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'omap-for-v6.4/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 4 Apr 2023 14:07:26 +0000 (16:07 +0200)]
Merge tag 'omap-for-v6.4/ti-sysc-signed' of git://git./linux/kernel/git/tmlind/linux-omap into soc/drivers

Clean-up for ti-sysc driver for v6.4

Clean-up for ti-sysc interconnect target module driver mostly to remove
open coded ranges property parsing, to use of_property_present(), and
to use list_for_each_entry(). Also included is one comment typo change.

* tag 'omap-for-v6.4/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  bus: ti-sysc: Fix comment typo
  bus: ti-sysc: Use list_for_each_entry() helper
  bus: ti-sysc: Use of_property_present() for testing DT property presence
  bus: ti-sysc: Remove open coded "ranges" parsing

Link: https://lore.kernel.org/r/pull-1680180355-69164@atomide.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'renesas-drivers-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kerne...
Arnd Bergmann [Tue, 4 Apr 2023 13:44:38 +0000 (15:44 +0200)]
Merge tag 'renesas-drivers-for-v6.4-tag1' of git://git./linux/kernel/git/geert/renesas-devel into soc/drivers

Renesas driver updates for v6.4

  - Drop support for the obsolete R-Car H3 ES1.* (R8A77950) SoC,
  - Miscellaneous fixes and improvements.

* tag 'renesas-drivers-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: Use "#ifdef" for single-symbol definition checks
  soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table
  soc: renesas: mark OF related data as maybe unused
  soc: renesas: rmobile-sysc: Use of_fwnode_handle() helper
  soc: renesas: Remove r8a77950 arch
  soc: renesas: rcar-sysc: Remove R-Car H3 ES1.* handling

Link: https://lore.kernel.org/r/cover.1679907059.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agosoc: renesas: renesas-soc: Release 'chipid' from ioremap()
Li Yang [Fri, 31 Mar 2023 09:55:44 +0000 (17:55 +0800)]
soc: renesas: renesas-soc: Release 'chipid' from ioremap()

Smatch reports:

drivers/soc/renesas/renesas-soc.c:536 renesas_soc_init() warn:
'chipid' from ioremap() not released on lines: 475.

If soc_dev_atrr allocation is failed, function renesas_soc_init()
will return without releasing 'chipid' from ioremap().

Fix this by adding function iounmap().

Fixes: cb5508e47e60 ("soc: renesas: Add support for reading product revision for RZ/G2L family")
Signed-off-by: Li Yang <lidaxian@hust.edu.cn>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230331095545.31823-1-lidaxian@hust.edu.cn
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
16 months agosoc: bcm: brcmstb: biuctrl: fix of_iomap leak
Zhaoyang Li [Mon, 27 Mar 2023 11:54:22 +0000 (19:54 +0800)]
soc: bcm: brcmstb: biuctrl: fix of_iomap leak

Smatch reports:

drivers/soc/bcm/brcmstb/biuctrl.c:291 setup_hifcpubiuctrl_regs() warn:
'cpubiuctrl_base' from of_iomap() not released on lines: 291.

This is because in setup_hifcpubiuctrl_regs(),
cpubiuctrl_base is not released when handle error, which may cause a leak.
To fix this, iounmap is added when handle error.

Fixes: 22f7a9116eba ("soc: brcmstb: Correct CPU_CREDIT_REG offset for Brahma-B53 CPUs")
Signed-off-by: Zhaoyang Li <lizhaoyang04@hust.edu.cn>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230327115422.1536615-1-lizhaoyang04@hust.edu.cn
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
16 months agosoc: microchip: mpfs: add a prefix to rx_callback()
Conor Dooley [Fri, 31 Mar 2023 07:18:17 +0000 (08:18 +0100)]
soc: microchip: mpfs: add a prefix to rx_callback()

Add a prefix to the function name to match the rest of the file.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
16 months agoMerge patch series "mailbox,soc: mpfs: add support for fallible services"
Conor Dooley [Mon, 3 Apr 2023 18:21:09 +0000 (19:21 +0100)]
Merge patch series "mailbox,soc: mpfs: add support for fallible services"

Conor Dooley <conor@kernel.org> says:

Here are some fixes for the system controller on PolarFire SoC that I
ran into while implementing support for using the system controller to
re-program the FPGA. A few are just minor bits that I fixed in passing,
but the bulk of the patchset is changes to how the mailbox figures out
if a "service" has completed.

Prior to implementing this particular functionality, the services
requested from the system controller, via its mailbox interface, always
triggered an interrupt when the system controller was finished with
the service.

Unfortunately some of the services used to validate the FPGA images
before programming them do not trigger an interrupt if they fail.
For example, the service that checks whether an FPGA image is actually
a newer version than what is already programmed, does not trigger an
interrupt, unless the image is actually newer than the one currently
programmed. If it has an earlier version, no interrupt is triggered
and a status is set in the system controller's status register to
signify the reason for the failure.

In order to differentiate between the service succeeding & the system
controller being inoperative or otherwise unable to function, I had to
switch the controller to poll a busy bit in the system controller's
registers to see if it has completed a service.
This makes sense anyway, as the interrupt corresponds to "data ready"
rather than "tx done", so I have changed the mailbox controller driver
to do that & left the interrupt solely for signalling data ready.
It just so happened that all of the services that I had worked with and
tested up to this point were "infallible" & did not set a status, so the
particular code paths were never tested.

Link: https://lore.kernel.org/r/20230307202257.1762151-1-conor@kernel.org
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
16 months agosoc: microchip: mpfs: handle timeouts and failed services differently
Conor Dooley [Tue, 7 Mar 2023 20:22:58 +0000 (20:22 +0000)]
soc: microchip: mpfs: handle timeouts and failed services differently

The system controller will only deliver an interrupt if a service
succeeds. This leaves us in the unfortunate position with current code
where there is no way to differentiate between a legitimate timeout
where the service has not completed & where it has completed, but
failed.

mbox_send_message() has its own completion, and it will time out of the
system controller does not lower the busy flag. In this case, a timeout
has occurred and the error can be propagated back to the caller.

If the busy flag is lowered, but no interrupt has arrived to trigger the
rx callback, the service can be deemed to have failed. Report -EBADMSG
in this case so that callers can differentiate.

Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
16 months agosoc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction()
Conor Dooley [Tue, 7 Mar 2023 20:22:57 +0000 (20:22 +0000)]
soc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction()

The error handling has a kinda weird nested-if setup that is not really
adding anything. Switch it to more of an early return arrangement as a
predatory step for adding different handing for timeouts and failed
services.

Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
16 months agosoc: microchip: mpfs: use a consistent completion timeout
Conor Dooley [Tue, 7 Mar 2023 20:22:56 +0000 (20:22 +0000)]
soc: microchip: mpfs: use a consistent completion timeout

Completion timeouts use jiffies, so passing a number directly will
produce inconsistent timeouts depending on config. Define the timeout in
ms and convert it to jiffies instead.

Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
16 months agosoc: microchip: mpfs: fix some horrible alignment
Conor Dooley [Tue, 7 Mar 2023 20:22:55 +0000 (20:22 +0000)]
soc: microchip: mpfs: fix some horrible alignment

mpfs_sys_controller_delete() has some horrible alignment that upsets my
OCD... Move the RHS of the assignment to a new line for greater
satifaction.

Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
16 months agomailbox: mpfs: check the service status in .tx_done()
Conor Dooley [Tue, 7 Mar 2023 20:22:54 +0000 (20:22 +0000)]
mailbox: mpfs: check the service status in .tx_done()

Services are supposed to generate an interrupt once completed, whether
or not they have do so successfully. What appears to be a bug in the
system controller means that interrupts are only generated for
*successful* services.

Currently, the status of a service is only checked in the
mpfs_mbox_rx_data() once an interrupt is received. As it turns out, this
is not really helpful where the potentially buggy behaviour is present,
as we'll only see the status for successes where it is moot anyway.

Jassi suggested moving the check to the .tx_done() callback instead.
This makes sense, as the busy bit that tx_done() is polling will be
lowered on completion, regardless of whether the service passed or
failed.
That allows us to check the status bits for all services, whether they
generate an interrupt or not & pass something more informative than
-EBADMSG back to the drivers implementing individual services.

Suggested-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
16 months agomailbox: mpfs: ditch a useless busy check
Conor Dooley [Tue, 7 Mar 2023 20:22:53 +0000 (20:22 +0000)]
mailbox: mpfs: ditch a useless busy check

mpfs_mbox_rx_data() already checks if the system controller is busy
before attempting to do anything, so drop the second check before
reading any data.

No functional change intended.

Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
16 months agomailbox: mpfs: switch to txdone_poll
Conor Dooley [Tue, 7 Mar 2023 20:22:52 +0000 (20:22 +0000)]
mailbox: mpfs: switch to txdone_poll

The system controller on PolarFire SoC has no interrupt to signify that
the TX has been completed. The interrupt instead signals that a service
requested by the mailbox client has succeeded. If a service fails, there
will be no interrupt delivered.

Switch to polling the busy register to determine whether transmission
has completed.

Fixes: 83d7b1560810 ("mbox: add polarfire soc system controller mailbox")
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
16 months agomailbox: mpfs: fix an incorrect mask width
Conor Dooley [Tue, 7 Mar 2023 20:22:51 +0000 (20:22 +0000)]
mailbox: mpfs: fix an incorrect mask width

The system controller registers on PolarFire SoC are 32 bits wide, so
16 + 16 as the first input to GENMASK_ULL() gives a 33 bit wide mask.
It probably should have been immediately obvious when it was pointed
out during review that the width required using GENMASK_ULL() - but I
scarcely knew what I was doing at the time and missed it.
The mistake ends up being moot as it is a mask after all, but it is
incorrect and should be fixed.

No functional change intended.

Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
16 months agosoc/tegra: pmc: Support software wake-up for SPE
Petlozu Pravareshwar [Thu, 30 Mar 2023 17:06:21 +0000 (17:06 +0000)]
soc/tegra: pmc: Support software wake-up for SPE

The Sensor Processing Engine(SPE) can trigger a software wake-up of
the device. To support this wake-up for the SPE, set SR_CAPTURE_EN
bit in WAKE_AOWAKE_CNTRL register associated with the wake-up for
the SPE. This SR capturing logic is expected to be enabled for wakes
with short pulse signalling requirements.

Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
16 months agosoc/tegra: pmc: Add wake source interrupt for MGBE
Sushil Singh [Thu, 23 Mar 2023 13:13:24 +0000 (18:43 +0530)]
soc/tegra: pmc: Add wake source interrupt for MGBE

Add the GPIO wake interrupt for MGBE ethernet controller on Tegra234 SoC.

Signed-off-by: Sushil Singh <sushilkumars@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
16 months agosoc/tegra: pmc: Add the PMIC wake event for Tegra234
Jon Hunter [Mon, 6 Mar 2023 15:09:00 +0000 (15:09 +0000)]
soc/tegra: pmc: Add the PMIC wake event for Tegra234

Add the PMIC wake event for Tegra234 that is used to bring the device
out of system suspend for events such as an RTC alarm.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
16 months agosoc/tegra: bpmp: Actually free memory on error path
Mikko Perttunen [Wed, 1 Mar 2023 13:47:56 +0000 (15:47 +0200)]
soc/tegra: bpmp: Actually free memory on error path

Within the error path, genpd->domains has not been set, so we need
to pass the domains variable to kfree instead.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
16 months agofirmware: tegra: bpmp: Fix error paths in debugfs
Mikko Perttunen [Wed, 1 Mar 2023 13:47:55 +0000 (15:47 +0200)]
firmware: tegra: bpmp: Fix error paths in debugfs

Some error paths in mrq_debug_read and bpmp_debug_show would overwrite
the return error code with a subsequent call to mrq_debug_close.

Change the code to only change the error code if there was no prior
error.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
16 months agotee: optee: Add SMC for loading OP-TEE image
Jeffrey Kardatzke [Fri, 31 Mar 2023 18:35:47 +0000 (11:35 -0700)]
tee: optee: Add SMC for loading OP-TEE image

Adds an SMC call that will pass an OP-TEE binary image to EL3 and
instruct it to load it as the BL32 payload. This works in conjunction
with a feature added to Trusted Firmware for ARMv8 and above
architectures that supports this.

The main purpose of this change is to facilitate updating the OP-TEE
component on devices via a rootfs change rather than having to do a
firmware update. Further details are linked to in the Kconfig file.

Signed-off-by: Jeffrey Kardatzke <jkardatzke@chromium.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
16 months agosoc: mediatek: mutex: Use dev_err_probe()
Ye Xingchen [Fri, 24 Mar 2023 02:17:29 +0000 (10:17 +0800)]
soc: mediatek: mutex: Use dev_err_probe()

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/202303241017290414354@zte.com.cn
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
AngeloGioacchino Del Regno [Thu, 9 Mar 2023 10:26:18 +0000 (11:26 +0100)]
soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10

Add MMSYS support for the MT6795 SoC using the same mmsys routing
table as MT8173 as, for the currently supported usecases (DSI0, DPI0
with no WDMA), these are identical.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230309102618.114157-4-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-mmsys: Change MT8173 num_resets to 64
AngeloGioacchino Del Regno [Thu, 9 Mar 2023 10:26:17 +0000 (11:26 +0100)]
soc: mediatek: mtk-mmsys: Change MT8173 num_resets to 64

The MT8173 SoC has 64 MMSYS resets, split in two contiguous 32-bits
registers, MMSYS_SW0_RST_B (0x140) and MMSYS_SW1_RST_B (0x144), as
also stated in the downstream kernel for the Amazon Fire TV 2
(Sloane) in the ddp_reg.h header.

Please note that managing more than 32 reset bits is supported since commit
2004f8be8483 ("soc: mediatek: mmsys: add mmsys for support 64 reset bits")

This commit brings no functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230309102618.114157-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-mmsys: Split out MT8173 mmsys DDP routing table
AngeloGioacchino Del Regno [Thu, 9 Mar 2023 10:26:16 +0000 (11:26 +0100)]
soc: mediatek: mtk-mmsys: Split out MT8173 mmsys DDP routing table

MT2701, MT2712 and MT8173 were relying on a "default" DDP I/O routing
table, describing all of the possible connections between display block
components: while this is definitely working it's suboptimal for the
actual routing description, as we may be enabling outputs and inputs
that are not needed, possibly impacting on actual DDP performance other
than slightly prolonging boot times by having to parse a table that is
bigger than needed.

Seen that all of the other supported SoCs have got their own table and
seen that a comment in mtk-mmsys.h explicitly mentions that the wanted
way is to have one table per SoC, create a new routing table that is
specifically tailored to MT8173 and, while at it, remove mentions to
said SoC from the comment in mtk-mmsys.h.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230309102618.114157-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: Cleanup ifdefs for IS_REACHABLE(CONFIG_MTK_CMDQ)
AngeloGioacchino Del Regno [Wed, 22 Feb 2023 09:42:53 +0000 (10:42 +0100)]
soc: mediatek: Cleanup ifdefs for IS_REACHABLE(CONFIG_MTK_CMDQ)

Now that the mtk-cmdq.h header contains inline functions for cases
in which the driver is not enabled (either module or built-in), we
can safely go on with cleaning up ifdefs for CMDQ handling.

This also shows in a clearer manner that writing through CMDQ HW is
optional and used only for performance purposes when/where wanted,
needed and/or required.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230222094253.23678-10-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: cmdq: Add inline functions for !CONFIG_MTK_CMDQ
AngeloGioacchino Del Regno [Wed, 22 Feb 2023 09:42:52 +0000 (10:42 +0100)]
soc: mediatek: cmdq: Add inline functions for !CONFIG_MTK_CMDQ

In preparation for a cleanup of ifdef instances of IS_REACHABLE() for
the CONFIG_MTK_CMDQ configuration option, add inline functions that
will either return a failure or, for void functions, do nothing.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230222094253.23678-9-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-mutex: Use module_platform_driver() macro
AngeloGioacchino Del Regno [Wed, 22 Feb 2023 09:42:51 +0000 (10:42 +0100)]
soc: mediatek: mtk-mutex: Use module_platform_driver() macro

Replace open-coded init/exit calls with the module_platform_driver()
macro being equivalent.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230222094253.23678-8-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-mutex: Replace max handles number with definition
AngeloGioacchino Del Regno [Wed, 22 Feb 2023 09:42:50 +0000 (10:42 +0100)]
soc: mediatek: mtk-mutex: Replace max handles number with definition

Replace the magic number "10", defining the maximum number of supported
handles with a MTK_MUTEX_MAX_HANDLES definition.
While at it, also change the type for `id` from a signed integer to
a unsigned 8 bits integer to save some (small) memory footprint, as
this number is never higher than 10.

This cleanup brings no functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230222094253.23678-7-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-mutex: Compress of_device_id array entries
AngeloGioacchino Del Regno [Wed, 22 Feb 2023 09:42:49 +0000 (10:42 +0100)]
soc: mediatek: mtk-mutex: Compress of_device_id array entries

Compress entries of the of_match_mtk_mmsys array to reduce the amount
of lines and increase readability; this brings us to a maximum of 95
columns.

While at it, also add a sentinel comment to the last entry for the
sole purpose of consistency.

This commit brings no functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230222094253.23678-6-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-mmsys: Add MODULE_DEVICE_TABLE() to allow auto-load
AngeloGioacchino Del Regno [Wed, 22 Feb 2023 09:42:48 +0000 (10:42 +0100)]
soc: mediatek: mtk-mmsys: Add MODULE_DEVICE_TABLE() to allow auto-load

Allow module auto-loading by adding a MODULE_DEVICE_TABLE for
of_match_mmsys.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230222094253.23678-5-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-mmsys: Compress of_device_id array entries
AngeloGioacchino Del Regno [Wed, 22 Feb 2023 09:42:47 +0000 (10:42 +0100)]
soc: mediatek: mtk-mmsys: Compress of_device_id array entries

Compress entries of the of_match_mtk_mmsys array to reduce the amount
of lines and increase readability; this brings us to a maximum of 90
columns.

While at it, also add a sentinel comment to the last entry for the
sole purpose of consistency.

This commit brings no functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230222094253.23678-4-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-mmsys: Use module_platform_driver() macro
AngeloGioacchino Del Regno [Wed, 22 Feb 2023 09:42:46 +0000 (10:42 +0100)]
soc: mediatek: mtk-mmsys: Use module_platform_driver() macro

Instead of open-coding init/exit calls, switch to using the
module_platform_driver() macro instead, doing the exact same.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230222094253.23678-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-mmsys: Add .remove() callback
AngeloGioacchino Del Regno [Wed, 22 Feb 2023 09:42:45 +0000 (10:42 +0100)]
soc: mediatek: mtk-mmsys: Add .remove() callback

Add a .remove() callback to correctly unregister the multimedia clocks
and DRM drivers.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230222094253.23678-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agodt-bindings: memory-controller: Drop unneeded quotes
Rob Herring [Fri, 31 Mar 2023 18:21:18 +0000 (13:21 -0500)]
dt-bindings: memory-controller: Drop unneeded quotes

Cleanup bindings dropping unneeded quotes. Once all these are fixed,
checking for this can be enabled in yamllint.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230331182119.1899919-1-robh@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
16 months agodt-bindings: soc: mediatek: add display mutex for MT8365 SoC
Alexandre Mergnat [Thu, 9 Mar 2023 14:23:04 +0000 (15:23 +0100)]
dt-bindings: soc: mediatek: add display mutex for MT8365 SoC

Add compatible for the MT8365 SoC.

Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230220-display-v1-15-45cbc68e188b@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agodt-bindings: soc: mediatek: specify which compatible requires clocks property
Alexandre Mergnat [Thu, 9 Mar 2023 14:23:03 +0000 (15:23 +0100)]
dt-bindings: soc: mediatek: specify which compatible requires clocks property

According to the mtk-mutex.c driver and the SoC DTS, the clock isn't
required to work properly for some of MTK SoC. Improve the clock
requirement by adding a condition which is function to the compatible.

Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230220-display-v1-14-45cbc68e188b@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agoMAINTAINERS: renesas: Add "renesas," file contents pattern
Geert Uytterhoeven [Fri, 17 Mar 2023 07:59:00 +0000 (08:59 +0100)]
MAINTAINERS: renesas: Add "renesas," file contents pattern

Add a keyword match pattern for the word "renesas," in files to the
ARM/RISC-V/RENESAS ARCHITECTURE section.  This make sure patches
changing drivers that match against "renesas,<foo>" (as used mostly for
Renesas on-SoC components) are CCed to the linux-renesas-soc mailing
list.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/c1be1e97c5457eade25b0eb5118196677cecfc08.1679039809.git.geert+renesas@glider.be
16 months agosoc: mediatek: mtk-svs: add thermal voltage compensation if needed
Roger Lu [Thu, 2 Feb 2023 12:41:04 +0000 (20:41 +0800)]
soc: mediatek: mtk-svs: add thermal voltage compensation if needed

Some extreme test environment may keep IC temperature very low or very high
during system boot stage. For stability concern, we add thermal voltage
compenstation if needed no matter svs bank phase is in init02 or mon mode.

Signed-off-by: Roger Lu <roger.lu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230202124104.16504-4-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agosoc: mediatek: mtk-svs: fix passing zero to 'PTR_ERR'
Roger Lu [Thu, 16 Feb 2023 13:25:43 +0000 (21:25 +0800)]
soc: mediatek: mtk-svs: fix passing zero to 'PTR_ERR'

nvmem_cell_get() cannot return NULL so checking for NULL is wrong here.

Signed-off-by: Roger Lu <roger.lu@mediatek.com>
Fixes: 6c7174fd90a4690 ("soc: mediatek: mtk-svs: use svs get efuse common function")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/202302160720.N64SWT4l-lkp@intel.com/
Link: https://lore.kernel.org/r/20230216132543.814-1-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
16 months agooptee: add per cpu asynchronous notification
Etienne Carriere [Wed, 22 Mar 2023 13:22:12 +0000 (14:22 +0100)]
optee: add per cpu asynchronous notification

Implements use of per-cpu irq for optee asynchronous notification.

Existing optee async notif implementation allows OP-TEE world to
raise an interrupt on which Linux optee driver will query some pending
events. This change allows the signaling interrupt to be a per-cpu
interrupt as with Arm GIC PPIs. Using a PPI instead of an SPI is useful
when no GIC lines are provisioned in the chip design and there are spare
PPI lines.

Cc: Jens Wiklander <jens.wiklander@linaro.org>
Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Marc Zyngier <maz@kernel.org>
Co-developed-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
[JW: fixing a spell error in @notif_pcpu_wq description]
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
16 months agodt-bindings: optee driver interrupt can be a per-cpu interrupt
Etienne Carriere [Wed, 22 Mar 2023 13:22:11 +0000 (14:22 +0100)]
dt-bindings: optee driver interrupt can be a per-cpu interrupt

Explicit in optee firmware device tree bindings that the interrupt
used by optee driver for async notification can be a peripheral
interrupt or a per-cpu interrupt.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
16 months agosoc: ti: Use devm_platform_ioremap_resource()
Yang Li [Thu, 23 Mar 2023 08:09:52 +0000 (16:09 +0800)]
soc: ti: Use devm_platform_ioremap_resource()

According to commit 7945f929f1a7 ("drivers: provide
devm_platform_ioremap_resource()"), convert platform_get_resource(),
devm_ioremap_resource() to a single call to use
devm_platform_ioremap_resource(), as this is exactly what this function
does.

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230323080952.124410-1-yang.lee@linux.alibaba.com
Signed-off-by: Nishanth Menon <nm@ti.com>
16 months agosoc: apple: rtkit: Crop syslog messages
Martin Povišer [Fri, 24 Feb 2023 16:21:59 +0000 (17:21 +0100)]
soc: apple: rtkit: Crop syslog messages

Crop trailing whitespace, null, and newline characters in syslog
messages received from coprocessors. Notably DCP sends its messages
including a trailing newline, so prior to this change we would end up
cluttering the kernel log by repeated newlines at the end of messages.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Reviewed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
16 months agosoc: apple: rtkit: Fix buffer address field width
Asahi Lina [Fri, 24 Feb 2023 06:49:44 +0000 (15:49 +0900)]
soc: apple: rtkit: Fix buffer address field width

The buffer address field is missing two bits. This matters for the GPU,
which uses upper-half 64-bit addresses on the ASC and those get sign
extended from the mailbox message field, so the right number of high
bits need to be set.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Hector Martin <marcan@marcan.st>
16 months agodt-bindings: soc: amlogic: Drop unneeded quotes
Rob Herring [Mon, 27 Mar 2023 17:02:22 +0000 (12:02 -0500)]
dt-bindings: soc: amlogic: Drop unneeded quotes

Cleanup bindings dropping unneeded quotes. Once all these are fixed,
checking for this can be enabled in yamllint.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230327170222.4107746-1-robh@kernel.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
16 months agomemory: stm32-fmc2-ebi: depends on ARCH_STM32 instead of MACH_STM32MP157
Christophe Kerello [Fri, 24 Mar 2023 15:51:04 +0000 (16:51 +0100)]
memory: stm32-fmc2-ebi: depends on ARCH_STM32 instead of MACH_STM32MP157

To be able to compile the driver on all STM32MP SOCs, we move the
"depends on" on ARCH_STM32.

Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Link: https://lore.kernel.org/r/20230324155105.826063-2-christophe.kerello@foss.st.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
16 months agofirmware: meson_sm: populate platform devices from sm device tree data
Dmitry Rokosov [Fri, 24 Mar 2023 14:55:57 +0000 (17:55 +0300)]
firmware: meson_sm: populate platform devices from sm device tree data

In some meson boards, secure monitor device has children, for example,
power secure controller. By default, secure monitor isn't the bus in terms
of device tree subsystem, so the of_platform initialization code doesn't
populate its device tree data. As a result, secure monitor's children
aren't probed at all.

Run the 'of_platform_populate()' routine manually to resolve such issues.

Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230324145557.27797-1-ddrokosov@sberdevices.ru
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
16 months agofirmware: arm_scmi: Fix xfers allocation on Rx channel
Cristian Marussi [Sun, 26 Mar 2023 20:34:49 +0000 (21:34 +0100)]
firmware: arm_scmi: Fix xfers allocation on Rx channel

Two distinct pools of xfer descriptors are allocated at initialization
time: one (Tx) used to provide xfers to track commands and their replies
(or delayed replies) and another (Rx) to pick xfers from to be used for
processing notifications.

Such pools, though, are allocated globally to be used by the whole SCMI
instance, they are not allocated per-channel and as such the allocation of
notifications xfers cannot be simply skipped if no Rx channel was found for
the base protocol common channel, because there could be defined more
optional per-protocol dedicated channels that instead support Rx channels.

Change the conditional check to skip allocation for the notification pool
only if no Rx channel has been detected on any per-channel protocol at all.

Fixes: 4ebd8f6dea81 ("firmware: arm_scmi: Add receive buffer support for notifications")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230326203449.3492948-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
16 months agobus: ti-sysc: Fix comment typo
Jason Wang [Thu, 11 Aug 2022 12:11:19 +0000 (20:11 +0800)]
bus: ti-sysc: Fix comment typo

The double `the' is duplicated in the comment, remove one.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Message-Id: <20220811121119.20288-1-wangborong@cdjrlc.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 months agobus: ti-sysc: Use list_for_each_entry() helper
Yang Yingliang [Sat, 27 Aug 2022 09:46:04 +0000 (17:46 +0800)]
bus: ti-sysc: Use list_for_each_entry() helper

Convert list_for_each() to list_for_each_entry() where applicable.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Message-Id: <20220827094604.3325887-1-yangyingliang@huawei.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 months agosoc: amlogic: meson-pwrc: Use dev_err_probe()
Ye Xingchen [Fri, 24 Mar 2023 02:16:26 +0000 (10:16 +0800)]
soc: amlogic: meson-pwrc: Use dev_err_probe()

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/202303241016261854322@zte.com.cn
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
16 months agobus: ti-sysc: Use of_property_present() for testing DT property presence
Rob Herring [Fri, 10 Mar 2023 14:47:34 +0000 (08:47 -0600)]
bus: ti-sysc: Use of_property_present() for testing DT property presence

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring <robh@kernel.org>
Message-Id: <20230310144734.1546656-1-robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 months agobus: ti-sysc: Remove open coded "ranges" parsing
Rob Herring [Wed, 1 Feb 2023 22:00:02 +0000 (16:00 -0600)]
bus: ti-sysc: Remove open coded "ranges" parsing

"ranges" is a standard property and we have common helper functions for
parsing it, so let's use them.

Signed-off-by: Rob Herring <robh@kernel.org>
Message-Id: <20230201220002.246907-1-robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 months agosoc: imx: imx8m-blk-ctrl: reordering the fields
Peng Fan [Mon, 13 Mar 2023 00:49:03 +0000 (08:49 +0800)]
soc: imx: imx8m-blk-ctrl: reordering the fields

The clang-analyzer reports:
"Excessive padding in 'struct imx8m_blk_ctrl_domain_data'
(12 padding bytes, where 4 is optimal). Optimal fields order: name,
clk_names, path_names, gpc_name, num_clks, num_paths, rst_mask, clk_mask,
mipi_phy_rst_mask, consider reordering the fields or adding explicit
padding members [clang-analyzer-optin.performance.Padding]
   struct imx8m_blk_ctrl_domain_data {"

So reordering the fields.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>