Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad05c19f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wcnss: vote for corners for vddmx for msm8909"

parents 2175c279 dbf8cf15
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ in use. subsequently Pronto and IRIS voltage regulator range is configured
according to the ponto HW version
- qcom,is-pronto-v3: boolean flag to determine the pronto hardware version
in use. subsequently correct workqueue will be used by DXE engine to push frames
in TX data path.
in TX data path and correct voting to RPM will be decided for booting.
- qcom,wcnss-pm : <Core rail LDO#, PA rail LDO#, XO settling time,
		   RPM power collapse enabled, standalone power collapse enabled>
	Power manager related parameter for LDO configuration.
+32 −14
Original line number Diff line number Diff line
@@ -143,6 +143,18 @@ static struct vregs_info pronto_vregs_pronto_v2[] = {
		1800000, 0,    NULL},
};

/* WCNSS regulators for Pronto v3 hardware */
static struct vregs_info pronto_vregs_pronto_v3[] = {
	{"qcom,pronto-vddmx",  VREG_NULL_CONFIG, RPM_REGULATOR_CORNER_NORMAL,
		RPM_REGULATOR_CORNER_NONE, RPM_REGULATOR_CORNER_SUPER_TURBO,
		0,             NULL},
	{"qcom,pronto-vddcx",  VREG_NULL_CONFIG, RPM_REGULATOR_CORNER_NORMAL,
		RPM_REGULATOR_CORNER_NONE, RPM_REGULATOR_CORNER_SUPER_TURBO,
		0,             NULL},
	{"qcom,pronto-vddpx",  VREG_NULL_CONFIG, 1800000, 0,
		1800000, 0,    NULL},
};


struct host_driver {
	char name[20];
@@ -513,14 +525,14 @@ fail:
}

static void wcnss_iris_vregs_off(enum wcnss_hw_type hw_type,
					int is_pronto_vt)
					struct wcnss_wlan_config *cfg)
{
	switch (hw_type) {
	case WCNSS_RIVA_HW:
		wcnss_vregs_off(iris_vregs_riva, ARRAY_SIZE(iris_vregs_riva));
		break;
	case WCNSS_PRONTO_HW:
		if (is_pronto_vt) {
		if (cfg->is_pronto_vt || cfg->is_pronto_v3) {
			wcnss_vregs_off(iris_vregs_pronto_v2,
				ARRAY_SIZE(iris_vregs_pronto_v2));
		} else {
@@ -536,7 +548,7 @@ static void wcnss_iris_vregs_off(enum wcnss_hw_type hw_type,

static int wcnss_iris_vregs_on(struct device *dev,
				enum wcnss_hw_type hw_type,
				int is_pronto_vt)
				struct wcnss_wlan_config *cfg)
{
	int ret = -1;

@@ -546,7 +558,7 @@ static int wcnss_iris_vregs_on(struct device *dev,
				ARRAY_SIZE(iris_vregs_riva));
		break;
	case WCNSS_PRONTO_HW:
		if (is_pronto_vt) {
		if (cfg->is_pronto_vt || cfg->is_pronto_v3) {
			ret = wcnss_vregs_on(dev, iris_vregs_pronto_v2,
					ARRAY_SIZE(iris_vregs_pronto_v2));
		} else {
@@ -561,16 +573,19 @@ static int wcnss_iris_vregs_on(struct device *dev,
}

static void wcnss_core_vregs_off(enum wcnss_hw_type hw_type,
					int is_pronto_vt)
					struct wcnss_wlan_config *cfg)
{
	switch (hw_type) {
	case WCNSS_RIVA_HW:
		wcnss_vregs_off(riva_vregs, ARRAY_SIZE(riva_vregs));
		break;
	case WCNSS_PRONTO_HW:
		if (is_pronto_vt) {
		if (cfg->is_pronto_vt) {
			wcnss_vregs_off(pronto_vregs_pronto_v2,
				ARRAY_SIZE(pronto_vregs_pronto_v2));
		} else if (cfg->is_pronto_v3) {
			wcnss_vregs_off(pronto_vregs_pronto_v3,
				ARRAY_SIZE(pronto_vregs_pronto_v3));
		} else {
			wcnss_vregs_off(pronto_vregs,
				ARRAY_SIZE(pronto_vregs));
@@ -584,7 +599,7 @@ static void wcnss_core_vregs_off(enum wcnss_hw_type hw_type,

static int wcnss_core_vregs_on(struct device *dev,
				enum wcnss_hw_type hw_type,
				int is_pronto_vt)
				struct wcnss_wlan_config *cfg)
{
	int ret = -1;

@@ -593,9 +608,12 @@ static int wcnss_core_vregs_on(struct device *dev,
		ret = wcnss_vregs_on(dev, riva_vregs, ARRAY_SIZE(riva_vregs));
		break;
	case WCNSS_PRONTO_HW:
		if (is_pronto_vt) {
		if (cfg->is_pronto_vt) {
			ret = wcnss_vregs_on(dev, pronto_vregs_pronto_v2,
					ARRAY_SIZE(pronto_vregs_pronto_v2));
		} else if (cfg->is_pronto_v3) {
			ret = wcnss_vregs_on(dev, pronto_vregs_pronto_v3,
					ARRAY_SIZE(pronto_vregs_pronto_v3));
		} else {
			ret = wcnss_vregs_on(dev, pronto_vregs,
					ARRAY_SIZE(pronto_vregs));
@@ -620,13 +638,13 @@ int wcnss_wlan_power(struct device *dev,
	if (on) {
		/* RIVA regulator settings */
		rc = wcnss_core_vregs_on(dev, hw_type,
			cfg->is_pronto_vt);
			cfg);
		if (rc)
			goto fail_wcnss_on;

		/* IRIS regulator settings */
		rc = wcnss_iris_vregs_on(dev, hw_type,
			cfg->is_pronto_vt);
			cfg);
		if (rc)
			goto fail_iris_on;

@@ -642,18 +660,18 @@ int wcnss_wlan_power(struct device *dev,
		is_power_on = false;
		configure_iris_xo(dev, cfg,
				WCNSS_WLAN_SWITCH_OFF, NULL);
		wcnss_iris_vregs_off(hw_type, cfg->is_pronto_vt);
		wcnss_core_vregs_off(hw_type, cfg->is_pronto_vt);
		wcnss_iris_vregs_off(hw_type, cfg);
		wcnss_core_vregs_off(hw_type, cfg);
	}

	up(&wcnss_power_on_lock);
	return rc;

fail_iris_xo:
	wcnss_iris_vregs_off(hw_type, cfg->is_pronto_vt);
	wcnss_iris_vregs_off(hw_type, cfg);

fail_iris_on:
	wcnss_core_vregs_off(hw_type, cfg->is_pronto_vt);
	wcnss_core_vregs_off(hw_type, cfg);

fail_wcnss_on:
	up(&wcnss_power_on_lock);