Loading Documentation/devicetree/bindings/wcnss/wcnss-wlan.txt +4 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ Optional properties: should be performed during boot up. - qcom,wlan-rx-buff-count: WLAN RX buffer count is a configurable value, using a smaller count for this buffer will reduce the memory usage. - qcom,is-pronto-vt: boolean flag to determine the pronto hardware version in use. subsequently Pronto and IRIS voltage regulator range is configured according to the ponto HW version Example: Loading @@ -56,6 +59,7 @@ Example: gpios = <&msmgpio 36 0>, <&msmgpio 37 0>, <&msmgpio 38 0>, <&msmgpio 39 0>, <&msmgpio 40 0>; qcom,has-48mhz-xo; qcom,is-pronto-vt; qcom,has-pronto-hw; qcom,wcnss-adc_tm = <&pm8226_adc_tm>; Loading arch/arm/boot/dts/qcom/msm8916.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -1161,6 +1161,7 @@ pinctrl-1 = <&wcnss_sleep>; qcom,has-autodetect-xo; qcom,is-pronto-vt; qcom,has-pronto-hw; }; Loading drivers/net/wireless/wcnss/wcnss_vreg.c +68 −16 Original line number Diff line number Diff line Loading @@ -112,6 +112,29 @@ static struct vregs_info pronto_vregs[] = { 1800000, 0, NULL}, }; /* IRIS regulators for Pronto v2 hardware */ static struct vregs_info iris_vregs_pronto_v2[] = { {"qcom,iris-vddxo", VREG_NULL_CONFIG, 1800000, 0, 1800000, 10000, NULL}, {"qcom,iris-vddrfa", VREG_NULL_CONFIG, 1300000, 0, 1300000, 100000, NULL}, {"qcom,iris-vddpa", VREG_NULL_CONFIG, 3300000, 0, 3300000, 515000, NULL}, {"qcom,iris-vdddig", VREG_NULL_CONFIG, 1800000, 0, 1800000, 10000, NULL}, }; /* WCNSS regulators for Pronto v2 hardware */ static struct vregs_info pronto_vregs_pronto_v2[] = { {"qcom,pronto-vddmx", VREG_NULL_CONFIG, 1287500, 0, 1287500, 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 @@ -418,15 +441,21 @@ fail: } static void wcnss_iris_vregs_off(enum wcnss_hw_type hw_type) static void wcnss_iris_vregs_off(enum wcnss_hw_type hw_type, int is_pronto_vt) { 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) { wcnss_vregs_off(iris_vregs_pronto_v2, ARRAY_SIZE(iris_vregs_pronto_v2)); } else { wcnss_vregs_off(iris_vregs_pronto, ARRAY_SIZE(iris_vregs_pronto)); } break; default: pr_err("%s invalid hardware %d\n", __func__, hw_type); Loading @@ -434,7 +463,9 @@ 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) static int wcnss_iris_vregs_on(struct device *dev, enum wcnss_hw_type hw_type, int is_pronto_vt) { int ret = -1; Loading @@ -444,8 +475,13 @@ static int wcnss_iris_vregs_on(struct device *dev, enum wcnss_hw_type hw_type) ARRAY_SIZE(iris_vregs_riva)); break; case WCNSS_PRONTO_HW: if (is_pronto_vt) { ret = wcnss_vregs_on(dev, iris_vregs_pronto_v2, ARRAY_SIZE(iris_vregs_pronto_v2)); } else { ret = wcnss_vregs_on(dev, iris_vregs_pronto, ARRAY_SIZE(iris_vregs_pronto)); } break; default: pr_err("%s invalid hardware %d\n", __func__, hw_type); Loading @@ -453,14 +489,21 @@ static int wcnss_iris_vregs_on(struct device *dev, enum wcnss_hw_type hw_type) return ret; } static void wcnss_core_vregs_off(enum wcnss_hw_type hw_type) static void wcnss_core_vregs_off(enum wcnss_hw_type hw_type, int is_pronto_vt) { switch (hw_type) { case WCNSS_RIVA_HW: wcnss_vregs_off(riva_vregs, ARRAY_SIZE(riva_vregs)); break; case WCNSS_PRONTO_HW: wcnss_vregs_off(pronto_vregs, ARRAY_SIZE(pronto_vregs)); if (is_pronto_vt) { wcnss_vregs_off(pronto_vregs_pronto_v2, ARRAY_SIZE(pronto_vregs_pronto_v2)); } else { wcnss_vregs_off(pronto_vregs, ARRAY_SIZE(pronto_vregs)); } break; default: pr_err("%s invalid hardware %d\n", __func__, hw_type); Loading @@ -468,7 +511,9 @@ 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) static int wcnss_core_vregs_on(struct device *dev, enum wcnss_hw_type hw_type, int is_pronto_vt) { int ret = -1; Loading @@ -477,8 +522,13 @@ static int wcnss_core_vregs_on(struct device *dev, enum wcnss_hw_type hw_type) ret = wcnss_vregs_on(dev, riva_vregs, ARRAY_SIZE(riva_vregs)); break; case WCNSS_PRONTO_HW: if (is_pronto_vt) { ret = wcnss_vregs_on(dev, pronto_vregs_pronto_v2, ARRAY_SIZE(pronto_vregs_pronto_v2)); } else { ret = wcnss_vregs_on(dev, pronto_vregs, ARRAY_SIZE(pronto_vregs)); } break; default: pr_err("%s invalid hardware %d\n", __func__, hw_type); Loading @@ -498,12 +548,14 @@ int wcnss_wlan_power(struct device *dev, if (on) { down(&wcnss_power_on_lock); /* RIVA regulator settings */ rc = wcnss_core_vregs_on(dev, hw_type); rc = wcnss_core_vregs_on(dev, hw_type, cfg->is_pronto_vt); if (rc) goto fail_wcnss_on; /* IRIS regulator settings */ rc = wcnss_iris_vregs_on(dev, hw_type); rc = wcnss_iris_vregs_on(dev, hw_type, cfg->is_pronto_vt); if (rc) goto fail_iris_on; Loading @@ -517,17 +569,17 @@ int wcnss_wlan_power(struct device *dev, } else { configure_iris_xo(dev, cfg, WCNSS_WLAN_SWITCH_OFF, NULL); wcnss_iris_vregs_off(hw_type); wcnss_core_vregs_off(hw_type); wcnss_iris_vregs_off(hw_type, cfg->is_pronto_vt); wcnss_core_vregs_off(hw_type, cfg->is_pronto_vt); } return rc; fail_iris_xo: wcnss_iris_vregs_off(hw_type); wcnss_iris_vregs_off(hw_type, cfg->is_pronto_vt); fail_iris_on: wcnss_core_vregs_off(hw_type); wcnss_core_vregs_off(hw_type, cfg->is_pronto_vt); fail_wcnss_on: up(&wcnss_power_on_lock); Loading drivers/net/wireless/wcnss/wcnss_wlan.c +5 −0 Original line number Diff line number Diff line Loading @@ -2160,10 +2160,14 @@ wcnss_trigger_config(struct platform_device *pdev) int ret; struct qcom_wcnss_opts *pdata; struct resource *res; int is_pronto_vt; int pil_retry = 0; int has_pronto_hw = of_property_read_bool(pdev->dev.of_node, "qcom,has-pronto-hw"); is_pronto_vt = of_property_read_bool(pdev->dev.of_node, "qcom,is-pronto-vt"); if (of_property_read_u32(pdev->dev.of_node, "qcom,wlan-rx-buff-count", &penv->wlan_rx_buff_count)) { penv->wlan_rx_buff_count = WCNSS_DEF_WLAN_RX_BUFF_COUNT; Loading @@ -2186,6 +2190,7 @@ wcnss_trigger_config(struct platform_device *pdev) } penv->wcnss_hw_type = (has_pronto_hw) ? WCNSS_PRONTO_HW : WCNSS_RIVA_HW; penv->wlan_config.use_48mhz_xo = has_48mhz_xo; penv->wlan_config.is_pronto_vt = is_pronto_vt; if (WCNSS_CONFIG_UNSPECIFIED == has_autodetect_xo && has_pronto_hw) { has_autodetect_xo = of_property_read_bool(pdev->dev.of_node, Loading include/linux/wcnss_wlan.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ enum wcnss_hw_type { struct wcnss_wlan_config { int use_48mhz_xo; int is_pronto_vt; void __iomem *msm_wcnss_base; }; Loading Loading
Documentation/devicetree/bindings/wcnss/wcnss-wlan.txt +4 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ Optional properties: should be performed during boot up. - qcom,wlan-rx-buff-count: WLAN RX buffer count is a configurable value, using a smaller count for this buffer will reduce the memory usage. - qcom,is-pronto-vt: boolean flag to determine the pronto hardware version in use. subsequently Pronto and IRIS voltage regulator range is configured according to the ponto HW version Example: Loading @@ -56,6 +59,7 @@ Example: gpios = <&msmgpio 36 0>, <&msmgpio 37 0>, <&msmgpio 38 0>, <&msmgpio 39 0>, <&msmgpio 40 0>; qcom,has-48mhz-xo; qcom,is-pronto-vt; qcom,has-pronto-hw; qcom,wcnss-adc_tm = <&pm8226_adc_tm>; Loading
arch/arm/boot/dts/qcom/msm8916.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -1161,6 +1161,7 @@ pinctrl-1 = <&wcnss_sleep>; qcom,has-autodetect-xo; qcom,is-pronto-vt; qcom,has-pronto-hw; }; Loading
drivers/net/wireless/wcnss/wcnss_vreg.c +68 −16 Original line number Diff line number Diff line Loading @@ -112,6 +112,29 @@ static struct vregs_info pronto_vregs[] = { 1800000, 0, NULL}, }; /* IRIS regulators for Pronto v2 hardware */ static struct vregs_info iris_vregs_pronto_v2[] = { {"qcom,iris-vddxo", VREG_NULL_CONFIG, 1800000, 0, 1800000, 10000, NULL}, {"qcom,iris-vddrfa", VREG_NULL_CONFIG, 1300000, 0, 1300000, 100000, NULL}, {"qcom,iris-vddpa", VREG_NULL_CONFIG, 3300000, 0, 3300000, 515000, NULL}, {"qcom,iris-vdddig", VREG_NULL_CONFIG, 1800000, 0, 1800000, 10000, NULL}, }; /* WCNSS regulators for Pronto v2 hardware */ static struct vregs_info pronto_vregs_pronto_v2[] = { {"qcom,pronto-vddmx", VREG_NULL_CONFIG, 1287500, 0, 1287500, 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 @@ -418,15 +441,21 @@ fail: } static void wcnss_iris_vregs_off(enum wcnss_hw_type hw_type) static void wcnss_iris_vregs_off(enum wcnss_hw_type hw_type, int is_pronto_vt) { 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) { wcnss_vregs_off(iris_vregs_pronto_v2, ARRAY_SIZE(iris_vregs_pronto_v2)); } else { wcnss_vregs_off(iris_vregs_pronto, ARRAY_SIZE(iris_vregs_pronto)); } break; default: pr_err("%s invalid hardware %d\n", __func__, hw_type); Loading @@ -434,7 +463,9 @@ 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) static int wcnss_iris_vregs_on(struct device *dev, enum wcnss_hw_type hw_type, int is_pronto_vt) { int ret = -1; Loading @@ -444,8 +475,13 @@ static int wcnss_iris_vregs_on(struct device *dev, enum wcnss_hw_type hw_type) ARRAY_SIZE(iris_vregs_riva)); break; case WCNSS_PRONTO_HW: if (is_pronto_vt) { ret = wcnss_vregs_on(dev, iris_vregs_pronto_v2, ARRAY_SIZE(iris_vregs_pronto_v2)); } else { ret = wcnss_vregs_on(dev, iris_vregs_pronto, ARRAY_SIZE(iris_vregs_pronto)); } break; default: pr_err("%s invalid hardware %d\n", __func__, hw_type); Loading @@ -453,14 +489,21 @@ static int wcnss_iris_vregs_on(struct device *dev, enum wcnss_hw_type hw_type) return ret; } static void wcnss_core_vregs_off(enum wcnss_hw_type hw_type) static void wcnss_core_vregs_off(enum wcnss_hw_type hw_type, int is_pronto_vt) { switch (hw_type) { case WCNSS_RIVA_HW: wcnss_vregs_off(riva_vregs, ARRAY_SIZE(riva_vregs)); break; case WCNSS_PRONTO_HW: wcnss_vregs_off(pronto_vregs, ARRAY_SIZE(pronto_vregs)); if (is_pronto_vt) { wcnss_vregs_off(pronto_vregs_pronto_v2, ARRAY_SIZE(pronto_vregs_pronto_v2)); } else { wcnss_vregs_off(pronto_vregs, ARRAY_SIZE(pronto_vregs)); } break; default: pr_err("%s invalid hardware %d\n", __func__, hw_type); Loading @@ -468,7 +511,9 @@ 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) static int wcnss_core_vregs_on(struct device *dev, enum wcnss_hw_type hw_type, int is_pronto_vt) { int ret = -1; Loading @@ -477,8 +522,13 @@ static int wcnss_core_vregs_on(struct device *dev, enum wcnss_hw_type hw_type) ret = wcnss_vregs_on(dev, riva_vregs, ARRAY_SIZE(riva_vregs)); break; case WCNSS_PRONTO_HW: if (is_pronto_vt) { ret = wcnss_vregs_on(dev, pronto_vregs_pronto_v2, ARRAY_SIZE(pronto_vregs_pronto_v2)); } else { ret = wcnss_vregs_on(dev, pronto_vregs, ARRAY_SIZE(pronto_vregs)); } break; default: pr_err("%s invalid hardware %d\n", __func__, hw_type); Loading @@ -498,12 +548,14 @@ int wcnss_wlan_power(struct device *dev, if (on) { down(&wcnss_power_on_lock); /* RIVA regulator settings */ rc = wcnss_core_vregs_on(dev, hw_type); rc = wcnss_core_vregs_on(dev, hw_type, cfg->is_pronto_vt); if (rc) goto fail_wcnss_on; /* IRIS regulator settings */ rc = wcnss_iris_vregs_on(dev, hw_type); rc = wcnss_iris_vregs_on(dev, hw_type, cfg->is_pronto_vt); if (rc) goto fail_iris_on; Loading @@ -517,17 +569,17 @@ int wcnss_wlan_power(struct device *dev, } else { configure_iris_xo(dev, cfg, WCNSS_WLAN_SWITCH_OFF, NULL); wcnss_iris_vregs_off(hw_type); wcnss_core_vregs_off(hw_type); wcnss_iris_vregs_off(hw_type, cfg->is_pronto_vt); wcnss_core_vregs_off(hw_type, cfg->is_pronto_vt); } return rc; fail_iris_xo: wcnss_iris_vregs_off(hw_type); wcnss_iris_vregs_off(hw_type, cfg->is_pronto_vt); fail_iris_on: wcnss_core_vregs_off(hw_type); wcnss_core_vregs_off(hw_type, cfg->is_pronto_vt); fail_wcnss_on: up(&wcnss_power_on_lock); Loading
drivers/net/wireless/wcnss/wcnss_wlan.c +5 −0 Original line number Diff line number Diff line Loading @@ -2160,10 +2160,14 @@ wcnss_trigger_config(struct platform_device *pdev) int ret; struct qcom_wcnss_opts *pdata; struct resource *res; int is_pronto_vt; int pil_retry = 0; int has_pronto_hw = of_property_read_bool(pdev->dev.of_node, "qcom,has-pronto-hw"); is_pronto_vt = of_property_read_bool(pdev->dev.of_node, "qcom,is-pronto-vt"); if (of_property_read_u32(pdev->dev.of_node, "qcom,wlan-rx-buff-count", &penv->wlan_rx_buff_count)) { penv->wlan_rx_buff_count = WCNSS_DEF_WLAN_RX_BUFF_COUNT; Loading @@ -2186,6 +2190,7 @@ wcnss_trigger_config(struct platform_device *pdev) } penv->wcnss_hw_type = (has_pronto_hw) ? WCNSS_PRONTO_HW : WCNSS_RIVA_HW; penv->wlan_config.use_48mhz_xo = has_48mhz_xo; penv->wlan_config.is_pronto_vt = is_pronto_vt; if (WCNSS_CONFIG_UNSPECIFIED == has_autodetect_xo && has_pronto_hw) { has_autodetect_xo = of_property_read_bool(pdev->dev.of_node, Loading
include/linux/wcnss_wlan.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ enum wcnss_hw_type { struct wcnss_wlan_config { int use_48mhz_xo; int is_pronto_vt; void __iomem *msm_wcnss_base; }; Loading