Skip to contentSkip to conversation

Add dt support for exynos hdmiphy settings

PATCH New Shirish S 1 participant 4 messages Aug 15, 2013

Subsystems (4)
lore
Share & tools
lore

Shirish S

author
#0 lore raw

cover Add dt support for exynos hdmiphy settings

For various revision of chipset if the signal pattern is changed for every board, then the phy setting need to be updated correspondingly by measuring the signal.
With the hdmiphy settings fixed in the driver the only way currently is to either add a new structure or add compile time option.
To avoid this, we can move the same to dt, wherin we can have different dt files for every revision. This patchset can be considered as an initiative towards achieving the same for exynos 5250 and can be later extended to future chipsets.
Also this patchset moves the entire structure to dt file as-is in the driver and hence we can find all the hex values, which are not logically explained similar to driver.

Shirish S (3):
ARM: dts: smdk5250: Add hdmi phy settings
ARM: dts: arndale: Add hdmi phy settings
drm: exynos: hdmi: Add dt support for hdmiphy settings

 .../devicetree/bindings/video/exynos_hdmi.txt      |   18 +-
 arch/arm/boot/dts/exynos5250-arndale.dts           |  120 ++++++++++++
 arch/arm/boot/dts/exynos5250-smdk5250.dts          |  120 ++++++++++++
 drivers/gpu/drm/exynos/exynos_hdmi.c               |  191 +++++++-------------
 4 files changed, 320 insertions(+), 129 deletions(-)
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 1/3 ARM: dts: smdk5250: Add hdmi phy settings

This patch moves the hdmi phy setting to smdk5250 dts,as its more of a per board configuration and also shall be easier for supporting future chipsets.

---
 arch/arm/boot/dts/exynos5250-smdk5250.dts |  120 +++++++++++++++++++++++++++++
 1 file changed, 120 insertions(+)
