All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] Enable HDMI support on Exynos platforms
@ 2015-01-14 13:44 ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, Kukjin Kim, Tobias Jakobi, Daniel Drake,
	Andrzej Hajda, Inki Dae, Tomasz Figa, kyungmin.park,
	Pankaj Dubey, Amit Daniel Kachhap, Geert Uytterhoeven,
	Ulf Hansson

Hi all,

This is yet another approach to submit patches, which enables HDMI
support for two Exynos based platforms: UniversalC210 and Odroid X2/U3.

Beside DTS changes, this patchset adds parent domain support for Exynos
PM domains. This was the most controversial patch in the previous
attempts, but I hope I fixes all reported issues and made it really
generic. For more details see individual patches.

The patchset is based on my previous patch:
'ARM: DTS: Exynos: convert to generic power domain bindings'
(http://www.spinics.net/lists/linux-samsung-soc/msg40584.html)
and requires 2 patches that have been merged to v3.19-rc4:
'clk: samsung: exynos4: set parent of sclk_hdmiphy to hdmi'
(commit df019a5c0f7083001cb694f44821ca506425bda2) and
'PM / Domains: Export of_genpd_get_from_provider function'
(commit 7496fcbe8a643097efc061160e1c3b65ee2fa350).

Regards
Marek Szyprowski


Changelog:

v3:
- 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:

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

Marek Szyprowski (5):
  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

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 +++++++++++
 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                  | 10 ++++
 arch/arm/mach-exynos/pm_domains.c                  | 28 +++++++++++
 9 files changed, 230 insertions(+)

-- 
1.9.2

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 0/7] Enable HDMI support on Exynos platforms
@ 2015-01-14 13:44 ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

This is yet another approach to submit patches, which enables HDMI
support for two Exynos based platforms: UniversalC210 and Odroid X2/U3.

Beside DTS changes, this patchset adds parent domain support for Exynos
PM domains. This was the most controversial patch in the previous
attempts, but I hope I fixes all reported issues and made it really
generic. For more details see individual patches.

The patchset is based on my previous patch:
'ARM: DTS: Exynos: convert to generic power domain bindings'
(http://www.spinics.net/lists/linux-samsung-soc/msg40584.html)
and requires 2 patches that have been merged to v3.19-rc4:
'clk: samsung: exynos4: set parent of sclk_hdmiphy to hdmi'
(commit df019a5c0f7083001cb694f44821ca506425bda2) and
'PM / Domains: Export of_genpd_get_from_provider function'
(commit 7496fcbe8a643097efc061160e1c3b65ee2fa350).

Regards
Marek Szyprowski


Changelog:

v3:
- 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:

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

Marek Szyprowski (5):
  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

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 +++++++++++
 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                  | 10 ++++
 arch/arm/mach-exynos/pm_domains.c                  | 28 +++++++++++
 9 files changed, 230 insertions(+)

-- 
1.9.2

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 1/7] PM / Domains: Add a note about power domain subdomains
  2015-01-14 13:44 ` Marek Szyprowski
@ 2015-01-14 13:44   ` Marek Szyprowski
  -1 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, Kukjin Kim, Tobias Jakobi, Daniel Drake,
	Andrzej Hajda, Inki Dae, Tomasz Figa, kyungmin.park,
	Pankaj Dubey, Amit Daniel Kachhap, Geert Uytterhoeven,
	Ulf Hansson, devicetree

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.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 .../devicetree/bindings/power/power_domain.txt     | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
index 98c1667..eeea45b 100644
--- a/Documentation/devicetree/bindings/power/power_domain.txt
+++ b/Documentation/devicetree/bindings/power/power_domain.txt
@@ -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 other power domain (or have
+   other hardware specific dependency). For representing such dependency
+   a standard PM domain consumer binging is used. When provided, all domains
+   created by the given provider should be a subdomain of the domain
+   specified by this binding. More details about power domain specifier is
+   available in the 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 defines two power controllers: 'parent' and 'child'.
+Domains created by 'child' power controller are subdomains of '0' power
+domain provided by 'parent' power controller.
+
 ==PM domain consumers==
 
 Required properties:
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 1/7] PM / Domains: Add a note about power domain subdomains
@ 2015-01-14 13:44   ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 .../devicetree/bindings/power/power_domain.txt     | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
index 98c1667..eeea45b 100644
--- a/Documentation/devicetree/bindings/power/power_domain.txt
+++ b/Documentation/devicetree/bindings/power/power_domain.txt
@@ -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 other power domain (or have
+   other hardware specific dependency). For representing such dependency
+   a standard PM domain consumer binging is used. When provided, all domains
+   created by the given provider should be a subdomain of the domain
+   specified by this binding. More details about power domain specifier is
+   available in the the next section.
+
 Example:
 
 	power: power-controller at 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 at 12340000 {
+		compatible = "foo,power-controller";
+		reg = <0x12340000 0x1000>;
+		#power-domain-cells = <1>;
+	};
+
+	child: power-controller at 12340000 {
+		compatible = "foo,power-controller";
+		reg = <0x12341000 0x1000>;
+		power-domains = <&parent 0>;
+		#power-domain-cells = <1>;
+	};
+
+The nodes above defines two power controllers: 'parent' and 'child'.
+Domains created by 'child' power controller are subdomains of '0' power
+domain provided by 'parent' power controller.
+
 ==PM domain consumers==
 
 Required properties:
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 2/7] ARM: Exynos: add support for sub-power domains
  2015-01-14 13:44 ` Marek Szyprowski
@ 2015-01-14 13:44   ` Marek Szyprowski
  -1 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, Kukjin Kim, Tobias Jakobi, Daniel Drake,
	Andrzej Hajda, Inki Dae, Tomasz Figa, kyungmin.park

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 <amit.daniel@samsung.com>.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 .../bindings/arm/exynos/power_domain.txt           |  2 ++
 arch/arm/mach-exynos/pm_domains.c                  | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
