PW-SH1
CPU
i.MX283
DRAM
Micron MT46H64M16LFBF-5
刻印 "D9LRG" から判明
16M x 16bit x 4banks
200MHz
16bit x 200MHz = 3200Mbit/s = 3.2Gbit/s = 400MB/s(理論値)
stream.c によるDRAMベンチ
STREAM_ARRAY_SIZE は 2000000
code: stream
-------------------------------------------------------------
Function Best Rate MB/s Avg time Min time Max time
Copy: 155.2 0.209151 0.206212 0.216315
Scale: 56.6 0.586453 0.565815 0.719971
Add: 61.8 0.784729 0.776794 0.799908
Triad: 41.7 1.161072 1.151184 1.177707
-------------------------------------------------------------
code:stream_axi0_bdw
-------------------------------------------------------------
Function Best Rate MB/s Avg time Min time Max time
Copy: 157.4 0.204703 0.203357 0.211050
Scale: 56.8 0.575303 0.563251 0.624081
Add: 62.3 0.785918 0.770906 0.835852
Triad: 42.0 1.241113 1.143121 1.933074
-------------------------------------------------------------
code: stream_oc_emi_div18
-------------------------------------------------------------
Function Best Rate MB/s Avg time Min time Max time
Copy: 164.6 0.195441 0.194467 0.196543
Scale: 58.0 0.557459 0.551829 0.561521
Add: 63.6 0.764462 0.754174 0.793317
Triad: 42.6 1.166849 1.127662 1.386778
-------------------------------------------------------------
code: stream_oc_emi_div18_cpu_div16
-------------------------------------------------------------
Function Best Rate MB/s Avg time Min time Max time
Copy: 191.4 0.168392 0.167166 0.169326
Scale: 69.9 0.464644 0.457945 0.470352
Add: 75.0 0.646883 0.640111 0.659466
Triad: 50.4 0.970372 0.952451 1.034832
-------------------------------------------------------------
DRAM Init
code: SPL output
HTLLCdram_size=00000004 mode-00000001
IOMUXのPAD設定でmDDRがある
u-boot-fslc/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
writel(PINCTRL_EMI_DS_CTRL_DDR_MODE_DDR2, → writel(PINCTRL_EMI_DS_CTRL_DDR_MODE_mDDR,
Configで PHYS_SDRAM_1_SIZE というのも
u-boot-fslc/include/configs/mx28evk.h
U-BootでPAD情報を書き込む時、DDR2のビットを clear しないといけない code: spl_mem_init.c before
/* Set DDR2 mode */
writel(PINCTRL_EMI_DS_CTRL_DDR_MODE_DDR2,
&pinctrl_regs->hw_pinctrl_emi_ds_ctrl_set);
code: spl_mem_init.c after
/* Clear DDR2 mode */
writel(PINCTRL_EMI_DS_CTRL_DDR_MODE_DDR2,
&pinctrl_regs->hw_pinctrl_emi_ds_ctrl_clr);
CTL32 REDUC: ON → OFF で壊れる
CTL33 AP: OFF → ON で遅くなる
CTL34 INTERP系 OFF → ON 変化せず
CTL36 FAST_WRITE OFF → ON 変化せず
CTL37 CASLAT_LIN_GATE 0x08 → 0x06, CASLAT_LIN 0x06 → 0x04, CASLAT 0x03 → 0x02 変化せず
CTL48 AXI0_BDW 0x21 (33) → 0x50 (80) 気持ち速くなった → 結局 0x32 (50) に
同様にCTL50 (AXI1), CTL52 (AXI2), CTL54 (AXI3) も 0x32 (50) に
eMMC
Samsung KLM8G1WE4A-A001
8GB (? GiB)
SSP0 に結線
CLKを取るとUSBにフォールバックする
eMMC横のJP501を導通させるとPSWITCHに電圧がかかりUSB recoveryにフォールバックする
SD
SSP1 に結線
Serial
キーボード情報を受信しているI2CのSDA, SCLはデフォルトだとDUART
ここからBoot ROM以前のデバッグ出力が出る
IOMUX設定以降はTP301がRX, TP302がTXになる
SPL ~ U-Boot
mach: u-boot-fslc/arch/arm/cpu/arm926ejs/mxs/spl_*.c
board: u-boot-fslc/board/freescale/mx28evk/*
i.MX28のブートの流れは以下の通り
DCDの情報を利用して、Boot ROMがメモリにU-Bootを展開
SPLがハードを初期化
U-Boot 本体
SPLが HTLLC などと表示するのはどうやら arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg 由来らしい
U-Boot build
defconfig
make mx28evk_defconfig: 普通のdefconfig
u-boot.sb
make u-boot.sb
i.MX6でいうu-boot.imxみたいなやつ
U-Bootのバイナリの前に、Boot ROMが解釈してメモリへの展開やレジスタ設定を実行する部分がある
かつては elftosb を使って変換していたが、現在はU-Boot単体でできる
流し込むにはmfgtoolを使用
SYS_EXTRA_OPTIONS は古いCONFIGの方法
例えば HAS_BAR,BAZ=64という値が入っていると
code:example
という風になるらしい
つまり、mx28evk_auart_console_defconfigはMXS_AUART,MXS_AUART_BASE=MXS_AUARTAPP0_BASEとあるので
code:example
#define CONFIG_MXS_AUART_BASE MXS_AUARTAPP0_BASE ということになる(使ってるひと居ないっぽいけど…)
mfgtool
相変わらず使いにくい
sudo uuu u-boot.sb で流し込める
LCD
w=800, h=480
depth=16 (レジスタが0x0)
pclk
hw_clkctrl_frac1.pixfrac = 0x12 = 18
hw_clkctrl_dis_lcdif = 0x9 = 9
dotclkなどなかった
i.MX287しかhsyncやdotclkといったピンがない
Windows CEのブートログ曰く ILI9805 らしい
フレキ
千鳥配列
39ピン
0.3mmピッチ
同面
開閉センサ
磁気センサ
USB
充電しながらUSB機器を使えないものか…
PWM
キーボード
音
SAIF0で音を出し、SAIF1で録音
I2C0にYAMAHAのYMU818Bがいる
分解なしBrain Linux
基板画像
https://gyazo.com/5c816a4df27198702f714ed19c0d35e4
https://gyazo.com/cd70bd0182d978f753fcc78f1bb43255
LCD 裏基板
左: 本体 PCB 側
右: LCD側
https://gyazo.com/34bd4a085ec0189808d624c8b2758970
ブートログ
code:output
BATT:1.72V
5
U
E
LLLC
Microsoft Windows CE Bootloader Common Library Version 1.4 Built Feb 5 2014 15:09:28
MCU Port = 1
--SetMUXPin()
MCU_I2CInit Start
MCU I2C = 1
MCU_I2CInit End
fInitLoop Loop start
MCU_ReadRegister MCU_REG_STATUS
WaitBIT Retry 0
MCU_ReadRegister MCU_REG_STATUS
WaitBIT Retry 1
MCU_ReadRegister MCU_REG_STATUS
WaitBIT Retry 2
MCU_ReadRegister MCU_REG_STATUS
WaitBIT Retry 3
MCU_ReadRegister MCU_REG_STATUS
WaitBIT ON
no MCU_REG_STATUS_UPDATE
not MCU_REG_RESET_DIAG
+ SDMMC_Init
MMC High Density card
MMC 8bit
WARNING: SDMMC_Init: g_bSDHCExist0=1 g_bSDHCExist1=0 OEMPlatformInit: SWITCH SDHC device to user partition.
ERROR: LoadBootCFG: failed to load configuration.
ERROR: flash initialization failed - loading bootloader defaults...
Resetting factory default configuration...
ERROR: ResetDefaultBootCFG: failed to store configuration to flash.
Cold Boot OS
MCU Version = 1.000 (Boot = 40)
Battery Voltage = 3456
System ready!
Preparing for download...
INFO: Initial Eboot Screen Display...
EBOOT: EBOOT_SetupPIXClock--
ConfigurePanel
Display first image
mpulcd_init_panel_hw pass
InitSharp() pass
Initiating image download in 0 seconds.
Starting auto download ...
+InitSpecifiedEthDevice
INFO: MAC address: 0-2-B3-92-A8-C4
-BLMenu .
INFO: Using device name: 'MX2843204'
INFO: Check Card BOOT
INFO: Reading NK image to SDHC (please wait)...
INFO: Copying NK image to RAM address 0xa0200000
INFO: Read is 1% completeINFO: Read is 2% completeINFO: Read is 3% completeINFO: Read is 4% completeINFO: Read is 5% completeINFO: Read is 6% completeINFO: Read is 7% completeINFO: Read is 8% completeINFO: Read is 9% completeINFO: Read is 10% completeINFO: Read is 11% completeINFO: Read is 12% completeINFO: Read is 13% completeINFO: Read is 14% completeINFO: Read is 15% completeINFO: Read is 16% completeINFO: Read is 17% completeINFO: Read is 18% completeINFO: Read is 19% completeINFO: Read is 20% completeINFO: Read is 21% completeINFO: Read is 22% completeINFO: Read is 23% completeINFO: Read is 24% completeINFO: Read is 25% completeINFO: Read is 26% completeINFO: Read is 27% completeINFO: Read is 28% completeINFO: Read is 29% completeINFO: Read is 30% completeINFO: Read is 31% completeINFO: Read is 32% completeINFO: Read is 33% completeINFO: Read is 34% completeINFO: Read is 35% completeINFO: Read is 36% completeINFO: Read is 37% completeINFO: Read is 38% completeINFO: Read is 39% completeINFO: Read is 40% completeINFO: Read is 41% completeINFO: Read is 42% completeINFO: Read is 43% completeINFO: Read is 44% completeINFO: Read is 45% completeINFO: Read is 46% completeINFO: Read is 47% completeINFO: Read is 48% completeINFO: Read is 49% completeINFO: Read is 50% completeINFO: Read is 51% completeINFO: Read is 52% completeINFO: Read is 53% completeINFO: Read is 54% completeINFO: Read is 55% completeINFO: Read is 56% completeINFO: Read is 57% completeINFO: Read is 58% completeINFO: Read is 59% completeINFO: Read is 60% completeINFO: Read is 61% completeINFO: Read is 62% completeINFO: Read is 63% completeINFO: Read is 64% completeINFO: Read is 65% completeINFO: Read is 66% completeINFO: Read is 67% completeINFO: Read is 68% completeINFO: Read is 69% completeINFO: Read is 70% completeINFO: Read is 71% completeINFO: Read is 72% completeINFO: Read is 73% completeINFO: Read is 74% completeINFO: Read is 75% completeINFO: Read is 76% completeINFO: Read is 77% completeINFO: Read is 78% completeINFO: Read is 79% completeINFO: Read is 80% completeINFO: Read is 81% completeINFO: Read is 82% completeINFO: Read is 83% completeINFO: Read is 84% completeINFO: Read is 85% completeINFO: Read is 86% completeINFO: Read is 87% completeINFO: Read is 88% completeINFO: Read is 89% completeINFO: Read is 90% completeINFO: Read is 91% completeINFO: Read is 92% completeINFO: Read is 93% completeINFO: Read is 94% completeINFO: Read is 95% completeINFO: Read is 96% completeINFO: Read is 97% completeINFO: Read is 98% completeINFO: Read is 99% completeINFO: Read is 100% complete
INFO: Copy of NK completed successfully
OEMLaunch called PhysAddress 0x40200000.
Download successful! Jumping to image at 0x0 (physical 0x40200000)...
Windows CE Kernel for ARM (Thumb Enabled) Built on May 7 2012 at 12:47:43
INFO:OALLogSetZones: dpCurSettings.ulZoneMask: 0xb
+OEMInit
-OEMInit
PM: PlatformSetSystemPowerState end tick=00000334
PM: PlatformSetSystemPowerState end tick=00000336
PM: PlatformSetSystemPowerState end tick=0000033A
cspddk.dll: CSP_Init()
No Buzzer Unit!
UsbEventThread() ID = 01850002
UfnPdd_PowerDown+++
UfnPdd_PowerDown---
SPI_Init: SpiInitialize Sucess: pSpi 0xd04d19a0 !!
PowerInit()++
CurrentCheckThread() ID = 01980002
PowerInitHandle() ID = 019A0002
PowerInitHandle()++
PowerInitHandle()--
PowerIRQHandler() ID = 019C0002
VDD5VDROOPHandler() ID = 019F0002
PowerInit()--
DieThermalCheckThread() ID = 01B80002
BatteryThreadProc() ID = 01BC0002
I2C_Init +++
I2C_Init(1) : ClockRate=400kbps
I2C_Init +++
I2C_Init(2) : ClockRate=100kbps
CallInterruptThread() ID = 01D70002
CallInterruptThread2() ID = 01DA0002
CallHPDetectInterruptThread() ID = 01DD0002
CallDelayStartThread() ID = 01E00002
TPDriver_Init()
TPDriver_Init() OK
OffEventThread() ID = 00990006
PowerMangementThread() ID = 009C0006
EnterSuspendThread() ID = 009F0006
PWR: PWR_Init: pPWRInfo=0xd04d3a60
PWR: PowerMangementThread START
BSPBacklightInitialize()
MRSensorISR() ID = 017E0006
SDHC: + DllEntry, Enter
SDHCDGetSlotInfo 0
ControllerIst() ID = 022E0002
SDHCCardDetectThread() ID = 02310002
ZZM: The SD card0 is present.
SDHCDGetSlotInfo 0
ControllerIst() ID = 02440002
SDHCCardDetectThread() ID = 02470002
ZZM: NO SD card1.
PXP_DllEntry: DLL_PROCESS_ATTACH lpvReserved(0x8022f628)
PxpClass::PxpInit: Enabling pixel pipeline
PXP_Init - hDev=0xd04d7e00
ZZM: The SD card0 is present.
DSK_Init: Region=6(DSK3)
FMD Init Get Region Error
DSK_Init: Region=7(DSK2)
FMD Init Get Region Error
DSK_Init: Region=4(DSK6)
CMD5: 0x00000005 0x00000000
SDHCSlotOptionHandler - SDHCDSetSlotInterfaceEx : Clock Setting: 52000000
SetInterface : setting for 8 bit mode
CSDSlot::HandleAddDevice() NO_MMC_DDR_MODE
FSTHandleAddDevice: LoadDevice type = 1, slot 0EDNA2CSDDevice::SDLoadDevice() Device_MMC (1) SDMEMORY: IdleThread() ID = 033E0002
DSK_Init sector(0x17c807) Adjust Size = 0xd137f8
DSK_Init: Region=1(DSK5)
FMD Init Get Region Count Error
DSK_Init: Region=0(DSK8)
DSK_Init sector(0x2700d) Size = 0xfff3
DSK_Init: Region=2(DSK9)
DSK_Init sector(0x3700d) Size = 0xfa7f3
DSK_Init: Region=3(DSK7)
DSK_Init sector(0x131802) Size = 0x4affe
GetBlockSize: Failed to get the alignment value Error:0x2. Setting to default. GetOverlayAlign: fails, size is 8!
GetDisplayGuid:
Initializing ILI9805 controller 16bit-2
GetVMemSizeFromRegistry: succeeds, size is 8388608!
KeybdEventThreadProc() ID = 03B20002
KbdNotificationThread() ID = 03B40002
EDNA2_KBD_Entry: Initialize KBD EDNA2 ID 0
EDNA2_KBD_ThreadProc() ID = 03C40002
EDNA2_KBD_PowerThreadProc() ID = 03C60002
EDNA2_KBD_ScanDelayProc() ID = 03CB0002
MCU_REG_STATUS = 0x0
MCU_REG_PORT_STATUS = 0x20
MCU_REG_RESET_STATUS = 0x1
MCUStartCommunication() START
MCUStartCommunication() END
EDNA2_KBD_Entry: END
LayMgr.cpp: Layout Manager successfully initialized to 1
DdsiTouchPanelAttach()
PenupDelayThreadProc() ID = 03DD0002
Disable JTAG
Debug UART disable