aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-11-21 13:11:58 -0500
committerOlof Johansson <olof@lixom.net>2012-11-21 13:11:58 -0500
commite642779b4994638d063e2f3ceedb99a565d98dfa (patch)
tree051c0eb77279c93390913970fdc8f4412f95add3
parent02d1ea0d143327ffec9bcd9a2d5edf95adb694a9 (diff)
parent0a9d5ac307aefbb2c772537d3fe7f75046d563ac (diff)
Merge branch 'next/hdmi-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/dt
From Kukjin Kim: This is for adding support for DT based exynos5250 hdmi and it adds device node for hdmi, mixer, hdmiphy and hdmiddc. * 'next/hdmi-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: EXYNOS: removing exynos-drm device registration from non-dt platforms ARM: EXYNOS: add clocks for exynos5 hdmi ARM: dts: add device tree support for exynos5 hdmiddc ARM: dts: add device tree support for exynos5 hdmiphy ARM: dts: add device tree support for exynos5 mixer ARM: dts: add device tree support for exynos5 hdmi
-rw-r--r--Documentation/devicetree/bindings/drm/exynos/hdmi.txt22
-rw-r--r--Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt12
-rw-r--r--Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt12
-rw-r--r--Documentation/devicetree/bindings/drm/exynos/mixer.txt15
-rw-r--r--arch/arm/boot/dts/exynos5250-smdk5250.dts24
-rw-r--r--arch/arm/boot/dts/exynos5250.dtsi20
-rw-r--r--arch/arm/mach-exynos/Makefile1
-rw-r--r--arch/arm/mach-exynos/clock-exynos5.c14
-rw-r--r--arch/arm/mach-exynos/dev-drm.c29
-rw-r--r--arch/arm/mach-exynos/mach-exynos5-dt.c8
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c3
-rw-r--r--arch/arm/mach-exynos/mach-origen.c3
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c3
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c3
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c3
-rw-r--r--arch/arm/plat-samsung/include/plat/devs.h2
16 files changed, 124 insertions, 50 deletions
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmi.txt b/Documentation/devicetree/bindings/drm/exynos/hdmi.txt
new file mode 100644
index 000000000000..589edee37394
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/hdmi.txt
@@ -0,0 +1,22 @@
1Device-Tree bindings for drm hdmi driver
2
3Required properties:
4- compatible: value should be "samsung,exynos5-hdmi".
5- reg: physical base address of the hdmi and length of memory mapped
6 region.
7- interrupts: interrupt number to the cpu.
8- hpd-gpio: following information about the hotplug gpio pin.
9 a) phandle of the gpio controller node.
10 b) pin number within the gpio controller.
11 c) pin function mode.
12 d) optional flags and pull up/down.
13 e) drive strength.
14
15Example:
16
17 hdmi {
18 compatible = "samsung,exynos5-hdmi";
19 reg = <0x14530000 0x100000>;
20 interrupts = <0 95 0>;
21 hpd-gpio = <&gpx3 7 0xf 1 3>;
22 };
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt
new file mode 100644
index 000000000000..fa166d945809
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt
@@ -0,0 +1,12 @@
1Device-Tree bindings for hdmiddc driver
2
3Required properties:
4- compatible: value should be "samsung,exynos5-hdmiddc".
5- reg: I2C address of the hdmiddc device.
6
7Example:
8
9 hdmiddc {
10 compatible = "samsung,exynos5-hdmiddc";
11 reg = <0x50>;
12 };
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt
new file mode 100644
index 000000000000..858f4f9b902f
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt
@@ -0,0 +1,12 @@
1Device-Tree bindings for hdmiphy driver
2
3Required properties:
4- compatible: value should be "samsung,exynos5-hdmiphy".
5- reg: I2C address of the hdmiphy device.
6
7Example:
8
9 hdmiphy {
10 compatible = "samsung,exynos5-hdmiphy";
11 reg = <0x38>;
12 };
diff --git a/Documentation/devicetree/bindings/drm/exynos/mixer.txt b/Documentation/devicetree/bindings/drm/exynos/mixer.txt
new file mode 100644
index 000000000000..9b2ea0343566
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/mixer.txt
@@ -0,0 +1,15 @@
1Device-Tree bindings for mixer driver
2
3Required properties:
4- compatible: value should be "samsung,exynos5-mixer".
5- reg: physical base address of the mixer and length of memory mapped
6 region.
7- interrupts: interrupt number to the cpu.
8
9Example:
10
11 mixer {
12 compatible = "samsung,exynos5-mixer";
13 reg = <0x14450000 0x10000>;
14 interrupts = <0 94 0>;
15 };
diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts
index a352df403b7a..7212d538086d 100644
--- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
+++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
@@ -56,7 +56,15 @@
56 }; 56 };
57 57
58 i2c@12C80000 { 58 i2c@12C80000 {
59 status = "disabled"; 59 samsung,i2c-sda-delay = <100>;
60 samsung,i2c-max-bus-freq = <66000>;
61 gpios = <&gpa0 6 3 3 0>,
62 <&gpa0 7 3 3 0>;
63
64 hdmiddc@50 {
65 compatible = "samsung,exynos5-hdmiddc";
66 reg = <0x50>;
67 };
60 }; 68 };
61 69
62 i2c@12C90000 { 70 i2c@12C90000 {
@@ -79,6 +87,16 @@
79 status = "disabled"; 87 status = "disabled";
80 }; 88 };
81 89
90 i2c@12CE0000 {
91 samsung,i2c-sda-delay = <100>;
92 samsung,i2c-max-bus-freq = <66000>;
93
94 hdmiphy@38 {
95 compatible = "samsung,exynos5-hdmiphy";
96 reg = <0x38>;
97 };
98 };
99
82 dwmmc_0: dwmmc0@12200000 { 100 dwmmc_0: dwmmc0@12200000 {
83 num-slots = <1>; 101 num-slots = <1>;
84 supports-highspeed; 102 supports-highspeed;
@@ -166,4 +184,8 @@
166 spi_2: spi@12d40000 { 184 spi_2: spi@12d40000 {
167 status = "disabled"; 185 status = "disabled";
168 }; 186 };
187
188 hdmi {
189 hpd-gpio = <&gpx3 7 0xf 1 3>;
190 };
169}; 191};
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index dddfd6e444dc..190068f66499 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -156,6 +156,14 @@
156 #size-cells = <0>; 156 #size-cells = <0>;
157 }; 157 };
158 158
159 i2c@12CE0000 {
160 compatible = "samsung,s3c2440-hdmiphy-i2c";
161 reg = <0x12CE0000 0x1000>;
162 interrupts = <0 64 0>;
163 #address-cells = <1>;
164 #size-cells = <0>;
165 };
166
159 spi_0: spi@12d20000 { 167 spi_0: spi@12d20000 {
160 compatible = "samsung,exynos4210-spi"; 168 compatible = "samsung,exynos4210-spi";
161 reg = <0x12d20000 0x100>; 169 reg = <0x12d20000 0x100>;
@@ -520,4 +528,16 @@
520 reg = <0x13e30000 0x1000>; 528 reg = <0x13e30000 0x1000>;
521 interrupts = <0 88 0>; 529 interrupts = <0 88 0>;
522 }; 530 };
531
532 hdmi {
533 compatible = "samsung,exynos5-hdmi";
534 reg = <0x14530000 0x100000>;
535 interrupts = <0 95 0>;
536 };
537
538 mixer {
539 compatible = "samsung,exynos5-mixer";
540 reg = <0x14450000 0x10000>;
541 interrupts = <0 94 0>;
542 };
523}; 543};
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 9b58024f7d43..1797dee88a0d 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -53,7 +53,6 @@ obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o
53obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o 53obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o
54obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o 54obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o
55obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o 55obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o
56obj-$(CONFIG_EXYNOS_DEV_DRM) += dev-drm.o
57obj-$(CONFIG_EXYNOS_DEV_SYSMMU) += dev-sysmmu.o 56obj-$(CONFIG_EXYNOS_DEV_SYSMMU) += dev-sysmmu.o
58 57
59obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o 58obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c
index c44ca1ee1b8d..a86f20fb05a1 100644
--- a/arch/arm/mach-exynos/clock-exynos5.c
+++ b/arch/arm/mach-exynos/clock-exynos5.c
@@ -196,6 +196,11 @@ static int exynos5_clk_ip_isp1_ctrl(struct clk *clk, int enable)
196 return s5p_gatectrl(EXYNOS5_CLKGATE_IP_ISP1, clk, enable); 196 return s5p_gatectrl(EXYNOS5_CLKGATE_IP_ISP1, clk, enable);
197} 197}
198 198
199static int exynos5_clk_hdmiphy_ctrl(struct clk *clk, int enable)
200{
201 return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable);
202}
203
199/* Core list of CMU_CPU side */ 204/* Core list of CMU_CPU side */
200 205
201static struct clksrc_clk exynos5_clk_mout_apll = { 206static struct clksrc_clk exynos5_clk_mout_apll = {
@@ -669,12 +674,17 @@ static struct clk exynos5_init_clocks_off[] = {
669 .ctrlbit = (1 << 0), 674 .ctrlbit = (1 << 0),
670 }, { 675 }, {
671 .name = "hdmi", 676 .name = "hdmi",
672 .devname = "exynos4-hdmi", 677 .devname = "exynos5-hdmi",
673 .enable = exynos5_clk_ip_disp1_ctrl, 678 .enable = exynos5_clk_ip_disp1_ctrl,
674 .ctrlbit = (1 << 6), 679 .ctrlbit = (1 << 6),
675 }, { 680 }, {
681 .name = "hdmiphy",
682 .devname = "exynos5-hdmi",
683 .enable = exynos5_clk_hdmiphy_ctrl,
684 .ctrlbit = (1 << 0),
685 }, {
676 .name = "mixer", 686 .name = "mixer",
677 .devname = "s5p-mixer", 687 .devname = "exynos5-mixer",
678 .enable = exynos5_clk_ip_disp1_ctrl, 688 .enable = exynos5_clk_ip_disp1_ctrl,
679 .ctrlbit = (1 << 5), 689 .ctrlbit = (1 << 5),
680 }, { 690 }, {
diff --git a/arch/arm/mach-exynos/dev-drm.c b/arch/arm/mach-exynos/dev-drm.c
deleted file mode 100644
index 17c9c6ecc2e0..000000000000
--- a/arch/arm/mach-exynos/dev-drm.c
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * linux/arch/arm/mach-exynos/dev-drm.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * EXYNOS - core DRM device
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#include <linux/kernel.h>
16#include <linux/dma-mapping.h>
17#include <linux/platform_device.h>
18
19#include <plat/devs.h>
20
21static u64 exynos_drm_dma_mask = DMA_BIT_MASK(32);
22
23struct platform_device exynos_device_drm = {
24 .name = "exynos-drm",
25 .dev = {
26 .dma_mask = &exynos_drm_dma_mask,
27 .coherent_dma_mask = DMA_BIT_MASK(32),
28 }
29};
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index db1cd8eacf28..db035374087e 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -47,6 +47,10 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {
47 "s3c2440-i2c.0", NULL), 47 "s3c2440-i2c.0", NULL),
48 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(1), 48 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(1),
49 "s3c2440-i2c.1", NULL), 49 "s3c2440-i2c.1", NULL),
50 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(2),
51 "s3c2440-i2c.2", NULL),
52 OF_DEV_AUXDATA("samsung,s3c2440-hdmiphy-i2c", EXYNOS5_PA_IIC(8),
53 "s3c2440-hdmiphy-i2c", NULL),
50 OF_DEV_AUXDATA("samsung,exynos5250-dw-mshc", EXYNOS5_PA_DWMCI0, 54 OF_DEV_AUXDATA("samsung,exynos5250-dw-mshc", EXYNOS5_PA_DWMCI0,
51 "dw_mmc.0", NULL), 55 "dw_mmc.0", NULL),
52 OF_DEV_AUXDATA("samsung,exynos5250-dw-mshc", EXYNOS5_PA_DWMCI1, 56 OF_DEV_AUXDATA("samsung,exynos5250-dw-mshc", EXYNOS5_PA_DWMCI1,
@@ -72,6 +76,10 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {
72 "exynos-gsc.2", NULL), 76 "exynos-gsc.2", NULL),
73 OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3, 77 OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3,
74 "exynos-gsc.3", NULL), 78 "exynos-gsc.3", NULL),
79 OF_DEV_AUXDATA("samsung,exynos5-hdmi", 0x14530000,
80 "exynos5-hdmi", NULL),
81 OF_DEV_AUXDATA("samsung,exynos5-mixer", 0x14450000,
82 "exynos5-mixer", NULL),
75 {}, 83 {},
76}; 84};
77 85
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index c05d7aa84031..94970602df61 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -1327,9 +1327,6 @@ static struct platform_device *nuri_devices[] __initdata = {
1327 &cam_vdda_fixed_rdev, 1327 &cam_vdda_fixed_rdev,
1328 &cam_8m_12v_fixed_rdev, 1328 &cam_8m_12v_fixed_rdev,
1329 &exynos4_bus_devfreq, 1329 &exynos4_bus_devfreq,
1330#ifdef CONFIG_DRM_EXYNOS
1331 &exynos_device_drm,
1332#endif
1333}; 1330};
1334 1331
1335static void __init nuri_map_io(void) 1332static void __init nuri_map_io(void)
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 9adf491674ea..d8dc6d7f0c00 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -709,9 +709,6 @@ static struct platform_device *origen_devices[] __initdata = {
709 &s5p_device_mfc_l, 709 &s5p_device_mfc_l,
710 &s5p_device_mfc_r, 710 &s5p_device_mfc_r,
711 &s5p_device_mixer, 711 &s5p_device_mixer,
712#ifdef CONFIG_DRM_EXYNOS
713 &exynos_device_drm,
714#endif
715 &exynos4_device_ohci, 712 &exynos4_device_ohci,
716 &origen_device_gpiokeys, 713 &origen_device_gpiokeys,
717 &origen_lcd_hv070wsa, 714 &origen_lcd_hv070wsa,
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index 730f1ac65928..17b9ca48722e 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -317,9 +317,6 @@ static struct platform_device *smdk4x12_devices[] __initdata = {
317 &s5p_device_mfc, 317 &s5p_device_mfc,
318 &s5p_device_mfc_l, 318 &s5p_device_mfc_l,
319 &s5p_device_mfc_r, 319 &s5p_device_mfc_r,
320#ifdef CONFIG_DRM_EXYNOS
321 &exynos_device_drm,
322#endif
323 &samsung_device_keypad, 320 &samsung_device_keypad,
324}; 321};
325 322
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index ee4fb1a9cb72..4f0ac5397ba3 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -300,9 +300,6 @@ static struct platform_device *smdkv310_devices[] __initdata = {
300 &s5p_device_fimc_md, 300 &s5p_device_fimc_md,
301 &s5p_device_g2d, 301 &s5p_device_g2d,
302 &s5p_device_jpeg, 302 &s5p_device_jpeg,
303#ifdef CONFIG_DRM_EXYNOS
304 &exynos_device_drm,
305#endif
306 &exynos4_device_ac97, 303 &exynos4_device_ac97,
307 &exynos4_device_i2s0, 304 &exynos4_device_i2s0,
308 &exynos4_device_ohci, 305 &exynos4_device_ohci,
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index ebc9dd339a38..cfdf876a8626 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -1081,9 +1081,6 @@ static struct platform_device *universal_devices[] __initdata = {
1081 &s5p_device_onenand, 1081 &s5p_device_onenand,
1082 &s5p_device_fimd0, 1082 &s5p_device_fimd0,
1083 &s5p_device_jpeg, 1083 &s5p_device_jpeg,
1084#ifdef CONFIG_DRM_EXYNOS
1085 &exynos_device_drm,
1086#endif
1087 &s3c_device_usb_hsotg, 1084 &s3c_device_usb_hsotg,
1088 &s5p_device_mfc, 1085 &s5p_device_mfc,
1089 &s5p_device_mfc_l, 1086 &s5p_device_mfc_l,
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h
index 5da4b4f38f40..133e3e4170fb 100644
--- a/arch/arm/plat-samsung/include/plat/devs.h
+++ b/arch/arm/plat-samsung/include/plat/devs.h
@@ -133,8 +133,6 @@ extern struct platform_device exynos4_device_pcm1;
133extern struct platform_device exynos4_device_pcm2; 133extern struct platform_device exynos4_device_pcm2;
134extern struct platform_device exynos4_device_spdif; 134extern struct platform_device exynos4_device_spdif;
135 135
136extern struct platform_device exynos_device_drm;
137
138extern struct platform_device samsung_asoc_dma; 136extern struct platform_device samsung_asoc_dma;
139extern struct platform_device samsung_asoc_idma; 137extern struct platform_device samsung_asoc_idma;
140extern struct platform_device samsung_device_keypad; 138extern struct platform_device samsung_device_keypad;