Commit Graph

17 Commits

Author SHA1 Message Date
Ulf Hansson e5300b2c3f soc: imx: Move power-domain drivers to the genpd dir
To simplify with maintenance let's move the imx power-domain drivers to the
new genpd directory. Going forward, patches are intended to be managed
through a separate git tree, according to MAINTAINERS.

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: <kernel@pengutronix.de>
Cc: <linux-imx@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-07-11 15:30:09 +02:00
Lucas Stach 9d3975f27e soc: imx: add Kconfig symbols for blk-ctrl drivers
Currently the dependencies of the blk-ctrl drivers are not fully
described in Kconfig, which can trip over the compile tests on
platforms where those drivers are not usually enabled. Add a
non user-selectable symbol to be describe those dependencies.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-01-01 11:11:46 +08:00
Peng Fan e9aa77d413 soc: imx: add i.MX93 media blk ctrl driver
Add i.MX93 mediamix blk ctrl support.

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

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-09-17 16:31:06 +08:00
Peng Fan 0a0f7cc25d soc: imx: add i.MX93 SRC power domain driver
Support controlling power domain managed by System Reset
Controller(SRC). Current supported power domain is mediamix power
domain.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-09-17 16:31:06 +08:00
Lucas Stach 556f5cf956 soc: imx: add i.MX8MP HSIO blk-ctrl
The i.MX8MP added some blk-ctrl peripherals that don't follow the regular
structure of the blk-ctrls in the previous SoCs. Add a new file for those
with currently only the HSIO blk-ctrl being supported. Others will be added
later on.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 09:28:57 +08:00
Lucas Stach 2684ac05a8 soc: imx: add i.MX8M blk-ctrl driver
This adds a driver for the blk-ctrl blocks found in the i.MX8M* line of
SoCs. The blk-ctrl is a top-level peripheral located in the various *MIX
power domains and interacts with the GPC power controller to provide the
peripherals in the power domain access to the NoC and ensures that those
peripherals are properly reset when their respective power domain is
brought back to life.

Software needs to do different things to make the bus handshake happen
after the GPC *MIX domain is powered up and before it is powered down.
As the requirements are quite different between the various blk-ctrls
there is a callback function provided to hook in the proper sequence.

The peripheral domains are quite uniform, they handle the soft clock
enables and resets in the blk-ctrl address space and sequencing with the
upstream GPC power domains.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-06 20:13:47 +08:00
Anson Huang a24015fa8b firmware: imx: Move i.MX SCU soc driver into imx firmware folder
The i.MX SCU soc driver depends on SCU firmware driver, so it has to
use platform driver model for proper defer probe operation, since
it has no device binding in DT file, a simple platform device is
created together inside the platform driver. To make it more clean,
we can just move the entire SCU soc driver into imx firmware folder
and initialized by i.MX SCU firmware driver.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-07-13 10:02:00 +08:00
Peng Fan 52102a3ba6 soc: imx: move cpu code to drivers/soc/imx
Move the soc device register code to drivers/soc/imx to align with
i.MX8.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-05-20 23:03:50 +08:00
Peng Fan fc40200ebf soc: imx: increase build coverage for imx8m soc driver
The soc-imx8.c driver is actually for i.MX8M family, so rename it
to soc-imx8m.c.

Use CONFIG_SOC_IMX8M as build gate, not CONFIG_ARCH_MXC, to control
whether build this driver, also make it possible for compile test.

Default set it to y for ARCH_MXC && ARM64

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-03-16 11:39:02 +08:00
Olof Johansson 21000823f5 i.MX driver changes for 5.3:
- Add i.MX SCU based SoC bus driver for i.MX8QXP SoC support, which
    talks to SCU firmware for getting SoC ID and revision.
  - Update soc-imx8 bus driver to read imx8mm soc revision from anatop.
  - Add i.MX8MN SoC bus support into soc-imx8 driver.
  - Various small improvements on soc-imx8 bus driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJdEX9EAAoJEFBXWFqHsHzOixgIAJ5FXbnVlJdoFkfFTOqQpzM5
 w0/dPoJLyZOPd42SU4zTAlj7ooPCN+ux+AvOpf4BOMMZjJ3SnKRccpA7yPrhAAyb
 pjYEGJAB1bLX1B4bnGJy2lHZzZFkGEMo2rK6jUl7agLV0T5HnV0/bRtBePCei8as
 AXO5VhsXqxczG0EwqkwxdLWrvlFNwTtxi9XY90h/Af/tLUwRS4/V0/btE17r/v+2
 FgoCZkHiGt+zfTzDdBSc+sV1MMcSgIGHDVTIRD1x2BfMC3VBng1HZy8aVZL2f5YP
 FvDeP4W91bGSlfztKxZtZI7LLQ5oAJujgJFOvtqaaRQxV8Fk7DsNeSN58c9nRf4=
 =qYcp
 -----END PGP SIGNATURE-----

