Skip to contentSkip to conversation

Enable HDMI support on Exynos platforms

PATCH RESEND In review Andrzej Hajda 7 participants 17 messages Nov 24, 2014 – Jan 2, 2015

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

cover Enable HDMI support on Exynos platforms

Hi Kukjin,

In this resend I have added missing Signed-Offs, thanks for pointing it out.

This set of patches enables HDMI support for two Exynos based platforms:
UniversalC210 and Odroid.
Beside DTS changes patchset adds parent domain support for Exynos PM domains and small but critical change in mixer clock. For details see individual patches.

The patchset is based on v3.18-rc4.

Regards
Andrzej

Andrzej Hajda (2):
clk: samsung: exynos4: set parent of sclk_hdmiphy to hdmi
ARM: dts: exynos5250: add display power domain

Marek Szyprowski (4):
ARM: Exynos: add support for sub-power domains
ARM: dts: exynos4: add hdmi related nodes
ARM: dts: exynos4: add dependency between TV and LCD0 power domains
ARM: dts: exynos4412-odroid: enable hdmi support

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

 .../bindings/arm/exynos/power_domain.txt           |  2 +
 arch/arm/boot/dts/exynos4.dtsi                     | 41 ++++++++++++++++
 arch/arm/boot/dts/exynos4210-universal_c210.dts    | 57 ++++++++++++++++++++++
 arch/arm/boot/dts/exynos4210.dtsi                  |  8 +++
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi    | 44 +++++++++++++++++
 arch/arm/boot/dts/exynos4x12.dtsi                  | 11 +++++
 arch/arm/boot/dts/exynos5250.dtsi                  |  9 ++++
 arch/arm/mach-exynos/pm_domains.c                  |  9 +++-
 drivers/clk/samsung/clk-exynos4.c                  |  2 +-
 9 files changed, 181 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH RESEND 1/7 clk: samsung: exynos4: set parent of sclk_hdmiphy to hdmi

sclk_hdmiphy clock is generated by HDMI-PHY and depends on hdmi gate clock. The patch models this dependency using parent/child hirerarchy.

The patch fixes issue with system hangs during mixer device access, mixer uses sclk_hdmiphy descendant clock.

---

---
 drivers/clk/samsung/clk-exynos4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/samsung/clk-exynos4.c +1 -1
index 940f028..88e8c6b 100644
@@ -505,7 +505,7 @@ static struct samsung_fixed_rate_clock exynos4_fixed_rate_ext_clks[] __initdata
 /* fixed rate clocks generated inside the soc */
 static struct samsung_fixed_rate_clock exynos4_fixed_rate_clks[] __initdata = {
 	FRATE(0, "sclk_hdmi24m", NULL, CLK_IS_ROOT, 24000000),
-	FRATE(CLK_SCLK_HDMIPHY, "sclk_hdmiphy", NULL, CLK_IS_ROOT, 27000000),
+	FRATE(CLK_SCLK_HDMIPHY, "sclk_hdmiphy", "hdmi", 0, 27000000),
 	FRATE(0, "sclk_usbphy0", NULL, CLK_IS_ROOT, 48000000),
 };
 
Signature · 1 line
1.9.1
maintainer Acked-by on v1 1/7
#2 lore raw

Re: [PATCH RESEND 1/7] clk: samsung: exynos4: set parent of sclk_hdmiphy to hdmi

Quoted 7 lines · Andrzej Hajda

sclk_hdmiphy clock is generated by HDMI-PHY and depends on hdmi gate clock. The patch models this dependency using parent/child hirerarchy.

The patch fixes issue with system hangs during mixer device access, mixer uses sclk_hdmiphy descendant clock.

I guess it can be merged as a bug fix, however it's not an ideal solution. The proper approach would be probably to have the HDMIPHY driver exposing a clk object. Unfortunately there seems to be no sufficiently documented hardware control sequences available for such a fine-grained hardware control.

