static struct rpm_vreg_parts switch_parts = { .request_len = 1, .enable_state = REQUEST_MEMBER(0, 0x00000001, 0), .pd = REQUEST_MEMBER(0, 0x00000002, 1), .pc = REQUEST_MEMBER(0, 0x0000003C, 2), .pf = REQUEST_MEMBER(0, 0x000003C0, 6), .hpm = REQUEST_MEMBER(0, 0x00000C00, 10), }; static struct rpm_vreg_parts corner_parts = { .request_len = 1, .uV = REQUEST_MEMBER(0, 0x00000003, 0), }; static struct vreg_range pldo_ranges[] = { VOLTAGE_RANGE( 750000, 1487500, 12500), VOLTAGE_RANGE(1500000, 3075000, 25000), VOLTAGE_RANGE(3100000, 4900000, 50000), }; static struct vreg_range nldo_ranges[] = { VOLTAGE_RANGE( 750000, 1537500, 12500), }; static struct vreg_range nldo1200_ranges[] = { VOLTAGE_RANGE( 375000, 743750, 6250), VOLTAGE_RANGE( 750000, 1537500, 12500), }; static struct vreg_range smps_ranges[] = { VOLTAGE_RANGE( 375000, 737500, 12500),
.request_len = 1, .enable_state = REQUEST_MEMBER(0, 0x00000001, 0), .pd = REQUEST_MEMBER(0, 0x00000002, 1), .pc = REQUEST_MEMBER(0, 0x0000003C, 2), .pf = REQUEST_MEMBER(0, 0x000003C0, 6), .hpm = REQUEST_MEMBER(0, 0x00000C00, 10), }; static struct rpm_vreg_parts corner_parts = { .request_len = 1, .uV = REQUEST_MEMBER(0, 0x00000003, 0), }; /* Physically available PMIC regulator voltage setpoint ranges */ static struct vreg_range pldo_ranges[] = { VOLTAGE_RANGE( 750000, 1487500, 12500), VOLTAGE_RANGE(1500000, 3075000, 25000), VOLTAGE_RANGE(3100000, 4900000, 50000), }; static struct vreg_range nldo_ranges[] = { VOLTAGE_RANGE( 750000, 1537500, 12500), }; static struct vreg_range nldo1200_ranges[] = { VOLTAGE_RANGE( 375000, 743750, 6250), VOLTAGE_RANGE( 750000, 1537500, 12500), }; static struct vreg_range ln_ldo_ranges[] = { VOLTAGE_RANGE( 690000, 1110000, 60000),
.pc = REQUEST_MEMBER(0, 0x0000003C, 2), .pf = REQUEST_MEMBER(0, 0x000003C0, 6), .hpm = REQUEST_MEMBER(0, 0x00000C00, 10), }; static struct rpm_vreg_parts ncp_parts = { .request_len = 1, .uV = REQUEST_MEMBER(0, 0x007FFFFF, 0), .enable_state = REQUEST_MEMBER(0, 0x00800000, 23), .comp_mode = REQUEST_MEMBER(0, 0x01000000, 24), .freq = REQUEST_MEMBER(0, 0x3E000000, 25), }; /* Physically available PMIC regulator voltage setpoint ranges */ static struct vreg_range pldo_ranges[] = { VOLTAGE_RANGE( 750000, 1487500, 12500), VOLTAGE_RANGE(1500000, 3075000, 25000), VOLTAGE_RANGE(3100000, 4900000, 50000), }; static struct vreg_range nldo_ranges[] = { VOLTAGE_RANGE( 750000, 1537500, 12500), }; static struct vreg_range nldo1200_ranges[] = { VOLTAGE_RANGE( 375000, 743750, 6250), VOLTAGE_RANGE( 750000, 1537500, 12500), }; static struct vreg_range ln_ldo_ranges[] = { VOLTAGE_RANGE( 690000, 1110000, 60000),
.pc = REQUEST_MEMBER(0, 0x0000003C, 2), .pf = REQUEST_MEMBER(0, 0x000000C0, 6), .hpm = REQUEST_MEMBER(0, 0x00000300, 8), }; static struct rpm_vreg_parts ncp_parts = { .request_len = 1, .mV = REQUEST_MEMBER(0, 0x00000FFF, 0), .enable_state = REQUEST_MEMBER(0, 0x00001000, 12), .comp_mode = REQUEST_MEMBER(0, 0x00002000, 13), .freq = REQUEST_MEMBER(0, 0x003FC000, 14), }; /* Physically available PMIC regulator voltage setpoint ranges */ static struct vreg_range pldo_ranges[] = { VOLTAGE_RANGE( 750000, 1487500, 12500), VOLTAGE_RANGE(1500000, 3075000, 25000), VOLTAGE_RANGE(3100000, 4900000, 50000), }; static struct vreg_range nldo_ranges[] = { VOLTAGE_RANGE( 750000, 1537500, 12500), }; static struct vreg_range smps_ranges[] = { VOLTAGE_RANGE( 375000, 737500, 12500), VOLTAGE_RANGE( 750000, 1487500, 12500), VOLTAGE_RANGE(1500000, 3075000, 25000), }; static struct vreg_range ftsmps_ranges[] = {
.freq = REQUEST_MEMBER(1, 0x1F000000, 24), .freq_clk_src = REQUEST_MEMBER(1, 0x60000000, 29), }; static struct rpm_vreg_parts switch_parts = { .request_len = 1, .enable_state = REQUEST_MEMBER(0, 0x00000001, 0), .pd = REQUEST_MEMBER(0, 0x00000002, 1), .pc = REQUEST_MEMBER(0, 0x0000003C, 2), .pf = REQUEST_MEMBER(0, 0x000003C0, 6), .hpm = REQUEST_MEMBER(0, 0x00000C00, 10), }; /* Physically available PMIC regulator voltage setpoint ranges */ static struct vreg_range pldo_ranges[] = { VOLTAGE_RANGE( 750000, 1487500, 12500), VOLTAGE_RANGE(1500000, 3075000, 25000), VOLTAGE_RANGE(3100000, 4900000, 50000), }; static struct vreg_range nldo_ranges[] = { VOLTAGE_RANGE( 750000, 1537500, 12500), }; static struct vreg_range nldo1200_ranges[] = { VOLTAGE_RANGE( 375000, 743750, 6250), VOLTAGE_RANGE( 750000, 1537500, 12500), }; static struct vreg_range smps_ranges[] = { VOLTAGE_RANGE( 375000, 737500, 12500),
#define SET_POINTS(_ranges) \ { \ .range = _ranges, \ .count = ARRAY_SIZE(_ranges), \ }; /* * These tables contain the physically available PMIC regulator voltage setpoint * ranges. Where two ranges overlap in hardware, one of the ranges is trimmed * to ensure that the setpoints available to software are monotonically * increasing and unique. The set_voltage callback functions expect these * properties to hold. */ static struct qpnp_voltage_range pldo_ranges[] = { VOLTAGE_RANGE(2, 750000, 750000, 1537500, 12500), VOLTAGE_RANGE(3, 1500000, 1550000, 3075000, 25000), VOLTAGE_RANGE(4, 1750000, 3100000, 4900000, 50000), }; static struct qpnp_voltage_range nldo1_ranges[] = { VOLTAGE_RANGE(2, 750000, 750000, 1537500, 12500), }; static struct qpnp_voltage_range nldo2_ranges[] = { VOLTAGE_RANGE(1, 375000, 375000, 768750, 6250), VOLTAGE_RANGE(2, 750000, 775000, 1537500, 12500), }; static struct qpnp_voltage_range smps_ranges[] = { VOLTAGE_RANGE(0, 375000, 375000, 1562500, 12500),