All of lore.kernel.org
 help / color / mirror / Atom feed
* Firefly wifi mainline patches
@ 2015-07-21 12:51 Michael Trimarchi
  2015-07-22  5:58 ` Michael Trimarchi
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Trimarchi @ 2015-07-21 12:51 UTC (permalink / raw)
  To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi

I have managed to let my wifi working using mainline but I have
problem on clocking. Right now I can not rise the clock more the 5Mhz
even it's suppose to work up to 50Mhz. Anyone is working on it right
now?

Michael

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Firefly wifi mainline patches
  2015-07-21 12:51 Firefly wifi mainline patches Michael Trimarchi
@ 2015-07-22  5:58 ` Michael Trimarchi
       [not found]   ` <CAOf5uw=cvu9ST+QexgMQP06xQVAz6th_EepfxQOAXNDrWopf6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Trimarchi @ 2015-07-22  5:58 UTC (permalink / raw)
  To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

Hi


On Tue, Jul 21, 2015 at 2:51 PM, Michael Trimarchi
<michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
> Hi
>
> I have managed to let my wifi working using mainline but I have
> problem on clocking. Right now I can not rise the clock more the 5Mhz
> even it's suppose to work up to 50Mhz. Anyone is working on it right
> now?
>

I put in attach two patches that I need on my version. Another problem
is that execute_tuning is not defined in the dw_mmc-rockchip so
ENOSYS is returned. I think that we have two way:

1) put a stub
2) define 0 as default error

Michael

> Michael

[-- Attachment #2: 0001-dw_mmc-hack-voltage-response-from-wifi.patch --]
[-- Type: text/x-diff, Size: 982 bytes --]

From 661979de16b3d0d010659a2e601209aa894d55f4 Mon Sep 17 00:00:00 2001
From: Michael Trimarchi <michael@amarulasolutions.com>
Date: Tue, 21 Jul 2015 16:14:13 +0200
Subject: [PATCH] dw_mmc: hack voltage response from wifi

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 drivers/mmc/host/dw_mmc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 923152a..5d2f38a 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2355,8 +2355,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	if (ret == -EPROBE_DEFER)
 		goto err_host_allocated;
 
-	if (!mmc->ocr_avail)
-		mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
+	if (!mmc->ocr_avail || !strcmp("mmc0", mmc_hostname(mmc)))
+		mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34 |
+				 MMC_VDD_165_195 | MMC_VDD_20_21;
 
 	if (host->pdata->caps)
 		mmc->caps = host->pdata->caps;
-- 
1.9.1


[-- Attachment #3: 0001-firefly-add-a-minimal-wifi-settings.patch --]
[-- Type: text/x-diff, Size: 1836 bytes --]

From 4d68f996e28aa135a331e67ccd95874632276606 Mon Sep 17 00:00:00 2001
From: Michael Trimarchi <michael@amarulasolutions.com>
Date: Tue, 21 Jul 2015 15:21:48 +0200
Subject: [PATCH] firefly: add a minimal wifi settings

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 arch/arm/boot/dts/rk3288-firefly.dtsi | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 149b9ed..effce71 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -116,6 +116,19 @@
 		vin-supply = <&vcc_io>;
 	};
 
+	vcc_wifi: wifi-regulator {
+		compatible = "regulator-fixed";
+		gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdio0_pwr>;
+		regulator-name = "vcc_wifi";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		startup-delay-us = <100000>;
+		vin-supply = <&vcc_io>;
+	};
+
+
 	vcc_flash: flash-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_flash";
@@ -460,13 +473,31 @@
 &sdio0 {
 	broken-cd;
 	bus-width = <4>;
+	clock-freq-min-max = <400000 5000000>;
 	disable-wp;
 	non-removable;
+	cap-sd--highspeed;
 	num-slots = <1>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
+	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
+
+	sd-uhs-sdr104;
+	sd-uhs-sdr12;
+	sd-uhs-sdr25;
+	cap-sdio-irq;
+
 	vmmc-supply = <&vcc_18>;
+/*	mmc-supply = <&vcc_wifi>; */
 	status = "okay";
+
+	brcmf: bcrmf@1 {
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&gpio4>;
+		reg = <0>;
+		interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-names = "host-wake";
+		status = "okay";
+	};
 };
 
 &sdmmc {
-- 
1.9.1


[-- Attachment #4: Type: text/plain, Size: 200 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Firefly wifi mainline patches
       [not found]   ` <CAOf5uw=cvu9ST+QexgMQP06xQVAz6th_EepfxQOAXNDrWopf6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-07-22  6:45     ` Romain Perier
  2015-07-22  6:58         ` Michael Trimarchi
  2015-07-22 13:36     ` Doug Anderson
  1 sibling, 1 reply; 8+ messages in thread
From: Romain Perier @ 2015-07-22  6:45 UTC (permalink / raw)
  To: Michael Trimarchi; +Cc: open list:ARM/Rockchip SoC...

Hi Michael,

You can ask and discuss about wifi here, but could you re-send you
patches as described in [1] please ?

Short version:
1. git format-patch HEAD~2  # extract your two commits
2. scripts/get_maintainer.pl -f  <changed_files> # list maintainers
3. git send-email --to --cc  <emails  listed by get_maintainer.pl>   *.patch

Thanks in advance,
Have a nice day,
Romain

1. https://www.kernel.org/doc/Documentation/SubmittingPatches


2015-07-22 7:58 GMT+02:00 Michael Trimarchi <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>:
> Hi
>
>
> On Tue, Jul 21, 2015 at 2:51 PM, Michael Trimarchi
> <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
>> Hi
>>
>> I have managed to let my wifi working using mainline but I have
>> problem on clocking. Right now I can not rise the clock more the 5Mhz
>> even it's suppose to work up to 50Mhz. Anyone is working on it right
>> now?
>>
>
> I put in attach two patches that I need on my version. Another problem
> is that execute_tuning is not defined in the dw_mmc-rockchip so
> ENOSYS is returned. I think that we have two way:
>
> 1) put a stub
> 2) define 0 as default error
>
> Michael
>
>> Michael
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Firefly wifi mainline patches
  2015-07-22  6:45     ` Romain Perier
