platform/kernel/linux-rpi.git
3 years agoMerge tag 'omap-for-v5.11/genpd-drivers-signed' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Tue, 8 Dec 2020 23:19:56 +0000 (00:19 +0100)]
Merge tag 'omap-for-v5.11/genpd-drivers-signed' of git://git./linux/kernel/git/tmlind/linux-omap into arm/drivers

Driver changes for omaps for genpd for v5.11 merge window

This series of changes allows booting am335x with genpd and
device tree data without the legacy platform data. Also at
least am437x can be booted with gendp with power domain and
dts data. The SoC specific dts changes will be a separate
pull request.

We need the following driver changes merged before the dts
changes can be done:

- platform code needs a few improvments to probe l4_wkup first
  for clocks, and to bail out when there is no platform data

- ti-sysc driver needs a non-urgent fix for asserting rstctrl
  reset only after disabling the clocks, to probe modules with
  no known control registers, and added quirk handling for gpmc
  devices

- omap-prm driver needs a non-urgent fix for reset status bit,
  support added for pm_clk, and then we add the rest of am335x
  power domain data

- clock driver for am335x needs to keep l3_main clock enabled
  with genpd for suspend and resume to work

- wkup_m3 remoteproc driver needs support added for reset
  control if available instead of the legacy pdata callbacks

- pm33xx driver needs PM runtime support added for genpd

The am335x specific driver changes for the clock, wkup_m3,
pm33xx and remoteproc drivers are quite trivial and have not
caused merge conflicts in Linux next. I did not get acks for
these changes except from Santosh but had already pushed out
the branch already at that point. So I've added the related
driver maintainers to Cc.

* tag 'omap-for-v5.11/genpd-drivers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  remoteproc/wkup_m3: Use reset control driver if available
  soc: ti: pm33xx: Enable basic PM runtime support for genpd
  soc: ti: omap-prm: am3: add genpd support for remaining PRM instances
  soc: ti: omap-prm: Add pm_clk for genpd
  clk: ti: am33xx: Keep am3 l3 main clock always on for genpd
  bus: ti-sysc: Implement GPMC debug quirk to drop platform data
  bus: ti-sysc: Support modules without control registers
  ARM: OMAP2+: Probe PRCM first to probe l4_wkup with simple-pm-bus
  ARM: OMAP2+: Check for inited flag
  bus: ti-sysc: Assert reset only after disabling clocks
  soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted
  bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw
  bus: ti-sysc: Fix reset status check for modules with quirks
  ARM: OMAP2+: Fix missing select PM_GENERIC_DOMAINS_OF
  ARM: OMAP2+: Fix location for select PM_GENERIC_DOMAINS

Link: https://lore.kernel.org/r/pull-1606806458-694517@atomide.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'qcom-drivers-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 8 Dec 2020 23:17:54 +0000 (00:17 +0100)]
Merge tag 'qcom-drivers-for-5.11' of git://git./linux/kernel/git/qcom/linux into arm/drivers

Qualcomm driver updates for v5.11

This adds support for the core power domains on MSM8916, MSM8939, SDM660
and SDX55. It adds SM8150 support to the last-level cache controller
driver and it makes it possible to build the Command DB and RPMh drivers
as modules.

It also contains a slew of smaller cleanups, style and bug fixes
throughout the various drivers.

* tag 'qcom-drivers-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (39 commits)
  soc: qcom: rpmhpd: Add SDX55 power domains
  dt-bindings: power: Add rpm power domain bindings for sdx55
  soc: qcom: rpmh: Use __fill_rpmh_msg API during rpmh_write()
  samples: qmi: Constify static qmi ops
  soc: qcom: pdr: Constify static qmi structs
  soc: qcom: initialize local variable
  soc: qcom: socinfo: add soc ids for msm8953 variants
  soc: qcom: geni: Remove "iova" check
  soc: qcom: llcc: Add configuration data for SM8150
  dt-bindings: msm: Add LLCC for SM8150
  soc: qcom: rpmh: Fix possible doc-rot in rpmh_write()'s header
  soc: qcom: kryo-l2-accessors: Fix misnaming of 'val'
  soc: qcom: rpmhpd: Provide some missing struct member descriptions
  soc: qcom: llcc-qcom: Fix expected kernel-doc formatting
  soc: qcom: smp2p: Remove unused struct attribute provide another
  soc: qcom: wcnss_ctrl: Demote non-conformant struct header and fix function headers
  soc: qcom: smsm: Fix some kernel-doc formatting and naming problems
  soc: qcom: smem: Fix formatting and missing documentation issues
  soc: qcom: qcom-geni-se: Fix misnamed function parameter 'rx_rfr'
  soc: qcom: qcom_aoss: Add missing description for 'cooling_devs'
  ...

Link: https://lore.kernel.org/r/20201130190142.345246-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'aspeed-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel...
Arnd Bergmann [Mon, 30 Nov 2020 16:24:21 +0000 (17:24 +0100)]
Merge tag 'aspeed-5.11-soc' of git://git./linux/kernel/git/joel/aspeed into arm/drivers

ASPEED soc driver updates for 5.11

New drivers:

 - SoC info driver to expose revision information

New features:

 - AST2600 support for the LPC control driver. This includes
   setting the LPC2AHB bridge up in a backwards compatible manner.

Cleanups:

 - LPC control
 - Kconfig
 - Bindings updates for AST2600 strings

* tag 'aspeed-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed:
  soc: aspeed: Enable drivers with ARCH_ASPEED
  soc: aspeed: Fix a reference leak in aspeed_socinfo_init()
  soc: aspeed: remove unneeded semicolon
  soc: aspeed-lpc-ctrl: Fix driver name
  soc: aspeed-lpc-ctrl: Fix whitespace
  soc: aspeed-lpc-ctrl: LPC to AHB mapping on ast2600
  soc: aspeed-lpc-ctrl: Fail probe of lpc-ctrl if reserved memory is not aligned
  soc: aspeed: lpc: Add AST2600 compatible strings
  dt-bindings: aspeed-lpc: Add AST2600 compatible strings
  ARM: dts: aspeed: Add silicon id node
  soc: aspeed: Add soc info driver
  dt-bindings: aspeed: Add silicon id node to SCU
  soc: aspeed: Improve kconfig

Link: https://lore.kernel.org/r/CACPK8Xe=9ezhyWRMqVOEQr7SU1YoYfVBGGdGzjmE4SiBr--vJQ@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'v5.10-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias...
Arnd Bergmann [Mon, 30 Nov 2020 16:22:02 +0000 (17:22 +0100)]
Merge tag 'v5.10-next-soc' of git://git./linux/kernel/git/matthias.bgg/linux into arm/drivers

power-domains:
- add support for new power domain driver.
- add support for mt8183 and mt8192

devapc:
- add support for the devapc device found on mt6779 to identify of
  malicious bus accesses from a controller to a device

mmsys:
- move DDP routing IDs into the driver

cmdq:
- drop timeout handler support as not usefull

scpsys:
- print warning on theoretical error