index f4445e5..1e09703 100644
--- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
+++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
@@ -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.
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 20f2671..37266a8 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -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);
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 2/7] ARM: Exynos: add support for sub-power domains
@ 2015-01-14 13:44   ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

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 <amit.daniel@samsung.com>.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 .../bindings/arm/exynos/power_domain.txt           |  2 ++
 arch/arm/mach-exynos/pm_domains.c                  | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
index f4445e5..1e09703 100644
--- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
+++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
@@ -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.
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 20f2671..37266a8 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -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);
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 3/7] ARM: dts: exynos4: add hdmi related nodes
  2015-01-14 13:44 ` Marek Szyprowski
@ 2015-01-14 13:44   ` Marek Szyprowski
  -1 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, Kukjin Kim, Tobias Jakobi, Daniel Drake,
	Andrzej Hajda, Inki Dae, Tomasz Figa, kyungmin.park

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 <m.szyprowski@samsung.com>
---
 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(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index c5dc2ef..d951647 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -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";
+	};
 };
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi
index 6728aaa..fc17cdf 100644
--- a/arch/arm/boot/dts/exynos4210.dtsi
+++ b/arch/arm/boot/dts/exynos4210.dtsi
@@ -193,4 +193,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>;
+	};
 };
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi
index da8734e..e577bd0 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -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", "sclk_hdmi", "vp";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>,
+			<&clock CLK_VP>;
+	};
 };
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 3/7] ARM: dts: exynos4: add hdmi related nodes
@ 2015-01-14 13:44   ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

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 <m.szyprowski@samsung.com>
---
 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(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index c5dc2ef..d951647 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -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 at 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 at 38 {
+			compatible = "exynos4210-hdmiphy";
+			reg = <0x38>;
+		};
+	};
+
 	spi_0: spi at 13920000 {
 		compatible = "samsung,exynos4210-spi";
 		reg = <0x13920000 0x100>;
@@ -652,4 +669,27 @@
 		samsung,sysreg = <&sys_reg>;
 		status = "disabled";
 	};
