platform/kernel/linux-rpi.git
23 months agoMerge tag 'v6.0-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias...
Arnd Bergmann [Fri, 23 Sep 2022 15:37:15 +0000 (17:37 +0200)]
Merge tag 'v6.0-next-soc' of https://git./linux/kernel/git/matthias.bgg/linux into arm/drivers

pmic-wrapper:
- add support for mt8188

SVS:
- several driver cleanups

power-domain:
- several cleanups of the dt-bindings and driver

mutex:
- add support to mt6795 disp mutex
- add support for mt8186 mdp3 mutex

* tag 'v6.0-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  soc: mediatek: Add mmsys func to adapt to dpi output for MT8186
  soc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex
  dt-bindings: soc: mediatek: Add display mutex support for MT6795
  soc: mediatek: mutex: Add mt8186 mutex mod settings for mdp3
  dt-bindings: soc: mediatek: Add mdp3 mutex support for mt8186
  soc: mediatek: pm-domains: Simplify some error message
  soc: mediatek: mtk-svs: Explicitly include bitfield header
  soc: mediatek: mtk-svs: Use bitfield access macros where possible
  soc: mediatek: mtk-svs: Commonize t-calibration-data fuse array read
  dt-bindings: power: mediatek: Update maintainer list
  dt-bindings: power: mediatek: Support naming power controller node with unit address
  dt-bindings: power: mediatek: Refine multiple level power domain nodes
  soc: mediatek: mtk-svs: Use devm variant for dev_pm_opp_of_add_table()
  soc: mediatek: mtk-svs: Drop of_match_ptr() for of_match_table
  soc: mediatek: mtk-svs: Remove hardcoded irqflags
  soc: mediatek: mtk-svs: Switch to platform_get_irq()
  dt-bindings: soc: mediatek: pwrap: add compatible for mt8188
  soc: mediatek: Let PMIC Wrapper and SCPSYS depend on OF

Link: https://lore.kernel.org/r/498fe3e5-a237-121a-d500-fbb0994906cb@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
23 months agoMerge tag 'sunxi-drivers-for-6.1-1' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Fri, 23 Sep 2022 15:36:09 +0000 (17:36 +0200)]
Merge tag 'sunxi-drivers-for-6.1-1' of https://git./linux/kernel/git/sunxi/linux into arm/drivers

sunxi SRAM driver changes:
- minor code refactor
- support for Allwinner D1

* tag 'sunxi-drivers-for-6.1-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  soc: sunxi: sram: Add support for the D1 system control
  soc: sunxi: sram: Export the LDO control register
  soc: sunxi: sram: Save a pointer to the OF match data
  soc: sunxi: sram: Return void from the release function
  soc: sunxi: sram: Fix debugfs info for A64 SRAM C
  soc: sunxi: sram: Fix probe function ordering issues
  soc: sunxi: sram: Prevent the driver from being unbound
  soc: sunxi: sram: Actually claim SRAM regions

Link: https://lore.kernel.org/r/YyeOthH4y8wy8A8R@kista.localdomain
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
23 months agoMerge tag 'imx-drivers-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Arnd Bergmann [Fri, 23 Sep 2022 15:34:19 +0000 (17:34 +0200)]
Merge tag 'imx-drivers-6.1' of git://git./linux/kernel/git/shawnguo/linux into arm/drivers

i.MX drivers change for 6.1:

- Update i.MX8MP blk-ctrl driver to handle PCIe PHY reset bit.
- Add interconnect support into i.MX8MP blk-ctrl driver, so that i.MX8MP
  NoC can be set up properly after related power domain is up.
- Add blk-ctrl support for i.MX8MP HDMI HDCP/HRV and VPU block.
- Add i.MX93 SRC power domain and MEDIA blk-ctrl driver.
- Update imx8m-blk-ctrl driver to use genpd_xlate_onecell.

* tag 'imx-drivers-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (26 commits)
  soc: imx: add i.MX93 media blk ctrl driver
  soc: imx: add i.MX93 SRC power domain driver
  soc: imx: imx8m-blk-ctrl: Use genpd_xlate_onecell
  soc: imx: imx8mp-blk-ctrl: handle PCIe PHY resets
  soc: imx: imx8m-blk-ctrl: add i.MX8MP VPU blk ctrl
  soc: imx: add i.MX8MP HDMI blk ctrl HDCP/HRV_MWR
  soc: imx: add icc paths for i.MX8MP hsio/hdmi blk ctrl
  soc: imx: add icc paths for i.MX8MP media blk ctrl
  dt-bindings: arm: imx: update fsl.yaml for imx8dxl
  dt-bindings: firmware: add missing resource IDs for imx8dxl
  dt-bindings: arm: Add i.MX8M Mini Gateworks GW7904 board
  dt-bindings: soc: add i.MX93 mediamix blk ctrl
  dt-bindings: soc: add i.MX93 SRC
  dt-bindings: mfd: syscon: Add i.MX93 blk ctrl system registers
  dt-bindings: arm: fsl: Add MSC SM2S-IMX8PLUS SoM and SM2-MB-EP1 Carrier
  dt-bindings: arm: fsl: Add Kontron BL i.MX8MM OSM-S board
  dt-bindings: arm: fsl: Rename compatibles for Kontron i.MX8MM SoM/board
  dt-bindings: soc: imx: add i.MX8MP vpu blk ctrl
  dt-bindings: soc: imx: add interconnect property for i.MX8MM vpu blk ctrl
  dt-bindings: soc: imx: drop minItems for i.MX8MM vpu blk ctrl
  ...

Link: https://lore.kernel.org/r/20220918092806.2152700-2-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
23 months agoMerge tag 'tegra-for-6.1-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Fri, 23 Sep 2022 15:33:38 +0000 (17:33 +0200)]
Merge tag 'tegra-for-6.1-firmware' of git://git./linux/kernel/git/tegra/linux into arm/drivers

firmware: tegra: Changes for v6.1-rc1

A simple cleanup for user memory usage in the BPMP debugfs support.

* tag 'tegra-for-6.1-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: tegra: Switch over to memdup_user()

Link: https://lore.kernel.org/r/20220916101957.1635854-3-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
23 months agoMerge tag 'tegra-for-6.1-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra...
Arnd Bergmann [Fri, 23 Sep 2022 15:32:34 +0000 (17:32 +0200)]
Merge tag 'tegra-for-6.1-soc' of git://git./linux/kernel/git/tegra/linux into arm/drivers

soc/tegra: Changes for v6.1-rc1

This contains an assortment of small fixes and cleanups. One new feature
is introduced in the form of simple wake events which are needed to wake
the system from sleep on USB port events.

* tag 'tegra-for-6.1-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Check device node status property
  soc/tegra: pmc: Use devm_clk_get_optional()
  soc/tegra: fuse: Drop Kconfig dependency on TEGRA20_APB_DMA
  soc/tegra: pmc: Add USB port wake events for Tegra194
  soc/tegra: pmc: Add support for simple wake events
  soc/tegra: pmc: Remove leading space
  soc/tegra: fuse: Add missing of_node_put()
  soc/tegra: fuse: Add missing of_node_put() in tegra_init_fuse()

Link: https://lore.kernel.org/r/20220916101957.1635854-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
23 months agosoc: sunxi: sram: Add support for the D1 system control
Samuel Holland [Mon, 15 Aug 2022 04:12:47 +0000 (23:12 -0500)]
soc: sunxi: sram: Add support for the D1 system control

D1 has a single EMAC and some LDOs that need to be exported.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20220815041248.53268-11-samuel@sholland.org
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
23 months agosoc: sunxi: sram: Export the LDO control register
Samuel Holland [Mon, 15 Aug 2022 04:12:46 +0000 (23:12 -0500)]
soc: sunxi: sram: Export the LDO control register