Quoted 16 lines
---
 drivers/clk/samsung/clk-exynos4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/samsung/clk-exynos4.c +1 -1
index 940f028..88e8c6b 100644
@@ -505,7 +505,7 @@ static struct samsung_fixed_rate_clock exynos4_fixed_rate_ext_clks[] __initdata
 /* fixed rate clocks generated inside the soc */
 static struct samsung_fixed_rate_clock exynos4_fixed_rate_clks[] __initdata = {
 	FRATE(0, "sclk_hdmi24m", NULL, CLK_IS_ROOT, 24000000),
-	FRATE(CLK_SCLK_HDMIPHY, "sclk_hdmiphy", NULL, CLK_IS_ROOT, 27000000),
+	FRATE(CLK_SCLK_HDMIPHY, "sclk_hdmiphy", "hdmi", 0, 27000000),
 	FRATE(0, "sclk_usbphy0", NULL, CLK_IS_ROOT, 48000000),
 };
Signature · 2 lines
Regards,
Sylwester
#3 lore raw

PATCH RESEND 2/7 ARM: Exynos: add support for sub-power domains

In reply to Andrzej Hajda

From: Marek Szyprowski <[email protected]>

This patch adds support for making one power domain a sub-domain of other domain. This is useful for modeling power dependences for devices like TV Mixer or Camera ISP, which needs to have more than one power domain enabled to be operational.

---
 Documentation/devicetree/bindings/arm/exynos/power_domain.txt | 2 ++
 arch/arm/mach-exynos/pm_domains.c                             | 9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +2 -0
index abde1ea..cad9476 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-domain-master: phandle to a master power domain that the given domain
+		       is a part of
 
 Node of a device using power domains must have a samsung,power-domain property
 defined with a phandle to respective power domain.
arch/arm/mach-exynos/pm_domains.c +8 -1
index 20f2671..373ac62 100644
@@ -108,7 +108,7 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
 static __init int exynos4_pm_init_power_domain(void)
 {
 	struct platform_device *pdev;
-	struct device_node *np;
+	struct device_node *np, *master_np;
 
 	for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
 		struct exynos_pm_domain *pd;
@@ -159,6 +159,13 @@ no_clk:
 
 		pm_genpd_init(&pd->pd, NULL, !on);
 		of_genpd_add_provider_simple(np, &pd->pd);
+
+		/* make master and slave hierarchy */
+		master_np = of_parse_phandle(np, "power-domain-master", 0);
+		if (master_np) {
+			pm_genpd_add_subdomain_names(master_np->name, np->name);
+			of_node_put(master_np);
+		}
 	}
 
 	return 0;
Signature · 1 line
1.9.1
#4 lore raw

Re: [RESEND,2/7] ARM: Exynos: add support for sub-power domains

+CC: Amit Daniel Kachhap

Hi Andrzej,

Quoted 20 lines · Andrzej Hajda

From: Marek Szyprowski <[email protected]>

This patch adds support for making one power domain a sub-domain of other domain. This is useful for modeling power dependences for devices like TV Mixer or Camera ISP, which needs to have more than one power domain enabled to be operational.

---
Documentation/devicetree/bindings/arm/exynos/power_domain.txt | 2 ++

  arch/arm/mach-exynos/pm_domains.c                             | 9 ++++++++-
  2 files changed, 10 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +0 -0
index abde1ea..cad9476 100644

Documentation/devicetree/bindings/arm/exynos/power_domain.txt Optional Properties: · line 27

Quoted 6 lines
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +2 -0
@@ -22,6 +22,8 @@ Optional Properties:
  	- pclkN, clkN: Pairs of parent of input clock and input clock to the
  		devices in this power domain. Maximum of 4 pairs (N = 0 to 3)
  		are supported currently.
+- power-domain-master: phandle to a master power domain that the given domain
+		       is a part of
 