@ 2015-07-22  6:58         ` Michael Trimarchi
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Trimarchi @ 2015-07-22  6:58 UTC (permalink / raw)
  To: Romain Perier, Seungwon Jeon
  Cc: open list:ARM/Rockchip SoC..., Heiko Stuebner, linux-mmc

Hi

On Wed, Jul 22, 2015 at 08:45:37AM +0200, Romain Perier wrote:
> Hi Michael,
> 
> You can ask and discuss about wifi here, but could you re-send you
> patches as described in [1] please ?
> 
> Short version:
> 1. git format-patch HEAD~2  # extract your two commits
> 2. scripts/get_maintainer.pl -f  <changed_files> # list maintainers
> 3. git send-email --to --cc  <emails  listed by get_maintainer.pl>   *.patch
> 

I know how it works. Right now they are not patches but I will include them
inline with some description in it to understand what problem I still have.

The first one is an hack. Problem is this:

card answer to me that support from 2.0V but regulator is connected
to 1.8V. So capability report are wrong, for now this is just an hack

>From 661979de16b3d0d010659a2e601209aa894d55f4 Mon Sep 17 00:00:00 2001
From: Michael Trimarchi <michael@amarulasolutions.com>
Date: Tue, 21 Jul 2015 16:14:13 +0200
Subject: [PATCH] dw_mmc: hack voltage response from wifi

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 drivers/mmc/host/dw_mmc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 923152a..5d2f38a 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2355,8 +2355,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	if (ret == -EPROBE_DEFER)
 		goto err_host_allocated;
 
-	if (!mmc->ocr_avail)
-		mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
+	if (!mmc->ocr_avail || !strcmp("mmc0", mmc_hostname(mmc)))
+		mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34 |
+				 MMC_VDD_165_195 | MMC_VDD_20_21;
 
 	if (host->pdata->caps)
 		mmc->caps = host->pdata->caps;
-- 
1.9.1


Here I have some limitation of the frequency. If I choose more the 5Mhz
I can start to have -110 e/o timeout on firmware. Firmware is the
ap6535 firmware. Wifi is stable and working on this frequency

static int dw_mci_execute_tuning(struct mmc_host *mmc, u32 opcode)
{
	struct dw_mci_slot *slot = mmc_priv(mmc);
	struct dw_mci *host = slot->host;
	const struct dw_mci_drv_data *drv_data = host->drv_data;
	int err = 0;

	if (drv_data && drv_data->execute_tuning)
		err = drv_data->execute_tuning(slot);
	return err;
}

I have changed this to report 0 in case excute tuning is not implemented

>From 4d68f996e28aa135a331e67ccd95874632276606 Mon Sep 17 00:00:00 2001
From: Michael Trimarchi <michael@amarulasolutions.com>
Date: Tue, 21 Jul 2015 15:21:48 +0200
Subject: [PATCH] firefly: add a minimal wifi settings

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 arch/arm/boot/dts/rk3288-firefly.dtsi | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 149b9ed..effce71 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -116,6 +116,19 @@
 		vin-supply = <&vcc_io>;
 	};
 
+	vcc_wifi: wifi-regulator {
+		compatible = "regulator-fixed";
+		gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdio0_pwr>;
+		regulator-name = "vcc_wifi";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		startup-delay-us = <100000>;
+		vin-supply = <&vcc_io>;
+	};
+
+
 	vcc_flash: flash-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_flash";
@@ -460,13 +473,31 @@
 &sdio0 {
 	broken-cd;
 	bus-width = <4>;
+	clock-freq-min-max = <400000 5000000>;
 	disable-wp;
 	non-removable;
+	cap-sd--highspeed;
 	num-slots = <1>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
+	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
+
+	sd-uhs-sdr104;
+	sd-uhs-sdr12;
+	sd-uhs-sdr25;
+	cap-sdio-irq;
+
 	vmmc-supply = <&vcc_18>;
+/*	mmc-supply = <&vcc_wifi>; */
 	status = "okay";
+
+	brcmf: bcrmf@1 {
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&gpio4>;
+		reg = <0>;
+		interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-names = "host-wake";
+		status = "okay";
+	};
 };
 
 &sdmmc {
-- 
1.9.1


> Thanks in advance,
> Have a nice day,
> Romain
> 
> 1. https://www.kernel.org/doc/Documentation/SubmittingPatches
> 
> 
> 2015-07-22 7:58 GMT+02:00 Michael Trimarchi <michael@amarulasolutions.com>:
> > Hi
> >
> >
> > On Tue, Jul 21, 2015 at 2:51 PM, Michael Trimarchi
> > <michael@amarulasolutions.com> wrote:
> >> Hi
> >>
> >> I have managed to let my wifi working using mainline but I have
> >> problem on clocking. Right now I can not rise the clock more the 5Mhz
> >> even it's suppose to work up to 50Mhz. Anyone is working on it right
> >> now?
> >>
> >
> > I put in attach two patches that I need on my version. Another problem
> > is that execute_tuning is not defined in the dw_mmc-rockchip so
> > ENOSYS is returned. I think that we have two way:
> >
> > 1) put a stub
> > 2) define 0 as default error
> >
> > Michael
> >
> >> Michael
> >
> > _______________________________________________
> > Linux-rockchip mailing list
> > Linux-rockchip@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-rockchip
> >

-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Firefly wifi mainline patches
@ 2015-07-22  6:58         ` Michael Trimarchi
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Trimarchi @ 2015-07-22  6:58 UTC (permalink / raw)
  To: Romain Perier, Seungwon Jeon
  Cc: open list:ARM/Rockchip SoC..., Heiko Stuebner, linux-mmc