+
+	hdmi: hdmi at 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 at 12C10000 {
+		compatible = "samsung,exynos4210-mixer";
+		interrupts = <0 91 0>;
+		reg = <0x12C10000 0x2100>, <0x12c00000 0x300>;
+		power-domains = <&pd_tv>;
+		status = "disabled";
+	};
 };
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi
index 6728aaa..fc17cdf 100644
--- a/arch/arm/boot/dts/exynos4210.dtsi
+++ b/arch/arm/boot/dts/exynos4210.dtsi
@@ -193,4 +193,12 @@
 			samsung,lcd-wb;
 		};
 	};
+
+	mixer: mixer at 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>;
+	};
 };
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi
index da8734e..e577bd0 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -283,4 +283,15 @@
 		clock-names = "tmu_apbif";
 		status = "disabled";
 	};
+
+	hdmi: hdmi at 12D00000 {
+		compatible = "samsung,exynos4212-hdmi";
+	};
+
+	mixer: mixer at 12C10000 {
+		compatible = "samsung,exynos4212-mixer";
+		clock-names = "mixer", "sclk_hdmi", "vp";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>,
+			<&clock CLK_VP>;
+	};
 };
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 4/7] ARM: dts: exynos4: add dependency between TV and LCD0 power domains
  2015-01-14 13:44 ` Marek Szyprowski
@ 2015-01-14 13:44   ` Marek Szyprowski
  -1 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, Kukjin Kim, Tobias Jakobi, Daniel Drake,
	Andrzej Hajda, Inki Dae, Tomasz Figa, kyungmin.park

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.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos4.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index d951647..a59b3fae 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -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 {
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 4/7] ARM: dts: exynos4: add dependency between TV and LCD0 power domains
@ 2015-01-14 13:44   ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos4.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index d951647..a59b3fae 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -101,6 +101,7 @@
 		compatible = "samsung,exynos4210-pd";
 		reg = <0x10023C20 0x20>;
 		#power-domain-cells = <0>;
+		power-domains = <&pd_lcd0>;
 	};
 
 	pd_cam: cam-power-domain at 10023C00 {
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 5/7] ARM: dts: exynos4412-odroid: enable hdmi support
  2015-01-14 13:44 ` Marek Szyprowski
@ 2015-01-14 13:44   ` Marek Szyprowski
  -1 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, Kukjin Kim, Tobias Jakobi, Daniel Drake,
	Andrzej Hajda, Inki Dae, Tomasz Figa, kyungmin.park

This patch adds nodes specific to Exynos4412 based Odroid X/X2/U2/U3
boards required for enabling HDMI display.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 44 +++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
index 3fbf588..e10efa8 100644
--- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
@@ -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>;
@@ -389,6 +403,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 {
@@ -403,4 +442,9 @@
 		samsung,pin-pud = <0>;
 		samsung,pin-drv = <0>;
 	};
+
+	hdmi_hpd: hdmi-hpd {
+		samsung,pins = "gpx3-7";
+		samsung,pin-pud = <1>;
+	};
 };
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 5/7] ARM: dts: exynos4412-odroid: enable hdmi support
@ 2015-01-14 13:44   ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds nodes specific to Exynos4412 based Odroid X/X2/U2/U3
boards required for enabling HDMI display.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 44 +++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
index 3fbf588..e10efa8 100644
--- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
@@ -231,6 +231,20 @@
 					regulator-always-on;
 				};
 
+				ldo8_reg: ldo at 8 {
+					regulator-compatible = "LDO8";
+					regulator-name = "VDD10_HDMI_1.0V";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+				};
+
+				ldo10_reg: ldo at 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>;
@@ -389,6 +403,31 @@
 	ehci: ehci at 12580000 {
 		status = "okay";
 	};
+
+	mixer: mixer at 12C10000 {
+		status = "okay";
+	};
+
+	hdmi at 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 at 13880000 {
+		status = "okay";
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2c2_bus>;
+	};
+
+	i2c at 138E0000 {
+		status = "okay";
+	};
 };
 
 &pinctrl_1 {
@@ -403,4 +442,9 @@
 		samsung,pin-pud = <0>;
 		samsung,pin-drv = <0>;
 	};