If you are trying to make parent, child relationship using this, please have a look to following thread [1] where Amit also trying to make such attempt and some discussion are happening on this thread, so that we can come up with single approach for all such needs.

[1]: https://patchwork.kernel.org/patch/5366171/

Thanks,
Pankaj Dubey

Quoted 30 lines
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +0 -0
  Node of a device using power domains must have a samsung,power-domain property
  defined with a phandle to respective power domain.
arch/arm/mach-exynos/pm_domains.c +8 -1
index 20f2671..373ac62 100644
@@ -108,7 +108,7 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
  static __init int exynos4_pm_init_power_domain(void)
  {
  	struct platform_device *pdev;
-	struct device_node *np;
+	struct device_node *np, *master_np;
 
  	for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
  		struct exynos_pm_domain *pd;
@@ -159,6 +159,13 @@ no_clk:
 
  		pm_genpd_init(&pd->pd, NULL, !on);
  		of_genpd_add_provider_simple(np, &pd->pd);
+
+		/* make master and slave hierarchy */
+		master_np = of_parse_phandle(np, "power-domain-master", 0);
+		if (master_np) {
+			pm_genpd_add_subdomain_names(master_np->name, np->name);
+			of_node_put(master_np);
+		}
  	}
 
  	return 0;
#5 lore raw

PATCH v2 2/7 ARM: Exynos: add support for sub-power domains

In reply to Andrzej Hajda

This patch adds support for making one power domain a sub-domain of other domain. This is useful for modeling power dependences for devices like TV Mixer or Camera ISP, which needs to have more than one power domain enabled to be operational.

---
 Documentation/devicetree/bindings/arm/exynos/power_domain.txt |  2 ++
 arch/arm/mach-exynos/pm_domains.c                             | 11 ++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +2 -0
index abde1ea8a119..b884358ebb1a 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.
+- samsung,power-domain: phandle to a master power domain that the given domain
+		       is a part of
 
 Node of a device using power domains must have a samsung,power-domain property
 defined with a phandle to respective power domain.
arch/arm/mach-exynos/pm_domains.c +10 -1
index 20f267121b3e..fa9a47ddad81 100644
@@ -108,7 +108,7 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
 static __init int exynos4_pm_init_power_domain(void)
 {
 	struct platform_device *pdev;
-	struct device_node *np;
+	struct device_node *np, *master_np;
 
 	for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
 		struct exynos_pm_domain *pd;
@@ -159,6 +159,15 @@ no_clk:
 
 		pm_genpd_init(&pd->pd, NULL, !on);
 		of_genpd_add_provider_simple(np, &pd->pd);
+
+		/* make master and slave hierarchy */
+		master_np = of_parse_phandle(np, "samsung,power-domain", 0);
+		if (!master_np)
+			master_np = of_parse_phandle(np, "power-domains", 0);
+		if (master_np) {
+			pm_genpd_add_subdomain_names(master_np->name, np->name);
+			of_node_put(master_np);
+		}
 	}
 
 	return 0;
Signature · 1 line
1.9.2
#6 lore raw

Re: [PATCH v2 2/7] ARM: Exynos: add support for sub-power domains

Hi Marek,

Documentation/devicetree/bindings/arm/exynos/power_domain.txt Optional Properties: · line 26

Quoted 10 lines · Marek Szyprowski
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +2 -0
index abde1ea8a119..b884358ebb1a 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.
+- samsung,power-domain: phandle to a master power domain that the given domain
+                      is a part of

For new DTSes I'd recommend using the generic "power-domains" only.

Or do you already have a DTS where tv-power-domain at 10023C20 uses "samsung,power-domain" in the wild?

Quoted 28 lines
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +0 -0
 Node of a device using power domains must have a samsung,power-domain property
 defined with a phandle to respective power domain.
