MicroSD Breakout



The cubieboard MicroSD breakout board provides JTAG and UART over the SD-Card connector. The UART connector is a 5 pin JST-XH.

U-Boot output to sdcard UART
For booting, apply the FEL/USBBoot procedure.

Mainline U-Boot
First, to setup u-boot for FEL mode, use &lt;board>_felconfig instead of the usual &lt;board>_defconfig.

Then, set in both CONFIG_UART0_PORT_F=y
 * .config
 * spl/.conf

Alternatively, you can set the variables via menuconfig, but again you have to do this twice: ARM architecture ---> [*] SPL/FEL mode support [*] UART0 on MicroSD breakout board Compile as usual.
 * make menuconfig
 * make spl/menuconfig

legacy u-boot-sunxi
Add 'UART0_PORT_F' to the option of the *_FEL line of your board in boards.cfg. Make sure it also contains 'SPL_FEL' instead of 'SPL'.

mainline kernel
It is necessary to delete the mmc0 entry from the dts file and also move uart0 pins from "PB22 and "PB23" to "PF2" and "PF4". This may look like adding something like this to the dts file (not the cleanest option):

pio: pinctrl@01c20800 { uart0_pins_a: uart0@0 { allwinner,pins = "PF2", "PF4"; allwinner,function = "uart0"; allwinner,drive = <0>; allwinner,pull = <0>; };	};

Legacy sunxi-3.4 kernel
Sunxi-3.4 kernel branch is deprecated and unsupported, information is here is stored for historical reasons.

Some FEX modifications are needed. An example for A13:

 @@ -31,13 +31,13 @@ sdc_d2 = port:PF05<2><1> twi_port = 0 twi_scl = port:PB00<2><1> twi_sda = port:PB01<2><1> [uart_para] -uart_debug_port = 1 -uart_debug_tx = port:PG03<4><1> -uart_debug_rx = port:PG04<4><1> +uart_debug_port = 0 +uart_debug_tx = port:PF02<4><1> +uart_debug_rx = port:PF04<4><1> [jtag_para] jtag_enable = 0 jtag_ms = port:PF00<4><1> jtag_ck = port:PF05<4><1> @@ -112,15 +112,15 @@ twi1_sda = port:PB16<2> twi2_used = 1 twi2_scl = port:PB17<2> twi2_sda = port:PB18<2> [uart_para0] -uart_used = 0 +uart_used = 1 uart_port = 0 uart_type = 2 -uart_tx = port:PB19<2><1> -uart_rx = port:PB20<2><1> +uart_tx = port:PF02<4><1> +uart_rx = port:PF04<4><1> [uart_para1] uart_used = 1 uart_port = 1 uart_type = 2 @@ -351,11 +351,11 @@ csi_power_en_b = csi_stby_b = csi_flash_b = csi_af_en_b = [mmc0_para] -sdc_used = 1 +sdc_used = 0 sdc_detmode = 1 bus_width = 4 sdc_d1 = port:PF00<2><1><2> sdc_d0 = port:PF01<2><1><2> sdc_clk = port:PF02<2><1><2>

Breakout boards

 * microSD Sniffer (@sparkfun.com) - header needs to be soldered.

Buy
https://www.sparkfun.com/products/9419 - SparkFun microSD sniffer.