Hi

On Wed, Jul 22, 2015 at 08:45:37AM +0200, Romain Perier wrote:
> Hi Michael,
> 
> You can ask and discuss about wifi here, but could you re-send you
> patches as described in [1] please ?
> 
> Short version:
> 1. git format-patch HEAD~2  # extract your two commits
> 2. scripts/get_maintainer.pl -f  <changed_files> # list maintainers
> 3. git send-email --to --cc  <emails  listed by get_maintainer.pl>   *.patch
> 

I know how it works. Right now they are not patches but I will include them
inline with some description in it to understand what problem I still have.

The first one is an hack. Problem is this:

card answer to me that support from 2.0V but regulator is connected
to 1.8V. So capability report are wrong, for now this is just an hack

From 661979de16b3d0d010659a2e601209aa894d55f4 Mon Sep 17 00:00:00 2001
From: Michael Trimarchi <michael@amarulasolutions.com>
Date: Tue, 21 Jul 2015 16:14:13 +0200
Subject: [PATCH] dw_mmc: hack voltage response from wifi

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 drivers/mmc/host/dw_mmc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 923152a..5d2f38a 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2355,8 +2355,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	if (ret == -EPROBE_DEFER)
 		goto err_host_allocated;
 
-	if (!mmc->ocr_avail)
-		mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
+	if (!mmc->ocr_avail || !strcmp("mmc0", mmc_hostname(mmc)))
+		mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34 |
+				 MMC_VDD_165_195 | MMC_VDD_20_21;
 
 	if (host->pdata->caps)
 		mmc->caps = host->pdata->caps;
