* [PATCH] ARM: EXYNOS: Add WLAN init on ORIGEN
@ 2012-02-16 14:55 Sangwook Lee
2012-02-16 20:13 ` Sylwester Nawrocki
0 siblings, 1 reply; 3+ messages in thread
From: Sangwook Lee @ 2012-02-16 14:55 UTC (permalink / raw)
To: linux-samsung-soc; +Cc: kgene.kim, patches, Sangwook Lee
Add WLAN init code on Origen for both hw2.1.1 and hw2.0 in AR6003
Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org>
---
arch/arm/mach-exynos/mach-origen.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index e1d87b9..d570667 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -21,6 +21,7 @@
#include <linux/mfd/max8997.h>
#include <linux/lcd.h>
#include <linux/rfkill-gpio.h>
+#include <linux/delay.h>
#include <asm/mach/arch.h>
#include <asm/hardware/gic.h>
@@ -676,6 +677,25 @@ static void __init origen_bt_setup(void)
s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
}
+static void __init origen_wlan_setup(void)
+{
+ int err;
+
+ err = gpio_request_one(EXYNOS4_GPX2(4),
+ GPIOF_OUT_INIT_LOW, "GPX2_4");
+ if (err) {
+ pr_warning("ORIGEN: Failed to obtain WIFI GPIOs\n");
+ return;
+ }
+ s3c_gpio_cfgpin(EXYNOS4_GPX2(4), S3C_GPIO_OUTPUT);
+ s3c_gpio_setpull(EXYNOS4_GPX2(4),
+ S3C_GPIO_PULL_NONE);
+ /* VDD33,I/O Supply must be done */
+ gpio_set_value(EXYNOS4_GPX2(4), 0);
+ udelay(30); /*AR6003 speicic value Tb */
+ gpio_direction_output(EXYNOS4_GPX2(4), 1);
+}
+
static void s5p_tv_setup(void)
{
/* Direct HPD to HDMI chip */
@@ -738,6 +758,7 @@ static void __init origen_machine_init(void)
samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
origen_bt_setup();
+ origen_wlan_setup();
}
MACHINE_START(ORIGEN, "ORIGEN")
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: EXYNOS: Add WLAN init on ORIGEN
2012-02-16 14:55 [PATCH] ARM: EXYNOS: Add WLAN init on ORIGEN Sangwook Lee
@ 2012-02-16 20:13 ` Sylwester Nawrocki
2012-02-21 11:25 ` Sangwook Lee
0 siblings, 1 reply; 3+ messages in thread
From: Sylwester Nawrocki @ 2012-02-16 20:13 UTC (permalink / raw)
To: Sangwook Lee; +Cc: linux-samsung-soc, kgene.kim, patches
Hi Sangwook,
On 02/16/2012 03:55 PM, Sangwook Lee wrote:
> Add WLAN init code on Origen for both hw2.1.1 and hw2.0 in AR6003
>
> Signed-off-by: Sangwook Lee<sangwook.lee@linaro.org>
> ---
> arch/arm/mach-exynos/mach-origen.c | 21 +++++++++++++++++++++
> 1 files changed, 21 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
> index e1d87b9..d570667 100644
> --- a/arch/arm/mach-exynos/mach-origen.c
> +++ b/arch/arm/mach-exynos/mach-origen.c
> @@ -21,6 +21,7 @@
> #include<linux/mfd/max8997.h>
> #include<linux/lcd.h>
> #include<linux/rfkill-gpio.h>
> +#include<linux/delay.h>
>
> #include<asm/mach/arch.h>
> #include<asm/hardware/gic.h>
> @@ -676,6 +677,25 @@ static void __init origen_bt_setup(void)
> s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
> }
>
> +static void __init origen_wlan_setup(void)
> +{
> + int err;
> +
> + err = gpio_request_one(EXYNOS4_GPX2(4),
> + GPIOF_OUT_INIT_LOW, "GPX2_4");
> + if (err) {
> + pr_warning("ORIGEN: Failed to obtain WIFI GPIOs\n");
> + return;
> + }
> + s3c_gpio_cfgpin(EXYNOS4_GPX2(4), S3C_GPIO_OUTPUT);
The pin is already configured as output in gpio_request_one(), doesn't
it work without this line ?
> + s3c_gpio_setpull(EXYNOS4_GPX2(4),
> + S3C_GPIO_PULL_NONE);
No need to break the line.
> + /* VDD33,I/O Supply must be done */
Is it to reset the module by cycling its power supply ?
> + gpio_set_value(EXYNOS4_GPX2(4), 0);
Isn't EXYNOS4_GPX2(4) set to low state (0) already at this point,
since you used GPIOF_OUT_INIT_LOW flags ?
> + udelay(30); /*AR6003 speicic value Tb */
s/speicic/specific ?
> + gpio_direction_output(EXYNOS4_GPX2(4), 1);
Isn't gpio_set_value() enough here ?
> +}
I couldn't identify EXYNOS4_GPX2(4) GPIO on the board's schematics
(I didn't try too hard though), AFAIU it controls a voltage regulator.
I guess, it doesn't make sense to define a fixed voltage regulator
for "VDD3,I/O" supply, since it is not controlled from anywhere else
than the board code ?
--
Regards,
Sylwester
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: EXYNOS: Add WLAN init on ORIGEN
2012-02-16 20:13 ` Sylwester Nawrocki
@ 2012-02-21 11:25 ` Sangwook Lee
0 siblings, 0 replies; 3+ messages in thread
From: Sangwook Lee @ 2012-02-21 11:25 UTC (permalink / raw)
To: Sylwester Nawrocki; +Cc: linux-samsung-soc, kgene.kim, patches
On 16 February 2012 20:13, Sylwester Nawrocki <snjw23@gmail.com> wrote:
> Hi Sangwook,
>
>
> On 02/16/2012 03:55 PM, Sangwook Lee wrote:
>>
>> Add WLAN init code on Origen for both hw2.1.1 and hw2.0 in AR6003
>>
>> Signed-off-by: Sangwook Lee<sangwook.lee@linaro.org>
>> ---
>> arch/arm/mach-exynos/mach-origen.c | 21 +++++++++++++++++++++
>> 1 files changed, 21 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/mach-origen.c
>> b/arch/arm/mach-exynos/mach-origen.c
>> index e1d87b9..d570667 100644
>> --- a/arch/arm/mach-exynos/mach-origen.c
>> +++ b/arch/arm/mach-exynos/mach-origen.c
>> @@ -21,6 +21,7 @@
>> #include<linux/mfd/max8997.h>
>> #include<linux/lcd.h>
>> #include<linux/rfkill-gpio.h>
>> +#include<linux/delay.h>
>>
>> #include<asm/mach/arch.h>
>> #include<asm/hardware/gic.h>
>> @@ -676,6 +677,25 @@ static void __init origen_bt_setup(void)
>> s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
>> }
>>
>> +static void __init origen_wlan_setup(void)
>> +{
>> + int err;
>> +
>> + err = gpio_request_one(EXYNOS4_GPX2(4),
>> + GPIOF_OUT_INIT_LOW, "GPX2_4");
>> + if (err) {
>> + pr_warning("ORIGEN: Failed to obtain WIFI GPIOs\n");
>> + return;
>> + }
>> + s3c_gpio_cfgpin(EXYNOS4_GPX2(4), S3C_GPIO_OUTPUT);
>
>
> The pin is already configured as output in gpio_request_one(), doesn't
> it work without this line ?
>
>> + s3c_gpio_setpull(EXYNOS4_GPX2(4),
>> + S3C_GPIO_PULL_NONE);
>
>
> No need to break the line.
>
>
>> + /* VDD33,I/O Supply must be done */
>
>
> Is it to reset the module by cycling its power supply ?
>
>> + gpio_set_value(EXYNOS4_GPX2(4), 0);
>
>
> Isn't EXYNOS4_GPX2(4) set to low state (0) already at this point,
> since you used GPIOF_OUT_INIT_LOW flags ?
>
>
>> + udelay(30); /*AR6003 speicic value Tb */
>
>
> s/speicic/specific ?
>
Thanks, good point!
>> + gpio_direction_output(EXYNOS4_GPX2(4), 1);
>
>
> Isn't gpio_set_value() enough here ?
>
>> +}
>
>
> I couldn't identify EXYNOS4_GPX2(4) GPIO on the board's schematics
> (I didn't try too hard though), AFAIU it controls a voltage regulator.
It is not the voltage regulator but reset pin to the external chip
> I guess, it doesn't make sense to define a fixed voltage regulator
> for "VDD3,I/O" supply, since it is not controlled from anywhere else
> than the board code ?
>
> --
> Regards,
> Sylwester
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-21 11:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-16 14:55 [PATCH] ARM: EXYNOS: Add WLAN init on ORIGEN Sangwook Lee
2012-02-16 20:13 ` Sylwester Nawrocki
2012-02-21 11:25 ` Sangwook Lee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.