diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch new file mode 100644 index 00000000..29e99569 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 9d7f46abab88c74e674461a2f4e9ab35b524a6ef Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed, 25 May 2011 08:56:06 +0200 | ||
4 | Subject: [PATCH 4/7] OMAP3: beagle: add regulators for camera interface | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++ | ||
9 | 1 files changed, 50 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
12 | index da4ba50..211cbdf 100644 | ||
13 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
14 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
15 | @@ -453,6 +453,44 @@ static struct regulator_consumer_supply beagle_vsim_supply = { | ||
16 | |||
17 | static struct gpio_led gpio_leds[]; | ||
18 | |||
19 | +static struct regulator_consumer_supply beagle_vaux3_supply = { | ||
20 | + .supply = "cam_1v8", | ||
21 | +}; | ||
22 | + | ||
23 | +static struct regulator_consumer_supply beagle_vaux4_supply = { | ||
24 | + .supply = "cam_2v8", | ||
25 | +}; | ||
26 | + | ||
27 | +/* VAUX3 for CAM_1V8 */ | ||
28 | +static struct regulator_init_data beagle_vaux3 = { | ||
29 | + .constraints = { | ||
30 | + .min_uV = 1800000, | ||
31 | + .max_uV = 1800000, | ||
32 | + .apply_uV = true, | ||
33 | + .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
34 | + | REGULATOR_MODE_STANDBY, | ||
35 | + .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
36 | + | REGULATOR_CHANGE_STATUS, | ||
37 | + }, | ||
38 | + .num_consumer_supplies = 1, | ||
39 | + .consumer_supplies = &beagle_vaux3_supply, | ||
40 | +}; | ||
41 | + | ||
42 | +/* VAUX4 for CAM_2V8 */ | ||
43 | +static struct regulator_init_data beagle_vaux4 = { | ||
44 | + .constraints = { | ||
45 | + .min_uV = 1800000, | ||
46 | + .max_uV = 1800000, | ||
47 | + .apply_uV = true, | ||
48 | + .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
49 | + | REGULATOR_MODE_STANDBY, | ||
50 | + .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
51 | + | REGULATOR_CHANGE_STATUS, | ||
52 | + }, | ||
53 | + .num_consumer_supplies = 1, | ||
54 | + .consumer_supplies = &beagle_vaux4_supply, | ||
55 | +}; | ||
56 | + | ||
57 | static int beagle_twl_gpio_setup(struct device *dev, | ||
58 | unsigned gpio, unsigned ngpio) | ||
59 | { | ||
60 | @@ -504,6 +542,16 @@ static int beagle_twl_gpio_setup(struct device *dev, | ||
61 | pr_err("%s: unable to configure EHCI_nOC\n", __func__); | ||
62 | } | ||
63 | |||
64 | + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { | ||
65 | + /* | ||
66 | + * Power on camera interface - only on pre-production, not | ||
67 | + * needed on production boards | ||
68 | + */ | ||
69 | + gpio_request(gpio + 2, "CAM_EN"); | ||
70 | + gpio_direction_output(gpio + 2, 1); | ||
71 | + } | ||
72 | + | ||
73 | + | ||
74 | /* | ||
75 | * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active | ||
76 | * high / others active low) | ||
77 | @@ -651,6 +699,8 @@ static struct twl4030_platform_data beagle_twldata = { | ||
78 | .vsim = &beagle_vsim, | ||
79 | .vdac = &beagle_vdac, | ||
80 | .vpll2 = &beagle_vpll2, | ||
81 | + .vaux3 = &beagle_vaux3, | ||
82 | + .vaux4 = &beagle_vaux4, | ||
83 | }; | ||
84 | |||
85 | static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { | ||
86 | -- | ||
87 | 1.6.6.1 | ||
88 | |||