Skip to content

Commit dc413a9

Browse files
committed
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM SoC-related driver updates from Olof Johansson: "Various driver updates for platforms and a couple of the small driver subsystems we merge through our tree: Among the larger pieces: - Power management improvements for TI am335x and am437x (RTC suspend/wake) - Misc new additions for Amlogic (socinfo updates) - ZynqMP FPGA manager - Nvidia improvements for reset/powergate handling - PMIC wrapper for Mediatek MT8516 - Misc fixes/improvements for ARM SCMI, TEE, NXP i.MX SCU drivers" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (57 commits) soc: aspeed: fix Kconfig soc: add aspeed folder and misc drivers spi: zynqmp: Fix build break soc: imx: Add generic i.MX8 SoC driver MAINTAINERS: Update email for Qualcomm SoC maintainer memory: tegra: Fix a typos for "fdcdwr2" mc client Revert "ARM: tegra: Restore memory arbitration on resume from LP1 on Tegra30+" memory: tegra: Replace readl-writel with mc_readl-mc_writel memory: tegra: Fix integer overflow on tick value calculation memory: tegra: Fix missed registers values latching ARM: tegra: cpuidle: Handle tick broadcasting within cpuidle core on Tegra20/30 optee: allow to work without static shared memory soc/tegra: pmc: Move powergate initialisation to probe soc/tegra: pmc: Remove reset sysfs entries on error soc/tegra: pmc: Fix reset sources and levels soc: amlogic: meson-gx-pwrc-vpu: Add support for G12A soc: amlogic: meson-gx-pwrc-vpu: Fix power on/off register bitmask fpga manager: Adding FPGA Manager support for Xilinx zynqmp dt-bindings: fpga: Add bindings for ZynqMP fpga driver firmware: xilinx: Add fpga API's ...
2 parents e8a1d70 + 80d0c64 commit dc413a9

71 files changed

Lines changed: 1717 additions & 434 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Devicetree bindings for Zynq Ultrascale MPSoC FPGA Manager.
2+
The ZynqMP SoC uses the PCAP (Processor configuration Port) to configure the
3+
Programmable Logic (PL). The configuration uses the firmware interface.
4+
5+
Required properties:
6+
- compatible: should contain "xlnx,zynqmp-pcap-fpga"
7+
8+
Example for full FPGA configuration:
9+
10+
fpga-region0 {
11+
compatible = "fpga-region";
12+
fpga-mgr = <&zynqmp_pcap>;
13+
#address-cells = <0x1>;
14+
#size-cells = <0x1>;
15+
};
16+
17+
firmware {
18+
zynqmp_firmware: zynqmp-firmware {
19+
compatible = "xlnx,zynqmp-firmware";
20+
method = "smc";
21+
zynqmp_pcap: pcap {
22+
compatible = "xlnx,zynqmp-pcap-fpga";
23+
};
24+
};
25+
};

‎Documentation/devicetree/bindings/soc/mediatek/pwrap.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Required properties in pwrap device node.
2525
"mediatek,mt8135-pwrap" for MT8135 SoCs
2626
"mediatek,mt8173-pwrap" for MT8173 SoCs
2727
"mediatek,mt8183-pwrap" for MT8183 SoCs
28+
"mediatek,mt8516-pwrap" for MT8516 SoCs
2829
- interrupts: IRQ for pwrap in SOC
2930
- reg-names: Must include the following entries:
3031
"pwrap": Main registers base

‎Documentation/xilinx/eemi.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Example of EEMI ops usage:
4141
int ret;
4242

4343
eemi_ops = zynqmp_pm_get_eemi_ops();
44-
if (!eemi_ops)
45-
return -ENXIO;
44+
if (IS_ERR(eemi_ops))
45+
return PTR_ERR(eemi_ops);
4646

4747
ret = eemi_ops->query_data(qdata, ret_payload);
4848

‎MAINTAINERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ W: http://www.armlinux.org.uk/
20432043
S: Maintained
20442044

20452045
ARM/QUALCOMM SUPPORT
2046-
M: Andy Gross <andy.gross@linaro.org>
2046+
M: Andy Gross <agross@kernel.org>
20472047
M: David Brown <david.brown@linaro.org>
20482048
L: linux-arm-msm@vger.kernel.org
20492049
S: Maintained

‎arch/arm/mach-omap2/pm33xx-core.c‎

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
#include <asm/suspend.h>
1111
#include <linux/errno.h>
1212
#include <linux/platform_data/pm33xx.h>
13+
#include <linux/clk.h>
14+
#include <linux/platform_data/gpio-omap.h>
15+
#include <linux/pinctrl/pinmux.h>
16+
#include <linux/wkup_m3_ipc.h>
17+
#include <linux/of.h>
18+
#include <linux/rtc.h>
1319