arch/arm/boot/dts/exynos5250-smdk5250.dts +120 -0
index 49f18c2..95a91a8 100644
@@ -220,6 +220,126 @@
 
 	hdmi {
 		hpd-gpio = <&gpx3 7 0>;
+		hdmiphy-confs {
+			nr-confs = <13>;
+			conf0: conf0 {
+				clock-frequency = <25200000>;
+				conf =  /bits/ 8 <
+					0x01 0x51 0x2A 0x75 0x40 0x01 0x00 0x08
+					0x82 0x80 0xfc 0xd8 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xf4 0x24 0x00 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf1: conf1 {
+				clock-frequency = <27000000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x22 0x51 0x40 0x08 0xfc 0x20
+					0x98 0xa0 0xcb 0xd8 0x45 0xa0 0xac 0x80
+					0x06 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xe4 0x24 0x00 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf2: conf2 {
+				clock-frequency = <27027000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x2d 0x72 0x40 0x64 0x12 0x08
+					0x43 0xa0 0x0e 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xe3 0x24 0x00 0x00 0x00 0x01 0x00
+				>;
+			};
+			conf3: conf3 {
+				clock-frequency = <36000000>;
+				conf =  /bits/ 8 <
+					0x01 0x51 0x2d 0x55 0x40 0x01 0x00 0x08
+					0x82 0x80 0x0e 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xab 0x24 0x00 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf4: conf4 {
+				clock-frequency = <40000000>;
+				conf = /bits/ 8  <
+					0x01 0x51 0x32 0x55 0x40 0x01 0x00 0x08
+					0x82 0x80 0x2c 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0x9a 0x24 0x00 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf5: conf5 {
+				clock-frequency = <65000000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x36 0x34 0x40 0x1e 0x0a 0x08
+					0x82 0xa0 0x45 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xbd 0x24 0x01 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf6: conf6 {
+				clock-frequency = <74176000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x3e 0x35 0x40 0x5b 0xde 0x08
+					0x82 0xa0 0x73 0xd9 0x45 0xa0 0xac 0x80
+					0x56 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xa6 0x24 0x01 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf7: conf7 {
+				clock-frequency = <74250000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x1f 0x10 0x40 0x40 0xf8 0x08
+					0x81 0xa0 0xba 0xd8 0x45 0xa0 0xac 0x80
+					0x3c 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xa5 0x24 0x01 0x00 0x00 0x01 0x00
+				>;
+			};
+			conf8: conf8 {
+				clock-frequency = <83500000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x23 0x11 0x40 0x0c 0xfb 0x08
+					0x85 0xa0 0xd1 0xd8 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0x93 0x24 0x01 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf9: conf9 {
+				clock-frequency = <106500000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x2c 0x12 0x40 0x0c 0x09 0x08
+					0x84 0xa0 0x0a 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0x73 0x24 0x01 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf10: conf10 {
+				clock-frequency = <108000000>;
+				conf = /bits/ 8  <
+					0x01 0x51 0x2d 0x15 0x40 0x01 0x00 0x08
+					0x82 0x80 0x0e 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xc7 0x25 0x03 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf11: conf11 {
+				clock-frequency = <146250000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x3d 0x15 0x40 0x18 0xfd 0x08
+					0x83 0xa0 0x6e 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0x50 0x25 0x03 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf12: conf12 {
+				clock-frequency = <148500000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x1f 0x00 0x40 0x40 0xf8 0x08
+					0x81 0xa0 0xba 0xd8 0x45 0xa0 0xac 0x80
+					0x3c 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0x4b 0x25 0x03 0x00 0x00 0x01 0x00
+				>;
+			};
+		};
 	};
 
 	codec@11000000 {
Signature · 1 line
1.7.10.4
author
#2 lore raw

PATCH 2/3 ARM: dts: arndale: Add hdmi phy settings

In reply to Shirish S

This patch moves the hdmi phy setting to arndale dts, as its more of a per board configuration and also shall be easier for supporting future chipsets.

---
 arch/arm/boot/dts/exynos5250-arndale.dts |  120 ++++++++++++++++++++++++++++++
 1 file changed, 120 insertions(+)
arch/arm/boot/dts/exynos5250-arndale.dts +120 -0
index abc7272..59db48a 100644
@@ -424,6 +424,126 @@
 
 	hdmi {
 		hpd-gpio = <&gpx3 7 2>;
+		hdmiphy-confs {
+			nr-confs = <13>;
+			conf0: conf0 {
+				clock-frequency = <25200000>;
+				conf =  /bits/ 8 <
+					0x01 0x51 0x2A 0x75 0x40 0x01 0x00 0x08
+					0x82 0x80 0xfc 0xd8 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xf4 0x24 0x00 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf1: conf1 {
+				clock-frequency = <27000000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x22 0x51 0x40 0x08 0xfc 0x20
+					0x98 0xa0 0xcb 0xd8 0x45 0xa0 0xac 0x80
+					0x06 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xe4 0x24 0x00 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf2: conf2 {
+				clock-frequency = <27027000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x2d 0x72 0x40 0x64 0x12 0x08
+					0x43 0xa0 0x0e 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xe3 0x24 0x00 0x00 0x00 0x01 0x00
+				>;
+			};
+			conf3: conf3 {
+				clock-frequency = <36000000>;
+				conf =  /bits/ 8 <
+					0x01 0x51 0x2d 0x55 0x40 0x01 0x00 0x08
+					0x82 0x80 0x0e 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xab 0x24 0x00 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf4: conf4 {
+				clock-frequency = <40000000>;
+				conf = /bits/ 8  <
+					0x01 0x51 0x32 0x55 0x40 0x01 0x00 0x08
+					0x82 0x80 0x2c 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0x9a 0x24 0x00 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf5: conf5 {
+				clock-frequency = <65000000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x36 0x34 0x40 0x1e 0x0a 0x08
+					0x82 0xa0 0x45 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xbd 0x24 0x01 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf6: conf6 {
+				clock-frequency = <74176000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x3e 0x35 0x40 0x5b 0xde 0x08
+					0x82 0xa0 0x73 0xd9 0x45 0xa0 0xac 0x80
+					0x56 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xa6 0x24 0x01 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf7: conf7 {
+				clock-frequency = <74250000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x1f 0x10 0x40 0x40 0xf8 0x08
+					0x81 0xa0 0xba 0xd8 0x45 0xa0 0xac 0x80
+					0x3c 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xa5 0x24 0x01 0x00 0x00 0x01 0x00
+				>;
+			};
+			conf8: conf8 {
+				clock-frequency = <83500000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x23 0x11 0x40 0x0c 0xfb 0x08
+					0x85 0xa0 0xd1 0xd8 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0x93 0x24 0x01 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf9: conf9 {
+				clock-frequency = <106500000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x2c 0x12 0x40 0x0c 0x09 0x08
+					0x84 0xa0 0x0a 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0x73 0x24 0x01 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf10: conf10 {
+				clock-frequency = <108000000>;
+				conf = /bits/ 8  <
+					0x01 0x51 0x2d 0x15 0x40 0x01 0x00 0x08
+					0x82 0x80 0x0e 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xc7 0x25 0x03 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf11: conf11 {
+				clock-frequency = <146250000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x3d 0x15 0x40 0x18 0xfd 0x08
+					0x83 0xa0 0x6e 0xd9 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0x50 0x25 0x03 0x00 0x00 0x01 0x80
+				>;
+			};
+			conf12: conf12 {
+				clock-frequency = <148500000>;
+				conf = /bits/ 8  <
+					0x01 0xd1 0x1f 0x00 0x40 0x40 0xf8 0x08
+					0x81 0xa0 0xba 0xd8 0x45 0xa0 0xac 0x80
+					0x3c 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0x4b 0x25 0x03 0x00 0x00 0x01 0x00
+				>;
+			};
+		};
 		vdd_osc-supply = <&ldo10_reg>;
 		vdd_pll-supply = <&ldo8_reg>;
 		vdd-supply = <&ldo8_reg>;
Signature · 1 line
1.7.10.4
author
#3 lore raw

PATCH 3/3 drm: exynos: hdmi: Add dt support for hdmiphy settings

In reply to Shirish S

This patch adds dt support to hdmiphy config settings as it is board specific and depends on the signal pattern of board.

---
 .../devicetree/bindings/video/exynos_hdmi.txt      |   18 +-
 drivers/gpu/drm/exynos/exynos_hdmi.c               |  191 +++++++-------------
 2 files changed, 80 insertions(+), 129 deletions(-)
Documentation/devicetree/bindings/video/exynos_hdmi.txt +17 -1
index 323983b..fb8a643 100644
@@ -12,7 +12,11 @@ Required properties:
 	a) phandle of the gpio controller node.
 	b) pin number within the gpio controller.
 	c) optional flags and pull up/down.
-
+- hdmiphy-confs: following information about the hdmiphy conf settings.
+        a) "nr-confs" specifies the number of pixel clocks supported.
+	b) "confX: confX" specifies the phy configuration settings,
+		"clock-frequency" specifies the pixel clock
+		"conf" specifies the setting for the corresponding pixel clock
 Example:
 
 	hdmi {
@@ -20,4 +24,16 @@ Example:
 		reg = <0x14530000 0x100000>;
 		interrupts = <0 95 0>;
 		hpd-gpio = <&gpx3 7 1>;
+		hdmiphy-confs {
+			nr-confs = <1>;
+			conf0: conf0 {
+				clock-frequency = <25200000>;
+				conf =  /bits/ 8 <
+					0x01 0x51 0x2A 0x75 0x40 0x01 0x00 0x08
+					0x82 0x80 0xfc 0xd8 0x45 0xa0 0xac 0x80
+					0x08 0x80 0x11 0x04 0x02 0x22 0x44 0x86
+					0x54 0xf4 0x24 0x00 0x00 0x00 0x01 0x80
+				>;
+			};
+		}
 	};
drivers/gpu/drm/exynos/exynos_hdmi.c +63 -128

238 lines not on this page · raw message

Signature · 1 line
1.7.10.4