Re-enabling SDIO Port?

Third party OS images and hardware mods
Post Reply
racerxdl
Posts: 14
Joined: Wed Nov 19, 2014 1:38 am
languages_spoken: english, portuguese
ODROIDs: U2, U3, C2, Go Advance
Location: São Paulo, Brazil
Has thanked: 0
Been thanked: 5 times
Contact:

Re-enabling SDIO Port?

Unread post by racerxdl » Mon Mar 09, 2020 10:09 am

Hi all, I was trying to re-enable the SDIO port (which seens disabled in stock firmware). I tried by adding this to rk3326-odroidgo2-linux.dts


&sdio {
bus-width = <4>;
supports-sdio;
ignore-pm-notify;
keep-power-in-suspend;
status = "okay";
};


It looks by dmesg that it found now:


[ 1.723163] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 1.772846] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[ 1.780635] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[ 1.783922] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[ 1.784290] mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 25000000Hz, actual 25000000HZ div = 0)
[ 1.785718] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[ 1.785797] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[ 1.785876] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[ 1.785921] mmc1: new SDIO card at address 0001


But I can't get my SDIO card to work. The same card works on a Raspberry pi zero. I just keep getting this with OGA:


probe of mmc1:0001:1 failed with error -110
probe of mmc1:0001:1 failed with error -110
probe of mmc1:0001:1 failed with error -110
probe of mmc1:0001:1 failed with error -110


Is there anything more I should do, besides adding the SDIO in dts?

Thanks

joy
Posts: 1159
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 84 times
Been thanked: 130 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by joy » Mon Mar 09, 2020 12:09 pm

Hi @racerxdl,
It looks your dts is OK.

Which type of sdio device do you use?
If it supports SDIO2.0, you need to add cap-sd-highspeed; in sdio dts to support max 50MHz.
or for SDIO3.0, needs sd-uhs-sdr104.

For example, to support sdio2.0 (max 50MHz)...

Code: Select all

&sdio {
  bus-width = <4>;
  supports-sdio;
  cap-sd-highspeed;
  ignore-pm-notify;
  keep-power-in-suspend;
  status = "okay";
};
Then, you will have this log.

Code: Select all

[    1.737171] dwmmc_rockchip ff380000.dwmmc: 1 slots initialized
[    1.789572] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[    1.799561] mmc_host mmc0: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = )
[    1.814911] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[    1.826651] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[    1.827711] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
[    1.878256] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[    1.878329] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[    1.878399] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[    1.878439] mmc1: new high speed SDIO card at address 0001

Code: Select all

