[U-Boot] [PATCH 1/8 v3] EXYNOS5: FDT: Add TMU device node values

Hatim Ali hatim.rv at samsung.com
Thu Nov 8 10:14:53 CET 2012


From: Akshay Saraswat <akshay.s at samsung.com>

Fdt entry for Exynos TMU driver specific pre-defined values used for
calibration of current temperature and defining threshold values.

Signed-off-by: Akshay Saraswat <akshay.s at samsung.com>
Acked-by: Simon Glass <sjg at chromium.org>
---
Changes since v2:
	- None

 arch/arm/dts/exynos5250.dtsi              |    5 ++++
 board/samsung/dts/exynos5250-smdk5250.dts |   13 ++++++++++
 doc/device-tree-bindings/exynos/tmu.txt   |   35 +++++++++++++++++++++++++++++
 include/fdtdec.h                          |    1 +
 lib/fdtdec.c                              |    1 +
 5 files changed, 55 insertions(+), 0 deletions(-)
 create mode 100644 doc/device-tree-bindings/exynos/tmu.txt

diff --git a/arch/arm/dts/exynos5250.dtsi b/arch/arm/dts/exynos5250.dtsi
index fa4d498..db22db6 100644
--- a/arch/arm/dts/exynos5250.dtsi
+++ b/arch/arm/dts/exynos5250.dtsi
@@ -28,4 +28,9 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 	};
+
+	tmu at 10060000 {
+		compatible = "samsung,exynos-tmu";
+		reg = <0x10060000 0xffff>;
+	};
 };
diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts
index b6fbb67..2d3ecca 100644
--- a/board/samsung/dts/exynos5250-smdk5250.dts
+++ b/board/samsung/dts/exynos5250-smdk5250.dts
@@ -26,4 +26,17 @@
 			phy-mode = "mii";
 		};
 	};
+
+	tmu at 10060000 {
+		samsung,mux		= <6>;
+		samsung,min-temp	= <25>;
+		samsung,max-temp	= <125>;
+		samsung,start-warning	= <95>;
+		samsung,start-tripping	= <105>;
+		samsung,efuse-min-value	= <40>;
+		samsung,efuse-value	= <55>;
+		samsung,efuse-max-value	= <100>;
+		samsung,slope		= <268470274>;
+		samsung,dc-value	= <25>;
+	};
 };
diff --git a/doc/device-tree-bindings/exynos/tmu.txt b/doc/device-tree-bindings/exynos/tmu.txt
new file mode 100644
index 0000000..99e7164
--- /dev/null
+++ b/doc/device-tree-bindings/exynos/tmu.txt
@@ -0,0 +1,35 @@
+Exynos Thermal management Unit
+
+The device node for TMU that is a part of Exynos5250
+SOC is as described in the document "Open Firmware Recommended
+Practic : Universal Serial Bus" with the following modifications
+and additions:
+
+Required properties :
+ - compatible : Should be "samsung,exynos-tmu" for TMU
+ - samsung,mux : mux Address for the TMU to enable TMU core:
+ - samsung,min-temp : Minimum temperature, default is 25:
+ - samsung,max-temp : Maximum temperature, defalut set to 125:
+ - samsung,start-warning : temp at which TMU start giving warning:
+ - samsung,start-tripping : temp at which system will trip and shutdown:
+ - samsung,efuse-min-value : SOC efuse min value:
+ - samsung,efuse-value : SOC actual efuse value:
+ - samsung,efuse-max-value : SoC max efuse value:
+ - samsung,slope : Gain of amplifier, default is 268470274:
+ - samsung,dc-value : DC value of TMU, default is 25:
+
+Example:
+
+tmu at 10060000 {
+	compatible = "samsung,exynos-tmu"
+	samsung,mux = <6>;
+	samsung,min-temp = <25>;
+	samsung,max-temp = <125>;
+	samsung,start-warning = <95>;
+	samsung,start-tripping = <105>;
+	samsung,efuse-min-value	= <40>;
+	samsung,efuse-value = <55>;
+	samsung,efuse-max-value	= <100>;
+	samsung,slope = <268470274>;
+	samsung,dc-value = <25>;
+};
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 8f79f8a..180dfff 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -68,6 +68,7 @@ enum fdt_compat_id {
 	COMPAT_NVIDIA_TEGRA20_NAND,	/* Tegra2 NAND controller */
 	COMPAT_SMSC_LAN9215,		/* SMSC 10/100 Ethernet LAN9215 */
 	COMPAT_SAMSUNG_EXYNOS5_SROMC,	/* Exynos5 SROMC */
+	COMPAT_SAMSUNG_EXYNOS_TMU,	/* Exynos TMU */
 
 	COMPAT_COUNT,
 };
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index d8103fd..8e5ed21 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -45,6 +45,7 @@ static const char * const compat_names[COMPAT_COUNT] = {
 	COMPAT(NVIDIA_TEGRA20_NAND, "nvidia,tegra20-nand"),
 	COMPAT(SMSC_LAN9215, "smsc,lan9215"),
 	COMPAT(SAMSUNG_EXYNOS5_SROMC, "samsung,exynos-sromc"),
+	COMPAT(SAMSUNG_EXYNOS_TMU, "samsung,exynos-tmu"),
 };
 
 const char *fdtdec_get_compatible(enum fdt_compat_id id)
-- 
1.7.2.3



More information about the U-Boot mailing list