* tag 'v5.10-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (21 commits)
  soc: mediatek: mmsys: Use devm_platform_ioremap_resource()
  soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h
  soc: mediatek: add mt6779 devapc driver
  dt-bindings: devapc: add bindings for mtk-devapc
  soc / drm: mediatek: cmdq: Remove timeout handler in helper function
  soc: mediatek: pm-domains: Add support for mt8192
  soc: mediatek: pm-domains: Add default power off flag
  soc: mediatek: pm-domains: Add support for mt8183
  soc: mediatek: pm-domains: Allow bus protection to ignore clear ack
  soc: mediatek: pm-domains: Add subsystem clocks
  soc: mediatek: pm-domains: Add extra sram control
  soc: mediatek: pm-domains: Add SMI block as bus protection block
  soc: mediatek: pm_domains: Make bus protection generic
  soc: mediatek: pm-domains: Add bus protection protocol
  soc: mediatek: Add MediaTek SCPSYS power domains
  dt-bindings: power: Add MT8192 power domains
  dt-bindings: power: Add MT8183 power domains
  dt-bindings: power: Add bindings for the Mediatek SCPSYS power domains controller
  mfd: syscon: Add syscon_regmap_lookup_by_phandle_optional() function.
  MAINTAINERS: change mediatek wiki page
  ...

Link: https://lore.kernel.org/r/b03fe343-e183-c6f3-f2dc-4c58aae3146b@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'arm-soc/for-5.11/drivers' of https://github.com/Broadcom/stblinux into...
Arnd Bergmann [Mon, 30 Nov 2020 16:20:57 +0000 (17:20 +0100)]
Merge tag 'arm-soc/for-5.11/drivers' of https://github.com/Broadcom/stblinux into arm/drivers

This pull request contains Broadcom SoCs driver changes for 5.11, please
pull the following:

- Lee provides a missing function declaration spotted with W=1 builds

* tag 'arm-soc/for-5.11/drivers' of https://github.com/Broadcom/stblinux:
  soc: bcm: brcmstb: pm: pm-arm: Provide prototype for brcmstb_pm_s3_finish()

Link: https://lore.kernel.org/r/20201128163410.1691529-5-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'at91-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91...
Arnd Bergmann [Mon, 30 Nov 2020 16:19:19 +0000 (17:19 +0100)]
Merge tag 'at91-drivers-5.11' of git://git./linux/kernel/git/at91/linux into arm/drivers

AT91 drivers for 5.11:

 - add sam9x60 SiP IDs
 - at91_cf cleanups

* tag 'at91-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  pcmcia: at91_cf: remove platform data support
  pcmcia: at91_cf: move definitions locally
  ARM: at91: sam9x60 SiP types added to soc description

Link: https://lore.kernel.org/r/20201127214140.GA1688544@piout.net
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agosoc: mediatek: mmsys: Use devm_platform_ioremap_resource()
Enric Balletbo i Serra [Tue, 6 Oct 2020 19:33:18 +0000 (21:33 +0200)]
soc: mediatek: mmsys: Use devm_platform_ioremap_resource()

For the common platform_get_resource()+devm_platform_ioremap() combination,
there is a helper, so use it and make the code a bit more compact.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20201006193320.405529-3-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc / drm: mediatek: Move DDP component defines into mtk-mmsys.h
Yongqiang Niu [Tue, 6 Oct 2020 19:33:17 +0000 (21:33 +0200)]
soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h

MMSYS is the driver which controls the routing of these DDP components,
so the definition of the mtk_ddp_comp_id enum should be placed in mtk-mmsys.h

Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20201006193320.405529-2-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: add mt6779 devapc driver
Neal Liu [Thu, 15 Oct 2020 03:20:39 +0000 (11:20 +0800)]
soc: mediatek: add mt6779 devapc driver

MediaTek bus fabric provides TrustZone security support and data
protection to prevent slaves from being accessed by unexpected
masters.
The security violation is logged and sent to the processor for
further analysis or countermeasures.

Any occurrence of security violation would raise an interrupt, and
it will be handled by mtk-devapc driver. The violation
information is printed in order to find the murderer.

Signed-off-by: Neal Liu <neal.liu@mediatek.com>
Link: https://lore.kernel.org/r/1602732039-12179-3-git-send-email-neal.liu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agodt-bindings: devapc: add bindings for mtk-devapc
Neal Liu [Thu, 15 Oct 2020 03:20:38 +0000 (11:20 +0800)]
dt-bindings: devapc: add bindings for mtk-devapc

Add bindings for mtk-devapc.

Signed-off-by: Neal Liu <neal.liu@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1602732039-12179-2-git-send-email-neal.liu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc / drm: mediatek: cmdq: Remove timeout handler in helper function
Chun-Kuang Hu [Mon, 2 Nov 2020 00:04:38 +0000 (08:04 +0800)]
soc / drm: mediatek: cmdq: Remove timeout handler in helper function

For each client driver, its timeout handler need to dump hardware register
or its state machine information, and their way to detect timeout are
also different, so remove timeout handler in helper function and
let client driver implement its own timeout handler.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/20201102000438.29225-1-chunkuang.hu@kernel.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agopcmcia: at91_cf: remove platform data support
Alexandre Belloni [Wed, 30 Sep 2020 18:48:03 +0000 (20:48 +0200)]
pcmcia: at91_cf: remove platform data support

Board file support has been removed for at91rm9200 back in 2014, make the
CF driver DT only.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200930184804.3127757-2-alexandre.belloni@bootlin.com
3 years agopcmcia: at91_cf: move definitions locally
Alexandre Belloni [Wed, 30 Sep 2020 18:48:02 +0000 (20:48 +0200)]
pcmcia: at91_cf: move definitions locally

struct at91_cf_data is only used in the driver since all the platforms moved
to device tree, move its definition locally.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200930184804.3127757-1-alexandre.belloni@bootlin.com
3 years agoMerge tag 'scmi-updates-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Arnd Bergmann [Fri, 27 Nov 2020 20:06:06 +0000 (21:06 +0100)]
Merge tag 'scmi-updates-5.11' of git://git./linux/kernel/git/sudeep.holla/linux into arm/drivers

ARM SCMI updates for v5.11

Two main additions this time:
1. Support for SCMI v3.0 sensor extensions
2. Support for voltage domain management protocol added newly to SCMI v3.0

* tag 'scmi-updates-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Remove residual _le structs naming
  firmware: arm_scmi: Add SCMI v3.0 sensor notifications
  firmware: arm_scmi: Add SCMI v3.0 sensor configuration support
  firmware: arm_scmi: Add SCMI v3.0 sensors timestamped reads
  hwmon: (scmi) Update hwmon internal scale data type
  firmware: arm_scmi: Add support to enumerated SCMI voltage domain device
  firmware: arm_scmi: Add voltage domain management protocol support
  dt-bindings: arm: Add support for SCMI Regulators
  firmware: arm_scmi: Add SCMI v3.0 sensors descriptors extensions
  firmware: arm_scmi: Add full list of sensor type enumeration
  firmware: arm_scmi: Rework scmi_sensors_protocol_init
  firmware: arm_scmi: Fix missing destroy_workqueue()

Link: https://lore.kernel.org/r/20201124122412.22386-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoBackmerge tag 'v5.10-rc2' into arm/drivers
Arnd Bergmann [Fri, 27 Nov 2020 20:04:53 +0000 (21:04 +0100)]
Backmerge tag 'v5.10-rc2' into arm/drivers

