All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akshay Saraswat <akshay.s@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/7 v5] EXYNOS5: FDT: Add TMU device node values
Date: Mon, 21 Jan 2013 06:11:41 -0500	[thread overview]
Message-ID: <1358766705-2118-4-git-send-email-akshay.s@samsung.com> (raw)
In-Reply-To: <1358766705-2118-1-git-send-email-akshay.s@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@samsung.com>
---
Changes since v4:
	- Rebased this patch.

 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(+)
 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 ed8c8dd..b2ef42e 100644
--- a/arch/arm/dts/exynos5250.dtsi
+++ b/arch/arm/dts/exynos5250.dtsi
@@ -151,4 +151,9 @@
 		};
 	};
 
+	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 cbfab6f..f49ca44 100644
--- a/board/samsung/dts/exynos5250-smdk5250.dts
+++ b/board/samsung/dts/exynos5250-smdk5250.dts
@@ -66,4 +66,17 @@
 			compatible = "maxim,max77686_pmic";
 		};
 	};
+
+	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..ed1e22a
--- /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 f77d195..058fb51 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -79,6 +79,7 @@ enum fdt_compat_id {
 	COMPAT_SAMSUNG_EXYNOS_EHCI,	/* Exynos EHCI controller */
 	COMPAT_SAMSUNG_EXYNOS_USB_PHY,	/* Exynos phy controller for usb2.0 */
 	COMPAT_MAXIM_MAX77686_PMIC,	/* MAX77686 PMIC */
+	COMPAT_SAMSUNG_EXYNOS_TMU,	/* Exynos TMU */
 
 	COMPAT_COUNT,
 };
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 16921e1..4613fcd 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -54,6 +54,7 @@ static const char * const compat_names[COMPAT_COUNT] = {
 	COMPAT(SAMSUNG_EXYNOS_EHCI, "samsung,exynos-ehci"),
 	COMPAT(SAMSUNG_EXYNOS_USB_PHY, "samsung,exynos-usb-phy"),
 	COMPAT(MAXIM_MAX77686_PMIC, "maxim,max77686_pmic"),
+	COMPAT(SAMSUNG_EXYNOS_TMU, "samsung,exynos-tmu"),
 };
 
 const char *fdtdec_get_compatible(enum fdt_compat_id id)
-- 
1.7.9.5

  parent reply	other threads:[~2013-01-21 11:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 11:11 [U-Boot] [PATCH 0/7 v5] Add TMU support for Exynos5250 based SMDK5250 Akshay Saraswat
2013-01-21 11:11 ` [U-Boot] [PATCH 1/7 v5] EXYNOS5: TMU: Add driver for Thermal Management Unit Akshay Saraswat
2013-01-22 15:51   ` Simon Glass
2013-01-21 11:11 ` [U-Boot] [PATCH 2/7 v5] EXYNOS5: Implement board_poweroff " Akshay Saraswat
2013-01-22 15:52   ` Simon Glass
2013-01-21 11:11 ` Akshay Saraswat [this message]
2013-01-22 15:58   ` [U-Boot] [PATCH 3/7 v5] EXYNOS5: FDT: Add TMU device node values Simon Glass
2013-01-21 11:11 ` [U-Boot] [PATCH 4/7 v5] EXYNOS5: TMU: Add TMU init and status check Akshay Saraswat
2013-01-22 20:45   ` Simon Glass
2013-01-21 11:11 ` [U-Boot] [PATCH 5/7 v5] EXYNOS5: Config: Enable support for Exynos TMU driver Akshay Saraswat
2013-01-22 20:46   ` Simon Glass
2013-01-21 11:11 ` [U-Boot] [PATCH 6/7 v5] TMU: Add TMU support in dtt command Akshay Saraswat
2013-01-22 20:51   ` Simon Glass
2013-01-21 11:11 ` [U-Boot] [PATCH 7/7 v5] EXYNOS5: Config: Enable dtt command for TMU Akshay Saraswat
2013-01-22 20:51   ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358766705-2118-4-git-send-email-akshay.s@samsung.com \
    --to=akshay.s@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.