platform/kernel/linux-starfive.git
5 years agobus: imx-weim: remove incorrect __init annotations
Arnd Bergmann [Wed, 4 Sep 2019 13:19:56 +0000 (15:19 +0200)]
bus: imx-weim: remove incorrect __init annotations

The probe function is no longer __init, so anything it calls now
must also be available at runtime, as Kbuild points out when building
with clang-9:

WARNING: vmlinux.o(.text+0x6e7040): Section mismatch in reference from the function weim_probe() to the function .init.text:imx_weim_gpr_setup()
The function weim_probe() references
the function __init imx_weim_gpr_setup().
This is often because weim_probe lacks a __init
annotation or the annotation of imx_weim_gpr_setup is wrong.

WARNING: vmlinux.o(.text+0x6e70f0): Section mismatch in reference from the function weim_probe() to the function .init.text:weim_timing_setup()
The function weim_probe() references
the function __init weim_timing_setup().
This is often because weim_probe lacks a __init
annotation or the annotation of weim_timing_setup is wrong.

Remove the remaining __init markings that are now wrong.

Fixes: 4a92f07816ba ("bus: imx-weim: use module_platform_driver()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agofbdev: remove w90x900/nuc900 platform drivers
Arnd Bergmann [Fri, 9 Aug 2019 20:27:37 +0000 (22:27 +0200)]
fbdev: remove w90x900/nuc900 platform drivers

The ARM w90x900 platform is getting removed, so this driver is obsolete.

Link: https://lore.kernel.org/r/20190809202749.742267-10-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agospi: remove w90x900 driver
Arnd Bergmann [Fri, 9 Aug 2019 20:27:35 +0000 (22:27 +0200)]
spi: remove w90x900 driver

The ARM w90x900 platform is getting removed, so this driver is obsolete.

Link: https://lore.kernel.org/r/20190809202749.742267-8-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agonet: remove w90p910-ether driver
Arnd Bergmann [Fri, 9 Aug 2019 20:27:41 +0000 (22:27 +0200)]
net: remove w90p910-ether driver

The ARM w90x900 platform is getting removed, so this driver is obsolete.

Link: https://lore.kernel.org/r/20190809202749.742267-14-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agonet: remove ks8695 driver
Arnd Bergmann [Fri, 9 Aug 2019 20:27:33 +0000 (22:27 +0200)]
net: remove ks8695 driver

The platform is getting removed, so there are no remaining
users of this driver.

Link: https://lore.kernel.org/r/20190809202749.742267-6-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agofirmware: turris-mox-rwtm: Add sysfs documentation
Marek Behún [Thu, 22 Aug 2019 01:43:18 +0000 (03:43 +0200)]
firmware: turris-mox-rwtm: Add sysfs documentation

Add sysfs ABI documentation for the sysfs files created by the
turris-mox-rwtm driver.

Link: https://lore.kernel.org/r/20190822014318.19478-4-marek.behun@nic.cz
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agofirmware: Add Turris Mox rWTM firmware driver
Marek Behún [Thu, 22 Aug 2019 01:43:17 +0000 (03:43 +0200)]
firmware: Add Turris Mox rWTM firmware driver

This adds a driver to communicate with the firmware running on the
secure processor of the Turris Mox router, enabling the kernel to
retrieve true random numbers from the Entropy Bit Generator and to read
some information burned into eFuses when device was manufactured:

and to
sign messages with the ECDSA private key burned into each Turris Mox
device when manufacturing.

This also adds support to read other information burned into eFuses:
 - serial number
 - board version
 - MAC addresses
 - RAM size
 - ECDSA public key (this is not read directly from eFuses, rather it
   is computed by the firmware as pair to the burned private key)

The source code of the firmware is open source and can be found at
https://gitlab.labs.nic.cz/turris/mox-boot-builder/tree/master/wtmi

The firmware is also able to, on demand, sign messages with the burned
ECDSA private key, but since Linux's akcipher API is not yet stable
(and therefore not exposed to userspace via netlink), this functionality
is not supported yet.

Link: https://lore.kernel.org/r/20190822014318.19478-3-marek.behun@nic.cz
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agodt-bindings: firmware: Document cznic,turris-mox-rwtm binding
Marek Behún [Thu, 22 Aug 2019 01:43:16 +0000 (03:43 +0200)]
dt-bindings: firmware: Document cznic,turris-mox-rwtm binding

This adds device tree binding documentation for the driver communicating
with the rWTM firmware on Turris Mox.

Link: https://lore.kernel.org/r/20190822014318.19478-2-marek.behun@nic.cz
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agobus: moxtet: fix unsigned comparison to less than zero
Colin Ian King [Thu, 22 Aug 2019 01:03:50 +0000 (03:03 +0200)]
bus: moxtet: fix unsigned comparison to less than zero

Currently the size_t variable res is being checked for
an error failure however the unsigned variable is never
less than zero so this test is always false. Fix this by
making variable res ssize_t

Link: https://lore.kernel.org/r/20190822010351.15660-2-marek.behun@nic.cz
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 5bc7f990cd98 ("bus: Add support for Moxtet bus")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agobus: moxtet: remove set but not used variable 'dummy'
Jason Yan [Thu, 22 Aug 2019 01:03:51 +0000 (03:03 +0200)]
bus: moxtet: remove set but not used variable 'dummy'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/bus/moxtet.c: In function moxtet_remove:
drivers/bus/moxtet.c:822:6: warning: variable dummy set but not used
[-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20190822010351.15660-3-marek.behun@nic.cz
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'davinci-for-v5.4/fbdev' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Wed, 4 Sep 2019 14:55:52 +0000 (16:55 +0200)]
Merge tag 'davinci-for-v5.4/fbdev' of git://git./linux/kernel/git/nsekhar/linux-davinci into arm/drivers

This converts the da8xx fbdev driver to use GPIO backlight device
and regulator devices. This will finally help get rid of legacy
GPIO API calls and simplify DaVinci GPIO driver.

* tag 'davinci-for-v5.4/fbdev' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  fbdev: da8xx: use resource management for dma
  fbdev: da8xx-fb: drop a redundant if
  fbdev: da8xx-fb: use devm_platform_ioremap_resource()
  fbdev: da8xx: remove panel_power_ctrl() callback from platform data
  ARM: davinci: da850-evm: switch to using a fixed regulator for lcdc
  fbdev: da8xx: add support for a regulator
  ARM: davinci: da850-evm: model the backlight GPIO as an actual device

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'imx-drivers-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Arnd Bergmann [Tue, 3 Sep 2019 20:44:04 +0000 (22:44 +0200)]
Merge tag 'imx-drivers-5.4' of git://git./linux/kernel/git/shawnguo/linux into arm/drivers

i.MX drivers update for 5.4:
 - A series from Anson Huang to add UID support for i.MX8 SoC and SCU
   drivers.
 - A series from Daniel Baluta to add DSP IPC driver for communication
   between host AP (Linux) and the firmware running on DSP embedded in
   i.MX8 SoCs.
 - A small fix for GPCv2 error code printing.
 - Switch from module_platform_driver_probe() to module_platform_driver()
   for imx-weim driver, as we need the driver to probe again when device
   is present later.
 - Add optional burst clock mode support for imx-weim driver.

* tag 'imx-drivers-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  soc: imx: gpcv2: Print the correct error code
  bus: imx-weim: use module_platform_driver()
  firmware: imx: Add DSP IPC protocol interface
  soc: imx-scu: Add SoC UID(unique identifier) support
  bus: imx-weim: optionally enable burst clock mode
  firmware: imx: scu-pd: Add IRQSTR_DSP PD range
  firmware: imx: scu-pd: Add mu13 b side PD range
  firmware: imx: scu-pd: Rename mu PD range to mu_a
  soc: imx8: Add i.MX8MM UID(unique identifier) support
  soc: imx8: Add i.MX8MQ UID(unique identifier) support

Link: https://lore.kernel.org/r/20190825153237.28829-1-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'amlogic-drivers-2.1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 3 Sep 2019 20:28:24 +0000 (22:28 +0200)]
Merge tag 'amlogic-drivers-2.1' of git://git./linux/kernel/git/khilman/linux-amlogic into arm/drivers

soc: amlogic: updates for v5.4 (round 2)
- add power domain controller

* tag 'amlogic-drivers-2.1' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  dt-bindings: power: add Amlogic Everything-Else power domains bindings
  soc: amlogic: Add support for Everything-Else power domains controller

Link: https://patchwork.kernel.org/patch/11122205/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'v5.3-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias...
Arnd Bergmann [Tue, 3 Sep 2019 20:18:34 +0000 (22:18 +0200)]
Merge tag 'v5.3-next-soc' of git://git./linux/kernel/git/matthias.bgg/linux into arm/drivers

cmdq helper:
reoder function parameter and change size of the parameters

* tag 'v5.3-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  soc: mediatek: cmdq: change the type of input parameter
  soc: mediatek: cmdq: reorder the parameter

Link: https://lore.kernel.org/r/8c860e37-3816-d75f-fc37-ce496905ba73@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'sunxi-drivers-for-5.4-2' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 3 Sep 2019 20:16:34 +0000 (22:16 +0200)]
Merge tag 'sunxi-drivers-for-5.4-2' of git://git./linux/kernel/git/sunxi/linux into arm/drivers

Allwinner drivers patches for 5.4

One driver to remove a redundant error message in the Allwinner RSB
driver.

* tag 'sunxi-drivers-for-5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  bus: sunxi-rsb: Remove dev_err() usage after platform_get_irq()

Link: https://lore.kernel.org/r/f9edfc8e-19b7-4b6e-897a-35f3bdcc8643.lettre@localhost
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman...
Arnd Bergmann [Tue, 3 Sep 2019 20:10:08 +0000 (22:10 +0200)]
Merge tag 'amlogic-drivers' of git://git./linux/kernel/git/khilman/linux-amlogic into arm/drivers

soc: amlogic: driver updates for v5.4

Highlights
- clk-measure: support new S905X3 and A311D SoCs
- socinfo: support new S905X3 and A311D SoCs

* tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  soc: amlogic: meson-gx-socinfo: Add of_node_put() before return
  soc: amlogic: clk-measure: Add support for SM1
  dt-bindings: soc: amlogic: clk-measure: Add SM1 compatible
  soc: amlogic: meson-gx-socinfo: Add SM1 and S905X3 IDs
  soc: amlogic: meson-gx-socinfo: add A311D id
  soc: amlogic: meson-clk-measure: add G12B second cluster cpu clk
  soc: amlogic: meson-clk-measure: protect measure with a mutex

Link: https://lore.kernel.org/r/7h7e77cwv5.fsf@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoARM: scoop: Use the right include
Linus Walleij [Tue, 20 Aug 2019 10:34:29 +0000 (12:34 +0200)]
ARM: scoop: Use the right include

This is a GPIO driver so it should include
<linux/gpio/driver.h> not <linux/gpio.h>

Link: https://lore.kernel.org/r/20190820103429.7028-1-linus.walleij@linaro.org
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'soc-fsl-next-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/leo...
Arnd Bergmann [Tue, 3 Sep 2019 20:06:07 +0000 (22:06 +0200)]
Merge tag 'soc-fsl-next-v5.4' of git://git./linux/kernel/git/leo/linux into arm/drivers

NXP/FSL SoC driver updates for v5.4

DPAA2 DPIO/MC driver
- Remove explicit device_link_remove() and device_link_del() calls due to
framework change

DPAA QBman driver
- Various changes to make it working with kexec
- Remove dev_err() usage after platform_get_irq()

GUTS driver
- Add LS1028 SoC support

* tag 'soc-fsl-next-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux:
  bus: fsl-mc: remove explicit device_link_del
  soc: fsl: dpio: remove explicit device_link_remove
  soc: fsl: guts: Add definition for LS1028A
  soc/fsl/qbman: Update device tree with reserved memory
  soc/fsl/qbman: Fixup qman_shutdown_fq()
  soc/fsl/qbman: Disable interrupts during portal recovery
  soc/fsl/qbman: Fix drain_mr_fqni()
  soc/fsl/qbman: Cleanup QMan queues if device was already initialized
  soc/fsl/qbman: Cleanup buffer pools if BMan was initialized prior to bootup
  soc/fsl/qbman: Rework QBMan private memory setup
  soc: fsl: qbman: Remove dev_err() usage after platform_get_irq()

Link: https://lore.kernel.org/r/20190816195301.26660-1-leoyang.li@nxp.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'renesas-drivers-for-v5.4-tag2' of git://git.kernel.org/pub/scm/linux/kerne...
Arnd Bergmann [Tue, 3 Sep 2019 18:20:42 +0000 (20:20 +0200)]
Merge tag 'renesas-drivers-for-v5.4-tag2' of git://git./linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.4 (take two)

  - Improve "always-on" PM Domain handling on SH/R-Mobile SoCs,
  - Automatic errata selection for Cortex-A7/A9,
  - Small fixes and improvements.

* tag 'renesas-drivers-for-v5.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: Enable ARM_ERRATA_754322 for affected Cortex-A9
  soc: renesas: Enable ARM_ERRATA_814220 for affected Cortex-A7
  soc: renesas: rmobile-sysc: Set GENPD_FLAG_ALWAYS_ON for always-on domain
  soc: renesas: rcar-sysc: Eliminate local variable gov
  soc: renesas: rcar-sysc: Add goto to of_node_put() before return

Link: https://lore.kernel.org/r/20190823123643.18799-5-geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'samsung-drivers-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 3 Sep 2019 17:05:45 +0000 (19:05 +0200)]
Merge tag 'samsung-drivers-5.4' of git://git./linux/kernel/git/krzk/linux into arm/drivers

Samsung soc drivers changes for v5.4

Add Exynos Chipid driver for identification of product IDs and SoC
revisions.  The driver also exposes chipid regmap, later to be used by
Exynos Adaptive Supply Voltage driver (adjusting voltages to different
revisions of same SoC).

* tag 'samsung-drivers-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  soc: samsung: chipid: Convert exynos-chipid driver to use the regmap API
  soc: samsung: Add exynos chipid driver support

Link: https://lore.kernel.org/r/20190816163042.6604-1-krzk@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agodt-bindings: power: add Amlogic Everything-Else power domains bindings
Neil Armstrong [Fri, 23 Aug 2019 09:04:14 +0000 (11:04 +0200)]
dt-bindings: power: add Amlogic Everything-Else power domains bindings

Add the bindings for the Amlogic Everything-Else power domains,
controlling the Everything-Else peripherals power domains.

The bindings targets the Amlogic G12A and SM1 compatible SoCs,
support for earlier SoCs will be added later.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
5 years agosoc: amlogic: Add support for Everything-Else power domains controller
Neil Armstrong [Fri, 23 Aug 2019 09:04:15 +0000 (11:04 +0200)]
soc: amlogic: Add support for Everything-Else power domains controller

Add support for the General Purpose Amlogic Everything-Else Power controller,
with the first support for G12A and SM1 SoCs dedicated to the VPU, PCIe,
USB, NNA, GE2D and Ethernet Power Domains.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
5 years agofbdev: da8xx: use resource management for dma
Bartosz Golaszewski [Mon, 22 Jul 2019 13:44:23 +0000 (15:44 +0200)]
fbdev: da8xx: use resource management for dma

Use managed variants of dma alloc functions in the da8xx fbdev driver.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agofbdev: da8xx-fb: drop a redundant if
Bartosz Golaszewski [Mon, 22 Jul 2019 13:44:22 +0000 (15:44 +0200)]
fbdev: da8xx-fb: drop a redundant if

The driver data is always set in probe. The remove() callback won't be
called if probe failed which is the only way for it to be NULL. Remove
the redundant if.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agofbdev: da8xx-fb: use devm_platform_ioremap_resource()
Bartosz Golaszewski [Mon, 22 Jul 2019 13:44:21 +0000 (15:44 +0200)]
fbdev: da8xx-fb: use devm_platform_ioremap_resource()

Shrink the code a bit by using the new helper wrapping the calls to
platform_get_resource() and devm_ioremap_resource() together.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agofbdev: da8xx: remove panel_power_ctrl() callback from platform data
Bartosz Golaszewski [Mon, 22 Jul 2019 13:44:20 +0000 (15:44 +0200)]
fbdev: da8xx: remove panel_power_ctrl() callback from platform data

There are no more users of panel_power_ctrl(). Remove it from the
driver.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoARM: davinci: da850-evm: switch to using a fixed regulator for lcdc
Bartosz Golaszewski [Mon, 22 Jul 2019 13:44:19 +0000 (15:44 +0200)]
ARM: davinci: da850-evm: switch to using a fixed regulator for lcdc

Now that the da8xx fbdev driver supports power control with an actual
regulator, switch to using a fixed power supply for da850-evm.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agofbdev: da8xx: add support for a regulator
Bartosz Golaszewski [Mon, 22 Jul 2019 13:44:18 +0000 (15:44 +0200)]
fbdev: da8xx: add support for a regulator

We want to remove the hacky platform data callback for power control.
Add a regulator to the driver data and enable/disable it next to
the current panel_power_ctrl() calls. We will use it in subsequent
patch on da850-evm.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoARM: davinci: da850-evm: model the backlight GPIO as an actual device
Bartosz Golaszewski [Mon, 22 Jul 2019 13:44:17 +0000 (15:44 +0200)]
ARM: davinci: da850-evm: model the backlight GPIO as an actual device

Instead of enabling the panel backlight in a callback defined in board
file using deprecated legacy GPIO API calls, model the line as a GPIO
backlight device.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agosoc: imx: gpcv2: Print the correct error code
Guido Günther [Wed, 21 Aug 2019 16:33:04 +0000 (18:33 +0200)]
soc: imx: gpcv2: Print the correct error code

The current code prints 'ret' (thus 0) while it should use 'err'.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
5 years agosoc: mediatek: cmdq: change the type of input parameter
Bibby Hsieh [Tue, 20 Aug 2019 08:49:28 +0000 (16:49 +0800)]
soc: mediatek: cmdq: change the type of input parameter

According to the cmdq hardware design, the subsys is u8,
the offset is u16 and the event id is u16.
This patch changes the type of subsys, offset and event id
to the correct type.

Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
5 years agosoc: mediatek: cmdq: reorder the parameter
Bibby Hsieh [Tue, 20 Aug 2019 08:49:27 +0000 (16:49 +0800)]
soc: mediatek: cmdq: reorder the parameter

The order of gce instructions is [subsys offset value]
so reorder the parameter of cmdq_pkt_write_mask
and cmdq_pkt_write function.

Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
5 years agosoc: renesas: Enable ARM_ERRATA_754322 for affected Cortex-A9
Geert Uytterhoeven [Mon, 19 Aug 2019 16:54:02 +0000 (18:54 +0200)]
soc: renesas: Enable ARM_ERRATA_754322 for affected Cortex-A9

ARM Erratum 754322 affects Cortex-A9 revisions r2p* and r3p*.

Automatically enable support code to mitigate the erratum when compiling
a kernel for any of the affected Renesas SoCs:
  - RZ/A1: r3p0,
  - R-Mobile A1: r2p4,
  - R-Car M1A: r2p2-00rel0,
  - R-Car H1: r3p0,
  - SH-Mobile AG5: r2p2.

EMMA Mobile EV2 (r1p3) and RZ/A2 (r4p1) are not affected.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agosoc: renesas: Enable ARM_ERRATA_814220 for affected Cortex-A7
Geert Uytterhoeven [Mon, 19 Aug 2019 17:05:58 +0000 (19:05 +0200)]
soc: renesas: Enable ARM_ERRATA_814220 for affected Cortex-A7

ARM Erratum 814220 affects Cortex-A7 revisions r0p2-r0p5.

Automatically enable support code to mitigate the erratum when compiling
a kernel for any of the affected Renesas SoCs:
  - R-Mobile APE6: r0p2,
  - RZ/G1E: r0p5,
  - RZ/G1C: r0p5,
  - R-Car H2: r0p3,
  - R-Car E2: r0p5,
  - RZ/N1: r0p5.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agosoc: renesas: rmobile-sysc: Set GENPD_FLAG_ALWAYS_ON for always-on domain
Geert Uytterhoeven [Fri, 9 Aug 2019 13:43:07 +0000 (15:43 +0200)]
soc: renesas: rmobile-sysc: Set GENPD_FLAG_ALWAYS_ON for always-on domain

Currently the R-Mobile "always-on" PM Domain is implemented by returning
-EBUSY from the generic_pm_domain.power_off() callback, and doing
nothing in the generic_pm_domain.power_on() callback.  However, this
means the PM Domain core code is not aware of the semantics of this
special domain, leading to boot warnings like the following on
SH/R-Mobile SoCs:

    sh_cmt e6130000.timer: PM domain c5 will not be powered off

Fix this by making the always-on nature of the domain explicit instead,
by setting the GENPD_FLAG_ALWAYS_ON flag.  This removes the need for the
domain to provide power control callbacks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
5 years agosoc: amlogic: meson-gx-socinfo: Add of_node_put() before return
Nishka Dasgupta [Mon, 19 Aug 2019 07:27:06 +0000 (12:57 +0530)]
soc: amlogic: meson-gx-socinfo: Add of_node_put() before return

The variable np in function meson_gx_socinfo_init takes the return value
of of_find_compatible_node, which gets a node but does not put it. If
this node is not put it may cause a memory leak. Hence put np after its
usefulness has been exhausted.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Fixes: a9daaba2965e ("soc: Add Amlogic SoC Information driver")
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
5 years agosoc: amlogic: clk-measure: Add support for SM1
Neil Armstrong [Tue, 20 Aug 2019 14:40:49 +0000 (16:40 +0200)]
soc: amlogic: clk-measure: Add support for SM1

Add the clk-measurer clocks IDs for the Amlogic SM1 SoC family.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
5 years agodt-bindings: soc: amlogic: clk-measure: Add SM1 compatible
Neil Armstrong [Tue, 20 Aug 2019 14:40:48 +0000 (16:40 +0200)]
dt-bindings: soc: amlogic: clk-measure: Add SM1 compatible

Add the Amlogic SM1 Compatible for the clk-measurer IP.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
5 years agosoc: amlogic: meson-gx-socinfo: Add SM1 and S905X3 IDs
Neil Armstrong [Tue, 20 Aug 2019 14:40:47 +0000 (16:40 +0200)]
soc: amlogic: meson-gx-socinfo: Add SM1 and S905X3 IDs

Add the SoC IDs for the S905X3 Amlogic SM1 SoC.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
5 years agosoc: renesas: rcar-sysc: Eliminate local variable gov
Geert Uytterhoeven [Fri, 9 Aug 2019 14:14:32 +0000 (16:14 +0200)]
soc: renesas: rcar-sysc: Eliminate local variable gov

As of commit 980532a5dda319ee ("soc: renesas: rcar-sysc: Use
GENPD_FLAG_ALWAYS_ON"), the local variable "gov" is assigned just once,
so it can be eliminated.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
5 years agosoc: renesas: rcar-sysc: Add goto to of_node_put() before return
Nishka Dasgupta [Thu, 15 Aug 2019 06:13:54 +0000 (11:43 +0530)]
soc: renesas: rcar-sysc: Add goto to of_node_put() before return

The local variable np in function rcar_sysc_pd_init takes the return
value of of_find_matching_node_and_match(), which gets a node but does
not put it.  If np is not put before the function returns, it may cause
a memory leak.

Hence, remove the return statement that does not immediately follow a
putting of np.  Replace it with a goto pointing to a pre-existing label
that first puts np and then returns the required value.

Issue found with Coccinelle.

Fixes: afa6f53df6052968 ("soc: renesas: rcar-sysc: Add support for fixing up power area tables")
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agobus: imx-weim: use module_platform_driver()
Sascha Hauer [Wed, 14 Aug 2019 08:23:16 +0000 (10:23 +0200)]
bus: imx-weim: use module_platform_driver()

Switch from module_platform_driver_probe() to module_platform_driver().
The former is not suitable for booting with device tree as the driver
will be registered before the device and thus won't be probed again
when the device is present.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
5 years agobus: fsl-mc: remove explicit device_link_del
Ioana Ciornei [Wed, 3 Jul 2019 14:56:38 +0000 (17:56 +0300)]
bus: fsl-mc: remove explicit device_link_del

Starting with commit 72175d4ea4c4 ("driver core: Make driver core own
stateful device links") stateful device links are owned by the driver
core and should not be explicitly removed on device unbind. Delete all
device_link_del appearances from the fsl-mc bus.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-By: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc: fsl: dpio: remove explicit device_link_remove
Ioana Ciornei [Wed, 3 Jul 2019 14:56:39 +0000 (17:56 +0300)]
soc: fsl: dpio: remove explicit device_link_remove

Starting with commit 72175d4ea4c4 ("driver core: Make driver core
own stateful device links") stateful device links are owned by the
driver core and should not be explicitly removed on device unbind.
Delete all device_link_remove appearances from the dpio driver.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc: fsl: guts: Add definition for LS1028A
Yinbo Zhu [Wed, 14 Aug 2019 07:26:47 +0000 (15:26 +0800)]
soc: fsl: guts: Add definition for LS1028A

Adding compatible string "ls1028a-dcfg" to initialize guts driver
for ls1028 and SoC die attribute definition for LS1028A

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc/fsl/qbman: Update device tree with reserved memory
Roy Pledge [Thu, 1 Aug 2019 20:17:05 +0000 (20:17 +0000)]
soc/fsl/qbman: Update device tree with reserved memory

When using the reserved memory node in the device tree there are
two options - dynamic or static. If a dynamic allocation was
selected (where the kernel selects the address for the allocation)
convert it to a static allocation by inserting the reg property.
This will ensure the same memory is reused after a kexec()

Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc/fsl/qbman: Fixup qman_shutdown_fq()
Roy Pledge [Thu, 1 Aug 2019 20:17:03 +0000 (20:17 +0000)]
soc/fsl/qbman: Fixup qman_shutdown_fq()

When shutting down a FQ on a dedicated channel only the
SW portal associated with that channel can dequeue from it.
Make sure the correct portal is use.

Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc/fsl/qbman: Disable interrupts during portal recovery
Roy Pledge [Thu, 1 Aug 2019 20:17:01 +0000 (20:17 +0000)]
soc/fsl/qbman: Disable interrupts during portal recovery

Disable the QBMan interrupts during recovery.

Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc/fsl/qbman: Fix drain_mr_fqni()
Roy Pledge [Thu, 1 Aug 2019 20:16:59 +0000 (20:16 +0000)]
soc/fsl/qbman: Fix drain_mr_fqni()

The drain_mr_fqni() function may be called fron uninterruptable
context so convert the msleep() to an mdelay().  Also ensure that
the valid bit is updated while polling.

Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc/fsl/qbman: Cleanup QMan queues if device was already initialized
Roy Pledge [Thu, 1 Aug 2019 20:16:57 +0000 (20:16 +0000)]
soc/fsl/qbman: Cleanup QMan queues if device was already initialized

If the QMan device was previously initialized make sure all the
frame queues are out of service once all the portals are probed.
This handles the case where the kernel is restarted without the
SoC being reset (kexec for example)

Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc/fsl/qbman: Cleanup buffer pools if BMan was initialized prior to bootup
Roy Pledge [Thu, 1 Aug 2019 20:16:55 +0000 (20:16 +0000)]
soc/fsl/qbman: Cleanup buffer pools if BMan was initialized prior to bootup

Clean the BMan buffer pools if the device had been initialized
previously.  This will ensure a consistent state if the kernel
was soft restarted (kexec for example)

Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc/fsl/qbman: Rework QBMan private memory setup
Roy Pledge [Thu, 1 Aug 2019 20:16:53 +0000 (20:16 +0000)]
soc/fsl/qbman: Rework QBMan private memory setup

Rework QBMan private memory setup so that the areas are not
zeroed if the device was previously initialized

If the QMan private memory was already initialized skip the PFDR
initialization.

Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc: fsl: qbman: Remove dev_err() usage after platform_get_irq()
Stephen Boyd [Tue, 30 Jul 2019 21:36:06 +0000 (14:36 -0700)]
soc: fsl: qbman: Remove dev_err() usage after platform_get_irq()

We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// <smpl>
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>

While we're here, remove braces on if statements that only have one
statement (manually).

Cc: Thierry Reding <treding@nvidia.com>
Cc: Li Yang <leoyang.li@nxp.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
5 years agosoc: samsung: chipid: Convert exynos-chipid driver to use the regmap API
Sylwester Nawrocki [Tue, 13 Aug 2019 15:08:20 +0000 (17:08 +0200)]
soc: samsung: chipid: Convert exynos-chipid driver to use the regmap API

Convert the driver to use regmap API in order to allow other
drivers, like ASV, to access the CHIPID registers.

Add definition of selected CHIPID register offsets and register bit
fields for Exynos5422 SoC.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agosoc: samsung: Add exynos chipid driver support
Pankaj Dubey [Tue, 13 Aug 2019 15:08:19 +0000 (17:08 +0200)]
soc: samsung: Add exynos chipid driver support

Exynos SoCs have Chipid, for identification of product IDs and SoC
revisions. This patch intends to provide initialization code for all
these functionalities, at the same time it provides some sysfs entries
for accessing these information to user-space.

This driver uses existing binding for exynos-chipid.

Changes by Bartlomiej:
- fixed return values on errors
- removed bogus kfree_const()
- added missing Exynos4210 EVT0 id
- converted code to use EXYNOS_MASK define
- fixed np use after of_node_put()
- fixed too early use of dev_info()
- made driver fail for unknown SoC-s
- added SPDX tag
- updated Copyrights

Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
[m.szyprowski: for suggestion and code snippet of product_id_to_soc_id]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
[s.nawrocki: updated copyright date, removed uneeded headers inclusion]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoMerge tag 'tee-optee-for-5.4' of git://git.linaro.org/people/jens.wiklander/linux...
Arnd Bergmann [Thu, 15 Aug 2019 12:29:42 +0000 (14:29 +0200)]
Merge tag 'tee-optee-for-5.4' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers

Add might_sleep() in OP-TEE RPC requests

* tag 'tee-optee-for-5.4' of git://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: optee: add might_sleep for RPC requests

Link: https://lore.kernel.org/r/20190815065659.GA13498@jax
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'scmi-updates-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Arnd Bergmann [Wed, 14 Aug 2019 18:46:37 +0000 (20:46 +0200)]
Merge tag 'scmi-updates-5.4' of git://git./linux/kernel/git/sudeep.holla/linux into arm/drivers

ARM SCMI updates/fixes for v5.4

Handful of fixes/updates including:
1. SCMI v2.0(recently released) support for:
- Performance protocol fast channels
- Reset Management Protocol
2. SCMI infrastructure/core support for recieve(Rx) channels,
   asynchronous commands and delayed response
3. Usage of asynchronous commands for clock rate setting and sensor
   reading based on the attributes read from the firmware
4. Miscellaneous cleanups(typos, naming alignment with specification,
   and SPDX License identifier)
5. Couple of fixes: removal of extra check for invalid length and
   additional check to ensure platform/firmware has released shared
   memory before using it in OSPM

* tag 'scmi-updates-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (22 commits)
  reset: Add support for resets provided by SCMI
  firmware: arm_scmi: Add RESET protocol in SCMI v2.0
  dt-bindings: arm: Extend SCMI to support new reset protocol
  firmware: arm_scmi: Make use SCMI v2.0 fastchannel for performance protocol
  firmware: arm_scmi: Add discovery of SCMI v2.0 performance fastchannels
  firmware: arm_scmi: Use {get,put}_unaligned_le{32,64} accessors
  firmware: arm_scmi: Use asynchronous CLOCK_RATE_SET when possible
  firmware: arm_scmi: Drop config flag in clk_ops->rate_set
  firmware: arm_scmi: Add asynchronous sensor read if it supports
  firmware: arm_scmi: Drop async flag in sensor_ops->reading_get
  firmware: arm_scmi: Add support for asynchronous commands and delayed response
  firmware: arm_scmi: Add mechanism to unpack message headers
  firmware: arm_scmi: Separate out tx buffer handling and prepare to add rx
  firmware: arm_scmi: Add receive channel support for notifications
  firmware: arm_scmi: Segregate tx channel handling and prepare to add rx
  firmware: arm_scmi: Reorder some functions to avoid forward declarations
  firmware: arm_scmi: Check if platform has released shmem before using
  firmware: arm_scmi: Use the term 'message' instead of 'command'
  firmware: arm_scmi: Fix few trivial typos in comments
  firmware: arm_scmi: Remove extra check for invalid length message responses
  ...

Link: https://lore.kernel.org/r/20190814172454.26191-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agodt-bindings: gpio: Document GPIOs via Moxtet bus
Marek Behún [Mon, 12 Aug 2019 16:11:18 +0000 (18:11 +0200)]
dt-bindings: gpio: Document GPIOs via Moxtet bus

This patch adds documentation of the device tree bindings for GPIOs
on the devices connected via Moxtet bus.

Link: https://lore.kernel.org/r/20190812161118.21476-6-marek.behun@nic.cz
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agodrivers: gpio: Add support for GPIOs over Moxtet bus
Marek Behún [Mon, 12 Aug 2019 16:11:17 +0000 (18:11 +0200)]
drivers: gpio: Add support for GPIOs over Moxtet bus

This adds support for interpreting the input and output bits of one
device on Moxtet bus as GPIOs.
This is needed for example by the SFP cage module of Turris Mox.

Link: https://lore.kernel.org/r/20190812161118.21476-5-marek.behun@nic.cz
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agobus: moxtet: Add sysfs and debugfs documentation
Marek Behún [Mon, 12 Aug 2019 16:11:16 +0000 (18:11 +0200)]
bus: moxtet: Add sysfs and debugfs documentation

Add sysfs ABI documentation for the attribute files module_id and
module_name

Add debugfs ABI documentation for reading input from the shift registers
and reading last written output or write output to the shift registers.

Link: https://lore.kernel.org/r/20190812161118.21476-4-marek.behun@nic.cz
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agodt-bindings: bus: Document moxtet bus binding
Marek Behún [Mon, 12 Aug 2019 16:11:15 +0000 (18:11 +0200)]
dt-bindings: bus: Document moxtet bus binding

This adds device tree binding documentation for the Moxtet bus, a bus
via which the different modules connected to the Turris Mox router can
be configured.

Link: https://lore.kernel.org/r/20190812161118.21476-3-marek.behun@nic.cz
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agobus: Add support for Moxtet bus
Marek Behún [Mon, 12 Aug 2019 16:11:14 +0000 (18:11 +0200)]
bus: Add support for Moxtet bus

On the Turris Mox router different modules can be connected to the main
CPU board: currently a module with a SFP cage, a module with MiniPCIe
connector, a PCIe pass-through MiniPCIe connector module, a 4-port
switch module, an 8-port switch module, and a 4-port USB3 module.

For example:
  [CPU]-[PCIe-pass-through]-[PCIe]-[8-port switch]-[8-port switch]-[SFP]

Each of this modules has an input and output shift register, and these
are connected via SPI to the CPU board.

Via SPI we are able to discover which modules are connected, in which
order, and we can also read some information about the modules (eg.
their interrupt status), and configure them.
From each module 8 bits can be read (of which low 4 bits identify the
module) and 8 bits can be written.

For example from the module with a SFP cage we can read the LOS,
TX-FAULT and MOD-DEF0 signals, while we can write TX-DISABLE and
RATE-SELECT signals.

This driver creates a new bus type, called "moxtet". For each Mox module
it finds via SPI, it creates a new device on the moxtet bus so that
drivers can be written for them.

It also implements a virtual interrupt controller for the modules which
send their interrupt status over the SPI shift register. These modules
do this in addition to sending their interrupt status via the shared
interrupt line. When the shared interrupt is triggered, we read from the
shift register and handle IRQs for all devices which are in interrupt.

The topology of how Mox modules are connected can then be read by
listing /sys/bus/moxtet/devices.

Link: https://lore.kernel.org/r/20190812161118.21476-2-marek.behun@nic.cz
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'renesas-drivers-for-v5.4-tag1' of git://git.kernel.org/pub/scm/linux/kerne...
Arnd Bergmann [Wed, 14 Aug 2019 13:26:43 +0000 (15:26 +0200)]
Merge tag 'renesas-drivers-for-v5.4-tag1' of git://git./linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.4

  - Fix a flexible array member definition in the R-Car SYSC driver.

* tag 'renesas-drivers-for-v5.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: rcar-sysc: Use [] to denote a flexible array member

Link: https://lore.kernel.org/r/20190802120355.1430-3-geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agoMerge tag 'reset-for-v5.4' of git://git.pengutronix.de/git/pza/linux into arm/drivers
Arnd Bergmann [Tue, 13 Aug 2019 12:29:29 +0000 (14:29 +0200)]
Merge tag 'reset-for-v5.4' of git://git.pengutronix.de/git/pza/linux into arm/drivers

Reset controller changes for v5.4

This tag adds support for the i.MX8MM SRC via the reset-imx7 driver
and for DesignWare IP reset controllers via the reset-simple driver.
A typo in the i.MX8MQ DSI reset definitions is fixed, and the Meson
reset driver and binding headers are updated to SPDX license
identifiers.

* tag 'reset-for-v5.4' of git://git.pengutronix.de/git/pza/linux:
  reset: Add DesignWare IP support to simple reset
  dt-bindings: Document the DesignWare IP reset bindings
  dt-bindings: reset: amlogic,meson8b-reset: update with SPDX Licence identifier
  dt-bindings: reset: amlogic,meson-gxbb-reset: update with SPDX Licence identifier
  reset: reset-meson: update with SPDX Licence identifier
  dt-bindings: reset: Fix typo in imx8mq resets
  dt-bindings: reset: imx7: Add support for i.MX8MM

Link: https://lore.kernel.org/r/1565603668.5017.2.camel@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 years agofirmware: imx: Add DSP IPC protocol interface
Daniel Baluta [Thu, 1 Aug 2019 09:56:36 +0000 (12:56 +0300)]
firmware: imx: Add DSP IPC protocol interface

Some of i.MX8 processors (e.g i.MX8QM, i.MX8QXP) contain
the Tensilica HiFi4 DSP for advanced pre- and post-audio
processing.

The communication between Host CPU and DSP firmware is
taking place using a shared memory area for message passing
and a dedicated Messaging Unit for notifications.

DSP IPC protocol offers a doorbell interface using
imx-mailbox API.

We use 4 MU channels (2 x TXDB, 2 x RXDB) to implement a
request-reply protocol.

Connection 0 (txdb0, rxdb0):
        - Host writes messasge to shared memory [SHMEM]
- Host sends a request [MU]
- DSP handles request [SHMEM]
- DSP sends reply [MU]

Connection 1 (txdb1, rxdb1):
- DSP writes a message to shared memory [SHMEM]
- DSP sends a request [MU]
- Host handles request [SHMEM]
- Host sends reply [MU]

The protocol interface will be used by a Host client to
communicate with the DSP. First client will be the i.MX8
part from Sound Open Firmware infrastructure.

The protocol offers the following interface:

On Tx:
   - imx_dsp_ring_doorbell, will be called to notify the DSP
   that it needs to handle a request.

On Rx:
   - clients need to provide two callbacks:
.handle_reply
.handle_request
  - the callbacks will be used by the protocol on
    notification arrival from DSP.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
5 years agosoc: imx-scu: Add SoC UID(unique identifier) support
Anson Huang [Tue, 2 Jul 2019 07:45:45 +0000 (15:45 +0800)]
soc: imx-scu: Add SoC UID(unique identifier) support

Add i.MX SCU SoC's UID(unique identifier) support, user
can read it from sysfs:

root@imx8qxpmek:~# cat /sys/devices/soc0/soc_uid
7B64280B57AC1898

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
5 years agoreset: Add support for resets provided by SCMI
Sudeep Holla [Mon, 8 Jul 2019 08:41:08 +0000 (09:41 +0100)]
reset: Add support for resets provided by SCMI

On some ARM based systems, a separate Cortex-M based System Control
Processor(SCP) provides the overall power, clock, reset and system
control. System Control and Management Interface(SCMI) Message Protocol
is defined for the communication between the Application Cores(AP)
and the SCP.

Adds support for the resets provided using SCMI protocol for performing
reset management of various devices present on the SoC. Various reset
functionalities are achieved by the means of different ARM SCMI device
operations provided by the ARM SCMI framework.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Add RESET protocol in SCMI v2.0
Sudeep Holla [Mon, 8 Jul 2019 08:41:06 +0000 (09:41 +0100)]
firmware: arm_scmi: Add RESET protocol in SCMI v2.0

SCMIv2.0 adds a new Reset Management Protocol to manage various reset
states a given device or domain can enter. Device(s) that can be
collectively reset through a common reset signal constitute a reset
domain for the firmware.

A reset domain can be reset autonomously or explicitly through assertion
and de-assertion of the signal. When autonomous reset is chosen, the
firmware is responsible for taking the necessary steps to reset the
domain and to subsequently bring it out of reset. When explicit reset is
chosen, the caller has to specifically assert and then de-assert the
reset signal by issuing two separate RESET commands.

Add the basic SCMI reset infrastructure that can be used by Linux
reset controller driver.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agodt-bindings: arm: Extend SCMI to support new reset protocol
Sudeep Holla [Mon, 8 Jul 2019 08:41:04 +0000 (09:41 +0100)]
dt-bindings: arm: Extend SCMI to support new reset protocol

SCMIv2.0 adds a new Reset Management Protocol to manage various reset
states a given device or domain can enter. Extend the existing SCMI
bindings to add reset protocol support by re-using the reset bindings
for both reset providers and consumers.

Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Make use SCMI v2.0 fastchannel for performance protocol
Sudeep Holla [Mon, 8 Jul 2019 08:41:17 +0000 (09:41 +0100)]
firmware: arm_scmi: Make use SCMI v2.0 fastchannel for performance protocol

SCMI v2.0 adds support for "FastChannel" which do not use a message
header as they are specialized for a single message.

Only PERFORMANCE_LIMITS_{SET,GET} and PERFORMANCE_LEVEL_{SET,GET}
commands are supported over fastchannels. As they are optional, they
need to be discovered by PERFORMANCE_DESCRIBE_FASTCHANNEL command.
Further {LIMIT,LEVEL}_SET commands can have optional doorbell support.

Add support for making use of these fastchannels.

Cc: Ionela Voinescu <Ionela.Voinescu@arm.com>
Cc: Chris Redpath <Chris.Redpath@arm.com>
Cc: Quentin Perret <Quentin.Perret@arm.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Add discovery of SCMI v2.0 performance fastchannels
Sudeep Holla [Mon, 8 Jul 2019 08:41:12 +0000 (09:41 +0100)]
firmware: arm_scmi: Add discovery of SCMI v2.0 performance fastchannels

SCMI v2.0 adds support for "FastChannel", a lightweight unidirectional
channel that is dedicated to a single SCMI message type for controlling
a specific platform resource. They do not use a message header as they
are specialized for a single message.

Only PERFORMANCE_LIMITS_{SET,GET} and PERFORMANCE_LEVEL_{SET,GET}
commands are supported over fastchannels. As they are optional, they
need to be discovered by PERFORMANCE_DESCRIBE_FASTCHANNEL command.
Further {LIMIT,LEVEL}_SET commands can have optional doorbell support.

Add support for discovery of these fastchannels.

Cc: Ionela Voinescu <Ionela.Voinescu@arm.com>
Cc: Chris Redpath <Chris.Redpath@arm.com>
Cc: Quentin Perret <Quentin.Perret@arm.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Use {get,put}_unaligned_le{32,64} accessors
Sudeep Holla [Wed, 7 Aug 2019 12:46:27 +0000 (13:46 +0100)]
firmware: arm_scmi: Use {get,put}_unaligned_le{32,64} accessors

Instead of type-casting the {tx,rx}.buf all over the place while
accessing them to read/write __le{32,64} from/to the firmware, let's
use the existing {get,put}_unaligned_le{32,64} accessors to hide all
the type cast ugliness.

Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Use asynchronous CLOCK_RATE_SET when possible
Sudeep Holla [Mon, 8 Jul 2019 13:42:16 +0000 (14:42 +0100)]
firmware: arm_scmi: Use asynchronous CLOCK_RATE_SET when possible

CLOCK_PROTOCOL_ATTRIBUTES provides attributes to indicate the maximum
number of pending asynchronous clock rate changes supported by the
platform. If it's non-zero, then we should be able to use asynchronous
clock rate set for any clocks until the maximum limit is reached.

Tracking the current count of pending asynchronous clock set rate
requests, we can decide if the incoming/new request for clock set rate
can be handled asynchronously or not until the maximum limit is
reached.

Cc: linux-clk@vger.kernel.org
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Drop config flag in clk_ops->rate_set
Sudeep Holla [Mon, 8 Jul 2019 08:42:22 +0000 (09:42 +0100)]
firmware: arm_scmi: Drop config flag in clk_ops->rate_set

CLOCK_PROTOCOL_ATTRIBUTES provides attributes to indicate the maximum
number of pending asynchronous clock rate changes supported by the
platform. If it's non-zero, then we should be able to use asynchronous
clock rate set for any clocks until the maximum limit is reached.

In order to add that support, let's drop the config flag passed to
clk_ops->rate_set and handle the asynchronous requests dynamically.

Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Add asynchronous sensor read if it supports
Sudeep Holla [Mon, 8 Jul 2019 08:41:01 +0000 (09:41 +0100)]
firmware: arm_scmi: Add asynchronous sensor read if it supports

SENSOR_DESCRIPTION_GET provides attributes to indicate if the sensor
supports asynchronous read. We can read that flag and use asynchronous
reads for any sensors with that attribute set.

Let's use the new scmi_do_xfer_with_response to support asynchronous
sensor reads.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Drop async flag in sensor_ops->reading_get
Sudeep Holla [Mon, 8 Jul 2019 08:40:57 +0000 (09:40 +0100)]
firmware: arm_scmi: Drop async flag in sensor_ops->reading_get

SENSOR_DESCRIPTION_GET provides attributes to indicate if the sensor
supports asynchronous read. Ideally we should be able to read that flag
and use asynchronous reads for any sensors with that attribute set.

In order to add that support, let's drop the async flag passed to
sensor_ops->reading_get and dynamically switch between sync and async
flags based on the attributes as provided by the firmware.

Cc: linux-hwmon@vger.kernel.org
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Add support for asynchronous commands and delayed response
Sudeep Holla [Mon, 8 Jul 2019 08:40:54 +0000 (09:40 +0100)]
firmware: arm_scmi: Add support for asynchronous commands and delayed response

Messages that are sent to platform, also known as commands and can be:

1. Synchronous commands that block the channel until the requested work
has been completed. The platform responds to these commands over the
same channel and hence can't be used to send another command until the
previous command has completed.

2. Asynchronous commands on the other hand, the platform schedules the
requested work to complete later in time and returns almost immediately
freeing the channel for new commands. The response indicates the success
or failure in the ability to schedule the requested work. When the work
has completed, the platform sends an additional delayed response message.

Using the same transmit buffer used for sending the asynchronous command
even for the delayed response corresponding to it simplifies handling of
the delayed response. It's the caller of asynchronous command that is
responsible for allocating the completion flag that scmi driver can
complete to indicate the arrival of delayed response.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Add mechanism to unpack message headers
Sudeep Holla [Mon, 8 Jul 2019 08:40:52 +0000 (09:40 +0100)]
firmware: arm_scmi: Add mechanism to unpack message headers

In order to identify the message type when a response arrives, we need
a mechanism to unpack the message header similar to packing. Let's
add one.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Separate out tx buffer handling and prepare to add rx
Sudeep Holla [Mon, 8 Jul 2019 08:40:48 +0000 (09:40 +0100)]
firmware: arm_scmi: Separate out tx buffer handling and prepare to add rx

Currently we pre-allocate transmit buffers only and use the first free
slot in that pre-allocated buffer for transmitting any new message that
are generally originated from OS to the platform firmware.

Notifications or the delayed responses on the other hand are originated
from the platform firmware and consumes by the OS. It's better to have
separate and dedicated pre-allocated buffers to handle the notifications.
We can still use the transmit buffers for the delayed responses.

In addition, let's prepare existing scmi_xfer_{get,put} for acquiring
and releasing a slot to identify the right(tx/rx) buffers.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Add receive channel support for notifications
Sudeep Holla [Mon, 8 Jul 2019 08:40:46 +0000 (09:40 +0100)]
firmware: arm_scmi: Add receive channel support for notifications

With scmi_mbox_chan_setup enabled to identify and setup both Tx and Rx,
let's consolidate setting up of both the channels under the function
scmi_mbox_txrx_setup.

Since some platforms may opt not to support notifications or delayed
response, they may not need support for Rx. Hence Rx is optional and
failure of setting one up is not considered fatal.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Segregate tx channel handling and prepare to add rx
Sudeep Holla [Mon, 8 Jul 2019 08:40:44 +0000 (09:40 +0100)]
firmware: arm_scmi: Segregate tx channel handling and prepare to add rx

The transmit(Tx) channels are specified as the first entry and the
receive(Rx) channels are the second entry as per the device tree
bindings. Since we currently just support Tx, index 0 is hardcoded at
all required callsites.

In order to prepare for adding Rx support, let's remove those hardcoded
index and add boolean parameter to identify Tx/Rx channels when setting
them up.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Reorder some functions to avoid forward declarations
Sudeep Holla [Mon, 8 Jul 2019 08:40:42 +0000 (09:40 +0100)]
firmware: arm_scmi: Reorder some functions to avoid forward declarations

Re-shuffling few functions to keep definitions and their usages close.
This is also needed to avoid too many unnecessary forward declarations
while adding new features(delayed response and notifications).

Keeping this separate to avoid mixing up of these trivial change that
doesn't affect functionality into the ones that does.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Check if platform has released shmem before using
Sudeep Holla [Mon, 8 Jul 2019 14:48:36 +0000 (15:48 +0100)]
firmware: arm_scmi: Check if platform has released shmem before using

Sometimes platfom may take too long to respond to the command and OS
might timeout before platform transfer the ownership of the shared
memory region to the OS with the response.

Since the mailbox channel associated with the channel is freed and new
commands are dispatch on the same channel, OS needs to wait until it
gets back the ownership. If not, either OS may end up overwriting the
platform response for the last command(which is fine as OS timed out
that command) or platform might overwrite the payload for the next
command with the response for the old.

The latter is problematic as platform may end up interpretting the
response as the payload. In order to avoid such race, let's wait until
the OS gets back the ownership before we prepare the shared memory with
the payload for the next command.

Reported-by: Jim Quinlan <james.quinlan@broadcom.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Use the term 'message' instead of 'command'
Sudeep Holla [Mon, 8 Jul 2019 08:40:40 +0000 (09:40 +0100)]
firmware: arm_scmi: Use the term 'message' instead of 'command'

In preparation to adding support for other two types of messages that
SCMI specification mentions, let's replace the term 'command' with the
correct term 'message'.

As per the specification the messages are of 3 types:
commands(synchronous or asynchronous), delayed responses and notifications.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Fix few trivial typos in comments
Sudeep Holla [Mon, 8 Jul 2019 08:40:38 +0000 (09:40 +0100)]
firmware: arm_scmi: Fix few trivial typos in comments

While adding new comments found couple of typos that are better fixed.

s/informfation/information/
s/statues/status/

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Remove extra check for invalid length message responses
Sudeep Holla [Mon, 8 Jul 2019 08:40:35 +0000 (09:40 +0100)]
firmware: arm_scmi: Remove extra check for invalid length message responses

scmi_xfer_get_init ensures both transmit and receive buffer lengths are
within the maximum limits. If receive buffer length is not supplied by
the caller, it's set to the maximum limit value. Receive buffer length
is never modified after that. So there's no need for the extra check
when receive transmit completion for a command essage.

Further, if the response header length is greater than the prescribed
receive buffer length, the response buffer is truncated to the latter.

Reported-by: Jim Quinlan <james.quinlan@broadcom.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Align few names in sensors protocol with SCMI specification
Sudeep Holla [Mon, 8 Jul 2019 08:40:33 +0000 (09:40 +0100)]
firmware: arm_scmi: Align few names in sensors protocol with SCMI specification

Looks like more code developed during the draft versions of the
specification slipped through and they don't match the final
released version. This seem to have happened only with sensor
protocol.

Renaming few command and function names here to match exactly with
the released version of SCMI specification for ease of maintenance.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agofirmware: arm_scmi: Use the correct style for SPDX License Identifier
Sudeep Holla [Tue, 23 Jul 2019 13:00:09 +0000 (14:00 +0100)]
firmware: arm_scmi: Use the correct style for SPDX License Identifier

Fix to correct the SPDX License Identifier style in header file related
to firmware frivers for ARM SCMI message protocol.

For C header files Documentation/process/license-rules.rst mandates
C-like comments(opposed to C source files where C++ style should be
used).

While at it, change GPL-2.0 to GPL-2.0-only similar to the ones in
psci.h and scpi_protocol.h

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
5 years agoreset: Add DesignWare IP support to simple reset
Gustavo Pimentel [Tue, 23 Jul 2019 15:17:28 +0000 (17:17 +0200)]
reset: Add DesignWare IP support to simple reset

The reset-simple driver can be now used on DesignWare IPs by
default by selecting the following compatible strings:
 - snps,dw-high-reset for active high resets inputs
 - snps,dw-low-reset for active low resets inputs

Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Signed-off-by: Luis Oliveira <luis.oliveira@synopsys.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
5 years agodt-bindings: Document the DesignWare IP reset bindings
Luis Oliveira [Tue, 23 Jul 2019 15:17:27 +0000 (17:17 +0200)]
dt-bindings: Document the DesignWare IP reset bindings

This adds documentation of device tree bindings for the
DesignWare IP reset controller.

Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Signed-off-by: Luis Oliveira <luis.oliveira@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
5 years agobus: sunxi-rsb: Remove dev_err() usage after platform_get_irq()
Stephen Boyd [Tue, 30 Jul 2019 18:15:02 +0000 (11:15 -0700)]
bus: sunxi-rsb: Remove dev_err() usage after platform_get_irq()

We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// <smpl>
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>

While we're here, remove braces on if statements that only have one
statement (manually).

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
5 years agosoc: amlogic: meson-gx-socinfo: add A311D id
Christian Hewitt [Wed, 31 Jul 2019 12:39:55 +0000 (14:39 +0200)]
soc: amlogic: meson-gx-socinfo: add A311D id

Add the SoC ID for the A311D Amlogic SoC.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
5 years agosoc: amlogic: meson-clk-measure: add G12B second cluster cpu clk
Neil Armstrong [Mon, 29 Jul 2019 13:02:18 +0000 (15:02 +0200)]
soc: amlogic: meson-clk-measure: add G12B second cluster cpu clk

Add the G12B second CPU cluster CPU and SYS_PLL measure IDs.

These IDs returns 0Hz on G12A.

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
5 years agosoc: amlogic: meson-clk-measure: protect measure with a mutex
Neil Armstrong [Mon, 29 Jul 2019 13:02:17 +0000 (15:02 +0200)]
soc: amlogic: meson-clk-measure: protect measure with a mutex

In order to protect clock measuring when multiple process asks for
a measure, protect the main measure function with mutexes.

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
5 years agobus: imx-weim: optionally enable burst clock mode
Sven Van Asbroeck [Fri, 12 Jul 2019 20:43:15 +0000 (16:43 -0400)]
bus: imx-weim: optionally enable burst clock mode

To enable burst clock mode, add the fsl,burst-clk-enable
property to the weim bus's devicetree node.

Example:
weim: weim@21b8000 {
compatible = "fsl,imx6q-weim";
reg = <0x021b8000 0x4000>;
clocks = <&clks 196>;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0x08000000 0x08000000>;
fsl,weim-cs-gpr = <&gpr>;
fsl,burst-clk-enable;

client-device@0,0 {
compatible = "something";
reg = <0 0 0x02000000>;
#address-cells = <1>;
#size-cells = <1>;
bank-width = <2>;
fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000
0x0000c000 0x1404a38e 0x00000000>;
};
};

Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
5 years agodt-bindings: reset: amlogic,meson8b-reset: update with SPDX Licence identifier
Neil Armstrong [Thu, 1 Aug 2019 07:54:54 +0000 (09:54 +0200)]
dt-bindings: reset: amlogic,meson8b-reset: update with SPDX Licence identifier

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
5 years agodt-bindings: reset: amlogic,meson-gxbb-reset: update with SPDX Licence identifier
Neil Armstrong [Thu, 1 Aug 2019 07:54:53 +0000 (09:54 +0200)]
dt-bindings: reset: amlogic,meson-gxbb-reset: update with SPDX Licence identifier

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
5 years agoreset: reset-meson: update with SPDX Licence identifier
Neil Armstrong [Thu, 1 Aug 2019 07:54:52 +0000 (09:54 +0200)]
reset: reset-meson: update with SPDX Licence identifier

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
5 years agodt-bindings: reset: Fix typo in imx8mq resets
Guido Günther [Thu, 1 Aug 2019 08:20:59 +0000 (10:20 +0200)]
dt-bindings: reset: Fix typo in imx8mq resets

Some of the mipi dsi resets were called

  IMX8MQ_RESET_MIPI_DIS__

instead of

  IMX8MQ_RESET_MIPI_DSI__

Since they're DSI related this looks like a typo. This fixes the
only in tree user as well to not break bisecting.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
5 years agodt-bindings: reset: imx7: Add support for i.MX8MM
Anson Huang [Fri, 5 Jul 2019 08:54:05 +0000 (16:54 +0800)]
dt-bindings: reset: imx7: Add support for i.MX8MM

i.MX8MM can reuse i.MX8MQ's reset driver, update the compatible
property and related info to support i.MX8MM.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>