arch/arm/mach-exynos/pm_domains.c +10 -1
index 20f267121b3e..fa9a47ddad81 100644
@@ -108,7 +108,7 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
 static __init int exynos4_pm_init_power_domain(void)
 {
        struct platform_device *pdev;
-       struct device_node *np;
+       struct device_node *np, *master_np;
 
        for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
                struct exynos_pm_domain *pd;
@@ -159,6 +159,15 @@ no_clk:
 
                pm_genpd_init(&pd->pd, NULL, !on);
                of_genpd_add_provider_simple(np, &pd->pd);
+
+               /* make master and slave hierarchy */
+               master_np = of_parse_phandle(np, "samsung,power-domain", 0);
+               if (!master_np)
+                       master_np = of_parse_phandle(np, "power-domains", 0);
+               if (master_np) {
+                       pm_genpd_add_subdomain_names(master_np->name, np->name);
+                       of_node_put(master_np);
+               }
Signature · 10 lines
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
#7 lore raw

Re: [PATCH v2 2/7] ARM: Exynos: add support for sub-power domains

Hello,

Quoted 4 lines · Geert Uytterhoeven

Hi Marek,

On Wed, Dec 3, 2014 at 1:33 PM, Marek Szyprowski
<[email protected]> wrote:

Quoted 11 lines

Documentation/devicetree/bindings/arm/exynos/power_domain.txt Optional Properties: · line 26

Quoted 10 lines
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +2 -0
index abde1ea8a119..b884358ebb1a 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.
+- samsung,power-domain: phandle to a master power domain that the given domain
+                      is a part of

For new DTSes I'd recommend using the generic "power-domains" only.

I think that some consistency in dts style will be really an added value. In my opinion for
all existing DTSes we should keep using 'samsung,power-domain' (even for defining a parent
power domains) and for all new DTSes, the generic 'power-domains' binding should be used.

Quoted 2 lines

Or do you already have a DTS where tv-power-domain at 10023C20 uses "samsung,power-domain" in the wild?

Not yet. We only used in private repositories, which can be changed.

Quoted 18 lines
Quoted 18 lines
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +0 -0
  Node of a device using power domains must have a samsung,power-domain property
  defined with a phandle to respective power domain.
arch/arm/mach-exynos/pm_domains.c +1 -1
index 20f267121b3e..fa9a47ddad81 100644
@@ -108,7 +108,7 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
  static __init int exynos4_pm_init_power_domain(void)
  {
         struct platform_device *pdev;
-       struct device_node *np;
+       struct device_node *np, *master_np;
 
         for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
                 struct exynos_pm_domain *pd;
@@ -159,6 +159,15 @@ no_clk:
 
Quoted 12 lines

arch/arm/mach-exynos/pm_domains.c no_clk: · line 172

Quoted 12 lines
arch/arm/mach-exynos/pm_domains.c +9 -0
                 pm_genpd_init(&pd->pd, NULL, !on);
                 of_genpd_add_provider_simple(np, &pd->pd);
+
+               /* make master and slave hierarchy */
+               master_np = of_parse_phandle(np, "samsung,power-domain", 0);
+               if (!master_np)
+                       master_np = of_parse_phandle(np, "power-domains", 0);
+               if (master_np) {
+                       pm_genpd_add_subdomain_names(master_np->name, np->name);
+                       of_node_put(master_np);
+               }
 

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#8 lore raw

Re: [PATCH v2 2/7] ARM: Exynos: add support for sub-power domains

Quoted 19 lines · Marek Szyprowski

Hello,

Quoted 4 lines · Geert Uytterhoeven

Hi Marek,

On Wed, Dec 3, 2014 at 1:33 PM, Marek Szyprowski
<[email protected]> wrote:

Quoted 11 lines

Documentation/devicetree/bindings/arm/exynos/power_domain.txt Optional Properties: · line 26

Quoted 10 lines
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +2 -0
index abde1ea8a119..b884358ebb1a 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.
+- samsung,power-domain: phandle to a master power domain that the given domain
+                      is a part of

For new DTSes I'd recommend using the generic "power-domains" only.

Quoted 6 lines

I think that some consistency in dts style will be really an added value. In my opinion for
all existing DTSes we should keep using 'samsung,power-domain' (even for defining a parent
power domains) and for all new DTSes, the generic 'power-domains' binding should be used.

Or even better, convert the existing DTSs to use generic power-domain first, and then use generic ones going forward also.

Kevin

#9 lore raw

Re: [PATCH v2 2/7] ARM: Exynos: add support for sub-power domains

In reply to Marek Szyprowski
Quoted 41 lines · 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.

---
 Documentation/devicetree/bindings/arm/exynos/power_domain.txt |  2 ++
 arch/arm/mach-exynos/pm_domains.c                             | 11 ++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +2 -0
index abde1ea8a119..b884358ebb1a 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.
+- samsung,power-domain: phandle to a master power domain that the given domain
+                      is a part of
 
 Node of a device using power domains must have a samsung,power-domain property
 defined with a phandle to respective power domain.
arch/arm/mach-exynos/pm_domains.c +1 -1
index 20f267121b3e..fa9a47ddad81 100644
@@ -108,7 +108,7 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
 static __init int exynos4_pm_init_power_domain(void)
 {
        struct platform_device *pdev;
-       struct device_node *np;
+       struct device_node *np, *master_np;
 
        for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
                struct exynos_pm_domain *pd;
@@ -159,6 +159,15 @@ no_clk:
 
                pm_genpd_init(&pd->pd, NULL, !on);
                of_genpd_add_provider_simple(np, &pd->pd);

arch/arm/mach-exynos/pm_domains.c no_clk: · line 171

Quoted 10 lines
arch/arm/mach-exynos/pm_domains.c +9 -0
+
+               /* make master and slave hierarchy */
+               master_np = of_parse_phandle(np, "samsung,power-domain", 0);
+               if (!master_np)
+                       master_np = of_parse_phandle(np, "power-domains", 0);
+               if (master_np) {
+                       pm_genpd_add_subdomain_names(master_np->name, np->name);
+                       of_node_put(master_np);
+               }
        }

Hi Marek,

In the my patch series posted earlier i added this feature in a slightly different way. (https://lkml.org/lkml/2014/11/24/320)
Parent PD's are not added in the same loop but in the second loop. This will make sure that the parents PD are registered before the child PD's and we can get away from the assumption of child/parent PD's position in the Device Tree. This is a still a work in progress. Also posted a patch earlier regarding this,
http://www.spinics.net/lists/linux-samsung-soc/msg39836.html.

Regards,
Amit

Quoted 10 lines
arch/arm/mach-exynos/pm_domains.c +0 -1
        return 0;
--

1.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#10 lore raw

Re: [PATCH v2 2/7] ARM: Exynos: add support for sub-power domains

Hello,

Quoted 55 lines · amit daniel kachhap
Quoted 41 lines · 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.

---
  Documentation/devicetree/bindings/arm/exynos/power_domain.txt |  2 ++
  arch/arm/mach-exynos/pm_domains.c                             | 11 ++++++++++-
  2 files changed, 12 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/exynos/power_domain.txt +2 -0
index abde1ea8a119..b884358ebb1a 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.
+- samsung,power-domain: phandle to a master power domain that the given domain
+                      is a part of
 
  Node of a device using power domains must have a samsung,power-domain property
  defined with a phandle to respective power domain.
arch/arm/mach-exynos/pm_domains.c +1 -1
index 20f267121b3e..fa9a47ddad81 100644
@@ -108,7 +108,7 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
  static __init int exynos4_pm_init_power_domain(void)
  {
         struct platform_device *pdev;
-       struct device_node *np;
+       struct device_node *np, *master_np;
 
         for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
                 struct exynos_pm_domain *pd;
@@ -159,6 +159,15 @@ no_clk:
 
                 pm_genpd_init(&pd->pd, NULL, !on);
                 of_genpd_add_provider_simple(np, &pd->pd);

arch/arm/mach-exynos/pm_domains.c no_clk: · line 171

Quoted 10 lines
arch/arm/mach-exynos/pm_domains.c +9 -0
+
+               /* make master and slave hierarchy */
+               master_np = of_parse_phandle(np, "samsung,power-domain", 0);
+               if (!master_np)
+                       master_np = of_parse_phandle(np, "power-domains", 0);
+               if (master_np) {
+                       pm_genpd_add_subdomain_names(master_np->name, np->name);
+                       of_node_put(master_np);
+               }
         }

Hi Marek,

Quoted 8 lines

In the my patch series posted earlier i added this feature in a slightly different way. (https://lkml.org/lkml/2014/11/24/320)
Parent PD's are not added in the same loop but in the second loop. This will make sure that the parents PD are registered before the child PD's and we can get away from the assumption of child/parent PD's position in the Device Tree. This is a still a work in progress. Also posted a patch earlier regarding this,
http://www.spinics.net/lists/linux-samsung-soc/msg39836.html.

Right, your approach seems to be more error prone. Do you plan to resend your
patch with the parent domain phandle renamed to generic 'power-domains' property,
like Geert suggested?

I would like to send Exynos4 HDMI patches based on top of your work and have them
finally merged (they are waiting since v3.17...)

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#11 lore raw

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

In reply to Andrzej Hajda

From: Marek Szyprowski <[email protected]>

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

---
 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 e0278ec..4ed5868 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;
@@ -537,6 +538,22 @@
 		status = "disabled";
 	};
 
+	i2c_8: i2c@138E0000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "samsung,s3c2440-hdmiphy-i2c";
+		reg = <0x138E0000 0x100>;
+		interrupts = <0 93 0>;
+		clocks = <&clock CLK_I2C_HDMI>;
+		clock-names = "i2c";
+		status = "disabled";
+
+		hdmi_i2c_phy: hdmiphy@38 {
+			compatible = "exynos4210-hdmiphy";
+			reg = <0x38>;
+		};
+	};
+
 	spi_0: spi@13920000 {
 		compatible = "samsung,exynos4210-spi";
 		reg = <0x13920000 0x100>;
@@ -645,4 +662,27 @@
 		samsung,sysreg = <&sys_reg>;
 		status = "disabled";
 	};
+
+	hdmi: hdmi@12D00000 {
+		compatible = "samsung,exynos4210-hdmi";
+		reg = <0x12D00000 0x70000>;
+		interrupts = <0 92 0>;
+		clock-names = "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy",
+			"mout_hdmi";
+		clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>,
+			<&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>,
+			<&clock CLK_MOUT_HDMI>;
+		phy = <&hdmi_i2c_phy>;
+		samsung,power-domain = <&pd_tv>;
+		samsung,syscon-phandle = <&pmu_system_controller>;
+		status = "disabled";
+	};
+
+	mixer: mixer@12C10000 {
+		compatible = "samsung,exynos4210-mixer";
+		interrupts = <0 91 0>;
+		reg = <0x12C10000 0x2100>, <0x12c00000 0x300>;
+		samsung,power-domain = <&pd_tv>;
+		status = "disabled";
+	};
 };
arch/arm/boot/dts/exynos4210.dtsi +8 -0
index 807bb5b..1c97784 100644
@@ -175,4 +175,12 @@
 			samsung,lcd-wb;
 		};
 	};
