aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSundar Raman2013-07-25 15:05:42 -0500
committerSundar Raman2013-07-25 15:05:42 -0500
commit106e6613875598e4a665181ccb9f97bed191e567 (patch)
treeb8c16d69c3fa4c4e800e1ade92efaabab1e10745
parent94dc3f5b129c67ad700eb0956e6910a036e19aed (diff)
parenteb8a91ac01d2a9fcb3a2f6ceea79607bfc197a14 (diff)
downloadkernel-video-106e6613875598e4a665181ccb9f97bed191e567.tar.gz
kernel-video-106e6613875598e4a665181ccb9f97bed191e567.tar.xz
kernel-video-106e6613875598e4a665181ccb9f97bed191e567.zip
Merge branch 'p-ti-android-3.8.y-video'
-rw-r--r--Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt7
-rw-r--r--Documentation/devicetree/bindings/sound/dra7-atl.txt42
-rw-r--r--Documentation/devicetree/bindings/sound/dra7-evm.txt60
-rw-r--r--Documentation/devicetree/bindings/usb/dwc3.txt11
-rw-r--r--Documentation/devicetree/bindings/usb/omap-usb.txt3
-rw-r--r--arch/arm/boot/dts/Makefile1
-rwxr-xr-x[-rw-r--r--]arch/arm/boot/dts/dra7-evm.dts110
-rw-r--r--arch/arm/boot/dts/dra7.dtsi142
-rw-r--r--arch/arm/boot/dts/omap5-sevm.dts522
-rw-r--r--arch/arm/boot/dts/omap5-uevm.dts26
-rw-r--r--arch/arm/boot/dts/omap5.dtsi9
-rw-r--r--arch/arm/configs/android_omap_defconfig68
-rw-r--r--arch/arm/configs/omap2plus_defconfig23
-rw-r--r--arch/arm/mach-omap2/board-generic.c2
-rw-r--r--arch/arm/mach-omap2/cclock54xx_data.c10
-rw-r--r--arch/arm/mach-omap2/cclock7xx_data.c39
-rw-r--r--arch/arm/mach-omap2/devices.c67
-rw-r--r--arch/arm/mach-omap2/display.c33
-rw-r--r--arch/arm/mach-omap2/fb.c6
-rw-r--r--arch/arm/mach-omap2/include/mach/tiler.h570
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c26
-rw-r--r--arch/arm/plat-omap/Makefile3
-rw-r--r--arch/arm/plat-omap/android-display.c206
-rw-r--r--arch/arm/plat-omap/include/plat/android-display.h31
-rw-r--r--arch/arm/plat-omap/include/plat/board.h174
-rw-r--r--arch/arm/plat-omap/include/plat/dsscomp.h52
-rw-r--r--arch/arm/plat-omap/include/plat/gpio-switch.h54
-rw-r--r--arch/arm/plat-omap/include/plat/sgx_omaplfb.h71
-rw-r--r--arch/arm/plat-omap/omap_dsscomp.c56
-rw-r--r--arch/arm/plat-omap/sgx_omaplfb.c86
-rw-r--r--drivers/base/power/opp.c19
-rw-r--r--drivers/clk/omap/clk.c5
-rw-r--r--drivers/gpu/drm/omapdrm/Kconfig26
-rw-r--r--drivers/gpu/drm/omapdrm/Makefile8
-rw-r--r--drivers/gpu/drm/omapdrm/omap_dmm_priv.h13
-rw-r--r--drivers/gpu/drm/omapdrm/omap_dmm_tiler.c162
-rw-r--r--drivers/gpu/drm/omapdrm/omap_dmm_tiler.h34
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c6
-rw-r--r--drivers/gpu/ion/Kconfig8
-rw-r--r--drivers/gpu/ion/Makefile1
-rw-r--r--drivers/gpu/ion/ion.c65
-rw-r--r--drivers/gpu/ion/ion_priv.h69
-rw-r--r--drivers/gpu/ion/omap/Makefile1
-rwxr-xr-xdrivers/gpu/ion/omap/omap_ion.c299
-rw-r--r--drivers/gpu/ion/omap/omap_ion_priv.h28
-rw-r--r--drivers/gpu/ion/omap/omap_tiler_heap.c480
-rw-r--r--drivers/misc/Kconfig4
-rw-r--r--drivers/misc/Makefile4
-rw-r--r--drivers/misc/cache-2dmanager/Kconfig5
-rw-r--r--drivers/misc/cache-2dmanager/Makefile4
-rw-r--r--drivers/misc/cache-2dmanager/cache-2dmanager.c208
-rw-r--r--drivers/misc/gcx/gcbv/Kconfig6
-rw-r--r--drivers/misc/gcx/gcbv/Makefile12
-rw-r--r--drivers/misc/gcx/gcbv/gcblit.c783
-rw-r--r--drivers/misc/gcx/gcbv/gcbuffer.c405
-rw-r--r--drivers/misc/gcx/gcbv/gcbv.c2178
-rw-r--r--drivers/misc/gcx/gcbv/gcbv.h615
-rw-r--r--drivers/misc/gcx/gcbv/gcbvdebug.c217
-rw-r--r--drivers/misc/gcx/gcbv/gcbvdebug.h26
-rw-r--r--drivers/misc/gcx/gcbv/gcfill.c314
-rw-r--r--drivers/misc/gcx/gcbv/gcfilter.c1490
-rw-r--r--drivers/misc/gcx/gcbv/gcmain.c262
-rw-r--r--drivers/misc/gcx/gcbv/gcmain.h103
-rw-r--r--drivers/misc/gcx/gcbv/gcmap.c364
-rw-r--r--drivers/misc/gcx/gcbv/gcparser.c2416
-rw-r--r--drivers/misc/gcx/gccore/Kconfig5
-rw-r--r--drivers/misc/gcx/gccore/Makefile9
-rw-r--r--drivers/misc/gcx/gccore/gcdbglog.c2325
-rw-r--r--drivers/misc/gcx/gccore/gcdebug.c555
-rw-r--r--drivers/misc/gcx/gccore/gcmain.c1119
-rw-r--r--drivers/misc/gcx/gccore/gcmain.h114
-rw-r--r--drivers/misc/gcx/gccore/gcmem.c201
-rw-r--r--drivers/misc/gcx/gccore/gcmem.h36
-rw-r--r--drivers/misc/gcx/gccore/gcmmu.c1332
-rw-r--r--drivers/misc/gcx/gccore/gcmmu.h271
-rw-r--r--drivers/misc/gcx/gccore/gcqueue.c1659
-rw-r--r--drivers/misc/gcx/gccore/gcqueue.h231
-rw-r--r--drivers/misc/gcx/gcioctl/Kconfig6
-rw-r--r--drivers/misc/gcx/gcioctl/Makefile4
-rw-r--r--drivers/misc/gcx/gcioctl/gcif.c1152
-rw-r--r--drivers/misc/gcx/gcioctl/gcif.h20
-rw-r--r--drivers/misc/gcx/gcioctl/version.h4
-rw-r--r--drivers/usb/dwc3/core.c105
-rw-r--r--drivers/usb/dwc3/core.h9
-rw-r--r--drivers/usb/dwc3/dwc3-omap.c43
-rw-r--r--drivers/usb/dwc3/gadget.c59
-rw-r--r--drivers/usb/gadget/android.c40
-rw-r--r--drivers/usb/gadget/composite.c24
-rw-r--r--drivers/usb/gadget/udc-core.c29
-rw-r--r--drivers/usb/musb/omap2430.c18
-rw-r--r--drivers/usb/otg/palmas-usb.c12
-rw-r--r--drivers/usb/phy/Makefile2
-rw-r--r--drivers/usb/phy/of.c47
-rw-r--r--drivers/usb/phy/omap-control-usb.c101
-rw-r--r--drivers/usb/phy/omap-usb2.c58
-rw-r--r--drivers/usb/phy/omap-usb3.c65
-rw-r--r--drivers/usb/usb-common.c71
-rw-r--r--drivers/video/fbmon.c34
-rw-r--r--drivers/video/modedb.c572
-rw-r--r--drivers/video/omap2/Kconfig2
-rw-r--r--drivers/video/omap2/Makefile2
-rwxr-xr-x[-rw-r--r--]drivers/video/omap2/dss/Kconfig13
-rw-r--r--drivers/video/omap2/dss/display.c12
-rwxr-xr-x[-rw-r--r--]drivers/video/omap2/dss/dss.c2
-rwxr-xr-x[-rw-r--r--]drivers/video/omap2/dss/dss.h7
-rwxr-xr-x[-rw-r--r--]drivers/video/omap2/dss/hdmi.c281
-rwxr-xr-x[-rw-r--r--]drivers/video/omap2/dss/hdmi_panel.c29
-rwxr-xr-x[-rw-r--r--]drivers/video/omap2/dss/ti_hdmi.h2
-rw-r--r--drivers/video/omap2/dss/ti_hdmi_5xxx_ip.c11
-rw-r--r--drivers/video/omap2/dsscomp/Kconfig21
-rw-r--r--drivers/video/omap2/dsscomp/Makefile4
-rwxr-xr-xdrivers/video/omap2/dsscomp/base.c527
-rwxr-xr-xdrivers/video/omap2/dsscomp/device.c799
-rw-r--r--drivers/video/omap2/dsscomp/dsscomp.h218
-rwxr-xr-xdrivers/video/omap2/dsscomp/gralloc.c801
-rwxr-xr-xdrivers/video/omap2/dsscomp/queue.c830
-rw-r--r--drivers/video/omap2/dsscomp/tiler-utils.c157
-rw-r--r--drivers/video/omap2/dsscomp/tiler-utils.h60
-rw-r--r--drivers/video/omap2/omapfb/Kconfig3
-rw-r--r--drivers/video/omap2/omapfb/omapfb-ioctl.c38
-rwxr-xr-x[-rw-r--r--]drivers/video/omap2/omapfb/omapfb-main.c310
-rw-r--r--drivers/video/omap2/omapfb/omapfb.h16
-rw-r--r--drivers/video/omap2/omaplfb/Kconfig7
-rw-r--r--drivers/video/omap2/omaplfb/Makefile18
-rw-r--r--drivers/video/omap2/omaplfb/img_defs.h154
-rw-r--r--drivers/video/omap2/omaplfb/img_types.h215
-rw-r--r--drivers/video/omap2/omaplfb/kerneldisplay.h244
-rw-r--r--drivers/video/omap2/omaplfb/omaplfb.h334
-rw-r--r--drivers/video/omap2/omaplfb/omaplfb_bv.c592
-rw-r--r--drivers/video/omap2/omaplfb/omaplfb_displayclass.c1843
-rw-r--r--drivers/video/omap2/omaplfb/omaplfb_linux.c1147
-rw-r--r--drivers/video/omap2/omaplfb/servicesext.h966
-rw-r--r--include/linux/bltsville.h599
-rw-r--r--include/linux/bvblend.h507
-rw-r--r--include/linux/bvbuffdesc.h68
-rw-r--r--include/linux/bvcache.h44
-rw-r--r--include/linux/bventry.h38
-rw-r--r--include/linux/bverror.h306
-rw-r--r--include/linux/bvfilter.h50
-rw-r--r--include/linux/bvinternal.h46
-rw-r--r--include/linux/bvsurfgeom.h40
-rw-r--r--include/linux/cache-2dmanager.h62
-rw-r--r--include/linux/fb.h10
-rw-r--r--include/linux/gcbv-iface.h22
-rw-r--r--include/linux/gccore.h41
-rw-r--r--include/linux/gcdbglog.h412
-rw-r--r--include/linux/gcdebug.h28
-rw-r--r--include/linux/gcerror.h208
-rw-r--r--include/linux/gcioctl.h275
-rw-r--r--include/linux/gcreg.h10335
-rw-r--r--include/linux/gcx.h106
-rw-r--r--include/linux/ocd.h781
-rw-r--r--include/linux/omap_ion.h103
-rwxr-xr-x[-rw-r--r--]include/linux/omapfb.h35
-rw-r--r--include/linux/platform_data/davinci_asp.h3
-rw-r--r--include/linux/platform_data/omap_gcx.h33
-rw-r--r--include/linux/regulator/consumer.h7
-rw-r--r--include/linux/usb/composite.h1
-rw-r--r--include/linux/usb/dwc3-omap.h4
-rw-r--r--include/linux/usb/gadget.h2
-rw-r--r--include/linux/usb/of.h36
-rw-r--r--include/linux/usb/omap_control_usb.h9
-rw-r--r--include/linux/usb/omap_usb.h1
-rw-r--r--include/linux/usb/otg.h7
-rw-r--r--include/linux/usb/phy.h23
-rw-r--r--include/uapi/linux/omapfb.h1
-rw-r--r--include/video/dsscomp.h734
-rw-r--r--include/video/omap_hwc.h118
-rwxr-xr-x[-rw-r--r--]include/video/omapdss.h18
-rw-r--r--sound/soc/davinci/davinci-mcasp.c507
-rw-r--r--sound/soc/davinci/davinci-mcasp.h9
-rw-r--r--sound/soc/davinci/davinci-pcm.h15
-rw-r--r--sound/soc/omap/Kconfig12
-rw-r--r--sound/soc/omap/Makefile4
-rw-r--r--sound/soc/omap/dra7-atl.c317
-rw-r--r--sound/soc/omap/dra7-evm.c331
-rw-r--r--sound/soc/omap/omap-hdmi-card.c2
-rw-r--r--sound/soc/omap/omap-hdmi.c6
-rw-r--r--sound/soc/omap/omap-pcm.c2
179 files changed, 48368 insertions, 1097 deletions
diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
index 374e145c2ef..9bac63e73eb 100644
--- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
+++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
@@ -5,6 +5,7 @@ Required properties:
5 "ti,dm646x-mcasp-audio" : for DM646x platforms 5 "ti,dm646x-mcasp-audio" : for DM646x platforms
6 "ti,da830-mcasp-audio" : for both DA830 & DA850 platforms 6 "ti,da830-mcasp-audio" : for both DA830 & DA850 platforms
7 "ti,omap2-mcasp-audio" : for OMAP2 platforms (TI81xx, AM33xx) 7 "ti,omap2-mcasp-audio" : for OMAP2 platforms (TI81xx, AM33xx)
8 "ti,dra7-mcasp-audio" : for DRA7xx platforms
8 9
9- reg : Should contain McASP registers offset and length 10- reg : Should contain McASP registers offset and length
10- interrupts : Interrupt number for McASP 11- interrupts : Interrupt number for McASP
@@ -23,6 +24,10 @@ Optional properties:
23- rx-num-evt : FIFO levels. 24- rx-num-evt : FIFO levels.
24- sram-size-playback : size of sram to be allocated during playback 25- sram-size-playback : size of sram to be allocated during playback
25- sram-size-capture : size of sram to be allocated during capture 26- sram-size-capture : size of sram to be allocated during capture
27- ti,tx-inactive-mode : Transmit pin mode while in an inactive slot (0 - Hi-Z,
28 2 - Low, 3 - High)
29- ti,rx-inactive-mode : Receive pin mode while in an inactive slot (0 - Hi-Z,
30 2 - Low, 3 - High)
26 31
27Example: 32Example:
28 33
@@ -42,4 +47,6 @@ mcasp0: mcasp0@1d00000 {
42 2 0 0 0 >; 47 2 0 0 0 >;
43 tx-num-evt = <1>; 48 tx-num-evt = <1>;
44 rx-num-evt = <1>; 49 rx-num-evt = <1>;
50 ti,tx-inactive-mode = <0>; /* 0: Hi-Z, 2: Low, 3: High */
51 ti,rx-inactive-mode = <0>; /* 0: Hi-Z, 2: Low, 3: High */
45}; 52};
diff --git a/Documentation/devicetree/bindings/sound/dra7-atl.txt b/Documentation/devicetree/bindings/sound/dra7-atl.txt
new file mode 100644
index 00000000000..cd85aa3477c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/dra7-atl.txt
@@ -0,0 +1,42 @@
1* Texas Instruments DRA7 Audio Tracking Logic (ATL)
2
3Required properties:
4- compatible: "ti,dra7-atl"
5- ti,hwmods: Name of the hwmod associated with the ATL module
6
7
8Optional properties:
9- ti,atclk<n>-freq: Output clock frequency for ATL instance n.
10 ATL instance is disabled if this property is not set
11- ti,atl<n>-bws-input: ATL baseband word select input for ATL instance n.
12 Possible inputs are:
13 0 - McASP1 FSR
14 1 - McASP1 FSX
15 2 - McASP2 FSR
16 3 - McASP2 FSX
17 4 - McASP3 FSX
18 5 - McASP4 FSX
19 6 - McASP5 FSX
20 7 - McASP6 FSX
21 8 - McASP7 FSX
22 9 - McASP8 FSX
23 10 - McASP8 AHCLKX
24 11 - XREF_CLK3 input pad
25 12 - XREF_CLK0 input pad
26 13 - XREF_CLK1 input pad
27 14 - XREF_CLK2 input pad
28 15 - OSC1_X1 input pad
29- ti,atl<n>-aws-input: Audio word select input for ATL instance n.
30 Same inputs than BWS.
31
32
33Example:
34
35atl: atl@0x4843c000 {
36 compatible = "ti,dra7-atl";
37 reg = <0x4843c000 0x3ff>;
38 ti,hwmods = "atl";
39 ti,atclk1-freq = <11289600>; /* 11.2896 MHz */
40 ti,atl1-bws-input = <2>; /* McASP2 FSR */
41 ti,atl1-aws-input = <4>; /* McASP3 FSX */
42};
diff --git a/Documentation/devicetree/bindings/sound/dra7-evm.txt b/Documentation/devicetree/bindings/sound/dra7-evm.txt
new file mode 100644
index 00000000000..1eeed6e6d67
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/dra7-evm.txt
@@ -0,0 +1,60 @@
1* Texas Instruments DRA7 EVM sound
2
3Required properties:
4- compatible: "ti,dra7-evm-sound"
5- ti,mode: Name of the sound card
6- ti,media-cpu: phandle for the McASP node in media link
7- ti,media-codec: phandle for the analog codec in media link
8- ti,media-mclk-freq: MCLK frequency for the analog codec in media link
9- ti,media-slots: Number of slots
10- ti,audio-routing: List of connections between audio components.
11 Each entry is a pair of strings, the first being the connection's sink,
12 the second being the connection's source.
13
14Available audio endpoints for the audio-routing table:
15
16Board connectors:
17 * Main Mic
18 * Line In
19 * Headphone
20 * Line Out
21
22tlv320aic3x pins:
23 * LLOUT
24 * RLOUT
25 * MONO_LOUT
26 * HPLOUT
27 * HPROUT
28 * HPLCOM
29 * HPCOM
30 * MIC3L
31 * MIC3R
32 * LINE1L
33 * LINE1R
34 * LINE2L
35 * LINE2R
36
37Example:
38
39sound {
40 compatible = "ti,dra7-evm-sound";
41 ti,model = "DRA7-EVM";
42
43 /* Media DAI link */
44 ti,media-cpu = <&mcasp3>;
45 ti,media-codec = <&tlv320aic3106>;
46 ti,media-mclk-freq = <1411200>;
47 ti,media-slots = <2>;
48
49 /* Audio routing */
50 ti,audio-routing =
51 "LINE1L", "Line In",
52 "LINE1R", "Line In",
53 "MIC3L", "Main Mic",
54 "MIC3R", "Main Mic",
55 "Main Mic", "Mic Bias 2V",
56 "Headphone", "HPLOUT",
57 "Headphone", "HPROUT",
58 "Line Out", "LLOUT",
59 "Line Out", "RLOUT";
60};
diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
index 7a95c651ceb..2fd123e383b 100644
--- a/Documentation/devicetree/bindings/usb/dwc3.txt
+++ b/Documentation/devicetree/bindings/usb/dwc3.txt
@@ -10,7 +10,16 @@ Required properties:
10 10
11Optional properties: 11Optional properties:
12 - tx-fifo-resize: determines if the FIFO *has* to be reallocated. 12 - tx-fifo-resize: determines if the FIFO *has* to be reallocated.
13 13 - dr_mode: tells Dual-Role USB controllers that we want to work on a
14 particular mode. Valid arguments are "host",
15 "peripheral" and "otg". In case this attribute isn't
16 passed via DT, USB DRD controllers should default to
17 OTG.
18- maximum-speed: tells USB controllers we want to work up to a certain
19 speed. Valid arguments are "superspeed", "highspeed",
20 "fullspeed" and "lowspeed". In case this isn't passed
21 via DT, USB controllers should default to their maximum
22 HW capability.
14This is usually a subnode to DWC3 glue to which it is connected. 23This is usually a subnode to DWC3 glue to which it is connected.
15 24
16dwc3@4a030000 { 25dwc3@4a030000 {
diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
index d4769f343d6..b5770b49c8e 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -83,7 +83,8 @@ Required properties:
83 usb mailbox or usb3 phy power. omap4 has usb mailbox in control module to 83 usb mailbox or usb3 phy power. omap4 has usb mailbox in control module to
84 notify events to the musb core and omap5 has usb3 phy power register to 84 notify events to the musb core and omap5 has usb3 phy power register to
85 power on usb3 phy. Should be "1" if it has mailbox and "2" if it has usb3 85 power on usb3 phy. Should be "1" if it has mailbox and "2" if it has usb3
86 phy power. 86 phy power (usb3 phy power indicates the presense of a usb2 and usb3 phy),
87 should be "3" is it has only usb2 phy power.
87 88
88omap_control_usb: omap-control-usb@4a002300 { 89omap_control_usb: omap-control-usb@4a002300 {
89 compatible = "ti,omap-control-usb"; 90 compatible = "ti,omap-control-usb";
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 101fed31981..a5c6e2af6ad 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -112,7 +112,6 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
112 omap4-var-som.dtb \ 112 omap4-var-som.dtb \
113 omap4-sdp.dtb \ 113 omap4-sdp.dtb \
114 omap5-uevm.dtb \ 114 omap5-uevm.dtb \
115 omap5-sevm.dtb \
116 am335x-evm.dtb \ 115 am335x-evm.dtb \
117 am335x-evmsk.dtb \ 116 am335x-evmsk.dtb \
118 am335x-bone.dtb \ 117 am335x-bone.dtb \
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 7a56b6d4ac2..2c902e95194 100644..100755
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -31,20 +31,114 @@
31 regulator-max-microvolt = <3000000>; 31 regulator-max-microvolt = <3000000>;
32 }; 32 };
33 33
34 ion_config {
35 compatible = "ti,ion-omap";
36 ti,omap_ion_heap_secure_input_base = <0xba300000>;
37 ti,omap_ion_heap_tiler_base = <0xb4300000>;
38 ti,omap_ion_heap_nonsecure_tiler_base = <0xf00000>;
39 /*90 MB*/
40 ti,omap_ion_heap_secure_input_size = <0x5A00000>;
41 /*96 MB*/
42 ti,omap_ion_heap_tiler_size = <0x6000000>;
43 /*15 MB*/
44 ti,omap_ion_heap_nonsecure_tiler_size = <0xF00000>;
45 };
46
34 ocp { 47 ocp {
35 gpu: gpu@0x56000000 { 48 gpu: gpu@0x56000000 {
36 gpu-supply = <&avs_gpu>; 49 gpu-supply = <&avs_gpu>;
37 }; 50 };
38 }; 51 };
39 52
53 vaudio_1v8: fixedregulator-vaudio-dig {
54 compatible = "regulator-fixed";
55 regulator-name = "vdac_fixed";
56 regulator-min-microvolt = <1800000>;
57 regulator-max-microvolt = <1800000>;
58 regulator-boot-on;
59 };
60
61 vaudio_3v3: fixedregulator-vaudio-anlg {
62 compatible = "regulator-fixed";
63 regulator-name = "vdac_fixed";
64 regulator-min-microvolt = <3300000>;
65 regulator-max-microvolt = <3300000>;
66 regulator-boot-on;
67 };
68
69 sound {
70 compatible = "ti,dra7-evm-sound";
71 ti,model = "dra7evm";
72
73 /* Audio routing */
74 ti,audio-routing =
75 "LINE1L", "Line In",
76 "LINE1R", "Line In",
77 "MIC3L", "Mic Bias 2V",
78 "MIC3R", "Mic Bias 2V",
79 "Mic Bias 2V", "Main Mic",
80 "Headphone", "HPLOUT",
81 "Headphone", "HPROUT",
82 "Line Out", "LLOUT",
83 "Line Out", "RLOUT";
84
85 /* Media DAI link */
86 ti,media-cpu = <&mcasp3>;
87 ti,media-codec = <&tlv320aic3106>;
88 ti,media-mclk-freq = <5644800>;
89 ti,media-slots = <2>;
90 };
91
92 sound_hdmi {
93 compatible = "ti,omap-hdmi-tpd12s015-audio";
94 ti,model = "OMAP5HDMI";
95 ti,hdmi_audio = <&hdmi>;
96 ti,level_shifter = <&tpd12s015>;
97 };
40}; 98};
41 99
42&dra7_pmx_core { 100&dra7_pmx_core {
43 pinctrl-names = "default"; 101 pinctrl-names = "default";
44 pinctrl-0 = < 102 pinctrl-0 = <
103 &atl_pins
104 &mcasp3_pins
105 &mcasp6_pins
45 &vout1_pins 106 &vout1_pins
107 &usb_pins
46 >; 108 >;
47 109
110 atl_pins: pinmux_atl_pins {
111 pinctrl-single,pins = <
112 0x298 0x00000005 /* xref_clk1.atl_clk1 OUTPUT | MODE5 */
113 0x29c 0x00000005 /* xref_clk2.atl_clk2 OUTPUT | MODE5 */
114 >;
115 };
116
117 mcasp3_pins: pinmux_mcasp3_pins {
118 pinctrl-single,pins = <
119 0x324 0x00000000 /* mcasp3_aclkx.mcasp3_aclkx OUTPUT | MODE0 */
120 0x328 0x00000000 /* mcasp3_fsx.mcasp3_fsx OUTPUT | MODE0 */
121 0x32c 0x00000000 /* mcasp3_axr0.mcasp3_axr0 OUTPUT | MODE0 */
122 0x330 0x00040000 /* mcasp3_axr1.mcasp3_axr1 INPUT | MODE0 */
123 >;
124 };
125
126 mcasp6_pins: pinmux_mcasp6_pins {
127 pinctrl-single,pins = <
128 0x2d4 0x00000001 /* mcasp1_axr8.mcasp6_axr0 OUTPUT | MODE1 */
129 0x2d8 0x00040001 /* mcasp1_axr9.mcasp6_axr1 INPUT | MODE 1 */
130 0x2dc 0x00000001 /* mcasp1_axr10.mcasp6_clkx OUTPUT | MODE1 */
131 0x2e0 0x00000001 /* mcasp1_axr11.mcasp6_fsx OUTPUT | MODE1 */
132 >;
133 };
134
135 usb_pins: pinmux_usb_pins {
136 pinctrl-single,pins = <
137 0x280 0xc0000 /* DRV1_VBUS SLEW | PULLDEN | MODE0 */
138 0x284 0xc0000 /* DRV2_VBUS SLEW | PULLDEN | MODE0 */
139 >;
140 };
141
48 i2c2_pins: pinmux_i2c2_pins { 142 i2c2_pins: pinmux_i2c2_pins {
49 pinctrl-single,pins = < 143 pinctrl-single,pins = <
50 0x408 0x60000 /* i2c2_sda INPUT | MODE0 */ 144 0x408 0x60000 /* i2c2_sda INPUT | MODE0 */
@@ -85,6 +179,11 @@
85 0x238 0x0 /* vout1_d23 OUTPUT | MODE0 */ 179 0x238 0x0 /* vout1_d23 OUTPUT | MODE0 */
86 >; 180 >;
87 }; 181 };
182 display_layout {
183 compatible = "ti, omap4-dsscomp";
184 ti,num_displays = <2>;
185 ti,default_display = "lcd";
186 };
88}; 187};
89 188
90&i2c1 { 189&i2c1 {
@@ -107,6 +206,15 @@
107 reg = <0x40>; 206 reg = <0x40>;
108 gpios = <&pcf_lcd 15 0>; /* P15, CON_LCD_PWR_DN */ 207 gpios = <&pcf_lcd 15 0>; /* P15, CON_LCD_PWR_DN */
109 }; 208 };
209
210 tlv320aic3106: tlv320aic3106@18 {
211 compatible = "ti,tlv320aic3x";
212 reg = <0x18>;
213 IOVDD-supply = <&vaudio_3v3>;
214 DVDD-supply = <&vaudio_1v8>;
215 AVDD-supply = <&vaudio_3v3>;
216 DRVDD-supply = <&vaudio_3v3>;
217 };
110}; 218};
111 219
112/include/ "tps659038.dtsi" 220/include/ "tps659038.dtsi"
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 7f92247a03f..2e9e4b546d4 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -27,11 +27,11 @@
27 compatible = "arm,cortex-a15"; 27 compatible = "arm,cortex-a15";
28 operating-points = < 28 operating-points = <
29 /* kHz uV */ 29 /* kHz uV */
30 /* The OPP_HIGH Only for DVFS enabled Samples Hence commenting*/ 30 /* The OPP_HIGH Only for DVFS enabled Samples */
31 1000000 1090000 31 1000000 1090000
32 /* 1176000 1210000 */ 32 1176000 1210000
33 >; 33 >;
34 clocks = <&dpll_mpu>; 34 clocks = <&dpll_mpu_ck>;
35 clock-names = "cpu"; 35 clock-names = "cpu";
36 timer { 36 timer {
37 compatible = "arm,armv7-timer"; 37 compatible = "arm,armv7-timer";
@@ -108,7 +108,7 @@
108 pinctrl-single,function-mask = <0x3fffffff>; 108 pinctrl-single,function-mask = <0x3fffffff>;
109 }; 109 };
110 110
111 dpll_mpu: dpll_mpu { 111 dpll_mpu_ck: dpll_mpu_ck {
112 #clock-cells = <0>; 112 #clock-cells = <0>;
113 compatible = "ti,omap-clock"; 113 compatible = "ti,omap-clock";
114 }; 114 };
@@ -378,6 +378,98 @@
378 ti,hwmods = "wd_timer2"; 378 ti,hwmods = "wd_timer2";
379 }; 379 };
380 380
381 omap_control_usb1: omap-control-usb@4a002300 {
382 compatible = "ti,omap-control-usb";
383 reg = <0x4a002300 0x4>,
384 <0x4a002370 0x4>;
385 reg-names = "control_dev_conf", "phy_power_usb";
386 ti,type = <2>;
387 };
388
389 omap_dwc31: omap_dwc3@48880000 {
390 compatible = "ti,dwc3";
391 ti,hwmods = "usb_otg_ss1";
392 reg = <0x48880000 0x1ff>;
393 interrupts = <0 77 4>;
394 #address-cells = <1>;
395 #size-cells = <1>;
396 utmi-mode = <2>;
397 ranges;
398 dwc3@48890000 {
399 compatible = "synopsys,dwc3";
400 reg = <0x48890000 0xcfff>;
401 interrupts = <0 76 4>;
402 usb-phy = <&usb2_phy1>, <&usb3_phy>;
403 tx-fifo-resize;
404 dr_mode = "peripheral";
405 maximum-speed = "superspeed";
406 };
407 };
408
409 omap_control_usb2: omap-control-usb@4a002e74 {
410 compatible = "ti,omap-control-usb";
411 reg = <0x4a002e74 0x4>,
412 <0x4a0086c0 0x4>;
413 reg-names = "ctrl_core_srcomp_north_side", "dummy_reg";
414 ti,type = <3>;
415 };
416
417 omap_dwc32: omap_dwc3@488c0000 {
418 compatible = "ti,dwc3";
419 ti,hwmods = "usb_otg_ss2";
420 reg = <0x488c0000 0x1ff>;
421 interrupts = <0 92 4>;
422 #address-cells = <1>;
423 #size-cells = <1>;
424 utmi-mode = <1>;
425 ranges;
426 dwc3@488d0000 {
427 compatible = "synopsys,dwc3";
428 reg = <0x488d0000 0xcfff>;
429 interrupts = <0 78 4>;
430 usb-phy = <&usb2_phy2>;
431 tx-fifo-resize;
432 dr_mode = "host";
433 maximum-speed = "highspeed";
434 };
435 };
436
437 ocp2scp {
438 compatible = "ti,omap-ocp2scp";
439 #address-cells = <1>;
440 #size-cells = <1>;
441 ranges;
442 ti,hwmods = "ocp2scp1";
443 usb2_phy1: usb2_phy1@4a084000 {
444 compatible = "ti,omap-usb2";
445 reg = <0x4a084000 0x7c>;
446 ctrl-module = <&omap_control_usb1>;
447 wkupclk = "usb_phy1_always_on_clk32k";
448 optclk = "usb_otg_ss1_refclk960m";
449 };
450
451 usb3_phy: usb3_phy@4a084400 {
452 compatible = "ti,omap-usb3";
453 reg = <0x4a084400 0x80>,
454 <0x4a084800 0x64>,
455 <0x4a084c00 0x40>;
456 reg-names = "phy_rx", "phy_tx", "pll_ctrl";
457 ctrl-module = <&omap_control_usb1>;
458 wkupclk = "usb_phy1_always_on_clk32k";
459 optclk = "usb_otg_ss1_refclk960m";
460 };
461
462 usb2_phy2: usb2_phy2@4a085000 {
463 compatible = "ti,omap-usb2";
464 reg = <0x4a085000 0x7c>;
465 ctrl-module = <&omap_control_usb2>;
466 wkupclk = "usb_phy2_always_on_clk32k";
467 optclk = "usb_otg_ss2_refclk960m";
468 };
469
470 };
471
472
381 dmm: dmm@4e000000 { 473 dmm: dmm@4e000000 {
382 compatible = "ti,omap5-dmm"; 474 compatible = "ti,omap5-dmm";
383 reg = <0x4e000000 0x800>; 475 reg = <0x4e000000 0x800>;
@@ -505,6 +597,7 @@
505 efuse-settings = <1090000 8 597 efuse-settings = <1090000 8
506 1210000 12 598 1210000 12
507 1280000 16>; 599 1280000 16>;
600 voltage-tolerance = <1>;
508 }; 601 };
509 602
510 avs_core: regulator-avs@0x4A0025EC { 603 avs_core: regulator-avs@0x4A0025EC {
@@ -519,6 +612,7 @@
519 efuse-settings = <1090000 8 612 efuse-settings = <1090000 8
520 1210000 12 613 1210000 12
521 1280000 16>; 614 1280000 16>;
615 voltage-tolerance = <1>;
522 }; 616 };
523 617
524 avs_dspeve: regulator-avs@0x4A0025D8 { 618 avs_dspeve: regulator-avs@0x4A0025D8 {
@@ -574,5 +668,45 @@
574 video-source = <1>; 668 video-source = <1>;
575 }; 669 };
576 }; 670 };
671
672 atl: atl@0x4843c000 {
673 compatible = "ti,dra7-atl";
674 reg = <0x4843c000 0x3ff>;
675 ti,hwmods = "atl";
676 ti,atclk1-freq = <11289600>;
677 ti,atl1-bws-input = <3>; /* McASP2 FSX */
678 ti,atl1-aws-input = <15>; /* McASP6 FSX */
679 ti,atclk2-freq = <5644800>;
680 ti,atl2-bws-input = <3>; /* McASP2 FSX */
681 ti,atl2-aws-input = <4>; /* McASP3 FSX */
682 };
683
684 mcasp3: mcasp@48468000 {
685 compatible = "ti,dra7-mcasp-audio";
686 reg = <0x48468000 0x2000>;
687 interrupts = <0 108 0x4>, /* AREVT */
688 <0 109 0x4>; /* TXEVT */
689 ti,hwmods = "mcasp3";
690 op-mode = <0>; /* MCASP_IIS_MODE */
691 tdm-slots = <2>;
692 num-serializer = <4>;
693 serial-dir = <1 2 0 0>; /* 0:INACTIVE, 1:TX, 2:RX */
694 ti,tx-inactive-mode = <2>; /* 0: Hi-Z, 2: Low, 3: High */
695 ti,rx-inactive-mode = <2>; /* 0: Hi-Z, 2: Low, 3: High */
696 };
697
698 mcasp6: mcasp@48474000 {
699 compatible = "ti,dra7-mcasp-audio";
700 reg = <0x48474000 0x2000>;
701 interrupts = <0 108 0x4>, /* AREVT */
702 <0 109 0x4>; /* TXEVT */
703 ti,hwmods = "mcasp6";
704 op-mode = <0>; /* MCASP_IIS_MODE */
705 tdm-slots = <8>;
706 num-serializer = <4>;
707 serial-dir = <1 2 0 0>; /* 0:INACTIVE, 1:TX, 2:RX */
708 ti,tx-inactive-mode = <2>; /* 0: Hi-Z, 2: Low, 3: High */
709 ti,rx-inactive-mode = <2>; /* 0: Hi-Z, 2: Low, 3: High */
710 };
577 }; 711 };
578}; 712};
diff --git a/arch/arm/boot/dts/omap5-sevm.dts b/arch/arm/boot/dts/omap5-sevm.dts
deleted file mode 100644
index 9d9bbb65190..00000000000
--- a/arch/arm/boot/dts/omap5-sevm.dts
+++ /dev/null
@@ -1,522 +0,0 @@
1/*
2 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
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/dts-v1/;
9
10/include/ "omap5.dtsi"
11/include/ "samsung_k3pe0e000b.dtsi"
12
13/ {
14 model = "TI OMAP5 sEVM board";
15 compatible = "ti,omap5-sevm", "ti,omap5";
16
17 cpus {
18 cpu@0 {
19 cpu0-supply = <&smps123_reg>;
20 };
21 };
22
23 memory {
24 device_type = "memory";
25 reg = <0x80000000 0x7F000000>; /* 2032 MB */
26 };
27
28 vmmcsd_fixed: fixedregulator-mmcsd {
29 compatible = "regulator-fixed";
30 regulator-name = "vmmcsd_fixed";
31 regulator-min-microvolt = <3000000>;
32 regulator-max-microvolt = <3000000>;
33 };
34
35 /* HS USB Port 2 RESET */
36 hsusb2_reset: hsusb2_reset_reg {
37 compatible = "regulator-fixed";
38 regulator-name = "hsusb2_reset";
39 regulator-min-microvolt = <3300000>;
40 regulator-max-microvolt = <3300000>;
41 gpio = <&gpio6 13 0>; /* gpio6_173 HUB_NRESET */
42 startup-delay-us = <70000>;
43 enable-active-high;
44 };
45
46 /* HS USB Host PHY on PORT 2 */
47 hsusb2_phy: hsusb2_phy {
48 compatible = "usb-nop-xceiv";
49 reset-supply = <&hsusb2_reset>;
50 };
51
52 /* HS USB Port 3 RESET */
53 hsusb3_reset: hsusb3_reset_reg {
54 compatible = "regulator-fixed";
55 regulator-name = "hsusb3_reset";
56 regulator-min-microvolt = <3300000>;
57 regulator-max-microvolt = <3300000>;
58 gpio = <&gpio6 12 0>; /* gpio6_172 ETH_NRESET */
59 startup-delay-us = <70000>;
60 enable-active-high;
61 };
62
63 /* HS USB Host PHY on PORT 3 */
64 hsusb3_phy: hsusb3_phy {
65 compatible = "usb-nop-xceiv";
66 reset-supply = <&hsusb3_reset>;
67 };
68
69 sound {
70 compatible = "ti,abe-twl6040";
71 ti,model = "OMAP5-sEVM";
72
73 ti,jack-detection = <1>;
74 ti,mclk-freq = <19200000>;
75
76 ti,mcpdm = <&mcpdm>;
77 ti,dmic = <&dmic>;
78 ti,mcasp = <&mcasp>;
79 ti,mcbsp1 = <&mcbsp1>;
80 ti,mcbsp2 = <&mcbsp2>;
81 ti,aess = <&aess>;
82
83 ti,twl6040 = <&twl6040>;
84
85 /* Audio routing */
86 ti,audio-routing =
87 "Headset Stereophone", "HSOL",
88 "Headset Stereophone", "HSOR",
89 "Earphone Spk", "EP",
90 "Ext Spk", "HFL",
91 "Ext Spk", "HFR",
92 "Line Out", "AUXL",
93 "Line Out", "AUXR",
94 "HSMIC", "Headset Mic",
95 "Headset Mic", "Headset Mic Bias",
96 "MAINMIC", "Main Handset Mic",
97 "Main Handset Mic", "Main Mic Bias",
98 "SUBMIC", "Sub Handset Mic",
99 "Sub Handset Mic", "Main Mic Bias",
100 "AFML", "Line In",
101 "AFMR", "Line In",
102 "DMic", "Digital Mic",
103 "Digital Mic", "Digital Mic1 Bias",
104 "Headset Playback", "PDM_DL1",
105 "Handsfree Playback", "PDM_DL2",
106 "PDM_UL1", "Capture",
107 "40122000.mcbsp Playback", "BT_VX_DL",
108 "BT_VX_UL", "40122000.mcbsp Capture",
109 "40124000.mcbsp Playback", "MM_EXT_DL",
110 "MM_EXT_UL", "40124000.mcbsp Capture",
111 "DMIC0", "omap-dmic-abe.0 Capture",
112 "omap-dmic-abe.0 Capture", "Digital Mic1 Bias",
113 "Digital Mic1 Bias", "Digital Mic 0",
114 "DMIC1", "omap-dmic-abe.1 Capture",
115 "omap-dmic-abe.1 Capture", "Digital Mic1 Bias",
116 "Digital Mic1 Bias", "Digital Mic 1",
117 "DMIC2", "omap-dmic-abe.2 Capture",
118 "omap-dmic-abe.2 Capture", "Digital Mic1 Bias",
119 "Digital Mic1 Bias", "Digital Mic 2";
120 };
121
122 sound_hdmi {
123 compatible = "ti,omap-hdmi-tpd12s015-audio";
124 ti,model = "OMAP5HDMI";
125
126 ti,hdmi_audio = <&hdmi>;
127 ti,level_shifter = <&tpd12s015>;
128 };
129
130};
131
132&omap5_pmx_core {
133 pinctrl-names = "default";
134 pinctrl-0 = <
135 &twl6040_pins
136 &mcpdm_pins
137 &dmic_pins
138 &mcbsp1_pins
139 &mcbsp2_pins
140 &usbhost_pins
141 &lg4591_pins
142 &dss_hdmi_pins
143 &tpd12s015_pins
144 &tca6424a_pins
145 >;
146
147 mmc1_pins: pinmux_mmc1_pins {
148 pinctrl-single,pins = <
149 0x1a2 0x118 /* sdcard_clk.sdcard_clk INPUT PULLUP | MODE0 */
150 0x1a4 0x118 /* sdcard_cmd.sdcard_cmd INPUT PULLUP | MODE0 */
151 0x1a6 0x118 /* sdcard_data2.sdcard_data2 INPUT PULLUP | MODE0 */
152 0x1a8 0x118 /* sdcard_data3.sdcard_data3 INPUT PULLUP | MODE0 */
153 0x1aa 0x118 /* sdcard_data0.sdcard_data0 INPUT PULLUP | MODE0 */
154 0x1ac 0x118 /* sdcard_data1.sdcard_data1 INPUT PULLUP | MODE0 */
155 >;
156 };
157
158 mmc2_pins: pinmux_mmc2_pins {
159 pinctrl-single,pins = <
160 0x0 0x118 /* emmc_clk.emmc_clk INPUT PULLUP | MODE0 */
161 0x2 0x118 /* emmc_cmd.emmc_cmd INPUT PULLUP | MODE0 */
162 0x4 0x118 /* emmc_data0.emmc_data0 INPUT PULLUP | MODE0 */
163 0x6 0x118 /* emmc_data1.emmc_data1 INPUT PULLUP | MODE0 */
164 0x8 0x118 /* emmc_data2.emmc_data2 INPUT PULLUP | MODE0 */
165 0xa 0x118 /* emmc_data3.emmc_data3 INPUT PULLUP | MODE0 */
166 0xc 0x118 /* emmc_data4.emmc_data4 INPUT PULLUP | MODE0 */
167 0xe 0x118 /* emmc_data5.emmc_data5 INPUT PULLUP | MODE0 */
168 0x10 0x118 /* emmc_data6.emmc_data6 INPUT PULLUP | MODE0 */
169 0x12 0x118 /* emmc_data7.emmc_data7 INPUT PULLUP | MODE0 */
170 >;
171 };
172
173 twl6040_pins: pinmux_twl6040_pins {
174 pinctrl-single,pins = <
175 0x18a 0x6 /* perslimbus2_clock.gpio5_145 OUTPUT | MODE6 */
176 >;
177 };
178
179 mcpdm_pins: pinmux_mcpdm_pins {
180 pinctrl-single,pins = <
181 0x142 0x108 /* abe_clks.abe_clks INPUT PULLDOWN | MODE0 */
182 0x15c 0x108 /* abemcpdm_ul_data.abemcpdm_ul_data INPUT PULLDOWN | MODE0 */
183 0x15e 0x108 /* abemcpdm_dl_data.abemcpdm_dl_data INPUT PULLDOWN | MODE0 */
184 0x160 0x118 /* abemcpdm_frame.abemcpdm_frame INPUT PULLUP | MODE0 */
185 0x162 0x108 /* abemcpdm_lb_clk.abemcpdm_lb_clk INPUT PULLDOWN | MODE0 */
186 >;
187 };
188
189 dmic_pins: pinmux_dmic_pins {
190 pinctrl-single,pins = <
191 0x144 0x100 /* abedmic_din1.abedmic_din1 INPUT | MODE0 */
192 0x146 0x100 /* abedmic_din2.abedmic_din2 INPUT | MODE0 */
193 0x148 0x100 /* abedmic_din3.abedmic_din3 INPUT | MODE0 */
194 0x14a 0 /* abedmic_clk1.abedmic_clk1 OUTPUT | MODE0 */
195 >;
196 };
197
198 mcbsp1_pins: pinmux_mcbsp1_pins {
199 pinctrl-single,pins = <
200 0x14c 0x101 /* abedmic_clk2.abemcbsp1_fsx INPUT | MODE1 */
201 0x14e 0x9 /* abedmic_clk3.abemcbsp1_dx OUTPUT PULLDOWN | MODE1 */
202 0x150 0x101 /* abeslimbus1_clock.abemcbsp1_clkx INPUT | MODE0 */
203 0x152 0x109 /* abeslimbus1_data.abemcbsp1_dr INPUT PULLDOWN | MODE1 */
204 >;
205 };
206
207 mcbsp2_pins: pinmux_mcbsp2_pins {
208 pinctrl-single,pins = <
209 0x154 0x108 /* abemcbsp2_dr.abemcbsp2_dr INPUT PULLDOWN | MODE0 */
210 0x156 0x8 /* abemcbsp2_dx.abemcbsp2_dx OUTPUT PULLDOWN | MODE0 */
211 0x158 0x100 /* abemcbsp2_fsx.abemcbsp2_fsx INPUT | MODE0 */
212 0x15a 0x100 /* abemcbsp2_clkx.abemcbsp2_clkx INPUT | MODE0 */
213 >;
214 };
215
216 usbhost_pins: pinmux_usbhost_pins {
217 pinctrl-single,pins = <
218 0x84 0x100 /* usbb2_hsic_strobe INPUT | MODE 0 */
219 0x86 0x100 /* usbb2_hsic_data INPUT | MODE 0 */
220
221 0x19e 0x100 /* usbb3_hsic_strobe INPUT | MODE 0 */
222 0x1a0 0x100 /* usbb3_hsic_data INPUT | MODE 0 */
223
224 0xD4 0x6 /* gpio6_173 OUTPUT | MODE 6 HUB_NRESET */
225 0xD6 0x6 /* gpio6_172 OUTPUT | MODE 6 ETH_NRESET */
226 >;
227 };
228
229 i2c1_pins: pinmux_i2c1_pins {
230 pinctrl-single,pins = <
231 0x1b2 0x118 /* i2c1_scl PULLUP | INPUTENABLE | MODE0 */
232 0x1b4 0x118 /* i2c1_sda PULLUP | INPUTENABLE | MODE0 */
233 >;
234 };
235
236 i2c2_pins: pinmux_i2c2_pins {
237 pinctrl-single,pins = <
238 0x178 0x100 /* i2c2_scl INPUTENABLE | MODE0 */
239 0x17a 0x100 /* i2c2_sda INPUTENABLE | MODE0 */
240 >;
241 };
242
243 i2c3_pins: pinmux_i2c3_pins {
244 pinctrl-single,pins = <
245 0x13a 0x100 /* i2c3_scl INPUTENABLE | MODE0 */
246 0x13c 0x100 /* i2c3_sda INPUTENABLE | MODE0 */
247 >;
248 };
249
250 i2c4_pins: pinmux_i2c4_pins {
251 pinctrl-single,pins = <
252 0xb8 0x100 /* i2c4_scl INPUTENABLE | MODE0 */
253 0xba 0x100 /* i2c4_sda INPUTENABLE | MODE0 */
254 >;
255 };
256
257 i2c5_pins: pinmux_i2c5_pins {
258 pinctrl-single,pins = <
259 0x184 0x100 /* i2c5_scl INPUTENABLE | MODE0 */
260 0x186 0x100 /* i2c5_sda INPUTENABLE | MODE0 */
261 >;
262 };
263
264 mcspi2_pins: pinmux_mcspi2_pins {
265 pinctrl-single,pins = <
266 0xbc 0x100 /* MCSPI2_CLK INPUTENABLE | MODE0 */
267 0xbe 0x100 /* MCSPI2_SIMO INPUTENABLE | MODE0 */
268 0xc0 0x118 /* MCSPI2_SOMI PULLUP | INPUTENABLE | MODE0*/
269 0xc2 0x0 /* MCSPI2_CS MODE0*/
270 >;
271 };
272
273 mcspi3_pins: pinmux_mcspi3_pins {
274 pinctrl-single,pins = <
275 0x78 0x101 /* MCSPI2_SOMI INPUTENABLE | MODE1 */
276 0x7a 0x101 /* MCSPI2_CS INPUTENABLE | MODE1 */
277 0x7c 0x101 /* MCSPI2_SIMO INPUTENABLE | MODE1 */
278 0x7e 0x101 /* MCSPI2_CLK INPUTENABLE | MODE1 */
279 >;
280 };
281
282 mcspi4_pins: pinmux_mcspi4_pins {
283 pinctrl-single,pins = <
284 0x164 0x101 /* MCSPI2_CLK INPUTENABLE | MODE1 */
285 0x168 0x101 /* MCSPI2_SIMO INPUTENABLE | MODE1 */
286 0x16a 0x101 /* MCSPI2_SOMI INPUTENABLE | MODE1 */
287 0x16c 0x101 /* MCSPI2_CS INPUTENABLE | MODE1 */
288 >;
289 };
290
291 lg4591_pins: pinmux_lg4591_pins {
292 pinctrl-single,pins = <
293 0xf2 0x8 /* perslimbus2_clock.gpio6_183 OUTPUT PULLDOWN | MODE0 */
294 >;
295 };
296
297 dss_hdmi_pins: pinmux_dss_hdmi_pins {
298 pinctrl-single,pins = <
299 0x0fc 0x118 /* hdmi_cec.hdmi_cec INPUT PULLUP | MODE 0 */
300 0x100 0x118 /* hdmi_scl.hdmi_scl INPUT PULLUP | MODE 0 */
301 0x102 0x118 /* hdmi_sda.hdmi_sda INPUT PULLUP | MODE 0 */
302 >;
303 };
304
305 tpd12s015_pins: pinmux_tpd12s015_pins {
306 pinctrl-single,pins = <
307 0x0fe 0x116 /* hdmi_hpd.gpio7_193 INPUT PULLDOWN | MODE6 */
308 >;
309 };
310
311 tca6424a_pins: pinmux_tca6424a_pins {
312 pinctrl-single,pins = <
313 0x186 0x100 /* i2c5_scl.i2c5_scl INPUT | MODE0 */
314 0x188 0x100 /* i2c5_sda.i2c5_sda INPUT | MODE0 */
315 >;
316 };
317
318};
319
320&mmc1 {
321 pinctrl-names = "default";
322 pinctrl-0 = <&mmc1_pins>;
323 vmmc-supply = <&vmmcsd_fixed>;
324 vmmc-aux-supply = <&ldo9_reg>;
325 bus-width = <4>;
326 cd-gpios = <&gpio3 3 0>; /* gpio 67 */
327};
328
329&mmc2 {
330 pinctrl-names = "default";
331 pinctrl-0 = <&mmc2_pins>;
332 vmmc-supply = <&vmmcsd_fixed>;
333 vmmc-aux-supply = <&ldo9_reg>;
334 bus-width = <8>;
335 ti,non-removable;
336};
337
338&mmc3 {
339 bus-width = <4>;
340 ti,non-removable;
341 status = "disabled";
342};
343
344&mmc4 {
345 status = "disabled";
346};
347
348&mmc5 {
349 status = "disabled";
350};
351
352&i2c1 {
353 pinctrl-names = "default";
354 pinctrl-0 = <&i2c1_pins>;
355
356 clock-frequency = <400000>;
357};
358
359&i2c2 {
360 pinctrl-names = "default";
361 pinctrl-0 = <&i2c2_pins>;
362
363 clock-frequency = <400000>;
364
365 /* Pressure Sensor */
366 bmp085@77 {
367 compatible = "bosch,bmp085";
368 reg = <0x77>;
369 };
370};
371
372&i2c3 {
373 pinctrl-names = "default";
374 pinctrl-0 = <&i2c3_pins>;
375
376 clock-frequency = <400000>;
377};
378
379&i2c4 {
380 pinctrl-names = "default";
381 pinctrl-0 = <&i2c4_pins>;
382
383 clock-frequency = <400000>;
384
385 /* Temperature Sensor */
386 tmp102@48{
387 compatible = "ti,tmp102";
388 reg = <0x48>;
389 };
390};
391
392&i2c5 {
393 pinctrl-names = "default";
394 pinctrl-0 = <&i2c5_pins>;
395 clock-frequency = <400000>;
396
397 tca6424a: tca6424a@22 {
398 compatible = "ti,tca6424a";
399 reg = <0x22>;
400 gpio-controller;
401 #gpio-cells = <2>;
402 };
403};
404
405&keypad {
406 keypad,num-rows = <8>;
407 keypad,num-columns = <8>;
408 linux,keymap = <0x02020073 /* VOLUP */
409 0x02030072 /* VOLDOWM */
410 0x020400e7 /* SEND */
411 0x02050066 /* HOME */
412 0x0206006b /* END */
413 0x020700d9>; /* SEARCH */
414 linux,input-no-autorepeat;
415};
416
417&mcbsp3 {
418 status = "disabled";
419};
420
421&emif1 {
422 cs1-used;
423 device-handle = <&samsung_K3PE0E000B>;
424};
425
426&emif2 {
427 cs1-used;
428 device-handle = <&samsung_K3PE0E000B>;
429};
430
431&usbhshost {
432 port2-mode = "ehci-hsic";
433 port3-mode = "ehci-hsic";
434};
435
436&usbhsehci {
437 phys = <0 &hsusb2_phy &hsusb3_phy>;
438};
439
440&i2c1 {
441 clock-frequency = <400000>;
442
443 palmas: palmas@48 {
444 reg = <0x48>;
445 /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
446 interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */
447 interrupt-parent = <&gic>;
448 };
449
450 twl6040: twl@4b {
451 compatible = "ti,twl6040";
452
453 interrupts = <0 119 4>; /* IRQ_SYS_2N cascaded to gic */
454 interrupt-parent = <&gic>;
455 ti,audpwron-gpio = <&gpio5 17 0>; /* gpio line 145 */
456
457 vio-supply = <&smps7_reg>;
458 v2v1-supply = <&smps9_reg>;
459 enable-active-high;
460 };
461};
462
463/include/ "palmas.dtsi"
464
465&mcspi1 {
466
467};
468
469&mcspi2 {
470 pinctrl-names = "default";
471 pinctrl-0 = <&mcspi2_pins>;
472};
473
474&mcspi3 {
475 pinctrl-names = "default";
476 pinctrl-0 = <&mcspi3_pins>;
477};
478
479&mcspi4 {
480 pinctrl-names = "default";
481 pinctrl-0 = <&mcspi4_pins>;
482};
483
484/include/ "twl6040.dtsi"
485
486&dsi1 {
487 lcd {
488 compatible = "ti,lg4591";
489
490 lanes = <
491 0 /* clk + */
492 1 /* clk - */
493 2 /* data1 + */
494 3 /* data1 - */
495 4 /* data2 + */
496 5 /* data2 - */
497 6 /* data3 + */
498 7 /* data3 - */
499 8 /* data4 + */
500 9 /* data4 - */
501 >;
502
503 vdds_foo-supply = <&ldo2_reg>;
504
505 gpios = <&gpio6 23 0>; /* 183, reset */
506 };
507};
508
509&hdmi {
510 tpd12s015: tpd12s015 {
511 compatible = "ti,tpd12s015";
512
513 gpios = <&tca6424a 0 0>, /* TCA6424A P01, CT_CP_HDP */
514 <&tca6424a 1 0>, /* TCA6424A P00, LS_OE*/
515 <&gpio7 1 0>; /* 193, HPD */
516
517 hdmi-monitor {
518 compatible = "ti,hdmi_panel";
519 };
520
521 };
522};
diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts
index 7b7b5347ef1..a339f321c2a 100644
--- a/arch/arm/boot/dts/omap5-uevm.dts
+++ b/arch/arm/boot/dts/omap5-uevm.dts
@@ -7,9 +7,22 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/*
11 * Following are the carveout addresses and the sizes. SMC is not reserved for now
12 * C0000000 - SDRAM+1G
13 * BFD00000 - SMC (3MB)
14 * BA300000 - ION (90MB)
15 * B4300000 - TILER SECURE (96 MB)
16 * B3400000 - TILER NONSECURE (15 MB)
17*/
18/memreserve/ 0xba300000 0x5a00000;
19/memreserve/ 0xb4300000 0x6000000;
20/memreserve/ 0xb3400000 0xf00000;
21
10/include/ "omap5.dtsi" 22/include/ "omap5.dtsi"
11/include/ "samsung_k3pe0e000b.dtsi" 23/include/ "samsung_k3pe0e000b.dtsi"
12 24
25
13/ { 26/ {
14 model = "TI OMAP5 uEVM board"; 27 model = "TI OMAP5 uEVM board";
15 compatible = "ti,omap5-uevm", "ti,omap5"; 28 compatible = "ti,omap5-uevm", "ti,omap5";
@@ -74,6 +87,19 @@
74 clock-frequency = <19200000>; /* 19.2 MHz */ 87 clock-frequency = <19200000>; /* 19.2 MHz */
75 }; 88 };
76 89
90 ion_config {
91 compatible = "ti,ion-omap";
92 ti,omap_ion_heap_secure_input_base = <0xba300000>;
93 ti,omap_ion_heap_tiler_base = <0xb4300000>;
94 ti,omap_ion_heap_nonsecure_tiler_base = <0xf00000>;
95 /*90 MB*/
96 ti,omap_ion_heap_secure_input_size = <0x5A00000>;
97 /*96 MB*/
98 ti,omap_ion_heap_tiler_size = <0x6000000>;
99 /*15 MB*/
100 ti,omap_ion_heap_nonsecure_tiler_size = <0xF00000>;
101 };
102
77 sound { 103 sound {
78 compatible = "ti,abe-twl6040"; 104 compatible = "ti,abe-twl6040";
79 ti,model = "PandaBoard5"; 105 ti,model = "PandaBoard5";
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 3f1846ae98a..2d91a16310a 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -43,7 +43,7 @@
43 1000000 1060000 43 1000000 1060000
44 1500000 1250000 44 1500000 1250000
45 >; 45 >;
46 clocks = <&dpll_mpu>; 46 clocks = <&dpll_mpu_ck>;
47 clock-names = "cpu"; 47 clock-names = "cpu";
48 clock-latency = <300000>; /* From omap-cpufreq driver */ 48 clock-latency = <300000>; /* From omap-cpufreq driver */
49 }; 49 };
@@ -104,7 +104,7 @@
104 ti,hwmods = "counter_32k"; 104 ti,hwmods = "counter_32k";
105 }; 105 };
106 106
107 dpll_mpu: dpll_mpu { 107 dpll_mpu_ck: dpll_mpu_ck {
108 #clock-cells = <0>; 108 #clock-cells = <0>;
109 compatible = "ti,omap-clock"; 109 compatible = "ti,omap-clock";
110 }; 110 };
@@ -679,6 +679,9 @@
679 compatible = "ti,omap-usb2"; 679 compatible = "ti,omap-usb2";
680 reg = <0x4a084000 0x7c>; 680 reg = <0x4a084000 0x7c>;
681 ctrl-module = <&omap_control_usb>; 681 ctrl-module = <&omap_control_usb>;
682 wkupclk = "usb_phy_cm_clk32k";
683 optclk = "usb_otg_ss_refclk960m";
684
682 }; 685 };
683 686
684 usb3_phy: usb3phy@4a084400 { 687 usb3_phy: usb3phy@4a084400 {
@@ -688,6 +691,8 @@
688 <0x4a084c00 0x40>; 691 <0x4a084c00 0x40>;
689 reg-names = "phy_rx", "phy_tx", "pll_ctrl"; 692 reg-names = "phy_rx", "phy_tx", "pll_ctrl";
690 ctrl-module = <&omap_control_usb>; 693 ctrl-module = <&omap_control_usb>;
694 wkupclk = "usb_phy_cm_clk32k";
695 optclk = "usb_otg_ss_refclk960m";
691 }; 696 };
692 }; 697 };
693 698
diff --git a/arch/arm/configs/android_omap_defconfig b/arch/arm/configs/android_omap_defconfig
index e952fa9429b..dfda9624155 100644
--- a/arch/arm/configs/android_omap_defconfig
+++ b/arch/arm/configs/android_omap_defconfig
@@ -22,6 +22,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
22# CONFIG_BLK_DEV_BSG is not set 22# CONFIG_BLK_DEV_BSG is not set
23CONFIG_PARTITION_ADVANCED=y 23CONFIG_PARTITION_ADVANCED=y
24CONFIG_ARCH_OMAP=y 24CONFIG_ARCH_OMAP=y
25CONFIG_ARCH_OMAP2PLUS=y
25CONFIG_OMAP_RESET_CLOCKS=y 26CONFIG_OMAP_RESET_CLOCKS=y
26CONFIG_OMAP_MUX_DEBUG=y 27CONFIG_OMAP_MUX_DEBUG=y
27CONFIG_SOC_OMAP5=y 28CONFIG_SOC_OMAP5=y
@@ -30,9 +31,10 @@ CONFIG_ARM_THUMBEE=y
30CONFIG_ARM_ERRATA_411920=y 31CONFIG_ARM_ERRATA_411920=y
31CONFIG_SMP=y 32CONFIG_SMP=y
32CONFIG_NR_CPUS=2 33CONFIG_NR_CPUS=2
34CONFIG_PREEMPT=y
33CONFIG_ZBOOT_ROM_TEXT=0x0 35CONFIG_ZBOOT_ROM_TEXT=0x0
34CONFIG_ZBOOT_ROM_BSS=0x0 36CONFIG_ZBOOT_ROM_BSS=0x0
35CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO0,115200 init=/init androidboot.console=ttyO0 early_printk" 37CONFIG_CMDLINE="root=/dev/mmcblk0p2 rw rootwait console=ttyO0,115200 androidboot.console=ttyO0 vmalloc=496M init=/init omapfb.fb_opt=-1,-1,-1,1,1280,720 cma=64M no_console_suspend"
36CONFIG_CMDLINE_FORCE=y 38CONFIG_CMDLINE_FORCE=y
37CONFIG_KEXEC=y 39CONFIG_KEXEC=y
38CONFIG_CPU_FREQ=y 40CONFIG_CPU_FREQ=y
@@ -175,6 +177,7 @@ CONFIG_REGULATOR_TPS65023=y
175CONFIG_REGULATOR_TPS6507X=y 177CONFIG_REGULATOR_TPS6507X=y
176CONFIG_REGULATOR_TPS65217=y 178CONFIG_REGULATOR_TPS65217=y
177CONFIG_REGULATOR_TPS65910=y 179CONFIG_REGULATOR_TPS65910=y
180CONFIG_REGULATOR_TIAVSCLASS0=y
178CONFIG_MEDIA_SUPPORT=m 181CONFIG_MEDIA_SUPPORT=m
179CONFIG_MEDIA_CAMERA_SUPPORT=y 182CONFIG_MEDIA_CAMERA_SUPPORT=y
180CONFIG_VIDEO_DEV=m 183CONFIG_VIDEO_DEV=m
@@ -186,17 +189,19 @@ CONFIG_MEDIA_USB_SUPPORT=y
186CONFIG_USB_VIDEO_CLASS=m 189CONFIG_USB_VIDEO_CLASS=m
187CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y 190CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
188CONFIG_USB_GSPCA=m 191CONFIG_USB_GSPCA=m
189CONFIG_DRM=y
190CONFIG_DRM_OMAP=y
191CONFIG_DRM_OMAP_NUM_CRTCS=3 192CONFIG_DRM_OMAP_NUM_CRTCS=3
192CONFIG_FIRMWARE_EDID=y 193CONFIG_FIRMWARE_EDID=y
193CONFIG_FB_MODE_HELPERS=y 194CONFIG_FB_MODE_HELPERS=y
194CONFIG_FB_TILEBLITTING=y 195CONFIG_FB_TILEBLITTING=y
196CONFIG_DSSCOMP=y
197CONFIG_DSSCOMP_DEBUG_LOG=y
195CONFIG_OMAP2_DSS=y 198CONFIG_OMAP2_DSS=y
196CONFIG_OMAP2_DSS_DRA7XX_DPI=y 199CONFIG_OMAP2_DSS_DRA7XX_DPI=y
197CONFIG_OMAP2_DSS_RFBI=y 200CONFIG_OMAP2_DSS_RFBI=y
198CONFIG_OMAP2_DSS_SDI=y 201CONFIG_OMAP2_DSS_SDI=y
199CONFIG_OMAP2_DSS_DSI=y 202CONFIG_OMAP2_DSS_DSI=y
203CONFIG_FB_OMAP2=y
204CONFIG_OMAPLFB=y
200CONFIG_PANEL_GENERIC_DPI=y 205CONFIG_PANEL_GENERIC_DPI=y
201CONFIG_PANEL_TFP410=y 206CONFIG_PANEL_TFP410=y
202CONFIG_PANEL_LGPHILIPS_LB035Q02=y 207CONFIG_PANEL_LGPHILIPS_LB035Q02=y
@@ -213,32 +218,39 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y
213CONFIG_LCD_CLASS_DEVICE=y 218CONFIG_LCD_CLASS_DEVICE=y
214CONFIG_LCD_PLATFORM=y 219CONFIG_LCD_PLATFORM=y
215CONFIG_BACKLIGHT_CLASS_DEVICE=y 220CONFIG_BACKLIGHT_CLASS_DEVICE=y
216CONFIG_FRAMEBUFFER_CONSOLE=y
217CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
218CONFIG_FONTS=y 221CONFIG_FONTS=y
219CONFIG_FONT_8x8=y 222CONFIG_FONT_8x8=y
220CONFIG_FONT_8x16=y 223CONFIG_FONT_8x16=y
221CONFIG_LOGO=y 224CONFIG_LOGO=y
222CONFIG_SOUND=m 225CONFIG_SOUND=y
223CONFIG_SND=m 226CONFIG_SND=y
227CONFIG_SND_TIMER=y
228CONFIG_SND_PCM=y
224CONFIG_SND_MIXER_OSS=m 229CONFIG_SND_MIXER_OSS=m
225CONFIG_SND_PCM_OSS=m 230CONFIG_SND_PCM_OSS=m
226CONFIG_SND_VERBOSE_PRINTK=y 231CONFIG_SND_VERBOSE_PRINTK=y
232CONFIG_SND_COMPRESS_OFFLOAD=y
227CONFIG_SND_DEBUG=y 233CONFIG_SND_DEBUG=y
228CONFIG_SND_USB_AUDIO=m 234CONFIG_SND_USB_AUDIO=m
229CONFIG_SND_SOC=m 235CONFIG_SND_SOC=y
230CONFIG_SND_OMAP_SOC=m 236CONFIG_SND_DAVINCI_SOC_MCASP=y
237CONFIG_SND_OMAP_SOC=y
238CONFIG_SND_OMAP_SOC_HDMI=y
231CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m 239CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
232CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m 240CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
241CONFIG_SND_OMAP_SOC_OMAP_HDMI=y
233CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m 242CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
243CONFIG_SND_DRA7_SOC_ATL=y
244CONFIG_SND_SOC_DRA7_EVM=y
245CONFIG_SND_SOC_I2C_AND_SPI=y
246CONFIG_SND_SOC_OMAP_HDMI_CODEC=y
247CONFIG_SND_SOC_TLV320AIC3X=y
234CONFIG_USB=y 248CONFIG_USB=y
235CONFIG_USB_DEBUG=y
236CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 249CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
237CONFIG_USB_SUSPEND=y 250CONFIG_USB_SUSPEND=y
238CONFIG_USB_EHCI_HCD=y 251CONFIG_USB_EHCI_HCD=y
239CONFIG_USB_DWC3=m 252CONFIG_USB_XHCI_HCD=y
240CONFIG_USB_DWC3_DEBUG=y 253CONFIG_USB_DWC3=y
241CONFIG_USB_DWC3_VERBOSE=y
242CONFIG_USB_MUSB_HDRC=m 254CONFIG_USB_MUSB_HDRC=m
243CONFIG_USB_MUSB_OMAP2PLUS=m 255CONFIG_USB_MUSB_OMAP2PLUS=m
244CONFIG_USB_MUSB_AM35X=m 256CONFIG_USB_MUSB_AM35X=m
@@ -249,22 +261,15 @@ CONFIG_USB_WDM=y
249CONFIG_USB_STORAGE=y 261CONFIG_USB_STORAGE=y
250CONFIG_USB_TEST=y 262CONFIG_USB_TEST=y
251CONFIG_USB_GADGET=y 263CONFIG_USB_GADGET=y
252CONFIG_USB_GADGET_DEBUG=y
253CONFIG_USB_GADGET_DEBUG_FILES=y 264CONFIG_USB_GADGET_DEBUG_FILES=y
254CONFIG_USB_GADGET_DEBUG_FS=y 265CONFIG_USB_GADGET_DEBUG_FS=y
255CONFIG_USB_ZERO=m 266CONFIG_OMAP_USB2=y
256CONFIG_USB_MASS_STORAGE=m 267CONFIG_OMAP_USB3=y
257CONFIG_USB_G_MULTI=m
258CONFIG_USB_G_MULTI_CDC=y
259CONFIG_USB_ETH=m
260CONFIG_USB_ETH_EEM=y
261CONFIG_OMAP_USB2=m
262CONFIG_OMAP_USB3=m
263CONFIG_OMAP_CONTROL_USB=y 268CONFIG_OMAP_CONTROL_USB=y
264CONFIG_TWL4030_USB=m 269CONFIG_TWL4030_USB=m
265CONFIG_TWL6030_USB=m 270CONFIG_TWL6030_USB=m
266CONFIG_NOP_USB_XCEIV=y 271CONFIG_NOP_USB_XCEIV=y
267CONFIG_PALMAS_USB=m 272CONFIG_PALMAS_USB=y
268CONFIG_MMC=y 273CONFIG_MMC=y
269CONFIG_MMC_UNSAFE_RESUME=y 274CONFIG_MMC_UNSAFE_RESUME=y
270CONFIG_SDIO_UART=y 275CONFIG_SDIO_UART=y
@@ -280,6 +285,8 @@ CONFIG_LEDS_TRIGGER_BACKLIGHT=y
280CONFIG_LEDS_TRIGGER_CPU=y 285CONFIG_LEDS_TRIGGER_CPU=y
281CONFIG_LEDS_TRIGGER_GPIO=y 286CONFIG_LEDS_TRIGGER_GPIO=y
282CONFIG_LEDS_TRIGGER_DEFAULT_ON=y 287CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
288CONFIG_SWITCH=y
289CONFIG_SWITCH_GPIO=y
283CONFIG_RTC_CLASS=y 290CONFIG_RTC_CLASS=y
284CONFIG_RTC_DRV_PALMAS=y 291CONFIG_RTC_DRV_PALMAS=y
285CONFIG_RTC_DRV_TWL92330=y 292CONFIG_RTC_DRV_TWL92330=y
@@ -289,6 +296,11 @@ CONFIG_DMADEVICES=y
289CONFIG_TI_EDMA=y 296CONFIG_TI_EDMA=y
290CONFIG_DMA_OMAP=y 297CONFIG_DMA_OMAP=y
291CONFIG_STAGING=y 298CONFIG_STAGING=y
299CONFIG_FB=y
300CONFIG_DRM=y
301CONFIG_DRM_OMAP=y
302CONFIG_DRM_OMAP_DISPLAY=n
303CONFIG_DRM_OMAP_DMM_TILER=y
292CONFIG_ANDROID=y 304CONFIG_ANDROID=y
293CONFIG_ANDROID_BINDER_IPC=y 305CONFIG_ANDROID_BINDER_IPC=y
294CONFIG_ASHMEM=y 306CONFIG_ASHMEM=y
@@ -298,6 +310,8 @@ CONFIG_ANDROID_TIMED_GPIO=y
298CONFIG_ANDROID_LOW_MEMORY_KILLER=y 310CONFIG_ANDROID_LOW_MEMORY_KILLER=y
299CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y 311CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y
300CONFIG_ANDROID_INTF_ALARM_DEV=y 312CONFIG_ANDROID_INTF_ALARM_DEV=y
313CONFIG_USB_G_ANDROID=y
314CONFIG_USB_LIBCOMPOSITE=y
301CONFIG_TI_SOC_THERMAL=y 315CONFIG_TI_SOC_THERMAL=y
302CONFIG_TI_THERMAL=y 316CONFIG_TI_THERMAL=y
303CONFIG_OMAP4_THERMAL=y 317CONFIG_OMAP4_THERMAL=y
@@ -309,6 +323,7 @@ CONFIG_EXT3_FS=y
309CONFIG_EXT4_FS=y 323CONFIG_EXT4_FS=y
310CONFIG_QUOTA=y 324CONFIG_QUOTA=y
311CONFIG_QFMT_V2=y 325CONFIG_QFMT_V2=y
326CONFIG_FUSE_FS=y
312CONFIG_MSDOS_FS=y 327CONFIG_MSDOS_FS=y
313CONFIG_VFAT_FS=y 328CONFIG_VFAT_FS=y
314CONFIG_TMPFS=y 329CONFIG_TMPFS=y
@@ -333,9 +348,6 @@ CONFIG_TIMER_STATS=y
333CONFIG_PROVE_LOCKING=y 348CONFIG_PROVE_LOCKING=y
334# CONFIG_DEBUG_BUGVERBOSE is not set 349# CONFIG_DEBUG_BUGVERBOSE is not set
335CONFIG_DEBUG_INFO=y 350CONFIG_DEBUG_INFO=y
336CONFIG_DEBUG_LL=y
337CONFIG_DEBUG_LL_UART_NONE=y
338CONFIG_EARLY_PRINTK=y
339CONFIG_SECURITY=y 351CONFIG_SECURITY=y
340CONFIG_CRYPTO_MICHAEL_MIC=y 352CONFIG_CRYPTO_MICHAEL_MIC=y
341# CONFIG_CRYPTO_ANSI_CPRNG is not set 353# CONFIG_CRYPTO_ANSI_CPRNG is not set
@@ -344,5 +356,9 @@ CONFIG_CRC_T10DIF=y
344CONFIG_CRC_ITU_T=y 356CONFIG_CRC_ITU_T=y
345CONFIG_CRC7=y 357CONFIG_CRC7=y
346CONFIG_LIBCRC32C=y 358CONFIG_LIBCRC32C=y
359CONFIG_ION=y
360CONFIG_ION_OMAP=y
361CONFIG_CMA=y
347CONFIG_TI_DAVINCI_MDIO=y 362CONFIG_TI_DAVINCI_MDIO=y
348CONFIG_TI_DAVINCI_CPDMA=y 363CONFIG_TI_DAVINCI_CPDMA=y
364CONFIG_PM_WAKELOCKS=y
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index e3514f7e7c0..3ef11817cf1 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -220,26 +220,34 @@ CONFIG_FONTS=y
220CONFIG_FONT_8x8=y 220CONFIG_FONT_8x8=y
221CONFIG_FONT_8x16=y 221CONFIG_FONT_8x16=y
222CONFIG_LOGO=y 222CONFIG_LOGO=y
223CONFIG_SOUND=m 223CONFIG_SOUND=y
224CONFIG_SND=m 224CONFIG_SND=y
225CONFIG_SND_TIMER=y
226CONFIG_SND_PCM=y
225CONFIG_SND_MIXER_OSS=m 227CONFIG_SND_MIXER_OSS=m
226CONFIG_SND_PCM_OSS=m 228CONFIG_SND_PCM_OSS=m
227CONFIG_SND_VERBOSE_PRINTK=y 229CONFIG_SND_VERBOSE_PRINTK=y
230CONFIG_SND_COMPRESS_OFFLOAD=y
228CONFIG_SND_DEBUG=y 231CONFIG_SND_DEBUG=y
229CONFIG_SND_USB_AUDIO=m 232CONFIG_SND_USB_AUDIO=m
230CONFIG_SND_SOC=m 233CONFIG_SND_SOC=y
231CONFIG_SND_OMAP_SOC=m 234CONFIG_SND_DAVINCI_SOC_MCASP=y
235CONFIG_SND_OMAP_SOC=y
236CONFIG_SND_OMAP_SOC_HDMI=y
232CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m 237CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
233CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m 238CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
239CONFIG_SND_OMAP_SOC_OMAP_HDMI=y
234CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m 240CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
241CONFIG_SND_DRA7_SOC_ATL=y
242CONFIG_SND_SOC_DRA7_EVM=y
243CONFIG_SND_SOC_I2C_AND_SPI=y
244CONFIG_SND_SOC_OMAP_HDMI_CODEC=y
245CONFIG_SND_SOC_TLV320AIC3X=y
235CONFIG_USB=y 246CONFIG_USB=y
236CONFIG_USB_DEBUG=y
237CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 247CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
238CONFIG_USB_SUSPEND=y 248CONFIG_USB_SUSPEND=y
239CONFIG_USB_EHCI_HCD=y 249CONFIG_USB_EHCI_HCD=y
240CONFIG_USB_DWC3=m 250CONFIG_USB_DWC3=m
241CONFIG_USB_DWC3_DEBUG=y
242CONFIG_USB_DWC3_VERBOSE=y
243CONFIG_USB_MUSB_HDRC=m 251CONFIG_USB_MUSB_HDRC=m
244CONFIG_USB_MUSB_OMAP2PLUS=m 252CONFIG_USB_MUSB_OMAP2PLUS=m
245CONFIG_USB_MUSB_AM35X=m 253CONFIG_USB_MUSB_AM35X=m
@@ -250,7 +258,6 @@ CONFIG_USB_WDM=y
250CONFIG_USB_STORAGE=y 258CONFIG_USB_STORAGE=y
251CONFIG_USB_TEST=y 259CONFIG_USB_TEST=y
252CONFIG_USB_GADGET=y 260CONFIG_USB_GADGET=y
253CONFIG_USB_GADGET_DEBUG=y
254CONFIG_USB_GADGET_DEBUG_FILES=y 261CONFIG_USB_GADGET_DEBUG_FILES=y
255CONFIG_USB_GADGET_DEBUG_FS=y 262CONFIG_USB_GADGET_DEBUG_FS=y
256CONFIG_USB_ZERO=m 263CONFIG_USB_ZERO=m
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index eca7a77df80..8af6b54ab66 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -240,7 +240,7 @@ static const char *omap5_boards_compat[] __initdata = {
240 NULL, 240 NULL,
241}; 241};
242 242
243DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)") 243DT_MACHINE_START(OMAP5_DT, "OMAP5 Panda board")
244 .reserve = omap_reserve, 244 .reserve = omap_reserve,
245 .smp = smp_ops(omap4_smp_ops), 245 .smp = smp_ops(omap4_smp_ops),
246 .map_io = omap5_map_io, 246 .map_io = omap5_map_io,
diff --git a/arch/arm/mach-omap2/cclock54xx_data.c b/arch/arm/mach-omap2/cclock54xx_data.c
index 4a17f12caa9..4228e2ba37a 100644
--- a/arch/arm/mach-omap2/cclock54xx_data.c
+++ b/arch/arm/mach-omap2/cclock54xx_data.c
@@ -1018,12 +1018,14 @@ static const char *gpu_core_gclk_mux_parents[] = {
1018 "dpll_core_h14x2_ck", "dpll_per_h14x2_ck", 1018 "dpll_core_h14x2_ck", "dpll_per_h14x2_ck",
1019}; 1019};
1020 1020
1021DEFINE_CLK_MUX(gpu_core_gclk_mux, gpu_core_gclk_mux_parents, NULL, 0x0, 1021DEFINE_CLK_MUX(gpu_core_gclk_mux, gpu_core_gclk_mux_parents, NULL,
1022 OMAP54XX_CM_GPU_GPU_CLKCTRL, OMAP54XX_CLKSEL_GPU_CORE_GCLK_SHIFT, 1022 CLK_SET_RATE_PARENT, OMAP54XX_CM_GPU_GPU_CLKCTRL,
1023 OMAP54XX_CLKSEL_GPU_CORE_GCLK_SHIFT,
1023 OMAP54XX_CLKSEL_GPU_CORE_GCLK_WIDTH, 0x0, NULL); 1024 OMAP54XX_CLKSEL_GPU_CORE_GCLK_WIDTH, 0x0, NULL);
1024 1025
1025DEFINE_CLK_MUX(gpu_hyd_gclk_mux, gpu_core_gclk_mux_parents, NULL, 0x0, 1026DEFINE_CLK_MUX(gpu_hyd_gclk_mux, gpu_core_gclk_mux_parents, NULL,
1026 OMAP54XX_CM_GPU_GPU_CLKCTRL, OMAP54XX_CLKSEL_GPU_HYD_GCLK_SHIFT, 1027 CLK_SET_RATE_PARENT, OMAP54XX_CM_GPU_GPU_CLKCTRL,
1028 OMAP54XX_CLKSEL_GPU_HYD_GCLK_SHIFT,
1027 OMAP54XX_CLKSEL_GPU_HYD_GCLK_WIDTH, 0x0, NULL); 1029 OMAP54XX_CLKSEL_GPU_HYD_GCLK_WIDTH, 0x0, NULL);
1028 1030
1029DEFINE_CLK_DIVIDER(hsi_fclk, "dpll_per_m2x2_ck", &dpll_per_m2x2_ck, 0x0, 1031DEFINE_CLK_DIVIDER(hsi_fclk, "dpll_per_m2x2_ck", &dpll_per_m2x2_ck, 0x0,
diff --git a/arch/arm/mach-omap2/cclock7xx_data.c b/arch/arm/mach-omap2/cclock7xx_data.c
index e77d58771c7..70bbe2c7760 100644
--- a/arch/arm/mach-omap2/cclock7xx_data.c
+++ b/arch/arm/mach-omap2/cclock7xx_data.c
@@ -40,8 +40,9 @@
40#include "prm-regbits-7xx.h" 40#include "prm-regbits-7xx.h"
41#include "control.h" 41#include "control.h"
42 42
43#define DRA7_DPLL_ABE_DEFFREQ 361267200 43#define DRA7_DPLL_ABE_DEFFREQ 180633600
44#define DRA7_DPLL_GMAC_DEFFREQ 1000000000 44#define DRA7_DPLL_GMAC_DEFFREQ 1000000000
45#define DRA7_DPLL_USB_DEFFREQ 960000000
45 46
46/* Root clocks */ 47/* Root clocks */
47 48
@@ -51,7 +52,7 @@ DEFINE_CLK_FIXED_RATE(atl_clkin1_ck, CLK_IS_ROOT, 0, 0x0);
51 52
52DEFINE_CLK_FIXED_RATE(atl_clkin2_ck, CLK_IS_ROOT, 0, 0x0); 53DEFINE_CLK_FIXED_RATE(atl_clkin2_ck, CLK_IS_ROOT, 0, 0x0);
53 54
54DEFINE_CLK_FIXED_RATE(atlclkin3_ck, CLK_IS_ROOT, 0, 0x0); 55DEFINE_CLK_FIXED_RATE(atl_clkin3_ck, CLK_IS_ROOT, 0, 0x0);
55 56
56DEFINE_CLK_FIXED_RATE(hdmi_clkin_ck, CLK_IS_ROOT, 0, 0x0); 57DEFINE_CLK_FIXED_RATE(hdmi_clkin_ck, CLK_IS_ROOT, 0, 0x0);
57 58
@@ -1245,7 +1246,7 @@ static struct clk_hw_omap hdmi_div_clk_hw = {
1245DEFINE_STRUCT_CLK(hdmi_div_clk, hdmi_dclk_div_parents, apll_pcie_clkvcoldo_ops); 1246DEFINE_STRUCT_CLK(hdmi_div_clk, hdmi_dclk_div_parents, apll_pcie_clkvcoldo_ops);
1246 1247
1247DEFINE_CLK_MUX(hdmi_dpll_clk_mux, abe_dpll_sys_clk_mux_parents, NULL, 0x0, 1248DEFINE_CLK_MUX(hdmi_dpll_clk_mux, abe_dpll_sys_clk_mux_parents, NULL, 0x0,
1248 DRA7XX_CM_CLKSEL_HDMI_CLK_CLKOUTMUX, DRA7XX_CLKSEL_SHIFT, 1249 DRA7XX_CM_CLKSEL_HDMI_PLL_SYS, DRA7XX_CLKSEL_SHIFT,
1249 DRA7XX_CLKSEL_WIDTH, 0x0, NULL); 1250 DRA7XX_CLKSEL_WIDTH, 0x0, NULL);
1250 1251
1251static struct clk l3_iclk_div; 1252static struct clk l3_iclk_div;
@@ -1525,13 +1526,15 @@ static const char *gpu_core_gclk_mux_parents[] = {
1525 "dpll_core_h14x2_ck", "dpll_per_h14x2_ck", "dpll_gpu_m2_ck", 1526 "dpll_core_h14x2_ck", "dpll_per_h14x2_ck", "dpll_gpu_m2_ck",
1526}; 1527};
1527 1528
1528DEFINE_CLK_MUX(gpu_core_gclk_mux, gpu_core_gclk_mux_parents, NULL, 0x0, 1529DEFINE_CLK_MUX(gpu_core_gclk_mux, gpu_core_gclk_mux_parents, NULL,
1529 DRA7XX_CM_GPU_GPU_CLKCTRL, DRA7XX_CLKSEL_CORE_CLK_SHIFT, 1530 CLK_SET_RATE_PARENT, DRA7XX_CM_GPU_GPU_CLKCTRL,
1530 DRA7XX_CLKSEL_CORE_CLK_WIDTH, 0x0, NULL); 1531 DRA7XX_CLKSEL_CORE_CLK_SHIFT, DRA7XX_CLKSEL_CORE_CLK_WIDTH,
1532 0x0, NULL);
1531 1533
1532DEFINE_CLK_MUX(gpu_hyd_gclk_mux, gpu_core_gclk_mux_parents, NULL, 0x0, 1534DEFINE_CLK_MUX(gpu_hyd_gclk_mux, gpu_core_gclk_mux_parents, NULL,
1533 DRA7XX_CM_GPU_GPU_CLKCTRL, DRA7XX_CLKSEL_HYD_CLK_SHIFT, 1535 CLK_SET_RATE_PARENT, DRA7XX_CM_GPU_GPU_CLKCTRL,
1534 DRA7XX_CLKSEL_HYD_CLK_WIDTH, 0x0, NULL); 1536 DRA7XX_CLKSEL_HYD_CLK_SHIFT, DRA7XX_CLKSEL_HYD_CLK_WIDTH,
1537 0x0, NULL);
1535 1538
1536static const char *ipu1_gfclk_mux_parents[] = { 1539static const char *ipu1_gfclk_mux_parents[] = {
1537 "dpll_abe_m2x2_ck", "dpll_core_h22x2_ck", 1540 "dpll_abe_m2x2_ck", "dpll_core_h22x2_ck",
@@ -1555,9 +1558,9 @@ DEFINE_CLK_DIVIDER_TABLE(l3instr_ts_gclk_div, "wkupaon_iclk_mux",
1555 1558
1556static const char *mcasp1_ahclkr_mux_parents[] = { 1559static const char *mcasp1_ahclkr_mux_parents[] = {
1557 "abe_24m_fclk", "abe_sys_clk_div", "func_24m_clk", 1560 "abe_24m_fclk", "abe_sys_clk_div", "func_24m_clk",
1558 "atlclkin3", "atl_clkin2", "atl_clkin1", 1561 "atl_clkin3_ck", "atl_clkin2_ck", "atl_clkin1_ck",
1559 "atl_clkin0", "sys_clkin2", "ref_clkin0", 1562 "atl_clkin0_ck", "sys_clkin2", "ref_clkin0_ck",
1560 "ref_clkin1", "ref_clkin2", "ref_clkin3", 1563 "ref_clkin1_ck", "ref_clkin2_ck", "ref_clkin3_ck",
1561 "mlb_clk", "mlbp_clk", 1564 "mlb_clk", "mlbp_clk",
1562}; 1565};
1563 1566
@@ -1692,8 +1695,8 @@ DEFINE_CLK_DIVIDER(qspi_gfclk_div, "qspi_gfclk_mux", &qspi_gfclk_mux, 0x0,
1692 1695
1693static const char *timer10_gfclk_mux_parents[] = { 1696static const char *timer10_gfclk_mux_parents[] = {
1694 "timer_sys_clk_div", "sys_32k_ck", "sys_clkin2", 1697 "timer_sys_clk_div", "sys_32k_ck", "sys_clkin2",
1695 "ref_clkin0", "ref_clkin1", "ref_clkin2", 1698 "ref_clkin0_ck", "ref_clkin1_ck", "ref_clkin2_ck",
1696 "ref_clkin3", "abe_giclk_div", "video1_div_clk", 1699 "ref_clkin3_ck", "abe_giclk_div", "video1_div_clk",
1697 "video2_div_clk", "hdmi_div_clk", 1700 "video2_div_clk", "hdmi_div_clk",
1698}; 1701};
1699 1702
@@ -1739,8 +1742,8 @@ DEFINE_CLK_MUX(timer4_gfclk_mux, timer10_gfclk_mux_parents, NULL, 0x0,
1739 1742
1740static const char *timer5_gfclk_mux_parents[] = { 1743static const char *timer5_gfclk_mux_parents[] = {
1741 "timer_sys_clk_div", "sys_32k_ck", "sys_clkin2", 1744 "timer_sys_clk_div", "sys_32k_ck", "sys_clkin2",
1742 "ref_clkin0", "ref_clkin1", "ref_clkin2", 1745 "ref_clkin0_ck", "ref_clkin1_ck", "ref_clkin2_ck",
1743 "ref_clkin3", "abe_giclk_div", "video1_div_clk", 1746 "ref_clkin3_ck", "abe_giclk_div", "video1_div_clk",
1744 "video2_div_clk", "hdmi_div_clk", "clkoutmux0_clk_mux", 1747 "video2_div_clk", "hdmi_div_clk", "clkoutmux0_clk_mux",
1745}; 1748};
1746 1749
@@ -1828,7 +1831,7 @@ static struct omap_clk dra7xx_clks[] = {
1828 CLK(NULL, "atl_clkin0_ck", &atl_clkin0_ck, CK_7XX), 1831 CLK(NULL, "atl_clkin0_ck", &atl_clkin0_ck, CK_7XX),
1829 CLK(NULL, "atl_clkin1_ck", &atl_clkin1_ck, CK_7XX), 1832 CLK(NULL, "atl_clkin1_ck", &atl_clkin1_ck, CK_7XX),
1830 CLK(NULL, "atl_clkin2_ck", &atl_clkin2_ck, CK_7XX), 1833 CLK(NULL, "atl_clkin2_ck", &atl_clkin2_ck, CK_7XX),
1831 CLK(NULL, "atlclkin3_ck", &atlclkin3_ck, CK_7XX), 1834 CLK(NULL, "atl_clkin3_ck", &atl_clkin3_ck, CK_7XX),
1832 CLK(NULL, "hdmi_clkin_ck", &hdmi_clkin_ck, CK_7XX), 1835 CLK(NULL, "hdmi_clkin_ck", &hdmi_clkin_ck, CK_7XX),
1833 CLK(NULL, "mlb_clkin_ck", &mlb_clkin_ck, CK_7XX), 1836 CLK(NULL, "mlb_clkin_ck", &mlb_clkin_ck, CK_7XX),
1834 CLK(NULL, "mlbp_clkin_ck", &mlbp_clkin_ck, CK_7XX), 1837 CLK(NULL, "mlbp_clkin_ck", &mlbp_clkin_ck, CK_7XX),
@@ -2123,7 +2126,9 @@ static struct reparent_init_clks reparent_clks[] = {
2123 2126
2124static struct rate_init_clks rate_clks[] = { 2127static struct rate_init_clks rate_clks[] = {
2125 { .name = "dpll_abe_ck", .rate = DRA7_DPLL_ABE_DEFFREQ }, 2128 { .name = "dpll_abe_ck", .rate = DRA7_DPLL_ABE_DEFFREQ },
2129 { .name = "dpll_abe_m2x2_ck", .rate = DRA7_DPLL_ABE_DEFFREQ * 2 },
2126 { .name = "dpll_gmac_ck", .rate = DRA7_DPLL_GMAC_DEFFREQ }, 2130 { .name = "dpll_gmac_ck", .rate = DRA7_DPLL_GMAC_DEFFREQ },
2131 { .name = "dpll_usb_ck", .rate = DRA7_DPLL_USB_DEFFREQ },
2127}; 2132};
2128 2133
2129int __init dra7xx_clk_init(void) 2134int __init dra7xx_clk_init(void)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 2d4f9c02dcc..a8f1557a225 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -22,6 +22,8 @@
22#include <linux/platform_data/omap_ocp2scp.h> 22#include <linux/platform_data/omap_ocp2scp.h>
23#include <linux/usb/omap_control_usb.h> 23#include <linux/usb/omap_control_usb.h>
24#include <linux/platform_data/mailbox-omap.h> 24#include <linux/platform_data/mailbox-omap.h>
25#include <linux/platform_data/omap_gcx.h>
26#include "omap-pm.h"
25 27
26#include <asm/mach-types.h> 28#include <asm/mach-types.h>
27#include <asm/mach/map.h> 29#include <asm/mach/map.h>
@@ -447,6 +449,70 @@ static void __init omap_init_dmic(void)
447static inline void omap_init_dmic(void) {} 449static inline void omap_init_dmic(void) {}
448#endif 450#endif
449 451
452static int gcxxx_scale_dev(struct device *dev, unsigned long val);
453static int gcxxx_set_l3_bw(struct device *dev, unsigned long val);
454
455static struct omap_gcx_platform_data omap_gcxxx = {
456 .get_context_loss_count = omap_pm_get_dev_context_loss_count,
457 .scale_dev = gcxxx_scale_dev,
458 .set_bw = gcxxx_set_l3_bw,
459};
460
461struct omap_device_pm_latency omap_gcxxx_latency[] = {
462 {
463 .deactivate_func = omap_device_idle_hwmods,
464 .activate_func = omap_device_enable_hwmods,
465 .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
466 }
467};
468
469static int gcxxx_scale_dev(struct device *dev, unsigned long val)
470{
471 /*omap_device_scale(dev, val) is not supported, returning with no-op
472 * for now. */
473 return 0;
474}
475
476static int gcxxx_set_l3_bw(struct device *dev, unsigned long val)
477{
478 return omap_pm_set_min_bus_tput(dev, OCP_INITIATOR_AGENT, val);
479}
480
481int __init gcxxx_init(void)
482{
483 int retval = 0;
484 struct omap_hwmod *oh;
485 struct platform_device *pdev;
486 /*struct omap_device *od;
487 struct device *dev;*/
488 const char *oh_name = "bb2d";
489 const char *dev_name = "gccore";
490
491 /*
492 * Hwmod lookup will fail in case our platform doesn't support the
493 * hardware spinlock module, so it is safe to run this initcall
494 * on all omaps
495 */
496 oh = omap_hwmod_lookup(oh_name);
497 if (oh == NULL)
498 return -EINVAL;
499
500 omap_gcxxx.regbase = omap_hwmod_get_mpu_rt_va(oh);
501 omap_gcxxx.is_hw_present = (soc_is_omap543x()
502 || soc_is_dra7xx()) ? true : false;
503 pdev = omap_device_build(dev_name, 0, oh, &omap_gcxxx,
504 sizeof(omap_gcxxx), omap_gcxxx_latency,
505 ARRAY_SIZE(omap_gcxxx_latency), false);
506 if (IS_ERR(pdev)) {
507 pr_err("Can't build omap_device for %s:%s\n", dev_name,
508 oh_name);
509 retval = PTR_ERR(pdev);
510 }
511
512 return retval;
513}
514
515
450#if defined(CONFIG_SND_OMAP_SOC_ABE) || \ 516#if defined(CONFIG_SND_OMAP_SOC_ABE) || \
451 defined(CONFIG_SND_OMAP_SOC_ABE_MODULE) 517 defined(CONFIG_SND_OMAP_SOC_ABE_MODULE)
452 518
@@ -683,6 +749,7 @@ static int __init omap2_init_devices(void)
683 omap_init_audio(); 749 omap_init_audio();
684 omap_init_camera(); 750 omap_init_camera();
685 omap_init_mbox(); 751 omap_init_mbox();
752 gcxxx_init();
686 /* If dtb is there, the devices will be created dynamically */ 753 /* If dtb is there, the devices will be created dynamically */
687 if (!of_have_populated_dt()) { 754 if (!of_have_populated_dt()) {
688 omap_init_control_usb(); 755 omap_init_control_usb();
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 502196efd57..fe0dd68f40f 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -129,8 +129,6 @@ static __init int omapdrm_init(void)
129 struct omap_hwmod *oh; 129 struct omap_hwmod *oh;
130 int r = 0; 130 int r = 0;
131 131
132 /* create DRM and DMM device */
133 if (omap_drm_device != NULL) {
134 if (!of_find_compatible_node(NULL, NULL, "ti,omap4-dmm") && 132 if (!of_find_compatible_node(NULL, NULL, "ti,omap4-dmm") &&
135 !of_find_compatible_node(NULL, NULL, "ti,omap5-dmm")) { 133 !of_find_compatible_node(NULL, NULL, "ti,omap5-dmm")) {
136 134
@@ -144,6 +142,9 @@ static __init int omapdrm_init(void)
144 oh->name); 142 oh->name);
145 } 143 }
146 144
145 /* create DRM and DMM device */
146 if (omap_drm_device != NULL) {
147
147 platform_drm_data.omaprev = GET_OMAP_TYPE; 148 platform_drm_data.omaprev = GET_OMAP_TYPE;
148 149
149 r = platform_device_register(omap_drm_device); 150 r = platform_device_register(omap_drm_device);
@@ -427,6 +428,13 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
427 return -ENODEV; 428 return -ENODEV;
428 } 429 }
429 430
431 /* create DMM and DRM device */
432 r = omapdrm_init();
433 if (r < 0) {
434 pr_err("Unable to register omapdrm/dmm device\n");
435 return r;
436 }
437
430 board_data->version = ver; 438 board_data->version = ver;
431 board_data->dsi_enable_pads = omap_dsi_enable_pads; 439 board_data->dsi_enable_pads = omap_dsi_enable_pads;
432 board_data->dsi_disable_pads = omap_dsi_disable_pads; 440 board_data->dsi_disable_pads = omap_dsi_disable_pads;
@@ -536,13 +544,6 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
536 544
537 } 545 }
538 546
539 /* create DMM and DRM device */
540 r = omapdrm_init();
541 if (r < 0) {
542 pr_err("Unable to register omapdrm device\n");
543 return r;
544 }
545
546 return 0; 547 return 0;
547} 548}
548 549
@@ -739,6 +740,13 @@ int __init omapdss_init_of(void)
739 return -ENODEV; 740 return -ENODEV;
740 } 741 }
741 742
743 /* create omapdrm devices */
744 r = omapdrm_init();
745 if (r < 0) {
746 pr_err("Unable to create omapdrm/dmm device\n");
747 return r;
748 }
749
742 board_data.version = ver; 750 board_data.version = ver;
743 751
744 /* find the main dss node */ 752 /* find the main dss node */
@@ -768,12 +776,5 @@ int __init omapdss_init_of(void)
768 776
769 hdmi_init_of(); 777 hdmi_init_of();
770 778
771 /* create omapdrm devices */
772 r = omapdrm_init();
773 if (r < 0) {
774 pr_err("Unable to create omapdrm device\n");
775 return r;
776 }
777
778 return 0; 779 return 0;
779} 780}
diff --git a/arch/arm/mach-omap2/fb.c b/arch/arm/mach-omap2/fb.c
index d9bd965f6d0..14455b824c2 100644
--- a/arch/arm/mach-omap2/fb.c
+++ b/arch/arm/mach-omap2/fb.c
@@ -108,6 +108,11 @@ static struct platform_device omap_fb_device = {
108 .num_resources = 0, 108 .num_resources = 0,
109}; 109};
110 110
111void omapfb_set_platform_data(struct omapfb_platform_data *data)
112{
113 omapfb_config = *data;
114}
115
111static int __init omap_init_fb(void) 116static int __init omap_init_fb(void)
112{ 117{
113 return platform_device_register(&omap_fb_device); 118 return platform_device_register(&omap_fb_device);
@@ -116,3 +121,4 @@ static int __init omap_init_fb(void)
116arch_initcall(omap_init_fb); 121arch_initcall(omap_init_fb);
117 122
118#endif 123#endif
124
diff --git a/arch/arm/mach-omap2/include/mach/tiler.h b/arch/arm/mach-omap2/include/mach/tiler.h
new file mode 100644
index 00000000000..9ece8f533ec
--- /dev/null
+++ b/arch/arm/mach-omap2/include/mach/tiler.h
@@ -0,0 +1,570 @@
1/*
2 * tiler.h
3 *
4 * TILER driver support functions for TI TILER hardware block.
5 *
6 * Authors: Lajos Molnar <molnar@ti.com>
7 * David Sin <davidsin@ti.com>
8 *
9 * Copyright (C) 2009-2011 Texas Instruments, Inc.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 *
16 * * Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 *
19 * * Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 *
23 * * Neither the name of Texas Instruments Incorporated nor the names of
24 * its contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
29 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
31 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
33 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
34 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
35 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
36 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
37 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 */
39
40#ifndef TILER_H
41#define TILER_H
42
43#include <linux/mm.h>
44
45/*
46 * ----------------------------- API Definitions -----------------------------
47 */
48
49/* return true if physical address is in the tiler container */
50bool is_tiler_addr(u32 phys);
51
52enum tiler_fmt {
53 TILFMT_MIN = -2,
54 TILFMT_INVALID = -2,
55 TILFMT_NONE = -1,
56 TILFMT_8BIT = 0,
57 TILFMT_16BIT = 1,
58 TILFMT_32BIT = 2,
59 TILFMT_PAGE = 3,
60 TILFMT_MAX = 3,
61 TILFMT_8AND16 = 4, /* used to mark NV12 reserve block */
62};
63
64/* tiler block info */
65struct tiler_block_t {
66 u32 phys; /* system space (L3) tiler addr */
67 u32 width; /* width */
68 u32 height; /* height */
69 u32 key; /* secret key */
70 u32 id; /* unique block ID */
71};
72
73/* tiler (image/video frame) view */
74struct tiler_view_t {
75 u32 tsptr; /* tiler space addr */
76 u32 width; /* width */
77 u32 height; /* height */
78 u32 bpp; /* bytes per pixel */
79 s32 h_inc; /* horizontal increment */
80 s32 v_inc; /* vertical increment */
81};
82
83/* get the tiler format for a physical address or TILFMT_INVALID */
84enum tiler_fmt tiler_fmt(u32 phys);
85
86/* get the modified (1 for page mode) bytes-per-pixel for a tiler block */
87u32 tiler_bpp(const struct tiler_block_t *b);
88
89/* get tiler block physical stride */
90u32 tiler_pstride(const struct tiler_block_t *b);
91
92/* get tiler block virtual stride */
93static inline u32 tiler_vstride(const struct tiler_block_t *b)
94{
95 return PAGE_ALIGN((b->phys & ~PAGE_MASK) + tiler_bpp(b) * b->width);
96}
97
98/* returns the virtual size of the block (for mmap) */
99static inline u32 tiler_size(const struct tiler_block_t *b)
100{
101 return b->height * tiler_vstride(b);
102}
103
104/* Event types */
105#define TILER_DEVICE_CLOSE 0
106
107/**
108 * Registers a notifier block with TILER driver.
109 *
110 * @param nb notifier_block
111 *
112 * @return error status
113 */
114s32 tiler_reg_notifier(struct notifier_block *nb);
115
116/**
117 * Un-registers a notifier block with TILER driver.
118 *
119 * @param nb notifier_block
120 *
121 * @return error status
122 */
123s32 tiler_unreg_notifier(struct notifier_block *nb);
124
125/**
126 * Get the physical address for a given user va.
127 *
128 * @param usr user virtual address
129 *
130 * @return valid pa or 0 for error
131 */
132u32 tiler_virt2phys(u32 usr);
133
134/**
135 * Reserves a 1D or 2D TILER block area and memory for the
136 * current process with group ID 0.
137 *
138 * @param blk pointer to tiler block data. This must be set up ('phys' member
139 * must be 0) with the tiler block information. 'height' must be 1
140 * for 1D block.
141 * @param fmt TILER block format
142 *
143 * @return error status
144 */
145s32 tiler_alloc(struct tiler_block_t *blk, enum tiler_fmt fmt);
146
147/**
148 * Reserves a 1D or 2D TILER block area and memory for a set process and group
149 * ID.
150 *
151 * @param blk pointer to tiler block data. This must be set up ('phys' member
152 * must be 0) with the tiler block information. 'height' must be 1
153 * for 1D block.
154 * @param fmt TILER block format
155 * @param gid group ID
156 * @param pid process ID
157 *
158 * @return error status
159 */
160s32 tiler_allocx(struct tiler_block_t *blk, enum tiler_fmt fmt,
161 u32 gid, pid_t pid);
162
163/**
164 * Mmaps a portion of a tiler block to a virtual address. Use this method in
165 * your driver's mmap function to potentially combine multiple tiler blocks as
166 * one virtual buffer.
167 *
168 * @param blk pointer to tiler block data
169 * @param offs offset from where to map (must be page aligned)
170 * @param size size of area to map (must be page aligned)
171 * @param vma VMM memory area to map to
172 * @param voffs offset (from vm_start) in the VMM memory area to start
173 * mapping at
174 *
175 * @return error status
176 */
177s32 tiler_mmap_blk(struct tiler_block_t *blk, u32 offs, u32 size,
178 struct vm_area_struct *vma, u32 voffs);
179
180/**
181 * Ioremaps a portion of a tiler block. Use this method in your driver instead
182 * of ioremap to potentially combine multiple tiler blocks as one virtual
183 * buffer.
184 *
185 * @param blk pointer to tiler block data
186 * @param offs offset from where to map (must be page aligned)
187 * @param size size of area to map (must be page aligned)
188 * @param addr virtual address
189 * @param mtype ioremap memory type (e.g. MT_DEVICE)
190 *
191 * @return error status
192 */
193s32 tiler_ioremap_blk(struct tiler_block_t *blk, u32 offs, u32 size, u32 addr,
194 u32 mtype);
195
196/**
197 * Maps an existing buffer to a 1D or 2D TILER area for the
198 * current process with group ID 0.
199 *
200 * Currently, only 1D area mapping is supported.
201 *
202 * NOTE: alignment is always PAGE_SIZE and offset is 0 as full pages are mapped
203 * into tiler container.
204 *
205 * @param blk pointer to tiler block data. This must be set up
206 * ('phys' member must be 0) with the tiler block
207 * information. 'height' must be 1 for 1D block.
208 * @param fmt TILER format
209 * @param usr_addr user space address of existing buffer.
210 *
211 * @return error status
212 */
213s32 tiler_map(struct tiler_block_t *blk, enum tiler_fmt fmt, u32 usr_addr);
214
215/**
216 * Maps an existing buffer to a 1D or 2D TILER area for a set process and group
217 * ID.
218 *
219 * Currently, only 1D area mapping is supported.
220 *
221 * NOTE: alignment is always PAGE_SIZE and offset is 0 as full pages are mapped
222 * into tiler container.
223 *
224 * @param blk pointer to tiler block data. This must be set up
225 * ('phys' member must be 0) with the tiler block
226 * information. 'height' must be 1 for 1D block.
227 * @param fmt TILER format
228 * @param gid group ID
229 * @param pid process ID
230 * @param usr_addr user space address of existing buffer.
231 *
232 * @return error status
233 */
234s32 tiler_mapx(struct tiler_block_t *blk, enum tiler_fmt fmt,
235 u32 gid, pid_t pid, u32 usr_addr);
236
237/**
238 * Frees TILER memory. Since there may be multiple references for the same area
239 * if duplicated by tiler_dup, the area is only actually freed if all references
240 * have been freed.
241 *
242 * @param blk pointer to a tiler block data as filled by tiler_alloc,
243 * tiler_map or tiler_dup. 'phys' and 'id' members will be set to
244 * 0 on success.
245 */
246void tiler_free(struct tiler_block_t *blk);
247
248/**
249 * Reserves tiler area for n identical blocks for the current process. Use this
250 * method to get optimal placement of multiple identical tiler blocks; however,
251 * it may not reserve area if tiler_alloc is equally efficient.
252 *
253 * @param n number of identical set of blocks
254 * @param fmt TILER format
255 * @param width block width
256 * @param height block height (must be 1 for 1D)
257 */
258void tiler_reserve(u32 n, enum tiler_fmt fmt, u32 width, u32 height);
259
260/**
261 * Reserves tiler area for n identical blocks. Use this method to get optimal
262 * placement of multiple identical tiler blocks; however, it may not reserve
263 * area if tiler_alloc is equally efficient.
264 *
265 * @param n number of identical set of blocks
266 * @param fmt TILER bit mode
267 * @param width block width
268 * @param height block height (must be 1 for 1D)
269 * @param gid group ID
270 * @param pid process ID
271 */
272void tiler_reservex(u32 n, enum tiler_fmt fmt, u32 width, u32 height,
273 u32 gid, pid_t pid);
274
275/**
276 * Reserves tiler area for n identical NV12 blocks for the current process. Use
277 * this method to get optimal placement of multiple identical NV12 tiler blocks;
278 * however, it may not reserve area if tiler_alloc is equally efficient.
279 *
280 * @param n number of identical set of blocks
281 * @param width block width (Y)
282 * @param height block height (Y)
283 */
284void tiler_reserve_nv12(u32 n, u32 width, u32 height);
285
286/**
287 * Reserves tiler area for n identical NV12 blocks. Use this method to get
288 * optimal placement of multiple identical NV12 tiler blocks; however, it may
289 * not reserve area if tiler_alloc is equally efficient.
290 *
291 * @param n number of identical set of blocks
292 * @param width block width (Y)
293 * @param height block height (Y)
294 * @param gid group ID
295 * @param pid process ID
296 */
297void tiler_reservex_nv12(u32 n, u32 width, u32 height, u32 gid, pid_t pid);
298
299/**
300 * Create a view based on a tiler address and width and height
301 *
302 * This method should only be used as a last resort, e.g. if tilview object
303 * cannot be passed because of incoherence with other view 2D objects that must
304 * be supported.
305 *
306 * @param view Pointer to a view where the information will be stored
307 * @param ssptr MUST BE a tiler address
308 * @param width view width
309 * @param height view height
310 */
311void tilview_create(struct tiler_view_t *view, u32 phys, u32 width, u32 height);
312
313/**
314 * Obtains the view information for a tiler block
315 *
316 * @param view Pointer to a view where the information will be stored
317 * @param blk Pointer to an existing allocated tiler block
318 */
319void tilview_get(struct tiler_view_t *view, struct tiler_block_t *blk);
320
321/**
322 * Crops a tiler view to a rectangular portion. Crop area must be fully within
323 * the orginal tiler view: 0 <= left <= left + width <= view->width, also:
324 * 0 <= top <= top + height <= view->height.
325 *
326 * @param view Pointer to tiler view to be cropped
327 * @param left x of top-left corner
328 * @param top y of top-left corner
329 * @param width crop width
330 * @param height crop height
331 *
332 * @return error status. The view will be reduced to the crop region if the
333 * crop region is correct. Otherwise, no modifications are made.
334 */
335s32 tilview_crop(struct tiler_view_t *view, u32 left, u32 top, u32 width,
336 u32 height);
337
338/**
339 * Rotates a tiler view clockwise by a specified degree.
340 *
341 * @param view Pointer to tiler view to be cropped
342 * @param rotate Degree of rotation (clockwise). Must be a multiple of
343 * 90.
344 * @return error status. View is not modified on error; otherwise, it is
345 * updated in place.
346 */
347s32 tilview_rotate(struct tiler_view_t *view, s32 rotation);
348
349/**
350 * Mirrors a tiler view horizontally and/or vertically.
351 *
352 * @param view Pointer to tiler view to be cropped
353 * @param flip_x Mirror horizontally (left-to-right)
354 * @param flip_y Mirror vertically (top-to-bottom)
355 *
356 * @return error status. View is not modified on error; otherwise, it is
357 * updated in place.
358 */
359s32 tilview_flip(struct tiler_view_t *view, bool flip_x, bool flip_y);
360
361/*
362 * -------------------- TILER hooks for ION/HWC migration --------------------
363 */
364
365/* type of tiler memory */
366enum tiler_memtype {
367 TILER_MEM_ALLOCED, /* tiler allocated the memory */
368 TILER_MEM_GOT_PAGES, /* tiler used get_user_pages */
369 TILER_MEM_USING, /* tiler is using the pages */
370};
371
372/* physical pages to pin - mem must be kmalloced */
373struct tiler_pa_info {
374 u32 num_pg; /* number of pages in page-list */
375 u32 *mem; /* list of phys page addresses */
376 enum tiler_memtype memtype; /* how we got physical pages */
377};
378
379typedef struct mem_info *tiler_blk_handle;
380
381/**
382 * Allocate a 1D area of container space in the Tiler
383 *
384 * @param pa ptr to tiler_pa_info structure
385 *
386 * @return handle Handle to tiler block information. NULL on error.
387 *
388 * NOTE: this will take ownership pa->mem (will free it)
389 *
390 */
391tiler_blk_handle tiler_map_1d_block(struct tiler_pa_info *pa);
392
393/**
394 * Allocate an area of container space in the Tiler
395 *
396 * @param fmt Tiler bpp mode
397 * @param width Width in pixels
398 * @param height Height in pixels
399 * @param ssptr Value of tiler physical address of allocation
400 * @param virt_array Array of physical address for the start of each virtual
401 page
402 *
403 * @return handle Handle to tiler block information. NULL on error.
404 *
405 * NOTE: For 1D allocations, specify the full size in the width field, and
406 * specify a height of 1.
407 */
408tiler_blk_handle tiler_alloc_block_area(enum tiler_fmt fmt, u32 width,
409 u32 height, u32 *ssptr,
410 u32 *virt_array);
411
412/**
413 * Allocate an area of container space in the Tiler with a specific alignment
414 * and user specified security token
415 *
416 * @param fmt Tiler bpp mode
417 * @param width Width in pixels
418 * @param height Height in pixels
419 * @param ssptr Value of tiler physical address of allocation
420 * @param virt_array Array of physical address for the start of each virtual
421 page
422 * @align Alignment in bytes
423 * @offset Offset into 4KiB
424 * @token Security token
425 *
426 * @return handle Handle to tiler block information. NULL on error.
427 *
428 * NOTE: For 1D allocations, specify the full size in the width field, and
429 * specify a height of 1.
430 */
431tiler_blk_handle tiler_alloc_block_area_aligned(enum tiler_fmt fmt, u32 width,
432 u32 height, u32 *ssptr, u32 *virt_array, u32 align,
433 u32 offset, u32 token);
434
435/**
436 * Free a reserved area in the Tiler
437 *
438 * @param handle Handle to tiler block information
439 *
440 */
441void tiler_free_block_area(tiler_blk_handle block);
442
443/**
444 * Pins a set of physical pages into the Tiler using the area defined in a
445 * handle
446 *
447 * @param handle Handle to tiler block information
448 * @param addr_array Array of addresses
449 * @param nents Number of addresses in array
450 *
451 * @return error status.
452 */
453s32 tiler_pin_block(tiler_blk_handle handle, u32 *addr_array, u32 nents);
454
455/**
456 * Unpins a set of physical pages from the Tiler
457 *
458 * @param handle Handle to tiler block information
459 *
460 */
461void tiler_unpin_block(tiler_blk_handle handle);
462
463/**
464 * Gives memory requirements for a given container allocation
465 *
466 * @param fmt Tiler bpp mode
467 * @param width Width in pixels
468 * @param height Height in pixels
469 * @param alloc_pages Number of pages required to back tiler container
470 * @param virt_pages Number of pages required to back the virtual address space
471 *
472 * @return 0 for success. Non zero for error
473 */
474s32 tiler_memsize(enum tiler_fmt fmt, u32 width, u32 height, u32 *alloc_pages,
475 u32 *virt_pages);
476
477/**
478 * Gives back page memory requirements for a given container
479 * allocation
480 *
481 * @param fmt Tiler bpp mode
482 * @param width Width in pixels
483 * @param height Height in pixels
484 *
485 * @return Number of pages required to back tiler container.
486 * Returns 0 for error
487 */
488u32 tiler_backpages(enum tiler_fmt fmt, u32 width, u32 height);
489
490/**
491 * Returns virtual stride of a tiler block
492 *
493 * @param handle Handle to tiler block allocation
494 *
495 * @return Size of virtual stride
496 */
497u32 tiler_block_vstride(tiler_blk_handle handle);
498
499/**
500 * Fills an array virtual size of a tiler block
501 *
502 * @param handle Handle to tiler block allocation
503 * @param virt_array Array of physical address for the start of each virtual
504 * page
505 * @param handle Pointer to the size of the virt_array array
506 * @return 0 for success. Non zero for error
507 */
508s32 tiler_fill_virt_array(tiler_blk_handle handle, u32 *virt_array,
509 u32 *array_size);
510
511/**
512 * Returns virtual size of a tiler block
513 *
514 * @param handle Handle to tiler block allocation
515 *
516 * @return Size of buffer
517 */
518u32 tiler_block_vsize(tiler_blk_handle handle);
519
520struct tiler_pa_info *user_block_to_pa(u32 usr_addr, u32 num_pg);
521void tiler_pa_free(struct tiler_pa_info *pa);
522
523/*
524 * ---------------------------- IOCTL Definitions ----------------------------
525 */
526
527/* ioctls */
528#define TILIOC_GBLK _IOWR('z', 100, struct tiler_block_info)
529#define TILIOC_FBLK _IOW('z', 101, struct tiler_block_info)
530#define TILIOC_GSSP _IOWR('z', 102, u32)
531#define TILIOC_MBLK _IOWR('z', 103, struct tiler_block_info)
532#define TILIOC_UMBLK _IOW('z', 104, struct tiler_block_info)
533#define TILIOC_QBUF _IOWR('z', 105, struct tiler_buf_info)
534#define TILIOC_RBUF _IOWR('z', 106, struct tiler_buf_info)
535#define TILIOC_URBUF _IOWR('z', 107, struct tiler_buf_info)
536#define TILIOC_QBLK _IOWR('z', 108, struct tiler_block_info)
537#define TILIOC_PRBLK _IOW('z', 109, struct tiler_block_info)
538#define TILIOC_URBLK _IOW('z', 110, u32)
539
540struct area {
541 u16 width;
542 u16 height;
543};
544
545/* userspace tiler block info */
546struct tiler_block_info {
547 enum tiler_fmt fmt;
548 union {
549 struct area area;
550 u32 len;
551 } dim;
552 u32 stride; /* stride is not maintained for 1D blocks */
553 void *ptr; /* userspace address for mapping existing buffer */
554 u32 id;
555 u32 key;
556 u32 group_id;
557 u32 ssptr; /* physical address, may not exposed by default */
558};
559
560#define TILER_MAX_NUM_BLOCKS 16
561
562/* userspace tiler buffer info */
563struct tiler_buf_info {
564 u32 num_blocks;
565 struct tiler_block_info blocks[TILER_MAX_NUM_BLOCKS];
566 u32 offset;
567 u32 length; /* also used as number of buffers for reservation */
568};
569
570#endif
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 1976fc952c5..ed3c35f9990 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -600,7 +600,7 @@ static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
600 600
601/* dss_hdmi */ 601/* dss_hdmi */
602static struct omap_hwmod_irq_info dra7xx_dss_hdmi_irqs[] = { 602static struct omap_hwmod_irq_info dra7xx_dss_hdmi_irqs[] = {
603 { .irq = 101 + DRA7XX_IRQ_GIC_START }, 603 { .irq = 96 + DRA7XX_IRQ_GIC_START },
604 { .irq = -1 } 604 { .irq = -1 }
605}; 605};
606 606
@@ -1518,6 +1518,7 @@ static struct omap_hwmod dra7xx_mcasp1_hwmod = {
1518 .class = &dra7xx_mcasp_hwmod_class, 1518 .class = &dra7xx_mcasp_hwmod_class,
1519 .clkdm_name = "ipu_clkdm", 1519 .clkdm_name = "ipu_clkdm",
1520 .main_clk = "mcasp1_ahclkx_mux", 1520 .main_clk = "mcasp1_ahclkx_mux",
1521 .flags = HWMOD_SWSUP_SIDLE,
1521 .prcm = { 1522 .prcm = {
1522 .omap4 = { 1523 .omap4 = {
1523 .clkctrl_offs = DRA7XX_CM_IPU_MCASP1_CLKCTRL_OFFSET, 1524 .clkctrl_offs = DRA7XX_CM_IPU_MCASP1_CLKCTRL_OFFSET,
@@ -1533,6 +1534,7 @@ static struct omap_hwmod dra7xx_mcasp2_hwmod = {
1533 .class = &dra7xx_mcasp_hwmod_class, 1534 .class = &dra7xx_mcasp_hwmod_class,
1534 .clkdm_name = "l4per2_clkdm", 1535 .clkdm_name = "l4per2_clkdm",
1535 .main_clk = "mcasp2_ahclkr_mux", 1536 .main_clk = "mcasp2_ahclkr_mux",
1537 .flags = HWMOD_SWSUP_SIDLE,
1536 .prcm = { 1538 .prcm = {
1537 .omap4 = { 1539 .omap4 = {
1538 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP2_CLKCTRL_OFFSET, 1540 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP2_CLKCTRL_OFFSET,
@@ -1542,12 +1544,21 @@ static struct omap_hwmod dra7xx_mcasp2_hwmod = {
1542 }, 1544 },
1543}; 1545};
1544 1546
1547/* HACK: Taken from UART6 since they're not used in dra7-evm */
1548static struct omap_hwmod_dma_info dra7xx_mcasp3_sdma_reqs[] = {
1549 { .name = "tx", .dma_req = 78 + DRA7XX_DMA_REQ_START },
1550 { .name = "rx", .dma_req = 79 + DRA7XX_DMA_REQ_START },
1551 { .dma_req = -1 }
1552};
1553
1545/* mcasp3 */ 1554/* mcasp3 */
1546static struct omap_hwmod dra7xx_mcasp3_hwmod = { 1555static struct omap_hwmod dra7xx_mcasp3_hwmod = {
1547 .name = "mcasp3", 1556 .name = "mcasp3",
1548 .class = &dra7xx_mcasp_hwmod_class, 1557 .class = &dra7xx_mcasp_hwmod_class,
1549 .clkdm_name = "l4per2_clkdm", 1558 .clkdm_name = "l4per2_clkdm",
1550 .main_clk = "mcasp3_ahclkx_mux", 1559 .main_clk = "mcasp3_ahclkx_mux",
1560 .sdma_reqs = dra7xx_mcasp3_sdma_reqs,
1561 .flags = HWMOD_SWSUP_SIDLE,
1551 .prcm = { 1562 .prcm = {
1552 .omap4 = { 1563 .omap4 = {
1553 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP3_CLKCTRL_OFFSET, 1564 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP3_CLKCTRL_OFFSET,
@@ -1563,6 +1574,7 @@ static struct omap_hwmod dra7xx_mcasp4_hwmod = {
1563 .class = &dra7xx_mcasp_hwmod_class, 1574 .class = &dra7xx_mcasp_hwmod_class,
1564 .clkdm_name = "l4per2_clkdm", 1575 .clkdm_name = "l4per2_clkdm",
1565 .main_clk = "mcasp4_ahclkx_mux", 1576 .main_clk = "mcasp4_ahclkx_mux",
1577 .flags = HWMOD_SWSUP_SIDLE,
1566 .prcm = { 1578 .prcm = {
1567 .omap4 = { 1579 .omap4 = {
1568 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP4_CLKCTRL_OFFSET, 1580 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP4_CLKCTRL_OFFSET,
@@ -1578,6 +1590,7 @@ static struct omap_hwmod dra7xx_mcasp5_hwmod = {
1578 .class = &dra7xx_mcasp_hwmod_class, 1590 .class = &dra7xx_mcasp_hwmod_class,
1579 .clkdm_name = "l4per2_clkdm", 1591 .clkdm_name = "l4per2_clkdm",
1580 .main_clk = "mcasp5_ahclkx_mux", 1592 .main_clk = "mcasp5_ahclkx_mux",
1593 .flags = HWMOD_SWSUP_SIDLE,
1581 .prcm = { 1594 .prcm = {
1582 .omap4 = { 1595 .omap4 = {
1583 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP5_CLKCTRL_OFFSET, 1596 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP5_CLKCTRL_OFFSET,
@@ -1587,12 +1600,21 @@ static struct omap_hwmod dra7xx_mcasp5_hwmod = {
1587 }, 1600 },
1588}; 1601};
1589 1602
1603/* HACK: Taken from UART5 since they're not used in dra7-evm */
1604static struct omap_hwmod_dma_info dra7xx_mcasp6_sdma_reqs[] = {
1605 { .name = "tx", .dma_req = 62 + DRA7XX_DMA_REQ_START },
1606 { .name = "rx", .dma_req = 63 + DRA7XX_DMA_REQ_START },
1607 { .dma_req = -1 }
1608};
1609
1590/* mcasp6 */ 1610/* mcasp6 */
1591static struct omap_hwmod dra7xx_mcasp6_hwmod = { 1611static struct omap_hwmod dra7xx_mcasp6_hwmod = {
1592 .name = "mcasp6", 1612 .name = "mcasp6",
1593 .class = &dra7xx_mcasp_hwmod_class, 1613 .class = &dra7xx_mcasp_hwmod_class,
1594 .clkdm_name = "l4per2_clkdm", 1614 .clkdm_name = "l4per2_clkdm",
1595 .main_clk = "mcasp6_ahclkx_mux", 1615 .main_clk = "mcasp6_ahclkx_mux",
1616 .sdma_reqs = dra7xx_mcasp6_sdma_reqs,
1617 .flags = HWMOD_SWSUP_SIDLE,
1596 .prcm = { 1618 .prcm = {
1597 .omap4 = { 1619 .omap4 = {
1598 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP6_CLKCTRL_OFFSET, 1620 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP6_CLKCTRL_OFFSET,
@@ -1608,6 +1630,7 @@ static struct omap_hwmod dra7xx_mcasp7_hwmod = {
1608 .class = &dra7xx_mcasp_hwmod_class, 1630 .class = &dra7xx_mcasp_hwmod_class,
1609 .clkdm_name = "l4per2_clkdm", 1631 .clkdm_name = "l4per2_clkdm",
1610 .main_clk = "mcasp7_ahclkx_mux", 1632 .main_clk = "mcasp7_ahclkx_mux",
1633 .flags = HWMOD_SWSUP_SIDLE,
1611 .prcm = { 1634 .prcm = {
1612 .omap4 = { 1635 .omap4 = {
1613 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP7_CLKCTRL_OFFSET, 1636 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP7_CLKCTRL_OFFSET,
@@ -1623,6 +1646,7 @@ static struct omap_hwmod dra7xx_mcasp8_hwmod = {
1623 .class = &dra7xx_mcasp_hwmod_class, 1646 .class = &dra7xx_mcasp_hwmod_class,
1624 .clkdm_name = "l4per2_clkdm", 1647 .clkdm_name = "l4per2_clkdm",
1625 .main_clk = "mcasp8_ahclk_mux", 1648 .main_clk = "mcasp8_ahclk_mux",
1649 .flags = HWMOD_SWSUP_SIDLE,
1626 .prcm = { 1650 .prcm = {
1627 .omap4 = { 1651 .omap4 = {
1628 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP8_CLKCTRL_OFFSET, 1652 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP8_CLKCTRL_OFFSET,
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 4077d23a860..1877b54ad7f 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -15,3 +15,6 @@ obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
15i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o 15i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
16obj-y += $(i2c-omap-m) $(i2c-omap-y) 16obj-y += $(i2c-omap-m) $(i2c-omap-y)
17 17
18obj-$(CONFIG_DSSCOMP) += omap_dsscomp.o
19obj-$(CONFIG_ION_OMAP) += sgx_omaplfb.o
20obj-$(CONFIG_ION_OMAP) += android-display.o
diff --git a/arch/arm/plat-omap/android-display.c b/arch/arm/plat-omap/android-display.c
new file mode 100644
index 00000000000..815ba4b3217
--- /dev/null
+++ b/arch/arm/plat-omap/android-display.c
@@ -0,0 +1,206 @@
1/*
2 * Android display memory setup for OMAP4+ displays
3 *
4 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * Author: Lajos Molnar
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 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
13 * kind, whether express or implied; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 */
17
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/mm.h>
21#include <linux/platform_device.h>
22
23#include <video/omapdss.h>
24
25#include <plat/android-display.h>
26#include <plat/dsscomp.h>
27//#include <plat/vram.h>
28
29struct omap_android_display_data {
30 /* members with default values */
31 u32 width;
32 u32 height;
33 u32 bpp; /* must be 2 or 4 */
34
35 /* members with no default value */
36 u32 tiler1d_mem;
37};
38
39/*
40 * We need to peek at omapdss settings so that we have enough memory for swap
41 * chain and vram. While this could be done by omapdss, omapdss could be
42 * compiled as a module, which is too late to get this information.
43 */
44static char default_display[16];
45static int __init get_default_display(char *str)
46{
47 strncpy(default_display, str, sizeof(default_display));
48 if (strlen(str) >= sizeof(default_display))
49 pr_warn("android_display: cannot set default display larger "
50 "than %d characters", sizeof(default_display) - 1);
51 default_display[sizeof(default_display) - 1] = '\0';
52 return 0;
53}
54early_param("omapdss.def_disp", get_default_display);
55
56static unsigned int hdmi_width, hdmi_height;
57static int __init get_hdmi_options(char *str)
58{
59 unsigned int width, height;
60 char dummy;
61 if (sscanf(str, "%ux%u%c", &width, &height, &dummy) == 2) {
62 hdmi_width = width;
63 hdmi_height = height;
64 }
65 return 0;
66}
67early_param("omapdss.hdmi_options", get_hdmi_options);
68
69static void get_display_size(struct omap_dss_device *device,
70 struct omap_android_display_data *mem)
71{
72 if (!device)
73 goto done;
74
75 if (device->type == OMAP_DISPLAY_TYPE_HDMI &&
76 hdmi_width && hdmi_height) {
77 mem->width = hdmi_width;
78 mem->height = hdmi_height;
79 } else if (device->panel.timings.x_res && device->panel.timings.y_res) {
80 mem->width = device->panel.timings.x_res;
81 mem->height = device->panel.timings.y_res;
82 }
83 if (device->ctrl.pixel_size)
84 mem->bpp = ALIGN(device->ctrl.pixel_size, 16) >> 3;
85
86 pr_info("android_display: setting %s resolution to %u*%u, bpp=%u\n",
87 device->name, mem->width, mem->height, mem->bpp);
88done:
89 return;
90}
91
92static void set_tiler1d_slot_size(struct dsscomp_platform_data *dsscomp,
93 struct omap_android_display_data *mem)
94{
95 struct dsscomp_platform_data data = {
96 .tiler1d_slotsz = 0,
97 };
98
99 if (dsscomp)
100 data = *dsscomp;
101
102 /* do not change board specified value if given */
103 if (data.tiler1d_slotsz)
104 goto done;
105
106 /*
107 * 4 bytes per pixel, and ICS factor of 4. The ICS factor
108 * is chosen somewhat arbitrarily to support the home screen layers
109 * to be displayed by DSS. The size of the home screen layers is
110 * roughly (1 + 2.5 + 0.1 + 0.1) * size_of_the_screen
111 * for the icons, wallpaper, status bar and navigation bar. Boards
112 * that wish to use a different factor should supply their tiler1D
113 * slot size directly.
114 */
115 data.tiler1d_slotsz =
116 PAGE_ALIGN(mem->width * mem->height * 4 * 4);
117
118done:
119 if (dsscomp)
120 *dsscomp = data;
121 //dsscomp_set_platform_data(&data);
122
123 /* remember setting for ion carveouts */
124 mem->tiler1d_mem =
125 NUM_ANDROID_TILER1D_SLOTS * data.tiler1d_slotsz;
126 pr_info("android_display: tiler1d %u\n", mem->tiler1d_mem);
127}
128
129static u32 vram_size(struct omap_android_display_data *mem)
130{
131 /* calculate required VRAM */
132 return PAGE_ALIGN(ALIGN(mem->width, 64) * mem->height * mem->bpp);
133}
134
135static void set_vram_sizes(struct sgx_omaplfb_config *sgx_config,
136 struct omapfb_mem_region *region,
137 struct omap_android_display_data *mem,
138 unsigned fbnum)
139{
140 u32 num_vram_buffers;
141 u32 vram = 0;
142
143 if (!sgx_config || !region || !mem)
144 return;
145
146 /* Need at least 1 VRAM buffer for fb0 */
147 num_vram_buffers = max(sgx_config->vram_buffers, 1u);
148
149 vram += sgx_config->vram_reserve;
150 vram += num_vram_buffers * vram_size(mem);
151
152 /* set fb vram needs */
153 region->size = vram;
154 pr_info("android_display: setting fb%u.vram to %u\n", fbnum, vram);
155}
156
157/* coordinate between sgx, omapdss, dsscomp and ion needs */
158void omap_android_display_setup(struct omap_dss_board_info *dss,
159 struct dsscomp_platform_data *dsscomp,
160 struct sgx_omaplfb_platform_data *sgx,
161 struct omapfb_platform_data *fb)
162{
163 struct sgx_omaplfb_config *p_sgx_config = NULL;
164 int i = 0;
165 u32 omapfb_vram = 0;
166 u32 num_configs = 1;
167
168 if (sgx)
169 num_configs = sgx->num_configs;
170
171 for (i = 0; i < num_configs; ++i) {
172 if (!sgx || !sgx->configs)
173 p_sgx_config = sgx_omaplfb_get(i);
174 else
175 p_sgx_config = &(sgx->configs[i]);
176
177 struct omap_android_display_data mem = {
178 .bpp = 4,
179 .width = 1280,
180 .height = 720,
181 };
182
183 if (i == 0 && i < dss->num_devices)
184 get_display_size(dss->devices[i], &mem);
185
186 if (dsscomp)
187 set_tiler1d_slot_size(dsscomp, &mem);
188
189 /* skip region if no sgx_config associated with it
190 * or it has size pre-set by board configuration
191 */
192 if (i < fb->mem_desc.region_cnt &&
193 !fb->mem_desc.region[i].size)
194 set_vram_sizes(p_sgx_config, &fb->mem_desc.region[i],
195 &mem, i);
196 sgx_omaplfb_set(i, p_sgx_config);
197 }
198
199 /* set global vram needs incl. additional regions specified */
200 for (i = 0; i < fb->mem_desc.region_cnt; i++)
201 if (!fb->mem_desc.region[i].paddr)
202 omapfb_vram += fb->mem_desc.region[i].size;
203
204 pr_info("android_display: setting vram to %u\n", omapfb_vram);
205 //omap_vram_set_sdram_vram(omapfb_vram, 0);
206}
diff --git a/arch/arm/plat-omap/include/plat/android-display.h b/arch/arm/plat-omap/include/plat/android-display.h
new file mode 100644
index 00000000000..e336282eb7d
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/android-display.h
@@ -0,0 +1,31 @@
1/*
2 * arch/arm/mach-omap2/android_display.h
3 *
4 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * Author: Lajos Molnar
7 *
8 * OMAP2 platform device setup/initialization
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 as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef __ARCH_ARM_MACH_OMAP_ANDROID_DISPLAY_H
17#define __ARCH_ARM_MACH_OMAP_ANDROID_DISPLAY_H
18
19#include <linux/omapfb.h>
20#include <video/omapdss.h>
21#include <plat/sgx_omaplfb.h>
22#include <plat/dsscomp.h>
23
24#define NUM_ANDROID_TILER1D_SLOTS 2
25
26void omap_android_display_setup(struct omap_dss_board_info *dss,
27 struct dsscomp_platform_data *dsscomp,
28 struct sgx_omaplfb_platform_data *sgx,
29 struct omapfb_platform_data *fb);
30
31#endif
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h
new file mode 100644
index 00000000000..d5eb4c87db9
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/board.h
@@ -0,0 +1,174 @@
1/*
2 * arch/arm/plat-omap/include/mach/board.h
3 *
4 * Information structures for board-specific data
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
8 */
9
10#ifndef _OMAP_BOARD_H
11#define _OMAP_BOARD_H
12
13#include <linux/types.h>
14
15#include <plat/gpio-switch.h>
16
17/*
18 * OMAP35x EVM revision
19 * Run time detection of EVM revision is done by reading Ethernet
20 * PHY ID -
21 * GEN_1 = 0x01150000
22 * GEN_2 = 0x92200000
23 */
24enum {
25 OMAP3EVM_BOARD_GEN_1 = 0, /* EVM Rev between A - D */
26 OMAP3EVM_BOARD_GEN_2, /* EVM Rev >= Rev E */
27};
28
29/* Different peripheral ids */
30#define OMAP_TAG_CLOCK 0x4f01
31#define OMAP_TAG_GPIO_SWITCH 0x4f06
32#define OMAP_TAG_STI_CONSOLE 0x4f09
33#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
34
35#define OMAP_TAG_BOOT_REASON 0x4f80
36#define OMAP_TAG_FLASH_PART 0x4f81
37#define OMAP_TAG_VERSION_STR 0x4f82
38
39struct omap_clock_config {
40 /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */
41 u8 system_clock_type;
42};
43
44struct omap_serial_console_config {
45 u8 console_uart;
46 u32 console_speed;
47};
48
49struct omap_sti_console_config {
50 unsigned enable:1;
51 u8 channel;
52};
53
54struct omap_camera_sensor_config {
55 u16 reset_gpio;
56 int (*power_on)(void * data);
57 int (*power_off)(void * data);
58};
59
60struct omap_usb_config {
61 /* Configure drivers according to the connectors on your board:
62 * - "A" connector (rectagular)
63 * ... for host/OHCI use, set "register_host".
64 * - "B" connector (squarish) or "Mini-B"
65 * ... for device/gadget use, set "register_dev".
66 * - "Mini-AB" connector (very similar to Mini-B)
67 * ... for OTG use as device OR host, initialize "otg"
68 */
69 unsigned register_host:1;
70 unsigned register_dev:1;
71 u8 otg; /* port number, 1-based: usb1 == 2 */
72
73 u8 hmc_mode;
74
75 /* implicitly true if otg: host supports remote wakeup? */
76 u8 rwc;
77
78 /* signaling pins used to talk to transceiver on usbN:
79 * 0 == usbN unused
80 * 2 == usb0-only, using internal transceiver
81 * 3 == 3 wire bidirectional
82 * 4 == 4 wire bidirectional
83 * 6 == 6 wire unidirectional (or TLL)
84 */
85 u8 pins[3];
86
87 struct platform_device *udc_device;
88 struct platform_device *ohci_device;
89 struct platform_device *otg_device;
90
91 u32 (*usb0_init)(unsigned nwires, unsigned is_device);
92 u32 (*usb1_init)(unsigned nwires);
93 u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup);
94};
95
96struct omap_lcd_config {
97 char panel_name[16];
98 char ctrl_name[16];
99 s16 nreset_gpio;
100 u8 data_lines;
101};
102
103struct device;
104struct fb_info;
105struct omap_backlight_config {
106 int default_intensity;
107 int (*set_power)(struct device *dev, int state);
108};
109
110struct omap_fbmem_config {
111 u32 start;
112 u32 size;
113};
114
115struct omap_pwm_led_platform_data {
116 const char *name;
117 int intensity_timer;
118 int blink_timer;
119 void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
120};
121
122struct omap_uart_config {
123 /* Bit field of UARTs present; bit 0 --> UART1 */
124 unsigned int enabled_uarts;
125};
126
127
128struct omap_flash_part_config {
129 char part_table[0];
130};
131
132struct omap_boot_reason_config {
133 char reason_str[12];
134};
135
136struct omap_version_config {
137 char component[12];
138 char version[12];
139};
140
141struct omap_board_config_entry {
142 u16 tag;
143 u16 len;
144 u8 data[0];
145};
146
147struct omap_board_config_kernel {
148 u16 tag;
149 const void *data;
150};
151
152extern const void *__init __omap_get_config(u16 tag, size_t len, int nr);
153
154#define omap_get_config(tag, type) \
155 ((const type *) __omap_get_config((tag), sizeof(type), 0))
156#define omap_get_nr_config(tag, type, nr) \
157 ((const type *) __omap_get_config((tag), sizeof(type), (nr)))
158
159extern const void *__init omap_get_var_config(u16 tag, size_t *len);
160
161extern struct omap_board_config_kernel *omap_board_config;
162extern int omap_board_config_size;
163
164
165/* for TI reference platforms sharing the same debug card */
166extern int debug_card_init(u32 addr, unsigned gpio);
167
168/* OMAP3EVM revision */
169#if defined(CONFIG_MACH_OMAP3EVM)
170u8 get_omap3_evm_rev(void);
171#else
172#define get_omap3_evm_rev() (-EINVAL)
173#endif
174#endif
diff --git a/arch/arm/plat-omap/include/plat/dsscomp.h b/arch/arm/plat-omap/include/plat/dsscomp.h
new file mode 100644
index 00000000000..2dcf2636d44
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/dsscomp.h
@@ -0,0 +1,52 @@
1/*
2 * arch/arm/plat-omap/include/plat/dsscomp.h
3 *
4 * DSS Composition platform specific header
5 *
6 * Copyright (C) 2011 Texas Instruments, Inc
7 * Author: Lajos Molnar <molnar@ti.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License version 2 as published by
11 * the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21#ifndef _ARCH_ARM_PLAT_OMAP_DSSCOMP_H
22#define _ARCH_ARM_PLAT_OMAP_DSSCOMP_H
23
24#include <video/omapdss.h>
25#include <video/dsscomp.h>
26
27struct dsscomp_platform_data {
28 unsigned int tiler1d_slotsz;
29};
30
31/* queuing operations */
32struct dsscomp;
33struct dsscomp *dsscomp_new(struct omap_overlay_manager *mgr);
34u32 dsscomp_get_ovls(struct dsscomp *comp);
35int dsscomp_set_ovl(struct dsscomp *comp, struct dss2_ovl_info *ovl);
36int dsscomp_get_ovl(struct dsscomp *comp, u32 ix, struct dss2_ovl_info *ovl);
37int dsscomp_set_mgr(struct dsscomp *comp, struct dss2_mgr_info *mgr);
38int dsscomp_get_mgr(struct dsscomp *comp, struct dss2_mgr_info *mgr);
39int dsscomp_setup(struct dsscomp *comp, enum dsscomp_setup_mode mode,
40 struct dss2_rect_t win);
41int dsscomp_delayed_apply(struct dsscomp *comp);
42void dsscomp_drop(struct dsscomp *c);
43
44struct tiler_pa_info;
45int dsscomp_gralloc_queue(struct dsscomp_setup_dispc_data *d,
46 struct tiler_pa_info **pas,
47 bool early_callback,
48 void (*cb_fn)(void *, int), void *cb_arg);
49
50void dsscomp_set_platform_data(struct dsscomp_platform_data *data);
51
52#endif
diff --git a/arch/arm/plat-omap/include/plat/gpio-switch.h b/arch/arm/plat-omap/include/plat/gpio-switch.h
new file mode 100644
index 00000000000..10da0e07c0c
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/gpio-switch.h
@@ -0,0 +1,54 @@
1/*
2 * GPIO switch definitions
3 *
4 * Copyright (C) 2006 Nokia Corporation
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
11#ifndef __ASM_ARCH_OMAP_GPIO_SWITCH_H
12#define __ASM_ARCH_OMAP_GPIO_SWITCH_H
13
14#include <linux/types.h>
15
16/* Cover:
17 * high -> closed
18 * low -> open
19 * Connection:
20 * high -> connected
21 * low -> disconnected
22 * Activity:
23 * high -> active
24 * low -> inactive
25 *
26 */
27#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
28#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
29#define OMAP_GPIO_SWITCH_TYPE_ACTIVITY 0x0002
30#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
31#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
32
33struct omap_gpio_switch {
34 const char *name;
35 s16 gpio;
36 unsigned flags:4;
37 unsigned type:4;
38
39 /* Time in ms to debounce when transitioning from
40 * inactive state to active state. */
41 u16 debounce_rising;
42 /* Same for transition from active to inactive state. */
43 u16 debounce_falling;
44
45 /* notify board-specific code about state changes */
46 void (* notify)(void *data, int state);
47 void *notify_data;
48};
49
50/* Call at init time only */
51extern void omap_register_gpio_switches(const struct omap_gpio_switch *tbl,
52 int count);
53
54#endif
diff --git a/arch/arm/plat-omap/include/plat/sgx_omaplfb.h b/arch/arm/plat-omap/include/plat/sgx_omaplfb.h
new file mode 100644
index 00000000000..66d59b2d7a5
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/sgx_omaplfb.h
@@ -0,0 +1,71 @@
1/*
2 * SGX display class driver platform resources
3 *
4 * Copyright (C) 2012 Texas Instruments
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21#ifndef _ARCH_ARM_PLAT_OMAP_SGX_OMAPLFB_H
22#define _ARCH_ARM_PLAT_OMAP_SGX_OMAPLFB_H
23
24enum sgx_omaplfb_flags {
25 /*
26 * This flag should be set when we do not want the primary display
27 * swap chain buffers to be used with an external display.
28 *
29 * The number of tiler2d and vram buffers need to be set appropriately
30 */
31 SGX_OMAPLFB_FLAGS_SDMA_TO_TILER2D_EXTERNAL = 0x00000001,
32};
33
34/*
35 * The settings this platform data entry will determine the type and number of
36 * buffers to use by omaplfb.
37 */
38struct sgx_omaplfb_config {
39 /*
40 * Number of tiler2d buffers required for display rendering,
41 * the number of buffers indicated by swap_chain_length will be used
42 * for the swap chain unless flags indicate otherwise
43 */
44 u32 tiler2d_buffers;
45 /*
46 * Number of vram buffers required for display rendering, if no tiler
47 * buffers are required or flags indicate then the number of buffers
48 * indicated by swap_chain_length will be used for the swap chain.
49 */
50 u32 vram_buffers;
51 /*
52 * Indicate any additional vram that needs to be reserved
53 */
54 u32 vram_reserve;
55 /*
56 * Tells omaplfb the number of buffers in the primary swapchain,
57 * if not set it defaults to 2.
58 */
59 u32 swap_chain_length;
60 enum sgx_omaplfb_flags flags;
61};
62
63struct sgx_omaplfb_platform_data {
64 u32 num_configs;
65 struct sgx_omaplfb_config *configs;
66};
67
68int sgx_omaplfb_set(unsigned int fbix, struct sgx_omaplfb_config *data);
69struct sgx_omaplfb_config *sgx_omaplfb_get(unsigned int fbix);
70
71#endif
diff --git a/arch/arm/plat-omap/omap_dsscomp.c b/arch/arm/plat-omap/omap_dsscomp.c
new file mode 100644
index 00000000000..e771a69cb7d
--- /dev/null
+++ b/arch/arm/plat-omap/omap_dsscomp.c
@@ -0,0 +1,56 @@
1/*
2 * File: arch/arm/plat-omap/omap_dsscomp.c
3 *
4 * dsscomp resources registration for TI OMAP platforms
5 *
6 * Copyright (C) 2012 Texas Instruments
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 */
22
23#include <linux/kernel.h>
24#include <linux/mm.h>
25#include <linux/init.h>
26#include <linux/platform_device.h>
27#include <plat/board.h>
28
29#include <video/dsscomp.h>
30#include <plat/dsscomp.h>
31
32static struct dsscomp_platform_data dsscomp_config = {
33 .tiler1d_slotsz = SZ_16M,
34};
35
36static struct platform_device omap_dsscomp_device = {
37 .name = "dsscomp",
38 .id = -1,
39 .dev = {
40 .platform_data = &dsscomp_config,
41 },
42 .num_resources = 0,
43};
44
45void dsscomp_set_platform_data(struct dsscomp_platform_data *data)
46{
47 dsscomp_config = *data;
48}
49
50static int __init omap_init_dsscomp(void)
51{
52 return platform_device_register(&omap_dsscomp_device);
53}
54
55arch_initcall(omap_init_dsscomp);
56
diff --git a/arch/arm/plat-omap/sgx_omaplfb.c b/arch/arm/plat-omap/sgx_omaplfb.c
new file mode 100644
index 00000000000..e4cad796c80
--- /dev/null
+++ b/arch/arm/plat-omap/sgx_omaplfb.c
@@ -0,0 +1,86 @@
1/*
2 * SGX display class driver platform resources
3 *
4 * Copyright (C) 2012 Texas Instruments
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21#include <linux/kernel.h>
22#include <linux/mm.h>
23#include <linux/init.h>
24#include <linux/platform_device.h>
25#include <linux/slab.h>
26#include <plat/board.h>
27
28#include <plat/sgx_omaplfb.h>
29
30#if defined(CONFIG_FB_OMAP2_NUM_FBS)
31#define OMAPLFB_NUM_DEV CONFIG_FB_OMAP2_NUM_FBS
32#else
33#define OMAPLFB_NUM_DEV 1
34#endif
35
36static struct sgx_omaplfb_config omaplfb_config[OMAPLFB_NUM_DEV] = {
37 {
38 .vram_buffers = 4,
39 .swap_chain_length = 2,
40 },
41 {
42 .tiler2d_buffers = 0,
43 .vram_buffers = 4,
44 .swap_chain_length = 2,
45 }
46};
47
48static struct sgx_omaplfb_platform_data omaplfb_plat_data = {
49 .num_configs = OMAPLFB_NUM_DEV,
50 .configs = omaplfb_config,
51};
52
53static struct platform_device omaplfb_plat_device = {
54 .name = "omaplfb",
55 .id = -1,
56 .dev = {
57 .platform_data = &omaplfb_plat_data,
58 },
59 .num_resources = 0,
60};
61
62int sgx_omaplfb_set(unsigned int fbix, struct sgx_omaplfb_config *data)
63{
64 if (fbix >= OMAPLFB_NUM_DEV) {
65 WARN(1, "Invalid FB device index");
66 return -ENOENT;
67 }
68 omaplfb_config[fbix] = *data;
69 return 0;
70}
71
72struct sgx_omaplfb_config *sgx_omaplfb_get(unsigned int fbix)
73{
74 if (fbix >= OMAPLFB_NUM_DEV) {
75 WARN(1, "Invalid FB device index");
76 return NULL;
77 }
78 return &omaplfb_config[fbix];
79}
80
81static int __init omap_init_omaplfb(void)
82{
83 return platform_device_register(&omaplfb_plat_device);
84}
85
86arch_initcall(omap_init_omaplfb);
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index 50b2831e027..32ee0fc7ea5 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -162,7 +162,7 @@ unsigned long opp_get_voltage(struct opp *opp)
162 162
163 return v; 163 return v;
164} 164}
165EXPORT_SYMBOL(opp_get_voltage); 165EXPORT_SYMBOL_GPL(opp_get_voltage);
166 166
167/** 167/**
168 * opp_get_freq() - Gets the frequency corresponding to an available opp 168 * opp_get_freq() - Gets the frequency corresponding to an available opp
@@ -192,7 +192,7 @@ unsigned long opp_get_freq(struct opp *opp)
192 192
193 return f; 193 return f;
194} 194}
195EXPORT_SYMBOL(opp_get_freq); 195EXPORT_SYMBOL_GPL(opp_get_freq);
196 196
197/** 197/**
198 * opp_get_opp_count() - Get number of opps available in the opp list 198 * opp_get_opp_count() - Get number of opps available in the opp list
@@ -225,7 +225,7 @@ int opp_get_opp_count(struct device *dev)
225 225
226 return count; 226 return count;
227} 227}
228EXPORT_SYMBOL(opp_get_opp_count); 228EXPORT_SYMBOL_GPL(opp_get_opp_count);
229 229
230/** 230/**
231 * opp_find_freq_exact() - search for an exact frequency 231 * opp_find_freq_exact() - search for an exact frequency
@@ -276,7 +276,7 @@ struct opp *opp_find_freq_exact(struct device *dev, unsigned long freq,
276 276
277 return opp; 277 return opp;
278} 278}
279EXPORT_SYMBOL(opp_find_freq_exact); 279EXPORT_SYMBOL_GPL(opp_find_freq_exact);
280 280
281/** 281/**
282 * opp_find_freq_ceil() - Search for an rounded ceil freq 282 * opp_find_freq_ceil() - Search for an rounded ceil freq
@@ -323,7 +323,7 @@ struct opp *opp_find_freq_ceil(struct device *dev, unsigned long *freq)
323 323
324 return opp; 324 return opp;
325} 325}
326EXPORT_SYMBOL(opp_find_freq_ceil); 326EXPORT_SYMBOL_GPL(opp_find_freq_ceil);
327 327
328/** 328/**
329 * opp_find_freq_floor() - Search for a rounded floor freq 329 * opp_find_freq_floor() - Search for a rounded floor freq
@@ -374,7 +374,7 @@ struct opp *opp_find_freq_floor(struct device *dev, unsigned long *freq)
374 374
375 return opp; 375 return opp;
376} 376}
377EXPORT_SYMBOL(opp_find_freq_floor); 377EXPORT_SYMBOL_GPL(opp_find_freq_floor);
378 378
379/** 379/**
380 * opp_add() - Add an OPP table from a table definitions 380 * opp_add() - Add an OPP table from a table definitions
@@ -568,7 +568,7 @@ int opp_enable(struct device *dev, unsigned long freq)
568{ 568{
569 return opp_set_availability(dev, freq, true); 569 return opp_set_availability(dev, freq, true);
570} 570}
571EXPORT_SYMBOL(opp_enable); 571EXPORT_SYMBOL_GPL(opp_enable);
572 572
573/** 573/**
574 * opp_disable() - Disable a specific OPP 574 * opp_disable() - Disable a specific OPP
@@ -590,7 +590,7 @@ int opp_disable(struct device *dev, unsigned long freq)
590{ 590{
591 return opp_set_availability(dev, freq, false); 591 return opp_set_availability(dev, freq, false);
592} 592}
593EXPORT_SYMBOL(opp_disable); 593EXPORT_SYMBOL_GPL(opp_disable);
594 594
595#ifdef CONFIG_CPU_FREQ 595#ifdef CONFIG_CPU_FREQ
596/** 596/**
@@ -661,6 +661,7 @@ int opp_init_cpufreq_table(struct device *dev,
661 661
662 return 0; 662 return 0;
663} 663}
664EXPORT_SYMBOL_GPL(opp_init_cpufreq_table);
664 665
665/** 666/**
666 * opp_free_cpufreq_table() - free the cpufreq table 667 * opp_free_cpufreq_table() - free the cpufreq table
@@ -678,6 +679,7 @@ void opp_free_cpufreq_table(struct device *dev,
678 kfree(*table); 679 kfree(*table);
679 *table = NULL; 680 *table = NULL;
680} 681}
682EXPORT_SYMBOL_GPL(opp_free_cpufreq_table);
681#endif /* CONFIG_CPU_FREQ */ 683#endif /* CONFIG_CPU_FREQ */
682 684
683/** 685/**
@@ -738,4 +740,5 @@ int of_init_opp_table(struct device *dev)
738 740
739 return 0; 741 return 0;
740} 742}