Some newer Allwinner SoCs contain internal LDOs managed by a register in
the system control MMIO space. Export this from the regmap in addtion to
the EMAC register.

Use generic names now that the regmap is no longer EMAC-specific.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20220815041248.53268-10-samuel@sholland.org
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
23 months agosoc: sunxi: sram: Save a pointer to the OF match data
Samuel Holland [Mon, 15 Aug 2022 04:12:45 +0000 (23:12 -0500)]
soc: sunxi: sram: Save a pointer to the OF match data

It is inefficient to match the compatible string every time the regmap
is accessed.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20220815041248.53268-9-samuel@sholland.org
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
23 months agosoc: sunxi: sram: Return void from the release function
Samuel Holland [Mon, 15 Aug 2022 04:12:44 +0000 (23:12 -0500)]
soc: sunxi: sram: Return void from the release function

There is no point in returning an error here, as the caller can do
nothing about it. In fact, all callers already ignore the return value.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20220815041248.53268-8-samuel@sholland.org
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2 years agosoc: apple: rtkit: Add apple_rtkit_poll
Hector Martin [Wed, 14 Sep 2022 08:34:31 +0000 (09:34 +0100)]
soc: apple: rtkit: Add apple_rtkit_poll

This allows a client to receive messages in atomic context, by polling.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Reviewed-by: Eric Curtin <ecurtin@redhat.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agosoc: imx: add i.MX93 media blk ctrl driver
Peng Fan [Tue, 6 Sep 2022 03:28:15 +0000 (11:28 +0800)]
soc: imx: add i.MX93 media blk ctrl driver

Add i.MX93 mediamix blk ctrl support.

i.MX93 mediamix blk ctrl has registers to set QoS(priority) value.
It support default QoS value and cfg QoS value. Set an initial
value from i.MX design team. If LCDIF/ISI/PXP wanna a different QoS
value in future, they could use interconnect to request bandwidth.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agosoc: imx: add i.MX93 SRC power domain driver
Peng Fan [Tue, 6 Sep 2022 03:28:14 +0000 (11:28 +0800)]
soc: imx: add i.MX93 SRC power domain driver

Support controlling power domain managed by System Reset
Controller(SRC). Current supported power domain is mediamix power
domain.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agosoc: imx: imx8m-blk-ctrl: Use genpd_xlate_onecell
Peng Fan [Tue, 6 Sep 2022 03:39:43 +0000 (11:39 +0800)]
soc: imx: imx8m-blk-ctrl: Use genpd_xlate_onecell

Simplify driver by using genpd_xlate_onecell instead of
driver specific xlate function.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agosoc: imx: imx8mp-blk-ctrl: handle PCIe PHY resets
Lucas Stach [Fri, 2 Sep 2022 08:58:04 +0000 (16:58 +0800)]
soc: imx: imx8mp-blk-ctrl: handle PCIe PHY resets

Dessert the PHY reset when powering up the domain and put it back
into reset when the domain is powered down.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agosoc: imx: imx8m-blk-ctrl: add i.MX8MP VPU blk ctrl
Peng Fan [Mon, 22 Aug 2022 06:45:34 +0000 (14:45 +0800)]
soc: imx: imx8m-blk-ctrl: add i.MX8MP VPU blk ctrl

i.MX8MP has a VPU blk ctrl module that could supply clk and reset to
VPU, so add support for it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agosoc: imx: add i.MX8MP HDMI blk ctrl HDCP/HRV_MWR
Peng Fan [Mon, 22 Aug 2022 06:45:33 +0000 (14:45 +0800)]
soc: imx: add i.MX8MP HDMI blk ctrl HDCP/HRV_MWR

i.MX8MP HDMI supports HDCP and HRV_MWR(HDMI RX Video Memory Write Master
for RXRX validation), so add them.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agosoc: imx: add icc paths for i.MX8MP hsio/hdmi blk ctrl
Peng Fan [Fri, 8 Jul 2022 08:56:30 +0000 (16:56 +0800)]
soc: imx: add icc paths for i.MX8MP hsio/hdmi blk ctrl

Add interconnect paths for i.MX8MP hsio/hdmi blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agosoc: imx: add icc paths for i.MX8MP media blk ctrl
Peng Fan [Fri, 8 Jul 2022 08:56:29 +0000 (16:56 +0800)]
soc: imx: add icc paths for i.MX8MP media blk ctrl

Add interconnect paths for i.MX8MP media blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: arm: imx: update fsl.yaml for imx8dxl
Shenwei Wang [Wed, 14 Sep 2022 13:58:45 +0000 (08:58 -0500)]
dt-bindings: arm: imx: update fsl.yaml for imx8dxl

i.MX8DXL is a device targeting the automotive and industrial market
segments. The chip is designed to achieve both high performance and
low power consumption. It has a dual (2x) Cortex-A35 processor.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: firmware: add missing resource IDs for imx8dxl
Shenwei Wang [Wed, 14 Sep 2022 13:58:44 +0000 (08:58 -0500)]
dt-bindings: firmware: add missing resource IDs for imx8dxl

Add the missing resource IDs for imx8dxl.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: arm: Add i.MX8M Mini Gateworks GW7904 board
Tim Harvey [Mon, 12 Sep 2022 18:18:18 +0000 (11:18 -0700)]
dt-bindings: arm: Add i.MX8M Mini Gateworks GW7904 board

Add DT compatible string for i.MX8M Mini based Gateworks GW7904 board.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: soc: add i.MX93 mediamix blk ctrl
Peng Fan [Tue, 6 Sep 2022 03:28:13 +0000 (11:28 +0800)]
dt-bindings: soc: add i.MX93 mediamix blk ctrl

Add DT bindings for i.MX93 MEDIAMIX BLK CTRL.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: soc: add i.MX93 SRC
Peng Fan [Tue, 6 Sep 2022 03:28:12 +0000 (11:28 +0800)]
dt-bindings: soc: add i.MX93 SRC

Add bindings for i.MX93 System Reset Controller(SRC). SRC supports
resets and power gating for mixes.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: mfd: syscon: Add i.MX93 blk ctrl system registers
Peng Fan [Mon, 5 Sep 2022 05:59:08 +0000 (13:59 +0800)]
dt-bindings: mfd: syscon: Add i.MX93 blk ctrl system registers

Document i.MX93 BLK CTRL system registers.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: arm: fsl: Add MSC SM2S-IMX8PLUS SoM and SM2-MB-EP1 Carrier
Martyn Welch [Tue, 23 Aug 2022 14:01:21 +0000 (15:01 +0100)]
dt-bindings: arm: fsl: Add MSC SM2S-IMX8PLUS SoM and SM2-MB-EP1 Carrier

Add DT compatible strings for a combination of the 14N0600E variant of
the Avnet (MSC branded) SM2S-IMX8PLUS SoM on it's own and in combination
with the SM2-MB-EP1 carrier board.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: arm: fsl: Add Kontron BL i.MX8MM OSM-S board
Frieder Schrempf [Mon, 22 Aug 2022 08:03:48 +0000 (10:03 +0200)]
dt-bindings: arm: fsl: Add Kontron BL i.MX8MM OSM-S board

Add bindings for the Kontron BL i.MX8MM OSM-S board.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: arm: fsl: Rename compatibles for Kontron i.MX8MM SoM/board
Frieder Schrempf [Mon, 22 Aug 2022 08:03:47 +0000 (10:03 +0200)]
dt-bindings: arm: fsl: Rename compatibles for Kontron i.MX8MM SoM/board