+
+	hdmi_hpd: hdmi-hpd {
+		samsung,pins = "gpx3-7";
+		samsung,pin-pud = <1>;
+	};
 };
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 6/7] ARM: dts: exynos4210-universal_c210: enable hdmi support
  2015-01-14 13:44 ` Marek Szyprowski
@ 2015-01-14 13:44   ` Marek Szyprowski
  -1 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, Kukjin Kim, Tobias Jakobi, Daniel Drake,
	Andrzej Hajda, Inki Dae, Tomasz Figa, kyungmin.park

From: Tomasz Stanislawski <t.stanislaws@samsung.com>

This patch adds configuration of hw modules required to enable HDMI
support on Universal C210 board.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos4210-universal_c210.dts | 57 +++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
index aaf0cae..01f7d3c 100644
--- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
+++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
@@ -503,6 +503,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 {
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 6/7] ARM: dts: exynos4210-universal_c210: enable hdmi support
@ 2015-01-14 13:44   ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Tomasz Stanislawski <t.stanislaws@samsung.com>

This patch adds configuration of hw modules required to enable HDMI
support on Universal C210 board.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos4210-universal_c210.dts | 57 +++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
index aaf0cae..01f7d3c 100644
--- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
+++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
@@ -503,6 +503,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 at 12C10000 {
+		status = "okay";
+	};
+
+	hdmi at 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 at 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 {
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 7/7] ARM: dts: exynos5250: add display power domain
  2015-01-14 13:44 ` Marek Szyprowski
@ 2015-01-14 13:44   ` Marek Szyprowski
  -1 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, Kukjin Kim, Tobias Jakobi, Daniel Drake,
	Andrzej Hajda, Inki Dae, Tomasz Figa, kyungmin.park

From: Andrzej Hajda <a.hajda@samsung.com>

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

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
[mszyprow: rebased onto generic power domains dt bindings]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos5250.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 2b5a62c..cf4a6ec 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -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_SCLK_HDMI>;
 		clock-names = "mixer", "sclk_hdmi";
@@ -743,6 +751,7 @@
 	};
 
 	dp: dp-controller@145B0000 {
+		power-domains = <&pd_disp1>;
 		clocks = <&clock CLK_DP>;
 		clock-names = "dp";
 		phys = <&dp_phy>;
@@ -750,6 +759,7 @@
 	};
 
 	fimd: fimd@14400000 {
+		power-domains = <&pd_disp1>;
 		clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>;
 		clock-names = "sclk_fimd", "fimd";
 	};
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 7/7] ARM: dts: exynos5250: add display power domain
@ 2015-01-14 13:44   ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Andrzej Hajda <a.hajda@samsung.com>

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

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
[mszyprow: rebased onto generic power domains dt bindings]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos5250.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 2b5a62c..cf4a6ec 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -102,6 +102,12 @@
 		#power-domain-cells = <0>;
 	};
 
+	pd_disp1: disp1-power-domain at 100440A0 {
+		compatible = "samsung,exynos4210-pd";
+		reg = <0x100440A0 0x20>;
+		#power-domain-cells = <0>;
+	};
+
 	clock: clock-controller at 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_SCLK_HDMI>;
 		clock-names = "mixer", "sclk_hdmi";
