devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Moon <linux.amoon@gmail.com>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Dongjin Kim <tobetter@gmail.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	Russell King <linux@arm.linux.org.uk>,
	Lukasz Majewski <l.majewski@samsung.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Sjoerd Simons <sjoerd.simons@collabora.co.uk>,
	Kukjin Kim <kgene@kernel.org>, Guenter Roeck <linux@roeck-us.net>,
	Markus Reichl <m.reichl@fivetechno.de>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv5 2/5] ARM: dts: Odroid-XU3 Enable TMU at Exynos5422 base
Date: Sat, 23 May 2015 23:05:55 +0530	[thread overview]
Message-ID: <CANAwSgQzYvmquo9fcUPLK5XHqo1G=HYHc-YuhUvtw2yYaDi9GA@mail.gmail.com> (raw)
In-Reply-To: <555D20E1.3070308@samsung.com>

On 21 May 2015 at 05:33, Krzysztof Kozlowski <k.kozlowski@samsung.com> wrote:
> On 20.05.2015 23:59, Anand Moon wrote:
>> On 20 May 2015 at 08:57, Dongjin Kim <tobetter@gmail.com> wrote:
>>> Hello Kryzsztof,
>>>
>>> Are you able to check if TMU is under VDDI power domain from Exynos5422
>>> datasheet?
>>> If it is, XU3 use BUCK3 for TMU and more internal blocks.
>>>
>>> Thank you,
>>> Dongjin.
>>>
>>> On Tue, May 19, 2015 at 4:42 PM, Krzysztof Kozlowski
>>> <k.kozlowski@samsung.com> wrote:
>>>>
>>>> 2015-05-19 16:28 GMT+09:00 Anand Moon <linux.amoon@gmail.com>:
>>>>> On 15 May 2015 at 05:42, Krzysztof Kozlowski <k.kozlowski@samsung.com>
>>>>> wrote:
>>>>>> 2015-05-15 1:16 GMT+09:00 Anand Moon <linux.amoon@gmail.com>:
>>>>>>> On 13 May 2015 at 14:02, Krzysztof Kozlowski <k.kozlowski@samsung.com>
>>>>>>> wrote:
>>>>>>>> 2015-05-13 17:21 GMT+09:00 Anand Moon <linux.amoon@gmail.com>:
>>>>>>>>> On 13 May 2015 at 12:51, Krzysztof Kozlowski
>>>>>>>>> <k.kozlowski@samsung.com> wrote:
>>>>>>>>>> 2015-05-13 15:36 GMT+09:00 Anand Moon <linux.amoon@gmail.com>:
>>>>>>>>>>> This changes enables TMU IP block on the Exynos5422 Odroid-XU3
>>>>>>>>>>> device.
>>>>>>>>>>>
>>>>>>>>>>> Tested-by: Markus Reichl <m.reichl@fivetechno.de>
>>>>>>>>>>> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
>>>>>>>>>>> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
>>>>>>>>>>> ---
>>>>>>>>>>>  arch/arm/boot/dts/exynos5422-odroidxu3.dts | 25
>>>>>>>>>>> +++++++++++++++++++++++++
>>>>>>>>>>>  1 file changed, 25 insertions(+)
>>>>>>>>>>>
>>>>>>>>>>> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>>>>>>>>>>> b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>>>>>>>>>>> index 9446e28..cd78816 100644
>>>>>>>>>>> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>>>>>>>>>>> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>>>>>>>>>>> @@ -319,6 +319,31 @@
>>>>>>>>>>>                 #cooling-cells = <2>;
>>>>>>>>>>>                 cooling-levels = <0 130 170 230>;
>>>>>>>>>>>         };
>>>>>>>>>>> +
>>>>>>>>>>> +       tmu@10060000 {
>>>>>>>>>>
>>>>>>>>>> Here and for other overrides please use label notation, like:
>>>>>>>>>>
>>>>>>>>>> &tmu_cpu0 {
>>>>>>>>>>               ...
>>>>>>>>>> };
>>>>>>>>>>
>>>>>>>>>>> +               vtmu-supply = <&ldo10_reg>;
>>>>>>>>>>
>>>>>>>>>> I am curious, how did you find that LDO10 supplies TMU unit?
>>>>>>>>>>
>>>>>>>>>> Best regards,
>>>>>>>>>> Krzysztof
>>>>>>>>>
>>>>>>>>> Hi Krzysztof,
>>>>>>>>>
>>>>>>>>> I have re-base my work on earlier Lukasz Majewski patches.
>>>>>>>>>
>>>>>>>>> https://patchwork.kernel.org/patch/5693201/
>>>>>>>>
>>>>>>>> NAK.
>>>>>>>> I am sorry, but this is not sufficient explanation. Actually such
>>>>>>>> explanation could mean that you did just blindly copied everything
>>>>>>>> instead of developing it.
>>>>>>>>
>>>>>>>> You cannot use some regulator here just because some Exynos4 boards
>>>>>>>> use it. You have to be sure that this regulator supplies this part of
>>>>>>>> SoC or device.
>>>>>>>
>>>>>>> Hi Krzysztof,
>>>>>>>
>>>>>>> After going through the schematics, I came to understanding that their
>>>>>>> is
>>>>>>> missing regulator related to TEMP SE in the exynos5422-odroidxu3.dts.
>>>>>>>
>>>>>>> Below is the schematic of the board.
>>>>>>>
>>>>>>> http://dn.odroid.com/5422/ODROID-XU3/Schematics/XU3_MAIN_REV0.2.PDF
>>>>>>>
>>>>>>>   ldo18_reg: LDO18 {
>>>>>>>                                          regulator-name = "vdd_ldo18";
>>>>>>>                                          regulator-min-microvolt =
>>>>>>> <1800000>;
>>>>>>>                                          regulator-max-microvolt =
>>>>>>> <1800000>;
>>>>>>>                                          regulator-always-on;
>>>>>>>                                };
>>>>>>
>>>>>> The output of LDO18 goes to VDD_EMMC_1V8. This is not regulator for
>>>>>> TMU.
>>>>>>
>>>>>> I think the schematics are missing some of details but it can be
>>>>>> deducted that:
>>>>>> 1. TEMP SE is supplied by VDD18_TS power domain. It consists of 5
>>>>>> pairs of pins (XTSTEST_OUT[0-4], XTSEXT_RES[0-4]).
>>>>>> 2. The VDD18_TS01, VDD18_TS23 and VDD18_TS4 are wired to theL DO7 of
>>>>>> S2MPS11 PMIC.
>>>>>> 3. I confirmed with the Exynos5422 datasheet that these
>>>>>> VDD18_TS{01,23,4} supply the XTSTEST pins (OUT and RES).
>>>>>>
>>>>>> So the LDO7 it is... but before using it there is a caveat. The LDO7
>>>>>> is also connected to VDD of MIPI, HDMI and few more. So when you use
>>>>>> this regulator in TMU it may be turned off by TMU driver (e.g. during
>>>>>> unbind). In such case these other blocks also should be tested and
>>>>>> checked whether they take this regulator and enable it.
>>>>>
>>>>> hi Krzysztof,
>>>>>
>>>>> I tried to use the LDO7 regulator for TMU but it failed to register.
>>>>>
>>>>> [    3.231329] ina2xx 0-0045: power monitor ina231 (Rshunt = 10000 uOhm)
>>>>> [    3.237691] thermal thermal_zone0: failed to read out thermal zone
>>>>> (-22)
>>>>> [    3.243033] exynos-tmu 10060000.tmu: Looking up vtmu-supply from
>>>>> device tree
>>>>> [    3.243936] thermal thermal_zone1: failed to read out thermal zone
>>>>> (-22)
>>>>> [    3.249791] exynos-tmu 10064000.tmu: Looking up vtmu-supply from
>>>>> device tree
>>>>> [    3.250677] thermal thermal_zone2: failed to read out thermal zone
>>>>> (-22)
>>>>> [    3.256410] exynos-tmu 10068000.tmu: Looking up vtmu-supply from
>>>>> device tree
>>>>> [    3.257345] thermal thermal_zone3: failed to read out thermal zone
>>>>> (-22)
>>>>> [    3.263050] exynos-tmu 1006c000.tmu: Looking up vtmu-supply from
>>>>> device tree
>>>>> [    3.263984] thermal thermal_zone4: failed to read out thermal zone
>>>>> (-22)
>>>>> [    3.269769] exynos-tmu 100a0000.tmu: Looking up vtmu-supply from
>>>>> device tree
>>>>> [    3.270363] usb 5-1: New USB device found, idVendor=0424,
>>>>> idProduct=9514
>>>>> [    3.276389] usb 5-1: New USB device strings: Mfr=0, Product=0,
>>>>> SerialNumber=0
>>>>
>>>> Indeed.
>>>>
>>
>> Hi Krzysztof/Dongjin
>>
>> BUCK3 is option for TMU as suggested by Dongjin
>
> What do you mean by that? VDD_INT is one of important regulators. It
> supplies many parts of chip and should not be disabled during exynos-tmu
> driver removal.
>
> Of course it wouldn't because it is "always-on"... so what is the
> benefit of using it in exynos-tmu?
>
> What about regulator supplying TMU sensors? Shouldn't it be enabled? Is
> it the same?
>
> Before posting a new solution please be sure that you have sufficient
> answer for each of these questions. Anwser that "someone told me so"
> unfortunately is not sufficient :).
>
>
>
>> Earlier I have some missing CONFIG option's hence It was not working.
>> Now its registering with TMU.
>>
>> Bellow is the output device tree.
>>
>> root@odroidxu3: cd /sys/firmware/devicetree/base/
>> root@odroidxu3:/sys/firmware/devicetree/base# cat tmu@10060000/status
>> okay
>> root@odroidxu3:/sys/firmware/devicetree/base#
>> root@odroidxu3:/sys/firmware/devicetree/base# cat tmu@10064000/status
>> okay
>> root@odroidxu3:/sys/firmware/devicetree/base# cat tmu@10068000/status
>> okay
>> root@odroidxu3:/sys/firmware/devicetree/base# cat tmu@1006c000/status
>> okay
>> root@odroidxu3:/sys/firmware/devicetree/base# cat tmu@100a0000/status
>> okay
>> root@odroidxu3:/sys/firmware/devicetree/base#
>
> If you looked at the driver then you would know, that above status does
> not mean anything for this discussion about regulator. You could use
> EMMC regulator (which you proposed) and the results would be the same.
>
> Best regards,
> Krzysztof
>