This updates the bindings in order to use names for the boards that
follow the latest convention used by Kontron marketing.

By updating we make sure, that we can maintain this more easily in
future and make sure that the proper devicetree can be selected for
the hardware.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: soc: imx: add i.MX8MP vpu blk ctrl
Peng Fan [Mon, 22 Aug 2022 06:45:32 +0000 (14:45 +0800)]
dt-bindings: soc: imx: add i.MX8MP vpu blk ctrl

i.MX8MP VPU blk ctrl module has similar design as i.MX8MM, so reuse
the i.MX8MM VPU blk ctrl yaml file. And add description for the items.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: soc: imx: add interconnect property for i.MX8MM vpu blk ctrl
Peng Fan [Mon, 22 Aug 2022 06:45:31 +0000 (14:45 +0800)]
dt-bindings: soc: imx: add interconnect property for i.MX8MM vpu blk ctrl

i.MX8MM VPU support NoC QoS setting, so add interconnect property
for i.MX8MM VPU blk ctrl

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: soc: imx: drop minItems for i.MX8MM vpu blk ctrl
Peng Fan [Mon, 22 Aug 2022 06:45:30 +0000 (14:45 +0800)]
dt-bindings: soc: imx: drop minItems for i.MX8MM vpu blk ctrl

minItems and maxItems are set as the same value. In such case minItems is
not necessary. So drop it.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: power: imx8mp-power: add HDMI HDCP/HRV
Peng Fan [Mon, 22 Aug 2022 06:45:29 +0000 (14:45 +0800)]
dt-bindings: power: imx8mp-power: add HDMI HDCP/HRV

Add i.MX8MP HDMI HDCP and HRV entries.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: arm: fsl: imx6ul-kontron: Update bindings
Frieder Schrempf [Mon, 15 Aug 2022 08:28:10 +0000 (10:28 +0200)]
dt-bindings: arm: fsl: imx6ul-kontron: Update bindings

This updates the bindings in order to simplify the devicetree
structure and to add names for the boards that follow the latest
convention used by Kontron marketing.

It also gets rid of the N6xxx notation in the compatibles and
file names, as they are not really used anymore and often result
in confusion.

This is a breaking change, but the impact shouldn't be too big
and it makes usage and maintenance easier in the future.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agodt-bindings: clk: imx8mm: don't use multiple blank lines
Marcel Ziswiler [Fri, 22 Jul 2022 21:54:45 +0000 (23:54 +0200)]
dt-bindings: clk: imx8mm: don't use multiple blank lines

Avoid the following checkpatch warning:

include/dt-bindings/clock/imx8mm-clock.h:284: check: Please don't use
 multiple blank lines

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2 years agosoc: mediatek: Add mmsys func to adapt to dpi output for MT8186
Xinlei Lee [Wed, 14 Sep 2022 13:21:00 +0000 (21:21 +0800)]
soc: mediatek: Add mmsys func to adapt to dpi output for MT8186

Add mmsys func to manipulate dpi output format config for MT8186.

Co-developed-by: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
Reviewed-by: Nís F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/all/1663161662-1598-2-git-send-email-xinlei.lee@mediatek.com/
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2 years agoMerge tag 'ffa-updates-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Arnd Bergmann [Thu, 15 Sep 2022 20:07:06 +0000 (22:07 +0200)]
Merge tag 'ffa-updates-6.1' of git://git./linux/kernel/git/sudeep.holla/linux into arm/drivers

Arm FF-A firmware driver updates for v6.1

Small set of changes in preparation to add support for FF-A v1.1
specification later. It mainly contains:

1. Splitting up ffa_ops into different categories namely information,
   message and memory. It helps to make info and memory operations
   independent from ffa_device so thata generic memory management
   module can use it without specific ffa_dev.
2. Adds support for querying FF-A features and use the same to detect
   the support for 64-bit operations.
3. Adds v1.1 get_partition_info support and use the same to set up
   32-bit execution mode flag automatically.
4. Adds pointer to the ffa_dev_ops in struct ffa_dev and drop
   ffa_dev_ops_get() which enables to drop ffa_ops in optee_ffa
   structure using ffa_dev->ops directly. Additionally ffa_dev_ops is
   renamed as ffa_ops.

* tag 'ffa-updates-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_ffa: Split up ffa_ops into info, message and memory operations
  firmware: arm_ffa: Set up 32bit execution mode flag using partiion property
  firmware: arm_ffa: Add v1.1 get_partition_info support
  firmware: arm_ffa: Rename ffa_dev_ops as ffa_ops
  firmware: arm_ffa: Make memory apis ffa_device independent
  firmware: arm_ffa: Use FFA_FEATURES to detect if native versions are supported
  firmware: arm_ffa: Add support for querying FF-A features
  firmware: arm_ffa: Remove ffa_dev_ops_get()
  tee: optee: Drop ffa_ops in optee_ffa structure using ffa_dev->ops directly
  firmware: arm_ffa: Add pointer to the ffa_dev_ops in struct ffa_dev

Link: https://lore.kernel.org/r/20220913100612.2924643-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'arm-soc/for-6.1/drivers' of https://github.com/Broadcom/stblinux into...
Arnd Bergmann [Thu, 15 Sep 2022 20:04:41 +0000 (22:04 +0200)]
Merge tag 'arm-soc/for-6.1/drivers' of https://github.com/Broadcom/stblinux into arm/drivers

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

- Guilherme adds a comment to the panic notifier, part of his big panic
notifier rework series

- William migrates all of ARCH_BCM4908 dependencies to ARCH_BCMBCA

* tag 'arm-soc/for-6.1/drivers' of https://github.com/Broadcom/stblinux:
  arm64: bcmbca: Make BCM4908 drivers depend on ARCH_BCMBCA
  soc: bcm: brcmstb: Document panic notifier action and remove useless header

Link: https://lore.kernel.org/r/20220915023044.2350782-4-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agosoc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex
AngeloGioacchino Del Regno [Tue, 13 Sep 2022 14:01:21 +0000 (16:01 +0200)]
soc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex

MT6795 has the same mutex mod/sof register layout as MT2712 and MT8173,
but supports only four SOF, as it has two DSI and one DPI.
Support is added by reusing most of the MT8173 data, with the addition
of a mt6795-specific SOF array (and devicetree compatible, of course).

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220913140121.403637-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2 years agodt-bindings: soc: mediatek: Add display mutex support for MT6795
AngeloGioacchino Del Regno [Tue, 13 Sep 2022 14:01:20 +0000 (16:01 +0200)]
dt-bindings: soc: mediatek: Add display mutex support for MT6795

Add compatible for MT6795 Helio X10 SoC.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220913140121.403637-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2 years agosoc/tegra: pmc: Check device node status property
Petlozu Pravareshwar [Tue, 6 Sep 2022 13:51:17 +0000 (13:51 +0000)]
soc/tegra: pmc: Check device node status property

In early_initcall, check if PMC device is available for use
and avoid accessing PMC resources if the device node status
property is set to disabled.

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2 years agosoc/tegra: pmc: Use devm_clk_get_optional()
Christophe JAILLET [Sun, 7 Aug 2022 20:55:59 +0000 (22:55 +0200)]
soc/tegra: pmc: Use devm_clk_get_optional()

Use devm_clk_get_optional() instead of hand writing it.

While at it, use dev_err_probe() to further simplify the code. This is also
less verbose if clk_get() returns -EPROBE_DEFER.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2 years agosoc/tegra: fuse: Drop Kconfig dependency on TEGRA20_APB_DMA
Dmitry Osipenko [Wed, 23 Sep 2020 00:34:21 +0000 (03:34 +0300)]
soc/tegra: fuse: Drop Kconfig dependency on TEGRA20_APB_DMA

