Skip to contentSkip to conversation

Enable HDMI support on Exynos platforms

PATCH In review Marek Szyprowski 6 participants 18 messages Feb 2, 2015 – Feb 25, 2015

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

v5 cover Enable HDMI support on Exynos platforms

Hi all,

This is yet another update on patchset, which enables HDMI support for Exynos based platforms.

Beside DTS changes, this patchset adds parent domain support for Exynos PM domains and add support for 'hdmi' clock directly to Exynos DRM mixer driver.

The patchset is based on samsung/for-next branch and 'PM / Domains:
Export of_genpd_get_from_provider function' patch merged as commit 7496fcbe8a643097efc061160e1c3b65ee2fa350 to v3.19-rc4.

Regards
Marek Szyprowski

Changelog:

v5:
- fixed error value for clk_get() in mixer patch
- rebased onto samsung/for-next branch

v4: (http://www.spinics.net/lists/linux-samsung-soc/msg41375.html)
- added patches, which add 'hdmi' clock handling to mixed block, this finally solves the initialization related issues, thanks for Tobias Jakobi for testing
- added acks/reviewed/tested by tags

v3: (http://www.spinics.net/lists/linux-samsung-soc/msg41020.html)
- added a note on defining subdomains to generic PM domain binding documentation (requested by Ulf Hansson)

v2: (http://www.spinics.net/lists/linux-samsung-soc/msg40980.html)
- rewrote subdomains patch according to suggestions from Geert Uytterhoeven and Amit Daniel Kachhap.

v1 resend: (http://www.spinics.net/lists/linux-samsung-soc/msg39428.html)
- added handling of generic 'power-domains' binding in subdomains

v1: (http://www.spinics.net/lists/linux-samsung-soc/msg38914.html)
- resolved power domain on/off issue with 'clk: samsung: exynos4: set parent of mixer gate clock to hdmi' patch

v0: (http://www.spinics.net/lists/linux-samsung-soc/msg33498.html)
- first attempt, used 'always on' power domains hack

Patch summary:

*** BLURB HERE ***

Andrzej Hajda (1):
ARM: dts: exynos5250: add display power domain

Marek Szyprowski (7):
PM / Domains: Add a note about power domain subdomains
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
ARM: dts: Exynos: add 'hdmi' clock to mixer nodes drm/exynos: add support for 'hdmi' clock

Tomasz Stanislawski (1):
ARM: dts: exynos4210-universal_c210: enable hdmi support

 .../bindings/arm/exynos/power_domain.txt           |  2 +
 .../devicetree/bindings/power/power_domain.txt     | 29 +++++++++++
 .../devicetree/bindings/video/exynos_mixer.txt     |  1 +
 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                  | 15 +++++-
 arch/arm/boot/dts/exynos5420.dtsi                  |  5 +-
 arch/arm/mach-exynos/pm_domains.c                  | 28 +++++++++++
 drivers/gpu/drm/exynos/exynos_mixer.c              |  9 ++++
 12 files changed, 246 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.2
#1 lore raw

PATCH v5 1/9 PM / Domains: Add a note about power domain subdomains

This patch adds a note on defining subdomains to generic PM domain binding documentation to let power domain providers use common approach for defining power domain hierarchy.

---
 .../devicetree/bindings/power/power_domain.txt     | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
Documentation/devicetree/bindings/power/power_domain.txt +29 -0
index 98c16672ab5f..0f8ed3710c66 100644
@@ -19,6 +19,16 @@ Required properties:
    providing multiple PM domains (e.g. power controllers), but can be any value
    as specified by device tree binding documentation of particular provider.
 
+Optional properties:
+ - power-domains : A phandle and PM domain specifier as defined by bindings of
+                   the power controller specified by phandle.
+   Some power domains might be powered from another power domain (or have
+   other hardware specific dependencies). For representing such dependency
+   a standard PM domain consumer binding is used. When provided, all domains
+   created by the given provider should be subdomains of the domain
+   specified by this binding. More details about power domain specifier are
+   available in the next section.
+
 Example:
 
 	power: power-controller@12340000 {
@@ -30,6 +40,25 @@ Example:
 The node above defines a power controller that is a PM domain provider and
 expects one cell as its phandle argument.
 
+Example 2:
+
+	parent: power-controller@12340000 {
+		compatible = "foo,power-controller";
+		reg = <0x12340000 0x1000>;
+		#power-domain-cells = <1>;
+	};
+
+	child: power-controller@12340000 {
+		compatible = "foo,power-controller";
+		reg = <0x12341000 0x1000>;
+		power-domains = <&parent 0>;
+		#power-domain-cells = <1>;
+	};
+
+The nodes above define two power controllers: 'parent' and 'child'.
+Domains created by the 'child' power controller are subdomains of '0' power
+domain provided by the 'parent' power controller.
+
 ==PM domain consumers==
 
 Required properties:
Signature · 1 line
1.9.2
#2 lore raw

PATCH v5 2/9 ARM: Exynos: add support for sub-power domains

In reply to Marek Szyprowski

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.

Based on previous work by Amit Daniel Kachhap <[email protected]>.

---
 .../bindings/arm/exynos/power_domain.txt           |  2 ++
 arch/arm/mach-exynos/pm_domains.c                  | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +2 -0
index f4445e5a2bbb..1e097037349c 100644
@@ -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-domains: phandle pointing to the parent power domain, for more details
+		 see Documentation/devicetree/bindings/power/power_domain.txt
 
 Node of a device using power domains must have a power-domains property
 defined with a phandle to respective power domain.
arch/arm/mach-exynos/pm_domains.c +28 -0
index 20f267121b3e..37266a826437 100644
@@ -161,6 +161,34 @@ no_clk:
 		of_genpd_add_provider_simple(np, &pd->pd);
 	}
 
+	/* Assign the child power domains to their parents */
+	for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
+		struct generic_pm_domain *child_domain, *parent_domain;
+		struct of_phandle_args args;
+
+		args.np = np;
+		args.args_count = 0;
+		child_domain = of_genpd_get_from_provider(&args);
+		if (!child_domain)
+			continue;
+
+		if (of_parse_phandle_with_args(np, "power-domains",
+					 "#power-domain-cells", 0, &args) != 0)
+			continue;
+
+		parent_domain = of_genpd_get_from_provider(&args);
+		if (!parent_domain)
+			continue;
+
+		if (pm_genpd_add_subdomain(parent_domain, child_domain))
+			pr_warn("%s failed to add subdomain: %s\n",
+				parent_domain->name, child_domain->name);
+		else
+			pr_info("%s has as child subdomain: %s.\n",
+				parent_domain->name, child_domain->name);
+		of_node_put(np);
+	}
+
 	return 0;
 }
 arch_initcall(exynos4_pm_init_power_domain);
Signature · 1 line
1.9.2
#3 lore raw

PATCH v5 3/9 ARM: dts: exynos4: add hdmi related nodes

In reply to Marek Szyprowski

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
index c5dc2efb99ed..d9516471c41e 100644
@@ -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;
@@ -544,6 +545,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>;
@@ -652,4 +669,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>;
+		power-domains = <&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>;
+		power-domains = <&pd_tv>;
+		status = "disabled";
+	};
 };
arch/arm/boot/dts/exynos4210.dtsi +8 -0
index 6728aaa2af9d..1b410027bbc8 100644
@@ -193,4 +193,12 @@
 			samsung,lcd-wb;
 		};
 	};
