Loading Documentation/devicetree/bindings/wcnss/wcnss-wlan.txt +3 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ Required properties: "riva_ccu_base", "pronto_a2xb_base", "pronto_ccpu_base", "pronto_saw2_base", "wlan_tx_phy_aborts","wlan_brdg_err_source", "wlan_tx_status", "alarms_txctl", "alarms_tactl", "pronto_mcu_base". "pronto_mcu_base", "pronto_qfuse". - interupts: Pronto to Apps interrupts for tx done and rx pending. - qcom,pronto-vddmx-supply: regulator to supply pronto pll. - qcom,pronto-vddcx-supply: voltage corner regulator to supply WLAN/BT/FM Loading Loading @@ -47,6 +47,8 @@ using a smaller count for this buffer will reduce the memory usage. - 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. - qcom,is-dual-band-disable: boolean flag to determine the WLAN dual band capability. - qcom,is-pronto-vadc: boolean flag to determine Battery voltage feature support for pronto hardware. - qcom,wcnss-pm : <Core rail LDO#, PA rail LDO#, XO settling time, Loading drivers/net/wireless/wcnss/wcnss_wlan.c +47 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ #define WCNSS_PM_QOS_TIMEOUT 15000 #define IS_CAL_DATA_PRESENT 0 #define WAIT_FOR_CBC_IND 2 #define WCNSS_DUAL_BAND_CAPABILITY_OFFSET (1 << 8) /* module params */ #define WCNSS_CONFIG_UNSPECIFIED (-1) Loading Loading @@ -119,6 +120,8 @@ static DEFINE_SPINLOCK(reg_spinlock); #define PRONTO_PMU_COM_CSR_OFFSET 0x1040 #define PRONTO_PMU_SOFT_RESET_OFFSET 0x104C #define PRONTO_QFUSE_DUAL_BAND_OFFSET 0x0018 #define A2XB_CFG_OFFSET 0x00 #define A2XB_INT_SRC_OFFSET 0x0c #define A2XB_TSTBUS_CTRL_OFFSET 0x14 Loading Loading @@ -379,6 +382,7 @@ static struct { void __iomem *pronto_saw2_base; void __iomem *pronto_pll_base; void __iomem *pronto_mcu_base; void __iomem *pronto_qfuse; void __iomem *wlan_tx_status; void __iomem *wlan_tx_phy_aborts; void __iomem *wlan_brdg_err_source; Loading Loading @@ -424,6 +428,7 @@ static struct { struct mutex pm_qos_mutex; struct clk *snoc_wcnss; unsigned int snoc_wcnss_clock_freq; bool is_dual_band_disabled; } *penv = NULL; static ssize_t wcnss_wlan_macaddr_store(struct device *dev, Loading Loading @@ -591,6 +596,30 @@ void wcnss_pronto_is_a2xb_bus_stall(void *tst_addr, u32 fifo_mask, char *type) } } int wcnss_get_dual_band_capability_info(struct platform_device *pdev) { u32 reg = 0; struct resource *res; res = platform_get_resource_byname( pdev, IORESOURCE_MEM, "pronto_qfuse"); if (!res) return -EINVAL; penv->pronto_qfuse = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(penv->pronto_qfuse)) return -ENOMEM; reg = readl_relaxed(penv->pronto_qfuse + PRONTO_QFUSE_DUAL_BAND_OFFSET); if (reg & WCNSS_DUAL_BAND_CAPABILITY_OFFSET) penv->is_dual_band_disabled = true; else penv->is_dual_band_disabled = false; return 0; } /* Log pronto debug registers during SSR Timeout CB */ void wcnss_pronto_log_debug_regs(void) { Loading Loading @@ -1705,6 +1734,14 @@ int wcnss_wlan_iris_xo_mode(void) } EXPORT_SYMBOL(wcnss_wlan_iris_xo_mode); int wcnss_wlan_dual_band_disabled(void) { if (penv && penv->pdev) return penv->is_dual_band_disabled; return -EINVAL; } EXPORT_SYMBOL(wcnss_wlan_dual_band_disabled); void wcnss_suspend_notify(void) { Loading Loading @@ -3154,6 +3191,16 @@ wcnss_trigger_config(struct platform_device *pdev) __func__); goto fail_ioremap2; } if (of_property_read_bool( pdev->dev.of_node, "qcom,is-dual-band-disabled")) { ret = wcnss_get_dual_band_capability_info(pdev); if (ret) { pr_err( "%s: failed to get dual band info\n", __func__); goto fail_ioremap2; } } } penv->adc_tm_dev = qpnp_get_adc_tm(&penv->pdev->dev, "wcnss"); Loading include/linux/wcnss_wlan.h +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ enum { #define HAVE_CBC_DONE 1 #define HAVE_WCNSS_RX_BUFF_COUNT 1 #define HAVE_WCNSS_SNOC_HIGH_FREQ_VOTING 1 #define HAVE_WCNSS_5G_DISABLE 1 #define WLAN_MAC_ADDR_SIZE (6) #define WLAN_RF_REG_ADDR_START_OFFSET 0x3 #define WLAN_RF_REG_DATA_START_OFFSET 0xf Loading Loading @@ -134,6 +135,7 @@ void wcnss_riva_dump_pmic_regs(void); int wcnss_xo_auto_detect_enabled(void); u32 wcnss_get_wlan_rx_buff_count(void); int wcnss_wlan_iris_xo_mode(void); int wcnss_wlan_dual_band_disabled(void); void wcnss_flush_work(struct work_struct *work); void wcnss_flush_delayed_work(struct delayed_work *dwork); void wcnss_init_work(struct work_struct *work , void *callbackptr); Loading Loading
Documentation/devicetree/bindings/wcnss/wcnss-wlan.txt +3 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ Required properties: "riva_ccu_base", "pronto_a2xb_base", "pronto_ccpu_base", "pronto_saw2_base", "wlan_tx_phy_aborts","wlan_brdg_err_source", "wlan_tx_status", "alarms_txctl", "alarms_tactl", "pronto_mcu_base". "pronto_mcu_base", "pronto_qfuse". - interupts: Pronto to Apps interrupts for tx done and rx pending. - qcom,pronto-vddmx-supply: regulator to supply pronto pll. - qcom,pronto-vddcx-supply: voltage corner regulator to supply WLAN/BT/FM Loading Loading @@ -47,6 +47,8 @@ using a smaller count for this buffer will reduce the memory usage. - 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. - qcom,is-dual-band-disable: boolean flag to determine the WLAN dual band capability. - qcom,is-pronto-vadc: boolean flag to determine Battery voltage feature support for pronto hardware. - qcom,wcnss-pm : <Core rail LDO#, PA rail LDO#, XO settling time, Loading
drivers/net/wireless/wcnss/wcnss_wlan.c +47 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ #define WCNSS_PM_QOS_TIMEOUT 15000 #define IS_CAL_DATA_PRESENT 0 #define WAIT_FOR_CBC_IND 2 #define WCNSS_DUAL_BAND_CAPABILITY_OFFSET (1 << 8) /* module params */ #define WCNSS_CONFIG_UNSPECIFIED (-1) Loading Loading @@ -119,6 +120,8 @@ static DEFINE_SPINLOCK(reg_spinlock); #define PRONTO_PMU_COM_CSR_OFFSET 0x1040 #define PRONTO_PMU_SOFT_RESET_OFFSET 0x104C #define PRONTO_QFUSE_DUAL_BAND_OFFSET 0x0018 #define A2XB_CFG_OFFSET 0x00 #define A2XB_INT_SRC_OFFSET 0x0c #define A2XB_TSTBUS_CTRL_OFFSET 0x14 Loading Loading @@ -379,6 +382,7 @@ static struct { void __iomem *pronto_saw2_base; void __iomem *pronto_pll_base; void __iomem *pronto_mcu_base; void __iomem *pronto_qfuse; void __iomem *wlan_tx_status; void __iomem *wlan_tx_phy_aborts; void __iomem *wlan_brdg_err_source; Loading Loading @@ -424,6 +428,7 @@ static struct { struct mutex pm_qos_mutex; struct clk *snoc_wcnss; unsigned int snoc_wcnss_clock_freq; bool is_dual_band_disabled; } *penv = NULL; static ssize_t wcnss_wlan_macaddr_store(struct device *dev, Loading Loading @@ -591,6 +596,30 @@ void wcnss_pronto_is_a2xb_bus_stall(void *tst_addr, u32 fifo_mask, char *type) } } int wcnss_get_dual_band_capability_info(struct platform_device *pdev) { u32 reg = 0; struct resource *res; res = platform_get_resource_byname( pdev, IORESOURCE_MEM, "pronto_qfuse"); if (!res) return -EINVAL; penv->pronto_qfuse = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(penv->pronto_qfuse)) return -ENOMEM; reg = readl_relaxed(penv->pronto_qfuse + PRONTO_QFUSE_DUAL_BAND_OFFSET); if (reg & WCNSS_DUAL_BAND_CAPABILITY_OFFSET) penv->is_dual_band_disabled = true; else penv->is_dual_band_disabled = false; return 0; } /* Log pronto debug registers during SSR Timeout CB */ void wcnss_pronto_log_debug_regs(void) { Loading Loading @@ -1705,6 +1734,14 @@ int wcnss_wlan_iris_xo_mode(void) } EXPORT_SYMBOL(wcnss_wlan_iris_xo_mode); int wcnss_wlan_dual_band_disabled(void) { if (penv && penv->pdev) return penv->is_dual_band_disabled; return -EINVAL; } EXPORT_SYMBOL(wcnss_wlan_dual_band_disabled); void wcnss_suspend_notify(void) { Loading Loading @@ -3154,6 +3191,16 @@ wcnss_trigger_config(struct platform_device *pdev) __func__); goto fail_ioremap2; } if (of_property_read_bool( pdev->dev.of_node, "qcom,is-dual-band-disabled")) { ret = wcnss_get_dual_band_capability_info(pdev); if (ret) { pr_err( "%s: failed to get dual band info\n", __func__); goto fail_ioremap2; } } } penv->adc_tm_dev = qpnp_get_adc_tm(&penv->pdev->dev, "wcnss"); Loading
include/linux/wcnss_wlan.h +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ enum { #define HAVE_CBC_DONE 1 #define HAVE_WCNSS_RX_BUFF_COUNT 1 #define HAVE_WCNSS_SNOC_HIGH_FREQ_VOTING 1 #define HAVE_WCNSS_5G_DISABLE 1 #define WLAN_MAC_ADDR_SIZE (6) #define WLAN_RF_REG_ADDR_START_OFFSET 0x3 #define WLAN_RF_REG_DATA_START_OFFSET 0xf Loading Loading @@ -134,6 +135,7 @@ void wcnss_riva_dump_pmic_regs(void); int wcnss_xo_auto_detect_enabled(void); u32 wcnss_get_wlan_rx_buff_count(void); int wcnss_wlan_iris_xo_mode(void); int wcnss_wlan_dual_band_disabled(void); void wcnss_flush_work(struct work_struct *work); void wcnss_flush_delayed_work(struct delayed_work *dwork); void wcnss_init_work(struct work_struct *work , void *callbackptr); Loading