The DMA subsystem could be entirely disabled in Kconfig and then the
TEGRA20_APB_DMA option isn't available too. Hence kernel configuration
fails if DMADEVICES Kconfig option is disabled due to the unsatisfiable
dependency.

The FUSE driver isn't a critical driver and currently it only provides
NVMEM interface to userspace which isn't known to be widely used, and
thus, it's fine if FUSE driver fails to load.

Let's remove the erroneous Kconfig dependency and let the FUSE driver to
fail the probing if DMA is unavailable.

Fixes: 19d41e5e9c68 ("soc/tegra: fuse: Add APB DMA dependency for Tegra20")
Reported-by: Necip Fazil Yildiran <fazilyildiran@gmail.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=209301
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
2 years agofirmware: tegra: Switch over to memdup_user()
Qing Wang [Mon, 18 Oct 2021 11:31:52 +0000 (04:31 -0700)]
firmware: tegra: Switch over to memdup_user()

This patch fixes the following Coccinelle warning:

drivers/firmware/tegra/bpmp-debugfs.c:379: WARNING opportunity for memdup_user

Use memdup_user() rather than duplicating its implementation. This is a
little bit restricted to reduce false positives.

Signed-off-by: Qing Wang <wangqing@vivo.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2 years agosoc/tegra: pmc: Add USB port wake events for Tegra194
Thierry Reding [Mon, 11 Jul 2022 15:40:31 +0000 (17:40 +0200)]
soc/tegra: pmc: Add USB port wake events for Tegra194

Tegra194 supports waking up from suspend when activity is detected on
any of the USB ports. Add these wake events so that the system can be
woken on such activity.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2 years agosoc/tegra: pmc: Add support for simple wake events
Thierry Reding [Mon, 11 Jul 2022 15:40:30 +0000 (17:40 +0200)]
soc/tegra: pmc: Add support for simple wake events

Simple wake events are neither mapped to GIC interrupts nor have an
associated GPIO line. They are close to GPIO-backed wake events in that
the IRQ hierarchy processing needs to stop at the PMC level, but since
there is no dedicated GPIO line for them, let's turn them into a
separate type.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2 years agosoc/tegra: pmc: Remove leading space
Thierry Reding [Mon, 11 Jul 2022 15:40:29 +0000 (17:40 +0200)]
soc/tegra: pmc: Remove leading space

Remove a leading space from a line that is otherwise indented by tabs.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2 years agosoc/tegra: fuse: Add missing of_node_put()
Liang He [Wed, 15 Jun 2022 12:32:32 +0000 (20:32 +0800)]
soc/tegra: fuse: Add missing of_node_put()

In tegra_init_apbmisc(), of_find_matching_node() will return a node
pointer with refcount incremented. We should use of_node_put() in each
failure path or when it is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2 years agosoc/tegra: fuse: Add missing of_node_put() in tegra_init_fuse()
Liang He [Thu, 16 Jun 2022 01:46:36 +0000 (09:46 +0800)]
soc/tegra: fuse: Add missing of_node_put() in tegra_init_fuse()

In this function, of_find_matching_node() will return a node pointer
with refcount incremented. We should use of_node_put() when the "np"
pointer is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2 years agoMerge tag 'samsung-drivers-6.1' of https://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 12 Sep 2022 15:14:23 +0000 (17:14 +0200)]
Merge tag 'samsung-drivers-6.1' of https://git./linux/kernel/git/krzk/linux into arm/drivers

Samsung SoC drivers changes for v6.1

1. Convert Samsung Exynos G-Scaler bindings to DT schema.
2. Maintainers update (drop Bartlomiej Zolnierkiewicz).

* tag 'samsung-drivers-6.1' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  MAINTAINERS: Drop Bartlomiej Zolnierkiewicz
  MAINTAINERS: pwm-fan: Drop Bartlomiej Zolnierkiewicz
  dt-bindings: media: samsung,exynos5250-gsc: convert to dtschema

Link: https://lore.kernel.org/r/20220909150849.820523-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'v6.1-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 12 Sep 2022 15:08:53 +0000 (17:08 +0200)]
Merge tag 'v6.1-rockchip-drivers1' of git://git./linux/kernel/git/mmind/linux-rockchip into arm/drivers

Powerdomain drivers for rv1126 and rk3588 socs, keep current state of
power-domains instead of always enabling when adding them, add rv1126
io domains and add binding for another "general register files" syscon.

* tag 'v6.1-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  soc: rockchip: power-domain: add power domain support for rk3588
  soc: rockchip: power-domain: do not enable domain when adding it
  dt-bindings: power: rockchip: Add bindings for rk3588
  dt-bindings: arm: rockchip: add rk5388 compatible string to pmu.yaml
  dt-bindings: power: add power-domain header for rk3588
  soc: rockchip: io-domain: Add RV1126 IO domains
  dt-bindings: power: rockchip: Document RV1126 PMU IO domains
  soc: rockchip: power-domain: Add RV1126 power domains
  dt-bindings: power: rockchip: Document RV1126 power-controller
  dt-bindings: power: Add power-domain header for RV1126
  dt-bindings: soc: grf: add pcie30-{phy,pipe}-grf

Link: https://lore.kernel.org/r/2252399.ElGaqSPkdT@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'memory-controller-drv-mediatek-6.1' of https://git.kernel.org/pub/scm...
Arnd Bergmann [Mon, 12 Sep 2022 15:04:14 +0000 (17:04 +0200)]
Merge tag 'memory-controller-drv-mediatek-6.1' of https://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v6.1 - MediaTek

Add support for the mt8188 SMI memory controller.

* tag 'memory-controller-drv-mediatek-6.1' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: mtk-smi: mt8188: Add SMI Support
  memory: mtk-smi: Add enable IOMMU SMC command for MM master
  memory: mtk-smi: Add return value for configure port function
  dt-bindings: memory: mediatek: Add mt8188 smi binding

Link: https://lore.kernel.org/r/20220909153037.824092-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'memory-controller-drv-brcm-6.1' of https://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Mon, 12 Sep 2022 15:03:17 +0000 (17:03 +0200)]
Merge tag 'memory-controller-drv-brcm-6.1' of https://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v6.1 - Broadcom

Add support for the Broadcom STB memory controller (BRCMSTB_MEMC).

* tag 'memory-controller-drv-brcm-6.1' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: brcmstb_memc: Add Broadcom STB memory controller driver
  Documentation: sysfs: Document Broadcom STB memc sysfs knobs
  dt-bindings: memory-controller: Document Broadcom STB MEMC

Link: https://lore.kernel.org/r/20220909153037.824092-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agoMerge tag 'memory-controller-drv-6.1' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 12 Sep 2022 14:41:21 +0000 (16:41 +0200)]
Merge tag 'memory-controller-drv-6.1' of https://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v6.1

1. Fix OF node refcount leaks in pl353-smc and generic of_memory code.
2. Add support for FPGA DFL EMIF revision 1.
3. Update bindings for Mediatek SMI mt8195.

* tag 'memory-controller-drv-6.1' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  dt-bindings: memory: mediatek,smi: Update condition for mt8195 smi node
  memory: of: Fix refcount leak bug in of_lpddr3_get_ddr_timings()
  memory: of: Fix refcount leak bug in of_get_ddr_timings()
  memory: dfl-emif: Update the dfl emif driver support revision 1
  memory: pl353-smc: Fix refcount leak bug in pl353_smc_probe()

