diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-20 21:42:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-20 21:42:30 -0500 |
commit | 9638685e32af961943b679fcb72d4ddd458eb18f (patch) | |
tree | 83cea0db18256448e2eaa9aec3bdbd3b89f26646 /include | |
parent | 03d7d12415e3a4791994e566f1245838bc505c6b (diff) | |
parent | ce96cb7386a57b270648f9ba6003065329a26bd3 (diff) |
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver updates from Olof Johansson:
"Driver updates for ARM SoCs. Some for SoC-family code under
drivers/soc, but also some other driver updates that don't belong
anywhere else. We also bring in the drivers/reset code through
arm-soc.
Some of the larger updates:
- Qualcomm support for SMEM, SMSM, SMP2P. All used to communicate
with other parts of the chip/board on these platforms, all
proprietary protocols that don't fit into other subsystems and live
in drivers/soc for now.
- System bus driver for UniPhier
- Driver for the TI Wakeup M3 IPC device
- Power management for Raspberry PI
+ Again a bunch of other smaller updates and patches"
* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (38 commits)
bus: uniphier: allow only built-in driver
ARM: bcm2835: clarify RASPBERRYPI_FIRMWARE dependency
MAINTAINERS: Drop Kumar Gala from QCOM
bus: uniphier-system-bus: add UniPhier System Bus driver
ARM: bcm2835: add rpi power domain driver
dt-bindings: add rpi power domain driver bindings
ARM: bcm2835: Define two new packets from the latest firmware.
drivers/soc: make mediatek/mtk-scpsys.c explicitly non-modular
soc: mediatek: SCPSYS: Add regulator support
MAINTAINERS: Change QCOM entries
soc: qcom: smd-rpm: Add existing platform support
memory/tegra: Add number of TLB lines for Tegra124
reset: hi6220: fix modular build
soc: qcom: Introduce WCNSS_CTRL SMD client
ARM: qcom: select ARM_CPU_SUSPEND for power management
MAINTAINERS: Add rules for Qualcomm dts files
soc: qcom: enable smsm/smp2p modular build
serial: msm_serial: Make config tristate
soc: qcom: smp2p: Qualcomm Shared Memory Point to Point
soc: qcom: smsm: Add driver for Qualcomm SMSM
...
Diffstat (limited to 'include')
-rw-r--r-- | include/dt-bindings/power/raspberrypi-power.h | 41 | ||||
-rw-r--r-- | include/dt-bindings/reset/hisi,hi6220-resets.h | 67 | ||||
-rw-r--r-- | include/dt-bindings/reset/stih407-resets.h | 4 | ||||
-rw-r--r-- | include/linux/reset.h | 17 | ||||
-rw-r--r-- | include/linux/soc/qcom/smem_state.h | 18 | ||||
-rw-r--r-- | include/linux/wkup_m3_ipc.h | 55 | ||||
-rw-r--r-- | include/soc/bcm2835/raspberrypi-firmware.h | 2 |
7 files changed, 200 insertions, 4 deletions
diff --git a/include/dt-bindings/power/raspberrypi-power.h b/include/dt-bindings/power/raspberrypi-power.h new file mode 100644 index 000000000000..b3ff8e09a78f --- /dev/null +++ b/include/dt-bindings/power/raspberrypi-power.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * Copyright © 2015 Broadcom | ||
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_ARM_BCM2835_RPI_POWER_H | ||
10 | #define _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H | ||
11 | |||
12 | /* These power domain indices are the firmware interface's indices | ||
13 | * minus one. | ||
14 | */ | ||
15 | #define RPI_POWER_DOMAIN_I2C0 0 | ||
16 | #define RPI_POWER_DOMAIN_I2C1 1 | ||
17 | #define RPI_POWER_DOMAIN_I2C2 2 | ||
18 | #define RPI_POWER_DOMAIN_VIDEO_SCALER 3 | ||
19 | #define RPI_POWER_DOMAIN_VPU1 4 | ||
20 | #define RPI_POWER_DOMAIN_HDMI 5 | ||
21 | #define RPI_POWER_DOMAIN_USB 6 | ||
22 | #define RPI_POWER_DOMAIN_VEC 7 | ||
23 | #define RPI_POWER_DOMAIN_JPEG 8 | ||
24 | #define RPI_POWER_DOMAIN_H264 9 | ||
25 | #define RPI_POWER_DOMAIN_V3D 10 | ||
26 | #define RPI_POWER_DOMAIN_ISP 11 | ||
27 | #define RPI_POWER_DOMAIN_UNICAM0 12 | ||
28 | #define RPI_POWER_DOMAIN_UNICAM1 13 | ||
29 | #define RPI_POWER_DOMAIN_CCP2RX 14 | ||
30 | #define RPI_POWER_DOMAIN_CSI2 15 | ||
31 | #define RPI_POWER_DOMAIN_CPI 16 | ||
32 | #define RPI_POWER_DOMAIN_DSI0 17 | ||
33 | #define RPI_POWER_DOMAIN_DSI1 18 | ||
34 | #define RPI_POWER_DOMAIN_TRANSPOSER 19 | ||
35 | #define RPI_POWER_DOMAIN_CCP2TX 20 | ||
36 | #define RPI_POWER_DOMAIN_CDP 21 | ||
37 | #define RPI_POWER_DOMAIN_ARM 22 | ||
38 | |||
39 | #define RPI_POWER_DOMAIN_COUNT 23 | ||
40 | |||
41 | #endif /* _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H */ | ||
diff --git a/include/dt-bindings/reset/hisi,hi6220-resets.h b/include/dt-bindings/reset/hisi,hi6220-resets.h new file mode 100644 index 000000000000..ca08a7e5248e --- /dev/null +++ b/include/dt-bindings/reset/hisi,hi6220-resets.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /** | ||
2 | * This header provides index for the reset controller | ||
3 | * based on hi6220 SoC. | ||
4 | */ | ||
5 | #ifndef _DT_BINDINGS_RESET_CONTROLLER_HI6220 | ||
6 | #define _DT_BINDINGS_RESET_CONTROLLER_HI6220 | ||
7 | |||
8 | #define PERIPH_RSTDIS0_MMC0 0x000 | ||
9 | #define PERIPH_RSTDIS0_MMC1 0x001 | ||
10 | #define PERIPH_RSTDIS0_MMC2 0x002 | ||
11 | #define PERIPH_RSTDIS0_NANDC 0x003 | ||
12 | #define PERIPH_RSTDIS0_USBOTG_BUS 0x004 | ||
13 | #define PERIPH_RSTDIS0_POR_PICOPHY 0x005 | ||
14 | #define PERIPH_RSTDIS0_USBOTG 0x006 | ||
15 | #define PERIPH_RSTDIS0_USBOTG_32K 0x007 | ||
16 | #define PERIPH_RSTDIS1_HIFI 0x100 | ||
17 | #define PERIPH_RSTDIS1_DIGACODEC 0x105 | ||
18 | #define PERIPH_RSTEN2_IPF 0x200 | ||
19 | #define PERIPH_RSTEN2_SOCP 0x201 | ||
20 | #define PERIPH_RSTEN2_DMAC 0x202 | ||
21 | #define PERIPH_RSTEN2_SECENG 0x203 | ||
22 | #define PERIPH_RSTEN2_ABB 0x204 | ||
23 | #define PERIPH_RSTEN2_HPM0 0x205 | ||
24 | #define PERIPH_RSTEN2_HPM1 0x206 | ||
25 | #define PERIPH_RSTEN2_HPM2 0x207 | ||
26 | #define PERIPH_RSTEN2_HPM3 0x208 | ||
27 | #define PERIPH_RSTEN3_CSSYS 0x300 | ||
28 | #define PERIPH_RSTEN3_I2C0 0x301 | ||
29 | #define PERIPH_RSTEN3_I2C1 0x302 | ||
30 | #define PERIPH_RSTEN3_I2C2 0x303 | ||
31 | #define PERIPH_RSTEN3_I2C3 0x304 | ||
32 | #define PERIPH_RSTEN3_UART1 0x305 | ||
33 | #define PERIPH_RSTEN3_UART2 0x306 | ||
34 | #define PERIPH_RSTEN3_UART3 0x307 | ||
35 | #define PERIPH_RSTEN3_UART4 0x308 | ||
36 | #define PERIPH_RSTEN3_SSP 0x309 | ||
37 | #define PERIPH_RSTEN3_PWM 0x30a | ||
38 | #define PERIPH_RSTEN3_BLPWM 0x30b | ||
39 | #define PERIPH_RSTEN3_TSENSOR 0x30c | ||
40 | #define PERIPH_RSTEN3_DAPB 0x312 | ||
41 | #define PERIPH_RSTEN3_HKADC 0x313 | ||
42 | #define PERIPH_RSTEN3_CODEC_SSI 0x314 | ||
43 | #define PERIPH_RSTEN3_PMUSSI1 0x316 | ||
44 | #define PERIPH_RSTEN8_RS0 0x400 | ||
45 | #define PERIPH_RSTEN8_RS2 0x401 | ||
46 | #define PERIPH_RSTEN8_RS3 0x402 | ||
47 | #define PERIPH_RSTEN8_MS0 0x403 | ||
48 | #define PERIPH_RSTEN8_MS2 0x405 | ||
49 | #define PERIPH_RSTEN8_XG2RAM0 0x406 | ||
50 | #define PERIPH_RSTEN8_X2SRAM_TZMA 0x407 | ||
51 | #define PERIPH_RSTEN8_SRAM 0x408 | ||
52 | #define PERIPH_RSTEN8_HARQ 0x40a | ||
53 | #define PERIPH_RSTEN8_DDRC 0x40c | ||
54 | #define PERIPH_RSTEN8_DDRC_APB 0x40d | ||
55 | #define PERIPH_RSTEN8_DDRPACK_APB 0x40e | ||
56 | #define PERIPH_RSTEN8_DDRT 0x411 | ||
57 | #define PERIPH_RSDIST9_CARM_DAP 0x500 | ||
58 | #define PERIPH_RSDIST9_CARM_ATB 0x501 | ||
59 | #define PERIPH_RSDIST9_CARM_LBUS 0x502 | ||
60 | #define PERIPH_RSDIST9_CARM_POR 0x503 | ||
61 | #define PERIPH_RSDIST9_CARM_CORE 0x504 | ||
62 | #define PERIPH_RSDIST9_CARM_DBG 0x505 | ||
63 | #define PERIPH_RSDIST9_CARM_L2 0x506 | ||
64 | #define PERIPH_RSDIST9_CARM_SOCDBG 0x507 | ||
65 | #define PERIPH_RSDIST9_CARM_ETM 0x508 | ||
66 | |||
67 | #endif /*_DT_BINDINGS_RESET_CONTROLLER_HI6220*/ | ||
diff --git a/include/dt-bindings/reset/stih407-resets.h b/include/dt-bindings/reset/stih407-resets.h index 02d4328fe479..4ab3a1c94958 100644 --- a/include/dt-bindings/reset/stih407-resets.h +++ b/include/dt-bindings/reset/stih407-resets.h | |||
@@ -52,6 +52,10 @@ | |||
52 | #define STIH407_KEYSCAN_SOFTRESET 26 | 52 | #define STIH407_KEYSCAN_SOFTRESET 26 |
53 | #define STIH407_USB2_PORT0_SOFTRESET 27 | 53 | #define STIH407_USB2_PORT0_SOFTRESET 27 |
54 | #define STIH407_USB2_PORT1_SOFTRESET 28 | 54 | #define STIH407_USB2_PORT1_SOFTRESET 28 |
55 | #define STIH407_ST231_AUD_SOFTRESET 29 | ||
56 | #define STIH407_ST231_DMU_SOFTRESET 30 | ||
57 | #define STIH407_ST231_GP0_SOFTRESET 31 | ||
58 | #define STIH407_ST231_GP1_SOFTRESET 32 | ||
55 | 59 | ||
56 | /* Picophy reset defines */ | 60 | /* Picophy reset defines */ |
57 | #define STIH407_PICOPHY0_RESET 0 | 61 | #define STIH407_PICOPHY0_RESET 0 |
diff --git a/include/linux/reset.h b/include/linux/reset.h index 7f65f9cff951..c4c097de0ba9 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h | |||
@@ -38,6 +38,9 @@ static inline struct reset_control *devm_reset_control_get_optional( | |||
38 | struct reset_control *of_reset_control_get(struct device_node *node, | 38 | struct reset_control *of_reset_control_get(struct device_node *node, |
39 | const char *id); | 39 | const char *id); |
40 | 40 | ||
41 | struct reset_control *of_reset_control_get_by_index( | ||
42 | struct device_node *node, int index); | ||
43 | |||
41 | #else | 44 | #else |
42 | 45 | ||
43 | static inline int reset_control_reset(struct reset_control *rstc) | 46 | static inline int reset_control_reset(struct reset_control *rstc) |
@@ -71,7 +74,7 @@ static inline void reset_control_put(struct reset_control *rstc) | |||
71 | 74 | ||
72 | static inline int device_reset_optional(struct device *dev) | 75 | static inline int device_reset_optional(struct device *dev) |
73 | { | 76 | { |
74 | return -ENOSYS; | 77 | return -ENOTSUPP; |
75 | } | 78 | } |
76 | 79 | ||
77 | static inline struct reset_control *__must_check reset_control_get( | 80 | static inline struct reset_control *__must_check reset_control_get( |
@@ -91,19 +94,25 @@ static inline struct reset_control *__must_check devm_reset_control_get( | |||
91 | static inline struct reset_control *reset_control_get_optional( | 94 | static inline struct reset_control *reset_control_get_optional( |
92 | struct device *dev, const char *id) | 95 | struct device *dev, const char *id) |
93 | { | 96 | { |
94 | return ERR_PTR(-ENOSYS); | 97 | return ERR_PTR(-ENOTSUPP); |
95 | } | 98 | } |
96 | 99 | ||
97 | static inline struct reset_control *devm_reset_control_get_optional( | 100 | static inline struct reset_control *devm_reset_control_get_optional( |
98 | struct device *dev, const char *id) | 101 | struct device *dev, const char *id) |
99 | { | 102 | { |
100 | return ERR_PTR(-ENOSYS); | 103 | return ERR_PTR(-ENOTSUPP); |
101 | } | 104 | } |
102 | 105 | ||
103 | static inline struct reset_control *of_reset_control_get( | 106 | static inline struct reset_control *of_reset_control_get( |
104 | struct device_node *node, const char *id) | 107 | struct device_node *node, const char *id) |
105 | { | 108 | { |
106 | return ERR_PTR(-ENOSYS); | 109 | return ERR_PTR(-ENOTSUPP); |
110 | } | ||
111 | |||
112 | static inline struct reset_control *of_reset_control_get_by_index( | ||
113 | struct device_node *node, int index) | ||
114 | { | ||
115 | return ERR_PTR(-ENOTSUPP); | ||
107 | } | 116 | } |
108 | 117 | ||
109 | #endif /* CONFIG_RESET_CONTROLLER */ | 118 | #endif /* CONFIG_RESET_CONTROLLER */ |
diff --git a/include/linux/soc/qcom/smem_state.h b/include/linux/soc/qcom/smem_state.h new file mode 100644 index 000000000000..f35e1512fcaa --- /dev/null +++ b/include/linux/soc/qcom/smem_state.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef __QCOM_SMEM_STATE__ | ||
2 | #define __QCOM_SMEM_STATE__ | ||
3 | |||
4 | struct qcom_smem_state; | ||
5 | |||
6 | struct qcom_smem_state_ops { | ||
7 | int (*update_bits)(void *, u32, u32); | ||
8 | }; | ||
9 | |||
10 | struct qcom_smem_state *qcom_smem_state_get(struct device *dev, const char *con_id, unsigned *bit); | ||
11 | void qcom_smem_state_put(struct qcom_smem_state *); | ||
12 | |||
13 | int qcom_smem_state_update_bits(struct qcom_smem_state *state, u32 mask, u32 value); | ||
14 | |||
15 | struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node, const struct qcom_smem_state_ops *ops, void *data); | ||
16 | void qcom_smem_state_unregister(struct qcom_smem_state *state); | ||
17 | |||
18 | #endif | ||
diff --git a/include/linux/wkup_m3_ipc.h b/include/linux/wkup_m3_ipc.h new file mode 100644 index 000000000000..d6ba7d39a62f --- /dev/null +++ b/include/linux/wkup_m3_ipc.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * TI Wakeup M3 for AMx3 SoCs Power Management Routines | ||
3 | * | ||
4 | * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * Dave Gerlach <d-gerlach@ti.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License as | ||
9 | * published by the Free Software Foundation version 2. | ||
10 | * | ||
11 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
12 | * kind, whether express or implied; without even the implied warranty | ||
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef _LINUX_WKUP_M3_IPC_H | ||
18 | #define _LINUX_WKUP_M3_IPC_H | ||
19 | |||
20 | #define WKUP_M3_DEEPSLEEP 1 | ||
21 | #define WKUP_M3_STANDBY 2 | ||
22 | #define WKUP_M3_IDLE 3 | ||
23 | |||
24 | #include <linux/mailbox_client.h> | ||
25 | |||
26 | struct wkup_m3_ipc_ops; | ||
27 | |||
28 | struct wkup_m3_ipc { | ||
29 | struct rproc *rproc; | ||
30 | |||
31 | void __iomem *ipc_mem_base; | ||
32 | struct device *dev; | ||
33 | |||
34 | int mem_type; | ||
35 | unsigned long resume_addr; | ||
36 | int state; | ||
37 | |||
38 | struct completion sync_complete; | ||
39 | struct mbox_client mbox_client; | ||
40 | struct mbox_chan *mbox; | ||
41 | |||
42 | struct wkup_m3_ipc_ops *ops; | ||
43 | }; | ||
44 | |||
45 | struct wkup_m3_ipc_ops { | ||
46 | void (*set_mem_type)(struct wkup_m3_ipc *m3_ipc, int mem_type); | ||
47 | void (*set_resume_address)(struct wkup_m3_ipc *m3_ipc, void *addr); | ||
48 | int (*prepare_low_power)(struct wkup_m3_ipc *m3_ipc, int state); | ||
49 | int (*finish_low_power)(struct wkup_m3_ipc *m3_ipc); | ||
50 | int (*request_pm_status)(struct wkup_m3_ipc *m3_ipc); | ||
51 | }; | ||
52 | |||
53 | struct wkup_m3_ipc *wkup_m3_ipc_get(void); | ||
54 | void wkup_m3_ipc_put(struct wkup_m3_ipc *m3_ipc); | ||
55 | #endif /* _LINUX_WKUP_M3_IPC_H */ | ||
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h index c07d74aa39bf..3fb357193f09 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h | |||
@@ -72,10 +72,12 @@ enum rpi_firmware_property_tag { | |||
72 | RPI_FIRMWARE_SET_ENABLE_QPU = 0x00030012, | 72 | RPI_FIRMWARE_SET_ENABLE_QPU = 0x00030012, |
73 | RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014, | 73 | RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014, |
74 | RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020, | 74 | RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020, |
75 | RPI_FIRMWARE_GET_DOMAIN_STATE = 0x00030030, | ||
75 | RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001, | 76 | RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001, |
76 | RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002, | 77 | RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002, |
77 | RPI_FIRMWARE_SET_VOLTAGE = 0x00038003, | 78 | RPI_FIRMWARE_SET_VOLTAGE = 0x00038003, |
78 | RPI_FIRMWARE_SET_TURBO = 0x00038009, | 79 | RPI_FIRMWARE_SET_TURBO = 0x00038009, |
80 | RPI_FIRMWARE_SET_DOMAIN_STATE = 0x00038030, | ||
79 | 81 | ||
80 | /* Dispmanx TAGS */ | 82 | /* Dispmanx TAGS */ |
81 | RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, | 83 | RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, |