Skip to content

Commit

Permalink
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/arm/arm-soc

Pull ARM SoC driver updates from Olof Johansson:
 "This branch contains platform-related driver updates for ARM and ARM64.

  Among them:

   - Reset driver updates:
     + New API for dealing with arrays of resets
     + Make unimplemented {de,}assert return success on shared resets
     + MSDKv1 driver
     + Removal of obsolete Gemini reset driver
     + Misc updates for sunxi and Uniphier

   - SoC drivers:
     + Platform SoC driver registration on Tegra
     + Shuffle of Qualcomm drivers into a submenu
     + Allwinner A64 support for SRAM
     + Renesas R-Car R3 support
     + Power domains for Rockchip RK3366

   - Misc updates and smaller fixes for TEE and memory driver
     subsystems"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits)
  firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set
  soc/tegra: fuse: Add missing semi-colon
  soc/tegra: Restrict SoC device registration to Tegra
  drivers: soc: sunxi: add support for A64 and its SRAM C
  drivers: soc: sunxi: add support for remapping func value to reg value
  drivers: soc: sunxi: fix error processing on base address when claiming
  dt-bindings: add binding for Allwinner A64 SRAM controller and SRAM C
  bus: sunxi-rsb: Enable by default for ARM64
  soc/tegra: Register SoC device
  firmware: tegra: set drvdata earlier
  memory: Convert to using %pOF instead of full_name
  soc: Convert to using %pOF instead of full_name
  bus: Convert to using %pOF instead of full_name
  firmware: Convert to using %pOF instead of full_name
  soc: mediatek: add SCPSYS power domain driver for MediaTek MT7622 SoC
  soc: mediatek: add header files required for MT7622 SCPSYS dt-binding
  soc: mediatek: reduce code duplication of scpsys_probe across all SoCs
  dt-bindings: soc: update the binding document for SCPSYS on MediaTek MT7622 SoC
  reset: uniphier: add analog amplifiers reset control
  reset: uniphier: add video input subsystem reset control
  ...
  • Loading branch information
torvalds committed Sep 11, 2017
2 parents 7f1b9be + a48a7b6 commit ae46654
Show file tree
Hide file tree
Showing 74 changed files with 1,347 additions and 462 deletions.
29 changes: 29 additions & 0 deletions Documentation/devicetree/bindings/arm/amlogic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,32 @@ Board compatible values (alphabetically, grouped by SoC):
- "amlogic,q201" (Meson gxm s912)
- "kingnovel,r-box-pro" (Meson gxm S912)
- "nexbox,a1" (Meson gxm s912)

Amlogic Meson Firmware registers Interface
------------------------------------------

The Meson SoCs have a register bank with status and data shared with the
secure firmware.

Required properties:
- compatible: For Meson GX SoCs, must be "amlogic,meson-gx-ao-secure", "syscon"

Properties should indentify components of this register interface :

Meson GX SoC Information
------------------------
A firmware register encodes the SoC type, package and revision information on
the Meson GX SoCs.
If present, the following property should be added :

Optional properties:
- amlogic,has-chip-id: If present, the interface gives the current SoC version.

Example
-------

ao-secure@140 {
compatible = "amlogic,meson-gx-ao-secure", "syscon";
reg = <0x0 0x140 0x0 0x140>;
amlogic,has-chip-id;
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Required properties:
- "renesas,r8a7794-sysc" (R-Car E2)
- "renesas,r8a7795-sysc" (R-Car H3)
- "renesas,r8a7796-sysc" (R-Car M3-W)
- "renesas,r8a77995-sysc" (R-Car D3)
- reg: Address start and address range for the device.
- #power-domain-cells: Must be 1.

Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/reset/renesas,rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Required properties:
- "renesas,r8a7794-rst" (R-Car E2)
- "renesas,r8a7795-rst" (R-Car H3)
- "renesas,r8a7796-rst" (R-Car M3-W)
- "renesas,r8a77995-rst" (R-Car D3)
- reg: Address start and address range for the device.


Expand Down
27 changes: 25 additions & 2 deletions Documentation/devicetree/bindings/reset/uniphier-reset.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ System reset

Required properties:
- compatible: should be one of the following:
"socionext,uniphier-sld3-reset" - for sLD3 SoC
"socionext,uniphier-ld4-reset" - for LD4 SoC
"socionext,uniphier-pro4-reset" - for Pro4 SoC
"socionext,uniphier-sld8-reset" - for sLD8 SoC
Expand Down Expand Up @@ -37,7 +36,6 @@ Media I/O (MIO) reset, SD reset

Required properties:
- compatible: should be one of the following:
"socionext,uniphier-sld3-mio-reset" - for sLD3 SoC
"socionext,uniphier-ld4-mio-reset" - for LD4 SoC
"socionext,uniphier-pro4-mio-reset" - for Pro4 SoC
"socionext,uniphier-sld8-mio-reset" - for sLD8 SoC
Expand Down Expand Up @@ -92,3 +90,28 @@ Example:

other nodes ...
};