+
+	mixer: mixer@12C10000 {
+		clock-names = "mixer", "hdmi", "sclk_hdmi", "vp", "mout_mixer",
+			"sclk_mixer";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>,
+			<&clock CLK_SCLK_HDMI>, <&clock CLK_VP>,
+			<&clock CLK_MOUT_MIXER>, <&clock CLK_SCLK_MIXER>;
+	};
 };
arch/arm/boot/dts/exynos4x12.dtsi +11 -0
index da8734e25f50..a26503826363 100644
@@ -283,4 +283,15 @@
 		clock-names = "tmu_apbif";
 		status = "disabled";
 	};
+
+	hdmi: hdmi@12D00000 {
+		compatible = "samsung,exynos4212-hdmi";
+	};
+
+	mixer: mixer@12C10000 {
+		compatible = "samsung,exynos4212-mixer";
+		clock-names = "mixer", "hdmi", "sclk_hdmi", "vp";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>,
+			 <&clock CLK_SCLK_HDMI>, <&clock CLK_VP>;
+	};
 };
Signature · 1 line
1.9.2
#4 lore raw

PATCH RESEND v5 3/9 ARM: dts: exynos4: add hdmi related nodes

This patch adds entries for HDMI, Mixer and i2c with hdmi-phy modules found in Exynos 4210 and 4x12 SoCs.

