29 Nov, 2011

2 commits


24 Nov, 2011

1 commit

  • With device tree support for regulators, its needed that the
    regulator_dev->dev device has the right of_node attached.
    To be able to do this add an additional parameter to the
    regulator_register() api, wherein the dt-adapted driver can
    then pass this additional info onto the regulator core.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Mark Brown

    Rajendra Nayak
     

22 Jul, 2011

1 commit


30 May, 2011

1 commit

  • The n_voltages initializer for the TWL6030_ADJUSTABLE_LDO macro is
    off by one, causing the the highest supported voltage to be
    unreachable. Setting the machine constraints to only allow the
    highest voltage causes errors:

    machine_constraints_voltage: VAUX3_6030: unsupportable voltage constraints
    twl_reg twl_reg.39: can't register VAUX3_6030, -22
    twl_reg: probe of twl_reg.39 failed with error -22

    This patch fixes the off by one error. Tested by setting
    VAUX3_6030 to 3.3V.

    Signed-off-by: Colin Cross
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Colin Cross
     

27 May, 2011

8 commits

  • Adding support for the twl6025. Major difference in the twl6025 is the
    group functionality has been removed from the chip so this affects how
    regulators are enabled and disabled.

    The names of the regulators also changed.

    The DCDCs of the 6025 are software controllable as well.

    Since V1

    Use the features variable passed via platform data instead of calling
    global function.

    Change the very switch like if statements to be a more readable
    switch statement.

    Since V2

    twl6025 doesn't use remap so remove it from the macros.

    Since V3

    enable/disable functions for 4030/6030 were seperated upstream so rebase
    on top of this. Change DCDC reference to SMPS as this is used in TRM.
    Change list_voltage slightly to have less code.

    Signed-off-by: Graeme Gregory
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Graeme Gregory
     
  • TWL6030: regulator is disabled via VREG_STATE
    TWL4030: regulator is disabled via VREG_GRP
    Since there is nothing common, split twlreg_enable similar to other regulator_ops

    Signed-off-by: Balaji T K
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Balaji T K
     
  • TWL6030: regulator is enabled via VREG_STATE
    TWL4030: regulator is enabled via VREG_GRP
    Since there is nothing common, split twlreg_enable similar to other regulator_ops

    Signed-off-by: Balaji T K
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Balaji T K
     
  • Current set_mode logic does not support 6030. The logic for 4030 is
    not reusable for 6030 as the mode setting for 6030 now uses the new
    CFG_STATE register. We hence rename the old get_status as being
    specific to 4030.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Saquib Herman
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Saquib Herman
     
  • Current get_status logic does not support 6030 get_status.
    The logic for 4030 is not reusable for 6030 as the status
    check for 6030 now depends on the new CFG_STATE register.
    We hence rename the old get_status as being specific to
    4030 and remove the redundant check for the same.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Saquib Herman
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Saquib Herman
     
  • With TWL6030, it is not enough to ensure that the regulator is the
    group of P1 group (CPU/Linux), but we need to check the state as far
    as APP is concerned as well.

    Split the current is_enabled to 6030 and 4030 specific ones. This
    split impacts few macros and variables as well, but sets up the
    stage for further fixes to set_mode and get_status in subsequent
    patches.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Saquib Herman
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Saquib Herman
     
  • TWL6030 does not have remap register. The current implementation
    causes value of remap to be written to state register, accidentally
    causing the regulators which are probed to be switched on as well.
    This is wrong as regulators should be controllable based on calls
    to enable/disable for TWL regulator framework. Further, the values
    initialized make no sense as well. We hence remove this from the
    initalizers and also write to remap register only if the TWL
    is 4030.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Saquib Herman
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Saquib Herman
     
  • TWL6030 requires an additional register write to CFG_STATE register
    to explicitly state that the regulator is in a certain state. Merely
    associating the regulator with the group is not enough. Add the
    required register field definitions and fix the handling for
    TWL6030 enable/disable.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Saquib Herman
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Saquib Herman
     

23 Mar, 2011

1 commit

  • In OMAP4 Blaze and Panda, 32KHz clock to WLAN is supplied from Phoenix
    TWL6030. The 32KHz clock state (ON/OFF) is configured in
    CLK32KG_CFG_[GRP, TRANS, STATE] register. This follows the same register
    programming model as other regulators in TWL6030. So add CLK32KG as pseudo
    regulator.

    Signed-off-by: Balaji T K
    Acked-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Balaji T K
     