+
+	mixer: mixer@12C10000 {
+		clock-names = "mixer", "sclk_hdmi", "vp", "mout_mixer",
+			"sclk_mixer";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>,
+			<&clock CLK_VP>, <&clock CLK_MOUT_MIXER>,
+			<&clock CLK_SCLK_MIXER>;
+	};
 };
arch/arm/boot/dts/exynos4x12.dtsi +11 -0
index 861bb91..d6789a0 100644
@@ -271,4 +271,15 @@
 		compatible = "samsung,exynos4x12-usb2-phy";
 		samsung,sysreg-phandle = <&sys_reg>;
 	};
+
+	hdmi: hdmi@12D00000 {
+		compatible = "samsung,exynos4212-hdmi";
+	};
+
+	mixer: mixer@12C10000 {
+		compatible = "samsung,exynos4212-mixer";
+		clock-names = "mixer", "sclk_hdmi", "vp";
+		clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>,
+			<&clock CLK_VP>;
+	};
 };
Signature · 1 line
1.9.1
#12 lore raw

PATCH RESEND 4/7 ARM: dts: exynos4: add dependency between TV and LCD0 power domains

In reply to Andrzej Hajda

From: Marek Szyprowski <[email protected]>

TV Mixer needs both TV and LCD0 domains enabled to be fully operational. This dependency is modelled by making TV power domains a sub-domain of LCD0 power domain.