---
Resend reason: rebased onto latest kgene/v3.20-next/dt-samsung-4 branch

---
 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
index d1759bf5202f..c6e72041cc55 100644
@@ -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;
@@ -545,6 +546,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>;
@@ -654,6 +671,29 @@
 		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>;
+		power-domains = <&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>;
+		power-domains = <&pd_tv>;
+		status = "disabled";
+	};
+
 	ppmu_dmc0: ppmu_dmc0@106a0000 {
 		compatible = "samsung,exynos-ppmu";
 		reg = <0x106a0000 0x2000>;
arch/arm/boot/dts/exynos4210.dtsi +8 -0
index 7c15880bc8ba..1ef40f6f6e08 100644
@@ -194,6 +194,14 @@
 		};
 	};
 
+	mixer: mixer@12C10000 {
+		clock-names = "mixer", "hdmi", "sclk_hdmi", "vp", "mout_mixer",
+			"sclk_mixer";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>,
+			<&clock CLK_SCLK_HDMI>, <&clock CLK_VP>,
+			<&clock CLK_MOUT_MIXER>, <&clock CLK_SCLK_MIXER>;
+	};
+
 	ppmu_lcd1: ppmu_lcd1@12240000 {
 		compatible = "samsung,exynos-ppmu";
 		reg = <0x12240000 0x2000>;
arch/arm/boot/dts/exynos4x12.dtsi +11 -0
index af59cab53bd9..2824a5c0e28d 100644
@@ -283,4 +283,15 @@
 		clock-names = "tmu_apbif";
 		status = "disabled";
 	};
+
+	hdmi: hdmi@12D00000 {
+		compatible = "samsung,exynos4212-hdmi";
+	};
+
+	mixer: mixer@12C10000 {
+		compatible = "samsung,exynos4212-mixer";
+		clock-names = "mixer", "hdmi", "sclk_hdmi", "vp";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>,
+			 <&clock CLK_SCLK_HDMI>, <&clock CLK_VP>;
+	};
 };
Signature · 1 line
1.9.2
#5 lore raw

PATCH v5 4/9 ARM: dts: exynos4: add dependency between TV and LCD0 power domains

In reply to Marek Szyprowski

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
index d9516471c41e..a59b3fae3680 100644
@@ -101,6 +101,7 @@
 		compatible = "samsung,exynos4210-pd";
 		reg = <0x10023C20 0x20>;
 		#power-domain-cells = <0>;
+		power-domains = <&pd_lcd0>;
 	};
 
 	pd_cam: cam-power-domain@10023C00 {
Signature · 1 line
1.9.2
#6 lore raw

PATCH v5 5/9 ARM: dts: exynos4412-odroid: enable hdmi support

In reply to Marek Szyprowski

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
index ffcf17bbf63b..dfb24bb56cf3 100644
@@ -231,6 +231,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>;
@@ -390,6 +404,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 {
@@ -404,4 +443,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.2
#7 lore raw

PATCH v5 6/9 ARM: dts: exynos4210-universal_c210: enable hdmi support

In reply to Marek Szyprowski

From: 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
index 08f89e0ff2b8..1d7643288569 100644
@@ -504,6 +504,63 @@
 			assigned-clock-rates = <0>, <160000000>;
 		};
 	};
+
+	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.2
#8 lore raw

PATCH v5 7/9 ARM: dts: Exynos: add 'hdmi' clock to mixer nodes

In reply to Marek Szyprowski

Mixed block needs to control hdmi clock to properly perform power on/off operation, so add 'hdmi' clock also to mixer nodes.

---
 arch/arm/boot/dts/exynos5250.dtsi | 5 +++--
 arch/arm/boot/dts/exynos5420.dtsi | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/boot/dts/exynos5250.dtsi +3 -2
index 9bb1b0b738f5..e8c67fdb69fb 100644
@@ -732,8 +732,9 @@
 		compatible = "samsung,exynos5250-mixer";
 		reg = <0x14450000 0x10000>;
 		interrupts = <0 94 0>;