Link: https://lore.kernel.org/r/20220909153037.824092-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agosoc: rockchip: power-domain: add power domain support for rk3588
Finley Xiao [Tue, 6 Sep 2022 14:38:25 +0000 (16:38 +0200)]
soc: rockchip: power-domain: add power domain support for rk3588

This driver is modified to support RK3588 SoCs.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
[port of downstream code incl. merging in fixes]
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20220906143825.199089-7-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agosoc: rockchip: power-domain: do not enable domain when adding it
Elaine Zhang [Tue, 6 Sep 2022 14:38:24 +0000 (16:38 +0200)]
soc: rockchip: power-domain: do not enable domain when adding it

It's not need to power on all pd when add pm domain. Instead
use PD's real status in pm_genpd_init().

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20220906143825.199089-6-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agodt-bindings: power: rockchip: Add bindings for rk3588
Sebastian Reichel [Tue, 6 Sep 2022 14:38:22 +0000 (16:38 +0200)]
dt-bindings: power: rockchip: Add bindings for rk3588

Add the compatible string for RK3588 SoC.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20220906143825.199089-4-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agodt-bindings: arm: rockchip: add rk5388 compatible string to pmu.yaml
Sebastian Reichel [Tue, 6 Sep 2022 14:38:20 +0000 (16:38 +0200)]
dt-bindings: arm: rockchip: add rk5388 compatible string to pmu.yaml

Add the compatible for the pmu mfd on rk3588.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20220906143825.199089-2-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agoMerge branch 'v6.1-shared/powerdomain' into v6.1-armsoc/drivers
Heiko Stuebner [Fri, 9 Sep 2022 17:02:14 +0000 (19:02 +0200)]
Merge branch 'v6.1-shared/powerdomain' into v6.1-armsoc/drivers

2 years agodt-bindings: power: add power-domain header for rk3588
Finley Xiao [Tue, 6 Sep 2022 14:38:21 +0000 (16:38 +0200)]
dt-bindings: power: add power-domain header for rk3588

Add all the power domains listed in the RK3588 TRM.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220906143825.199089-3-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agoMAINTAINERS: Drop Bartlomiej Zolnierkiewicz
Krzysztof Kozlowski [Mon, 8 Aug 2022 10:15:24 +0000 (13:15 +0300)]
MAINTAINERS: Drop Bartlomiej Zolnierkiewicz

Bartlomiej's Samsung email address is not working since around last
year and there was no follow up patch take over of the drivers, so drop
the email from maintainers.

Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220808101526.46556-1-krzysztof.kozlowski@linaro.org
2 years agosoc: sunxi: sram: Fix debugfs info for A64 SRAM C
Samuel Holland [Mon, 15 Aug 2022 04:12:43 +0000 (23:12 -0500)]
soc: sunxi: sram: Fix debugfs info for A64 SRAM C

The labels were backward with respect to the register values. The SRAM
is mapped to the CPU when the register value is 1.

Fixes: 5e4fb6429761 ("drivers: soc: sunxi: add support for A64 and its SRAM C")
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220815041248.53268-7-samuel@sholland.org
2 years agosoc: sunxi: sram: Fix probe function ordering issues
Samuel Holland [Mon, 15 Aug 2022 04:12:42 +0000 (23:12 -0500)]
soc: sunxi: sram: Fix probe function ordering issues

Errors from debugfs are intended to be non-fatal, and should not prevent
the driver from probing.

Since debugfs file creation is treated as infallible, move it below the
parts of the probe function that can fail. This prevents an error
elsewhere in the probe function from causing the file to leak. Do the
same for the call to of_platform_populate().

Finally, checkpatch suggests an octal literal for the file permissions.

Fixes: 4af34b572a85 ("drivers: soc: sunxi: Introduce SoC driver to map SRAMs")
Fixes: 5828729bebbb ("soc: sunxi: export a regmap for EMAC clock reg on A64")
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220815041248.53268-6-samuel@sholland.org
2 years agosoc: sunxi: sram: Prevent the driver from being unbound
Samuel Holland [Mon, 15 Aug 2022 04:12:41 +0000 (23:12 -0500)]
soc: sunxi: sram: Prevent the driver from being unbound

This driver exports a regmap tied to the platform device (as opposed to
a syscon, which exports a regmap tied to the OF node). Because of this,
the driver can never be unbound, as that would destroy the regmap. Use
builtin_platform_driver_probe() to enforce this limitation.

Fixes: 5828729bebbb ("soc: sunxi: export a regmap for EMAC clock reg on A64")
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220815041248.53268-5-samuel@sholland.org
2 years agosoc: sunxi: sram: Actually claim SRAM regions
Samuel Holland [Mon, 15 Aug 2022 04:12:40 +0000 (23:12 -0500)]
soc: sunxi: sram: Actually claim SRAM regions

sunxi_sram_claim() checks the sram_desc->claimed flag before updating
the register, with the intent that only one device can claim a region.
However, this was ineffective because the flag was never set.

Fixes: 4af34b572a85 ("drivers: soc: sunxi: Introduce SoC driver to map SRAMs")
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220815041248.53268-4-samuel@sholland.org
2 years agoMerge tag 'amlogic-drivers-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Thu, 8 Sep 2022 14:04:10 +0000 (16:04 +0200)]
Merge tag 'amlogic-drivers-for-v6.1' of git://git./linux/kernel/git/amlogic/linux into arm/drivers

Amlogic Drivers changes for v6.1:
- Hold reference returned by of_get_parent() in meson_pwrc

* tag 'amlogic-drivers-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  soc: amlogic: meson-pwrc: Hold reference returned by of_get_parent()

Link: https://lore.kernel.org/r/ea093c00-a4bb-fb80-3430-71916b2853f8@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agofirmware: arm_ffa: Split up ffa_ops into info, message and memory operations
Sudeep Holla [Wed, 7 Sep 2022 14:52:40 +0000 (15:52 +0100)]
firmware: arm_ffa: Split up ffa_ops into info, message and memory operations

In preparation to make memory operations accessible for a non
ffa_driver/device, it is better to split the ffa_ops into different
categories of operations: info, message and memory. The info and memory
are ffa_device independent and can be used without any associated
ffa_device from a non ffa_driver.

However, we don't export these info and memory APIs yet without the user.
The first users of these APIs can export them.

Link: https://lore.kernel.org/r/20220907145240.1683088-11-sudeep.holla@arm.com
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Set up 32bit execution mode flag using partiion property
Sudeep Holla [Wed, 7 Sep 2022 14:52:39 +0000 (15:52 +0100)]
firmware: arm_ffa: Set up 32bit execution mode flag using partiion property

FF-A v1.1 adds a flag in the partition properties to indicate if the
partition runs in the AArch32 or AArch64 execution state. Use the same
to set-up the 32-bit execution flag mode in the ffa_dev automatically
if the detected firmware version is above v1.0 and ignore any requests
to do the same from the ffa_driver.

Link: https://lore.kernel.org/r/20220907145240.1683088-10-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Add v1.1 get_partition_info support
Sudeep Holla [Wed, 7 Sep 2022 14:52:38 +0000 (15:52 +0100)]
firmware: arm_ffa: Add v1.1 get_partition_info support

FF-A v1.1 adds support to discovery the UUIDs of the partitions that was
missing in v1.0 and which the driver workarounds by using UUIDs supplied
by the ffa_drivers.

Add the v1.1 get_partition_info support and disable the workaround if
the detected FF-A version is greater than v1.0.

Link: https://lore.kernel.org/r/20220907145240.1683088-9-sudeep.holla@arm.com
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Rename ffa_dev_ops as ffa_ops
Sudeep Holla [Wed, 7 Sep 2022 14:52:37 +0000 (15:52 +0100)]
firmware: arm_ffa: Rename ffa_dev_ops as ffa_ops