Hi Krzysztof,

I did some debugging on the this using powerdebug utility.
Using  LDO7 to control TMU seams to me correct option compared to BUCK3.

Setting LDO7 to control TMU I observed  following output on powerdebug.
I observed that the power drawn by the board on Odroid show is much
less compare to BUCK3 on the same setup.
I can see the HDMI output on Odroid-V2 display screen.
I have done some stress testing on this configuration and It worked correctly.

Powerdebug output using LDO7
---------------------------------------------------------------------------------------------------------------
PowerDebug 0.7.3     Clocks  Regulators  Sensors  Gpio
Name        Status      State       Type        Users       Microvolts
 Min u-volts Max u-volts
phy                                             0           0
 0           0
phy                                             0           0
 0           0
vdd_ldo1                enabled     voltage     0           1000000
 1000000     1000000
LDO1                                            0           0
 0           0
LDO2                    enabled     voltage     0           1800000
 0           0
vdd_ldo3                enabled     voltage     0           1800000
 1800000     1800000
LDO3                                            0           0
 0           0
LDO4                    enabled     voltage     0           1800000
 0           0
vdd_ldo5                enabled     voltage     0           1800000
 1800000     1800000
LDO5                                            0           0
 0           0
vdd_ldo6                enabled     voltage     0           1000000
 1000000     1000000