The SCMI pull request for the arm/drivers branch requires v5.10-rc2
because of dependencies with other git trees, so merge that in here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'tegra-for-5.11-firmware' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Fri, 27 Nov 2020 16:57:13 +0000 (17:57 +0100)]
Merge tag 'tegra-for-5.11-firmware' of git://git./linux/kernel/git/tegra/linux into arm/drivers

firmware: tegra: Changes for v5.11-rc1

Contains a single fix for a strncpy()/strncat() issue that some versions
of GCC are reporting.

* tag 'tegra-for-5.11-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: tegra: fix strncpy()/strncat() confusion

Link: https://lore.kernel.org/r/20201127144329.124891-3-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'tegra-for-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra...
Arnd Bergmann [Fri, 27 Nov 2020 16:56:09 +0000 (17:56 +0100)]
Merge tag 'tegra-for-5.11-soc' of git://git./linux/kernel/git/tegra/linux into arm/drivers

soc/tegra: Changes for v5.11-rc1

This contains a couple of warning fixes and a fix for a mostly harmless
bug in the process ID retrieval code.

* tag 'tegra-for-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: fuse: Fix index bug in get_process_id
  soc: tegra: fuse: speedo-tegra210: Remove a group of set but unused variables
  soc: tegra: fuse: speedo-tegra124: Remove some set but unused variables

Link: https://lore.kernel.org/r/20201127144329.124891-2-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'renesas-drivers-for-v5.11-tag2' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Fri, 27 Nov 2020 16:55:09 +0000 (17:55 +0100)]
Merge tag 'renesas-drivers-for-v5.11-tag2' of git://git./linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.11 (take two)

  - Stop using __raw_*() I/O accessors.

* tag 'renesas-drivers-for-v5.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: rmobile-sysc: Stop using __raw_*() I/O accessors

Link: https://lore.kernel.org/r/20201127132155.77418-4-geert@linux-m68k.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agosoc: renesas: rmobile-sysc: Stop using __raw_*() I/O accessors
Geert Uytterhoeven [Thu, 19 Nov 2020 12:52:14 +0000 (13:52 +0100)]
soc: renesas: rmobile-sysc: Stop using __raw_*() I/O accessors

There is no reason to keep on using the __raw_{read,write}l() I/O
accessors in Renesas ARM driver code.  Switch to using the plain
{read,write}l() I/O accessors, to have a chance that this works on
big-endian.

