https://linux-sunxi.org/api.php?action=feedcontributions&user=Cunotj&feedformat=atom
linux-sunxi.org - User contributions [en]
2024-03-28T17:24:33Z
User contributions
MediaWiki 1.35.8
https://linux-sunxi.org/index.php?title=MicroSD_Breakout&diff=22793
MicroSD Breakout
2019-10-11T13:16:16Z
<p>Cunotj: /* Buy */</p>
<hr />
<div>[[Image:JTAG_MicroSD_UART-front.jpeg|thumb|GND, GND, VDD, RX, TX]]<br />
[[Image:JTAG MicroSD UART-back.jpeg|thumb]]<br />
[[Image:JTAG_MicroSD_UART-side.jpeg|thumb]]<br />
<br />
The cubieboard MicroSD breakout board provides JTAG and UART over the SD-Card connector. The UART connector is a 5 pin JST-XH.<br />
<br />
== Mapping ==<br />
{| class="wikitable"<br />
|-<br />
! Pin !! [[MMC|MicroSD]] !! [[JTAG]] Connection !! 14-pin ARM [[JTAG]] Header !! [[UART]] Connection !! 5-pin [[UART]] Header<br />
|-<br />
| 1 || Data2 || TCK || 9 || ''nc'' || ''nc''<br />
|-<br />
| 2 || CD/Data3 || ''nc'' || ''nc'' || RX || 2<br />
|-<br />
| 3 || Cmd || TDO || 11 || ''nc'' || ''nc''<br />
|-<br />
| 4 || VDD || VTG || 1,13 || VDD || 3<br />
|-<br />
| 5 || CLK || ''nc'' || ''nc'' || TX || 1<br />
|-<br />
| 6 || VSS || GND || 2,4,6,8,10,14 || GND || 4, 5<br />
|-<br />
| 7 || Data0 || TDI || 5 || ''nc'' || ''nc''<br />
|-<br />
| 8 || Data1 || TMS || 7 || ''nc'' || ''nc''<br />
|-<br />
| ''nc'' || ''nc'' || nTRST || 3 || ''nc'' || ''nc''<br />
|-<br />
| ''nc'' || ''nc'' || nRESET || 12 || ''nc'' || ''nc''<br />
|}<br />
<br />
== U-Boot output to sdcard UART ==<br />
<br />
For booting, apply the [[FEL/USBBoot]] procedure.<br />
<br />
=== u-boot-sunxi ===<br />
<br />
Add 'UART0_PORT_F' to the option of the *_FEL line of your board in ''boards.cfg''.<br />
Make sure it also contains 'SPL_FEL' instead of 'SPL'.<br />
<br />
=== Mainline U-Boot ===<br />
<br />
First, to setup u-boot for FEL mode, use ''&lt;board>_felconfig'' instead<br />
of the usual ''&lt;board>_defconfig''.<br />
<br />
Then, set in both<br />
* .config<br />
* spl/.conf<br />
<pre><br />
CONFIG_UART0_PORT_F=y<br />
</pre><br />
<br />
Alternatively, you can set the variables via menuconfig,<br />
but again you have to do this twice:<br />
* make menuconfig<br />
* make spl/menuconfig<br />
<pre><br />
ARM architecture ---><br />
[*] SPL/FEL mode support<br />
[*] UART0 on MicroSD breakout board<br />
</pre><br />
Compile as usual.<br />
<br />
== Linux kernel output to sdcard UART ==<br />
=== sunxi-3.4 kernel ===<br />
Some FEX modifications are needed. An example for A13:<br />
<pre class="brush: ini"><br />
@@ -31,13 +31,13 @@ sdc_d2 = port:PF05<2><1><default><default><br />
twi_port = 0<br />
twi_scl = port:PB00<2><1><default><default><br />
twi_sda = port:PB01<2><1><default><default><br />
<br />
[uart_para]<br />
-uart_debug_port = 1<br />
-uart_debug_tx = port:PG03<4><1><default><default><br />
-uart_debug_rx = port:PG04<4><1><default><default><br />
+uart_debug_port = 0<br />
+uart_debug_tx = port:PF02<4><1><default><default><br />
+uart_debug_rx = port:PF04<4><1><default><default><br />
<br />
[jtag_para]<br />
jtag_enable = 0<br />
jtag_ms = port:PF00<4><1><default><default><br />
jtag_ck = port:PF05<4><1><default><default><br />
@@ -112,15 +112,15 @@ twi1_sda = port:PB16<2><default><default><default><br />
twi2_used = 1<br />
twi2_scl = port:PB17<2><default><default><default><br />
twi2_sda = port:PB18<2><default><default><default><br />
<br />
[uart_para0]<br />
-uart_used = 0<br />
+uart_used = 1<br />
uart_port = 0<br />
uart_type = 2<br />
-uart_tx = port:PB19<2><1><default><default><br />
-uart_rx = port:PB20<2><1><default><default><br />
+uart_tx = port:PF02<4><1><default><default><br />
+uart_rx = port:PF04<4><1><default><default><br />
<br />
[uart_para1]<br />
uart_used = 1<br />
uart_port = 1<br />
uart_type = 2<br />
@@ -351,11 +351,11 @@ csi_power_en_b =<br />
csi_stby_b =<br />
csi_flash_b =<br />
csi_af_en_b =<br />
<br />
[mmc0_para]<br />
-sdc_used = 1<br />
+sdc_used = 0<br />
sdc_detmode = 1<br />
bus_width = 4<br />
sdc_d1 = port:PF00<2><1><2><default><br />
sdc_d0 = port:PF01<2><1><2><default><br />
sdc_clk = port:PF02<2><1><2><default><br />
</pre><br />
<br />
=== mainline kernel ===<br />
<br />
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):<br />
<br />
<pre><br />
pio: pinctrl@01c20800 {<br />
uart0_pins_a: uart0@0 {<br />
allwinner,pins = "PF2", "PF4";<br />
allwinner,function = "uart0";<br />
allwinner,drive = <0>;<br />
allwinner,pull = <0>;<br />
};<br />
};<br />
</pre><br />
<br />
== Breakout boards ==<br />
* [https://www.sparkfun.com/products/9419 microSD Sniffer] (@sparkfun.com) - header needs to be soldered.<br />
<br />
== See also ==<br />
* [[JTAG]]<br />
* [[UART]]<br />
<br />
== Buy ==<br />
https://www.sparkfun.com/products/9419 - SparkFun microSD sniffer.<br />
<br />
[[Category:Hardware]]<br />
[[Category:Development]]</div>
Cunotj
https://linux-sunxi.org/index.php?title=MicroSD_Breakout&diff=22792
MicroSD Breakout
2019-10-11T13:15:55Z
<p>Cunotj: /* Buy */ Removed dead link. Added SparkFun link.</p>
<hr />
<div>[[Image:JTAG_MicroSD_UART-front.jpeg|thumb|GND, GND, VDD, RX, TX]]<br />
[[Image:JTAG MicroSD UART-back.jpeg|thumb]]<br />
[[Image:JTAG_MicroSD_UART-side.jpeg|thumb]]<br />
<br />
The cubieboard MicroSD breakout board provides JTAG and UART over the SD-Card connector. The UART connector is a 5 pin JST-XH.<br />
<br />
== Mapping ==<br />
{| class="wikitable"<br />
|-<br />
! Pin !! [[MMC|MicroSD]] !! [[JTAG]] Connection !! 14-pin ARM [[JTAG]] Header !! [[UART]] Connection !! 5-pin [[UART]] Header<br />
|-<br />
| 1 || Data2 || TCK || 9 || ''nc'' || ''nc''<br />
|-<br />
| 2 || CD/Data3 || ''nc'' || ''nc'' || RX || 2<br />
|-<br />
| 3 || Cmd || TDO || 11 || ''nc'' || ''nc''<br />
|-<br />
| 4 || VDD || VTG || 1,13 || VDD || 3<br />
|-<br />
| 5 || CLK || ''nc'' || ''nc'' || TX || 1<br />
|-<br />
| 6 || VSS || GND || 2,4,6,8,10,14 || GND || 4, 5<br />
|-<br />
| 7 || Data0 || TDI || 5 || ''nc'' || ''nc''<br />
|-<br />
| 8 || Data1 || TMS || 7 || ''nc'' || ''nc''<br />
|-<br />
| ''nc'' || ''nc'' || nTRST || 3 || ''nc'' || ''nc''<br />
|-<br />
| ''nc'' || ''nc'' || nRESET || 12 || ''nc'' || ''nc''<br />
|}<br />
<br />
== U-Boot output to sdcard UART ==<br />
<br />
For booting, apply the [[FEL/USBBoot]] procedure.<br />
<br />
=== u-boot-sunxi ===<br />
<br />
Add 'UART0_PORT_F' to the option of the *_FEL line of your board in ''boards.cfg''.<br />
Make sure it also contains 'SPL_FEL' instead of 'SPL'.<br />
<br />
=== Mainline U-Boot ===<br />
<br />
First, to setup u-boot for FEL mode, use ''&lt;board>_felconfig'' instead<br />
of the usual ''&lt;board>_defconfig''.<br />
<br />
Then, set in both<br />
* .config<br />
* spl/.conf<br />
<pre><br />
CONFIG_UART0_PORT_F=y<br />
</pre><br />
<br />
Alternatively, you can set the variables via menuconfig,<br />
but again you have to do this twice:<br />
* make menuconfig<br />
* make spl/menuconfig<br />
<pre><br />
ARM architecture ---><br />
[*] SPL/FEL mode support<br />
[*] UART0 on MicroSD breakout board<br />
</pre><br />
Compile as usual.<br />
<br />
== Linux kernel output to sdcard UART ==<br />
=== sunxi-3.4 kernel ===<br />
Some FEX modifications are needed. An example for A13:<br />
<pre class="brush: ini"><br />
@@ -31,13 +31,13 @@ sdc_d2 = port:PF05<2><1><default><default><br />
twi_port = 0<br />
twi_scl = port:PB00<2><1><default><default><br />
twi_sda = port:PB01<2><1><default><default><br />
<br />
[uart_para]<br />
-uart_debug_port = 1<br />
-uart_debug_tx = port:PG03<4><1><default><default><br />
-uart_debug_rx = port:PG04<4><1><default><default><br />
+uart_debug_port = 0<br />
+uart_debug_tx = port:PF02<4><1><default><default><br />
+uart_debug_rx = port:PF04<4><1><default><default><br />
<br />
[jtag_para]<br />
jtag_enable = 0<br />
jtag_ms = port:PF00<4><1><default><default><br />
jtag_ck = port:PF05<4><1><default><default><br />
@@ -112,15 +112,15 @@ twi1_sda = port:PB16<2><default><default><default><br />
twi2_used = 1<br />
twi2_scl = port:PB17<2><default><default><default><br />
twi2_sda = port:PB18<2><default><default><default><br />
<br />
[uart_para0]<br />
-uart_used = 0<br />
+uart_used = 1<br />
uart_port = 0<br />
uart_type = 2<br />
-uart_tx = port:PB19<2><1><default><default><br />
-uart_rx = port:PB20<2><1><default><default><br />
+uart_tx = port:PF02<4><1><default><default><br />
+uart_rx = port:PF04<4><1><default><default><br />
<br />
[uart_para1]<br />
uart_used = 1<br />
uart_port = 1<br />
uart_type = 2<br />
@@ -351,11 +351,11 @@ csi_power_en_b =<br />
csi_stby_b =<br />
csi_flash_b =<br />
csi_af_en_b =<br />
<br />
[mmc0_para]<br />
-sdc_used = 1<br />
+sdc_used = 0<br />
sdc_detmode = 1<br />
bus_width = 4<br />
sdc_d1 = port:PF00<2><1><2><default><br />
sdc_d0 = port:PF01<2><1><2><default><br />
sdc_clk = port:PF02<2><1><2><default><br />
</pre><br />
<br />
=== mainline kernel ===<br />
<br />
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):<br />
<br />
<pre><br />
pio: pinctrl@01c20800 {<br />
uart0_pins_a: uart0@0 {<br />
allwinner,pins = "PF2", "PF4";<br />
allwinner,function = "uart0";<br />
allwinner,drive = <0>;<br />
allwinner,pull = <0>;<br />
};<br />
};<br />
</pre><br />
<br />
== Breakout boards ==<br />
* [https://www.sparkfun.com/products/9419 microSD Sniffer] (@sparkfun.com) - header needs to be soldered.<br />
<br />
== See also ==<br />
* [[JTAG]]<br />
* [[UART]]<br />
<br />
== Buy ==<br />
[ https://www.sparkfun.com/products/9419 - SparkFun microSD sniffer.]<br />
<br />
[[Category:Hardware]]<br />
[[Category:Development]]</div>
Cunotj
https://linux-sunxi.org/index.php?title=MicroSD_Breakout&diff=22791
MicroSD Breakout
2019-10-11T13:02:40Z
<p>Cunotj: /* Breakout boards */ Removed dead link.</p>
<hr />
<div>[[Image:JTAG_MicroSD_UART-front.jpeg|thumb|GND, GND, VDD, RX, TX]]<br />
[[Image:JTAG MicroSD UART-back.jpeg|thumb]]<br />
[[Image:JTAG_MicroSD_UART-side.jpeg|thumb]]<br />
<br />
The cubieboard MicroSD breakout board provides JTAG and UART over the SD-Card connector. The UART connector is a 5 pin JST-XH.<br />
<br />
== Mapping ==<br />
{| class="wikitable"<br />
|-<br />
! Pin !! [[MMC|MicroSD]] !! [[JTAG]] Connection !! 14-pin ARM [[JTAG]] Header !! [[UART]] Connection !! 5-pin [[UART]] Header<br />
|-<br />
| 1 || Data2 || TCK || 9 || ''nc'' || ''nc''<br />
|-<br />
| 2 || CD/Data3 || ''nc'' || ''nc'' || RX || 2<br />
|-<br />
| 3 || Cmd || TDO || 11 || ''nc'' || ''nc''<br />
|-<br />
| 4 || VDD || VTG || 1,13 || VDD || 3<br />
|-<br />
| 5 || CLK || ''nc'' || ''nc'' || TX || 1<br />
|-<br />
| 6 || VSS || GND || 2,4,6,8,10,14 || GND || 4, 5<br />
|-<br />
| 7 || Data0 || TDI || 5 || ''nc'' || ''nc''<br />
|-<br />
| 8 || Data1 || TMS || 7 || ''nc'' || ''nc''<br />
|-<br />
| ''nc'' || ''nc'' || nTRST || 3 || ''nc'' || ''nc''<br />
|-<br />
| ''nc'' || ''nc'' || nRESET || 12 || ''nc'' || ''nc''<br />
|}<br />
<br />
== U-Boot output to sdcard UART ==<br />
<br />
For booting, apply the [[FEL/USBBoot]] procedure.<br />
<br />
=== u-boot-sunxi ===<br />
<br />
Add 'UART0_PORT_F' to the option of the *_FEL line of your board in ''boards.cfg''.<br />
Make sure it also contains 'SPL_FEL' instead of 'SPL'.<br />
<br />
=== Mainline U-Boot ===<br />
<br />
First, to setup u-boot for FEL mode, use ''&lt;board>_felconfig'' instead<br />
of the usual ''&lt;board>_defconfig''.<br />
<br />
Then, set in both<br />
* .config<br />
* spl/.conf<br />
<pre><br />
CONFIG_UART0_PORT_F=y<br />
</pre><br />
<br />
Alternatively, you can set the variables via menuconfig,<br />
but again you have to do this twice:<br />
* make menuconfig<br />
* make spl/menuconfig<br />
<pre><br />
ARM architecture ---><br />
[*] SPL/FEL mode support<br />
[*] UART0 on MicroSD breakout board<br />
</pre><br />
Compile as usual.<br />
<br />
== Linux kernel output to sdcard UART ==<br />
=== sunxi-3.4 kernel ===<br />
Some FEX modifications are needed. An example for A13:<br />
<pre class="brush: ini"><br />
@@ -31,13 +31,13 @@ sdc_d2 = port:PF05<2><1><default><default><br />
twi_port = 0<br />
twi_scl = port:PB00<2><1><default><default><br />
twi_sda = port:PB01<2><1><default><default><br />
<br />
[uart_para]<br />
-uart_debug_port = 1<br />
-uart_debug_tx = port:PG03<4><1><default><default><br />
-uart_debug_rx = port:PG04<4><1><default><default><br />
+uart_debug_port = 0<br />
+uart_debug_tx = port:PF02<4><1><default><default><br />
+uart_debug_rx = port:PF04<4><1><default><default><br />
<br />
[jtag_para]<br />
jtag_enable = 0<br />
jtag_ms = port:PF00<4><1><default><default><br />
jtag_ck = port:PF05<4><1><default><default><br />
@@ -112,15 +112,15 @@ twi1_sda = port:PB16<2><default><default><default><br />
twi2_used = 1<br />
twi2_scl = port:PB17<2><default><default><default><br />
twi2_sda = port:PB18<2><default><default><default><br />
<br />
[uart_para0]<br />
-uart_used = 0<br />
+uart_used = 1<br />
uart_port = 0<br />
uart_type = 2<br />
-uart_tx = port:PB19<2><1><default><default><br />
-uart_rx = port:PB20<2><1><default><default><br />
+uart_tx = port:PF02<4><1><default><default><br />
+uart_rx = port:PF04<4><1><default><default><br />
<br />
[uart_para1]<br />
uart_used = 1<br />
uart_port = 1<br />
uart_type = 2<br />
@@ -351,11 +351,11 @@ csi_power_en_b =<br />
csi_stby_b =<br />
csi_flash_b =<br />
csi_af_en_b =<br />
<br />
[mmc0_para]<br />
-sdc_used = 1<br />
+sdc_used = 0<br />
sdc_detmode = 1<br />
bus_width = 4<br />
sdc_d1 = port:PF00<2><1><2><default><br />
sdc_d0 = port:PF01<2><1><2><default><br />
sdc_clk = port:PF02<2><1><2><default><br />
</pre><br />
<br />
=== mainline kernel ===<br />
<br />
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):<br />
<br />
<pre><br />
pio: pinctrl@01c20800 {<br />
uart0_pins_a: uart0@0 {<br />
allwinner,pins = "PF2", "PF4";<br />
allwinner,function = "uart0";<br />
allwinner,drive = <0>;<br />
allwinner,pull = <0>;<br />
};<br />
};<br />
</pre><br />
<br />
== Breakout boards ==<br />
* [https://www.sparkfun.com/products/9419 microSD Sniffer] (@sparkfun.com) - header needs to be soldered.<br />
<br />
== See also ==<br />
* [[JTAG]]<br />
* [[UART]]<br />
<br />
== Buy ==<br />
[http://store.r0ck.me/products/usd-breakout-board Buy from Tom Cubie's site.]<br />
<br />
[[Category:Hardware]]<br />
[[Category:Development]]</div>
Cunotj