From: "Pan, Miaoqing" <miaoqing-Rm6X0d1/PG5y9aJCnZT0Uw@public•gmane.org>
To: Sudip Mukherjee
<sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public•gmane.org>,
Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public•gmane.org>
Cc: Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public•gmane.org>,
ath9k-devel <ath9k-devel-A+ZNKFmMK5xy9aJCnZT0Uw@public•gmane.org>,
"linux-next-u79uwXL29TY76Z2rM5mHXA@public•gmane.org"
<linux-next-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
"linux-wireless-u79uwXL29TY76Z2rM5mHXA@public•gmane.org"
<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
"ath9k-devel-xDcbHBWguxHbcTqmT+pZeQ@public•gmane.org"
<ath9k-devel-xDcbHBWguxHbcTqmT+pZeQ@public•gmane.org>,
"netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org"
<netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
Miaoqing Pan <miaoqing-sgV2jX0FEOL9JmXXK+q4OQ@public•gmane.org>
Subject: Re: ath9k gpio request
Date: Thu, 2 Jun 2016 08:02:50 +0000 [thread overview]
Message-ID: <1464854569880.79341@qti.qualcomm.com> (raw)
In-Reply-To: <574ED297.4080004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Seems there are something wrong in the datasheet, try
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -1122,8 +1122,8 @@ enum {
#define AR9300_NUM_GPIO 16
#define AR9330_NUM_GPIO 16
#define AR9340_NUM_GPIO 23
-#define AR9462_NUM_GPIO 10
-#define AR9485_NUM_GPIO 12
+#define AR9462_NUM_GPIO 14
+#define AR9485_NUM_GPIO 11
#define AR9531_NUM_GPIO 18
#define AR9550_NUM_GPIO 24
#define AR9561_NUM_GPIO 23
@@ -1139,8 +1139,8 @@ enum {
#define AR9300_GPIO_MASK 0x0000F4FF
#define AR9330_GPIO_MASK 0x0000F4FF
#define AR9340_GPIO_MASK 0x0000000F
-#define AR9462_GPIO_MASK 0x000003FF
-#define AR9485_GPIO_MASK 0x00000FFF
+#define AR9462_GPIO_MASK 0x00003FFF
+#define AR9485_GPIO_MASK 0x000007FF
#define AR9531_GPIO_MASK 0x0000000F
#define AR9550_GPIO_MASK 0x0000000F
#define AR9561_GPIO_MASK 0x0000000F
Thanks,
Miaoqing
________________________________________
From: Sudip Mukherjee <sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public•gmane.org>
Sent: Wednesday, June 1, 2016 8:18 PM
To: Pan, Miaoqing; Kalle Valo
Cc: Stephen Rothwell; ath9k-devel; linux-next-u79uwXL29TY76Z2rM5mHXA@public•gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org; linux-wireless-u79uwXL29TY76Z2rM5mHXA@public•gmane.org; ath9k-devel-xDcbHBWguxHbcTqmT+pZeQ@public•gmane.org; netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org; Miaoqing Pan
Subject: Re: ath9k gpio request
On Wednesday 01 June 2016 04:42 PM, Sudip Mukherjee wrote:
> On Wednesday 01 June 2016 12:24 PM, Pan, Miaoqing wrote:
>> which chip ? And what's the GPIO number ?
>
> lspci -v reports:
> 09:00.0 Network controller: Qualcomm Atheros AR9462 Wireless Network
> Adapter (rev 01)
> Subsystem: Foxconn International, Inc. Device e052
> Flags: bus master, fast devsel, latency 0, IRQ 19
> Memory at c0500000 (64-bit, non-prefetchable) [size=512K]
> Expansion ROM at c0580000 [disabled] [size=64K]
> Capabilities: [40] Power Management version 2
> Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
> Capabilities: [70] Express Endpoint, MSI 00
> Capabilities: [100] Advanced Error Reporting
> Capabilities: [140] Virtual Channel
> Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
> Kernel driver in use: ath9k
>
> Any easy way to find out the gpio number or i can modify the module to
> find that out.
Its trying for GPIO 11 with label ath9k-rfkill.
The attached dmesg is with some modification as below.
diff --git a/drivers/net/wireless/ath/ath9k/hw.c
b/drivers/net/wireless/ath/ath9k/hw.c
index 8b2895f9..23deea7 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2729,14 +2729,16 @@ static void ath9k_hw_gpio_cfg_wmac(struct ath_hw
*ah, u32 gpio, bool out,
static void ath9k_hw_gpio_request(struct ath_hw *ah, u32 gpio, bool out,
const char *label, u32 ah_signal_type)
{
- WARN_ON(gpio >= ah->caps.num_gpio_pins);
+// WARN_ON(gpio >= ah->caps.num_gpio_pins);
+
+ pr_err("sudip: %d %s\n", gpio, label);
if (BIT(gpio) & ah->caps.gpio_mask)
ath9k_hw_gpio_cfg_wmac(ah, gpio, out, ah_signal_type);
else if (AR_SREV_SOC(ah))
ath9k_hw_gpio_cfg_soc(ah, gpio, out, label);
- else
- WARN_ON(1);
+// else
+// WARN_ON(1);
}
Regards
Sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-06-02 8:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 3:22 linux-next: Tree for May 30 Stephen Rothwell
2016-05-30 14:04 ` Sudip Mukherjee
2016-05-31 7:31 ` ath9k gpio request Kalle Valo
2016-05-31 7:35 ` Sudip Mukherjee
2016-06-01 6:54 ` Pan, Miaoqing
2016-06-01 11:12 ` Sudip Mukherjee
2016-06-01 12:18 ` Sudip Mukherjee
[not found] ` <574ED297.4080004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-02 8:02 ` Pan, Miaoqing [this message]
2016-06-02 9:01 ` Janusz Dziedzic
2016-06-02 11:39 ` Sudip Mukherjee
2016-06-03 5:33 ` Kalle Valo
2016-06-03 5:49 ` Pan, Miaoqing
[not found] ` <1464932944074.85131-Rm6X0d1/PG5y9aJCnZT0Uw@public.gmane.org>
2016-06-04 14:37 ` Kalle Valo
2016-06-05 17:40 ` Sudip Mukherjee
[not found] ` <57546409.70506-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-07 11:43 ` Kalle Valo
2016-06-06 1:51 ` Pan, Miaoqing
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=1464854569880.79341@qti.qualcomm.com \
--to=miaoqing-rm6x0d1/pg5y9ajcnzt0uw@public$(echo .)gmane.org \
--cc=ath9k-devel-A+ZNKFmMK5xy9aJCnZT0Uw@public$(echo .)gmane.org \
--cc=ath9k-devel-xDcbHBWguxHbcTqmT+pZeQ@public$(echo .)gmane.org \
--cc=kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public$(echo .)gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=linux-next-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=miaoqing-sgV2jX0FEOL9JmXXK+q4OQ@public$(echo .)gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=sfr-3FnU+UHB4dNDw9hX6IcOSA@public$(echo .)gmane.org \
--cc=sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public$(echo .)gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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