Suggested-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20201119125214.4065925-1-geert+renesas@glider.be
3 years agosoc: mediatek: pm-domains: Add support for mt8192
Weiyi Lu [Fri, 30 Oct 2020 11:36:22 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add support for mt8192

Add the needed board data to support mt8192 SoC.

Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: Weiyi Lu <weiyi.lu@mediatek.com>
Link: https://lore.kernel.org/r/20201030113622.201188-17-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add default power off flag
Weiyi Lu [Fri, 30 Oct 2020 11:36:21 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add default power off flag

For some power domain, like conn on MT8192, it should be default OFF.
Because the power on/off control relies the function of connectivity chip
and its firmware. And if project choose other chip vendor solution,
those necessary connectivity functions will not provided.

Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-16-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add support for mt8183
Matthias Brugger [Fri, 30 Oct 2020 11:36:17 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add support for mt8183

Add the needed board data to support mt8183 SoC.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-12-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Allow bus protection to ignore clear ack
Matthias Brugger [Fri, 30 Oct 2020 11:36:15 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Allow bus protection to ignore clear ack

In some cases the hardware does not create an acknowledgment of the
bus protection clearing. Add a flag to the bus protection indicating
that a clear event will be ignored.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-10-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add subsystem clocks
Matthias Brugger [Fri, 30 Oct 2020 11:36:14 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add subsystem clocks

For the bus protection operations, some subsystem clocks need to be enabled
before releasing the protection. This patch identifies the subsystem clocks
by it's name.

Suggested-by: Weiyi Lu <weiyi.lu@mediatek.com>
[Adapted the patch to the mtk-pm-domains driver]
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-9-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add extra sram control
Matthias Brugger [Fri, 30 Oct 2020 11:36:13 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add extra sram control

For some power domains like vpu_core on MT8183 whose sram need to do clock
and internal isolation while power on/off sram. We add a cap
"MTK_SCPD_SRAM_ISO" to judge if we need to do the extra sram isolation
control or not.

Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-8-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add SMI block as bus protection block
Matthias Brugger [Fri, 30 Oct 2020 11:36:12 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add SMI block as bus protection block

Apart from the infracfg block, the SMI block is used to enable the bus
protection for some power domains. Add support for this block.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-7-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm_domains: Make bus protection generic
Matthias Brugger [Fri, 30 Oct 2020 11:36:11 +0000 (12:36 +0100)]
soc: mediatek: pm_domains: Make bus protection generic

Bus protection is not exclusively done by calling the infracfg misc driver.
Make the calls for setting and clearing the bus protection generic so
that we can use other blocks for it as well.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-6-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add bus protection protocol
Matthias Brugger [Fri, 30 Oct 2020 11:36:10 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add bus protection protocol

Bus protection will need to update more then one register
in infracfg. Add support for several operations.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-5-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: Add MediaTek SCPSYS power domains
Enric Balletbo i Serra [Fri, 30 Oct 2020 11:36:08 +0000 (12:36 +0100)]
soc: mediatek: Add MediaTek SCPSYS power domains

The System Control Processor System (SCPSYS) has several power management
related tasks in the system. This driver implements support to handle
the different power domains supported in order to meet high performance
and low power requirements.

Co-developed-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-3-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agoMerge tag 'v5.10-next-pm-domains-stable' into HEAD
Matthias Brugger [Fri, 27 Nov 2020 11:04:34 +0000 (12:04 +0100)]
Merge tag 'v5.10-next-pm-domains-stable' into HEAD

3 years agoMerge tag 'ib-mfd-mediatek-v5.11' into HEAD
Matthias Brugger [Fri, 27 Nov 2020 11:04:26 +0000 (12:04 +0100)]
Merge tag 'ib-mfd-mediatek-v5.11' into HEAD

Immutable branch between MFD and MediaTek due for the v5.11 merge window

3 years agodt-bindings: power: Add MT8192 power domains
Weiyi Lu [Fri, 30 Oct 2020 11:36:20 +0000 (12:36 +0100)]
dt-bindings: power: Add MT8192 power domains

Add power domains dt-bindings for MT8192.

Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201030113622.201188-15-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agodt-bindings: power: Add MT8183 power domains
Enric Balletbo i Serra [Fri, 30 Oct 2020 11:36:16 +0000 (12:36 +0100)]
dt-bindings: power: Add MT8183 power domains

Add power domains dt-bindings for MT8183.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201030113622.201188-11-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agodt-bindings: power: Add bindings for the Mediatek SCPSYS power domains controller
Enric Balletbo i Serra [Fri, 30 Oct 2020 11:36:07 +0000 (12:36 +0100)]
dt-bindings: power: Add bindings for the Mediatek SCPSYS power domains controller

The System Control Processor System (SCPSYS) has several power management
related tasks in the system. Add the bindings to define the power
domains for the SCPSYS power controller.

Co-developed-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201030113622.201188-2-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agoMerge tag 'memory-controller-drv-tegra-5.11-2' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Thu, 26 Nov 2020 21:05:15 +0000 (22:05 +0100)]
Merge tag 'memory-controller-drv-tegra-5.11-2' of git://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.11 - Tegra SoC

There is a bigger work from Dmitry Osipenko around Tegra SoC memory
controller drivers, mostly towards adding interconnect support and
integration with devfreq.  This work touches all Tegra memory controller
drivers and also few other SoC-related parts.  It's not yet finished but
the intermediate stage seems ready to merge.

Beside that Tegra 210 memory controller got few fixes and received new
swgroups (work of Nicolin Chen).

* tag 'memory-controller-drv-tegra-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: (38 commits)
  memory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe
  memory: tegra: Complete tegra210_swgroups
  memory: tegra30-emc: Continue probing if timings are missing in device-tree
  memory: tegra30-emc: Make driver modular
  memory: tegra30: Add FIFO sizes to memory clients
  memory: tegra20-emc: Add devfreq support
  memory: tegra20-emc: Remove IRQ number from error message
  memory: tegra20-emc: Factor out clk initialization
  memory: tegra20-emc: Use dev_pm_opp_set_clkname()
  memory: tegra: Correct stub of devm_tegra_memory_controller_get()
  memory: tegra20: Support interconnect framework
  memory: tegra20-emc: Continue probing if timings are missing in device-tree
  memory: tegra20-emc: Make driver modular
  memory: tegra-mc: Add interconnect framework
  memory: tegra: Add missing latency allowness entry for Page Table Cache
  memory: tegra: Remove superfluous error messages around platform_get_irq()
  memory: tegra: Use devm_platform_ioremap_resource()
  memory: tegra: Add and use devm_tegra_memory_controller_get()
  dt-bindings: host1x: Document new interconnect properties
  dt-bindings: tegra30-actmon: Document OPP and interconnect properties
  ...

Link: https://lore.kernel.org/r/20201126191241.23302-1-krzk@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'memory-controller-drv-5.11' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Thu, 26 Nov 2020 21:03:19 +0000 (22:03 +0100)]
Merge tag 'memory-controller-drv-5.11' of git://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.11

1. jz4780_nemc: fix devm_ioremap() return value check leading to
   potential NULL pointer dereference.
2. mediatek: Convert bindings to dtschema and add support for mt8192.
3. pl353-smc: Fix compile test.

* tag 'memory-controller-drv-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: pl353-smc: fix compile test on !ARM_AMBA
  memory: mtk-smi: Add mt8192 support
  dt-bindings: memory: mediatek: Add mt8192 support
  dt-bindings: memory: mediatek: Convert SMI to DT schema
  MAINTAINERS: add dt binding headers to memory controller drivers entry
  memory: jz4780_nemc: Fix an error pointer vs NULL check in probe()

Link: https://lore.kernel.org/r/20201125184529.5392-1-krzk@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'soc-fsl-next-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/leo...
Arnd Bergmann [Thu, 26 Nov 2020 21:00:55 +0000 (22:00 +0100)]
Merge tag 'soc-fsl-next-v5.11' of git://git./linux/kernel/git/leo/linux into arm/drivers

NXP/FSL SoC driver updates for v5.11

- Add RCPM errata workaround for A-008646 on LS1021A
- Various W=1 warning fixes for fsl/soc drivers

* tag 'soc-fsl-next-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux:
  soc: fsl: handle RCPM errata A-008646 on SoC LS1021A
  soc: fsl: qbman: qman: Remove unused variable 'dequeue_wq'
  soc: fsl: qe: qe_common: Fix misnamed function attribute 'addr'
  soc: fsl: dpio: qbman-portal: Fix a bunch of kernel-doc misdemeanours

Link: https://lore.kernel.org/r/20201125165913.15441-1-leoyang.li@nxp.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agomemory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe
Nathan Chancellor [Thu, 19 Nov 2020 19:52:44 +0000 (12:52 -0700)]
memory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe

Clang warns:

  drivers/memory/tegra/tegra30-emc.c:1275:15: warning: variable 'np' is uninitialized when used here [-Wuninitialized]
                of_node_put(np);
                            ^~
  drivers/memory/tegra/tegra30-emc.c:1269:24: note: initialize the variable 'np' to silence this warning

There does not need to be an of_node_put call in this error handling
block after the shuffling of the np assignment. Remove it so there is
no use of uninitialized memory.

Fixes: 5e00fd90183a ("memory: tegra30-emc: Continue probing if timings are missing in device-tree")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201119195244.1517236-1-natechancellor@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Complete tegra210_swgroups
Nicolin Chen [Thu, 8 Oct 2020 00:37:46 +0000 (17:37 -0700)]
memory: tegra: Complete tegra210_swgroups

According to Tegra X1 TRM, there are missing swgroups in the
tegra210_swgroups list. So this patch adds them to the list.

Note that the TEGRA_SWGROUP_GPU (in list) should be actually
TEGRA_SWGROUP_GPUB (in TRM), yet TEGRA_SWGROUP_GPU (in TRM) is not being
used -- only TEGRA_SWGROUP_GPUB (in TRM) is. So this patch does not add
TEGRA_SWGROUP_GPU (in TRM) and keeps TEGRA_SWGROUP_GPU (in list)
as it is.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201008003746.25659-6-nicoleotsuka@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra30-emc: Continue probing if timings are missing in device-tree
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:38 +0000 (04:14 +0300)]
memory: tegra30-emc: Continue probing if timings are missing in device-tree

EMC driver will become mandatory after turning it into interconnect
provider because interconnect users, like display controller driver, will
fail to probe using newer device-trees that have interconnect properties.
Thus make EMC driver to probe even if timings are missing in device-tree.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-9-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra30-emc: Make driver modular
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:37 +0000 (04:14 +0300)]
memory: tegra30-emc: Make driver modular

Add modularization support to the Tegra30 EMC driver, which now can be
compiled as a loadable kernel module.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-8-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra30: Add FIFO sizes to memory clients
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:36 +0000 (04:14 +0300)]
memory: tegra30: Add FIFO sizes to memory clients

The latency allowness is calculated based on buffering capabilities of
memory clients. Add FIFO sizes to the Tegra30 memory clients.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-7-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Add devfreq support
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:34 +0000 (04:14 +0300)]
memory: tegra20-emc: Add devfreq support

Add devfreq support to the Tegra20 EMC driver. Memory utilization
statistics will be periodically polled from the memory controller and
appropriate minimum clock rate will be selected by the devfreq governor.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://lore.kernel.org/r/20201111011456.7875-5-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Remove IRQ number from error message
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:35 +0000 (04:14 +0300)]
memory: tegra20-emc: Remove IRQ number from error message

Remove IRQ number from error message since it doesn't add any useful
information, especially because this number is virtual.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-6-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Factor out clk initialization
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:33 +0000 (04:14 +0300)]
memory: tegra20-emc: Factor out clk initialization

Factor out clk initialization and make it resource-managed. This makes
easier to follow code and will help to make further changes cleaner.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-4-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Use dev_pm_opp_set_clkname()
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:32 +0000 (04:14 +0300)]
memory: tegra20-emc: Use dev_pm_opp_set_clkname()

The dev_pm_opp_get_opp_table() shouldn't be used by drivers, use
dev_pm_opp_set_clkname() instead.

Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-3-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Correct stub of devm_tegra_memory_controller_get()
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:31 +0000 (04:14 +0300)]
memory: tegra: Correct stub of devm_tegra_memory_controller_get()