-- 
1.9.1


Here I have some limitation of the frequency. If I choose more the 5Mhz
I can start to have -110 e/o timeout on firmware. Firmware is the
ap6535 firmware. Wifi is stable and working on this frequency

static int dw_mci_execute_tuning(struct mmc_host *mmc, u32 opcode)
{
	struct dw_mci_slot *slot = mmc_priv(mmc);
	struct dw_mci *host = slot->host;
	const struct dw_mci_drv_data *drv_data = host->drv_data;
	int err = 0;

	if (drv_data && drv_data->execute_tuning)
		err = drv_data->execute_tuning(slot);
	return err;
}

I have changed this to report 0 in case excute tuning is not implemented

From 4d68f996e28aa135a331e67ccd95874632276606 Mon Sep 17 00:00:00 2001
From: Michael Trimarchi <michael@amarulasolutions.com>
Date: Tue, 21 Jul 2015 15:21:48 +0200
Subject: [PATCH] firefly: add a minimal wifi settings

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 arch/arm/boot/dts/rk3288-firefly.dtsi | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 149b9ed..effce71 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -116,6 +116,19 @@
 		vin-supply = <&vcc_io>;
 	};
 
+	vcc_wifi: wifi-regulator {
+		compatible = "regulator-fixed";
+		gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdio0_pwr>;
+		regulator-name = "vcc_wifi";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		startup-delay-us = <100000>;
+		vin-supply = <&vcc_io>;
+	};
+
+
 	vcc_flash: flash-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_flash";
@@ -460,13 +473,31 @@
 &sdio0 {
 	broken-cd;
 	bus-width = <4>;
+	clock-freq-min-max = <400000 5000000>;
 	disable-wp;
 	non-removable;
+	cap-sd--highspeed;
 	num-slots = <1>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
+	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
+
+	sd-uhs-sdr104;
+	sd-uhs-sdr12;
+	sd-uhs-sdr25;
+	cap-sdio-irq;
+
 	vmmc-supply = <&vcc_18>;
+/*	mmc-supply = <&vcc_wifi>; */
 	status = "okay";
+
+	brcmf: bcrmf@1 {
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&gpio4>;
+		reg = <0>;
+		interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-names = "host-wake";
+		status = "okay";
+	};
 };
 
 &sdmmc {
-- 
1.9.1


> Thanks in advance,
> Have a nice day,
> Romain
> 
> 1. https://www.kernel.org/doc/Documentation/SubmittingPatches
> 
> 
> 2015-07-22 7:58 GMT+02:00 Michael Trimarchi <michael@amarulasolutions.com>:
> > Hi
> >
> >
> > On Tue, Jul 21, 2015 at 2:51 PM, Michael Trimarchi
> > <michael@amarulasolutions.com> wrote:
> >> Hi
> >>
> >> I have managed to let my wifi working using mainline but I have
> >> problem on clocking. Right now I can not rise the clock more the 5Mhz
> >> even it's suppose to work up to 50Mhz. Anyone is working on it right
> >> now?
> >>
> >
> > I put in attach two patches that I need on my version. Another problem
> > is that execute_tuning is not defined in the dw_mmc-rockchip so
> > ENOSYS is returned. I think that we have two way:
> >
> > 1) put a stub
> > 2) define 0 as default error
> >
> > Michael
> >
> >> Michael
> >
> > _______________________________________________
> > Linux-rockchip mailing list
> > Linux-rockchip@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-rockchip
> >