@@ -743,6 +751,7 @@
 	};
 
 	dp: dp-controller at 145B0000 {
+		power-domains = <&pd_disp1>;
 		clocks = <&clock CLK_DP>;
 		clock-names = "dp";
 		phys = <&dp_phy>;
@@ -750,6 +759,7 @@
 	};
 
 	fimd: fimd at 14400000 {
+		power-domains = <&pd_disp1>;
 		clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>;
 		clock-names = "sclk_fimd", "fimd";
 	};
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 1/7] PM / Domains: Add a note about power domain subdomains
  2015-01-14 13:44   ` Marek Szyprowski
@ 2015-01-14 13:55     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 30+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 13:55 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-arm-kernel, linux-samsung-soc, Kukjin Kim, Tobias Jakobi,
	Daniel Drake, Andrzej Hajda, Inki Dae, Tomasz Figa,
	Kyungmin Park, Pankaj Dubey, Amit Daniel Kachhap, Ulf Hansson,
	devicetree

Hi Marek,

On Wed, Jan 14, 2015 at 2:44 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> 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.

Thanks!

> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  .../devicetree/bindings/power/power_domain.txt     | 29 ++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
> index 98c1667..eeea45b 100644
> --- a/Documentation/devicetree/bindings/power/power_domain.txt
> +++ b/Documentation/devicetree/bindings/power/power_domain.txt
> @@ -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 other power domain (or have

s/other/another/

> +   other hardware specific dependency). For representing such dependency

s/dependency/dependencies/ (twice)

> +   a standard PM domain consumer binging is used. When provided, all domains

binding

> +   created by the given provider should be a subdomain of the domain

s/a subdomain/subdomains/

> +   specified by this binding. More details about power domain specifier is

s/is/are/

> +   available in the the next section.

duplicate "the"

> +
>  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 defines two power controllers: 'parent' and 'child'.

s/defines/define/

> +Domains created by 'child' power controller are subdomains of '0' power

the 'child' power controller

> +domain provided by 'parent' power controller.

the 'parent' power controller.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 1/7] PM / Domains: Add a note about power domain subdomains
@ 2015-01-14 13:55     ` Geert Uytterhoeven
  0 siblings, 0 replies; 30+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 13:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Marek,

On Wed, Jan 14, 2015 at 2:44 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> 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.

Thanks!

> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  .../devicetree/bindings/power/power_domain.txt     | 29 ++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
> index 98c1667..eeea45b 100644
> --- a/Documentation/devicetree/bindings/power/power_domain.txt
> +++ b/Documentation/devicetree/bindings/power/power_domain.txt
> @@ -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 other power domain (or have

s/other/another/

> +   other hardware specific dependency). For representing such dependency

s/dependency/dependencies/ (twice)

> +   a standard PM domain consumer binging is used. When provided, all domains

binding

> +   created by the given provider should be a subdomain of the domain

s/a subdomain/subdomains/

> +   specified by this binding. More details about power domain specifier is

s/is/are/

> +   available in the the next section.

duplicate "the"

> +
>  Example:
>
>         power: power-controller at 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 at 12340000 {
> +               compatible = "foo,power-controller";
> +               reg = <0x12340000 0x1000>;
> +               #power-domain-cells = <1>;
> +       };
> +
> +       child: power-controller at 12340000 {
> +               compatible = "foo,power-controller";
> +               reg = <0x12341000 0x1000>;
> +               power-domains = <&parent 0>;
> +               #power-domain-cells = <1>;
> +       };
> +
> +The nodes above defines two power controllers: 'parent' and 'child'.

s/defines/define/

> +Domains created by 'child' power controller are subdomains of '0' power

the 'child' power controller

> +domain provided by 'parent' power controller.

the 'parent' power controller.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 1/7 RESEND] PM / Domains: Add a note about power domain subdomains
  2015-01-14 13:44   ` Marek Szyprowski
@ 2015-01-14 14:12     ` Marek Szyprowski
  -1 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 14:12 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, Kukjin Kim, Tobias Jakobi, Daniel Drake,
	Andrzej Hajda, Inki Dae, Tomasz Figa, kyungmin.park,
	Pankaj Dubey, Amit Daniel Kachhap, Geert Uytterhoeven,
	Ulf Hansson, devicetree

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.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
RESEND version:
- fixed spelling mistakes, thanks go to Geert!
---
 .../devicetree/bindings/power/power_domain.txt     | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
index 98c1667..eeea45b 100644
--- a/Documentation/devicetree/bindings/power/power_domain.txt
+++ b/Documentation/devicetree/bindings/power/power_domain.txt
@@ -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:
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 1/7 RESEND] PM / Domains: Add a note about power domain subdomains
@ 2015-01-14 14:12     ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-14 14:12 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
RESEND version:
- fixed spelling mistakes, thanks go to Geert!
---
 .../devicetree/bindings/power/power_domain.txt     | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