# cat /sys/kernel/debug/mmc1/ios 
clock:          50000000 Hz
vdd:            21 (3.3 ~ 3.4 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      2 (4 bits)
timing spec:    2 (sd high-speed)
signal voltage: 0 (3.30 V)
driver type:    0 (driver type B)
If 25MHz sdio speed is enough to communicate with your SDIO device, you need to check (1) HW connection or (2) device driver level.

racerxdl
Posts: 14
Joined: Wed Nov 19, 2014 1:38 am
languages_spoken: english, portuguese
ODROIDs: U2, U3, C2, Go Advance
Location: São Paulo, Brazil
Has thanked: 0
Been thanked: 5 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by racerxdl » Mon Mar 09, 2020 12:30 pm

Hi @joy,

It is a SDIO 2 (50MHz) device. I'm trying to make the ESP8089 work on OGA.

This device has a peculiarity: When it boots, the kernel module loads the firmware and then the devices resets itself. So for example in the raspberry pi I need to run with poll_once=off (which leads to a DTB without the non-removable option).

I see that the mmc1/regs doesn't show polling mode, is there anyway to enable it? It looks like the device isn't being re-checked after firmware load.

joy
Posts: 1159
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 84 times
Been thanked: 130 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by joy » Mon Mar 09, 2020 12:57 pm

Hi @racerxdl,
Please refer to this github.
https://github.com/JeonghwaCho/esp8089

esp8089 has a multiple stage bring-up process.
[1]
To support it, I've modified some parts of esp8089 driver based on upstream kernel patch.
https://github.com/JeonghwaCho/esp8089/ ... 153fa75a0f
[2]
Also you need mmc core patch.
https://patchwork.kernel.org/patch/9857213/
I've modified the original patch to apply OGA kernel 4.4.y.
Here you are.

Code: Select all

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index e957861..c1c8adb 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1755,8 +1755,11 @@
  */
 void mmc_power_up(struct mmc_host *host, u32 ocr)
 {
-	if (host->ios.power_mode == MMC_POWER_ON)
-		return;
+	if (host->ios.power_mode == MMC_POWER_ON) {
+		if (host->ios.clock == 0)
+			goto set_clock;
+ 		return;
+	}
 
 	mmc_pwrseq_pre_power_on(host);
 
@@ -1781,6 +1784,7 @@
 
 	mmc_pwrseq_post_power_on(host);
 
+set_clock:
 	host->ios.clock = host->f_init;
 
 	host->ios.power_mode = MMC_POWER_ON;
@@ -1798,6 +1802,11 @@
 	if (host->ios.power_mode == MMC_POWER_OFF)
 		return;
 
+	if (host->rescan_keep_power) {
+		mmc_set_clock(host, 0);
+		return;
+	}
+
 	mmc_pwrseq_power_off(host);
 
 	host->ios.clock = 0;
@@ -1946,6 +1955,27 @@
 }
 EXPORT_SYMBOL(mmc_detect_change);
 
+/**
+ *	mmc_force_detect_change - force rescanning of a MMC socket even if
+ *				  it is non-removable
+ *	@host: host to rescan
+ *	@delay: optional delay to wait before detection (jiffies)
+ *	@keep_power: if set do not turn of vdd / call pwrseq_off during rescan
+ *
+ *	MMC drivers which need non-removable sdio devices to be rescanned
+ *	(e.g. because the device reboots its fw after a firmware upload),
+ *	can call this to force scanning the MMC socket for changes, even
+ *	if it is non-removable.
+ */
+void mmc_force_detect_change(struct mmc_host *host, unsigned long delay,
+			     bool keep_power)
+{
+	host->rescan_force = 1;
+	host->rescan_keep_power = keep_power;
+	_mmc_detect_change(host, delay, false);
+}
+EXPORT_SYMBOL(mmc_force_detect_change);
+
 void mmc_init_erase(struct mmc_card *card)
 {
 	unsigned int sz;
@@ -2649,9 +2679,10 @@
 		return;
 
 	/* If there is a non-removable card registered, only scan once */
-	if ((host->caps & MMC_CAP_NONREMOVABLE) && host->rescan_entered)
-		return;
-	host->rescan_entered = 1;
+	if (!mmc_card_is_removable(host) && host->rescan_entered &&
+	    !host->rescan_force)
+ 		return;
+ 	host->rescan_entered = 1;
 
 	mmc_bus_get(host);
 
@@ -2659,9 +2690,9 @@
 	 * if there is a _removable_ card registered, check whether it is
 	 * still present
 	 */
-	if (host->bus_ops && !host->bus_dead
-	    && !(host->caps & MMC_CAP_NONREMOVABLE))
-		host->bus_ops->detect(host);
+	if (host->bus_ops && !host->bus_dead &&
+	    (mmc_card_is_removable(host) || host->rescan_force))
+ 		host->bus_ops->detect(host);
 
 	host->detect_change = 0;
 
@@ -2693,16 +2724,22 @@
 	}
 
 	mmc_claim_host(host);
-	for (i = 0; i < ARRAY_SIZE(freqs); i++) {
-		if (!mmc_rescan_try_freq(host, max(freqs[i], host->f_min)))
-			break;
-		if (freqs[i] <= host->f_min)
-			break;
-	}
+
+ 	for (i = 0; i < ARRAY_SIZE(freqs); i++) {
+		if (!mmc_rescan_try_freq(host, max(freqs[i], host->f_min))) {
+			if (host->rescan_force) {
+				host->rescan_force = 0;
+				host->rescan_keep_power = 0;
+			}
+ 			break;
+		}
+ 		if (freqs[i] <= host->f_min)
+ 			break;
+ 	}
 	mmc_release_host(host);
 
  out:
-	if (host->caps & MMC_CAP_NEEDS_POLL)
+	if ((host->caps & MMC_CAP_NEEDS_POLL) || host->rescan_force)
 		mmc_schedule_delayed_work(&host->detect, HZ);
 }
 
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 35e0a01..e23f288c 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -332,6 +332,8 @@
 
 	int			rescan_disable;	/* disable card detection */
 	int			rescan_entered;	/* used with nonremovable devices */
+	int			rescan_force;	/* force rescan of (nonremovable) devices */
+	int			rescan_keep_power; /* Do not power off card */
 
 	int			need_retune;	/* re-tuning is needed */
 	int			hold_retune;	/* hold off re-tuning */
