From: "Arend van Spriel" <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 10/12] brcmsmac: correct phy registers for TSSI-based power control
Date: Tue, 20 Aug 2013 16:00:44 +0200 [thread overview]
Message-ID: <1377007246-9957-11-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1377007246-9957-1-git-send-email-arend@broadcom.com>
A number of additional phy registers needs to be programmed when
using TSSI-based power control.
Tested-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
.../net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
index 08bcae4..2917f5c 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
@@ -2020,6 +2020,16 @@ wlc_lcnphy_set_tssi_mux(struct brcms_phy *pi, enum lcnphy_tssi_mode pos)
} else {
mod_radio_reg(pi, RADIO_2064_REG03A, 1, 0x1);
mod_radio_reg(pi, RADIO_2064_REG11A, 0x8, 0x8);
+ mod_radio_reg(pi, RADIO_2064_REG028, 0x1, 0x0);
+ mod_radio_reg(pi, RADIO_2064_REG11A, 0x4, 1<<2);
+ mod_radio_reg(pi, RADIO_2064_REG036, 0x10, 0x0);
+ mod_radio_reg(pi, RADIO_2064_REG11A, 0x10, 1<<4);
+ mod_radio_reg(pi, RADIO_2064_REG036, 0x3, 0x0);
+ mod_radio_reg(pi, RADIO_2064_REG035, 0xff, 0x77);
+ mod_radio_reg(pi, RADIO_2064_REG028, 0x1e, 0xe<<1);
+ mod_radio_reg(pi, RADIO_2064_REG112, 0x80, 1<<7);
+ mod_radio_reg(pi, RADIO_2064_REG005, 0x7, 1<<1);
+ mod_radio_reg(pi, RADIO_2064_REG029, 0xf0, 0<<4);
}
} else {
mod_phy_reg(pi, 0x4d9, (0x1 << 2), (0x1) << 2);
@@ -2106,6 +2116,7 @@ static void wlc_lcnphy_pwrctrl_rssiparams(struct brcms_phy *pi)
(auxpga_vmid_temp << 0) | (auxpga_gain_temp << 12));
mod_radio_reg(pi, RADIO_2064_REG082, (1 << 5), (1 << 5));
+ mod_radio_reg(pi, RADIO_2064_REG07C, (1 << 0), (1 << 0));
}
static void wlc_lcnphy_tssi_setup(struct brcms_phy *pi)
@@ -2218,6 +2229,10 @@ static void wlc_lcnphy_tssi_setup(struct brcms_phy *pi)
mod_phy_reg(pi, 0x4d7, (0xf << 8), (0) << 8);
+ mod_radio_reg(pi, RADIO_2064_REG035, 0xff, 0x0);
+ mod_radio_reg(pi, RADIO_2064_REG036, 0x3, 0x0);
+ mod_radio_reg(pi, RADIO_2064_REG11A, 0x8, 0x8);
+
wlc_lcnphy_pwrctrl_rssiparams(pi);
}
@@ -3096,6 +3111,11 @@ static void wlc_lcnphy_tx_pwr_ctrl_init(struct brcms_phy_pub *ppi)
wlc_lcnphy_write_table(pi, &tab);
tab.tbl_offset++;
}
+ mod_phy_reg(pi, 0x4d0, (0x1 << 0), (0) << 0);
+ mod_phy_reg(pi, 0x4d3, (0xff << 0), (0) << 0);
+ mod_phy_reg(pi, 0x4d3, (0xff << 8), (0) << 8);
+ mod_phy_reg(pi, 0x4d0, (0x1 << 4), (0) << 4);
+ mod_phy_reg(pi, 0x4d0, (0x1 << 2), (0) << 2);
mod_phy_reg(pi, 0x410, (0x1 << 7), (0) << 7);
--
1.7.10.4
next prev parent reply other threads:[~2013-08-20 14:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 14:00 [PATCH 00/12] brcmsmac: bcm4313 iPA support Arend van Spriel
2013-08-20 14:00 ` [PATCH 01/12] brcmsmac: cosmetic change in phy_lcn.c Arend van Spriel
2013-08-20 14:00 ` [PATCH 02/12] brcmsmac: change pa_gain for bcm4313 iPA Arend van Spriel
2013-08-20 14:00 ` [PATCH 03/12] brcmsmac: use ARRAY_SIZE in phytbl_lcn.c Arend van Spriel
2013-08-20 14:00 ` [PATCH 04/12] brcmsmac: add debug info message providing phy and radio info Arend van Spriel
2013-08-20 14:00 ` [PATCH 05/12] brcmsmac: update transmit gain table for lcn phy Arend van Spriel
2013-08-20 14:00 ` [PATCH 06/12] brcmsmac: change lcnphy receive i/q calibration routine Arend van Spriel
2013-08-20 14:00 ` [PATCH 07/12] brcmsmac: fix TSSI idle estimation Arend van Spriel
2013-08-20 14:00 ` [PATCH 08/12] brcmsmac: avoid calling set_txpwr_by_index() twice Arend van Spriel
2013-08-20 14:00 ` [PATCH 09/12] brcmsmac: rework switch control table init including iPA BT-combo Arend van Spriel
2013-08-20 14:00 ` Arend van Spriel [this message]
2013-08-20 14:00 ` [PATCH 11/12] brcmsmac: reinitialize TSSI power control upon channel switch Arend van Spriel
2013-08-20 14:00 ` [PATCH 12/12] brcmsmac: add support for BCM4313 iPA variant Arend van Spriel
2013-08-20 18:30 ` Joe Perches
2013-08-21 9:28 ` Arend van Spriel
2013-08-21 9:45 ` [PATCH V2 " Arend van Spriel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377007246-9957-11-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).