index 98c1667..eeea45b 100644
--- a/Documentation/devicetree/bindings/power/power_domain.txt
+++ b/Documentation/devicetree/bindings/power/power_domain.txt
@@ -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 at 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 at 12340000 {
+		compatible = "foo,power-controller";
+		reg = <0x12340000 0x1000>;
+		#power-domain-cells = <1>;
+	};
+
+	child: power-controller at 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:
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 1/7 RESEND] PM / Domains: Add a note about power domain subdomains
  2015-01-14 14:12     ` Marek Szyprowski
@ 2015-01-14 14:19       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 30+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 14:19 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-arm-kernel, linux-samsung-soc, Kukjin Kim, Tobias Jakobi,
	Daniel Drake, Andrzej Hajda, Inki Dae, Tomasz Figa,
	Kyungmin Park, Pankaj Dubey, Amit Daniel Kachhap, Ulf Hansson,
	devicetree

On Wed, Jan 14, 2015 at 3:12 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> 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.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 1/7 RESEND] PM / Domains: Add a note about power domain subdomains
@ 2015-01-14 14:19       ` Geert Uytterhoeven
  0 siblings, 0 replies; 30+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 14:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 14, 2015 at 3:12 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> 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.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 1/7 RESEND] PM / Domains: Add a note about power domain subdomains
  2015-01-14 14:12     ` Marek Szyprowski
@ 2015-01-14 15:09       ` Ulf Hansson
  -1 siblings, 0 replies; 30+ messages in thread
From: Ulf Hansson @ 2015-01-14 15:09 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-arm-kernel, linux-samsung-soc, Kukjin Kim, Tobias Jakobi,
	Daniel Drake, Andrzej Hajda, Inki Dae, Tomasz Figa,
	Kyungmin Park, Pankaj Dubey, Amit Daniel Kachhap,
	Geert Uytterhoeven, devicetree

On 14 January 2015 at 15:12, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> 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.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

> ---
> RESEND version:
> - fixed spelling mistakes, thanks go to Geert!
> ---
>  .../devicetree/bindings/power/power_domain.txt     | 29 ++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
> index 98c1667..eeea45b 100644
> --- a/Documentation/devicetree/bindings/power/power_domain.txt
> +++ b/Documentation/devicetree/bindings/power/power_domain.txt
> @@ -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:
> --
> 1.9.2
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 1/7 RESEND] PM / Domains: Add a note about power domain subdomains
@ 2015-01-14 15:09       ` Ulf Hansson
  0 siblings, 0 replies; 30+ messages in thread
From: Ulf Hansson @ 2015-01-14 15:09 UTC (permalink / raw)
  To: linux-arm-kernel

On 14 January 2015 at 15:12, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> 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.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

> ---
> RESEND version:
> - fixed spelling mistakes, thanks go to Geert!
> ---
>  .../devicetree/bindings/power/power_domain.txt     | 29 ++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
> index 98c1667..eeea45b 100644
> --- a/Documentation/devicetree/bindings/power/power_domain.txt
> +++ b/Documentation/devicetree/bindings/power/power_domain.txt
> @@ -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 at 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 at 12340000 {
> +               compatible = "foo,power-controller";
> +               reg = <0x12340000 0x1000>;
> +               #power-domain-cells = <1>;
> +       };
> +
> +       child: power-controller at 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:
> --
> 1.9.2
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 2/7] ARM: Exynos: add support for sub-power domains
  2015-01-14 13:44   ` Marek Szyprowski