@@ -430,6 +432,10 @@
 int mmc_power_restore_host(struct mmc_host *host);
 
 void mmc_detect_change(struct mmc_host *, unsigned long delay);
+/* HdG: HACK HACK HACK do not upstream */
+#define MMC_HAS_FORCE_DETECT_CHANGE
+void mmc_force_detect_change(struct mmc_host *host, unsigned long delay,
+			     bool keep_power);
 void mmc_request_done(struct mmc_host *, struct mmc_request *);
 
 static inline void mmc_signal_sdio_irq(struct mmc_host *host)
And one more point is you don't need non-removable option in sdio dts.
Do not add it on sdio dts.

I've already confirmed esp8089 working via SDIO on OGA with these resources.
So, could you try it?

If you need more detailed guide for esp8089 on OGA, let me know.
I am planning to merge related commits to hardkernel github and also make a guide page soon. (around the end of this week)

racerxdl
Posts: 14
Joined: Wed Nov 19, 2014 1:38 am
languages_spoken: english, portuguese
ODROIDs: U2, U3, C2, Go Advance
Location: São Paulo, Brazil
Has thanked: 0
Been thanked: 5 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by racerxdl » Mon Mar 09, 2020 10:21 pm

Hi @joy,

I will give it a shot tonight and let you know. After I get it working, I'm planning to make a Open Source firmware for the ESP8266, then I can port it to ESP32 and we can add bluetooth to OGA.

I will let you know how it goes here. Thanks!
These users thanked the author racerxdl for the post:
joy (Tue Mar 10, 2020 11:27 am)

joy
Posts: 1159
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 84 times
Been thanked: 130 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by joy » Tue Mar 10, 2020 11:33 am

Hi @racerxdl,
Good!
I look forward to your work. :)

racerxdl
Posts: 14
Joined: Wed Nov 19, 2014 1:38 am
languages_spoken: english, portuguese
ODROIDs: U2, U3, C2, Go Advance
Location: São Paulo, Brazil
Has thanked: 0
Been thanked: 5 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by racerxdl » Tue Mar 10, 2020 12:43 pm

Hey @joy,

I tried here aplying the patch to the kernel but it does not seems to be working. I changed the esp8089 module to print debug statements as well

Code: Select all

[  240.758871] esp8089: loading out-of-tree module taints kernel.
[  240.762961] esp_sdio_init
[  240.762998]
               ***** EAGLE DRIVER VER:bdf5087c3deb*****