Except the message APIs, all other APIs are ffa_device independent and can
be used without any associated ffa_device from a non ffa_driver.

In order to reflect the same, just rename ffa_dev_ops as ffa_ops to
avoid any confusion or to keep it simple.

Link: https://lore.kernel.org/r/20220907145240.1683088-8-sudeep.holla@arm.com
Suggested-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Make memory apis ffa_device independent
Sudeep Holla [Wed, 7 Sep 2022 14:52:36 +0000 (15:52 +0100)]
firmware: arm_ffa: Make memory apis ffa_device independent

There is a requirement to make memory APIs independent of the ffa_device.
One of the use-case is to have a common memory driver that manages the
memory for all the ffa_devices. That common memory driver won't be a
ffa_driver or won't have any ffa_device associated with it. So having
these memory APIs accessible without a ffa_device is needed and should
be possible as most of these are handled by the partition manager(SPM
or hypervisor).

Drop the ffa_device argument to the memory APIs and make them ffa_device
independent.

Link: https://lore.kernel.org/r/20220907145240.1683088-7-sudeep.holla@arm.com
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Use FFA_FEATURES to detect if native versions are supported
Sudeep Holla [Wed, 7 Sep 2022 14:52:35 +0000 (15:52 +0100)]
firmware: arm_ffa: Use FFA_FEATURES to detect if native versions are supported

Currently, the ffa_dev->mode_32bit is use to detect if the native 64-bit
or 32-bit versions of FF-A ABI needs to be used. However for the FF-A
memory ABIs, it is not dependent on the ffa_device(i.e. the partition)
itself, but the partition manager(SPM).

So, the FFA_FEATURES can be use to detect if the native 64bit ABIs are
supported or not and appropriate calls can be made based on that.

Use FFA_FEATURES to detect if native versions of MEM_LEND or MEM_SHARE
are implemented and make of the same to use native memory ABIs later on.

Link: https://lore.kernel.org/r/20220907145240.1683088-6-sudeep.holla@arm.com
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Add support for querying FF-A features
Sudeep Holla [Wed, 7 Sep 2022 14:52:34 +0000 (15:52 +0100)]
firmware: arm_ffa: Add support for querying FF-A features

Add support for FFA_FEATURES to discover properties supported at the
FF-A interface. This interface can be used to query:
 - If an FF-A interface is implemented by the component at the higher EL,
 - If an implemented FF-A interface also implements any optional features
   described in its interface definition, and
 - Any implementation details exported by an implemented FF-A interface
   as described in its interface definition.

Link: https://lore.kernel.org/r/20220907145240.1683088-5-sudeep.holla@arm.com
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Remove ffa_dev_ops_get()
Sudeep Holla [Wed, 7 Sep 2022 14:52:33 +0000 (15:52 +0100)]
firmware: arm_ffa: Remove ffa_dev_ops_get()

The only user of this exported ffa_dev_ops_get() was OPTEE driver which
now uses ffa_dev->ops directly, there are no other users for this.

Also, since any ffa driver can use ffa_dev->ops directly, there will be
no need for ffa_dev_ops_get(), so just remove ffa_dev_ops_get().

Link: https://lore.kernel.org/r/20220907145240.1683088-4-sudeep.holla@arm.com
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agotee: optee: Drop ffa_ops in optee_ffa structure using ffa_dev->ops directly
Sudeep Holla [Wed, 7 Sep 2022 14:52:32 +0000 (15:52 +0100)]
tee: optee: Drop ffa_ops in optee_ffa structure using ffa_dev->ops directly

Now that the ffa_device structure holds the pointer to ffa_dev_ops,
there is no need to obtain the same through ffa_dev_ops_get().

Just use the ffa_dev->ops directly. Since the ffa_device itself carries
ffa_dev_ops now, there is no need to keep a copy in optee_ffa structure.

Drop ffa_ops in the optee_ffa structure as it is not needed anymore.

Link: https://lore.kernel.org/r/20220907145240.1683088-3-sudeep.holla@arm.com
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agofirmware: arm_ffa: Add pointer to the ffa_dev_ops in struct ffa_dev
Sudeep Holla [Wed, 7 Sep 2022 14:52:31 +0000 (15:52 +0100)]
firmware: arm_ffa: Add pointer to the ffa_dev_ops in struct ffa_dev

Currently ffa_dev_ops_get() is the way to fetch the ffa_dev_ops pointer.
It checks if the ffa_dev structure pointer is valid before returning the
ffa_dev_ops pointer.

Instead, the pointer can be made part of the ffa_dev structure and since
the core driver is incharge of creating ffa_device for each identified
partition, there is no need to check for the validity explicitly if the
pointer is embedded in the structure.

Add the pointer to the ffa_dev_ops in the ffa_dev structure itself and
initialise the same as part of creation of the device.

Link: https://lore.kernel.org/r/20220907145240.1683088-2-sudeep.holla@arm.com
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2 years agoMAINTAINERS: pwm-fan: Drop Bartlomiej Zolnierkiewicz
Krzysztof Kozlowski [Mon, 8 Aug 2022 10:15:25 +0000 (13:15 +0300)]
MAINTAINERS: pwm-fan: Drop Bartlomiej Zolnierkiewicz

Bartlomiej's Samsung email address is not working since around last
year and there was no follow up patch take over of the drivers, so drop
the email from maintainers.

Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220808101526.46556-2-krzysztof.kozlowski@linaro.org
2 years agodt-bindings: media: samsung,exynos5250-gsc: convert to dtschema
Krzysztof Kozlowski [Tue, 30 Aug 2022 18:09:27 +0000 (21:09 +0300)]
dt-bindings: media: samsung,exynos5250-gsc: convert to dtschema

Convert the Samsung Exynos SoC G-Scaler bindings to DT schema.

Changes done during conversion:
1. A typical (already used) properties like clocks, iommus and
   power-domains.
2. Require clocks, because they are essential for the block to operate.
3. Describe the differences in clocks between the Exynos5250/5420 and
   the Exynos5433 G-Scalers.  This includes the fifth Exynos5433 clock
   "gsd" (GSCL Smart Deck) which was added to the DTS, but not to the
   bindings and Linux driver.  Similarly to Exynos5433 DECON change [1],
   the clock should be used.

[1] https://lore.kernel.org/all/6270db2d-667d-8d6f-9289-be92da486c25@samsung.com/

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220830180927.16686-1-krzysztof.kozlowski@linaro.org
2 years agosoc: rockchip: io-domain: Add RV1126 IO domains
Jianqun Xu [Thu, 18 Aug 2022 12:41:18 +0000 (18:11 +0530)]
soc: rockchip: io-domain: Add RV1126 IO domains

Add IO domains support for RV1126 SoC.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Link: https://lore.kernel.org/r/20220818124132.125304-6-jagan@edgeble.ai
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agodt-bindings: power: rockchip: Document RV1126 PMU IO domains
Jagan Teki [Thu, 18 Aug 2022 12:41:17 +0000 (18:11 +0530)]
dt-bindings: power: rockchip: Document RV1126 PMU IO domains

Document dt-bindings for RV1126 PMU IO domains.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Link: https://lore.kernel.org/r/20220818124132.125304-5-jagan@edgeble.ai
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agosoc: rockchip: power-domain: Add RV1126 power domains
Jagan Teki [Thu, 18 Aug 2022 12:41:16 +0000 (18:11 +0530)]
soc: rockchip: power-domain: Add RV1126 power domains

Add power domains support for RV1126 SoC.