Analog signal amplifier reset
-----------------------------

Required properties:
- compatible: should be one of the following:
"socionext,uniphier-ld11-adamv-reset" - for LD11 SoC
"socionext,uniphier-ld20-adamv-reset" - for LD20 SoC
- #reset-cells: should be 1.

Example:

adamv@57920000 {
compatible = "socionext,uniphier-ld11-adamv",
"simple-mfd", "syscon";
reg = <0x57920000 0x1000>;

adamv_rst: reset {
compatible = "socionext,uniphier-ld11-adamv-reset";
#reset-cells = <1>;
};

other nodes ...
};
3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ power/power_domain.txt. It provides the power domains defined in
- include/dt-bindings/power/mt8173-power.h
- include/dt-bindings/power/mt6797-power.h
- include/dt-bindings/power/mt2701-power.h
- include/dt-bindings/power/mt7622-power.h

Required properties:
- compatible: Should be one of:
- "mediatek,mt2701-scpsys"
- "mediatek,mt6797-scpsys"
- "mediatek,mt7622-scpsys"
- "mediatek,mt8173-scpsys"
- #power-domain-cells: Must be 1
- reg: Address range of the SCPSYS unit
Expand All @@ -26,6 +28,7 @@ Required properties:
enabled before enabling certain power domains.
Required clocks for MT2701: "mm", "mfg", "ethif"
Required clocks for MT6797: "mm", "mfg", "vdec"
Required clocks for MT7622: "hif_sel"
Required clocks for MT8173: "mm", "mfg", "venc", "venc_lt"

Optional properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ 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,rk3366-power-controller" - for RK3366 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.
Expand All @@ -18,6 +19,7 @@ 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/rk3366-power.h" - for RK3366 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
Expand Down Expand Up @@ -93,6 +95,7 @@ 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/rk3366-power.h" - for rk3366 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.

Expand Down
9 changes: 7 additions & 2 deletions Documentation/devicetree/bindings/sram/sunxi-sram.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Controller Node
---------------

Required properties:
- compatible : "allwinner,sun4i-a10-sram-controller"
- compatible : should be:
- "allwinner,sun4i-a10-sram-controller"
- "allwinner,sun50i-a64-sram-controller"
- reg : sram controller register offset + length

SRAM nodes
Expand All @@ -22,10 +24,13 @@ Each SRAM will have SRAM sections that are going to be handled by the
SRAM controller as subnodes. These sections are represented following
once again the representation described in the mmio-sram binding.

The valid sections compatible are:
The valid sections compatible for A10 are:
- allwinner,sun4i-a10-sram-a3-a4
- allwinner,sun4i-a10-sram-d

The valid sections compatible for A64 are:
- allwinner,sun50i-a64-sram-c

Devices using SRAM sections
---------------------------

Expand Down
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -12867,6 +12867,13 @@ L: [email protected]
S: Maintained
F: drivers/mmc/host/dw_mmc*

SYNOPSYS HSDK RESET CONTROLLER DRIVER
M: Eugeniy Paltsev <[email protected]>
S: Supported
F: drivers/reset/reset-hsdk-v1.c
F: include/dt-bindings/reset/snps,hsdk-v1-reset.h
F: Documentation/devicetree/bindings/reset/snps,hsdk-v1-reset.txt