1420
#include "cm33xx.h"
1521
#include "common.h"
@@ -38,6 +44,29 @@ static int am43xx_map_scu(void)
3844
return 0;
3945
}
4046

47+
static int am33xx_check_off_mode_enable(void)
48+
{
49+
if (enable_off_mode)
50+
pr_warn("WARNING: This platform does not support off-mode, entering DeepSleep suspend.\n");
51+
52+
/* off mode not supported on am335x so return 0 always */
53+
return 0;
54+
}
55+
56+
static int am43xx_check_off_mode_enable(void)
57+
{
58+
/*
59+
* Check for am437x-gp-evm which has the right Hardware design to
60+
* support this mode reliably.
61+
*/
62+
if (of_machine_is_compatible("ti,am437x-gp-evm") && enable_off_mode)
63+
return enable_off_mode;
64+
else if (enable_off_mode)
65+
pr_warn("WARNING: This platform does not support off-mode, entering DeepSleep suspend.\n");
66+
67+
return 0;
68+
}
69+
4170
static int amx3_common_init(void)
4271
{
4372
gfx_pwrdm = pwrdm_lookup("gfx_pwrdm");
@@ -141,7 +170,9 @@ static int am43xx_suspend(unsigned int state, int (*fn)(unsigned long),
141170
scu_power_mode(scu_base, SCU_PM_POWEROFF);
142171
ret = cpu_suspend(args, fn);
143172
scu_power_mode(scu_base, SCU_PM_NORMAL);
144-
amx3_post_suspend_common();
173+
174+
if (!am43xx_check_off_mode_enable())
175+
amx3_post_suspend_common();
145176

146177
return ret;
147178
}
@@ -163,17 +194,60 @@ void __iomem *am43xx_get_rtc_base_addr(void)
163194
return omap_hwmod_get_mpu_rt_va(rtc_oh);
164195
}
165196

197+
static void am43xx_save_context(void)
198+
{
199+
}
200+
201+
static void am33xx_save_context(void)
202+
{
203+
omap_intc_save_context();
204+
}
205+
206+
static void am33xx_restore_context(void)
207+
{
208+
omap_intc_restore_context();
209+
}
210+
211+
static void am43xx_restore_context(void)
212+
{
213+
/*
214+
* HACK: restore dpll_per_clkdcoldo register contents, to avoid
215+
* breaking suspend-resume
216+
*/
217+
writel_relaxed(0x0, AM33XX_L4_WK_IO_ADDRESS(0x44df2e14));
218+
}
219+
220+
static void am43xx_prepare_rtc_suspend(void)
221+
{
222+
omap_hwmod_enable(rtc_oh);
223+
}
224+
225+
static void am43xx_prepare_rtc_resume(void)
226+
{
227+
omap_hwmod_idle(rtc_oh);
228+
}
229+
166230
static struct am33xx_pm_platform_data am33xx_ops = {
167231
.init = am33xx_suspend_init,
168232
.soc_suspend = am33xx_suspend,
169233
.get_sram_addrs = amx3_get_sram_addrs,
234+
.save_context = am33xx_save_context,
235+
.restore_context = am33xx_restore_context,
236+
.prepare_rtc_suspend = am43xx_prepare_rtc_suspend,
237+
.prepare_rtc_resume = am43xx_prepare_rtc_resume,
238+
.check_off_mode_enable = am33xx_check_off_mode_enable,
170239
.get_rtc_base_addr = am43xx_get_rtc_base_addr,
171240
};
172241

173242
static struct am33xx_pm_platform_data am43xx_ops = {
174243
.init = am43xx_suspend_init,
175244
.soc_suspend = am43xx_suspend,
176245
.get_sram_addrs = amx3_get_sram_addrs,
246+
.save_context = am43xx_save_context,
247+
.restore_context = am43xx_restore_context,
248+
.prepare_rtc_suspend = am43xx_prepare_rtc_suspend,
249+
.prepare_rtc_resume = am43xx_prepare_rtc_resume,
250+
.check_off_mode_enable = am43xx_check_off_mode_enable,
177251
.get_rtc_base_addr = am43xx_get_rtc_base_addr,
178252
};
179253

