aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dt-bindings/genpd/k2g.h90
-rw-r--r--include/dt-bindings/power/imx7-power.h16
-rw-r--r--include/dt-bindings/power/r8a7795-sysc.h2
-rw-r--r--include/dt-bindings/reset/altr,rst-mgr-a10sr.h33
-rw-r--r--include/dt-bindings/reset/imx7-reset.h62
-rw-r--r--include/linux/firmware/meson/meson_sm.h4
-rw-r--r--include/linux/pm_domain.h1
-rw-r--r--include/linux/qcom_scm.h6
-rw-r--r--include/soc/tegra/flowctrl.h82
-rw-r--r--include/soc/tegra/pmc.h29
10 files changed, 314 insertions, 11 deletions
diff --git a/include/dt-bindings/genpd/k2g.h b/include/dt-bindings/genpd/k2g.h
new file mode 100644
index 000000000000..1f31f17e19eb
--- /dev/null
+++ b/include/dt-bindings/genpd/k2g.h
@@ -0,0 +1,90 @@
1/*
2 * TI K2G SoC Device definitions
3 *
4 * Copyright (C) 2015-2017 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#ifndef _DT_BINDINGS_GENPD_K2G_H
18#define _DT_BINDINGS_GENPD_K2G_H
19
20/* Documented in http://processors.wiki.ti.com/index.php/TISCI */
21
22#define K2G_DEV_PMMC0 0x0000
23#define K2G_DEV_MLB0 0x0001
24#define K2G_DEV_DSS0 0x0002
25#define K2G_DEV_MCBSP0 0x0003
26#define K2G_DEV_MCASP0 0x0004
27#define K2G_DEV_MCASP1 0x0005
28#define K2G_DEV_MCASP2 0x0006
29#define K2G_DEV_DCAN0 0x0008
30#define K2G_DEV_DCAN1 0x0009
31#define K2G_DEV_EMIF0 0x000a
32#define K2G_DEV_MMCHS0 0x000b
33#define K2G_DEV_MMCHS1 0x000c
34#define K2G_DEV_GPMC0 0x000d
35#define K2G_DEV_ELM0 0x000e
36#define K2G_DEV_SPI0 0x0010
37#define K2G_DEV_SPI1 0x0011
38#define K2G_DEV_SPI2 0x0012
39#define K2G_DEV_SPI3 0x0013
40#define K2G_DEV_ICSS0 0x0014
41#define K2G_DEV_ICSS1 0x0015
42#define K2G_DEV_USB0 0x0016
43#define K2G_DEV_USB1 0x0017
44#define K2G_DEV_NSS0 0x0018
45#define K2G_DEV_PCIE0 0x0019
46#define K2G_DEV_GPIO0 0x001b
47#define K2G_DEV_GPIO1 0x001c
48#define K2G_DEV_TIMER64_0 0x001d
49#define K2G_DEV_TIMER64_1 0x001e
50#define K2G_DEV_TIMER64_2 0x001f
51#define K2G_DEV_TIMER64_3 0x0020
52#define K2G_DEV_TIMER64_4 0x0021
53#define K2G_DEV_TIMER64_5 0x0022
54#define K2G_DEV_TIMER64_6 0x0023
55#define K2G_DEV_MSGMGR0 0x0025
56#define K2G_DEV_BOOTCFG0 0x0026
57#define K2G_DEV_ARM_BOOTROM0 0x0027
58#define K2G_DEV_DSP_BOOTROM0 0x0029
59#define K2G_DEV_DEBUGSS0 0x002b
60#define K2G_DEV_UART0 0x002c
61#define K2G_DEV_UART1 0x002d
62#define K2G_DEV_UART2 0x002e
63#define K2G_DEV_EHRPWM0 0x002f
64#define K2G_DEV_EHRPWM1 0x0030
65#define K2G_DEV_EHRPWM2 0x0031
66#define K2G_DEV_EHRPWM3 0x0032
67#define K2G_DEV_EHRPWM4 0x0033
68#define K2G_DEV_EHRPWM5 0x0034
69#define K2G_DEV_EQEP0 0x0035
70#define K2G_DEV_EQEP1 0x0036
71#define K2G_DEV_EQEP2 0x0037
72#define K2G_DEV_ECAP0 0x0038
73#define K2G_DEV_ECAP1 0x0039
74#define K2G_DEV_I2C0 0x003a
75#define K2G_DEV_I2C1 0x003b
76#define K2G_DEV_I2C2 0x003c
77#define K2G_DEV_EDMA0 0x003f
78#define K2G_DEV_SEMAPHORE0 0x0040
79#define K2G_DEV_INTC0 0x0041
80#define K2G_DEV_GIC0 0x0042
81#define K2G_DEV_QSPI0 0x0043
82#define K2G_DEV_ARM_64B_COUNTER0 0x0044
83#define K2G_DEV_TETRIS0 0x0045
84#define K2G_DEV_CGEM0 0x0046
85#define K2G_DEV_MSMC0 0x0047
86#define K2G_DEV_CBASS0 0x0049
87#define K2G_DEV_BOARD0 0x004c
88#define K2G_DEV_EDMA1 0x004f
89
90#endif
diff --git a/include/dt-bindings/power/imx7-power.h b/include/dt-bindings/power/imx7-power.h
new file mode 100644
index 000000000000..3a181e410517
--- /dev/null
+++ b/include/dt-bindings/power/imx7-power.h
@@ -0,0 +1,16 @@
1/*
2 * Copyright (C) 2017 Impinj
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __DT_BINDINGS_IMX7_POWER_H__
10#define __DT_BINDINGS_IMX7_POWER_H__
11
12#define IMX7_POWER_DOMAIN_MIPI_PHY 0
13#define IMX7_POWER_DOMAIN_PCIE_PHY 1
14#define IMX7_POWER_DOMAIN_USB_HSIC_PHY 2
15
16#endif
diff --git a/include/dt-bindings/power/r8a7795-sysc.h b/include/dt-bindings/power/r8a7795-sysc.h
index ee2e26ba605e..ad679eeda137 100644
--- a/include/dt-bindings/power/r8a7795-sysc.h
+++ b/include/dt-bindings/power/r8a7795-sysc.h
@@ -33,7 +33,7 @@
33#define R8A7795_PD_CA53_SCU 21 33#define R8A7795_PD_CA53_SCU 21
34#define R8A7795_PD_3DG_E 22 34#define R8A7795_PD_3DG_E 22
35#define R8A7795_PD_A3IR 24 35#define R8A7795_PD_A3IR 24
36#define R8A7795_PD_A2VC0 25 36#define R8A7795_PD_A2VC0 25 /* ES1.x only */
37#define R8A7795_PD_A2VC1 26 37#define R8A7795_PD_A2VC1 26
38 38
39/* Always-on power area */ 39/* Always-on power area */
diff --git a/include/dt-bindings/reset/altr,rst-mgr-a10sr.h b/include/dt-bindings/reset/altr,rst-mgr-a10sr.h
new file mode 100644
index 000000000000..9855925e5256
--- /dev/null
+++ b/include/dt-bindings/reset/altr,rst-mgr-a10sr.h
@@ -0,0 +1,33 @@
1/*
2 * Copyright Intel Corporation (C) 2017. All Rights Reserved
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Reset binding definitions for Altera Arria10 MAX5 System Resource Chip
17 *
18 * Adapted from altr,rst-mgr-a10.h
19 */
20
21#ifndef _DT_BINDINGS_RESET_ALTR_RST_MGR_A10SR_H
22#define _DT_BINDINGS_RESET_ALTR_RST_MGR_A10SR_H
23
24/* Peripheral PHY resets */
25#define A10SR_RESET_ENET_HPS 0
26#define A10SR_RESET_PCIE 1
27#define A10SR_RESET_FILE 2
28#define A10SR_RESET_BQSPI 3
29#define A10SR_RESET_USB 4
30
31#define A10SR_RESET_NUM 5
32
33#endif
diff --git a/include/dt-bindings/reset/imx7-reset.h b/include/dt-bindings/reset/imx7-reset.h
new file mode 100644
index 000000000000..63948170c7b2
--- /dev/null
+++ b/include/dt-bindings/reset/imx7-reset.h
@@ -0,0 +1,62 @@
1/*
2 * Copyright (C) 2017 Impinj, Inc.
3 *
4 * Author: Andrey Smirnov <andrew.smirnov@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef DT_BINDING_RESET_IMX7_H
20#define DT_BINDING_RESET_IMX7_H
21
22#define IMX7_RESET_A7_CORE_POR_RESET0 0
23#define IMX7_RESET_A7_CORE_POR_RESET1 1
24#define IMX7_RESET_A7_CORE_RESET0 2
25#define IMX7_RESET_A7_CORE_RESET1 3
26#define IMX7_RESET_A7_DBG_RESET0 4
27#define IMX7_RESET_A7_DBG_RESET1 5
28#define IMX7_RESET_A7_ETM_RESET0 6
29#define IMX7_RESET_A7_ETM_RESET1 7
30#define IMX7_RESET_A7_SOC_DBG_RESET 8
31#define IMX7_RESET_A7_L2RESET 9
32#define IMX7_RESET_SW_M4C_RST 10
33#define IMX7_RESET_SW_M4P_RST 11
34#define IMX7_RESET_EIM_RST 12
35#define IMX7_RESET_HSICPHY_PORT_RST 13
36#define IMX7_RESET_USBPHY1_POR 14
37#define IMX7_RESET_USBPHY1_PORT_RST 15
38#define IMX7_RESET_USBPHY2_POR 16
39#define IMX7_RESET_USBPHY2_PORT_RST 17
40#define IMX7_RESET_MIPI_PHY_MRST 18
41#define IMX7_RESET_MIPI_PHY_SRST 19
42
43/*
44 * IMX7_RESET_PCIEPHY is a logical reset line combining PCIEPHY_BTN
45 * and PCIEPHY_G_RST
46 */
47#define IMX7_RESET_PCIEPHY 20
48#define IMX7_RESET_PCIEPHY_PERST 21
49
50/*
51 * IMX7_RESET_PCIE_CTRL_APPS_EN is not strictly a reset line, but it
52 * can be used to inhibit PCIe LTTSM, so, in a way, it can be thoguht
53 * of as one
54 */
55#define IMX7_RESET_PCIE_CTRL_APPS_EN 22
56#define IMX7_RESET_DDRC_PRST 23
57#define IMX7_RESET_DDRC_CORE_RST 24
58
59#define IMX7_RESET_NUM 25
60
61#endif
62
diff --git a/include/linux/firmware/meson/meson_sm.h b/include/linux/firmware/meson/meson_sm.h
index 8e953c6f394a..37a5eaea69dd 100644
--- a/include/linux/firmware/meson/meson_sm.h
+++ b/include/linux/firmware/meson/meson_sm.h
@@ -25,7 +25,7 @@ int meson_sm_call(unsigned int cmd_index, u32 *ret, u32 arg0, u32 arg1,
25 u32 arg2, u32 arg3, u32 arg4); 25 u32 arg2, u32 arg3, u32 arg4);
26int meson_sm_call_write(void *buffer, unsigned int b_size, unsigned int cmd_index, 26int meson_sm_call_write(void *buffer, unsigned int b_size, unsigned int cmd_index,
27 u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4); 27 u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4);
28int meson_sm_call_read(void *buffer, unsigned int cmd_index, u32 arg0, u32 arg1, 28int meson_sm_call_read(void *buffer, unsigned int bsize, unsigned int cmd_index,
29 u32 arg2, u32 arg3, u32 arg4); 29 u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4);
30 30
31#endif /* _MESON_SM_FW_H_ */ 31#endif /* _MESON_SM_FW_H_ */
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index 9b6abe632587..b7803a251044 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -118,6 +118,7 @@ struct generic_pm_domain_data {
118 struct pm_domain_data base; 118 struct pm_domain_data base;
119 struct gpd_timing_data td; 119 struct gpd_timing_data td;
120 struct notifier_block nb; 120 struct notifier_block nb;
121 void *data;
121}; 122};
122 123
123#ifdef CONFIG_PM_GENERIC_DOMAINS 124#ifdef CONFIG_PM_GENERIC_DOMAINS
diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h
index d32f6f1a5225..e5380471c2cd 100644
--- a/include/linux/qcom_scm.h
+++ b/include/linux/qcom_scm.h
@@ -40,6 +40,9 @@ extern int qcom_scm_pas_shutdown(u32 peripheral);
40extern void qcom_scm_cpu_power_down(u32 flags); 40extern void qcom_scm_cpu_power_down(u32 flags);
41extern u32 qcom_scm_get_version(void); 41extern u32 qcom_scm_get_version(void);
42extern int qcom_scm_set_remote_state(u32 state, u32 id); 42extern int qcom_scm_set_remote_state(u32 state, u32 id);
43extern int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare);
44extern int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size);
45extern int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare);
43#else 46#else
44static inline 47static inline
45int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus) 48int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus)
@@ -67,5 +70,8 @@ static inline void qcom_scm_cpu_power_down(u32 flags) {}
67static inline u32 qcom_scm_get_version(void) { return 0; } 70static inline u32 qcom_scm_get_version(void) { return 0; }
68static inline u32 71static inline u32
69qcom_scm_set_remote_state(u32 state,u32 id) { return -ENODEV; } 72qcom_scm_set_remote_state(u32 state,u32 id) { return -ENODEV; }
73static inline int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare) { return -ENODEV; }
74static inline int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size) { return -ENODEV; }
75static inline int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare) { return -ENODEV; }
70#endif 76#endif
71#endif 77#endif
diff --git a/include/soc/tegra/flowctrl.h b/include/soc/tegra/flowctrl.h
new file mode 100644
index 000000000000..8f86aea4024b
--- /dev/null
+++ b/include/soc/tegra/flowctrl.h
@@ -0,0 +1,82 @@
1/*
2 * Functions and macros to control the flowcontroller
3 *
4 * Copyright (c) 2010-2012, NVIDIA Corporation. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __SOC_TEGRA_FLOWCTRL_H__
20#define __SOC_TEGRA_FLOWCTRL_H__
21
22#define FLOW_CTRL_HALT_CPU0_EVENTS 0x0
23#define FLOW_CTRL_WAITEVENT (2 << 29)
24#define FLOW_CTRL_WAIT_FOR_INTERRUPT (4 << 29)
25#define FLOW_CTRL_JTAG_RESUME (1 << 28)
26#define FLOW_CTRL_SCLK_RESUME (1 << 27)
27#define FLOW_CTRL_HALT_CPU_IRQ (1 << 10)
28#define FLOW_CTRL_HALT_CPU_FIQ (1 << 8)
29#define FLOW_CTRL_HALT_LIC_IRQ (1 << 11)
30#define FLOW_CTRL_HALT_LIC_FIQ (1 << 10)
31#define FLOW_CTRL_HALT_GIC_IRQ (1 << 9)
32#define FLOW_CTRL_HALT_GIC_FIQ (1 << 8)
33#define FLOW_CTRL_CPU0_CSR 0x8
34#define FLOW_CTRL_CSR_INTR_FLAG (1 << 15)
35#define FLOW_CTRL_CSR_EVENT_FLAG (1 << 14)
36#define FLOW_CTRL_CSR_ENABLE_EXT_CRAIL (1 << 13)
37#define FLOW_CTRL_CSR_ENABLE_EXT_NCPU (1 << 12)
38#define FLOW_CTRL_CSR_ENABLE_EXT_MASK ( \
39 FLOW_CTRL_CSR_ENABLE_EXT_NCPU | \
40 FLOW_CTRL_CSR_ENABLE_EXT_CRAIL)
41#define FLOW_CTRL_CSR_ENABLE (1 << 0)
42#define FLOW_CTRL_HALT_CPU1_EVENTS 0x14
43#define FLOW_CTRL_CPU1_CSR 0x18
44
45#define TEGRA20_FLOW_CTRL_CSR_WFE_CPU0 (1 << 4)
46#define TEGRA20_FLOW_CTRL_CSR_WFE_BITMAP (3 << 4)
47#define TEGRA20_FLOW_CTRL_CSR_WFI_BITMAP 0
48
49#define TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 (1 << 8)
50#define TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP (0xF << 4)
51#define TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP (0xF << 8)
52
53#ifndef __ASSEMBLY__
54#ifdef CONFIG_SOC_TEGRA_FLOWCTRL
55u32 flowctrl_read_cpu_csr(unsigned int cpuid);
56void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value);
57void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value);
58
59void flowctrl_cpu_suspend_enter(unsigned int cpuid);
60void flowctrl_cpu_suspend_exit(unsigned int cpuid);
61#else
62static inline u32 flowctrl_read_cpu_csr(unsigned int cpuid)
63{
64 return 0;
65}
66
67static inline void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value)
68{
69}
70
71static inline void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value) {}
72
73static inline void flowctrl_cpu_suspend_enter(unsigned int cpuid)
74{
75}
76
77static inline void flowctrl_cpu_suspend_exit(unsigned int cpuid)
78{
79}
80#endif /* CONFIG_SOC_TEGRA_FLOWCTRL */
81#endif /* __ASSEMBLY */
82#endif /* __SOC_TEGRA_FLOWCTRL_H__ */
diff --git a/include/soc/tegra/pmc.h b/include/soc/tegra/pmc.h
index 2f271d1b9cea..1c3982bc558f 100644
--- a/include/soc/tegra/pmc.h
+++ b/include/soc/tegra/pmc.h
@@ -26,12 +26,6 @@
26struct clk; 26struct clk;
27struct reset_control; 27struct reset_control;
28 28
29#ifdef CONFIG_PM_SLEEP
30enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
31void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
32void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
33#endif /* CONFIG_PM_SLEEP */
34
35#ifdef CONFIG_SMP 29#ifdef CONFIG_SMP
36bool tegra_pmc_cpu_is_powered(unsigned int cpuid); 30bool tegra_pmc_cpu_is_powered(unsigned int cpuid);
37int tegra_pmc_cpu_power_on(unsigned int cpuid); 31int tegra_pmc_cpu_power_on(unsigned int cpuid);
@@ -144,7 +138,7 @@ enum tegra_io_pad_voltage {
144 TEGRA_IO_PAD_3300000UV, 138 TEGRA_IO_PAD_3300000UV,
145}; 139};
146 140
147#ifdef CONFIG_ARCH_TEGRA 141#ifdef CONFIG_SOC_TEGRA_PMC
148int tegra_powergate_is_powered(unsigned int id); 142int tegra_powergate_is_powered(unsigned int id);
149int tegra_powergate_power_on(unsigned int id); 143int tegra_powergate_power_on(unsigned int id);
150int tegra_powergate_power_off(unsigned int id); 144int tegra_powergate_power_off(unsigned int id);
@@ -163,6 +157,11 @@ int tegra_io_pad_get_voltage(enum tegra_io_pad id);
163/* deprecated, use tegra_io_pad_power_{enable,disable}() instead */ 157/* deprecated, use tegra_io_pad_power_{enable,disable}() instead */
164int tegra_io_rail_power_on(unsigned int id); 158int tegra_io_rail_power_on(unsigned int id);
165int tegra_io_rail_power_off(unsigned int id); 159int tegra_io_rail_power_off(unsigned int id);
160
161enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
162void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
163void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
164
166#else 165#else
167static inline int tegra_powergate_is_powered(unsigned int id) 166static inline int tegra_powergate_is_powered(unsigned int id)
168{ 167{
@@ -221,6 +220,20 @@ static inline int tegra_io_rail_power_off(unsigned int id)
221{ 220{
222 return -ENOSYS; 221 return -ENOSYS;
223} 222}
224#endif /* CONFIG_ARCH_TEGRA */ 223
224static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
225{
226 return TEGRA_SUSPEND_NONE;
227}
228
229static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode)
230{
231}
232
233static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode)
234{
235}
236
237#endif /* CONFIG_SOC_TEGRA_PMC */
225 238
226#endif /* __SOC_TEGRA_PMC_H__ */ 239#endif /* __SOC_TEGRA_PMC_H__ */