-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Firefly wifi mainline patches
       [not found]   ` <CAOf5uw=cvu9ST+QexgMQP06xQVAz6th_EepfxQOAXNDrWopf6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2015-07-22  6:45     ` Romain Perier
@ 2015-07-22 13:36     ` Doug Anderson
       [not found]       ` <CAD=FV=U6DmLr_VC3XKs+ALKKhwsg+JXmo+52aEoWOkvkXr3UGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Doug Anderson @ 2015-07-22 13:36 UTC (permalink / raw)
  To: Michael Trimarchi; +Cc: open list:ARM/Rockchip SoC..., Alexandru Stan

Hi,

On Tue, Jul 21, 2015 at 10:58 PM, Michael Trimarchi
<michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
> Hi
>
>
> On Tue, Jul 21, 2015 at 2:51 PM, Michael Trimarchi
> <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
>> Hi
>>
>> I have managed to let my wifi working using mainline but I have
>> problem on clocking. Right now I can not rise the clock more the 5Mhz
>> even it's suppose to work up to 50Mhz. Anyone is working on it right
>> now?
>>
>
> I put in attach two patches that I need on my version. Another problem
> is that execute_tuning is not defined in the dw_mmc-rockchip so
> ENOSYS is returned. I think that we have two way:
>
> 1) put a stub
> 2) define 0 as default error

I don't think you should be trying to tune until the tuning patches
are landed.  Alexandru sent them up a while ago but they need to be
respun.  I seem to remember Alexandru saying that it decided your
controller was UHS capable if you didn't specify any capabilities, so
maybe that's it.

Try adding this to your SDIO port in the dts:

