Loading Documentation/devicetree/bindings/arm/msm/cpr-regulator.txt +8 −0 Original line number Diff line number Diff line Loading @@ -140,7 +140,15 @@ Optional properties: 1 => equal to PVS corner ceiling voltage 2 => equal to slow speed corner ceiling 3 => equal to qcom,vdd-mx-vmax 4 => equal to VDD_APC corner mapped vdd-mx voltage This is required when vdd-mx-supply is present. - qcom,vdd-mx-corner-map: Array of 3 elements which defines the mapping from VDD_APC fuse voltage corners to vdd-mx-supply voltages. The 3 elements with index[0..2] are: [0] => voltage to set for vdd-mx when VDD_APC is running at SVS corner [1] => voltage to set for vdd-mx when VDD_APC is running at NOM corner [2] => voltage to set for vdd-mx when VDD_APC is running at TURBO corner This is required when the qcom,vdd-mx-vmin-method property has a value of 4. - qcom,cpr-fuse-redun-bp-cpr-disable: Redundant bit position of the bit to indicate if CPR should be disable - qcom,cpr-fuse-redun-bp-scheme: Redundant bit position of the bit to indicate if it's a global/local scheme This property is required if cpr-fuse-redun-bp-cpr-disable Loading arch/arm/mach-msm/cpr-regulator.c +17 −1 Original line number Diff line number Diff line Loading @@ -188,6 +188,7 @@ struct cpr_regulator { int vdd_mx_vmax; int vdd_mx_vmin_method; int vdd_mx_vmin; int vdd_mx_corner_map[CPR_FUSE_CORNER_MAX]; /* CPR parameters */ u64 cpr_fuse_bits; Loading Loading @@ -511,6 +512,9 @@ static int cpr_mx_get(struct cpr_regulator *cpr_vreg, int corner, int apc_volt) case VDD_MX_VMIN_MX_VMAX: vdd_mx = cpr_vreg->vdd_mx_vmax; break; case VDD_MX_VMIN_APC_CORNER_MAP: vdd_mx = cpr_vreg->vdd_mx_corner_map[fuse_corner]; break; default: vdd_mx = 0; break; Loading Loading @@ -1244,11 +1248,23 @@ static int cpr_apc_init(struct platform_device *pdev, pr_err("vdd-mx-vmin-method missing: rc=%d\n", rc); return rc; } if (cpr_vreg->vdd_mx_vmin_method > VDD_MX_VMIN_MX_VMAX) { if (cpr_vreg->vdd_mx_vmin_method > VDD_MX_VMIN_APC_CORNER_MAP) { pr_err("Invalid vdd-mx-vmin-method(%d)\n", cpr_vreg->vdd_mx_vmin_method); return -EINVAL; } rc = of_property_read_u32_array(of_node, "qcom,vdd-mx-corner-map", &cpr_vreg->vdd_mx_corner_map[1], CPR_FUSE_CORNER_MAX - 1); if (rc && cpr_vreg->vdd_mx_vmin_method == VDD_MX_VMIN_APC_CORNER_MAP) { pr_err("qcom,vdd-mx-corner-map missing: rc=%d\n", rc); return rc; } } return 0; Loading include/linux/regulator/cpr-regulator.h +4 −1 Original line number Diff line number Diff line /* * Copyright (c) 2013, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -60,12 +60,15 @@ enum apc_pvs_process_enum { * %VDD_MX_VMIN_APC_SLOW_CORNER_CEILING: * Equal to slow speed corner ceiling * %VDD_MX_VMIN_MX_VMAX: Equal to specified vdd-mx-vmax voltage * %VDD_MX_VMIN_APC_CORNER_MAP: Equal to the APC corner mapped MX * voltage */ enum vdd_mx_vmin_method { VDD_MX_VMIN_APC, VDD_MX_VMIN_APC_CORNER_CEILING, VDD_MX_VMIN_APC_SLOW_CORNER_CEILING, VDD_MX_VMIN_MX_VMAX, VDD_MX_VMIN_APC_CORNER_MAP, }; #ifdef CONFIG_MSM_CPR_REGULATOR Loading Loading
Documentation/devicetree/bindings/arm/msm/cpr-regulator.txt +8 −0 Original line number Diff line number Diff line Loading @@ -140,7 +140,15 @@ Optional properties: 1 => equal to PVS corner ceiling voltage 2 => equal to slow speed corner ceiling 3 => equal to qcom,vdd-mx-vmax 4 => equal to VDD_APC corner mapped vdd-mx voltage This is required when vdd-mx-supply is present. - qcom,vdd-mx-corner-map: Array of 3 elements which defines the mapping from VDD_APC fuse voltage corners to vdd-mx-supply voltages. The 3 elements with index[0..2] are: [0] => voltage to set for vdd-mx when VDD_APC is running at SVS corner [1] => voltage to set for vdd-mx when VDD_APC is running at NOM corner [2] => voltage to set for vdd-mx when VDD_APC is running at TURBO corner This is required when the qcom,vdd-mx-vmin-method property has a value of 4. - qcom,cpr-fuse-redun-bp-cpr-disable: Redundant bit position of the bit to indicate if CPR should be disable - qcom,cpr-fuse-redun-bp-scheme: Redundant bit position of the bit to indicate if it's a global/local scheme This property is required if cpr-fuse-redun-bp-cpr-disable Loading
arch/arm/mach-msm/cpr-regulator.c +17 −1 Original line number Diff line number Diff line Loading @@ -188,6 +188,7 @@ struct cpr_regulator { int vdd_mx_vmax; int vdd_mx_vmin_method; int vdd_mx_vmin; int vdd_mx_corner_map[CPR_FUSE_CORNER_MAX]; /* CPR parameters */ u64 cpr_fuse_bits; Loading Loading @@ -511,6 +512,9 @@ static int cpr_mx_get(struct cpr_regulator *cpr_vreg, int corner, int apc_volt) case VDD_MX_VMIN_MX_VMAX: vdd_mx = cpr_vreg->vdd_mx_vmax; break; case VDD_MX_VMIN_APC_CORNER_MAP: vdd_mx = cpr_vreg->vdd_mx_corner_map[fuse_corner]; break; default: vdd_mx = 0; break; Loading Loading @@ -1244,11 +1248,23 @@ static int cpr_apc_init(struct platform_device *pdev, pr_err("vdd-mx-vmin-method missing: rc=%d\n", rc); return rc; } if (cpr_vreg->vdd_mx_vmin_method > VDD_MX_VMIN_MX_VMAX) { if (cpr_vreg->vdd_mx_vmin_method > VDD_MX_VMIN_APC_CORNER_MAP) { pr_err("Invalid vdd-mx-vmin-method(%d)\n", cpr_vreg->vdd_mx_vmin_method); return -EINVAL; } rc = of_property_read_u32_array(of_node, "qcom,vdd-mx-corner-map", &cpr_vreg->vdd_mx_corner_map[1], CPR_FUSE_CORNER_MAX - 1); if (rc && cpr_vreg->vdd_mx_vmin_method == VDD_MX_VMIN_APC_CORNER_MAP) { pr_err("qcom,vdd-mx-corner-map missing: rc=%d\n", rc); return rc; } } return 0; Loading
include/linux/regulator/cpr-regulator.h +4 −1 Original line number Diff line number Diff line /* * Copyright (c) 2013, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -60,12 +60,15 @@ enum apc_pvs_process_enum { * %VDD_MX_VMIN_APC_SLOW_CORNER_CEILING: * Equal to slow speed corner ceiling * %VDD_MX_VMIN_MX_VMAX: Equal to specified vdd-mx-vmax voltage * %VDD_MX_VMIN_APC_CORNER_MAP: Equal to the APC corner mapped MX * voltage */ enum vdd_mx_vmin_method { VDD_MX_VMIN_APC, VDD_MX_VMIN_APC_CORNER_CEILING, VDD_MX_VMIN_APC_SLOW_CORNER_CEILING, VDD_MX_VMIN_MX_VMAX, VDD_MX_VMIN_APC_CORNER_MAP, }; #ifdef CONFIG_MSM_CPR_REGULATOR Loading