-		clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>;
-		clock-names = "mixer", "sclk_hdmi";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>,
+			 <&clock CLK_SCLK_HDMI>;
+		clock-names = "mixer", "hdmi", "sclk_hdmi";
 	};
 
 	dp_phy: video-phy@10040720 {
arch/arm/boot/dts/exynos5420.dtsi +3 -2
index 9dc2e9773b30..1b624104f84a 100644
@@ -740,8 +740,9 @@
 		compatible = "samsung,exynos5420-mixer";
 		reg = <0x14450000 0x10000>;
 		interrupts = <0 94 0>;
-		clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>;
-		clock-names = "mixer", "sclk_hdmi";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>,
+			 <&clock CLK_SCLK_HDMI>;
+		clock-names = "mixer", "hdmi", "sclk_hdmi";
 		power-domains = <&disp_pd>;
 	};
 
Signature · 1 line
1.9.2
Tested-by on v5 7/9
#9 lore raw

Re: [PATCH v5 7/9] ARM: dts: Exynos: add 'hdmi' clock to mixer nodes

Am 02.02.2015 um 14:20 schrieb Marek Szyprowski:

Quoted 25 lines

Mixed block needs to control hdmi clock to properly perform power on/off operation, so add 'hdmi' clock also to mixer nodes.

---
 arch/arm/boot/dts/exynos5250.dtsi | 5 +++--
 arch/arm/boot/dts/exynos5420.dtsi | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/boot/dts/exynos5250.dtsi +3 -2
index 9bb1b0b738f5..e8c67fdb69fb 100644
@@ -732,8 +732,9 @@
 		compatible = "samsung,exynos5250-mixer";
 		reg = <0x14450000 0x10000>;
 		interrupts = <0 94 0>;
-		clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>;
-		clock-names = "mixer", "sclk_hdmi";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>,
+			 <&clock CLK_SCLK_HDMI>;
+		clock-names = "mixer", "hdmi", "sclk_hdmi";
 	};
 
 	dp_phy: video-phy@10040720 {

[snip]

Without this patch, next-20150218 exynos drm mixer fails to locate the hdmi clock on Spring.

Kukjin, can you please queue the remaining patches 1-8?

Regards,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)
#10 lore raw

PATCH v5 8/9 ARM: dts: exynos5250: add display power domain

In reply to Marek Szyprowski

From: Andrzej Hajda <[email protected]>

The patch adds domain definition and references to it in appropriate devices.

[mszyprow: rebased onto generic power domains dt bindings]
---
 arch/arm/boot/dts/exynos5250.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/exynos5250.dtsi +10 -0
index e8c67fdb69fb..ae22bd98f956 100644
@@ -102,6 +102,12 @@
 		#power-domain-cells = <0>;
 	};
 
