直呼:烫烫烫
M-Core不定期更新到B站上
https://t.bilibili.com/647016684108906501
直呼:烫烫烫
M-Core不定期更新到B站上
https://t.bilibili.com/647016684108906501
有个很不错的win下dd刷机工具: USB Image Tool https://www.alexpage.de/
最重要的特点是不像win32Diskimager那样容易误伤移动硬盘。这个只能看到sd卡/u盘,并且设备列表是动态扫描的
@y97788 液晶屏的3.3V几乎没电流,主要耗电5V上会拉出300mA左右。RTL模块拉的是3.3V但最终都落到usb那边。
换个口试试。
整个MQ-Pro经历了三次版本,终于量产。
ALDO是持续有1.8V供电,HPLDO是只有播放音乐时才会输出1.8V。这两个引脚只需外部去耦即可。
longan_MQ-Dual_uart0_pe2_pe3_rgb800480.7z
点屏固件(串口0,PE2,PE3。RGB方式)
无触摸
LDOA 始终固定1.8V
LDOB 原始应该是1.35V,加载dram调压驱动后变为1.5V(T113)或1.8V(F133)。
这类网卡芯片驱动主要是做sta的,拿来做热点是靠softap,至今没见过一个稳定的,即使主流手机里边也同样拉稀。
默认SDK编译出来console-uart跑到了PG8,PG9上去,还没来得及改传到这里:
[19]HELLO! BOOT0 is starting!
[22]BOOT0 commit : 2c94b33
[25]set pll start
[31]periph0 has been enabled
[34]set pll end
[35][pmu]: bus read error
[38]board init ok
[39]enable_jtag
[41]ZQ value = 0x32***********
[44]get_pmu_exist() = -1
[47]ddr_efuse_type: 0xa
[50][AUTO DEBUG] single rank and full DQ!
[54]ddr_efuse_type: 0xa
[57][AUTO DEBUG] rank 0 row = 13
[60][AUTO DEBUG] rank 0 bank = 8
[64][AUTO DEBUG] rank 0 page size = 2 KB
[68]DRAM BOOT DRIVE INFO: V0.24
[71]DRAM CLK = 792 MHz
[73]DRAM Type = 3 (2:DDR2,3:DDR3)
[76]DRAMC read ODT off.
[79]DRAM ODT value: 0x42.
[81]ddr_efuse_type: 0xa
[84]DRAM SIZE =128 M
[86]PLL_DDR_CTRL_REG:0xf8004100
[89]DRAM_CLK_REG:0xc0000000
[97]DRAM simple test OK.
[99]rtc standby flag is 0x0, super standby flag is 0x0
[105]dram size =128
[107]card no is 0
[109]sdcard 0 line count 4
[111][mmc]: mmc driver ver 2021-03-22 20:20
[121][mmc]: Wrong media type 0x0
[124][mmc]: ***Try SD card 0***
[133][mmc]: DS26/SDR12 4 bit
[136][mmc]: 25000000 Hz
[138][mmc]: 30474 MB
[140][mmc]: ***SD/MMC 0 init OK!!!***
[286]Loading boot-pkg Succeed(index=0).
[289]Entry_name = u-boot
[296]Entry_name = optee
[300]Entry_name = dtb
[303]mmc not para
[305]Jump to second Boot.
M/TC: OP-TEE version: 6aef7bb2-dirty (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #1 Fri Jul 23 09:25:11 UTC 2021 arm
U-Boot 2018.05-g5b4bafa (Oct 18 2021 - 01:53:36 +0000) Allwinner Technology
[00.361]CPU: Allwinner Family
[00.364]Model: sun8iw20
[00.366]DRAM: 128 MiB
[00.369]Relocation Offset is: 04ec5000
[00.396]secure enable bit: 0
[00.399]smc_tee_inform_fdt failed with: -65526[00.403]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300 Mhz
[00.409]gic: sec monitor mode
[00.412]flash init start
[00.414]workmode = 0,storage type = 1
[00.417][mmc]: mmc driver ver uboot2018:2021-09-07 19:43:00
[00.423][mmc]: get sdc_type fail and use default host:tm1.
[00.429][mmc]: can't find node "mmc0",will add new node
[00.433][mmc]: fdt err returned <no error>
[00.437][mmc]: Using default timing para
[00.441][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.459][mmc]: card_caps:0x3000000a
[00.462][mmc]: host_caps:0x3000003f
[00.465][mmc]: sd set card speed failed
[00.469][mmc]: sd set card speed failed
[00.473]sunxi flash init ok
[00.475]line:703 init_clocks
[00.478]drv_disp_init
request pwm success, pwm7:pwm7:0x2000c00.
[00.493]drv_disp_init finish
[00.496]boot_gui_init:start
[00.498]set disp.dev2_output_type fail. using defval=0
[00.504]boot_gui_init:finish
partno erro : can't find partition bootloader
54 bytes read in 1 ms (52.7 KiB/s)
[00.523]bmp_name=bootlogo.bmp size 1152054
1152054 bytes read in 97 ms (11.3 MiB/s)
[00.645]Loading Environment from SUNXI_FLASH... OK
[00.678]Item0 (Map) magic is bad
[00.681]the secure storage item0 copy0[00.685]LCD open finish
magic is bad
[00.692]Item0 (Map) magic is bad
[00.695]the secure storage item0 copy1 magic is bad
[00.700]Item0 (Map) magic is bad
secure storage read widevine fail
[00.706]secure storage read widevine fail with:-1
secure storage read ec_key fail
[00.713]secure storage read ec_key fail with:-1
secure storage read ec_cert1 fail
[00.720]secure storage read ec_cert1 fail with:-1
secure storage read ec_cert2 fail
[00.728]secure storage read ec_cert2 fail with:-1
secure storage read ec_cert3 fail
[00.735]secure storage read ec_cert3 fail with:-1
secure storage read rsa_key fail
[00.742]secure storage read rsa_key fail with:-1
secure storage read rsa_cert1 fail
[00.750]secure storage read rsa_cert1 fail with:-1
secure storage read rsa_cert2 fail
[00.757]secure storage read rsa_cert2 fail with:-1
secure storage read rsa_cert3 fail
[00.765]secure storage read rsa_cert3 fail with:-1
[00.770]usb burn from boot
delay time 0
weak:otg_phy_config
[00.781]usb prepare ok
[00.949]usb sof ok
[00.951]usb probe ok
[00.953]usb setup ok
set address 0x10
set address 0x10 ok
[03.957]do_burn_from_boot usb : have no handshake
List file under ULI/factory
** Unrecognized filesystem type **
[03.968]update part info
[03.971]update bootcmd
[03.974]change working_fdt 0x44884e70 to 0x44864e70
[03.992]update dts
Hit any key to stop autoboot: 0
[05.554]no vendor_boot partition is found
Android's image name: sun8i_arm
[05.574]Starting kernel ...
[05.577][mmc]: MMC Device 2 not found
[05.580][mmc]: mmc 2 not find, so not exit
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.61 (book@virtual-machine) (arm-linux-gnueabi-gcc (Linaro GCC 5.3-2016.05) 5.3.1 2 0160412, GNU ld (Linaro_Binutils-2016.05) 2.25.0 Linaro 2016_02) #1 SMP PREEMPT Fri Mar 11 02:33:55 UTC 2022
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: sun8iw20
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] cma: Reserved 16 MiB at 0x47000000
[ 0.000000] On node 0 totalpages: 32768
焊接F133的MQ众筹完就会停产。而T113版本的MQ-Dual暂时不受影响。
请关注新的MQ-R板子:https://bbs.aw-ol.com/topic/1125 (届时D1s和T113都有)
@wxgd2017
cat t113.tar.gza* | tar -xjv
repo sync -l
指定叠层,真贵!
请忽略背面的芒果派logo,这个暂时算个人玩耍项目
几乎设计到最小了,仅 3 x 2.2 厘米,几乎全pin引出,默认上1GB内存,跑发行版必须舒服斯基
硬件设备:D1s/F133板子,自备热风枪或BGA返修台
首先,需要购买若干T113芯片:(假货宝上直接搜 全志T113 )
然后,将D1s/F133焊下来,把T113焊上去,务必记得T113的肚子要上焊锡,因为它是非常重要的GND
然后,改内存供电电压,MQ的原理图参考:https://mangopi.cc/_media/mq_sch_v1.6.pdf
DRAM从1.8V改到1.5V,需要改动R10成226K即可。
R10在板子哪里呢?我们看下ibom:https://mangopi.cc/_media/mq-1p6_bom.html
左侧找到R10,右侧自动高亮,找到它,换掉。
齐活。连接电脑,叮咚一声,接下来用xfel就能识别到啦 https://github.com/xboot/xfel
@memory 这是做模组的给8723ds刷了mac和校准数据
MQ-Pro V1.2更新,相比于样板V1.1,背面新增SPI-FLASH,可直接贴Nor或Nand。
网络:DVP端子的复用增加RGMII千兆
扩展口2(V1.1):通过调整后,在原有基础上新增一路UART,新增LEDC控制
优化HDMI部分走线,增加TVS
优化WiFi天线部分阻抗匹配
CPU:D1,1G主频,动态供电)
内存: 512MByte DDR3/1GByte DDR3
存储:TF Card
无线:WiFi+BT4 基于RTL8723ds
USB: typeC OTGx1,HOSTx1
显示:HDMI/DSI/LVDS
触控:支持CTP
摄像头:DVPx1
网络:DVP可复用为RMII
音频out:HPOUT
指示:电源和状态LED
底层console:uart0 位于40Pin内
尺寸:3x6.5cm ,4个固定装配脚
扩展口1:20P-FPC座,含LVDS/DSI和CTP
扩展口2(V1.0):40P-2.54,含2路I2C,3路UART,1路SPI/DBI,1路I2S(最多支持6路输入声道),一路DMIC(最多支持6声道),若干PWM和GPIO
CPU:D1,1G主频,动态供电
内存: 512MByte /1GByte DDR3
存储:TF Card
无线:WiFi+BT4 基于RTL8723ds
USB: typeC OTGx1,HOSTx1
显示:HDMI/DSI/LVDS
触控:CTP
摄像头:DVPx1
网络:DVP可复用为RMII
音频out:HPOUT
指示:电源和状态LED
底层console:uart0 位于40Pin内
尺寸:3x6.5cm ,4个固定装配脚
扩展口1:20P-FPC座,含LVDS/DSI和CTP
扩展口2(V1.0):40P-2.54,含2路I2C,3路UART,1路SPI/DBI,1路I2S(最多支持6路输入声道),一路DMIC(最多支持6声道),若干PWM和GPIO
想必RT-Thread系统大家不陌生了,RT-Thread Smart(简称 rt-smart)是基于 RT-Thread 操作系统衍生的新分支,面向带 MMU,中高端应用的芯片,例如 ARM Cortex-A 系列芯片,MIPS 芯片,带 MMU 的 RISC-V 芯片等。rt-smart 在 RT-Thread 操作系统的基础上启用独立、完整的进程方式,同时以混合微内核模式执行。
官方文档:https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-smart/rt-smart-quickstart/rt-smart-quickstart
硬件:麻雀,MQ1或MQ1W
RT-smart包(自带编译器):mango_rtsmart_app.zip
使用fdisk分区。
将u盘挂载到ubuntu系统后,笔者设备路径是/dev/sdb。使用的32GB TF卡,扇区大小512字节,根据说明预留8M的空闲,那么计算得知分区扇区开始于:16384
命令:sudo fdisk /dev/sdb
选:o,n,p,1,16384,回车
Command (m for help): o
Created a new DOS disklabel with disk identifier 0x3668b987.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-62410751, default 2048): 16384
Last sector, +sectors or +size{K,M,G,T,P} (16384-62410751, default 62410751):
Created a new partition 1 of type 'Linux' and of size 29.8 GiB.
Command (m for help): w
The partition table has been altered.
正确的分区效果如下:
mango@virtual:/dev$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 29.8 GiB, 31954305024 bytes, 62410752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3668b987
Device Boot Start End Sectors Size Id Type
/dev/sdb1 16384 62410751 62394368 29.8G 83 Linux
mango@virtual:/dev$
然后格式化sdb1:
$ sudo mkfs -t fat /dev/sdb1
$ sudo dd if=rt_smart_kernel.bin of=/dev/sdb bs=1024
2888+1 records in
2888+1 records out
2957313 bytes (3.0 MB, 2.8 MiB) copied, 8.32574 s, 355 kB/s
$ sync
此时将TF卡放入麻雀,串口0(底部排针的7,8脚),串口波特率500000,然后上电:
[26]HELLO! BOOT0 is starting!
[27]BOOT0 commit : fb73c68
[28]set pll start
[28]periph0 has been enabled
[29]set pll end
[30]board init ok
[30]ZQ value = 0x2f***********
[31]get_pmu_exist() = -1
[32]ddr_efuse_type: 0xa
[33][AUTO DEBUG] single rank and full DQ!
[34]ddr_efuse_type: 0xa
[35][AUTO DEBUG] rank 0 row = 13
[36][AUTO DEBUG] rank 0 bank = 4
[37][AUTO DEBUG] rank 0 page size = 2 KB
[37]DRAM BOOT DRIVE INFO: V0.24
[38]DRAM CLK = 528 MHz
[39]DRAM Type = 2 (2:DDR2,3:DDR3)
[40]DRAMC read ODT off.
[40]DRAM ODT off.
[41]ddr_efuse_type: 0xa
[42]DRAM SIZE =64 M
[44]DRAM simple test OK.
[45]dram size =64
[45]card no is 0
[45]sdcard 0 line count 4
[46][mmc]: mmc driver ver 2021-04-2 16:45
[52][mmc]: Wrong media type 0x0
[53][mmc]: ***Try SD card 0***
[60][mmc]: HSSDR52/SDR25 4 bit
[61][mmc]: 50000000 Hz
[61][mmc]: 30474 MB
[62][mmc]: ***SD/MMC 0 init OK!!!***
[98]Loading boot-pkg Succeed(index=0).
[99]*******************TOC1 Item Message*************************
[100]Entry_name = opensbi
[101]Entry_data_offset = 0x600
[102]Entry_data_len = 0x188e0
[103]encrypt = 0x0
[103]Entry_type = 0x0
[104]run_addr = 0x40000000
[105]index = 0x0
[105]Entry_end = 0x3b454949
[106]*************************************************************
[108]*******************TOC1 Item Message*************************
[109]Entry_name = dtb
[110]Entry_data_offset = 0x19000
[111]Entry_data_len = 0x7475
[111]encrypt = 0x0
[112]Entry_type = 0x0
[113]run_addr = 0x40200000
[114]index = 0x0
[114]Entry_end = 0x3b454949
[115]*************************************************************
[117]*******************TOC1 Item Message*************************
[118]Entry_name = kernel
[119]Entry_data_offset = 0x20600
[120]Entry_data_len = 0xa6cf0
[120]encrypt = 0x0
[121]Entry_type = 0x0
[122]run_addr = 0x40400000
[123]index = 0x0
[123]Entry_end = 0x3b454949
[124]*************************************************************
[126]Jump to second Boot.
OpenSBI v0.9-165-gefbc2b8
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : Allwinner D1 NeZha
Platform Features : medeleg
Platform HART Count : 1
Platform IPI Device : aclint-mswi
Platform Timer Device : aclint-mtimer @ 24000000Hz
Platform Console Device : uart8250
Platform HSM Device : ---
Platform Reboot Device : sunxi-wdt-reset
Platform Shutdown Device : ---
Firmware Base : 0x40000000
Firmware Size : 248 KB
Runtime SBI Version : 0.3
Domain0 Name : root
Domain0 Boot HART : 0
Domain0 HARTs : 0*
Domain0 Region00 : 0x0000000014008000-0x000000001400bfff (I)
Domain0 Region01 : 0x0000000014000000-0x0000000014007fff (I)
Domain0 Region02 : 0x0000000040000000-0x000000004003ffff ()
Domain0 Region03 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address : 0x0000000040400000
Domain0 Next Arg1 : 0x0000000040200000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes
Boot HART ID : 0
Boot HART Domain : root
Boot HART ISA : rv64imafdcvsux
Boot HART Features : scounteren,mcounteren,mcountinhibit,time
Boot HART PMP Count : 16
Boot HART PMP Granularity : 2048
Boot HART PMP Address Bits: 38
Boot HART MHPM Count : 0
Boot HART MIDELEG : 0x0000000000000222
Boot HART MEDELEG : 0x000000000000b1ff
heap: [0x404fbdf4 - 0x41cfbdf4]
[I/I2C] I2C bus [i2c2] registered
\ | /
- RT - Thread Smart Operating System
/ | \ 5.0.0 build Dec 31 2021
2006 - 2020 Copyright by rt-thread team
lwIP-2.1.2 initialized!
SDC:hal_sdc_create host:000000004051bdf8 id:0
SDC:Not implement __mci_restore_io,798
SDC:Not imp hal_sdc_init,2218
SDC:hal_sdc_init,2251 no imp
SDC:hal_sdc_init,2259 no imp
SDC:SDC Host Capability:0x3820f Ocr avail:0x3f0000
SDC:SDC cd_mode:2 present_val:0
SDC:SDC id:0 dma_use:1 present:1
driver version SD/MMC/SDIO Host Controller Driver(v0.27 2021-04-30 16:50) init ok.
card_detect insert
SD:mmc_card_create card:000000004052e1a8 id:0
SDC:Not implement __mci_restore_io,798
SDC:SDC clock=400000 kHz,src:0, n:1, m:14
SDC:SDC clock=400000 kHz,src:0, n:1, m:14
SD:***** Try sd *****
SD:card ocr: ffffffffc0ff8000
SD:Card CID number:55
SD:card raw cid:
SD:card raw csd:
SD:card raw scr:
SD:card raw SD status:
SDC:SDC clock=50000000 kHz,src:1, n:0, m:5
SD:card is switched to high speed mode, clk:50000 KHz
SD:Set bus width type: 2
SD:
============= card information ==============
SD:Card Type : SDHC
SD:Card Spec Ver : 5.0
SD:Card RCA : 0x0001
SD:Card OCR : 0x40ff8000
SD: vol_window : 0x00ff8000
SD: to_1v8_acpt : 0
SD: high_capac : 0
SD:Card CSD :
SD: speed : 50000 KHz
SD: cmd class : 0x5b5
SD: capacity : 30474MB
SD:Card CUR_STA :
SD: speed_mode : HS: 50 MHz
SD: bus_width : 2
SD: speed_class : 10
SD:=============================================
SD:***** sd init ok *****
Initial card success
[I/sal.skt] Socket Abstraction Layer initialize success.
file system initialization done!
gt9xx_probe
Hello RISC-V
msh />[D/TOUCH.gt9xx] 39 31 31 0 0
[I/TOUCH.gt9xx] Found chip gt911
[I/TOUCH.gt9xx] GT9xx Config version: 0x00
[I/TOUCH.gt9xx] GT9xx Sensor id: 0xFF
msh />
祭出祖传hello程序:根据说明自行编译,输出为:hello.elf 文件,直接
拷贝到TF卡的文件系统中
然后重新将tf卡放进麻雀,开机启动:
msh />ls
Directory /:
System Volume Information<DIR>
etc <DIR>
hello.elf 237512
vi.elf 398544
msh />
msh />./hello.elf
msh />hello world!
至此,吊炸天的hello程序就运行起来了!
source smart-env.sh riscv64
,也可以根据自己的环境稍作修改。scons --app=hello
。续前贴:https://bbs.aw-ol.com/topic/311/
当时使用D1开发板驱动了,因D1的mipi是30pin,需要转接才能接树莓DSI屏。
麻雀设计的时候考虑到这点,直接板载的15Pin,所以直接接上就好。
效果:
代码:(board.dts 和uboot-board.dts都替换下边的)
&lcd0 {
lcd_used = <1>;
lcd_driver_name = "tft08006";
lcd_backlight = <100>;
lcd_if = <4>;
lcd_x = <800>;
lcd_y = <480>;
lcd_width = <52>;
lcd_height = <52>;
lcd_dclk_freq = <33>;
lcd_pwm_used = <1>;
lcd_pwm_ch = <2>;
lcd_pwm_freq = <1000>;
lcd_pwm_pol = <0>;
lcd_pwm_max_limit = <255>;
/*
lcd_hbp = <32>;
lcd_ht = <868>;
lcd_hspw = <4>;
lcd_vbp = <12>;
lcd_vt = <500>;
lcd_vspw = <4>;
*/
lcd_hbp = <32>;
lcd_ht = <868>;
lcd_hspw = <4>;
lcd_vbp = <10>;
lcd_vt = <520>;
lcd_vspw = <4>;
lcd_dsi_if = <0>;
lcd_dsi_lane = <1>;
lcd_lvds_if = <0>;
lcd_lvds_colordepth = <0>;
lcd_lvds_mode = <0>;
lcd_frm = <0>;
lcd_hv_clk_phase = <0>;
lcd_hv_sync_polarity= <0>;
lcd_io_phase = <0x0000>;
lcd_gamma_en = <0>;
lcd_bright_curve_en = <0>;
lcd_cmap_en = <0>;
lcd_fsync_en = <0>;
lcd_fsync_act_time = <1000>;
lcd_fsync_dis_time = <1000>;
lcd_fsync_pol = <0>;
deu_mode = <0>;
lcdgamma4iep = <22>;
smart_color = <90>;
/* lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>;*/
pinctrl-0 = <&dsi4lane_pins_a>;
pinctrl-1 = <&dsi4lane_pins_b>;
};
首批(V1.5)做的不多,只有400片,大部分是WiFi版本,我自己留几片用于测试 下批次1K几乎全是WiFi版本。
下批V1.6更新项:
TODO项:
@iamliubo 在 第二次调试MIPI屏幕,套路居然又不太一样? 中说:
,那几个参数修改了很多次,一点出画面的感觉都没有,我就有点不明白了,我反复确认了好几遍焊接没问题(之前吃过这个亏...),突发奇想把这俩管脚反一下试试,结果就真有反应了
截止到现在已售两种版本数量一共差不多300pcs,今天只发走了120pcs。剩余周一可发完。
顺便骗点赞:
twitter点com/mangopi_sbc/status/1469197984303022080
基础版本不带WiFi,但wifi周围器件/ipex等都是齐的,自行焊接8723,8189等。
WiFi版本到手可上网,带一条wifi天线。
资料下周上传。
修改 linux-5.4/fs/read_write.c
446行:
EXPORT_SYMBOL_NS(kernel_read, ANDROID_GKI_VFS_EXPORT_ONLY);
为
EXPORT_SYMBOL(kernel_read);
另外,12月底能晒出MQ Pro板。(设计一下子用力过猛,没收住的那种),敬请期待。
众筹是国外cs平台,大家不用理会。但他们步伐太慢。
国内本周淘宝上架。
@xiaowenge 没 ,众筹有大约30天的禁售时间。
过后就可以直接卖。数量是我根据各个社交平台的私信推算出来的,比较保守哈