@ 2015-01-15  9:52     ` Marek Szyprowski
  -1 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-15  9:52 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc
  Cc: Kukjin Kim, Tobias Jakobi, Daniel Drake, Andrzej Hajda, Inki Dae,
	Tomasz Figa, kyungmin.park, Ulf Hansson, Geert Uytterhoeven,
	Amit Daniel Kachhap

Hello All,

I'm sorry for missing some CC: in this patch, when I posted v3 to 
mailing list.
It looks that CC: lines got lost after git am + git format-patch.

Ulf, could you also ack this patch, so Kukjin can finally merge the whole
series to Samsung kernel tree?


On 2015-01-14 14:44, Marek Szyprowski wrote:
> 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 <amit.daniel@samsung.com>.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>   .../bindings/arm/exynos/power_domain.txt           |  2 ++
>   arch/arm/mach-exynos/pm_domains.c                  | 28 ++++++++++++++++++++++
>   2 files changed, 30 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> index f4445e5..1e09703 100644
> --- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> +++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> @@ -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.
> diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
> index 20f2671..37266a8 100644
> --- a/arch/arm/mach-exynos/pm_domains.c
> +++ b/arch/arm/mach-exynos/pm_domains.c
> @@ -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);

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 2/7] ARM: Exynos: add support for sub-power domains
@ 2015-01-15  9:52     ` Marek Szyprowski
  0 siblings, 0 replies; 30+ messages in thread
From: Marek Szyprowski @ 2015-01-15  9:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hello All,

I'm sorry for missing some CC: in this patch, when I posted v3 to 
mailing list.
It looks that CC: lines got lost after git am + git format-patch.

Ulf, could you also ack this patch, so Kukjin can finally merge the whole
series to Samsung kernel tree?


On 2015-01-14 14:44, Marek Szyprowski wrote:
> 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 <amit.daniel@samsung.com>.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>   .../bindings/arm/exynos/power_domain.txt           |  2 ++
>   arch/arm/mach-exynos/pm_domains.c                  | 28 ++++++++++++++++++++++
>   2 files changed, 30 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> index f4445e5..1e09703 100644
> --- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> +++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> @@ -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.
> diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
> index 20f2671..37266a8 100644
> --- a/arch/arm/mach-exynos/pm_domains.c
> +++ b/arch/arm/mach-exynos/pm_domains.c
> @@ -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);

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 2/7] ARM: Exynos: add support for sub-power domains
  2015-01-14 13:44   ` Marek Szyprowski
@ 2015-01-16 12:47     ` Ulf Hansson
  -1 siblings, 0 replies; 30+ messages in thread
From: Ulf Hansson @ 2015-01-16 12:47 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-arm-kernel, linux-samsung-soc, Tobias Jakobi, Tomasz Figa,
	Daniel Drake, Inki Dae, Andrzej Hajda, Kyungmin Park, Kukjin Kim

On 14 January 2015 at 14:44, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> 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 <amit.daniel@samsung.com>
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

I also had a look at the other patches in this patchset from a PM
domain DT point of view. They looks good.

Kind regards
Uffe

> ---
>  .../bindings/arm/exynos/power_domain.txt           |  2 ++
>  arch/arm/mach-exynos/pm_domains.c                  | 28 ++++++++++++++++++++++
>  2 files changed, 30 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> index f4445e5..1e09703 100644
> --- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> +++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> @@ -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.
> diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
> index 20f2671..37266a8 100644
> --- a/arch/arm/mach-exynos/pm_domains.c
> +++ b/arch/arm/mach-exynos/pm_domains.c
> @@ -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);
> --
> 1.9.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 2/7] ARM: Exynos: add support for sub-power domains
@ 2015-01-16 12:47     ` Ulf Hansson
  0 siblings, 0 replies; 30+ messages in thread
From: Ulf Hansson @ 2015-01-16 12:47 UTC (permalink / raw)
  To: linux-arm-kernel

On 14 January 2015 at 14:44, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> 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 <amit.daniel@samsung.com>
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

I also had a look at the other patches in this patchset from a PM
domain DT point of view. They looks good.

Kind regards
Uffe

> ---
>  .../bindings/arm/exynos/power_domain.txt           |  2 ++
>  arch/arm/mach-exynos/pm_domains.c                  | 28 ++++++++++++++++++++++
>  2 files changed, 30 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> index f4445e5..1e09703 100644
> --- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> +++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
> @@ -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.
> diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
> index 20f2671..37266a8 100644
> --- a/arch/arm/mach-exynos/pm_domains.c
> +++ b/arch/arm/mach-exynos/pm_domains.c
> @@ -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);
> --
> 1.9.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 7/7] ARM: dts: exynos5250: add display power domain
  2015-01-14 13:44   ` Marek Szyprowski
