14 Oct, 2015

1 commit

  • In kernel late init, it turns off all unused clocks, which
    needs to access subsystem registers such as VENC and VENC_LT.

    Accessing MT8173 VENC registers needs two top clocks, mm_sel and
    venc_sel. Accessing VENC_LT registers needs mm_sel and venclt_sel.
    So we need to keep these clocks on before accessing their registers.

    This patch keeps venc_sel / venclt_sel clock on when
    VENC / VENC_LT's power is on, to prevent system hang up while
    accessing its registeres.

    Signed-off-by: James Liao
    Signed-off-by: Matthias Brugger

    James Liao
     

27 Sep, 2015

2 commits


05 Aug, 2015

1 commit


10 Jul, 2015

1 commit


07 Jul, 2015

2 commits

  • This adds a power domain driver for the Mediatek SCPSYS unit.

    The System Control Processor System (SCPSYS) has several power
    management related tasks in the system. The tasks include thermal
    measurement, dynamic voltage frequency scaling (DVFS), interrupt
    filter and lowlevel sleep control. The System Power Manager (SPM)
    inside the SCPSYS is for the MTCMOS power domain control.

    For now this driver only adds power domain support, the more
    advanced features are not yet supported. The driver implements
    the generic PM domain device tree bindings, the first user will
    most likely be the Mediatek AFE audio driver.

    Signed-off-by: Sascha Hauer
    Reviewed-by: Daniel Kurtz
    Signed-off-by: Matthias Brugger

    Sascha Hauer
     
  • This adds support for some miscellaneous bits of the infracfg controller.
    The mtk_infracfg_set/clear_bus_protection functions are necessary for
    the scpsys power domain driver to handle the bus protection bits which
    are contained in the infacfg register space.

    Signed-off-by: Sascha Hauer
    Reviewed-by: Daniel Kurtz
    Signed-off-by: Matthias Brugger

    Sascha Hauer
     

27 May, 2015

3 commits

  • The pmic-wrapper calls the reset controller. If CONFIG_RESET_CONTROLLER
    is not set, compilation fails with:
    drivers/soc/mediatek/mtk-pmic-wrap.c: In function ‘pwrap_probe’:
    drivers/soc/mediatek/mtk-pmic-wrap.c:836:2: error: implicit declaration of function ‘devm_reset_control_get’ [-Werror=implicit-function-declaration]

    This patch sets the dependency in the Kconfig file.

    Signed-off-by: Matthias Brugger

    Matthias Brugger
     
  • When the PMIC wrapper state machine has read a register it goes into the
    "wait for valid clear" (vldclr) state. The state machine stays in this
    state until the VLDCLR bit is written to. We should write this bit after
    reading a register because the SCPSYS won't let the system go into
    suspend as long as the state machine waits for valid clear.

    Since now we never leave the state machine in vldclr state we no longer
    have to check for this state on pwrap_read/pwrap_write entry and can
    remove the corresponding code.

    Signed-off-by: Sascha Hauer
    Signed-off-by: Matthias Brugger

    Sascha Hauer
     
  • replace chipselect extension values based on SPI clock with hardcoded SoC
    specific values.

    The PMIC wrapper has the ability of extending the chipselects by configurable
    amounts of time. We configured the values based on the rate of SPI clock, but
    this is wrong. The delays should be configured based on the internal PMIC clock
    that latches the values from the SPI bus to the internal PMIC registers. By
    default this clock is 24MHz. Other clock frequencies are for debugging only
    and can be removed from the driver.

    Signed-off-by: Sascha Hauer
    Signed-off-by: Matthias Brugger

    Sascha Hauer
     

13 Apr, 2015

1 commit


30 Mar, 2015

1 commit

  • This adds support for the PMIC wrapper found on MediaTek MT8135 and
    MT8173 SoCs. The PMIC wrapper is found on MT6xxx SoCs aswell but these
    are currently not supported.

    On MediaTek MT8135, MT8173 and other SoCs the PMIC is connected via
    SPI. The SPI master interface is not directly visible to the CPU, but
    only through the PMIC wrapper inside the SoC. The communication between
    the SoC and the PMIC can optionally be encrypted. Also a non standard
    Dual IO SPI mode can be used to increase speed. The MT8135 also supports
    a special feature named "IP Pairing". With IP Pairing the pins of some
    SoC internal peripherals can be on the PMIC. The signals of these pins
    are routed over the SPI bus using the pwrap bridge. Because of these
    optional non SPI conform features the PMIC driver is not implemented as
    a SPI bus master driver.

    Signed-off-by: Flora Fu, MediaTek
    Signed-off-by: Sascha Hauer
    Signed-off-by: Matthias Brugger

    Flora Fu