---
 arch/arm/boot/dts/exynos4.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/exynos4.dtsi +1 -0
index 4ed5868..c728004 100644
@@ -97,6 +97,7 @@
 	pd_tv: tv-power-domain@10023C20 {
 		compatible = "samsung,exynos4210-pd";
 		reg = <0x10023C20 0x20>;
+		power-domain-master = <&pd_lcd0>;
 	};
 
 	pd_cam: cam-power-domain@10023C00 {
Signature · 1 line
1.9.1
#13 lore raw

PATCH v2 4/7 ARM: dts: exynos4: add dependency between TV and LCD0 power domains

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 4ed5868d723e..55385a84a71c 100644
@@ -97,6 +97,7 @@
 	pd_tv: tv-power-domain at 10023C20 {
 		compatible = "samsung,exynos4210-pd";
 		reg = <0x10023C20 0x20>;
+		samsung,power-domain = <&pd_lcd0>;
 	};
 
 	pd_cam: cam-power-domain at 10023C00 {
Signature · 1 line
1.9.2
#14 lore raw

PATCH RESEND 5/7 ARM: dts: exynos4412-odroid: enable hdmi support

In reply to Andrzej Hajda

From: Marek Szyprowski <[email protected]>

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

---
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 44 +++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +44 -0
index c697ff0..4ebb557 100644
@@ -205,6 +205,20 @@
 					regulator-always-on;
 				};
 
+				ldo8_reg: ldo@8 {
+					regulator-compatible = "LDO8";
+					regulator-name = "VDD10_HDMI_1.0V";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+				};
+
+				ldo10_reg: ldo@10 {
+					regulator-compatible = "LDO10";
+					regulator-name = "VDDQ_MIPIHSI_1.8V";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
 				ldo11_reg: LDO11 {
 					regulator-name = "VDD18_ABB1_1.8V";
 					regulator-min-microvolt = <1800000>;
@@ -363,6 +377,31 @@
 	ehci: ehci@12580000 {
 		status = "okay";
 	};
+
+	mixer: mixer@12C10000 {
+		status = "okay";
+	};
+
+	hdmi@12D00000 {
+		hpd-gpio = <&gpx3 7 0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdmi_hpd>;
+		vdd-supply = <&ldo8_reg>;
+		vdd_osc-supply = <&ldo10_reg>;
+		vdd_pll-supply = <&ldo8_reg>;
+		ddc = <&hdmi_ddc>;
+		status = "okay";
+	};
+
+	hdmi_ddc: i2c@13880000 {
+		status = "okay";
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2c2_bus>;
+	};
+
+	i2c@138E0000 {
+		status = "okay";
+	};
 };
 
 &pinctrl_1 {
@@ -377,4 +416,9 @@
 		samsung,pin-pud = <0>;
 		samsung,pin-drv = <0>;
 	};
+
+	hdmi_hpd: hdmi-hpd {
+		samsung,pins = "gpx3-7";
+		samsung,pin-pud = <1>;
+	};
 };
Signature · 1 line
1.9.1
#15 lore raw

PATCH RESEND 6/7 ARM: dts: exynos4210-universal_c210: enable hdmi support

In reply to Andrzej Hajda

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 d50eb3a..069b2e2 100644
@@ -487,6 +487,63 @@
 			status = "okay";
 		};
 	};