Correct typo in a stub of devm_tegra_memory_controller_get() to fix a
non-ARM kernel compile-testing.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-2-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20: Support interconnect framework
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:11 +0000 (19:49 +0300)]
memory: tegra20: Support interconnect framework

Now Internal and External Memory Controllers are memory interconnection
providers. This allows us to use interconnect API for tuning of memory
configuration. EMC driver now supports OPPs and DVFS.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201104164923.21238-36-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Continue probing if timings are missing in device-tree
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:10 +0000 (19:49 +0300)]
memory: tegra20-emc: Continue probing if timings are missing in device-tree

EMC driver will become mandatory after turning it into interconnect
provider because interconnect users, like display controller driver, will
fail to probe using newer device-trees that have interconnect properties.
Thus make EMC driver to probe even if timings are missing in device-tree.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201104164923.21238-35-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Make driver modular
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:09 +0000 (19:49 +0300)]
memory: tegra20-emc: Make driver modular

Add modularization support to the Tegra20 EMC driver, which now can be
compiled as a loadable kernel module.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201104164923.21238-34-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra-mc: Add interconnect framework
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:08 +0000 (19:49 +0300)]
memory: tegra-mc: Add interconnect framework

Add common SoC-agnostic ICC framework which turns Tegra Memory Controller
into a memory interconnection provider. This allows us to use interconnect
API for tuning of memory configurations.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Nicolas Chauvet <kwizart@gmail.com>
Link: https://lore.kernel.org/r/20201104164923.21238-33-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Add missing latency allowness entry for Page Table Cache
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:07 +0000 (19:49 +0300)]
memory: tegra: Add missing latency allowness entry for Page Table Cache

Add missing PTC memory client latency allowness entry to the Tegra MC
drivers.

This prevents erroneous clearing of MC_INTSTATUS 0x0 register during
of the LA programming in tegra_mc_setup_latency_allowance() due to the
missing entry. Note that this patch doesn't fix any known problems.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201104164923.21238-32-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Remove superfluous error messages around platform_get_irq()
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:06 +0000 (19:49 +0300)]
memory: tegra: Remove superfluous error messages around platform_get_irq()

The platform_get_irq() prints error message telling that interrupt is
missing, hence there is no need to duplicated that message in the drivers.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201104164923.21238-31-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Use devm_platform_ioremap_resource()
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:05 +0000 (19:49 +0300)]
memory: tegra: Use devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() helper which makes code a bit
cleaner.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201104164923.21238-30-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agosoc: qcom: rpmhpd: Add SDX55 power domains
Vinod Koul [Thu, 26 Nov 2020 09:27:11 +0000 (14:57 +0530)]
soc: qcom: rpmhpd: Add SDX55 power domains

This adds the power domains found in SDX55 SoC. Downstream code tells me
that we have 3 power domains so add them

Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20201126092711.1084518-2-vkoul@kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agomemory: tegra: Add and use devm_tegra_memory_controller_get()
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:04 +0000 (19:49 +0300)]
memory: tegra: Add and use devm_tegra_memory_controller_get()

Multiple Tegra drivers need to retrieve Memory Controller and there is
duplication of the retrieval code among the drivers.

Add new devm_tegra_memory_controller_get() helper to remove the code's
duplication and to fix put_device() which was missed in the duplicated
code. Make EMC drivers to use the new helper.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201104164923.21238-29-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agodt-bindings: power: Add rpm power domain bindings for sdx55
Vinod Koul [Thu, 26 Nov 2020 09:27:10 +0000 (14:57 +0530)]
dt-bindings: power: Add rpm power domain bindings for sdx55

Add RPM power domain bindings for the SDX55 SoC

Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20201126092711.1084518-1-vkoul@kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agoMerge tag 'tegra-soc-clk-drivers-5.11' into for-v5.11/tegra-mc
Krzysztof Kozlowski [Thu, 26 Nov 2020 17:50:04 +0000 (18:50 +0100)]
Merge tag 'tegra-soc-clk-drivers-5.11' into for-v5.11/tegra-mc

Tegra SoC and clock controller changes for v5.11

Export symbols and add stubs necessary for upcoming modified Tegra
memory controller drivers (touching also devfreq and interconnect).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agosoc: qcom: rpmh: Use __fill_rpmh_msg API during rpmh_write()
Maulik Shah [Thu, 26 Nov 2020 08:31:30 +0000 (14:01 +0530)]
soc: qcom: rpmh: Use __fill_rpmh_msg API during rpmh_write()

Use __fill_rpmh_msg API during rpmh_write(). This allows to
remove duplication of code in error checking, copying commands
and setting message state.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://lore.kernel.org/r/1606379490-4052-1-git-send-email-mkshah@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosamples: qmi: Constify static qmi ops
Rikard Falkeborn [Tue, 24 Nov 2020 21:29:54 +0000 (22:29 +0100)]
samples: qmi: Constify static qmi ops

The only usage of qmi_sample_handlers[] and lookup_ops is to pass their
addresses to qmi_handle_init() which accepts const pointers to both
qmi_ops and qmi_msg_handler. Make them const to allow the compiler to
put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20201124212954.17750-1-rikard.falkeborn@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosoc: sunxi: Fix compilation of sunxi_mbus
Maxime Ripard [Tue, 24 Nov 2020 10:35:46 +0000 (11:35 +0100)]
soc: sunxi: Fix compilation of sunxi_mbus

dma_direct_set_offset has been moved from dma-mapping.h to
dma-map-ops.h, but our driver hasn't been updated resulting in a build
breakage. Let's change the header to fix the build.

Fixes: 16fee29b0735 ("dma-mapping: remove the dma_direct_set_offset export")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20201124103546.839711-1-maxime@cerno.tech'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agosoc: fsl: handle RCPM errata A-008646 on SoC LS1021A
Biwen Li [Mon, 2 Nov 2020 07:26:50 +0000 (15:26 +0800)]
soc: fsl: handle RCPM errata A-008646 on SoC LS1021A

Hardware issue:
- Reading register RCPM_IPPDEXPCR1 always return zero, this causes
  system firmware could not get correct information and wrongly do
  clock gating for all wakeup source IP during system suspend. Then
  those IPs will never get chance to wake system.

Workaround:
- Copy register RCPM_IPPDEXPCR1's setting to register SCFG_SPARECR8
  to allow system firmware's psci method read it and do things accordingly.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
3 years agosoc: fsl: qbman: qman: Remove unused variable 'dequeue_wq'
Lee Jones [Tue, 3 Nov 2020 15:28:38 +0000 (15:28 +0000)]
soc: fsl: qbman: qman: Remove unused variable 'dequeue_wq'

Fixes the following W=1 kernel build warning(s):

 drivers/soc/fsl/qbman/qman.c: In function â€˜qman_shutdown_fq’:
 drivers/soc/fsl/qbman/qman.c:2700:8: warning: variable â€˜dequeue_wq’ set but not used [-Wunused-but-set-variable]

Cc: Li Yang <leoyang.li@nxp.com>
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
3 years agosoc: fsl: qe: qe_common: Fix misnamed function attribute 'addr'
Lee Jones [Tue, 3 Nov 2020 15:28:24 +0000 (15:28 +0000)]
soc: fsl: qe: qe_common: Fix misnamed function attribute 'addr'

