Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
1
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
74e1a2a
Documentation
arch
alpha
arm
boot
common
configs
crypto
include
kernel
kvm
lib
mach-at91
mach-bcm
mach-bcm2835
mach-clps711x
mach-cns3xxx
mach-davinci
mach-dove
mach-ebsa110
mach-ep93xx
mach-exynos
mach-footbridge
mach-gemini
mach-h720x
mach-highbank
mach-imx
mach-integrator
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx
mach-kirkwood
mach-ks8695
mach-l7200
mach-lpc32xx
mach-mmp
mach-msm
mach-mv78xx0
mach-mvebu
mach-mxs
mach-netx
mach-nomadik
mach-omap1
mach-omap2
include
Kconfig
Makefile
Makefile.boot
am33xx.h
am35xx-emac.c
am35xx-emac.h
am35xx.h
board-2430sdp.c
board-3430sdp.c
board-3630sdp.c
board-4430sdp.c
board-am3517crane.c
board-am3517evm.c
board-apollon.c
board-cm-t35.c
board-cm-t3517.c
board-devkit8000.c
board-flash.c
board-flash.h
board-generic.c
board-h4.c
board-igep0020.c
board-ldp.c
board-n8x0.c
board-omap3beagle.c
board-omap3evm.c
board-omap3logic.c
board-omap3pandora.c
board-omap3stalker.c
board-omap3touchbook.c
board-omap4panda.c
board-overo.c
board-rm680.c
board-rx51-peripherals.c
board-rx51-video.c
board-rx51.c
board-rx51.h
board-ti8168evm.c
board-zoom-debugboard.c
board-zoom-display.c
board-zoom-peripherals.c
board-zoom.c
board-zoom.h
cclock2420_data.c
cclock2430_data.c
cclock33xx_data.c
cclock3xxx_data.c
cclock44xx_data.c
clkt2xxx_apll.c
clkt2xxx_dpll.c
clkt2xxx_dpllcore.c
clkt2xxx_osc.c
clkt2xxx_sys.c
clkt2xxx_virt_prcm_set.c
clkt34xx_dpll3m2.c
clkt_clksel.c
clkt_dpll.c
clkt_iclk.c
clock.c
clock.h
clock2430.c
clock2xxx.c
clock2xxx.h
clock34xx.c
clock34xx.h
clock3517.c
clock3517.h
clock36xx.c
clock36xx.h
clock3xxx.c
clock3xxx.h
clock44xx.h
clock_common_data.c
clockdomain.c
clockdomain.h
clockdomains2420_data.c
clockdomains2430_data.c
clockdomains2xxx_3xxx_data.c
clockdomains33xx_data.c
clockdomains3xxx_data.c
clockdomains44xx_data.c
cm-regbits-24xx.h
cm-regbits-33xx.h
cm-regbits-34xx.h
cm-regbits-44xx.h
cm.h
cm1_44xx.h
cm2_44xx.h
cm2xxx.c
cm2xxx.h
cm2xxx_3xxx.h
cm33xx.c
cm33xx.h
cm3xxx.c
cm3xxx.h
cm44xx.c
cm44xx.h
cm_common.c
cminst44xx.c
cminst44xx.h
common-board-devices.c
common-board-devices.h
common.c
common.h
control.c
control.h
cpuidle34xx.c
cpuidle44xx.c
ctrl_module_core_44xx.h
ctrl_module_pad_core_44xx.h
ctrl_module_pad_wkup_44xx.h
ctrl_module_wkup_44xx.h
devices.c
devices.h
display.c
display.h
dma.c
dma.h
dpll3xxx.c
dpll44xx.c
drm.c
dsp.c
dss-common.c
dss-common.h
emu.c
fb.c
gpio.c
gpmc-nand.c
gpmc-nand.h
gpmc-onenand.c
gpmc-onenand.h
gpmc-smc91x.c
gpmc-smc91x.h
gpmc-smsc911x.c
gpmc-smsc911x.h
gpmc.c
gpmc.h
hdq1w.c
hdq1w.h
hsmmc.c
hsmmc.h
hwspinlock.c
i2c.c
i2c.h
id.c
id.h
io.c
iomap.h
irq.c
l3_2xxx.h
l3_3xxx.h
l4_2xxx.h
l4_3xxx.h
mailbox.c
mcbsp.c
mmc.h
msdi.c
mux.c
mux.h
mux2420.c
mux2420.h
mux2430.c
mux2430.h
mux34xx.c
mux34xx.h
mux44xx.c
mux44xx.h
omap-headsmp.S
omap-hotplug.c
omap-iommu.c
omap-mpuss-lowpower.c
omap-pm-noop.c
omap-pm.h
omap-secure.c
omap-secure.h
omap-smc.S
omap-smp.c
omap-wakeupgen.c
omap-wakeupgen.h
omap2-restart.c
omap24xx.h
omap3-restart.c
omap34xx.h
omap4-common.c
omap4-keypad.h
omap4-sar-layout.h
omap44xx.h
omap54xx.h
omap_device.c
omap_device.h
omap_hwmod.c
omap_hwmod.h
omap_hwmod_2420_data.c
omap_hwmod_2430_data.c
omap_hwmod_2xxx_3xxx_interconnect_data.c
omap_hwmod_2xxx_3xxx_ipblock_data.c
omap_hwmod_2xxx_interconnect_data.c
omap_hwmod_2xxx_ipblock_data.c
omap_hwmod_33xx_data.c
omap_hwmod_3xxx_data.c
omap_hwmod_44xx_data.c
omap_hwmod_common_data.c
omap_hwmod_common_data.h
omap_opp_data.h
omap_phy_internal.c
omap_twl.c
opp.c
opp2420_data.c
opp2430_data.c
opp2xxx.h
opp3xxx_data.c
opp4xxx_data.c
pm-debug.c
pm.c
pm.h
pm24xx.c
pm34xx.c
pm44xx.c
pmu.c
powerdomain-common.c
powerdomain.c
powerdomain.h
powerdomains2xxx_3xxx_data.c
powerdomains2xxx_3xxx_data.h
powerdomains2xxx_data.c
powerdomains33xx_data.c
powerdomains3xxx_data.c
powerdomains44xx_data.c
prcm-common.h
prcm44xx.h
prcm_mpu44xx.c
prcm_mpu44xx.h
prm-regbits-24xx.h
prm-regbits-33xx.h
prm-regbits-34xx.h
prm-regbits-44xx.h
prm.h
prm2xxx.c
prm2xxx.h
prm2xxx_3xxx.c
prm2xxx_3xxx.h
prm33xx.c
prm33xx.h
prm3xxx.c
prm3xxx.h
prm44xx.c
prm44xx.h
prm_common.c
prminst44xx.c
prminst44xx.h
scrm44xx.h
sdram-hynix-h8mbx00u0mer-0em.h
sdram-micron-mt46h32m32lf-6.h
sdram-nokia.c
sdram-nokia.h
sdram-numonyx-m65kxxxxam.h
sdram-qimonda-hyb18m512160af-6.h
sdrc.c
sdrc.h
sdrc2xxx.c
serial.c
serial.h
sleep24xx.S
sleep34xx.S
sleep44xx.S
smartreflex-class3.c
soc.h
sr_device.c
sram.c
sram.h
sram242x.S
sram243x.S
sram34xx.S
ti81xx.h
timer.c
twl-common.c
twl-common.h
usb-host.c
usb-musb.c
usb-tusb6010.c
usb.h
vc.c
vc.h
vc3xxx_data.c
vc44xx_data.c
voltage.c
voltage.h
voltagedomains2xxx_data.c
voltagedomains33xx_data.c
voltagedomains3xxx_data.c
voltagedomains44xx_data.c
vp.c
vp.h
vp3xxx_data.c
vp44xx_data.c
wd_timer.c
wd_timer.h
mach-orion5x
mach-picoxcell
mach-prima2
mach-pxa
mach-realview
mach-rpc
mach-s3c2410
mach-s3c2412
mach-s3c2440
mach-s3c24xx
mach-s3c64xx
mach-s5p64x0
mach-s5pc100
mach-s5pv210
mach-sa1100
mach-shark
mach-shmobile
mach-socfpga
mach-spear13xx
mach-spear3xx
mach-spear6xx
mach-sunxi
mach-tegra
mach-u300
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900
mach-zynq
mm
net
nwfpe
oprofile
plat-iop
plat-omap
plat-orion
plat-pxa
plat-s3c24xx
plat-samsung
plat-spear
plat-versatile
tools
vfp
xen
Kconfig
Kconfig-nommu
Kconfig.debug
Makefile
arm64
avr32
blackfin
c6x
cris
frv
h8300
hexagon
ia64
m32r
m68k
microblaze
mips
mn10300
openrisc
parisc
powerpc
s390
score
sh
sparc
tile
um
unicore32
x86
xtensa
.gitignore
Kconfig
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt/kvm
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
arm
/
mach-omap2
/
board-omap3logic.c
Copy path
Blame
Blame
Latest commit
Kishon Vijay Abraham I
and
Greg Kroah-Hartman
ARM: OMAP: USB: Add phy binding information
Feb 6, 2013
51482be
·
Feb 6, 2013
History
History
251 lines (217 loc) · 7.05 KB
Breadcrumbs
linux
/
arch
/
arm
/
mach-omap2
/
board-omap3logic.c
Top
File metadata and controls
Code
Blame
251 lines (217 loc) · 7.05 KB
Raw
/* * linux/arch/arm/mach-omap2/board-omap3logic.c * * Copyright (C) 2010 Li-Pro.Net * Stephan Linz <linz@li-pro.net> * * Copyright (C) 2010-2012 Logic Product Development, Inc. * Peter Barada <peter.barada@logicpd.com> * Ashwin BIhari <ashwin.bihari@logicpd.com> * * Modified from Beagle, EVM, and RX51 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/delay.h> #include <linux/err.h> #include <linux/clk.h> #include <linux/io.h> #include <linux/gpio.h> #include <linux/regulator/fixed.h> #include <linux/regulator/machine.h> #include <linux/i2c/twl.h> #include <linux/mmc/host.h> #include <linux/usb/phy.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> #include "common.h" #include "mux.h" #include "hsmmc.h" #include "control.h" #include "common-board-devices.h" #include "gpmc.h" #include "gpmc-smsc911x.h" #define OMAP3LOGIC_SMSC911X_CS 1 #define OMAP3530_LV_SOM_MMC_GPIO_CD 110 #define OMAP3530_LV_SOM_MMC_GPIO_WP 126 #define OMAP3530_LV_SOM_SMSC911X_GPIO_IRQ 152 #define OMAP3_TORPEDO_MMC_GPIO_CD 127 #define OMAP3_TORPEDO_SMSC911X_GPIO_IRQ 129 static struct regulator_consumer_supply omap3logic_vmmc1_supply[] = { REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), }; /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data omap3logic_vmmc1 = { .constraints = { .name = "VMMC1", .min_uV = 1850000, .max_uV = 3150000, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = ARRAY_SIZE(omap3logic_vmmc1_supply), .consumer_supplies = omap3logic_vmmc1_supply, }; static struct twl4030_gpio_platform_data omap3logic_gpio_data = { .use_leds = true, .pullups = BIT(1), .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13) | BIT(15) | BIT(16) | BIT(17), }; static struct twl4030_usb_data omap3logic_usb_data = { .usb_mode = T2_USB_MODE_ULPI, }; static struct twl4030_platform_data omap3logic_twldata = { /* platform_data for children goes here */ .gpio = &omap3logic_gpio_data, .vmmc1 = &omap3logic_vmmc1, .usb = &omap3logic_usb_data, }; static int __init omap3logic_i2c_init(void) { omap3_pmic_init("twl4030", &omap3logic_twldata); return 0; } static struct omap2_hsmmc_info __initdata board_mmc_info[] = { { .name = "external", .mmc = 1, .caps = MMC_CAP_4_BIT_DATA, .gpio_cd = -EINVAL, .gpio_wp = -EINVAL, }, {} /* Terminator */ }; static void __init board_mmc_init(void) { if (machine_is_omap3530_lv_som()) { /* OMAP3530 LV SOM board */ board_mmc_info[0].gpio_cd = OMAP3530_LV_SOM_MMC_GPIO_CD; board_mmc_info[0].gpio_wp = OMAP3530_LV_SOM_MMC_GPIO_WP; omap_mux_init_signal("gpio_110", OMAP_PIN_OUTPUT); omap_mux_init_signal("gpio_126", OMAP_PIN_OUTPUT); } else if (machine_is_omap3_torpedo()) { /* OMAP3 Torpedo board */ board_mmc_info[0].gpio_cd = OMAP3_TORPEDO_MMC_GPIO_CD; omap_mux_init_signal("gpio_127", OMAP_PIN_OUTPUT); } else { /* unsupported board */ printk(KERN_ERR "%s(): unknown machine type\n", __func__); return; } omap_hsmmc_init(board_mmc_info); } static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = { .cs = OMAP3LOGIC_SMSC911X_CS, .gpio_irq = -EINVAL, .gpio_reset = -EINVAL, }; /* TODO/FIXME (comment by Peter Barada, LogicPD): * Fix the PBIAS voltage for Torpedo MMC1 pins that * are used for other needs (IRQs, etc). */ static void omap3torpedo_fix_pbias_voltage(void) { u16 control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE; u32 reg; if (machine_is_omap3_torpedo()) { /* Set the bias for the pin */ reg = omap_ctrl_readl(control_pbias_offset); reg &= ~OMAP343X_PBIASLITEPWRDNZ1; omap_ctrl_writel(reg, control_pbias_offset); /* 100ms delay required for PBIAS configuration */ msleep(100); reg |= OMAP343X_PBIASLITEVMODE1; reg |= OMAP343X_PBIASLITEPWRDNZ1; omap_ctrl_writel(reg | 0x300, control_pbias_offset); } } static inline void __init board_smsc911x_init(void) { if (machine_is_omap3530_lv_som()) { /* OMAP3530 LV SOM board */ board_smsc911x_data.gpio_irq = OMAP3530_LV_SOM_SMSC911X_GPIO_IRQ; omap_mux_init_signal("gpio_152", OMAP_PIN_INPUT); } else if (machine_is_omap3_torpedo()) { /* OMAP3 Torpedo board */ board_smsc911x_data.gpio_irq = OMAP3_TORPEDO_SMSC911X_GPIO_IRQ; omap_mux_init_signal("gpio_129", OMAP_PIN_INPUT); } else { /* unsupported board */ printk(KERN_ERR "%s(): unknown machine type\n", __func__); return; } gpmc_smsc911x_init(&board_smsc911x_data); } #ifdef CONFIG_OMAP_MUX static struct omap_board_mux board_mux[] __initdata = { /* mUSB */ OMAP3_MUX(HSUSB0_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP3_MUX(HSUSB0_STP, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), OMAP3_MUX(HSUSB0_DIR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP3_MUX(HSUSB0_NXT, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP3_MUX(HSUSB0_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP3_MUX(HSUSB0_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP3_MUX(HSUSB0_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP3_MUX(HSUSB0_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP3_MUX(HSUSB0_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP3_MUX(HSUSB0_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP3_MUX(HSUSB0_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP3_MUX(HSUSB0_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), { .reg_offset = OMAP_MUX_TERMINATOR }, }; #endif static struct regulator_consumer_supply dummy_supplies[] = { REGULATOR_SUPPLY("vddvario", "smsc911x.0"), REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), }; static void __init omap3logic_init(void) { regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3torpedo_fix_pbias_voltage(); omap3logic_i2c_init(); omap_serial_init(); omap_sdrc_init(NULL, NULL); board_mmc_init(); board_smsc911x_init(); usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); usb_musb_init(NULL); /* Ensure SDRC pins are mux'd for self-refresh */ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); } MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") .atag_offset = 0x100, .reserve = omap_reserve, .map_io = omap3_map_io, .init_early = omap35xx_init_early, .init_irq = omap3_init_irq, .handle_irq = omap3_intc_handle_irq, .init_machine = omap3logic_init, .init_late = omap35xx_init_late, .timer = &omap3_timer, .restart = omap3xxx_restart, MACHINE_END MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") .atag_offset = 0x100, .reserve = omap_reserve, .map_io = omap3_map_io, .init_early = omap35xx_init_early, .init_irq = omap3_init_irq, .handle_irq = omap3_intc_handle_irq, .init_machine = omap3logic_init, .init_late = omap35xx_init_late, .timer = &omap3_timer, .restart = omap3xxx_restart, MACHINE_END
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
You can’t perform that action at this time.