cap-sd-highspeed;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Firefly wifi mainline patches
       [not found]       ` <CAD=FV=U6DmLr_VC3XKs+ALKKhwsg+JXmo+52aEoWOkvkXr3UGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-07-23 19:50         ` Michael Trimarchi
  2015-08-02  9:08           ` Michael Trimarchi
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Trimarchi @ 2015-07-23 19:50 UTC (permalink / raw)
  To: Doug Anderson; +Cc: open list:ARM/Rockchip SoC..., Alexandru Stan

Hi

On Wed, Jul 22, 2015 at 06:36:39AM -0700, Doug Anderson wrote:
> Hi,
> 
> On Tue, Jul 21, 2015 at 10:58 PM, Michael Trimarchi
> <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
> > Hi
> >
> >
> > On Tue, Jul 21, 2015 at 2:51 PM, Michael Trimarchi
> > <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
> >> Hi
> >>
> >> I have managed to let my wifi working using mainline but I have
> >> problem on clocking. Right now I can not rise the clock more the 5Mhz
> >> even it's suppose to work up to 50Mhz. Anyone is working on it right
> >> now?
> >>
> >
> > I put in attach two patches that I need on my version. Another problem
> > is that execute_tuning is not defined in the dw_mmc-rockchip so
> > ENOSYS is returned. I think that we have two way:
> >
> > 1) put a stub
> > 2) define 0 as default error
> 
> I don't think you should be trying to tune until the tuning patches
> are landed.  Alexandru sent them up a while ago but they need to be
> respun.  I seem to remember Alexandru saying that it decided your
> controller was UHS capable if you didn't specify any capabilities, so
> maybe that's it.
> 
> Try adding this to your SDIO port in the dts:
> 
> cap-sd-highspeed;

I have rebase on https://github.com/mmind/linux-rockchip
mainline/devel/upstream. Need to do some more test here and not
yet ready for mainline

From f076b38f6056404cea11b1c5f4595dfe5b7e5aef Mon Sep 17 00:00:00 2001
From: Michael Trimarchi <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
Date: Thu, 23 Jul 2015 21:39:44 +0200
Subject: [PATCH] ARM: dts: rockchip: add wifi support to firefly board

This patch add the wifi support to firefly. In order to use
the user need the ap6535 specific wifi firmware. vcc_wifi
regulator is set to 2V in order to workaround the fact
that the card answer to not support 1.8V power.

Signed-off-by: Michael Trimarchi <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 arch/arm/boot/dts/rk3288-firefly.dtsi | 35 +++++++++++++++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 20fa0ef..2958cd2 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -117,6 +117,21 @@
 		vin-supply = <&vcc_io>;
 	};
 
+	vcc_wifi: wifi-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdio0_pwr>;
+		regulator-name = "vcc_wifi";
+		regulator-min-microvolt = <2000000>;
+		regulator-max-microvolt = <2000000>;
+		startup-delay-us = <100000>;
+		regulator-always-on;
+		vin-supply = <&vcc_io>;
+	};
+
+
 	vcc_flash: flash-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_flash";
@@ -440,13 +455,29 @@
 &sdio0 {
 	broken-cd;
 	bus-width = <4>;
+	clock-freq-min-max = <400000 20000000>;
 	disable-wp;
 	non-removable;
+	cap-sd-highspeed;
 	num-slots = <1>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
-	vmmc-supply = <&vcc_18>;
+	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
+
+	sd-uhs-sdr12;
+	sd-uhs-sdr25;
+	cap-sdio-irq;
+
+	vmmc-supply = <&vcc_wifi>;
 	status = "okay";
+
+	brcmf: bcrmf@1 {
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&gpio4>;
+		reg = <0>;
+		interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-names = "host-wake";
+		status = "okay";
+	};
 };
 
 &sdmmc {
-- 
1.9.1

-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Firefly wifi mainline patches
  2015-07-23 19:50         ` Michael Trimarchi