Fixes the following W=1 kernel build warning(s):

 drivers/soc/fsl/qe/qe_common.c:237: warning: Function parameter or member 'addr' not described in 'cpm_muram_dma'
 drivers/soc/fsl/qe/qe_common.c:237: warning: Excess function parameter 'offset' description in 'cpm_muram_dma'

Cc: Qiang Zhao <qiang.zhao@nxp.com>
Cc: Li Yang <leoyang.li@nxp.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: act <dmalek@jlc.net>
Cc: Dan Malek <dan@embeddedalley.com>
Cc: "Software, Inc" <source@mvista.com>
Cc: Vitaly Bordug <vbordug@ru.mvista.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
3 years agosoc: fsl: dpio: qbman-portal: Fix a bunch of kernel-doc misdemeanours
Lee Jones [Tue, 3 Nov 2020 15:28:17 +0000 (15:28 +0000)]
soc: fsl: dpio: qbman-portal: Fix a bunch of kernel-doc misdemeanours

Fixes the following W=1 kernel build warning(s):

 drivers/soc/fsl/dpio/qbman-portal.c:430: warning: Function parameter or member 'inhibit' not described in 'qbman_swp_interrupt_set_inhibit'
 drivers/soc/fsl/dpio/qbman-portal.c:430: warning: Excess function parameter 'mask' description in 'qbman_swp_interrupt_set_inhibit'
 drivers/soc/fsl/dpio/qbman-portal.c:518: warning: Function parameter or member 'd' not described in 'qbman_eq_desc_clear'
 drivers/soc/fsl/dpio/qbman-portal.c:529: warning: Function parameter or member 'respond_success' not described in 'qbman_eq_desc_set_no_orp'
 drivers/soc/fsl/dpio/qbman-portal.c:529: warning: Excess function parameter 'response_success' description in 'qbman_eq_desc_set_no_orp'
 drivers/soc/fsl/dpio/qbman-portal.c:941: warning: Function parameter or member 's' not described in 'qbman_swp_push_get'
 drivers/soc/fsl/dpio/qbman-portal.c:941: warning: Excess function parameter 'p' description in 'qbman_swp_push_get'
 drivers/soc/fsl/dpio/qbman-portal.c:955: warning: Function parameter or member 's' not described in 'qbman_swp_push_set'
 drivers/soc/fsl/dpio/qbman-portal.c:955: warning: Excess function parameter 'p' description in 'qbman_swp_push_set'
 drivers/soc/fsl/dpio/qbman-portal.c:1052: warning: Function parameter or member 'd' not described in 'qbman_pull_desc_set_fq'
 drivers/soc/fsl/dpio/qbman-portal.c:1065: warning: Function parameter or member 'd' not described in 'qbman_pull_desc_set_wq'
 drivers/soc/fsl/dpio/qbman-portal.c:1079: warning: Function parameter or member 'd' not described in 'qbman_pull_desc_set_channel'
 drivers/soc/fsl/dpio/qbman-portal.c:1403: warning: Function parameter or member 'd' not described in 'qbman_release_desc_clear'
 drivers/soc/fsl/dpio/qbman-portal.c:1412: warning: Function parameter or member 'd' not described in 'qbman_release_desc_set_bpid'
 drivers/soc/fsl/dpio/qbman-portal.c:1412: warning: Function parameter or member 'bpid' not described in 'qbman_release_desc_set_bpid'
 drivers/soc/fsl/dpio/qbman-portal.c:1421: warning: Function parameter or member 'd' not described in 'qbman_release_desc_set_rcdi'
 drivers/soc/fsl/dpio/qbman-portal.c:1421: warning: Function parameter or member 'enable' not described in 'qbman_release_desc_set_rcdi'

Cc: Roy Pledge <Roy.Pledge@nxp.com>
Cc: Li Yang <leoyang.li@nxp.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
3 years agoMerge tag 'samsung-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 23 Nov 2020 20:44:35 +0000 (21:44 +0100)]
Merge tag 'samsung-drivers-5.11' of git://git./linux/kernel/git/krzk/linux into arm/drivers

Samsung SoC drivers changes for v5.11

1. Limit the big.LITTLE cpuidle driver to Peach-Pit/Pi Chromebooks only
   because these are the only platforms were the driver works properly.
2. Convert the Exynos CLKOUT driver to a full module which solves
   boot-probe ordering issues (e.g. if device nodes in DTS are moved).
   This also brings modularization and compile testing.
3. Few minor cleanups in documentation and code.

* tag 'samsung-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  clk: samsung: allow building the clkout driver as module
  soc: samsung: s3c-pm-check: Fix incorrectly named variable 'val'
  soc: samsung: exynos5422-asv: remove unneeded semicolon
  serial: s3c: Update path of Samsung S3C machine file
  Documentation: Update paths of Samsung S3C machine files
  clk: samsung: exynos-clkout: convert to module driver
  soc: samsung: exynos-pmu: instantiate clkout driver as MFD
  cpuidle: big.LITTLE: enable driver only on Peach-Pit/Pi Chromebooks

Link: https://lore.kernel.org/r/20201113162211.10020-1-krzk@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'scmi-voltage-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Sudeep Holla [Mon, 23 Nov 2020 16:37:27 +0000 (16:37 +0000)]
Merge tag 'scmi-voltage-5.11' of git://git./linux/kernel/git/sudeep.holla/linux into for-next/scmi

SCMI voltage domain management protocol support for v5.11

SCMI v3.0 voltage domain protocol support to discover the voltage levels
supported by the domains and to set/get the configuration and voltage
level of any given domain.

* tag 'scmi-voltage-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Add support to enumerated SCMI voltage domain device
  firmware: arm_scmi: Add voltage domain management protocol support
  dt-bindings: arm: Add support for SCMI Regulators

3 years agofirmware: arm_scmi: Remove residual _le structs naming
Cristian Marussi [Mon, 23 Nov 2020 16:20:08 +0000 (16:20 +0000)]
firmware: arm_scmi: Remove residual _le structs naming

For sake of consistency, remove any residual naming based on _le
suffixes in SCMI sensors protocol, since little endianness is already
assumed across all of SCMI implementation and, as such, all currently
existent names do not explicitly state their endianness.

No functional change.

Link: https://lore.kernel.org/r/20201123162008.35814-1-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agoMerge tag 'sunxi-rework-mbus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 23 Nov 2020 16:20:46 +0000 (17:20 +0100)]
Merge tag 'sunxi-rework-mbus' of ssh://gitolite./linux/kernel/git/mripard/linux into arm/drivers

Allwinner MBUS and DMA-ops rework

The Allwinner SoCs have a number of high-bandwidth devices connected to
a memory bus with a different RAM mapping than the CPU.

This was addressed before through drivers setting the DMA offsets
directly, and subsequently changed to calls to dma_direct_set_offset.
However that wasn't really meant to be exported to modules (and thus
drivers). The duplicated code also led to small inconsistencies across
drivers in how we dealt with DT backward compatibility.

Move all that DMA setup code into a platform bus notifier to share that
code and remove the export on dma_direct_set_offset.

