Enable HDMI support on Exynos platforms
Subsystems (6)
cover Enable HDMI support on Exynos platforms
This set of patches enables HDMI support for two Exynos based platforms:
UniversalC210 and Odroid.
Beside DTS changes patchset adds parent domain support for Exynos PM domains and small but critical change in mixer clock. For details see individual patches.
The patchset is based on v3.18-rc4.
Regards
Andrzej
Andrzej Hajda (2):
clk: samsung: exynos4: set parent of mixer gate clock to hdmi
ARM: dts: exynos5250: add display power domain
Marek Szyprowski (4):
ARM: Exynos: add support for sub-power domains
ARM: dts: exynos4: add hdmi related nodes
ARM: dts: exynos4: add dependency between TV and LCD0 power domains
ARM: dts: exynos4412-odroid: enable hdmi support
Tomasz Stanislawski (1):
ARM: dts: exynos4210-universal_c210: enable hdmi support
.../bindings/arm/exynos/power_domain.txt | 2 + arch/arm/boot/dts/exynos4.dtsi | 41 ++++++++++++++++ arch/arm/boot/dts/exynos4210-universal_c210.dts | 57 ++++++++++++++++++++++ arch/arm/boot/dts/exynos4210.dtsi | 8 +++ arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 44 +++++++++++++++++ arch/arm/boot/dts/exynos4x12.dtsi | 11 +++++ arch/arm/boot/dts/exynos5250.dtsi | 9 ++++ arch/arm/mach-exynos/pm_domains.c | 9 +++- drivers/clk/samsung/clk-exynos4.c | 2 +- 9 files changed, 181 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/7 clk: samsung: exynos4: set parent of mixer gate clock to hdmi
This dependency is not clearly documented, but it seems mixer gate clock is not working without hdmi clock. It causes system hangs during mixer access with disabled hdmi.
--- drivers/clk/samsung/clk-exynos4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/samsung/clk-exynos4.c +1 -1
@@ -875,7 +875,7 @@ static struct samsung_gate_clock exynos4_gate_clks[] __initdata = {GATE (CLK_SCLK_AUDIO1 ,"sclk_audio1" ,"div_audio1" ,SRC_MASK_PERIL1 ,0 ,CLK_SET_RATE_PARENT ,0 ),GATE (CLK_VP ,"vp" ,"aclk160" ,GATE_IP_TV ,0 ,0 ,0 ), -GATE (CLK_MIXER ,"mixer" ,"aclk160" ,GATE_IP_TV ,1 ,0 ,0 ), +GATE (CLK_MIXER ,"mixer" ,"hdmi" ,GATE_IP_TV ,1 ,0 ,0 ),GATE (CLK_HDMI ,"hdmi" ,"aclk160" ,GATE_IP_TV ,3 ,0 ,0 ),GATE (CLK_PWM ,"pwm" ,"aclk100" ,GATE_IP_PERIL ,24 ,0 ,0 ), GATE(CLK_SDMMC4, "sdmmc4", "aclk133", GATE_IP_FSYS, 9, 0, 0),
Signature · 1 line
1.9.1
PATCH 1/7 clk: samsung: exynos4: set parent of sclk_hdmiphy to hdmi
sclk_hdmiphy clock is generated by HDMI-PHY and depends on hdmi gate clock. The patch models this dependency using parent/child hirerarchy.
The patch fixes issue with system hangs during mixer device access, mixer uses sclk_hdmiphy descendant clock.
---
Hi Tomasz,
This patch replaces the previous one [1], as it slightly better models the clock tree/jungle.
[1]: http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/39629
Regards
Andrzej
--- drivers/clk/samsung/clk-exynos4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/samsung/clk-exynos4.c +1 -1
@@ -505,7 +505,7 @@ static struct samsung_fixed_rate_clock exynos4_fixed_rate_ext_clks[] __initdata/* fixed rate clocks generated inside the soc */ static struct samsung_fixed_rate_clock exynos4_fixed_rate_clks[]__initdata = {FRATE (0 ,"sclk_hdmi24m" ,NULL ,CLK_IS_ROOT ,24000000 ), -FRATE (CLK_SCLK_HDMIPHY ,"sclk_hdmiphy" ,NULL ,CLK_IS_ROOT ,27000000 ), +FRATE (CLK_SCLK_HDMIPHY ,"sclk_hdmiphy" ,"hdmi" ,0 ,27000000 ),FRATE (0 ,"sclk_usbphy0" ,NULL ,CLK_IS_ROOT ,48000000 ), };
Signature · 1 line
1.9.1
Re: [PATCH 1/7] clk: samsung: exynos4: set parent of sclk_hdmiphy to hdmi
Quoted 26 lines · Andrzej Hajda
sclk_hdmiphyclock is generated by HDMI-PHY and depends on hdmi gate clock. The patch models this dependency using parent/child hirerarchy.The patch fixes issue with system hangs during mixer device access, mixer uses
sclk_hdmiphydescendant clock.Signed-off-by Andrzej Hajda <[email protected]>---
Hi Tomasz,This patch replaces the previous one [1], as it slightly better models the clock tree/jungle.
[1]: http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/39629
Regards
Andrzej--- drivers/clk/samsung/clk-exynos4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/samsung/clk-exynos4.c +0
-0
drivers/clk/samsung/clk-exynos4.c static struct samsung_fixed_rate_clock exynos4_fixed_rate_ext_clks[] __initdata · line 511
Quoted 8 lines
drivers/clk/samsung/clk-exynos4.c +1
-1@@ -505,7 +505,7 @@ static struct samsung_fixed_rate_clock exynos4_fixed_rate_ext_clks[] __initdata/* fixed rate clocks generated inside the soc */ static struct samsung_fixed_rate_clock exynos4_fixed_rate_clks[]__initdata = {FRATE (0 ,"sclk_hdmi24m" ,NULL ,CLK_IS_ROOT ,24000000 ), -FRATE (CLK_SCLK_HDMIPHY ,"sclk_hdmiphy" ,NULL ,CLK_IS_ROOT ,27000000 ), +FRATE (CLK_SCLK_HDMIPHY ,"sclk_hdmiphy" ,"hdmi" ,0 ,27000000 ),FRATE (0 ,"sclk_usbphy0" ,NULL ,CLK_IS_ROOT ,48000000 ), };
Sylwester and Tomasz,
Can I get your ack on this to apply into samsung tree with others?
- Kukjin
PATCH 2/7 ARM: Exynos: add support for sub-power domains
In reply to Andrzej HajdaFrom: Marek Szyprowski <[email protected]>
This patch adds support for making one power domain a sub-domain of other domain. This is useful for modeling power dependences for devices like TV Mixer or Camera ISP, which needs to have more than one power domain enabled to be operational.
--- Documentation/devicetree/bindings/arm/exynos/power_domain.txt | 2 ++ arch/arm/mach-exynos/pm_domains.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +2 -0
@@ -22,6 +22,8 @@ Optional Properties: - pclkN, clkN: Pairs of parent of input clock and input clock to the devices in this power domain. Maximum of 4 pairs (N = 0 to 3) are supported currently. +- power-domain-master: phandle to a master power domain that the given domain + is a part of Node of a device using power domains must have a samsung,power-domain property defined with a phandle to respective power domain.
arch/arm/mach-exynos/pm_domains.c +8 -1
@@ -108,7 +108,7 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)static __init int exynos4_pm_init_power_domain (void ) {struct platform_device *pdev; -struct device_node *np; +struct device_node *np, *master_np;for_each_compatible_node (np,NULL ,"samsung,exynos4210-pd" ) {struct exynos_pm_domain *pd;
@@ -159,6 +159,13 @@ no_clk:pm_genpd_init (&pd->pd,NULL , !on);of_genpd_add_provider_simple (np, &pd->pd); + +/* make master and slave hierarchy */ + master_np =of_parse_phandle (np,"power-domain-master" ,0 ); +if (master_np) { +pm_genpd_add_subdomain_names (master_np->name, np->name); +of_node_put (master_np); + } }return 0 ;
Signature · 1 line
1.9.1
PATCH 3/7 ARM: dts: exynos4: add hdmi related nodes
In reply to Andrzej HajdaFrom: Marek Szyprowski <[email protected]>
This patch adds entries for HDMI, Mixer and i2c with hdmi-phy modules found in Exynos 4210 and 4x12 SoCs.
--- arch/arm/boot/dts/exynos4.dtsi | 40 +++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/exynos4210.dtsi | 8 ++++++++ arch/arm/boot/dts/exynos4x12.dtsi | 11 +++++++++++ 3 files changed, 59 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +40 -0
@@ -38,6 +38,7 @@ i2c5 = &i2c_5; i2c6 = &i2c_6; i2c7 = &i2c_7; + i2c8 = &i2c_8; csis0 = &csis_0; csis1 = &csis_1; fimc0 = &fimc_0;
@@ -537,6 +538,22 @@ status = "disabled"; }; + i2c_8: i2c@138E0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-hdmiphy-i2c"; + reg = <0x138E0000 0x100>; + interrupts = <0 93 0>; + clocks = <&clock CLK_I2C_HDMI>; + clock-names = "i2c"; + status = "disabled"; + + hdmi_i2c_phy: hdmiphy@38 { + compatible = "exynos4210-hdmiphy"; + reg = <0x38>; + }; + }; + spi_0: spi@13920000 { compatible = "samsung,exynos4210-spi"; reg = <0x13920000 0x100>;
@@ -645,4 +662,27 @@ samsung,sysreg = <&sys_reg>; status = "disabled"; }; + + hdmi: hdmi@12D00000 { + compatible = "samsung,exynos4210-hdmi"; + reg = <0x12D00000 0x70000>; + interrupts = <0 92 0>; + clock-names = "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy", + "mout_hdmi"; + clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>, + <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>, + <&clock CLK_MOUT_HDMI>; + phy = <&hdmi_i2c_phy>; + samsung,power-domain = <&pd_tv>; + samsung,syscon-phandle = <&pmu_system_controller>; + status = "disabled"; + }; + + mixer: mixer@12C10000 { + compatible = "samsung,exynos4210-mixer"; + interrupts = <0 91 0>; + reg = <0x12C10000 0x2100>, <0x12c00000 0x300>; + samsung,power-domain = <&pd_tv>; + status = "disabled"; + }; };
arch/arm/boot/dts/exynos4210.dtsi +8 -0
@@ -175,4 +175,12 @@ samsung,lcd-wb; }; }; + + mixer: mixer@12C10000 { + clock-names = "mixer", "sclk_hdmi", "vp", "mout_mixer", + "sclk_mixer"; + clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>, + <&clock CLK_VP>, <&clock CLK_MOUT_MIXER>, + <&clock CLK_SCLK_MIXER>; + }; };
arch/arm/boot/dts/exynos4x12.dtsi +11 -0
@@ -271,4 +271,15 @@ compatible = "samsung,exynos4x12-usb2-phy"; samsung,sysreg-phandle = <&sys_reg>; }; + + hdmi: hdmi@12D00000 { + compatible = "samsung,exynos4212-hdmi"; + }; + + mixer: mixer@12C10000 { + compatible = "samsung,exynos4212-mixer"; + clock-names = "mixer", "sclk_hdmi", "vp"; + clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>, + <&clock CLK_VP>; + }; };
Signature · 1 line
1.9.1
Re: [PATCH 3/7] ARM: dts: exynos4: add hdmi related nodes
Quoted 6 lines · Andrzej Hajda
From: Marek Szyprowski <[email protected]>
This patch adds entries for HDMI, Mixer and i2c with hdmi-phy modules found in Exynos 4210 and 4x12 SoCs.
Signed-off-by Marek Szyprowski <[email protected]>
In this case, Andrzej's signed-off-by should be here as a submitter... Note I can't add it because of legal issue...
Please re-spin this series based on for-next of samsung tree ;)
Thanks,
Kukjin
Quoted 5 lines
--- arch/arm/boot/dts/exynos4.dtsi | 40 +++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/exynos4210.dtsi | 8 ++++++++ arch/arm/boot/dts/exynos4x12.dtsi | 11 +++++++++++ 3 files changed, 59 insertions(+)
PATCH 4/7 ARM: dts: exynos4: add dependency between TV and LCD0 power domains
In reply to Andrzej HajdaFrom: Marek Szyprowski <[email protected]>
TV Mixer needs both TV and LCD0 domains enabled to be fully operational. This dependency is modelled by making TV power domains a sub-domain of LCD0 power domain.
--- arch/arm/boot/dts/exynos4.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/exynos4.dtsi +1 -0
@@ -97,6 +97,7 @@ pd_tv: tv-power-domain@10023C20 { compatible = "samsung,exynos4210-pd"; reg = <0x10023C20 0x20>; + power-domain-master = <&pd_lcd0>; }; pd_cam: cam-power-domain@10023C00 {
Signature · 1 line
1.9.1
PATCH 5/7 ARM: dts: exynos4412-odroid: enable hdmi support
In reply to Andrzej HajdaFrom: Marek Szyprowski <[email protected]>
This patch adds nodes specific to Exynos4412 based Odroid X/X2/U2/U3 boards required for enabling HDMI display.
--- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +44 -0
@@ -205,6 +205,20 @@ regulator-always-on; }; + ldo8_reg: ldo@8 { + regulator-compatible = "LDO8"; + regulator-name = "VDD10_HDMI_1.0V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + }; + + ldo10_reg: ldo@10 { + regulator-compatible = "LDO10"; + regulator-name = "VDDQ_MIPIHSI_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + ldo11_reg: LDO11 { regulator-name = "VDD18_ABB1_1.8V"; regulator-min-microvolt = <1800000>;
@@ -363,6 +377,31 @@ ehci: ehci@12580000 { status = "okay"; }; + + mixer: mixer@12C10000 { + status = "okay"; + }; + + hdmi@12D00000 { + hpd-gpio = <&gpx3 7 0>; + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_hpd>; + vdd-supply = <&ldo8_reg>; + vdd_osc-supply = <&ldo10_reg>; + vdd_pll-supply = <&ldo8_reg>; + ddc = <&hdmi_ddc>; + status = "okay"; + }; + + hdmi_ddc: i2c@13880000 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_bus>; + }; + + i2c@138E0000 { + status = "okay"; + }; }; &pinctrl_1 {
@@ -377,4 +416,9 @@ samsung,pin-pud = <0>; samsung,pin-drv = <0>; }; + + hdmi_hpd: hdmi-hpd { + samsung,pins = "gpx3-7"; + samsung,pin-pud = <1>; + }; };
Signature · 1 line
1.9.1
PATCH 6/7 ARM: dts: exynos4210-universal_c210: enable hdmi support
In reply to Andrzej HajdaFrom: Tomasz Stanislawski <[email protected]>
This patch adds configuration of hw modules required to enable HDMI support on Universal C210 board.
--- arch/arm/boot/dts/exynos4210-universal_c210.dts | 57 +++++++++++++++++++++++++ 1 file changed, 57 insertions(+)
arch/arm/boot/dts/exynos4210-universal_c210.dts +57 -0
@@ -487,6 +487,63 @@ status = "okay"; }; }; + + hdmi_en: voltage-regulator-hdmi-5v { + compatible = "regulator-fixed"; + regulator-name = "HDMI_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpe0 1 0>; + enable-active-high; + }; + + hdmi_ddc: i2c-ddc { + compatible = "i2c-gpio"; + gpios = <&gpe4 2 0 &gpe4 3 0>; + i2c-gpio,delay-us = <100>; + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-0 = <&i2c_ddc_bus>; + pinctrl-names = "default"; + status = "okay"; + }; + + mixer@12C10000 { + status = "okay"; + }; + + hdmi@12D00000 { + hpd-gpio = <&gpx3 7 0>; + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_hpd>; + hdmi-en-supply = <&hdmi_en>; + vdd-supply = <&ldo3_reg>; + vdd_osc-supply = <&ldo4_reg>; + vdd_pll-supply = <&ldo3_reg>; + ddc = <&hdmi_ddc>; + status = "okay"; + }; + + i2c@138E0000 { + status = "okay"; + }; +}; + +&pinctrl_1 { + hdmi_hpd: hdmi-hpd { + samsung,pins = "gpx3-7"; + samsung,pin-pud = <0>; + }; +}; + +&pinctrl_0 { + i2c_ddc_bus: i2c-ddc-bus { + samsung,pins = "gpe4-2", "gpe4-3"; + samsung,pin-function = <2>; + samsung,pin-pud = <3>; + samsung,pin-drv = <0>; + }; }; &mdma1 {
Signature · 1 line
1.9.1
PATCH 7/7 ARM: dts: exynos5250: add display power domain
In reply to Andrzej HajdaThe patch adds domain definition and references to it in appropriate devices.
--- arch/arm/boot/dts/exynos5250.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/exynos5250.dtsi +9 -0
@@ -100,6 +100,11 @@ reg = <0x10044040 0x20>; }; + pd_disp1: disp1-power-domain@100440A0 { + compatible = "samsung,exynos4210-pd"; + reg = <0x100440A0 0x20>; + }; + clock: clock-controller@10010000 { compatible = "samsung,exynos5250-clock"; reg = <0x10010000 0x30000>;
@@ -713,6 +718,7 @@ hdmi { compatible = "samsung,exynos4212-hdmi"; reg = <0x14530000 0x70000>; + samsung,power-domain = <&pd_disp1>; interrupts = <0 95 0>; clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>, <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>,
@@ -725,6 +731,7 @@ mixer { compatible = "samsung,exynos5250-mixer"; reg = <0x14450000 0x10000>; + samsung,power-domain = <&pd_disp1>; interrupts = <0 94 0>; clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>; clock-names = "mixer", "sclk_hdmi";
@@ -737,6 +744,7 @@ }; dp-controller@145B0000 { + samsung,power-domain = <&pd_disp1>; clocks = <&clock CLK_DP>; clock-names = "dp"; phys = <&dp_phy>;
@@ -744,6 +752,7 @@ }; fimd@14400000 { + samsung,power-domain = <&pd_disp1>; clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>; clock-names = "sclk_fimd", "fimd"; };
Signature · 1 line
1.9.1