@ 2015-08-02  9:08           ` Michael Trimarchi
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Trimarchi @ 2015-08-02  9:08 UTC (permalink / raw)
  To: Doug Anderson; +Cc: open list:ARM/Rockchip SoC..., Alexandru Stan

Hi all


On Thu, Jul 23, 2015 at 9:50 PM, Michael Trimarchi
<michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
> Hi
>
> On Wed, Jul 22, 2015 at 06:36:39AM -0700, Doug Anderson wrote:
>> Hi,
>>
>> On Tue, Jul 21, 2015 at 10:58 PM, Michael Trimarchi
>> <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
>> > Hi
>> >
>> >
>> > On Tue, Jul 21, 2015 at 2:51 PM, Michael Trimarchi
>> > <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
>> >> Hi
>> >>
>> >> I have managed to let my wifi working using mainline but I have
>> >> problem on clocking. Right now I can not rise the clock more the 5Mhz
>> >> even it's suppose to work up to 50Mhz. Anyone is working on it right
>> >> now?
>> >>
>> >
>> > I put in attach two patches that I need on my version. Another problem
>> > is that execute_tuning is not defined in the dw_mmc-rockchip so
>> > ENOSYS is returned. I think that we have two way:
>> >
>> > 1) put a stub
>> > 2) define 0 as default error
>>
>> I don't think you should be trying to tune until the tuning patches
>> are landed.  Alexandru sent them up a while ago but they need to be
>> respun.  I seem to remember Alexandru saying that it decided your
>> controller was UHS capable if you didn't specify any capabilities, so
>> maybe that's it.
>>
>> Try adding this to your SDIO port in the dts:
>>
>> cap-sd-highspeed;
>

+       io_domains: io-domains {
+               compatible = "rockchip,rk3288-io-voltage-domain";
+               rockchip,grf = <&grf>;
+
+               wifi-supply = <&vcc_18>;

I finally manage to have it running at 50Mhz in high speed mode. I
need to do more testing but could be a problem
on invalid setting on logic. I will try to send up patches

Michael



> I have rebase on https://github.com/mmind/linux-rockchip
> mainline/devel/upstream. Need to do some more test here and not
> yet ready for mainline
>
> From f076b38f6056404cea11b1c5f4595dfe5b7e5aef Mon Sep 17 00:00:00 2001
> From: Michael Trimarchi <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
> Date: Thu, 23 Jul 2015 21:39:44 +0200
> Subject: [PATCH] ARM: dts: rockchip: add wifi support to firefly board
>
> This patch add the wifi support to firefly. In order to use
> the user need the ap6535 specific wifi firmware. vcc_wifi
> regulator is set to 2V in order to workaround the fact
> that the card answer to not support 1.8V power.
>
> Signed-off-by: Michael Trimarchi <michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
> ---
>  arch/arm/boot/dts/rk3288-firefly.dtsi | 35 +++++++++++++++++++++++++++++++++--
>  1 file changed, 33 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
> index 20fa0ef..2958cd2 100644
> --- a/arch/arm/boot/dts/rk3288-firefly.dtsi
> +++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
> @@ -117,6 +117,21 @@
>                 vin-supply = <&vcc_io>;
>         };
>
> +       vcc_wifi: wifi-regulator {
> +               compatible = "regulator-fixed";
> +               enable-active-high;
> +               gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&sdio0_pwr>;
> +               regulator-name = "vcc_wifi";
> +               regulator-min-microvolt = <2000000>;
> +               regulator-max-microvolt = <2000000>;
> +               startup-delay-us = <100000>;
> +               regulator-always-on;
> +               vin-supply = <&vcc_io>;
> +       };
> +
> +
>         vcc_flash: flash-regulator {
>                 compatible = "regulator-fixed";
>                 regulator-name = "vcc_flash";
> @@ -440,13 +455,29 @@
>  &sdio0 {
>         broken-cd;
>         bus-width = <4>;
> +       clock-freq-min-max = <400000 20000000>;
>         disable-wp;
>         non-removable;
> +       cap-sd-highspeed;
>         num-slots = <1>;
>         pinctrl-names = "default";
> -       pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
> -       vmmc-supply = <&vcc_18>;
> +       pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
> +
> +       sd-uhs-sdr12;
> +       sd-uhs-sdr25;
> +       cap-sdio-irq;
> +
> +       vmmc-supply = <&vcc_wifi>;
>         status = "okay";
> +
> +       brcmf: bcrmf@1 {
> +               compatible = "brcm,bcm4329-fmac";
> +               interrupt-parent = <&gpio4>;
> +               reg = <0>;
> +               interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
> +               interrupt-names = "host-wake";
> +               status = "okay";
> +       };
>  };
>
>  &sdmmc {
> --
> 1.9.1
>
> --
> | Michael Nazzareno Trimarchi                     Amarula Solutions BV |
> | COO  -  Founder                                      Cruquiuskade 47 |
> | +31(0)851119172                                 Amsterdam 1018 AM NL |
> |                  [`as] http://www.amarulasolutions.com               |



-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-08-02  9:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21 12:51 Firefly wifi mainline patches Michael Trimarchi
2015-07-22  5:58 ` Michael Trimarchi
     [not found]   ` <CAOf5uw=cvu9ST+QexgMQP06xQVAz6th_EepfxQOAXNDrWopf6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-22  6:45     ` Romain Perier
2015-07-22  6:58       ` Michael Trimarchi
2015-07-22  6:58         ` Michael Trimarchi
2015-07-22 13:36     ` Doug Anderson
     [not found]       ` <CAD=FV=U6DmLr_VC3XKs+ALKKhwsg+JXmo+52aEoWOkvkXr3UGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-23 19:50         ` Michael Trimarchi
2015-08-02  9:08           ` Michael Trimarchi

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.