Purpose
It's an option for user to have eMMC(EmbeddedMulti Media Card) support on FWA-1012VC. It's quite like an external device and sometimes newer driver support from Kernel would be required.
Target Audience
All users who are using Advantech FWA-1K series and with eMMC device inside.
Use Cases
Following shows how we check eMMC device on FWA-1012VC through few steps and know the possible compatible issues user may run into.
Getting eMMC info
[root@1012 ~]# dmesg | grep mmc
[ 3.783345] mmc0: SDHCI controller on PCI [0000:00:1c.0] using ADMA 64-bit
[ 3.869963] mmc0: new HS400 MMC card at address 0001
[ 3.880243] mmcblk0: mmc0:0001 BJTD4R 29.1 GiB
[ 3.885070] mmcblk0boot0: mmc0:0001 BJTD4R partition 1 4.00 MiB
[ 3.891263] mmcblk0boot1: mmc0:0001 BJTD4R partition 2 4.00 MiB
[ 3.897453] mmcblk0rpmb: mmc0:0001 BJTD4R partition 3 4.00 MiB
Here HS400 is eMMC bus speed mode, 400MB/s, matches data sheet chapter 4.0
Here BJTD4R 29.1 GiB matches data sheet table 26 'Product name table's KLMBG2JENB-B041 32 GB 0x 424a54443452 (in ascii code)
Here mmc0:0001 indicates device path used to located in sysfs.
In sysfs, /sys/class/mmc_host/mmc0/mmc0:0001 contains many device attributes:
- cid register matches data sheet chapter 7.2
[root@1012 mmc0:0001]# cat cid
150100424a5444345203df11e25c5400
- others decoded cid fields, and also matches data sheet
[root@1012 mmc0:0001]# cat manfid
0x000015
[root@1012 mmc0:0001]# cat oemid
0x0100
[root@1012 mmc0:0001]# cat name
BJTD4R
[root@1012 mmc0:0001]# cat serial
0xdf11e25c
[root@1012 mmc0:0001]# cat date
05/2017
To check size, need go more deep to /sys/class/mmc_host/mmc0/mmc0:0001/block/mmcblk0
[root@1012 mmcblk0]# cat size
61071360
- Here 61071360 is sector size, so multiple 512: 61071360 x 512 = 31268536320 / 1024 / 1024 / 1024 = 29.12109375 GiB
===== Compatible =====
Error messages were found on Ubuntu 17.10 kernel 4.13.0-16-generic
[ 3.430486] mmc0: SDHCI controller on PCI [0000:00:1c.0] using ADMA 64-bit
[ 3.546914] mmc0: new HS400 MMC card at address 0001
[ 3.561429] mmcblk0: mmc0:0001 BJTD4R 29.1 GiB
[ 3.566187] mmcblk0boot0: mmc0:0001 BJTD4R partition 1 4.00 MiB
[ 3.572348] mmcblk0boot1: mmc0:0001 BJTD4R partition 2 4.00 MiB
[ 3.578539] mmcblk0rpmb: mmc0:0001 BJTD4R partition 3 4.00 MiB
[ 3.584971] mmcblk0: p1
[ 17.628046] mmc0: Timeout waiting for hardware interrupt.
[ 17.633578] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 17.640151] mmc0: sdhci: Sys addr: 0x00000008 | Version: 0x00001002
[ 17.646722] mmc0: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000008
[ 17.653294] mmc0: sdhci: Argument: 0x03a3df80 | Trn mode: 0x0000003b
[ 17.659865] mmc0: sdhci: Present: 0x1fff0206 | Host ctl: 0x0000003d
[ 17.666435] mmc0: sdhci: Power: 0x0000000b | Blk gap: 0x00000080
[ 17.673006] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 17.679578] mmc0: sdhci: Timeout: 0x0000000a | Int stat: 0x00000000
[ 17.686149] mmc0: sdhci: Int enab: 0x02ff000b | Sig enab: 0x02ff000b
[ 17.692721] mmc0: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 17.699292] mmc0: sdhci: Caps: 0x546ec8b2 | Caps_1: 0x80000007
[ 17.705862] mmc0: sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 17.712433] mmc0: sdhci: Resp0: 0x00000980 | Resp1: 0x00000000
[ 17.719005] mmc0: sdhci: Resp2: 0x00000000 | Resp3: 0x00000900
[ 17.725575] mmc0: sdhci: Host ctl2: 0x0000000d
[ 17.730152] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x000000102ce58200
[ 17.737415] mmc0: sdhci: ============================================
[ 17.744272] mmcblk0: response CRC error sending r/w cmd command, card status 0x400900
[ 29.148045] mmc0: Timeout waiting for hardware interrupt.
[ 29.153579] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 29.160152] mmc0: sdhci: Sys addr: 0x00000008 | Version: 0x00001002
[ 29.166721] mmc0: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000008
[ 29.173293] mmc0: sdhci: Argument: 0x03a3df80 | Trn mode: 0x0000003b
[ 29.179864] mmc0: sdhci: Present: 0x1fff0206 | Host ctl: 0x0000003d
[ 29.186436] mmc0: sdhci: Power: 0x0000000b | Blk gap: 0x00000080
[ 29.193007] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 29.199579] mmc0: sdhci: Timeout: 0x0000000a | Int stat: 0x00000000
[ 29.206148] mmc0: sdhci: Int enab: 0x02ff000b | Sig enab: 0x02ff000b
[ 29.212720] mmc0: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 29.219291] mmc0: sdhci: Caps: 0x546ec8b2 | Caps_1: 0x80000007
[ 29.225863] mmc0: sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 29.232434] mmc0: sdhci: Resp0: 0x00001301 | Resp1: 0x00000000
[ 29.239006] mmc0: sdhci: Resp2: 0x00000000 | Resp3: 0x00000900
[ 29.245575] mmc0: sdhci: Host ctl2: 0x0000000d
[ 29.250151] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x000000102ce58200
[ 29.257414] mmc0: sdhci: ============================================
[ 29.264270] mmcblk0: response CRC error sending r/w cmd command, card status 0x400900
Rechecked on Fedora 26 kernel 4.13.13-200.fc26.x86_64, issue was gone. So, supports from Kernel driver is highly suspected.
[ 3.767568] mmc0: SDHCI controller on PCI [0000:00:1c.0] using ADMA 64-bit
[ 3.851968] mmc0: new HS400 MMC card at address 0001
[ 3.862095] mmcblk0: mmc0:0001 BJTD4R 29.1 GiB
[ 3.866874] mmcblk0boot0: mmc0:0001 BJTD4R partition 1 4.00 MiB
[ 3.873067] mmcblk0boot1: mmc0:0001 BJTD4R partition 2 4.00 MiB
[ 3.879312] mmcblk0rpmb: mmc0:0001 BJTD4R partition 3 4.00 MiB
[ 3.885755] mmcblk0: p1
Comments
0 comments
Please sign in to leave a comment.