[  240.763013] esp debugfs init
[  240.763051] request_init_conf: attr_name[crystal_26M_en]request_init_conf: attr_name[test_xtal]request_init_conf: attr_name[sdio_configure]request_init_conf: attr_name[bt_configure]request_init_conf: attr_name[bt_protocol]request_init_conf: attr_name[dual_ant_configure]request_init_conf: attr_name[test_uart_configure]request_init_conf: attr_name[share_xtal]request_init_conf: attr_name[gpio_wake]request_init_conf: attr_name[no_auto_sleep]request_init_conf: attr_name[ext_rst]request_init_conf: attr_name[wakeup_gpio]request_init_conf: attr_name[ate_test]request_init_conf: attr_name[speed_suspend]ESP8089 reset via GPIO 42
[  240.967813] eagle_sdio_dummy: probe of mmc1:0001:1 failed with error -110
[  251.968159] esp_sdio_init ------ RETRY ------
[  251.968309] ESP8089 reset via GPIO 42
[  252.172150] ESP8089 reset via GPIO 42
[  252.376333] eagle_sdio_dummy: probe of mmc1:0001:1 failed with error -110
[  263.376597] esp_sdio_init ------ RETRY ------
[  263.376910] ESP8089 reset via GPIO 42
[  263.580846] ESP8089 reset via GPIO 42
[  263.784908] eagle_sdio_dummy: probe of mmc1:0001:1 failed with error -110
[  274.784325] esp_sdio_init ------ RETRY ------
[  274.784474] ESP8089 reset via GPIO 42
[  274.988349] ESP8089 reset via GPIO 42
[  275.192768] eagle_sdio_dummy: probe of mmc1:0001:1 failed with error -110
[  286.192018] esp_sdio_init ------ RETRY ------
[  286.192165] ESP8089 reset via GPIO 42
[  286.396076] eagle sdio can not power up!
I hooked up the EN pin to GPIO1_B2 (which is mapped through #42). Besides that I soldered in the WiFi test pads acording to the pinout same as raspberry pi. The ESP seens to be resetting correctly (there is a LED that blinks every reset).

As for how I applied the patch in the kernel, I used the tutorial here: https://wiki.odroid.com/odroid_go_advance/build_kernel but before the build I added your patch to a file called mmc.patch and ran:

Code: Select all

patch -p1 < mmc.patch
Built and then put the Image in boot partition and modules to /lib/modules.

Some more info:

Code: Select all

Linux goadvance 4.4.189 #3 SMP Tue Mar 10 00:22:58 -03 2020 aarch64 aarch64 aarch64 GNU/Linux

Code: Select all

root@goadvance:~/b/esp8089# cat /sys/kernel/debug/mmc1/ios
clock:          50000000 Hz
vdd:            21 (3.3 ~ 3.4 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      2 (4 bits)
timing spec:    2 (sd high-speed)
signal voltage: 0 (3.30 V)
driver type:    0 (driver type B)
And my DTB sdio section:

Code: Select all

&sdio {
       bus-width = <4>;
       supports-sdio;
       cap-sd-highspeed;
       ignore-pm-notify;
       keep-power-in-suspend;
       status = "okay";
};
Just curious, which GPIO did you use for ESP Reset?

Thanks

joy
Posts: 1159
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 84 times
Been thanked: 130 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by joy » Wed Mar 11, 2020 8:53 am

Hi @racerxdl,

Here is my configuration.
You can find SPI1* TPs beside lcd connector of OGA.
Please make sure that two lines should be externally pulled-up.
pull up value depends on your HW configuration of ESP8266.

Code: Select all

CHIP_EN : connect to SPI1_MISO (GPIO3_B6) with 10kohm pull-up from 3.3V
RST : connect to SPI1_CS0 (GPIO3_B1) with 10kohm pull-up from 3.3V
1. CHIP_EN
I set CHIP_EN to high once (not toggling) using mmc-pwrseq.

2. RESET
And ESP8266 RESET port is supposed to be toggled in driver level as your log. (It's for reset port, not enable port.)
But in my case, I just set it as pull-up and don't control via esp8089 esp_reset_gpio option.
So please try to load esp8089 module without esp_reset_gpio option setting. (esp_reset_gpio = 0)

Please refer to this patch of dts.

Code: Select all

diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux.dts
index 5cb56c0..9695263 100644
--- a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux.dts
@@ -298,6 +298,28 @@
 		clock-output-names = "CLK_CAMERA_25MHZ";
 		#clock-cells = <0>;
 	};
+
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_enable_h>;
+
+		/* CHIP_EN GPIO3_B6 */
+		reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
+	};
+
+	wireless-wlan {
+		compatible = "wlan-platdata";
+		rockchip,grf = <&grf>;
+		/* wifi_chip_type - wifi chip define
+		* ap6210, ap6330, ap6335
+		* rtl8188eu, rtl8723bs, rtl8723bu
+		* esp8089
+		*/
+		wifi_chip_type = "esp8089";
+		sdio_vref = <3300>; //1800mv or 3300mv
+		status = "okay";
+	};
 };
 
 
@@ -962,6 +984,19 @@
 	status = "okay";
 };
 
+&sdio {
+	bus-width = <4>;
+	cap-sd-highspeed;
+	cap-sdio-irq;
+	disable-wp;
+	supports-sdio;
+	ignore-pm-notify;
+	keep-power-in-suspend;
+	/* non-removable; */
+	mmc-pwrseq = <&sdio_pwrseq>;
+	status = "okay";
+};
+
 &tsadc {
 	pinctrl-names = "gpio", "otpout";
 	pinctrl-0 = <&tsadc_otp_gpio>;
@@ -1072,6 +1107,12 @@
 					<2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
 	};
