sys_config.fex 用这一组DDR参数看看
dram_clk = 600
dram_type = 3
dram_dx_odt = 0x03030303
dram_dx_dri = 0x0e0e0e0e
dram_ca_dri = 0x1c16
dram_odt_en = 1
dram_para1 = 0x30fb
dram_para2 = 0x0000
dram_mr0 = 0x840
dram_mr1 = 0x4
dram_mr2 = 0x8
dram_mr3 = 0x0
dram_mr4 = 0x0
dram_mr5 = 0x0
dram_mr6 = 0x0
dram_mr11 = 0x0
dram_mr12 = 0x0
dram_mr13 = 0x0
dram_mr14 = 0x0
dram_mr16 = 0x0
dram_mr17 = 0x0
dram_mr22 = 0x0
dram_tpr0 = 0xC0000007
dram_tpr1 = 0x0
dram_tpr2 = 0x100
dram_tpr3 = 0x0
dram_tpr6 = 0x33808080
dram_tpr10 = 0x002F6606
dram_tpr11 = 0xffffdddd
dram_tpr12 = 0xfedf7657
dram_tpr13 = 0x40
YiXinTai 发布的帖子
-
回复: H616 - 四个 DDR3 配置
-
回复: H313烧录固件DRAM 报错
@xpo115 目前调试过这些物料:
颗粒品牌 DDR类型 颗粒型号 颗粒容量 颗粒频率 芯片 模板 验证频率
三星 DDR3 K4B4G0446Q-HYKO 1024M4bit 1600 H616 AW DDR3 4b8 4L 648MHz
三星 DDR3 K4B1G0446F-HCH9? 256M4bit 1333 H313 AW DDR3 4b8 4L 600MHz
三星 DDR3 K4B1G0446F-HCH9? 256M4bit 1333 H616 AW DDR3 4b8 4L 648MHz
三星 DDR3 K4B2G0446C-HYH9 512M4bit 1333 H616 AW DDR3 4b8 4L 648MHz
三星 DDR3 K4B2G0446D-HCH9 512M4bit 1333 H616 AW DDR3 4b8 4L 648MHz
三星 DDR3 K4B2G0446D-HCKO 512M4bit 1600 H313 AW DDR3 4b8 4L 600MHz
三星 DDR3 K4B2G0446D-HYH9 512M4bit 1333 H616 AW DDR3 4b8 4L 648MHz
三星 DDR3 K4B4G0446B-HCKO 1024M4bit 1600 H616 AW DDR3 4b8 4L 648MHz
三星 DDR3 K4B4G0446B-HYH9 1024M4bit 1600 H616 AW DDR3 4b8 4L 648MHz
三星 DDR3 K4B4G0446Q-HYKO 1024M4bit 1600 H616 AW DDR3 4b8 4L 648MHz
紫光 DDR3 SCB13H4G160AF-11M H616 AW DDR3 16b4 4L 792MHz
妙存 LPDDR4 ATL4B0832 1GB 1866 H313 AW LP4-200ball 720MHz
妙存 LPDDR4 ATL4B1632 2GB 1866 H313 AW LP4-200ball 720MHz
长鑫 DDR4 CXDQ3BFAM-CG 8Gb 2666 H616 AW DDR4 16b4 4L 792MHz
镁光 DDR3 D9KPX 256M4bit 1333 H313 AW DDR3 4b8 4L 600MHz
镁光 DDR3 D9LGD 512M4bit 1333 H313 AW DDR3 4b8 4L 600MHz
镁光 DDR3 D9PFK 512M4bit 1600 H313 AW DDR3 4b8 4L 600MHz
镁光 DDR3 D9PQL 1024M4bit 1600 H616 AW DDR3 4b8 4L 648MHz
镁光 DDR3 D9PSC 512M4bit 1600 H313 AW DDR3 4b8 4L 600MHz
镁光 DDR3 D9SHD H616 AW DDR3 16b4 4L 792MHz
金士顿 LPDDR3-EMCP EL3CV100 1GB H313 AW LP3-EMCP 696MHz
DOsilicon DDR3 FM38F16SBB-9MGD H313 AW DDR3 16b4 4L 600MHz
尔必达 DDR3 J2104EDBG-DJ-F H313 AW DDR3 4b4 4L 672MHz
海力士? H313 H5TC4G63AFR 256M16bit H313 AW DDR3 16b4 4L 720MHz
FORESEE LPDDR3 NCLD3B2256M32 1GB H313 AW LPDDR3-178ball 4L 600MHz
尔必达 LPDDR3 EDFA232A1MA-GD-F 2GB 1600 H313 AW LPDDR3-178ball 4L 600MHz
H700 LPDDR4 RS384M32LZ4D2ANP-75BT 1.5GB2 H700 AW LPDDR4 32bit2 672MHz
三星 LPDDR3 KMQ310006A-B419 1.5GB 1866 H616 AW LP3-EMCP 4L 933MHz
Spectek LPDDR4 PS007-075 BT H313 AW dongle LPDDR4 6L 696MHz
Rayson LPDDR4 RS384M32LZ4D2ANP-75BT 1.5GB H313 AW LPDDR4 32bit 720MHz
三星 DDR3 K4B1G0446E-HCH9 256M4bit 未知 H313 AW DDR3 4b8 4L 600MHz
尔必达 DDR3 J1104BDSE-DJ-F 256M4bit 未知 H313 AW DDR3 4b8 4L 600MHz
镁光 DDR3 D9PQL 512M4bit 未知 H313 AW DDR3 4b4 4L 672MHz
金士顿 LPDDR3-EMCP 08EMCP08-EL3CV100 1GB 未知 H313 AW LP3-EMCP 720MHz
三星 LPDDR3 K4E6E304ED-AGCC 2GB - H313 AW LPDDR3-168ball 6L 600MHz
三星 DDR3 K4B4G1646E-BCMA 1GB - H313 AW DDR3 16b2 6L 600MHz
江波龙 LPDDR4 NCLD4C1MA256M32 1GB H313 AW LP4-200ball 792MHz
长鑫 DDR4 CXDQ3BFAM-CQ 1GB 2666 H616 AW DDR4 16b*2 4L 792MHz
江波龙 LPDDR4 FL4C2001G-D9 1GB H313 AW LP4-200ball 792MHz -
回复: 请问全志H616 zero2如何编译驱动模块
@king_messi 一般内核编译是make ARCH=arm64 menuconfig,还有就是找arch arm64 configs下面对应的内核配置文件
-
回复: F133-b的Linux版本的libadecoder.so开启解码会占用4M的内存,这个值可以改小吗?
@hjbilly 要裁剪的话把不需要的视频解码格式都去掉,就可以减少内存开支
-
回复: [73]write_leveling error [76]read_calibration error DDR3报错
先用工具检查一下板子硬件,DDR是否存在问题,内含使用说明。
-
D1 SD卡启动失败,概率100%
log如下:
[69]HELLO! BOOT0 is starting! [72]BOOT0 commit : 88480af [75]set pll start [76]fix vccio detect value:0xc0 [79]periph0 has been enabled [82]set pll end [84][pmu]: bus read error [86]board init ok [88]get_pmu_exist() = -1 [90]ddr_efuse_type: 0x0 [93]trefi:7.8ms [95][AUTO DEBUG] single rank and full DQ! [99]ddr_efuse_type: 0x0 [101]trefi:7.8ms [104][AUTO DEBUG] rank 0 row = 15 [107][AUTO DEBUG] rank 0 bank = 8 [110][AUTO DEBUG] rank 0 page size = 2 KB [114]DRAM BOOT DRIVE INFO: V0.33 [117]DRAM CLK = 480 MHz [119]DRAM Type = 3 (2:DDR2,3:DDR3) [122]DRAMC ZQ value: 0x7b7bfb [125]DRAM ODT value: 0x42. [128]ddr_efuse_type: 0x0 [131]DRAM SIZE =512 M [133]dram_tpr4:0x0 [134]PLL_DDR_CTRL_REG:0xf8002700 [137]DRAM_CLK_REG:0xc0000000 [140][TIMING DEBUG] MR2= 0x18 [145]DRAM simple test OK. [147]dram size =512 [149]card no is 0 [151]sdcard 0 line count 4 [153][mmc]: mmc driver ver 2021-04-2 16:45 [163][mmc]: Wrong media type 0x0 [165][mmc]: ***Try SD card 0*** [175][mmc]: HSSDR52/SDR25 4 bit [178][mmc]: 50000000 Hz [181][mmc]: 14916 MB [182][mmc]: ***SD/MMC 0 init OK!!!*** [233]Loading boot-pkg Succeed(index=0). [236]Entry_name = opensbi [239]Entry_name = u-boot [243]Entry_name = dtb [246]mmc not para [247]Jump to second Boot. OpenSBI auto-t113-linux-V0.8-3-ge39e937 ____ _____ ____ _____ / __ \ / ____| _ \_ _| | | | |_ __ ___ _ __ | (___ | |_) || | | | | | '_ \ / _ \ '_ \ \___ \| _ < | | | |__| | |_) | __/ | | |____) | |_) || |_ \____/| .__/ \___|_| |_|_____/|____/_____| | | |_| Platform Name : T-HEAD Xuantie Platform Platform HART Features : RV64ACDFIMSUVX Platform Max HARTs : 1 Current Hart : 0 Firmware Base : 0x41fc0400 Firmware Size : 75 KB Runtime SBI Version : 0.2 MIDELEG : 0x0000000000000222 MEDELEG : 0x000000000000b1ff PMP0 : 0x0000000041fc0000-0x0000000041fdffff (A) PMP1 : 0x0000000040000000-0x000000007fffffff (A,R,W,X) PMP2 : 0x0000000080000000-0x00000000bfffffff (A,R,W,X) PMP3 : 0x0000000000020000-0x0000000000027fff (A,[00.328][mmc]: mmc driver ver uboot2018:2021-12-20 13:35:00 [00.334][mmc]: get sdc_type fail and use default host:tm1. [00.340][mmc]: can't find node "mmc0",will add new node [00.345][mmc]: fdt err returned <no error> [00.349][mmc]: Using default timing para [00.352][mmc]: SUNXI SDMMC Controller Version:0x50310 [00.370][mmc]: card_caps:0x30000002 [00.373][mmc]: host_caps:0x3000003f [00.427]set disp.dev2_output_type fail. using defval=0 [00.453]set disp.fb0_rot_used fail. using defval=0 [00.458]set disp.fb0_rot_degree fail. using defval=0 [00.642]out of usb burn from boot: not need burn key [00.647]Item0 (Map) magic is bad [00.650]the secure storage item0 copy0 magic is bad [00.656]Item0 (Map) magic is bad [00.658]the secure storage item0 copy1 magic is bad [00.663]Item0 (Map) magic is bad [00.674]The storage not support sample function [00.749]dts_get_dsp_memory: no /reserved-memory/dsp0 in fdt [00.754]dts_get_dsp_memory fail [01.099]no vendor_boot partition is found [01.311] Starting kernel ... [01.314][mmc]: MMC Device 2 not found [01.317][mmc]: mmc 2 not find, so not exit [ 0.210646] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed [ 0.218056] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed [ 0.294604] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 0.302321] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 0.314643] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 0.322283] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 0.329918] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 0.337553] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 0.382203] sunxi-i2c sunxi-i2c2: Address + Read bit transmitted, ACK not received [ 0.390657] sunxi-i2c sunxi-i2c2: engine mode: I2C BUS error state is 0x48 [ 0.398485] sunxi-i2c sunxi-i2c2: engine-mode: xfer failed(dev addr:0x38) [ 0.416829] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [ 0.426055] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.61 #1 [ 0.432454] Call Trace: [ 0.435198] [<ffffffe00002a3ee>] walk_stackframe+0x0/0xa0 [ 0.441216] [<ffffffe00002a5d0>] show_stack+0x2a/0x34 [ 0.446850] [<ffffffe0004f52a8>] dump_stack+0x20/0x28 [ 0.452482] [<ffffffe00002f396>] panic+0xee/0x2b6 [ 0.457727] [<ffffffe000000ed6>] mount_block_root+0x1ee/0x28a [ 0.464131] [<ffffffe000000ff8>] mount_root+0x86/0x90 [ 0.469761] [<ffffffe000001112>] prepare_namespace+0x110/0x152 [ 0.476263] [<ffffffe000000b74>] kernel_init_freeable+0x17e/0x19a [ 0.483060] [<ffffffe000508bb6>] kernel_init+0x12/0xee [ 0.488788] [<ffffffe000029038>] ret_from_exception+0x0/0xc [ 0.495007] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
-
回复: MQ-Quad H616 主线内核编译调试记录(u-boot、kernel、buildroot)
@fumoumou 在 MQ-Quad H616 主线内核编译调试记录(u-boot、kernel、buildroot) 中说:
wireless_dev
看看板子上是否用的是这个wifi模块,如果不是在内核选项里面把它去掉不编译即可。 -
回复: H616基于SD卡怎么启动
@leohua 哪里拿到的代码?如果使用全志的代码编译出来的固件是有工具做SD卡启动卡的 工具名称 :PhonenixCrad-v4.2.3,如果是orangepi 他们有专门的dd命令做卡。
-
回复: 启动log 里面多处打印 xxx supply xxx not found, using dummy regulator
@captain 关闭打印就可以了,板子没有PMU,使用的是ldo,这个打印不要紧的
-
回复: 请问:F133-B的V1.0 版本的norflash uboot有什么修改,如何适配?
- SPINOR启动
3.1. setup.h
路径:lichee/linux-5.4/include/uapi/asm-generic/setup.h
1、修改COMMAND_LINE_SIZE宏大小至1024,
3.2. boot_package_nor.cfg
路径:lichee/device/config/f133/configs/default/boot_package_nor.cfg
1、修改item=u-boot, u-boot-spinor.fex为u-boot.fex,3.3. env.cfg
路径:lichee/device/config/f133/configs/default/env.cfg
1、增加nor_root=/dev/mtdblock5
2、增加
setargs_nor=setenv bootargs ubi.mtd=${mtd_name} ubi.block=0,${root_partition} earlyprintk=${earlyprintk} clk_ignore_unused initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${nor_root} rootfstype=${rootfstype} init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=13、修改bootcmd=run setargs_nor boot_normal
参考图如下:3.4. board.dts
路径:lichee/device/config/f133/configs/evb1/linux-5.4/board.dts
1、增加spi-nor@0结点的配置,并确保节点spi0和子节点spi-nor@0的status="okay",如下:
spi-nor@0 {
compatible = "jedec,spi-nor";
spi-max-frequency=<30000000>;
reg = <0x0>;
spi-rx-bus-width=<0x01>;
spi-tx-bus-width=<0x01>;
status="okay";
};
参考图如下:3.5. sys_config.fex配置文件
路径:device\config\chips\f133\configs\evb1
1、修改storage_type = 33.6. kernel_menuconfig配置
1、进入make kernel_menuconfig -> Device Drivers -> Memory Technology Device (MTD) Support,选择SUNXI partitioning support和SPI-NOR device support配置;
2、进入make kernel_menuconfig -> Device Drivers -> SPI support,选择SPI memory externsion;选择SPI memory externsion
3.7. 裁剪固件小于10MBytes
3.7.1. 内核裁剪
编译窗口输入make kernel_menuconfig3.7.1.1. 关闭网络支持
Networking support --->3.7.1.2. 开启MTD/spinor支持
---> Device Drivers
---> <> Memory Technology Device (MTD) support --->
---> <> SUNXI partitioning support
---> <*> SPI-NOR device support --->3.7.1.3. 关闭dump reg支持
---> Device Drivers
---> < > dump reg driver for sunxi platform3.7.1.4. 关闭Remote Controller支持
---> Device Drivers
Remote Controller support ----3.7.1.5. 关闭Multimedia支持
---> Device Drivers
---> < > Multimedia support ----3.7.1.6. 关闭Sound card支持
---> Device Drivers
--- > <*> Sound card support --->
--- > < > Advanced Linux Sound Architecture ----3.7.1.7. 关闭部分Cryptographic API支持
---> -*- Cryptographic API --->
Disable run-time self tests
--- > < > RSA algorithm
--- > < > ECDH algorithm
--- > < > CCM support
--- > < > GCM/GMAC support
--- > < > CTR support
--- > < > Sequence Number IV Generator
--- > < > Null algorithms
--- > < > ECB support
--- > < > CMAC support
--- > < > GHASH hash function
--- > < > AES cipher algorithms
--- > < > ARC4 cipher algorithm
--- > < > Deflate compression algorithm --- > < > LZO compression algorithm
--- > < > Zstd compression algorithm
---> < > NIST SP800-90A DRBG ----
---> < > Jitterentropy Non-Deterministic Random Number Generator
Hardware crypto devices ----
---> < > SHA224 and SHA256 digest algorithm
---> < > HMAC support
---> < > Cryptographic algorithm manager3.7.1.8. 关闭XZ decompression支持
---> Library routines --->
--- > < > XZ decompression support
DMA Contiguous Memory Allocator3.7.2. 应用裁剪
编译窗口输入make menuconfig3.7.2.1. 关闭smartva
---> Gui --->
---> Littlevgl --->
---> < > smartva
lvgl-8.0.1 use sunxifb cache
lvgl-8.0.1 use sunxifb double buffer3.7.2.2. 关闭cedarx
---> Allwinner --->
---> < > libcedarx3.7.2.3. 关闭alsa
---> Allwinner --->
---> < > alsa-conf-aw---> Utilities --->
< > alsa-utils3.7.2.4. 关闭网络
---> Kernel modules --->
---> Wireless Drivers --->
---> < > kmod-net-xr819s---> Firmware --->
---> < > xr819s-firmware---> Base system --->
---> <*> busybox
---> Networking Utilities --->
Enable IPv6 support
hostname
ifconfig
ip
ntpd
ping
route
wget
udhcpc (DHCP client)---> Allwinner --->
---> < > swupdate
---> < > ota-burnboot
---> < > wifimanager---> Network --->
---> < > iw
---> WirelessAPD --->
---> < > wpa-cli
---> < > wpad-basic
---> < > hostapd-common---> Libraries --->
---> Firewall --->
---> < > libip4tc
---> < > libip6tc
---> < > libxtables---> Base system --->
---> < > dnsmasq
---> < > netifd3.7.2.5. 关闭input模块
---> Kernel modules --->
---> Input modules --->
---> < > kmod-net-xr819s
---> < > kmod-touchscreen-gt9xxnew
---> < > kmod-input-evdev
---> < > kmod-input-core3.7.2.6. 关闭其他库
---> Base system --->
---> < > jsonfilter
---> < > ubus
---> < > ubusd---> Allwinner --->
---> < > liballwinner-base
---> < > libuapi---> Libraries --->
---> < > alsa-lib
---> < > libconfig
---> < > libfreetype
---> < > libncurses
---> < > libncursesw
---> < > terminfo
---> < > libuci
---> < > libubus
---> < > libspeexdsp
---> Compression --->
---> < > libbz2
---> SSL --->
---> < > libopenssl
---> < > libnl-tiny---> Multimedia --->
---> < > fdk-aac---> Utilities --->
---> < > jshn
---> < > strace---> Libraries --->
---> < > libblobmsg-json
---> < > libjson-c
---> < > libubox3.8. sys_partition_nor.fex
路径:device/config/chips/f133/configs/evb1/sys_partition_nor.fex
此文件为spinor的分区配置文件,打包过程中可能出现分区太小导致镜像装载失败的情况此时需要修改对应分区大小,或对内核或者文件系统进行裁剪。
各分区大小配置参考样本如下:3.9. 问题归纳
1)启动过程中,看到如下打印,才能确认spinorflash工作正常,否则请确认spi的gpio配置是否有冲突,或者spinorflash驱动和dts是否配置正常。 - SPINOR启动
-
回复: Tina打包img出现过大的问题应该怎么设置
device/config/chips/t507/configs/demo2.0/longan/sys_partition.fex
-
回复: f1c100s的Tina,怎样去修改uboot的配置啊?
先熟悉uboot框架吧,不然做起来很困难,另外就是找对应的代理商支持。
lichee/brandy/u-boot-2014.07/boards.cfg
lichee/brandy/u-boot-2014.07/include/configs/sun3iw1p1_nor.h