+	pd_disp1: disp1-power-domain@100440A0 {
+		compatible = "samsung,exynos4210-pd";
+		reg = <0x100440A0 0x20>;
+		#power-domain-cells = <0>;
+	};
+
 	clock: clock-controller@10010000 {
 		compatible = "samsung,exynos5250-clock";
 		reg = <0x10010000 0x30000>;
@@ -719,6 +725,7 @@
 	hdmi: hdmi {
 		compatible = "samsung,exynos4212-hdmi";
 		reg = <0x14530000 0x70000>;
+		power-domains = <&pd_disp1>;
 		interrupts = <0 95 0>;
 		clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>,
 			 <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>,
@@ -731,6 +738,7 @@
 	mixer {
 		compatible = "samsung,exynos5250-mixer";
 		reg = <0x14450000 0x10000>;
+		power-domains = <&pd_disp1>;
 		interrupts = <0 94 0>;
 		clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>,
 			 <&clock CLK_SCLK_HDMI>;
@@ -744,6 +752,7 @@
 	};
 
 	dp: dp-controller@145B0000 {
+		power-domains = <&pd_disp1>;
 		clocks = <&clock CLK_DP>;
 		clock-names = "dp";
 		phys = <&dp_phy>;
@@ -751,6 +760,7 @@
 	};
 
 	fimd: fimd@14400000 {
+		power-domains = <&pd_disp1>;
 		clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>;
 		clock-names = "sclk_fimd", "fimd";
 	};
Signature · 1 line
1.9.2
Tested-by on v5 8/9
#11 lore raw

Re: [PATCH v5 8/9] ARM: dts: exynos5250: add display power domain

Am 02.02.2015 um 14:20 schrieb Marek Szyprowski:

Quoted 9 lines

From: Andrzej Hajda <[email protected]>

The patch adds domain definition and references to it in appropriate devices.

[mszyprow: rebased onto generic power domains dt bindings]

On Spring,

Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)
#12 lore raw

Re: [PATCH v5 8/9] ARM: dts: exynos5250: add display power domain

Hello Kukjin,

Quoted 11 lines · Andreas Färber

Am 02.02.2015 um 14:20 schrieb Marek Szyprowski:

Quoted 9 lines

From: Andrzej Hajda <[email protected]>

The patch adds domain definition and references to it in appropriate devices.

[mszyprow: rebased onto generic power domains dt bindings]
Quoted 6 lines

On Spring,

Andreas

Any comments on this patch? It is needed to have
display working on Exynos5250 machines.

Best regards,
Javier

#13 lore raw

PATCH v5 9/9 drm/exynos: add support for 'hdmi' clock

In reply to Marek Szyprowski

Mixed need to have hdmi clock enabled to properly perform power on/off sequences, so add handling of this clock directly to the mixer driver. Dependency between hdmi clock and mixer module has been observed on Exynos4 based boards.

---
 Documentation/devicetree/bindings/video/exynos_mixer.txt | 1 +
 drivers/gpu/drm/exynos/exynos_mixer.c                    | 9 +++++++++
 2 files changed, 10 insertions(+)
Documentation/devicetree/bindings/video/exynos_mixer.txt +1 -0
index 08b394b1edbf..3e38128f866b 100644
@@ -15,6 +15,7 @@ Required properties:
 	a) mixer: Gate of Mixer IP bus clock.
 	b) sclk_hdmi: HDMI Special clock, one of the two possible inputs of
                mixer mux.
+	c) hdmi: Gate of HDMI IP bus clock, needed together with sclk_hdmi.
 
 Example:
 
drivers/gpu/drm/exynos/exynos_mixer.c +9 -0
index 820b76234ef4..8212c8299625 100644
@@ -72,6 +72,7 @@ struct mixer_resources {
 	spinlock_t		reg_slock;
 	struct clk		*mixer;
 	struct clk		*vp;
+	struct clk		*hdmi;
 	struct clk		*sclk_mixer;
 	struct clk		*sclk_hdmi;
 	struct clk		*mout_mixer;
@@ -774,6 +775,12 @@ static int mixer_resources_init(struct mixer_context *mixer_ctx)
 		return -ENODEV;
 	}
 
+	mixer_res->hdmi = devm_clk_get(dev, "hdmi");
+	if (IS_ERR(mixer_res->hdmi)) {
+		dev_err(dev, "failed to get clock 'hdmi'\n");
+		return PTR_ERR(mixer_res->hdmi);
+	}
+
 	mixer_res->sclk_hdmi = devm_clk_get(dev, "sclk_hdmi");
 	if (IS_ERR(mixer_res->sclk_hdmi)) {
 		dev_err(dev, "failed to get clock 'sclk_hdmi'\n");
@@ -1095,6 +1102,7 @@ static void mixer_poweron(struct exynos_drm_manager *mgr)
 	pm_runtime_get_sync(ctx->dev);
 
 	clk_prepare_enable(res->mixer);
+	clk_prepare_enable(res->hdmi);
 	if (ctx->vp_enabled) {
 		clk_prepare_enable(res->vp);
 		if (ctx->has_sclk)
@@ -1134,6 +1142,7 @@ static void mixer_poweroff(struct exynos_drm_manager *mgr)
 	ctx->powered = false;
 	mutex_unlock(&ctx->mixer_mutex);
 
+	clk_disable_unprepare(res->hdmi);
 	clk_disable_unprepare(res->mixer);
 	if (ctx->vp_enabled) {
 		clk_disable_unprepare(res->vp);
Signature · 1 line
1.9.2
maintainer
#14 lore raw

Re: [PATCH v5 9/9] drm/exynos: add support for 'hdmi' clock

Hi Marek,

Quoted 4 lines · Marek Szyprowski

Mixed need to have hdmi clock enabled to properly perform power on/off sequences, so add handling of this clock directly to the mixer driver. Dependency between hdmi clock and mixer module has been observed on Exynos4 based boards.

Picked it up.

Thanks,
Inki Dae.

Quoted 64 lines
---
 Documentation/devicetree/bindings/video/exynos_mixer.txt | 1 +
 drivers/gpu/drm/exynos/exynos_mixer.c                    | 9 +++++++++
 2 files changed, 10 insertions(+)
Documentation/devicetree/bindings/video/exynos_mixer.txt +1 -0
index 08b394b1edbf..3e38128f866b 100644
@@ -15,6 +15,7 @@ Required properties:
 	a) mixer: Gate of Mixer IP bus clock.
 	b) sclk_hdmi: HDMI Special clock, one of the two possible inputs of
                mixer mux.
+	c) hdmi: Gate of HDMI IP bus clock, needed together with sclk_hdmi.
 
 Example:
 