+
+	sdio-pwrseq {
+		wifi_enable_h: wifi-enable-h {
+			rockchip,pins = <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
 };
 
 /* DON'T PUT ANYTHING BELOW HERE.  PUT IT ABOVE PINCTRL */
And I merged related commits to hardkernel github except dts patch.
It's same as I already shared with you.
https://github.com/hardkernel/linux/tre ... dgoA-4.4.y

PaulF8080
Posts: 29
Joined: Fri Feb 14, 2020 9:40 am
languages_spoken: english
ODROIDs: go, go advance, xu4
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by PaulF8080 » Thu Mar 12, 2020 2:38 pm

Did you compile the text file into a blob dtb binary file with "dtc" for by the bootloader?

joy
Posts: 1159
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 84 times
Been thanked: 130 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by joy » Thu Mar 12, 2020 5:22 pm

Hi @PaulF8080,
I think @racerxdl already changed rk3326-odroidgo2-linx.dtb in fat folder of his sd card :roll:
because mmc1 node is created.

Code: Select all

root@goadvance:~/b/esp8089# cat /sys/kernel/debug/mmc1/ios
clock:          50000000 Hz
vdd:            21 (3.3 ~ 3.4 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      2 (4 bits)
timing spec:    2 (sd high-speed)
signal voltage: 0 (3.30 V)
driver type:    0 (driver type B)

racerxdl
Posts: 14
Joined: Wed Nov 19, 2014 1:38 am
languages_spoken: english, portuguese
ODROIDs: U2, U3, C2, Go Advance
Location: São Paulo, Brazil
Has thanked: 0
Been thanked: 5 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by racerxdl » Tue Mar 17, 2020 10:21 am

Hi @joy, sorry. I tested in the same day and it worked! I'm now just finding a good way to make it shut inside the Odroid Go Advance case since the place I did put was below the battery.

I will make a tutorial after I get everything working. But looks good so far. about 3MB/s throughput (~18Mbps) for a cheap ESP8266 is good.

@PaulF8080, yes. The issue was just the resetting of the MMC bus since the device gets the firmware loaded and the Rockchip MMC driver does not pool for new devices. The changes @Joy reported made it work nicely!

Thanks for the help!

Image
These users thanked the author racerxdl for the post (total 3):
odroid (Tue Mar 17, 2020 10:50 am) • joy (Tue Mar 17, 2020 11:07 am) • rooted (Tue Mar 17, 2020 12:08 pm)

joy
Posts: 1159
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 84 times
Been thanked: 130 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by joy » Tue Mar 17, 2020 11:17 am

Hi @racerxdl,
Oh! It works! Good to hear it. :D
And thank you for sharing the status.

So, you're working bluetooth function, too. Right?
I haven't checked BT using ESP8266 yet.
If you share the tutorial, it will be awesome and very helpful for forum friends!

racerxdl
Posts: 14
Joined: Wed Nov 19, 2014 1:38 am
languages_spoken: english, portuguese
ODROIDs: U2, U3, C2, Go Advance
Location: São Paulo, Brazil
Has thanked: 0
Been thanked: 5 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by racerxdl » Tue Mar 17, 2020 10:52 pm

Yes @joy,

sadly, ESP8266 does not have bluetooth, only ESP32. So I will try to rewrite the entire SDIO WiFi firmware as a opensource project, then I can port it to ESP32 and add bluetooth support.

I will make the tutorial about getting the ESP8266 working on it as soon as I can. Maybe a image release with everything inside (since it has been merged into Hardkernel Kernel, we should release a new version for OGA that already has it supported).

Lucas

joy
Posts: 1159
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 84 times
Been thanked: 130 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by joy » Wed Mar 18, 2020 7:32 am

joy wrote:
Tue Mar 17, 2020 11:17 am
I haven't checked BT using ESP8266 yet.
racerxdl wrote:
Tue Mar 17, 2020 10:52 pm
Yes @joy,
sadly, ESP8266 does not have bluetooth, only ESP32. So I will try to rewrite the entire SDIO WiFi firmware as a opensource project, then I can port it to ESP32 and add bluetooth support.
@racerxdl,
Let me fix my wrong comment.
You're right. ESP8266 doesn't support BT functionality.

Thank you for sharing future plan with ESP32.
I look forward to it!

racerxdl
Posts: 14
Joined: Wed Nov 19, 2014 1:38 am
languages_spoken: english, portuguese
ODROIDs: U2, U3, C2, Go Advance
Location: São Paulo, Brazil
Has thanked: 0
Been thanked: 5 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by racerxdl » Wed Mar 18, 2020 12:36 pm

Just for completenes, today in my live stream I finished closing the OGA with the ESP!

I tried without the 33 ohm resistors, and looks fine. 3.5MB/s throughput on wifi (20Mbps~). Here are some pics.
20200317_233128.jpg
20200317_233128.jpg (430.96 KiB) Viewed 715 times
20200317_231645.jpg
20200317_231645.jpg (568.31 KiB) Viewed 715 times
20200317_230303.jpg
20200317_230303.jpg (508.4 KiB) Viewed 715 times
20200317_230112.jpg
20200317_230112.jpg (478.02 KiB) Viewed 715 times
20200317_230056.jpg
20200317_230056.jpg (503.22 KiB) Viewed 715 times
These users thanked the author racerxdl for the post:
joy (Wed Mar 18, 2020 3:10 pm)

crashoverride
Posts: 4840
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 248 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by crashoverride » Wed Mar 18, 2020 1:05 pm

racerxdl wrote:
Tue Mar 17, 2020 10:52 pm
Maybe a image release with everything inside
The most current kernel available at the time is used when creating images. Future images will also include the most recent kernel available. All images have included the ability to update the kernel via 'apt upgrade'. The kernel repository used is here:
http://deb.odroid.in/go2

It should be possible to download the kernel .deb file and copy it to the GO Advance. Then, it can be installed using "sudo dpkg -i" followed by the .deb file name.

Note that I do not maintain the kernel repository. I have no control over when updates are made or what is contained in them.

joy
Posts: 1159
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 84 times
Been thanked: 130 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by joy » Wed Mar 18, 2020 2:37 pm

@crashoverride,
Thank you for your detailed description.
@racerxdl,
I will check the kernel update version and upload policy with hardkernel team.

joy
Posts: 1159
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 84 times
Been thanked: 130 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by joy » Wed Mar 18, 2020 3:09 pm

@racerxdl,
Thank you for sharing your HW configuration and test result.

If you're available, try series resistors, 33ohm or 100ohm in SDIO signals.
( But if you will move to the next stage with ESP32, just ignore it. ;) )
The value may depend on the module HW you're using.
In my test case, when I did put repetitive reboot tests without it, sometime OGA doesn't detect ESP8266 IDs during initial process.

Here is my brief test result.
viewtopic.php?f=194&t=37485&start=50#p286139

racerxdl
Posts: 14
Joined: Wed Nov 19, 2014 1:38 am
languages_spoken: english, portuguese
ODROIDs: U2, U3, C2, Go Advance
Location: São Paulo, Brazil
Has thanked: 0
Been thanked: 5 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by racerxdl » Thu Mar 19, 2020 3:16 am

Hi @joy,

I think my throughput is limited by the distance of the router. The ESP8266 antenna is not that great and I'm like 20m away from the Unifi antenna with some doors and walls. The signal is 50/70 reported by iwconfig.

I tried the resistors, but I ended up not putting any. They really didn't made any difference here. I tried 33, 100 and 200 ohms, all of them worked but no apparent difference. I didn't had any problems on bootup by running it without the resistors.

One thing to mention is that if I reboot the linux, the kernel module wouldn't work anymore because it can't upload the firmware. That's not a big deal in OGA because the button always power off the device, but if in the future there are other boards that works similary (like a standalone odroid instead a portable device) that might be an issue. I will start working on the new firmware.

Since the ESP8266 has a SPI flash (I don't know any of then that doesn't), I'm planning to have the Kernel driver to suport a device that has already been loaded with firmware. This way someone can just write the firmware directly to the ESP and it will always be available as Wifi card on SDIO. The kernel module bootup might be more simple as well.

I will let you know about the progress.

Thanks for all the help!

Lucas

joy
Posts: 1159
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 84 times
Been thanked: 130 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by joy » Fri Mar 20, 2020 9:44 am

Hi @racerxdl,
Oh. I see.
Thank you for sharing your test results with the series resistors.

In my case, I don't have problem now to reload firmware during reboot because esp8089 module driver has firmware as header file type
and it initializes from 1st step according to mmc driver probe every reboot time.
But I will check it again more thoroughly.
And if you share the instruction to use external SPI flash on the wifi module board, it will be very helpful for us. :)

Thanks!

User avatar
Etx
Posts: 51
Joined: Mon Jan 20, 2020 9:10 am
languages_spoken: english, chinese, russian, ukrainian
ODROIDs: ODROID-GO Advance
Has thanked: 0
Been thanked: 8 times
Contact:

Re: Re-enabling SDIO Port?

Unread post by Etx » Sat Mar 21, 2020 10:41 am

It'll be great to create a gerber file with a matching PCB to solder it inside the OGA. First step will be soldering a module onto this adapter board and further soldering whole assembly to that row of pins at the OGA board. Without any wires, direct solder joint like at the attached 2nd photo. Thank to a services like JLPCB, everybody will be able to order it for cheap and make a reliable mod.
Attachments
h.png
h.png (2.76 KiB) Viewed 386 times
IMG_20180329_082642_s.jpg
IMG_20180329_082642_s.jpg (40.14 KiB) Viewed 390 times

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: gisorax and 4 guests