+
+	hdmi_en: voltage-regulator-hdmi-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "HDMI_5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpe0 1 0>;
+		enable-active-high;
+	};
+
+	hdmi_ddc: i2c-ddc {
+		compatible = "i2c-gpio";
+		gpios = <&gpe4 2 0 &gpe4 3 0>;
+		i2c-gpio,delay-us = <100>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pinctrl-0 = <&i2c_ddc_bus>;
+		pinctrl-names = "default";
+		status = "okay";
+	};
+
+	mixer@12C10000 {
+		status = "okay";
+	};
+
+	hdmi@12D00000 {
+		hpd-gpio = <&gpx3 7 0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdmi_hpd>;
+		hdmi-en-supply = <&hdmi_en>;
+		vdd-supply = <&ldo3_reg>;
+		vdd_osc-supply = <&ldo4_reg>;
+		vdd_pll-supply = <&ldo3_reg>;
+		ddc = <&hdmi_ddc>;
+		status = "okay";
+	};
+
+	i2c@138E0000 {
+		status = "okay";
+	};
+};
+
+&pinctrl_1 {
+	hdmi_hpd: hdmi-hpd {
+		samsung,pins = "gpx3-7";
+		samsung,pin-pud = <0>;
+	};
+};
+
+&pinctrl_0 {
+	i2c_ddc_bus: i2c-ddc-bus {
+		samsung,pins = "gpe4-2", "gpe4-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <3>;
+		samsung,pin-drv = <0>;
+	};
 };
 
 &mdma1 {
Signature · 1 line
1.9.1
#16 lore raw

PATCH RESEND 7/7 ARM: dts: exynos5250: add display power domain

In reply to Andrzej Hajda

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

---
 arch/arm/boot/dts/exynos5250.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/exynos5250.dtsi +9 -0
index f21b9aa..4fed676 100644
@@ -100,6 +100,11 @@
 		reg = <0x10044040 0x20>;
 	};
 
