Loading Documentation/devicetree/bindings/wcnss/wcnss-wlan.txt +1 −1 Original line number Diff line number Diff line Loading @@ -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. Loading drivers/net/wireless/wcnss/wcnss_vreg.c +32 −14 Original line number Diff line number Diff line Loading @@ -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]; Loading Loading @@ -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 { Loading @@ -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; Loading @@ -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 { Loading @@ -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)); Loading @@ -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; Loading @@ -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)); Loading @@ -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; Loading @@ -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); Loading Loading
Documentation/devicetree/bindings/wcnss/wcnss-wlan.txt +1 −1 Original line number Diff line number Diff line Loading @@ -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. Loading
drivers/net/wireless/wcnss/wcnss_vreg.c +32 −14 Original line number Diff line number Diff line Loading @@ -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]; Loading Loading @@ -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 { Loading @@ -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; Loading @@ -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 { Loading @@ -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)); Loading @@ -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; Loading @@ -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)); Loading @@ -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; Loading @@ -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); Loading