* tag 'sunxi-rework-mbus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  dma-mapping: remove the dma_direct_set_offset export
  media: sun8i-di: Remove the call to of_dma_configure
  media: cedrus: Remove the MBUS quirks
  media: sun6i: Remove the MBUS quirks
  media: sun4i: Remove the MBUS quirks
  drm/sun4i: backend: Remove the MBUS quirks
  soc: sunxi: Deal with the MBUS DMA offsets in a central place
  drm/sun4i: backend: Fix probe failure with multiple backends

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'renesas-drivers-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Mon, 23 Nov 2020 16:18:16 +0000 (17:18 +0100)]
Merge tag 'renesas-drivers-for-v5.11-tag1' of git://git./linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.11

  - Fix a mapping leak in the failure path of the R-Mobile System
    Controller driver.

* tag 'renesas-drivers-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains()

Link: https://lore.kernel.org/r/20201113150854.3923885-4-geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agosoc: qcom: pdr: Constify static qmi structs
Rikard Falkeborn [Sun, 22 Nov 2020 23:28:18 +0000 (00:28 +0100)]
soc: qcom: pdr: Constify static qmi structs

Their only usage is to pass their address to qmi_handle_init() which
accepts const pointers to both qmi_ops and qmi_msg_handler. Make them
const to allow the compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20201122232818.32072-1-rikard.falkeborn@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agofirmware: arm_scmi: Add SCMI v3.0 sensor notifications
Cristian Marussi [Thu, 19 Nov 2020 17:49:06 +0000 (17:49 +0000)]
firmware: arm_scmi: Add SCMI v3.0 sensor notifications

Add support for new SCMI v3.0 SENSOR_UPDATE notification.

Link: https://lore.kernel.org/r/20201119174906.43862-7-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Add SCMI v3.0 sensor configuration support
Cristian Marussi [Thu, 19 Nov 2020 17:49:05 +0000 (17:49 +0000)]
firmware: arm_scmi: Add SCMI v3.0 sensor configuration support

Add SCMI v3.0 sensor support for CONFIG_GET/CONFIG_SET commands.

Link: https://lore.kernel.org/r/20201119174906.43862-6-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Add SCMI v3.0 sensors timestamped reads
Cristian Marussi [Thu, 19 Nov 2020 17:49:04 +0000 (17:49 +0000)]
firmware: arm_scmi: Add SCMI v3.0 sensors timestamped reads

Add new .reading_get_timestamped() method to sensor_ops to support SCMI v3.0
timestamped reads.

Link: https://lore.kernel.org/r/20201119174906.43862-5-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agohwmon: (scmi) Update hwmon internal scale data type
Cristian Marussi [Thu, 19 Nov 2020 17:49:03 +0000 (17:49 +0000)]
hwmon: (scmi) Update hwmon internal scale data type

Use an int to calculate scale values inside scmi_hwmon_scale() to match
the updated scale data type in struct scmi_sensor_info.

Link: https://lore.kernel.org/r/20201119174906.43862-4-cristian.marussi@arm.com
Cc: linux-hwmon@vger.kernel.org
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agosoc: qcom: initialize local variable
Tom Rix [Wed, 19 Aug 2020 18:46:37 +0000 (11:46 -0700)]
soc: qcom: initialize local variable

clang static analysis reports this problem

pdr_interface.c:596:6: warning: Branch condition evaluates
  to a garbage value
        if (!req.service_path[0])
            ^~~~~~~~~~~~~~~~~~~~

This check that req.service_path was set in an earlier loop.
However req is a stack variable and its initial value
is undefined.

So initialize req to 0.

Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")
Reviewed-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20200819184637.15648-1-trix@redhat.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosoc: qcom: socinfo: add soc ids for msm8953 variants
Vladimir Lypak [Sun, 4 Oct 2020 08:22:24 +0000 (11:22 +0300)]
soc: qcom: socinfo: add soc ids for msm8953 variants

Add SoC IDs for MSM8953, APQ8053, SDM(SDA)450, SDM(SDA)632.

Signed-off-by: Vladimir Lypak <junak.pub@gmail.com>
Link: https://lore.kernel.org/r/20201004082223.324019-1-junak.pub@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosoc: qcom: geni: Remove "iova" check
Roja Rani Yarubandi [Fri, 30 Oct 2020 14:59:57 +0000 (20:29 +0530)]
soc: qcom: geni: Remove "iova" check

Remove "iova" check from geni_se_tx_dma_unprep and geni_se_rx_dma_unprep
functions as checking with dma_mapping_error() is enough.

Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>
Link: https://lore.kernel.org/r/20201030145959.505-2-rojay@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agofirmware: arm_scmi: Add support to enumerated SCMI voltage domain device
Cristian Marussi [Thu, 19 Nov 2020 19:10:48 +0000 (19:10 +0000)]
firmware: arm_scmi: Add support to enumerated SCMI voltage domain device

Add SCMI voltage domain device name to the core list of supported protocol
devices so that it can be enumerated if the firmware supports it.

Link: https://lore.kernel.org/r/20201119191051.46363-3-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Add voltage domain management protocol support
Cristian Marussi [Thu, 19 Nov 2020 19:10:47 +0000 (19:10 +0000)]
firmware: arm_scmi: Add voltage domain management protocol support

SCMI v3.0 introduces voltage domain protocol which provides commands to:
 - Discover the voltage levels supported by a domain
 - Get the configuration and voltage level of a domain
 - Set the configuration and voltage level of a domain

Let us add support for the same.

Link: https://lore.kernel.org/r/20201119191051.46363-2-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agodt-bindings: arm: Add support for SCMI Regulators
Cristian Marussi [Thu, 19 Nov 2020 19:10:50 +0000 (19:10 +0000)]
dt-bindings: arm: Add support for SCMI Regulators

Add devicetree bindings to support regulators based on SCMI Voltage
Domain Protocol.

Link: https://lore.kernel.org/r/20201119191051.46363-5-cristian.marussi@arm.com
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Add SCMI v3.0 sensors descriptors extensions
Cristian Marussi [Thu, 19 Nov 2020 17:49:02 +0000 (17:49 +0000)]
firmware: arm_scmi: Add SCMI v3.0 sensors descriptors extensions

Add support for new SCMI v3.0 Sensors extensions related to new sensors'
features, like multiple axis and update intervals, while keeping
compatibility with SCMI v2.0 features.

While at that, refactor and simplify all the internal helpers macros and
move struct scmi_sensor_info to use only non-fixed-size typing.

Link: https://lore.kernel.org/r/20201119174906.43862-3-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Add full list of sensor type enumeration
Sudeep Holla [Fri, 20 Nov 2020 10:55:17 +0000 (10:55 +0000)]
firmware: arm_scmi: Add full list of sensor type enumeration

SCMI v2.0 provides a big list of sensor type enumeration from the
sensorUnits enumeration table of Distributed Management Task Force(DMTF)
specification number DSP 0248 (Platform Level Data Model for Platform
Monitoring and Control Specification). It is however not an exact
replica of the sensorUnits enumeration table.

Let us just update the table as per SCMI v2.0 specification.

Link: https://lore.kernel.org/r/20201119174906.43862-3-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Rework scmi_sensors_protocol_init
Cristian Marussi [Thu, 19 Nov 2020 17:49:01 +0000 (17:49 +0000)]
firmware: arm_scmi: Rework scmi_sensors_protocol_init