‎arch/arm/mach-omap2/sleep43xx.S‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ wait_emif_enable1:
368368
mov r1, #AM43XX_EMIF_POWEROFF_DISABLE
369369
str r1, [r2, #0x0]
370370

371+
ldr r1, [r9, #EMIF_PM_RUN_HW_LEVELING]
372+
blx r1
373+
371374
#ifdef CONFIG_CACHE_L2X0
372375
ldr r2, l2_cache_base
373376
ldr r0, [r2, #L2X0_CTRL]

‎arch/arm/mach-tegra/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ menuconfig ARCH_TEGRA
1010
select HAVE_ARM_SCU if SMP
1111
select HAVE_ARM_TWD if SMP
1212
select PINCTRL
13+
select PM
1314
select PM_OPP
1415
select RESET_CONTROLLER
1516
select SOC_BUS

‎arch/arm/mach-tegra/cpuidle-tegra20.c‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ static struct cpuidle_driver tegra_idle_driver = {
6161
.exit_latency = 5000,
6262
.target_residency = 10000,
6363
.power_usage = 0,
64-
.flags = CPUIDLE_FLAG_COUPLED,
64+
.flags = CPUIDLE_FLAG_COUPLED |
65+
CPUIDLE_FLAG_TIMER_STOP,
6566
.name = "powered-down",
6667
.desc = "CPU power gated",
6768
},
@@ -136,12 +137,8 @@ static bool tegra20_cpu_cluster_power_down(struct cpuidle_device *dev,
136137
if (tegra20_reset_cpu_1() || !tegra_cpu_rail_off_ready())
137138
return false;
138139

139-
tick_broadcast_enter();
140-
141140
tegra_idle_lp2_last();
142141

143-
tick_broadcast_exit();
144-
145142
if (cpu_online(1))
146143
tegra20_wake_cpu1_from_reset();
147144

@@ -153,14 +150,10 @@ static bool tegra20_idle_enter_lp2_cpu_1(struct cpuidle_device *dev,
153150
struct cpuidle_driver *drv,
154151
int index)
155152
{
156-
tick_broadcast_enter();
157-
158153
cpu_suspend(0, tegra20_sleep_cpu_secondary_finish);
159154

160155
tegra20_cpu_clear_resettable();
161156

162-
tick_broadcast_exit();
163-
164157
return true;
165158
}
166159
#else

‎arch/arm/mach-tegra/cpuidle-tegra30.c‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ static struct cpuidle_driver tegra_idle_driver = {
5656
.exit_latency = 2000,
5757
.target_residency = 2200,
5858
.power_usage = 0,
59+
.flags = CPUIDLE_FLAG_TIMER_STOP,
5960
.name = "powered-down",
6061
.desc = "CPU power gated",
6162
},
@@ -76,12 +77,8 @@ static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev,
7677
return false;
7778
}
7879

79-
tick_broadcast_enter();
80-
8180
tegra_idle_lp2_last();
8281

83-
tick_broadcast_exit();
84-
8582
return true;
8683
}
8784

@@ -90,14 +87,10 @@ static bool tegra30_cpu_core_power_down(struct cpuidle_device *dev,
9087
struct cpuidle_driver *drv,
9188
int index)
9289
{
93-
tick_broadcast_enter();
94-
9590
smp_wmb();
9691

9792
cpu_suspend(0, tegra30_sleep_cpu_secondary_finish);
9893

99-
tick_broadcast_exit();
100-
10194
return true;
10295
}
10396
#else

‎arch/arm/mach-tegra/iomap.h‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,15 @@
7979
#define TEGRA_PMC_BASE 0x7000E400
8080
#define TEGRA_PMC_SIZE SZ_256
8181

82-
#define TEGRA_MC_BASE 0x7000F000
83-
#define TEGRA_MC_SIZE SZ_1K
84-
8582
#define TEGRA_EMC_BASE 0x7000F400
8683
#define TEGRA_EMC_SIZE SZ_1K
8784

88-
#define TEGRA114_MC_BASE 0x70019000
89-
#define TEGRA114_MC_SIZE SZ_4K
90-
9185
#define TEGRA_EMC0_BASE 0x7001A000
9286
#define TEGRA_EMC0_SIZE SZ_2K
9387

9488
#define TEGRA_EMC1_BASE 0x7001A800
9589
#define TEGRA_EMC1_SIZE SZ_2K
9690

97-
#define TEGRA124_MC_BASE 0x70019000
98-
#define TEGRA124_MC_SIZE SZ_4K
99-
10091
#define TEGRA124_EMC_BASE 0x7001B000
10192
#define TEGRA124_EMC_SIZE SZ_2K
10293

0 commit comments

Comments
 (0)