Cypto, VO and NPU domains will add it future patches.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Link: https://lore.kernel.org/r/20220818124132.125304-4-jagan@edgeble.ai
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agodt-bindings: power: rockchip: Document RV1126 power-controller
Jagan Teki [Thu, 18 Aug 2022 12:41:15 +0000 (18:11 +0530)]
dt-bindings: power: rockchip: Document RV1126 power-controller

Document dt-bindings for RV1126 power-controller.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Link: https://lore.kernel.org/r/20220818124132.125304-3-jagan@edgeble.ai
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agoMerge branch 'v6.1-shared/powerdomain' into v6.1-armsoc/drivers
Heiko Stuebner [Mon, 5 Sep 2022 09:52:57 +0000 (11:52 +0200)]
Merge branch 'v6.1-shared/powerdomain' into v6.1-armsoc/drivers

2 years agodt-bindings: power: Add power-domain header for RV1126
Jagan Teki [Thu, 18 Aug 2022 12:41:14 +0000 (18:11 +0530)]
dt-bindings: power: Add power-domain header for RV1126

Add power-domain header for RV1126 SoC from description in TRM.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220818124132.125304-2-jagan@edgeble.ai
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agosoc: amlogic: meson-pwrc: Hold reference returned by of_get_parent()
Liang He [Tue, 26 Jul 2022 07:38:41 +0000 (15:38 +0800)]
soc: amlogic: meson-pwrc: Hold reference returned by of_get_parent()

We should hold the reference returned by of_get_parent() and use
it to call of_node_put() for refcount balance.

Signed-off-by: Liang He <windhl@126.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20220726073841.1320509-1-windhl@126.com
2 years agodt-bindings: soc: grf: add pcie30-{phy,pipe}-grf
Frank Wunderlich [Thu, 25 Aug 2022 19:38:33 +0000 (21:38 +0200)]
dt-bindings: soc: grf: add pcie30-{phy,pipe}-grf

Add compatibles for PCIe v3 General Register Files.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220825193836.54262-3-linux@fw-web.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2 years agoMerge tag 'renesas-drivers-for-v6.1-tag1' of git://git.kernel.org/pub/scm/linux/kerne...
Arnd Bergmann [Fri, 2 Sep 2022 10:48:36 +0000 (12:48 +0200)]
Merge tag 'renesas-drivers-for-v6.1-tag1' of git://git./linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v6.1

  - Auto-enable the RZ/G2L external and GPIO interrupt controller driver
    when needed,
  - Identify the R-Car H3Ne-1.7G and RZ/Five SoCs.

* tag 'renesas-drivers-for-v6.1-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: Identify RZ/Five SoC
  soc: renesas: Identify R-Car H3Ne-1.7G
  soc: renesas: Kconfig: Enable IRQC driver for RZ/G2L SoC

Link: https://lore.kernel.org/r/cover.1662111135.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 years agosoc: mediatek: mutex: Add mt8186 mutex mod settings for mdp3
Allen-KH Cheng [Wed, 31 Aug 2022 17:21:51 +0000 (01:21 +0800)]
soc: mediatek: mutex: Add mt8186 mutex mod settings for mdp3

Add mt8186 mutex mod settings for mdp3.

Co-developed-by: Xiandong Wang <xiandong.wang@mediatek.com>
Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220831172151.10215-3-allen-kh.cheng@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2 years agodt-bindings: soc: mediatek: Add mdp3 mutex support for mt8186
Allen-KH Cheng [Wed, 31 Aug 2022 17:21:50 +0000 (01:21 +0800)]
dt-bindings: soc: mediatek: Add mdp3 mutex support for mt8186

Add mdp3 mutex compatible for mt8186 SoC.

Co-developed-by: Xiandong Wang <xiandong.wang@mediatek.com>
Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220831172151.10215-2-allen-kh.cheng@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2 years agosoc: mediatek: pm-domains: Simplify some error message
Christophe JAILLET [Fri, 5 Aug 2022 21:46:49 +0000 (23:46 +0200)]
soc: mediatek: pm-domains: Simplify some error message

dev_err_probe() already prints the error code in a human readable way, so
there is no need to duplicate it as a numerical value at the end of the
message.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/e6ba80d8e27fdb2b1527c7eae6687e481960c81d.1659735996.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2 years agomemory: mtk-smi: mt8188: Add SMI Support
Chengci.Xu [Wed, 17 Aug 2022 12:46:08 +0000 (20:46 +0800)]
memory: mtk-smi: mt8188: Add SMI Support

Add mt8188 smi common & larb support

Signed-off-by: Chengci.Xu <chengci.xu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220817124608.10062-5-chengci.xu@mediatek.com
2 years agomemory: mtk-smi: Add enable IOMMU SMC command for MM master
Chengci.Xu [Wed, 17 Aug 2022 12:46:07 +0000 (20:46 +0800)]
memory: mtk-smi: Add enable IOMMU SMC command for MM master

For concerns about security, the register to enable/disable IOMMU of
SMI LARB should only be configured in secure world. Thus, we add some
SMC command for multimedia master to enable/disable MM IOMMU in ATF by
setting the register of SMI LARB. This function is prepared for MT8188.

Signed-off-by: Chengci.Xu <chengci.xu@mediatek.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220817124608.10062-4-chengci.xu@mediatek.com
2 years agomemory: mtk-smi: Add return value for configure port function
Chengci.Xu [Wed, 17 Aug 2022 12:46:06 +0000 (20:46 +0800)]
memory: mtk-smi: Add return value for configure port function

In MT8188, the register to enable/disable IOMMU can only be configured
in secure world by SMC call. We should add a return value for configure
port function for preparation because SMC call may return an error result.

Signed-off-by: Chengci.Xu <chengci.xu@mediatek.com>
Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220817124608.10062-3-chengci.xu@mediatek.com
2 years agodt-bindings: memory: mediatek: Add mt8188 smi binding
Chengci.Xu [Wed, 17 Aug 2022 12:46:05 +0000 (20:46 +0800)]
dt-bindings: memory: mediatek: Add mt8188 smi binding

Add mt8188 smi supporting in the bindings.

In mt8188, there are two smi-common HW, one is for vdo(video output),
the other is for vpp(video processing pipe). They connect with different
smi-larbs, then some setting(bus_sel) is different. Differentiate them
with the compatible string.

Something like this:

   IOMMU(VDO)          IOMMU(VPP)
       |                   |
SMI_COMMON_VDO       SMI_COMMON_VPP
----------------     ----------------
   |     |   ...       |     |    ...
 larb0 larb2 ...     larb1 larb3  ...

Signed-off-by: Chengci.Xu <chengci.xu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220817124608.10062-2-chengci.xu@mediatek.com
2 years agosoc: mediatek: mtk-svs: Explicitly include bitfield header
Nícolas F. R. A. Prado [Mon, 29 Aug 2022 20:44:39 +0000 (16:44 -0400)]
soc: mediatek: mtk-svs: Explicitly include bitfield header

Commit a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros
where possible") introduced the use of FIELD_GET and FIELD_PREP macros,
which are defined in the bitfield header. Add an explicit include for it
so we're sure to have the symbols defined independently of the config.

Fixes: a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros where possible")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220829204439.3748648-1-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2 years agoLinux 6.0-rc3
Linus Torvalds [Sun, 28 Aug 2022 22:05:29 +0000 (15:05 -0700)]
Linux 6.0-rc3

2 years agoMerge tag 'mm-hotfixes-stable-2022-08-28' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Sun, 28 Aug 2022 21:49:59 +0000 (14:49 -0700)]
Merge tag 'mm-hotfixes-stable-2022-08-28' of git://git./linux/kernel/git/akpm/mm