SYSTEM CONFIGURATION (SYSCON)
M: Lee Jones <[email protected]>
M: Arnd Bergmann <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-mediatek/mediatek.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ static void __init mediatek_timer_init(void)

if (of_machine_is_compatible("mediatek,mt6589") ||
of_machine_is_compatible("mediatek,mt7623") ||
of_machine_is_compatible("mediatek,mt7623a") ||
of_machine_is_compatible("mediatek,mt8135") ||
of_machine_is_compatible("mediatek,mt8127")) {
/* turn on GPT6 which ungates arch timer clocks */
Expand All @@ -49,6 +50,7 @@ static const char * const mediatek_board_dt_compat[] = {
"mediatek,mt6589",
"mediatek,mt6592",
"mediatek,mt7623",
"mediatek,mt7623a",
"mediatek,mt8127",
"mediatek,mt8135",
NULL,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-mediatek/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = {
static const struct of_device_id mtk_smp_boot_infos[] __initconst = {
{ .compatible = "mediatek,mt6589", .data = &mtk_mt6589_boot },
{ .compatible = "mediatek,mt7623", .data = &mtk_mt7623_boot },
{ .compatible = "mediatek,mt7623a", .data = &mtk_mt7623_boot },
};

static void __iomem *mtk_smp_base;
Expand Down
29 changes: 1 addition & 28 deletions arch/arm/mach-tegra/tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,35 +84,8 @@ static void __init tegra_dt_init_irq(void)

static void __init tegra_dt_init(void)
{
struct soc_device_attribute *soc_dev_attr;
struct soc_device *soc_dev;
struct device *parent = NULL;
struct device *parent = tegra_soc_device_register();

soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
if (!soc_dev_attr)
goto out;

soc_dev_attr->family = kasprintf(GFP_KERNEL, "Tegra");
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d",
tegra_sku_info.revision);
soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%u", tegra_get_chip_id());

soc_dev = soc_device_register(soc_dev_attr);
if (IS_ERR(soc_dev)) {
kfree(soc_dev_attr->family);
kfree(soc_dev_attr->revision);
kfree(soc_dev_attr->soc_id);
kfree(soc_dev_attr);
goto out;
}

parent = soc_device_to_device(soc_dev);

/*
* Finished with the static registrations now; fill in the missing
* devices
*/
out:
of_platform_default_populate(NULL, NULL, parent);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/bus/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ config SIMPLE_PM_BUS

config SUNXI_RSB
tristate "Allwinner sunXi Reduced Serial Bus Driver"
default MACH_SUN8I || MACH_SUN9I
default MACH_SUN8I || MACH_SUN9I || ARM64
depends on ARCH_SUNXI
select REGMAP
help
Expand Down
12 changes: 6 additions & 6 deletions drivers/bus/arm-cci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2124,8 +2124,8 @@ int notrace __cci_control_port_by_device(struct device_node *dn, bool enable)
return -ENODEV;

port = __cci_ace_get_port(dn, ACE_LITE_PORT);
if (WARN_ONCE(port < 0, "node %s ACE lite port look-up failure\n",
dn->full_name))
if (WARN_ONCE(port < 0, "node %pOF ACE lite port look-up failure\n",
dn))
return -ENODEV;
cci_port_control(port, enable);
return 0;
Expand Down Expand Up @@ -2200,14 +2200,14 @@ static int cci_probe_ports(struct device_node *np)

if (of_property_read_string(cp, "interface-type",
&match_str)) {
WARN(1, "node %s missing interface-type property\n",
cp->full_name);
WARN(1, "node %pOF missing interface-type property\n",
cp);
continue;
}
is_ace = strcmp(match_str, "ace") == 0;
if (!is_ace && strcmp(match_str, "ace-lite")) {
WARN(1, "node %s containing invalid interface-type property, skipping it\n",
cp->full_name);
WARN(1, "node %pOF containing invalid interface-type property, skipping it\n",
cp);
continue;
}

Expand Down
8 changes: 4 additions & 4 deletions drivers/bus/imx-weim.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ static int __init weim_parse_dt(struct platform_device *pdev,

ret = weim_timing_setup(child, base, devtype);
if (ret)
dev_warn(&pdev->dev, "%s set timing failed.\n",
child->full_name);
dev_warn(&pdev->dev, "%pOF set timing failed.\n",
child);
else
have_child = 1;
}
Expand All @@ -166,8 +166,8 @@ static int __init weim_parse_dt(struct platform_device *pdev,
ret = of_platform_default_populate(pdev->dev.of_node,
NULL, &pdev->dev);
if (ret)
dev_err(&pdev->dev, "%s fail to create devices.\n",
pdev->dev.of_node->full_name);
dev_err(&pdev->dev, "%pOF fail to create devices.\n",
pdev->dev.of_node);
return ret;
}

Expand Down
22 changes: 11 additions & 11 deletions drivers/bus/sunxi-rsb.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,20 +556,20 @@ static int of_rsb_register_devices(struct sunxi_rsb *rsb)

/* Runtime addresses for all slaves should be set first */
for_each_available_child_of_node(np, child) {
dev_dbg(dev, "setting child %s runtime address\n",
child->full_name);
dev_dbg(dev, "setting child %pOF runtime address\n",
child);

ret = of_property_read_u32(child, "reg", &hwaddr);
if (ret) {
dev_err(dev, "%s: invalid 'reg' property: %d\n",
child->full_name, ret);
dev_err(dev, "%pOF: invalid 'reg' property: %d\n",
child, ret);
continue;
}

rtaddr = sunxi_rsb_get_rtaddr(hwaddr);
if (!rtaddr) {
dev_err(dev, "%s: unknown hardware device address\n",
child->full_name);
dev_err(dev, "%pOF: unknown hardware device address\n",
child);
continue;
}

Expand All @@ -586,15 +586,15 @@ static int of_rsb_register_devices(struct sunxi_rsb *rsb)
/* send command */
ret = _sunxi_rsb_run_xfer(rsb);
if (ret)
dev_warn(dev, "%s: set runtime address failed: %d\n",
child->full_name, ret);
dev_warn(dev, "%pOF: set runtime address failed: %d\n",
child, ret);
}

/* Then we start adding devices and probing them */
for_each_available_child_of_node(np, child) {
struct sunxi_rsb_device *rdev;

dev_dbg(dev, "adding child %s\n", child->full_name);
dev_dbg(dev, "adding child %pOF\n", child);

ret = of_property_read_u32(child, "reg", &hwaddr);
if (ret)
Expand All @@ -606,8 +606,8 @@ static int of_rsb_register_devices(struct sunxi_rsb *rsb)

rdev = sunxi_rsb_device_create(rsb, child, hwaddr, rtaddr);
if (IS_ERR(rdev))
dev_err(dev, "failed to add child device %s: %ld\n",
child->full_name, PTR_ERR(rdev));
dev_err(dev, "failed to add child device %pOF: %ld\n",
child, PTR_ERR(rdev));
}

return 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/firmware/arm_scpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ struct sensor_value {
} __packed;

struct dev_pstate_set {
u16 dev_id;
__le16 dev_id;
u8 pstate;
} __packed;

Expand Down Expand Up @@ -965,7 +965,7 @@ static int scpi_probe(struct platform_device *pdev)

count = of_count_phandle_with_args(np, "mboxes", "#mbox-cells");
if (count < 0) {
dev_err(dev, "no mboxes property in '%s'\n", np->full_name);
dev_err(dev, "no mboxes property in '%pOF'\n", np);
return -ENODEV;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/firmware/psci.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu)
"arm,psci-suspend-param",
&state);
if (ret) {
pr_warn(" * %s missing arm,psci-suspend-param property\n",
state_node->full_name);
pr_warn(" * %pOF missing arm,psci-suspend-param property\n",
state_node);
of_node_put(state_node);
goto free_mem;
}
Expand Down
Loading

0 comments on commit ae46654

Please sign in to comment.