Patchwork [U-Boot,3/7,v5] EXYNOS5: FDT: Add TMU device node values

login
register
mail settings
Submitter Akshay Saraswat
Date Jan. 21, 2013, 11:11 a.m.
Message ID <1358766705-2118-4-git-send-email-akshay.s@samsung.com>
Download mbox | patch
Permalink /patch/214117/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Akshay Saraswat - Jan. 21, 2013, 11:11 a.m.
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
Simon Glass - Jan. 22, 2013, 3:58 p.m.
Hi Akshay,

On Mon, Jan 21, 2013 at 3:11 AM, Akshay Saraswat <akshay.s@samsung.com> wrote:
> 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>

With nits below fixed

Acked-by: Simon Glass <sjg@chromium.org>

> ---
> 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@10060000 {
> +               compatible = "samsung,exynos-tmu";
> +               reg = <0x10060000 0xffff>;

The size should be 0x10000 I think.

> +       };
> +
>  };
> 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@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

Practice

> +and additions:
> +
> +Required properties :
> + - compatible : Should be "samsung,exynos-tmu" for TMU
> + - samsung,mux : mux Address for the TMU to enable TMU core

This doesn't make a lot of sense - can you expand this comment a bit
so people know what value to use?

> + - 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

What are the units for this value?

> + - samsung,dc-value : DC value of TMU, default is 25
> +
> +Example:
> +
> +tmu@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
>

Regards,
Simon

Patch

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@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@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@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)