Pull more hotfixes from Andrew Morton:
 "Seventeen hotfixes.  Mostly memory management things.

  Ten patches are cc:stable, addressing pre-6.0 issues"

* tag 'mm-hotfixes-stable-2022-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  .mailmap: update Luca Ceresoli's e-mail address
  mm/mprotect: only reference swap pfn page if type match
  squashfs: don't call kmalloc in decompressors
  mm/damon/dbgfs: avoid duplicate context directory creation
  mailmap: update email address for Colin King
  asm-generic: sections: refactor memory_intersects
  bootmem: remove the vmemmap pages from kmemleak in put_page_bootmem
  ocfs2: fix freeing uninitialized resource on ocfs2_dlm_shutdown
  Revert "memcg: cleanup racy sum avoidance code"
  mm/zsmalloc: do not attempt to free IS_ERR handle
  binder_alloc: add missing mmap_lock calls when using the VMA
  mm: re-allow pinning of zero pfns (again)
  vmcoreinfo: add kallsyms_num_syms symbol
  mailmap: update Guilherme G. Piccoli's email addresses
  writeback: avoid use-after-free after removing device
  shmem: update folio if shmem_replace_page() updates the page
  mm/hugetlb: avoid corrupting page->mapping in hugetlb_mcopy_atomic_pte

2 years agoMerge tag 'bitmap-6.0-rc3' of github.com:/norov/linux
Linus Torvalds [Sun, 28 Aug 2022 21:36:27 +0000 (14:36 -0700)]
Merge tag 'bitmap-6.0-rc3' of github.com:/norov/linux

Pull bitmap fixes from Yury Norov:
 "Fix the reported issues, and implements the suggested improvements,
  for the version of the cpumask tests [1] that was merged with commit
  c41e8866c28c ("lib/test: introduce cpumask KUnit test suite").

  These changes include fixes for the tests, and better alignment with
  the KUnit style guidelines"

* tag 'bitmap-6.0-rc3' of github.com:/norov/linux:
  lib/cpumask_kunit: add tests file to MAINTAINERS
  lib/cpumask_kunit: log mask contents
  lib/test_cpumask: follow KUnit style guidelines
  lib/test_cpumask: fix cpu_possible_mask last test
  lib/test_cpumask: drop cpu_possible_mask full test

2 years ago.mailmap: update Luca Ceresoli's e-mail address
Luca Ceresoli [Fri, 26 Aug 2022 13:05:15 +0000 (15:05 +0200)]
.mailmap: update Luca Ceresoli's e-mail address

My Bootlin address is preferred from now on.

Link: https://lkml.kernel.org/r/20220826130515.3011951-1-luca.ceresoli@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Atish Patra <atishp@atishpatra.org>
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2 years agomm/mprotect: only reference swap pfn page if type match
Peter Xu [Tue, 23 Aug 2022 22:11:38 +0000 (18:11 -0400)]
mm/mprotect: only reference swap pfn page if type match

Yu Zhao reported a bug after the commit "mm/swap: Add swp_offset_pfn() to
fetch PFN from swap entry" added a check in swp_offset_pfn() for swap type [1]:

  kernel BUG at include/linux/swapops.h:117!
  CPU: 46 PID: 5245 Comm: EventManager_De Tainted: G S         O L 6.0.0-dbg-DEV #2
  RIP: 0010:pfn_swap_entry_to_page+0x72/0xf0
  Code: c6 48 8b 36 48 83 fe ff 74 53 48 01 d1 48 83 c1 08 48 8b 09 f6
  c1 01 75 7b 66 90 48 89 c1 48 8b 09 f6 c1 01 74 74 5d c3 eb 9e <0f> 0b
  48 ba ff ff ff ff 03 00 00 00 eb ae a9 ff 0f 00 00 75 13 48
  RSP: 0018:ffffa59e73fabb80 EFLAGS: 00010282
  RAX: 00000000ffffffe8 RBX: 0c00000000000000 RCX: ffffcd5440000000
  RDX: 1ffffffffff7a80a RSI: 0000000000000000 RDI: 0c0000000000042b
  RBP: ffffa59e73fabb80 R08: ffff9965ca6e8bb8 R09: 0000000000000000
  R10: ffffffffa5a2f62d R11: 0000030b372e9fff R12: ffff997b79db5738
  R13: 000000000000042b R14: 0c0000000000042b R15: 1ffffffffff7a80a
  FS:  00007f549d1bb700(0000) GS:ffff99d3cf680000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 0000440d035b3180 CR3: 0000002243176004 CR4: 00000000003706e0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
  Call Trace:
   <TASK>
   change_pte_range+0x36e/0x880
   change_p4d_range+0x2e8/0x670
   change_protection_range+0x14e/0x2c0
   mprotect_fixup+0x1ee/0x330
   do_mprotect_pkey+0x34c/0x440
   __x64_sys_mprotect+0x1d/0x30

It triggers because pfn_swap_entry_to_page() could be called upon e.g. a
genuine swap entry.

Fix it by only calling it when it's a write migration entry where the page*
is used.

[1] https://lore.kernel.org/lkml/CAOUHufaVC2Za-p8m0aiHw6YkheDcrO-C3wRGixwDS32VTS+k1w@mail.gmail.com/

Link: https://lkml.kernel.org/r/20220823221138.45602-1-peterx@redhat.com
Fixes: 6c287605fd56 ("mm: remember exclusively mapped anonymous pages with PG_anon_exclusive")
Signed-off-by: Peter Xu <peterx@redhat.com>
Reported-by: Yu Zhao <yuzhao@google.com>
Tested-by: Yu Zhao <yuzhao@google.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2 years agosquashfs: don't call kmalloc in decompressors
Phillip Lougher [Mon, 22 Aug 2022 21:54:30 +0000 (22:54 +0100)]
squashfs: don't call kmalloc in decompressors

The decompressors may be called while in an atomic section.  So move the
kmalloc() out of this path, and into the "page actor" init function.

This fixes a regression introduced by commit
f268eedddf35 ("squashfs: extend "page actor" to handle missing pages")

Link: https://lkml.kernel.org/r/20220822215430.15933-1-phillip@squashfs.org.uk
Fixes: f268eedddf35 ("squashfs: extend "page actor" to handle missing pages")
Reported-by: Chris Murphy <lists@colorremedies.com>
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2 years agomm/damon/dbgfs: avoid duplicate context directory creation
Badari Pulavarty [Sun, 21 Aug 2022 18:08:53 +0000 (18:08 +0000)]
mm/damon/dbgfs: avoid duplicate context directory creation

When user tries to create a DAMON context via the DAMON debugfs interface
with a name of an already existing context, the context directory creation
fails but a new context is created and added in the internal data
structure, due to absence of the directory creation success check.  As a
result, memory could leak and DAMON cannot be turned on.  An example test
case is as below:

    # cd /sys/kernel/debug/damon/
    # echo "off" >  monitor_on
    # echo paddr > target_ids
    # echo "abc" > mk_context
    # echo "abc" > mk_context
    # echo $$ > abc/target_ids
    # echo "on" > monitor_on  <<< fails

Return value of 'debugfs_create_dir()' is expected to be ignored in
general, but this is an exceptional case as DAMON feature is depending
on the debugfs functionality and it has the potential duplicate name
issue.  This commit therefore fixes the issue by checking the directory
creation failure and immediately return the error in the case.

Link: https://lkml.kernel.org/r/20220821180853.2400-1-sj@kernel.org
Fixes: 75c1c2b53c78 ("mm/damon/dbgfs: support multiple contexts")
Signed-off-by: Badari Pulavarty <badari.pulavarty@intel.com>
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org> [ 5.15.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>