1. 15 Sep, 2016 3 commits
    • Jeenu Viswambharan's avatar
      CSS: Implement support for NODE_HW_STATE · 3cc17aae
      Jeenu Viswambharan authored
      This patch implements CSS platform hook to support NODE_HW_STATE PSCI
      API. The platform hook queries SCP to obtain CSS power state. Power
      states returned by SCP are then converted to expected PSCI return codes.
      
      Juno's PSCI operation structure is modified to use the CSS
      implementation.
      
      Change-Id: I4a5edac0e5895dd77b51398cbd78f934831dafc0
      3cc17aae
    • Jeenu Viswambharan's avatar
      SCPI: Add function to query CSS power state · 05b128f2
      Jeenu Viswambharan authored
      This patch adds the function scpi_get_css_power_state to perform the
      'Get CSS Power State' SCP command and handle its response. The function
      parses SCP response to obtain power states of requested cluster and CPUs
      within.
      
      Change-Id: I3ea26e48dff1a139da73f6c1e0893f21accaf9f0
      05b128f2
    • Jeenu Viswambharan's avatar
      FVP: Implement support for NODE_HW_STATE · 1298ae02
      Jeenu Viswambharan authored
      This patch implements FVP platform hook to support NODE_HW_STATE PSCI
      API. The platform hook validates the given MPIDR and reads corresponding
      status from FVP power controller, and returns expected values for the
      PSCI call.
      
      Change-Id: I286c92637da11858db2c8aba8ba079389032de6d
      1298ae02
  2. 13 Sep, 2016 16 commits
  3. 12 Sep, 2016 1 commit
    • Leon Chen's avatar
      Support for Mediatek MT6795 SoC · c1ff80b1
      Leon Chen authored
      This patch support single core to boot to Linux kernel
      through Trusted Firmware.
      It also support 32 bit kernel and 64 bit kernel booting.
      c1ff80b1
  4. 09 Sep, 2016 5 commits
    • Caesar Wang's avatar
      rockchip: fixes some typo · 7e1bedb6
      Caesar Wang authored
      As the checkpatch reports the warning or error.
      
      plat/rockchip/common/plat_pm.c:96:
      ERROR: do not set execute permissions for source files
      plat/rockchip/rk3399/drivers/pmu/pmu.c:294:
      ERROR: do not set execute permissions for source files
      
      plat/rockchip/common/plat_pm.c:286: WARNING: line over 80 characters
      plat/rockchip/common/plat_pm.c:287: WARNING: line over 80 characters
      
      Change-Id: Ib347da21c56551c31df3f90f03777b13c75d5c26
      7e1bedb6
    • Caesar Wang's avatar
      rockchip: SIP call use 32 bit return value for rk3399 · a8656400
      Caesar Wang authored
      for compatible 32bit and 64bit, we use 0x82xxxxxx as function ID,
      we modify SIP call function return value to 32 bit.
      
      Change-Id: Ib99b03a9ea423853aaa296dcc634ee82c622a552
      a8656400
    • Caesar Wang's avatar
      rockchip: set gpio2 ~ gpio4 to input and pull none mode · 2bff35bb
      Caesar Wang authored
      For save power cosumption, if gpio power supply shut down, we need to
      set gpio2 ~ gpio4 to input and HiZ status when suspend, and recovery
      they status when rusume. we do it base on apio pass from loader.
      
      Change-Id: I59fd2395e5e37e63425472a39f519822c9197e4c
      2bff35bb
    • Caesar Wang's avatar
      rockchip: support disable/enable specific gpio when suspend/resume · e550c631
      Caesar Wang authored
      some specific board need to disable/enable specific gpio when
      suspend/resume, so we add this function, bootloader can pass the
      specific gpio, and we can handle these gpios in bl31 suspend/resuem
      function.
      
      Change-Id: I373b03ef9202ee4a05a2b9caacdfa01b47ee2177
      e550c631
    • Caesar Wang's avatar
      rockchip/rk3399: improve gpio driver and support get pull mode function · 536c2492
      Caesar Wang authored
      We may need gpio pull mode later, so add this function.
      Besides fix a set pull mode bug, and save gpio clock gate,
      when operate the gpio, we will enable gpio clock, when
      finish gpio operate, restore gpio clock gate status.
      
      Change-Id: Ia1d602804f571a17f5ddc499908663b968b02974
      536c2492
  5. 08 Sep, 2016 1 commit
    • Tony Xie's avatar
      rockchip: fix the scu idle for rk3399 · 63ebf051
      Tony Xie authored
      As rk3399 reported the d8/octane scores drop 10% with cpu idle.
      The root cause is thc cpu cluster enter the slow mode.
      We don't need switch the clock to 24MHz if cpu cluster enter the
      retention mode. In order to improve performance, it just needs for
      cluster enter powering off mode.
      
      Also, we shouldn't do anything for hlvl if the system is off.
      
      Change-Id: I2a02962a01343abd0cba47ed63192c1cdf88b119
      63ebf051
  6. 25 Aug, 2016 5 commits
  7. 24 Aug, 2016 1 commit
    • Caesar Wang's avatar
      rockchip: on rk3399 init the PMU counts at boot; set 24M/32k properly · 0786d688
      Caesar Wang authored
      In a previous change we mistakenly thought that PMU_24M_EN_CFG directly
      controlled whether the PMU counts ran off the 32k vs. 24M clock.
      Apparently that's not true.  Real logic is now documented in code.
      
      Also in the previous change we mistaknely though that PMU_24M_EN_CFG was
      normally supposed to be 1 and we should "restore" it at resume time.
      This is a terrible idea and made the system totally unreliable after
      resume.  Apparently PMU_24M_EN_CFG should always be 0 with all the
      current code and settings.
      
      Let's fix the above two problems.  While we're changing all of this,
      let's also:
      
      1. Init at boot time.  Many of these counts are used when the system is
         running normally.  We want the behavior at boot to match the behavior
         after suspend/resume.
      
      2. Init CPU counts to be 1 us.  Although old code was trying to set this
         to 1 ms (1000x slower) at suspend/resume time, we've been testing the
         kernel with 1 us for a long time now.  That's because the kernel (at
         boot time) set these values to 24.  Let's keep at 24 until we know
         that's wrong.
      
      3. Init GPU counts to be 1 us.  Old code wasn't touching the GPU, but as
         documented in comments it makes sense to init here.  Do it.
      
      4. Document the crap out of this code, since the SoC's behavior is
         confusing and poorly documented in the TRM.
      
      5. Increase some stabilization times to 30 ms (from 3 ms).  It's unclear
         that a full 30 ms is needed, but let's be safe for now.
      
      This also inits the counts for the GPU.
      
      (Thanks to Doug's patch that come from https://crosreview.com/372381)
      
      Change-Id: Id1bc159a5a99916aeab043895e5c4585c4adab22
      0786d688
  8. 19 Aug, 2016 1 commit
    • Sandrine Bailleux's avatar
      Add WFI in platform's unexpected error handlers · 8c9e1af0
      Sandrine Bailleux authored
      This patch adds a WFI instruction in the default implementations of
      plat_error_handler() and plat_panic_handler(). This potentially reduces
      power consumption by allowing the hardware to enter a low-power state.
      The same change has been made to the FVP and Juno platform ports.
      
      Change-Id: Ia4e6e1e5bf1ed42efbba7d0ebbad7be8d5f9f173
      8c9e1af0
  9. 11 Aug, 2016 3 commits
    • Caesar Wang's avatar
      rockchip: fix the reset-hold release for rk3399 resume · 78f7017c
      Caesar Wang authored
      The pmusgrf reset-hold bits needs to be released, since the
      pmusgrf reset-hold bits needs to be held.
      
      Change-Id: Ia1eccc8fba18294f26b4cc07d47bc5e513dd9a1f
      78f7017c
    • Caesar Wang's avatar
      rockchip: fix the power up/dowm cnt for rk3399 · 545bff0e
      Caesar Wang authored
      Sometimes this will cause the long delay for suspend/resume.
      Since the 24M OCS will be turned off in power mode.
      Also, remove the ERROR_DEPRECATED config define.
      
      Change-Id: I78f21c35912c2250972e551695cdacc7bc4c020a
      545bff0e
    • Caesar Wang's avatar
      rockchip: update to handle PWMs for rk3399 · 5d3b1067
      Caesar Wang authored
      This patch updates some things for rk3399, as following:
      
      1) Add the new file to handle the pwm. (e.g. the pwm regulator)
      Make sure that good deal with the pwm related things.
      Also, remove some pwm setting for pmu.c.
      
      2) Set the plls slow mode and bypass in suspend, and restore them.
      
      Change-Id: I112806700bf433c87763aac23d22fa7e6a7f5264
      5d3b1067
  10. 10 Aug, 2016 2 commits
    • Soby Mathew's avatar
      AArch32: Add FVP support for SP_MIN · 181bbd41
      Soby Mathew authored
      This patch implements the support for SP_MIN in FVP. The SP_MIN platform
      APIs are implemented and the required makefile support is added for FVP.
      
      Change-Id: Id50bd6093eccbd5e38894e3fd2b20d5baeac5452
      181bbd41
    • Soby Mathew's avatar
      AArch32: Add essential ARM platform and FVP support · 877cf3ff
      Soby Mathew authored
      This patch adds AArch32 support for FVP and implements common platform APIs
      like `plat_get_my_stack`, `plat_set_my_stack`, `plat_my_core_cos` for AArch32.
      Only Multi Processor(MP) implementations of these functions are considered in
      this patch. The ARM Standard platform layer helpers are implemented for
      AArch32 and the common makefiles are modified to cater for both AArch64 and
      AArch32 builds. Compatibility with the deprecated platform API is not
      supported for AArch32.
      
      Change-Id: Iad228400613eec91abf731b49e21a15bcf2833ea
      877cf3ff
  11. 09 Aug, 2016 1 commit
  12. 28 Jul, 2016 1 commit
    • Caesar Wang's avatar
      rockchip: fixes typo and some bugs for suspend/resume tests · e6517abd
      Caesar Wang authored
      1. Remove the AP_PWROFF in ATF, should configure it in kernel.
      2. Save and restore the PWMs pin/regs for suspend/resume.
      3. The pmusgrf reset-hold bits needs to be released. since the
         pmusgrf reset-hold bits needs to be held.
      4. Configure the PMU power up/down cycles about delay 3ms.
      5. With the MMIO register block as one big mapping.
      6. Fix the build error with psci_entrypoint since PSCI lib updated.
      
      Fixes the commit
      9ec78bdf ("rockchip: support the suspend/resume for rk3399").
      
      Change-Id: I112806700bf433c87763aac23d22fa7e6a7f5264
      e6517abd