hdmi        okay                                0           0
 0           0
hdmi        okay                                0           0
 0           0
LDO6                                            0           0
 0           0
vdd_ldo7                enabled     voltage     0           1800000
 1800000     1800000
hdmi        okay                                0           0
 0           0
tmu         okay                                0           0
 0           0
tmu         okay                                0           0
 0           0
tmu         okay                                0           0
 0           0
tmu         okay                                0           0
 0           0
tmu         okay                                0           0
 0           0
LDO7                                            0           0
 0           0
vdd_ldo8                enabled     voltage     0           1800000
 1800000     1800000
LDO8                                            0           0
 0           0
vdd_ldo9                enabled     voltage     0           3000000
 3000000     3000000
LDO9                                            0           0
 0           0

Powerdebug output using BUCK3.
--------------------------------------------------------------------------------------------------------------------------
PowerDebug 0.7.3     Clocks  Regulators  Sensors  Gpio
Name        Status      State       Type        Users       Microvolts
 Min u-volts Max u-volts
LDO21                   disabled    voltage     0           1800000
 0           0
LDO22                   disabled    voltage     0           1200000
 0           0
LDO23                   enabled     voltage     0           1100000
 0           0
tsp_io                  enabled     voltage     0           2800000
 2800000     2800000
LDO24                                           0           0
 0           0