12 Jan, 2011

1 commit

  • Change the interface used by set_voltage() to report the selected value
    to the regulator core in terms of a selector used by list_voltage().
    This allows the regulator core to know the voltage that was chosen
    without having to do an explict get_voltage(), which would be much more
    expensive as it will generally access hardware.

    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Mark Brown
     

30 Nov, 2010

1 commit

  • The Singular Message is 16 bits:
    DEV_GRP[15:13] MT[12] RES_ID[11:4] RES_STATE[3:0]

    Current implementation return immedially after sucessfuly write MSB part.
    To properly set mode, we need to write the complete message ( MSB and LSB ).

    In twl.h, now we have defines for PM Master module register offsets,
    use it instead of hard coded 0x15/0x16.

    Use "message & 0xff" to ensure we send correct value for LSB.

    Signed-off-by: Axel Lin
    Acked-by: Mark Brown
    Tested-by: Lesly Arackal Manuel
    Signed-off-by: Liam Girdwood

    Axel Lin
     

25 May, 2010

1 commit

  • All twl6030 regulators can be programmed from 1.0v to 3.3v
    with 100mV steps.
    The below formula can be used to calculate the vsel values
    to be programmed in the VREG_VOLTAGE registers.

    Voltage(in mV) = 1000mv + 100mv * (vsel - 1)

    Ex: if vsel = 0x9, mV = 1000 + 100 * (9 -1) = 1800mV.

    This patch removes all existing VSEL tables for twl6030 adjustable
    regulators and just uses the formula directly for vsel calculations
    after verifing they fall in the allowed range.

    Signed-off-by: Rajendra Nayak
    Cc: Liam Girdwood
    Cc: Samuel Ortiz
    Cc: Mark Brown
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Rajendra Nayak
     

03 Mar, 2010

2 commits

  • Signed-off-by: Dmitry Torokhov
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Dmitry Torokhov
     
  • This is no REMAP register on twl6030, instead there is a STATE register
    to drive a resource to a given state.
    The state register can be used to specify what state the resource should
    enter when its associated with a GRP.
    Register Bit field description is as below. The patch programmes the
    corresponding STATE registers for all LDO's to turn ON when assocaited
    with GRP_P1.

    STATE REG:
    Bit7 |Bit6 |Bit5 |Bit4 |Bit3 |Bit2 |Bit1 |Bit0
    P3_GRP |P2_GRP |P1_GRP |RES |RES |RES |State1 |State0

    State can be specified as below
    00: OFF
    01: ON
    10: OFF
    11: SLEEP

    Signed-off-by: Rajendra Nayak
    Cc: Liam Girdwood
    Cc: Samuel Ortiz
    Cc: Mark Brown
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Rajendra Nayak
     

17 Dec, 2009

6 commits


14 Dec, 2009

4 commits

  • This patch updates the regulator driver to add support
    for TWL6030 PMIC specific LDO regulators.
    SMPS resources are not yet supported for TWL6030 and
    also .set_mode and .get_status for LDO's are yet to
    be implemented for TWL6030.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Balaji T K
    Acked-by: Mark Brown
    Reviewed-by: Tony Lindgren
    Signed-off-by: Samuel Ortiz

    Rajendra Nayak
     
  • This patch renames all twl4030_ functions to twl so that regulator driver
    can be reused by Triton - TWL4030 and Phoenix - TWL6030.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Balaji T K
    Signed-off-by: Santosh Shilimkar
    Acked-by: Kevin Hilman
    Acked-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Rajendra Nayak
     
  • This patch renames function names like twl4030_i2c_write_u8,
    twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8
    and also common variable in twl-core.c

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Balaji T K
    Signed-off-by: Santosh Shilimkar
    Acked-by: Kevin Hilman
    Signed-off-by: Samuel Ortiz

    Balaji T K
     
  • The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030
    for OMAP3. The common modules like RTC, Regulator creates opportunity
    to re-use the most of the code from twl4030.

    This patch renames few common drivers twl4030* files to twl* to enable
    the code re-use.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Balaji T K
    Signed-off-by: Santosh Shilimkar
    Acked-by: Kevin Hilman
    Signed-off-by: Samuel Ortiz

    Santosh Shilimkar