Properly handle return values from initialization helpers and avoid
setting sensor_ops before sensor_priv.

Link: https://lore.kernel.org/r/20201119174906.43862-2-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agosoc: qcom: llcc: Add configuration data for SM8150
Souradeep Chowdhury [Wed, 30 Sep 2020 08:14:13 +0000 (13:44 +0530)]
soc: qcom: llcc: Add configuration data for SM8150

Add LLCC configuration data for SM8150 SoC which controls
LLCC behaviour.

Signed-off-by: Souradeep Chowdhury <schowdhu@codeaurora.org>
Link: https://lore.kernel.org/r/957e3ae50c75720ef6227529d5ce3d4b457802e9.1601452132.git.schowdhu@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agodt-bindings: msm: Add LLCC for SM8150
Souradeep Chowdhury [Wed, 30 Sep 2020 08:14:12 +0000 (13:44 +0530)]
dt-bindings: msm: Add LLCC for SM8150

Add LLCC compatible for SM8150 SoC.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Souradeep Chowdhury <schowdhu@codeaurora.org>
Link: https://lore.kernel.org/r/141e7cf03932859243edec83451c04c655ba640b.1601452132.git.schowdhu@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosoc: aspeed: Enable drivers with ARCH_ASPEED
Joel Stanley [Thu, 19 Nov 2020 12:17:04 +0000 (22:47 +1030)]
soc: aspeed: Enable drivers with ARCH_ASPEED

Default the drivers to on as most configurations will use them.

Signed-off-by: Joel Stanley <joel@jms.id.au>
3 years agosoc: aspeed: Fix a reference leak in aspeed_socinfo_init()
Dan Carpenter [Fri, 13 Nov 2020 10:08:50 +0000 (13:08 +0300)]
soc: aspeed: Fix a reference leak in aspeed_socinfo_init()

This needs to call of_node_put(np) before returning if of_iomap() fails.

Fixes: e0218dca5787 ("soc: aspeed: Add soc info driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20201113100850.GA168908@mwanda
Signed-off-by: Joel Stanley <joel@jms.id.au>
3 years agosoc: aspeed: remove unneeded semicolon
Tom Rix [Sun, 1 Nov 2020 15:06:22 +0000 (07:06 -0800)]
soc: aspeed: remove unneeded semicolon

A semicolon is not needed after a switch statement.

Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20201101150622.2288203-1-trix@redhat.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
3 years agosoc/tegra: fuse: Fix index bug in get_process_id
Nicolin Chen [Thu, 19 Nov 2020 04:44:57 +0000 (20:44 -0800)]
soc/tegra: fuse: Fix index bug in get_process_id

This patch simply fixes a bug of referencing speedos[num] in every
for-loop iteration in get_process_id function.

Fixes: 0dc5a0d83675 ("soc/tegra: fuse: Add Tegra210 support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agomfd: syscon: Add syscon_regmap_lookup_by_phandle_optional() function.
Enric Balletbo i Serra [Tue, 10 Nov 2020 16:13:37 +0000 (17:13 +0100)]
mfd: syscon: Add syscon_regmap_lookup_by_phandle_optional() function.

This adds syscon_regmap_lookup_by_phandle_optional() function to get an
optional regmap.

It behaves the same as syscon_regmap_lookup_by_phandle() except where
there is no regmap phandle. In this case, instead of returning -ENODEV,
the function returns NULL. This makes error checking simpler when the
regmap phandle is optional.

Suggested-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomemory: pl353-smc: fix compile test on !ARM_AMBA
Krzysztof Kozlowski [Thu, 29 Oct 2020 19:33:57 +0000 (20:33 +0100)]
memory: pl353-smc: fix compile test on !ARM_AMBA

The pl353-smc driver uses module_amba_driver so it has a build
dependency on CONFIG_ARM_AMBA:

    /usr/bin/arm-linux-gnueabi-ld: drivers/memory/pl353-smc.o: in function `pl353_smc_driver_init':
    pl353-smc.c:(.init.text+0x10): undefined reference to `amba_driver_register'

However it still can be compile tested on platforms other than ARM,
which in practice is limited to those selecting ARM_AMBA (so only
ARM64).

Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/20201029193357.389593-1-krzk@kernel.org
3 years agodma-mapping: remove the dma_direct_set_offset export
Christoph Hellwig [Fri, 6 Nov 2020 16:02:17 +0000 (17:02 +0100)]
dma-mapping: remove the dma_direct_set_offset export

Drop the dma_direct_set_offset export and move the declaration to
dma-map-ops.h now that the Allwinner drivers have stopped calling it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
3 years agomedia: sun8i-di: Remove the call to of_dma_configure
Maxime Ripard [Fri, 6 Nov 2020 14:58:50 +0000 (15:58 +0100)]
media: sun8i-di: Remove the call to of_dma_configure

of_dma_configure is called by the core before probe gets called so this
is redundant.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
3 years agomedia: cedrus: Remove the MBUS quirks
Maxime Ripard [Fri, 6 Nov 2020 14:55:05 +0000 (15:55 +0100)]
media: cedrus: Remove the MBUS quirks

Now that the MBUS quirks are applied by our global notifier, we can
remove them from Cedrus. Since the only quirk was whether or not we had
to apply that DMA quirk, we can also remove the quirks infrastructure.

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
3 years agomedia: sun6i: Remove the MBUS quirks
Maxime Ripard [Fri, 6 Nov 2020 14:55:05 +0000 (15:55 +0100)]
media: sun6i: Remove the MBUS quirks

Now that the MBUS quirks are applied by our global notifier, we can
remove them from our CSI driver for the A31.

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
3 years agomedia: sun4i: Remove the MBUS quirks
Maxime Ripard [Fri, 6 Nov 2020 14:55:05 +0000 (15:55 +0100)]
media: sun4i: Remove the MBUS quirks

Now that the MBUS quirks are applied by our global notifier, we can
remove them from our CSI driver for the A10.

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
3 years agodrm/sun4i: backend: Remove the MBUS quirks
Maxime Ripard [Fri, 6 Nov 2020 14:55:05 +0000 (15:55 +0100)]
drm/sun4i: backend: Remove the MBUS quirks

Now that the MBUS quirks are applied by our global notifier, we can
remove them from our DRM driver.

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
3 years agosoc: sunxi: Deal with the MBUS DMA offsets in a central place
Maxime Ripard [Fri, 6 Nov 2020 14:52:30 +0000 (15:52 +0100)]
soc: sunxi: Deal with the MBUS DMA offsets in a central place

So far most of the drivers with the MBUS quirks had to duplicate the
code to deal with DT compatibility and enforcing the DMA offsets.

Let's move for a more maintainable solution by putting everything in a
notifier that would take care of setting up the DMA offsets for all the
MBUS devices.

Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
3 years agodrm/sun4i: backend: Fix probe failure with multiple backends
Maxime Ripard [Fri, 6 Nov 2020 14:22:31 +0000 (15:22 +0100)]
drm/sun4i: backend: Fix probe failure with multiple backends

Commit e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting
dma_pfn_offset") introduced a regression in our code since the second
backed to probe will now get -EINVAL back from dma_direct_set_offset and
will prevent the entire DRM device from probing.

Ignore -EINVAL as a temporary measure to get it back working, before
removing that call entirely.

Fixes: e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>