LDO25                   disabled    voltage     0           1800000
 0           0
vdd_ldo26               enabled     voltage     0           3000000
 3000000     3000000
LDO26                                           0           0
 0           0
LDO27                   enabled     voltage     0           1000000
 0           0
LDO28                   disabled    voltage     0           3300000
 0           0
LDO29                   disabled    voltage     0           1800000
 0           0
LDO30                   disabled    voltage     0           1800000
 0           0
LDO31                   disabled    voltage     0           1800000
 0           0
LDO32                   disabled    voltage     0           1800000
 0           0
LDO33                   disabled    voltage     0           1800000
 0           0
LDO34                   disabled    voltage     0           3000000
 0           0
LDO35                   disabled    voltage     0           1600000
 0           0
LDO36                   disabled    voltage     0           1800000
 0           0
LDO37                   disabled    voltage     0           1800000
 0           0
LDO38                   disabled    voltage     0           2800000
 0           0
vdd_mif                 enabled     voltage     0           1100000
 800000      1300000
BUCK1                                           0           0
 0           0
vdd_arm                 enabled     voltage     0           1000000
 800000      1500000
BUCK2                                           0           0
 0           0
vdd_int                 enabled     voltage     0           1000000
 800000      1400000
tmu         okay                                0           0
 0           0
tmu         okay                                0           0
 0           0
tmu         okay                                0           0
 0           0
tmu         okay                                0           0
 0           0
tmu         okay                                0           0
 0           0
BUCK3                                           0           0
 0           0
vdd_g3d                 enabled     voltage     0           1000000
 800000      1400000
BUCK4                                           0           0
 0           0
vdd_mem                 enabled     voltage     0           1200000
 800000      1400000
BUCK5                                           0           0
 0           0
vdd_kfc                 enabled     voltage     0           1025000
 800000      1500000

So I would like to go with LDO7.

Please share your thoughts.

