24 May, 2019

8 commits

  • When calculate the temperature in millicelsius, the tenths are
    handled incorrectly.

    Signed-off-by: Ye Li
    Acked-by: Peng Fan
    (cherry picked from commit 72796a2e138bb7b5b4db9f771a3f9b823b66ade5)
    (cherry picked from commit 1288dc25fb849c98b01dce0b130d83cf33939c6b)

    Ye Li
     
  • Since the DRC_0 thermal is disabled by SCFW, we should use SC_R_SYSTEM for
    CPU thermal. Update the resources table to align with kernel.

    Signed-off-by: Ye Li
    (cherry picked from commit 3f8e5aaa173b5d3cdf05df7867cdca8776854fd6)
    (cherry picked from commit c1e72c232d85a662c2ddb2bc9601132d8dd4fb18)

    Ye Li
     
  • On iMX8MM, the V flag in TRISTR register only reflect the state of SNSR
    value, not the calibrated TEMP value. So checking this flag is not
    reliable. Per IC suggestion, change to read the TEMP/AVG_TEMP directly
    and check whether it in valid range 10-125C.

    Signed-off-by: Ye Li
    (cherry picked from commit fe41c5fa6af88cce7f5a9723c82d6ad4e61357ce)

    Ye Li
     
  • When the temperature is out of sensor's range, the Valid bit won't be
    set in TRITSR register. So the polling loop won't go out.

    Change the codes to retry 10 times with 100ms interval for the Valid bit.
    If the timeout, we give a warning for the invalid data.

    Signed-off-by: Ye Li
    Reviewed-by: Bai Ping
    (cherry picked from commit 7ea2168e06d4f77a872f51a167ee1ed6bf2b0632)

    Ye Li
     
  • Since imx8mm TMU needs to load some registers from fuse, this is arch
    dependent operation and may vary on different platforms. So add
    a interface for arch level initialization.

    Signed-off-by: Ye Li
    (cherry picked from commit 1a66350d1baeef355d51da609c505aebb233cefb)

    Ye Li
     
  • The analog sensors on iMX8MM are new, used for 14LPP process. So the
    Temperature Sensor Monitoring Unit (TMU) has some change accordingly.
    We use version 2 in TMU driver to represent the new TMU, so the one driver
    can service for both MQ and MM.

    Signed-off-by: Ye Li
    (cherry picked from commit 86fab918e607221249acc5c9a8f8eca01c17ec37)
    (cherry picked from commit f68b8d4e0b256d376fd4ea8f1f4be0334327eca1)

    Ye Li
     
  • Porting the TMU driver from kernel and supporting DM in the driver.
    Users need to provide the TMU node and sensors nodes in DTB.

    Signed-off-by: Ye Li
    Acked-by: Peng Fan
    (cherry picked from commit f883de99b93de8c2fadd382d8cf961667bacd038)
    (cherry picked from commit 8e09d0f0ab33d9a52098546b147d41c4c2598c0d)

    Ye Li
     
  • Add the DM thermal driver for i.MX8QM and QXP. The driver depends on DTB thermal
    sensor nodes. Will create device for each thermal in thermal-zones. User can
    use the thermal name to get the device from UCLASS_THERMAL.

    The driver flag is set to DM_FLAG_PRE_RELOC, to support run it at early stage,
    need add "u-boot,dm-pre-reloc" property to the thermal node.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit 98005e0b5a46bd17160fac18be2374c15dba54f9)
    (cherry picked from commit 0873cbf1aa61d9398b66c9e073ca8434717de131)

    Ye Li
     

07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

21 Nov, 2017

1 commit


18 May, 2017

2 commits

  • Fix calculation. do_div can not handle negative values.
    Use div_s64_rem to handle the calculation.

    Signed-off-by: Peng Fan
    Cc: Stefano Babic

    Peng Fan
     
  • >From IC guys:
    "
    After a thorough accuracy study of the Temp sense circuit,
    we found that with our current equation, an average part can
    read 7 degrees lower than a known forced temperature.
    We also found out that the standard variance was around 2C;
    which is the tightest distribution that we could create.
    We need to change the temp sense equation to center the average
    part around the target temperature.
    "

    New equation:
    Tmeas = (Nmeas - n1) / slope + t1 + offset
    n1= fused room count
    t1= 25
    offset=3.580661
    slope= 0.4148468 – 0.0015423*n1

    According the new equation, update the thermal driver.
    c1 and c2 changed to u64 type and update comments.

    Signed-off-by: Peng Fan
    Cc: Stefano Babic

    Peng Fan
     

03 Jan, 2017

1 commit


26 Oct, 2016

1 commit


06 May, 2016

1 commit


08 Jan, 2016

1 commit


13 Sep, 2015

3 commits


10 Jul, 2015

2 commits


26 May, 2015

1 commit

  • The CPU temperature grade from OTP is now used to define the critical
    threshold at which point we busyloop until we are below, however this
    threshold is still too low.

    Instead of 20C below the max CPU temperature, change it to 5C defined now
    by TEMPERATURE_HOT_DETLA for clarity. Rename 'passive' to 'critical'
    as that better defines our use case here. Additionally change the output
    of the busyloop message to show the max CPU temperature as well as current.

    Before:
    CPU Temperature is 101 C, too hot to boot, waiting...
    CPU Temperature is 101 C, too hot to boot, waiting...

    After:
    CPU Temperature (101C) too close to max (105C) waiting...
    CPU Temperature (101C) too close to max (105C) waiting...

    Cc: Stefan Roese
    Cc: Eric Nelson
    Cc: Heiko Schocher
    Cc: Nikita Kiryanov
    Cc: Jon Nettleton
    Cc: Jason Liu
    Cc: Ye Li
    Cc: Fabio Estevam
    Cc: Christian Gmeiner
    Cc: Markus Niebel
    Cc: Peng Fan
    Signed-off-by: Tim Harvey

    Tim Harvey
     

19 May, 2015

1 commit


13 Feb, 2015

1 commit


01 Dec, 2014

1 commit

  • Printing the calibration data on every boot does not provide really useful
    information:

    U-Boot 2015.01-rc1-18266-ge7eb277 (Nov 24 2014 - 11:29:51)

    CPU: Freescale i.MX6Q rev1.2 at 792 MHz
    CPU: Thermal calibration data: 0x5d85067d
    CPU: Temperature 33 C
    Reset cause: POR
    Board: MX6-SabreSD

    Do not display the calibration data in order to have a cleaner boot log.

    Signed-off-by: Fabio Estevam

    Fabio Estevam
     

21 Nov, 2014

1 commit