Merge tag 'imx-drivers-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers

i.MX driver changes for 5.3:
 - Add i.MX SCU based SoC bus driver for i.MX8QXP SoC support, which
   talks to SCU firmware for getting SoC ID and revision.
 - Update soc-imx8 bus driver to read imx8mm soc revision from anatop.
 - Add i.MX8MN SoC bus support into soc-imx8 driver.
 - Various small improvements on soc-imx8 bus driver.

* tag 'imx-drivers-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  soc: imx: Add i.MX8MN SoC driver support
  soc: imx8: Use existing of_root directly
  soc: imx8: Fix potential kernel dump in error path
  soc: imx: soc-imx8: Correct return value of error handle
  soc: imx: soc-imx8: Avoid unnecessary of_node_put() in error handling
  soc: imx: Add SCU SoC info driver support
  soc: imx: Read imx8mm soc revision from anatop

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-06-25 05:43:40 -07:00
Anson Huang 15f5276a2f soc: imx: Add SCU SoC info driver support
Add i.MX SCU SoC info driver to support i.MX8QXP SoC, introduce
driver dependency into Kconfig as CONFIG_IMX_SCU must be
selected to support i.MX SCU SoC driver, also need to use
platform driver model to make sure IMX_SCU driver is probed
before i.MX SCU SoC driver.

With this patch, SoC info can be read from sysfs:

i.mx8qxp-mek# cat /sys/devices/soc0/family
Freescale i.MX

i.mx8qxp-mek# cat /sys/devices/soc0/soc_id
0x2

i.mx8qxp-mek# cat /sys/devices/soc0/machine
Freescale i.MX8QXP MEK

i.mx8qxp-mek# cat /sys/devices/soc0/revision
1.1

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-06-03 20:30:37 +08:00
Thomas Gleixner ec8f24b7fa treewide: Add SPDX license identifier - Makefile/Kconfig
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 10:50:46 +02:00
Abel Vesa a7e26f356c soc: imx: Add generic i.MX8 SoC driver
Add generic i.MX8 SoC driver along with the i.MX8MQ SoC specific code.
For now, only i.MX8MQ revision B1 is supported. For any other, i.MX8MQ
revision it will print 'unknown'.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-04-20 21:26:36 +08:00
Lucas Stach 685efffe37 soc: imx: gpcv2: add support for i.MX8MQ SoC
The GPCv2 on the Freescale i.MX8MQ SoC works in the same way as the
GPCv2 on the i.MX7, but only controls more power domains with a
different mapping.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-12-05 08:50:36 +08:00
Marc Ohlf c465a32fdd soc: imx: gpc: build gpc only if hardware has gpc
Add CONFIG_HAVE_IMX_GPC to goal definition of gpc.o,
to avoid building it for hardware that does not need it.

Signed-off-by: Marc Ohlf <ohlf@mkt-sys.de>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-05-15 10:22:25 +08:00
Andrey Smirnov 03aa12629f soc: imx: Add GPCv2 power gating driver
Add code allowing for control of various power domains managed by GPCv2
IP block found in i.MX7 series of SoCs. Power domains covered by this
patch are:

    - PCIE PHY
    - MIPI PHY
    - USB HSIC PHY
    - USB OTG1/2 PHY

Support for any other power domain controlled by GPC is not present, and
can be added at some later point.

Testing of this code was done against a PCIe driver.

Cc: yurovsky@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Dong Aisheng <dongas86@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-04-07 19:37:07 +08:00
Lucas Stach 721cabf6c6 soc: imx: move PGC handling to a new GPC driver
This is an almost complete re-write of the previous GPC power gating control
code found in the IMX architecture code. It supports both the old and the new
DT binding, allowing more domains to be added later and generally makes the
driver easier to extend, while keeping compatibility with existing DTBs.

As the result, all functionality regarding the power gating controller
gets removed from the IMX architecture GPC driver.  It keeps only the
IRQ controller code in the architecture, as this is closely coupled to
the CPU idle implementation.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-03-08 11:55:47 +01:00