drivers/gpu/drm/exynos/exynos_mixer.c +9 -0
index 820b76234ef4..8212c8299625 100644
@@ -72,6 +72,7 @@ struct mixer_resources {
 	spinlock_t		reg_slock;
 	struct clk		*mixer;
 	struct clk		*vp;
+	struct clk		*hdmi;
 	struct clk		*sclk_mixer;
 	struct clk		*sclk_hdmi;
 	struct clk		*mout_mixer;
@@ -774,6 +775,12 @@ static int mixer_resources_init(struct mixer_context *mixer_ctx)
 		return -ENODEV;
 	}
 
+	mixer_res->hdmi = devm_clk_get(dev, "hdmi");
+	if (IS_ERR(mixer_res->hdmi)) {
+		dev_err(dev, "failed to get clock 'hdmi'\n");
+		return PTR_ERR(mixer_res->hdmi);
+	}
+
 	mixer_res->sclk_hdmi = devm_clk_get(dev, "sclk_hdmi");
 	if (IS_ERR(mixer_res->sclk_hdmi)) {
 		dev_err(dev, "failed to get clock 'sclk_hdmi'\n");
@@ -1095,6 +1102,7 @@ static void mixer_poweron(struct exynos_drm_manager *mgr)
 	pm_runtime_get_sync(ctx->dev);
 
 	clk_prepare_enable(res->mixer);
+	clk_prepare_enable(res->hdmi);
 	if (ctx->vp_enabled) {
 		clk_prepare_enable(res->vp);
 		if (ctx->has_sclk)
@@ -1134,6 +1142,7 @@ static void mixer_poweroff(struct exynos_drm_manager *mgr)
 	ctx->powered = false;
 	mutex_unlock(&ctx->mixer_mutex);
 
+	clk_disable_unprepare(res->hdmi);
 	clk_disable_unprepare(res->mixer);
 	if (ctx->vp_enabled) {
 		clk_disable_unprepare(res->vp);
#15 lore raw
In reply to Marek Szyprowski
Quoted 83 lines · Marek Szyprowski

Hi all,

This is yet another update on patchset, which enables HDMI support for Exynos based platforms.

Beside DTS changes, this patchset adds parent domain support for Exynos PM domains and add support for 'hdmi' clock directly to Exynos DRM mixer driver.

The patchset is based on samsung/for-next branch and 'PM / Domains:
Export of_genpd_get_from_provider function' patch merged as commit 7496fcbe8a643097efc061160e1c3b65ee2fa350 to v3.19-rc4.

Regards
Marek Szyprowski

Changelog:

v5:
- fixed error value for clk_get() in mixer patch
- rebased onto samsung/for-next branch

v4: (http://www.spinics.net/lists/linux-samsung-soc/msg41375.html)
- added patches, which add 'hdmi' clock handling to mixed block, this finally solves the initialization related issues, thanks for Tobias Jakobi for testing
- added acks/reviewed/tested by tags

v3: (http://www.spinics.net/lists/linux-samsung-soc/msg41020.html)
- added a note on defining subdomains to generic PM domain binding documentation (requested by Ulf Hansson)

v2: (http://www.spinics.net/lists/linux-samsung-soc/msg40980.html)
- rewrote subdomains patch according to suggestions from Geert Uytterhoeven and Amit Daniel Kachhap.

v1 resend: (http://www.spinics.net/lists/linux-samsung-soc/msg39428.html)
- added handling of generic 'power-domains' binding in subdomains

v1: (http://www.spinics.net/lists/linux-samsung-soc/msg38914.html)
- resolved power domain on/off issue with 'clk: samsung: exynos4: set parent of mixer gate clock to hdmi' patch

v0: (http://www.spinics.net/lists/linux-samsung-soc/msg33498.html)
- first attempt, used 'always on' power domains hack

Patch summary:

*** BLURB HERE ***

Andrzej Hajda (1):
ARM: dts: exynos5250: add display power domain

Marek Szyprowski (7):
PM / Domains: Add a note about power domain subdomains
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
ARM: dts: Exynos: add 'hdmi' clock to mixer nodes drm/exynos: add support for 'hdmi' clock

Tomasz Stanislawski (1):
ARM: dts: exynos4210-universal_c210: enable hdmi support

 .../bindings/arm/exynos/power_domain.txt           |  2 +
 .../devicetree/bindings/power/power_domain.txt     | 29 +++++++++++
 .../devicetree/bindings/video/exynos_mixer.txt     |  1 +
 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                  | 15 +++++-
 arch/arm/boot/dts/exynos5420.dtsi                  |  5 +-
 arch/arm/mach-exynos/pm_domains.c                  | 28 +++++++++++
 drivers/gpu/drm/exynos/exynos_mixer.c              |  9 ++++
 12 files changed, 246 insertions(+), 4 deletions(-)
Quoted 1 line

--

I have no objection on this series, but just wondering my tree should be fine without 9/9 drm patch and it will be handled for 3.20?

I'll take 1 to 8 patches once drm patch is landed for 3.20.

- Kukjin

#16 lore raw

Hi,

Quoted 84 lines · Kukjin Kim
Quoted 83 lines · Marek Szyprowski

Hi all,

This is yet another update on patchset, which enables HDMI support for Exynos based platforms.

Beside DTS changes, this patchset adds parent domain support for Exynos PM domains and add support for 'hdmi' clock directly to Exynos DRM mixer driver.

The patchset is based on samsung/for-next branch and 'PM / Domains:
Export of_genpd_get_from_provider function' patch merged as commit 7496fcbe8a643097efc061160e1c3b65ee2fa350 to v3.19-rc4.

Regards
Marek Szyprowski

Changelog:

v5:
- fixed error value for clk_get() in mixer patch
- rebased onto samsung/for-next branch

v4: (http://www.spinics.net/lists/linux-samsung-soc/msg41375.html)
- added patches, which add 'hdmi' clock handling to mixed block, this finally solves the initialization related issues, thanks for Tobias Jakobi for testing
- added acks/reviewed/tested by tags

v3: (http://www.spinics.net/lists/linux-samsung-soc/msg41020.html)
- added a note on defining subdomains to generic PM domain binding documentation (requested by Ulf Hansson)

v2: (http://www.spinics.net/lists/linux-samsung-soc/msg40980.html)
- rewrote subdomains patch according to suggestions from Geert Uytterhoeven and Amit Daniel Kachhap.

v1 resend: (http://www.spinics.net/lists/linux-samsung-soc/msg39428.html)
- added handling of generic 'power-domains' binding in subdomains

v1: (http://www.spinics.net/lists/linux-samsung-soc/msg38914.html)
- resolved power domain on/off issue with 'clk: samsung: exynos4: set parent of mixer gate clock to hdmi' patch

v0: (http://www.spinics.net/lists/linux-samsung-soc/msg33498.html)
- first attempt, used 'always on' power domains hack

Patch summary:

*** BLURB HERE ***

Andrzej Hajda (1):
ARM: dts: exynos5250: add display power domain

Marek Szyprowski (7):
PM / Domains: Add a note about power domain subdomains
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
ARM: dts: Exynos: add 'hdmi' clock to mixer nodes drm/exynos: add support for 'hdmi' clock

Tomasz Stanislawski (1):
ARM: dts: exynos4210-universal_c210: enable hdmi support

 .../bindings/arm/exynos/power_domain.txt           |  2 +
 .../devicetree/bindings/power/power_domain.txt     | 29 +++++++++++
 .../devicetree/bindings/video/exynos_mixer.txt     |  1 +
 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                  | 15 +++++-
 arch/arm/boot/dts/exynos5420.dtsi                  |  5 +-
 arch/arm/mach-exynos/pm_domains.c                  | 28 +++++++++++
 drivers/gpu/drm/exynos/exynos_mixer.c              |  9 ++++
 12 files changed, 246 insertions(+), 4 deletions(-)
Quoted 6 lines
Quoted 1 line

--

I have no objection on this series, but just wondering my tree should be fine without 9/9 drm patch and it will be handled for 3.20?

I'll take 1 to 8 patches once drm patch is landed for 3.20.

I also hope this patchset merged,

Inki, could you follow up exynos drm part of this patchset?

Thanks.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw
Quoted 2 lines · Joonyoung Shim

Hi,

Hi,

Quoted 89 lines · Kukjin Kim
Quoted 88 lines
Quoted 83 lines · Marek Szyprowski

Hi all,

This is yet another update on patchset, which enables HDMI support for Exynos based platforms.

Beside DTS changes, this patchset adds parent domain support for Exynos PM domains and add support for 'hdmi' clock directly to Exynos DRM mixer driver.

The patchset is based on samsung/for-next branch and 'PM / Domains:
Export of_genpd_get_from_provider function' patch merged as commit 7496fcbe8a643097efc061160e1c3b65ee2fa350 to v3.19-rc4.

Regards
Marek Szyprowski

Changelog:

v5:
- fixed error value for clk_get() in mixer patch
- rebased onto samsung/for-next branch

v4: (http://www.spinics.net/lists/linux-samsung-soc/msg41375.html)
- added patches, which add 'hdmi' clock handling to mixed block, this finally solves the initialization related issues, thanks for Tobias Jakobi for testing
- added acks/reviewed/tested by tags

v3: (http://www.spinics.net/lists/linux-samsung-soc/msg41020.html)
- added a note on defining subdomains to generic PM domain binding documentation (requested by Ulf Hansson)

v2: (http://www.spinics.net/lists/linux-samsung-soc/msg40980.html)
- rewrote subdomains patch according to suggestions from Geert Uytterhoeven and Amit Daniel Kachhap.

v1 resend: (http://www.spinics.net/lists/linux-samsung-soc/msg39428.html)
- added handling of generic 'power-domains' binding in subdomains

v1: (http://www.spinics.net/lists/linux-samsung-soc/msg38914.html)
- resolved power domain on/off issue with 'clk: samsung: exynos4: set parent of mixer gate clock to hdmi' patch

v0: (http://www.spinics.net/lists/linux-samsung-soc/msg33498.html)
- first attempt, used 'always on' power domains hack

Patch summary:

*** BLURB HERE ***

Andrzej Hajda (1):
ARM: dts: exynos5250: add display power domain

Marek Szyprowski (7):
PM / Domains: Add a note about power domain subdomains
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
ARM: dts: Exynos: add 'hdmi' clock to mixer nodes drm/exynos: add support for 'hdmi' clock

Tomasz Stanislawski (1):
ARM: dts: exynos4210-universal_c210: enable hdmi support

 .../bindings/arm/exynos/power_domain.txt           |  2 +
 .../devicetree/bindings/power/power_domain.txt     | 29 +++++++++++
 .../devicetree/bindings/video/exynos_mixer.txt     |  1 +
 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                  | 15 +++++-
 arch/arm/boot/dts/exynos5420.dtsi                  |  5 +-
 arch/arm/mach-exynos/pm_domains.c                  | 28 +++++++++++
 drivers/gpu/drm/exynos/exynos_mixer.c              |  9 ++++
 12 files changed, 246 insertions(+), 4 deletions(-)
Quoted 1 line

--

I have no objection on this series, but just wondering my tree should be fine without 9/9 drm patch and it will be handled for 3.20?

Quoted 7 lines
Quoted 2 lines

I'll take 1 to 8 patches once drm patch is landed for 3.20.

I also hope this patchset merged,

Inki, could you follow up exynos drm part of this patchset?

I checked and I'll apply 1 to 8 patches in samsung tree.

Thanks,
Kukjin