diff options
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r-- | include/linux/platform_data/at91_adc.h | 61 | ||||
-rw-r--r-- | include/linux/platform_data/ehci-sh.h | 28 | ||||
-rw-r--r-- | include/linux/platform_data/emif_plat.h | 128 | ||||
-rw-r--r-- | include/linux/platform_data/gpio-em.h | 10 | ||||
-rw-r--r-- | include/linux/platform_data/ina2xx.h | 19 | ||||
-rw-r--r-- | include/linux/platform_data/s3c-hsotg.h | 35 | ||||
-rw-r--r-- | include/linux/platform_data/tegra_usb.h | 1 | ||||
-rw-r--r-- | include/linux/platform_data/wiznet.h | 24 |
8 files changed, 306 insertions, 0 deletions
diff --git a/include/linux/platform_data/at91_adc.h b/include/linux/platform_data/at91_adc.h new file mode 100644 index 000000000000..e15745b4f3a5 --- /dev/null +++ b/include/linux/platform_data/at91_adc.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Free Electrons | ||
3 | * | ||
4 | * Licensed under the GPLv2 or later. | ||
5 | */ | ||
6 | |||
7 | #ifndef _AT91_ADC_H_ | ||
8 | #define _AT91_ADC_H_ | ||
9 | |||
10 | /** | ||
11 | * struct at91_adc_reg_desc - Various informations relative to registers | ||
12 | * @channel_base: Base offset for the channel data registers | ||
13 | * @drdy_mask: Mask of the DRDY field in the relevant registers | ||
14 | (Interruptions registers mostly) | ||
15 | * @status_register: Offset of the Interrupt Status Register | ||
16 | * @trigger_register: Offset of the Trigger setup register | ||
17 | */ | ||
18 | struct at91_adc_reg_desc { | ||
19 | u8 channel_base; | ||
20 | u32 drdy_mask; | ||
21 | u8 status_register; | ||
22 | u8 trigger_register; | ||
23 | }; | ||
24 | |||
25 | /** | ||
26 | * struct at91_adc_trigger - description of triggers | ||
27 | * @name: name of the trigger advertised to the user | ||
28 | * @value: value to set in the ADC's trigger setup register | ||
29 | to enable the trigger | ||
30 | * @is_external: Does the trigger rely on an external pin? | ||
31 | */ | ||
32 | struct at91_adc_trigger { | ||
33 | const char *name; | ||
34 | u8 value; | ||
35 | bool is_external; | ||
36 | }; | ||
37 | |||
38 | /** | ||
39 | * struct at91_adc_data - platform data for ADC driver | ||
40 | * @channels_used: channels in use on the board as a bitmask | ||
41 | * @num_channels: global number of channels available on the board | ||
42 | * @registers: Registers definition on the board | ||
43 | * @startup_time: startup time of the ADC in microseconds | ||
44 | * @trigger_list: Triggers available in the ADC | ||
45 | * @trigger_number: Number of triggers available in the ADC | ||
46 | * @use_external_triggers: does the board has external triggers availables | ||
47 | * @vref: Reference voltage for the ADC in millivolts | ||
48 | */ | ||
49 | struct at91_adc_data { | ||
50 | unsigned long channels_used; | ||
51 | u8 num_channels; | ||
52 | struct at91_adc_reg_desc *registers; | ||
53 | u8 startup_time; | ||
54 | struct at91_adc_trigger *trigger_list; | ||
55 | u8 trigger_number; | ||
56 | bool use_external_triggers; | ||
57 | u16 vref; | ||
58 | }; | ||
59 | |||
60 | extern void __init at91_add_device_adc(struct at91_adc_data *data); | ||
61 | #endif | ||
diff --git a/include/linux/platform_data/ehci-sh.h b/include/linux/platform_data/ehci-sh.h new file mode 100644 index 000000000000..5c15a738e116 --- /dev/null +++ b/include/linux/platform_data/ehci-sh.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * EHCI SuperH driver platform data | ||
3 | * | ||
4 | * Copyright (C) 2012 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> | ||
5 | * Copyright (C) 2012 Renesas Solutions Corp. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
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 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __USB_EHCI_SH_H | ||
22 | #define __USB_EHCI_SH_H | ||
23 | |||
24 | struct ehci_sh_platdata { | ||
25 | void (*phy_init)(void); /* Phy init function */ | ||
26 | }; | ||
27 | |||
28 | #endif /* __USB_EHCI_SH_H */ | ||
diff --git a/include/linux/platform_data/emif_plat.h b/include/linux/platform_data/emif_plat.h new file mode 100644 index 000000000000..03378ca84061 --- /dev/null +++ b/include/linux/platform_data/emif_plat.h | |||
@@ -0,0 +1,128 @@ | |||
1 | /* | ||
2 | * Definitions for TI EMIF device platform data | ||
3 | * | ||
4 | * Copyright (C) 2012 Texas Instruments, Inc. | ||
5 | * | ||
6 | * Aneesh V <aneesh@ti.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #ifndef __EMIF_PLAT_H | ||
13 | #define __EMIF_PLAT_H | ||
14 | |||
15 | /* Low power modes - EMIF_PWR_MGMT_CTRL */ | ||
16 | #define EMIF_LP_MODE_DISABLE 0 | ||
17 | #define EMIF_LP_MODE_CLOCK_STOP 1 | ||
18 | #define EMIF_LP_MODE_SELF_REFRESH 2 | ||
19 | #define EMIF_LP_MODE_PWR_DN 4 | ||
20 | |||
21 | /* Hardware capabilities */ | ||
22 | #define EMIF_HW_CAPS_LL_INTERFACE 0x00000001 | ||
23 | |||
24 | /* | ||
25 | * EMIF IP Revisions | ||
26 | * EMIF4D - Used in OMAP4 | ||
27 | * EMIF4D5 - Used in OMAP5 | ||
28 | */ | ||
29 | #define EMIF_4D 1 | ||
30 | #define EMIF_4D5 2 | ||
31 | |||
32 | /* | ||
33 | * PHY types | ||
34 | * ATTILAPHY - Used in OMAP4 | ||
35 | * INTELLIPHY - Used in OMAP5 | ||
36 | */ | ||
37 | #define EMIF_PHY_TYPE_ATTILAPHY 1 | ||
38 | #define EMIF_PHY_TYPE_INTELLIPHY 2 | ||
39 | |||
40 | /* Custom config requests */ | ||
41 | #define EMIF_CUSTOM_CONFIG_LPMODE 0x00000001 | ||
42 | #define EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL 0x00000002 | ||
43 | |||
44 | #ifndef __ASSEMBLY__ | ||
45 | /** | ||
46 | * struct ddr_device_info - All information about the DDR device except AC | ||
47 | * timing parameters | ||
48 | * @type: Device type (LPDDR2-S4, LPDDR2-S2 etc) | ||
49 | * @density: Device density | ||
50 | * @io_width: Bus width | ||
51 | * @cs1_used: Whether there is a DDR device attached to the second | ||
52 | * chip-select(CS1) of this EMIF instance | ||
53 | * @cal_resistors_per_cs: Whether there is one calibration resistor per | ||
54 | * chip-select or whether it's a single one for both | ||
55 | * @manufacturer: Manufacturer name string | ||
56 | */ | ||
57 | struct ddr_device_info { | ||
58 | u32 type; | ||
59 | u32 density; | ||
60 | u32 io_width; | ||
61 | u32 cs1_used; | ||
62 | u32 cal_resistors_per_cs; | ||
63 | char manufacturer[10]; | ||
64 | }; | ||
65 | |||
66 | /** | ||
67 | * struct emif_custom_configs - Custom configuration parameters/policies | ||
68 | * passed from the platform layer | ||
69 | * @mask: Mask to indicate which configs are requested | ||
70 | * @lpmode: LPMODE to be used in PWR_MGMT_CTRL register | ||
71 | * @lpmode_timeout_performance: Timeout before LPMODE entry when higher | ||
72 | * performance is desired at the cost of power (typically | ||
73 | * at higher OPPs) | ||
74 | * @lpmode_timeout_power: Timeout before LPMODE entry when better power | ||
75 | * savings is desired and performance is not important | ||
76 | * (typically at lower loads indicated by lower OPPs) | ||
77 | * @lpmode_freq_threshold: The DDR frequency threshold to identify between | ||
78 | * the above two cases: | ||
79 | * timeout = (freq >= lpmode_freq_threshold) ? | ||
80 | * lpmode_timeout_performance : | ||
81 | * lpmode_timeout_power; | ||
82 | * @temp_alert_poll_interval_ms: LPDDR2 MR4 polling interval at nominal | ||
83 | * temperature(in milliseconds). When temperature is high | ||
84 | * polling is done 4 times as frequently. | ||
85 | */ | ||
86 | struct emif_custom_configs { | ||
87 | u32 mask; | ||
88 | u32 lpmode; | ||
89 | u32 lpmode_timeout_performance; | ||
90 | u32 lpmode_timeout_power; | ||
91 | u32 lpmode_freq_threshold; | ||
92 | u32 temp_alert_poll_interval_ms; | ||
93 | }; | ||
94 | |||
95 | /** | ||
96 | * struct emif_platform_data - Platform data passed on EMIF platform | ||
97 | * device creation. Used by the driver. | ||
98 | * @hw_caps: Hw capabilities of the EMIF IP in the respective SoC | ||
99 | * @device_info: Device info structure containing information such | ||
100 | * as type, bus width, density etc | ||
101 | * @timings: Timings information from device datasheet passed | ||
102 | * as an array of 'struct lpddr2_timings'. Can be NULL | ||
103 | * if if default timings are ok | ||
104 | * @timings_arr_size: Size of the timings array. Depends on the number | ||
105 | * of different frequencies for which timings data | ||
106 | * is provided | ||
107 | * @min_tck: Minimum value of some timing parameters in terms | ||
108 | * of number of cycles. Can be NULL if default values | ||
109 | * are ok | ||
110 | * @custom_configs: Custom configurations requested by SoC or board | ||
111 | * code and the data for them. Can be NULL if default | ||
112 | * configurations done by the driver are ok. See | ||
113 | * documentation for 'struct emif_custom_configs' for | ||
114 | * more details | ||
115 | */ | ||
116 | struct emif_platform_data { | ||
117 | u32 hw_caps; | ||
118 | struct ddr_device_info *device_info; | ||
119 | const struct lpddr2_timings *timings; | ||
120 | u32 timings_arr_size; | ||
121 | const struct lpddr2_min_tck *min_tck; | ||
122 | struct emif_custom_configs *custom_configs; | ||
123 | u32 ip_rev; | ||
124 | u32 phy_type; | ||
125 | }; | ||
126 | #endif /* __ASSEMBLY__ */ | ||
127 | |||
128 | #endif /* __LINUX_EMIF_H */ | ||
diff --git a/include/linux/platform_data/gpio-em.h b/include/linux/platform_data/gpio-em.h new file mode 100644 index 000000000000..573edfb046c4 --- /dev/null +++ b/include/linux/platform_data/gpio-em.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef __GPIO_EM_H__ | ||
2 | #define __GPIO_EM_H__ | ||
3 | |||
4 | struct gpio_em_config { | ||
5 | unsigned int gpio_base; | ||
6 | unsigned int irq_base; | ||
7 | unsigned int number_of_pins; | ||
8 | }; | ||
9 | |||
10 | #endif /* __GPIO_EM_H__ */ | ||
diff --git a/include/linux/platform_data/ina2xx.h b/include/linux/platform_data/ina2xx.h new file mode 100644 index 000000000000..9abc0ca7259b --- /dev/null +++ b/include/linux/platform_data/ina2xx.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Driver for Texas Instruments INA219, INA226 power monitor chips | ||
3 | * | ||
4 | * Copyright (C) 2012 Lothar Felten <l-felten@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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * For further information, see the Documentation/hwmon/ina2xx file. | ||
11 | */ | ||
12 | |||
13 | /** | ||
14 | * struct ina2xx_platform_data - ina2xx info | ||
15 | * @shunt_uohms shunt resistance in microohms | ||
16 | */ | ||
17 | struct ina2xx_platform_data { | ||
18 | long shunt_uohms; | ||
19 | }; | ||
diff --git a/include/linux/platform_data/s3c-hsotg.h b/include/linux/platform_data/s3c-hsotg.h new file mode 100644 index 000000000000..97ec12c2ded4 --- /dev/null +++ b/include/linux/platform_data/s3c-hsotg.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* include/linux/platform_data/s3c-hsotg.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C USB2.0 High-speed / OtG platform information | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | enum s3c_hsotg_dmamode { | ||
16 | S3C_HSOTG_DMA_NONE, /* do not use DMA at-all */ | ||
17 | S3C_HSOTG_DMA_ONLY, /* always use DMA */ | ||
18 | S3C_HSOTG_DMA_DRV, /* DMA is chosen by driver */ | ||
19 | }; | ||
20 | |||
21 | /** | ||
22 | * struct s3c_hsotg_plat - platform data for high-speed otg/udc | ||
23 | * @dma: Whether to use DMA or not. | ||
24 | * @is_osc: The clock source is an oscillator, not a crystal | ||
25 | */ | ||
26 | struct s3c_hsotg_plat { | ||
27 | enum s3c_hsotg_dmamode dma; | ||
28 | unsigned int is_osc:1; | ||
29 | int phy_type; | ||
30 | |||
31 | int (*phy_init)(struct platform_device *pdev, int type); | ||
32 | int (*phy_exit)(struct platform_device *pdev, int type); | ||
33 | }; | ||
34 | |||
35 | extern void s3c_hsotg_set_platdata(struct s3c_hsotg_plat *pd); | ||
diff --git a/include/linux/platform_data/tegra_usb.h b/include/linux/platform_data/tegra_usb.h index 6bca5b569acb..66c673fef408 100644 --- a/include/linux/platform_data/tegra_usb.h +++ b/include/linux/platform_data/tegra_usb.h | |||
@@ -26,6 +26,7 @@ struct tegra_ehci_platform_data { | |||
26 | /* power down the phy on bus suspend */ | 26 | /* power down the phy on bus suspend */ |
27 | int power_down_on_bus_suspend; | 27 | int power_down_on_bus_suspend; |
28 | void *phy_config; | 28 | void *phy_config; |
29 | int vbus_gpio; | ||
29 | }; | 30 | }; |
30 | 31 | ||
31 | #endif /* _TEGRA_USB_H_ */ | 32 | #endif /* _TEGRA_USB_H_ */ |
diff --git a/include/linux/platform_data/wiznet.h b/include/linux/platform_data/wiznet.h new file mode 100644 index 000000000000..b5d8c192d84d --- /dev/null +++ b/include/linux/platform_data/wiznet.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Ethernet driver for the WIZnet W5x00 chip. | ||
3 | * | ||
4 | * Licensed under the GPL-2 or later. | ||
5 | */ | ||
6 | |||
7 | #ifndef PLATFORM_DATA_WIZNET_H | ||
8 | #define PLATFORM_DATA_WIZNET_H | ||
9 | |||
10 | #include <linux/if_ether.h> | ||
11 | |||
12 | struct wiznet_platform_data { | ||
13 | int link_gpio; | ||
14 | u8 mac_addr[ETH_ALEN]; | ||
15 | }; | ||
16 | |||
17 | #ifndef CONFIG_WIZNET_BUS_SHIFT | ||
18 | #define CONFIG_WIZNET_BUS_SHIFT 0 | ||
19 | #endif | ||
20 | |||
21 | #define W5100_BUS_DIRECT_SIZE (0x8000 << CONFIG_WIZNET_BUS_SHIFT) | ||
22 | #define W5300_BUS_DIRECT_SIZE (0x0400 << CONFIG_WIZNET_BUS_SHIFT) | ||
23 | |||
24 | #endif /* PLATFORM_DATA_WIZNET_H */ | ||