@ 2015-01-19 17:26     ` Javier Martinez Canillas
  -1 siblings, 0 replies; 30+ messages in thread
From: Javier Martinez Canillas @ 2015-01-19 17:26 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-arm-kernel, linux-samsung-soc, Kukjin Kim, Tobias Jakobi,
	Daniel Drake, Andrzej Hajda, Inki Dae, Tomasz Figa,
	Kyungmin Park

Hello Marek and Andrzej,

On Wed, Jan 14, 2015 at 2:44 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> From: Andrzej Hajda <a.hajda@samsung.com>
>
> The patch adds domain definition and references to it in appropriate devices.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> [mszyprow: rebased onto generic power domains dt bindings]
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  arch/arm/boot/dts/exynos5250.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)

This patch makes HDMI to work on my Exynos5250 Snow Chromebook:

Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Best regards,
Javier

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 7/7] ARM: dts: exynos5250: add display power domain
@ 2015-01-19 17:26     ` Javier Martinez Canillas
  0 siblings, 0 replies; 30+ messages in thread
From: Javier Martinez Canillas @ 2015-01-19 17:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Marek and Andrzej,

On Wed, Jan 14, 2015 at 2:44 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> From: Andrzej Hajda <a.hajda@samsung.com>
>
> The patch adds domain definition and references to it in appropriate devices.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> [mszyprow: rebased onto generic power domains dt bindings]
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  arch/arm/boot/dts/exynos5250.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)

This patch makes HDMI to work on my Exynos5250 Snow Chromebook:

Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Best regards,
Javier

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2015-01-19 17:26 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-14 13:44 [PATCH v3 0/7] Enable HDMI support on Exynos platforms Marek Szyprowski
2015-01-14 13:44 ` Marek Szyprowski
2015-01-14 13:44 ` [PATCH v3 1/7] PM / Domains: Add a note about power domain subdomains Marek Szyprowski
2015-01-14 13:44   ` Marek Szyprowski
2015-01-14 13:55   ` Geert Uytterhoeven
2015-01-14 13:55     ` Geert Uytterhoeven
2015-01-14 14:12   ` [PATCH v3 1/7 RESEND] " Marek Szyprowski
2015-01-14 14:12     ` Marek Szyprowski
2015-01-14 14:19     ` Geert Uytterhoeven
2015-01-14 14:19       ` Geert Uytterhoeven
2015-01-14 15:09     ` Ulf Hansson
2015-01-14 15:09       ` Ulf Hansson
2015-01-14 13:44 ` [PATCH v3 2/7] ARM: Exynos: add support for sub-power domains Marek Szyprowski
2015-01-14 13:44   ` Marek Szyprowski
2015-01-15  9:52   ` Marek Szyprowski
2015-01-15  9:52     ` Marek Szyprowski
2015-01-16 12:47   ` Ulf Hansson
2015-01-16 12:47     ` Ulf Hansson
2015-01-14 13:44 ` [PATCH v3 3/7] ARM: dts: exynos4: add hdmi related nodes Marek Szyprowski
2015-01-14 13:44   ` Marek Szyprowski
2015-01-14 13:44 ` [PATCH v3 4/7] ARM: dts: exynos4: add dependency between TV and LCD0 power domains Marek Szyprowski
2015-01-14 13:44   ` Marek Szyprowski
2015-01-14 13:44 ` [PATCH v3 5/7] ARM: dts: exynos4412-odroid: enable hdmi support Marek Szyprowski
2015-01-14 13:44   ` Marek Szyprowski
2015-01-14 13:44 ` [PATCH v3 6/7] ARM: dts: exynos4210-universal_c210: " Marek Szyprowski
2015-01-14 13:44   ` Marek Szyprowski
2015-01-14 13:44 ` [PATCH v3 7/7] ARM: dts: exynos5250: add display power domain Marek Szyprowski
2015-01-14 13:44   ` Marek Szyprowski
2015-01-19 17:26   ` Javier Martinez Canillas
2015-01-19 17:26     ` Javier Martinez Canillas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.