-Anand Moon

  reply	other threads:[~2015-05-23 17:35 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13  6:36 v5 Exynos5422 odroidxu3 pwm-fan control using thermal sensors Anand Moon
2015-05-13  6:36 ` [PATCHv5 1/5] ARM: dts: exynos5422-odroidxu3 Add pwm-fan node to the Odroid-XU3 board Anand Moon
2015-05-13  7:11   ` Krzysztof Kozlowski
     [not found]     ` <CAJKOXPefJwqvfZPDovQ6EjEOBfuJkidgeYDF_=KC9O+=2=_KoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-13  7:46       ` Anand Moon
2015-06-14  5:31         ` Krzysztof Kozlowski
2015-06-14  5:35           ` Anand Moon
2015-05-13  8:17     ` [PATCHv5 1/5] ARM: dts: exynos5422-odroidxu3 Add pwm-fan node tothe " Kukjin Kim
2015-05-13  6:36 ` [PATCHv5 2/5] ARM: dts: Odroid-XU3 Enable TMU at Exynos5422 base Anand Moon
     [not found]   ` <1431499020-3912-3-git-send-email-linux.amoon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13  7:21     ` Krzysztof Kozlowski
2015-05-13  8:21       ` Anand Moon
2015-05-13  8:32         ` Krzysztof Kozlowski
     [not found]           ` <CAJKOXPfC9nGEsYJ3qJ6m_iMsB=D8_6sOEpLQzEvmLry5zS5j3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-13  8:45             ` Anand Moon
2015-05-14 16:16             ` Anand Moon
2015-05-15  0:12               ` Krzysztof Kozlowski
     [not found]                 ` <CAJKOXPd_1rTZZCz66nQKidUOOEBmgUD+05fHUBvXN-VuD5mTCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-15  1:36                   ` Anand Moon
2015-05-19  7:28                   ` Anand Moon
     [not found]                     ` <CANAwSgTbjmSxhJj4o2pnD5pR2V9JbQ3az+TSSCDwgwNnvF7P9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-19  7:42                       ` Krzysztof Kozlowski
     [not found]                         ` <CADoNuNfuDCn_vvACc0=xj0MjdKr4pYcj_-Xh0--Q8_qciuW5YA@mail.gmail.com>
2015-05-20 14:59                           ` Anand Moon
2015-05-21  0:03                             ` Krzysztof Kozlowski
2015-05-23 17:35                               ` Anand Moon [this message]
2015-05-24  4:33                                 ` Krzysztof Kozlowski
2015-05-24  5:19                                   ` Anand Moon
2015-05-13  6:36 ` [PATCHv5 3/5] ARM: dts: define default thermal-zones for exynos5422 Anand Moon
2015-05-13  7:23   ` Krzysztof Kozlowski
     [not found]     ` <CAJKOXPerF9xgGzFuU+HC_9QaOAAMkoQo2DxH0Y=NwLJ7TMWH0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-13  8:02       ` Krzysztof Kozlowski
2015-05-13 13:16         ` Lukasz Majewski
2015-05-13  6:36 ` [PATCHv5 4/5] ARM: dts: exynos5420 update the cooling cells for core cpu0 Anand Moon
2015-05-13  7:31   ` Krzysztof Kozlowski
2015-05-13  7:58     ` Anand Moon
2015-05-13  8:05       ` Krzysztof Kozlowski
2015-05-13 10:07     ` Anand Moon
     [not found]       ` <CANAwSgTdQk6BGD4xxB6k=p=YOV+CHv_+Q_bSyrxiPsdXVps92g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-13 10:12         ` Krzysztof Kozlowski
2015-05-13 11:01           ` Anand Moon
2015-05-13  6:37 ` [PATCHv5 5/5] ARM: dts: Enable thermal_zone for exynos5422-odroidxu3 Anand Moon
2015-05-13  7:40   ` Krzysztof Kozlowski
2015-05-13  8:39     ` Anand Moon
2015-05-13 10:05       ` Krzysztof Kozlowski

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='CANAwSgQzYvmquo9fcUPLK5XHqo1G=HYHc-YuhUvtw2yYaDi9GA@mail.gmail.com' \
    --to=linux.amoon@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene@kernel.org \
    --cc=l.majewski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linux@roeck-us.net \
    --cc=m.reichl@fivetechno.de \
    --cc=sjoerd.simons@collabora.co.uk \
    --cc=tobetter@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).