+	pd_disp1: disp1-power-domain@100440A0 {
+		compatible = "samsung,exynos4210-pd";
+		reg = <0x100440A0 0x20>;
+	};
+
 	clock: clock-controller@10010000 {
 		compatible = "samsung,exynos5250-clock";
 		reg = <0x10010000 0x30000>;
@@ -713,6 +718,7 @@
 	hdmi {
 		compatible = "samsung,exynos4212-hdmi";
 		reg = <0x14530000 0x70000>;
+		samsung,power-domain = <&pd_disp1>;
 		interrupts = <0 95 0>;
 		clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>,
 			 <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>,
@@ -725,6 +731,7 @@
 	mixer {
 		compatible = "samsung,exynos5250-mixer";
 		reg = <0x14450000 0x10000>;
+		samsung,power-domain = <&pd_disp1>;
 		interrupts = <0 94 0>;
 		clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>;
 		clock-names = "mixer", "sclk_hdmi";
@@ -737,6 +744,7 @@
 	};
 
 	dp-controller@145B0000 {
+		samsung,power-domain = <&pd_disp1>;
 		clocks = <&clock CLK_DP>;
 		clock-names = "dp";
 		phys = <&dp_phy>;
@@ -744,6 +752,7 @@
 	};
 
 	fimd@14400000 {
+		samsung,power-domain = <&pd_disp1>;
 		clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>;
 		clock-names = "sclk_fimd", "fimd";
 	};
Signature · 1 line
1.9.1