Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61c5e492 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'v4.11-armsoc-drivers1' of...

Merge tag 'v4.11-armsoc-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/drivers

Some extensions to the power-domain driver to support domains in
hiword registers (write-mask in upper 16bit) and domain-definitions
for the rk3328 soc.

Secondly a "driver" that attaches to the already existing grf nodes
and is able to set static defaults for settings that cannot really
be attached to any specific subsystem.
Most GRF settings can already be set from drivers using them, but there
are some behavioural settings like the mmc/jtag switch that cannot.

As the commit message states this is really meant as a last line
of defence for things that neither belong to a subsystem nor to the

Having this here allows arm64 socs to have this as well and also
moves another bit of code out of the arm32 mach-rockchip.

* tag 'v4.11-armsoc-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip

:
  ARM: rockchip: drop rk3288 jtag/mmc switch handling
  soc: rockchip: add driver handling grf setup
  dt-bindings: add used but undocumented rockchip grf compatible values
  soc: rockchip: power-domain: add power domain support for rk3328
  dt-bindings: add binding for rk3328 power domains
  dt-bindings: power: add RK3328 SoCs header for idle-request
  soc: rockchip: power-domain: Support domain control in hiword-registers

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents ef73594a 19f0f302
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -5,11 +5,13 @@ is composed of many registers for system control.

From RK3368 SoCs, the GRF is divided into two sections,
- GRF, used for general non-secure system,
- SGRF, used for general secure system,
- PMUGRF, used for always on system

Required Properties:

- compatible: GRF should be one of the followings
   - "rockchip,rk3036-grf", "syscon": for rk3036
   - "rockchip,rk3066-grf", "syscon": for rk3066
   - "rockchip,rk3188-grf", "syscon": for rk3188
   - "rockchip,rk3228-grf", "syscon": for rk3228
@@ -19,6 +21,8 @@ Required Properties:
- compatible: PMUGRF should be one of the followings
   - "rockchip,rk3368-pmugrf", "syscon": for rk3368
   - "rockchip,rk3399-pmugrf", "syscon": for rk3399
- compatible: SGRF should be one of the following
   - "rockchip,rk3288-sgrf", "syscon": for rk3288
- reg: physical base address of the controller and length of memory mapped
  region.

+3 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ powered up/down by software based on different application scenes to save power.
Required properties for power domain controller:
- compatible: Should be one of the following.
	"rockchip,rk3288-power-controller" - for RK3288 SoCs.
	"rockchip,rk3328-power-controller" - for RK3328 SoCs.
	"rockchip,rk3368-power-controller" - for RK3368 SoCs.
	"rockchip,rk3399-power-controller" - for RK3399 SoCs.
- #power-domain-cells: Number of cells in a power-domain specifier.
@@ -16,6 +17,7 @@ Required properties for power domain controller:
Required properties for power domain sub nodes:
- reg: index of the power domain, should use macros in:
	"include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain.
	"include/dt-bindings/power/rk3328-power.h" - for RK3328 type power domain.
	"include/dt-bindings/power/rk3368-power.h" - for RK3368 type power domain.
	"include/dt-bindings/power/rk3399-power.h" - for RK3399 type power domain.
- clocks (optional): phandles to clocks which need to be enabled while power domain
@@ -90,6 +92,7 @@ containing a phandle to the power device node and an index specifying which
power domain to use.
The index should use macros in:
	"include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain.
	"include/dt-bindings/power/rk3328-power.h" - for rk3328 type power domain.
	"include/dt-bindings/power/rk3368-power.h" - for rk3368 type power domain.
	"include/dt-bindings/power/rk3399-power.h" - for rk3399 type power domain.

+0 −12
Original line number Diff line number Diff line
@@ -29,13 +29,11 @@
#include "core.h"
#include "pm.h"

#define RK3288_GRF_SOC_CON0 0x244
#define RK3288_TIMER6_7_PHYS 0xff810000

static void __init rockchip_timer_init(void)
{
	if (of_machine_is_compatible("rockchip,rk3288")) {
		struct regmap *grf;
		void __iomem *reg_base;

		/*
@@ -54,16 +52,6 @@ static void __init rockchip_timer_init(void)
		} else {
			pr_err("rockchip: could not map timer7 registers\n");
		}

		/*
		 * Disable auto jtag/sdmmc switching that causes issues
		 * with the mmc controllers making them unreliable
		 */
		grf = syscon_regmap_lookup_by_compatible("rockchip,rk3288-grf");
		if (!IS_ERR(grf))
			regmap_write(grf, RK3288_GRF_SOC_CON0, 0x10000000);
		else
			pr_err("rockchip: could not get grf syscon\n");
	}

	of_clk_init(NULL);
+10 −0
Original line number Diff line number Diff line
@@ -3,6 +3,16 @@ if ARCH_ROCKCHIP || COMPILE_TEST
#
# Rockchip Soc drivers
#

config ROCKCHIP_GRF
	bool
	default y
	help
	  The General Register Files are a central component providing
	  special additional settings registers for a lot of soc-components.
	  In a lot of cases there also need to be default settings initialized
	  to make some of them conform to expectations of the kernel.

config ROCKCHIP_PM_DOMAINS
        bool "Rockchip generic power domain"
        depends on PM
+1 −0
Original line number Diff line number Diff line
#
# Rockchip Soc drivers
#
obj-$(CONFIG_ROCKCHIP_GRF) += grf.o
obj-$(CONFIG_ROCKCHIP_PM_DOMAINS) += pm_domains.o
Loading