@xiaowenge 太需要工程师训场啦,这个D1s不像esp32那么简单了,要是能像它那么简单就好啦,其实我也不想去调那些硬件,有个稳定的平台,开发上层应用才好玩啊,底层硬件还有Linux平台,基本上就劝退了一大半人了
leomini5 发布的最佳帖子
-
回复: 【水经验混下载权限专用贴】如何升级LV2拉取SDK发布在 灌水区
-
T113 usb0 acm cdc 无法使用 ttyGS0 直接卡主啦发布在 MR Series
我按照usb开发手册倒腾了一圈,那个ttyGS0 也出了,但是连上pc,没有任何反应
确认线是好的,setusbconfig adb,adb有效
修改成 rndis,win10系统无法使用,驱动都是感叹号,貌似是win10就不爱支持这个,要么就是驱动太老啦?反正死活没法联通
现在寄希望于acm cdc ,但是貌似也没用。。。而且我发现这东西编译进内核以后连那个 soc/usb0
去找usb的role都没有显示的。。。下面这个是完整的log,我是在系统加载好以后去用那个acm.sh加载usb0 的 acm cdc,但是不成功
哪位大佬能够提供一份完整的usb acm cdc,这个功能的教程啊,谢谢啦
root@TinaLinux:/# [725]fes begin commit:88480af-dirty [728]set pll start [734]periph0 has been enabled [737]set pll end [738][pmu]: bus read error [741]board init ok [743]beign to init dram [745]ZQ value = 0x2e [747]get_pmu_exist() = -1 [749]ddr_efuse_type: 0xa [752]trefi:7.8ms [754][AUTO DEBUG] single rank and full DQ! [758]ddr_efuse_type: 0xa [760]trefi:7.8ms [762][AUTO DEBUG] rank 0 row = 13 [766][AUTO DEBUG] rank 0 bank = 8 [769][AUTO DEBUG] rank 0 page size = 2 KB [772]DRAM BOOT DRIVE INFO: V0.33 [775]DRAM CLK = 936 MHz [778]DRAM Type = 3 (2:DDR2,3:DDR3) [781]DRAMC read ODT off. [783]DRAM ODT value: 0x42. [786]ddr_efuse_type: 0xa [789]DRAM SIZE =128 M [791]dram_tpr4:0x0 [792]PLL_DDR_CTRL_REG:0xf8004d00 [795]DRAM_CLK_REG:0xc0000000 [798][TIMING DEBUG] MR2= 0x20 [802]DRAM simple test OK. [804]rtc standby flag is 0x0, super standby flag is 0x0 [809]init dram ok [29]HELLO! BOOT0 is starting! [32]BOOT0 commit : 88480af-dirty [35]set pll start [41]periph0 has been enabled [44]set pll end [45][pmu]: bus read error [48]board init ok [50]ZQ value = 0x2d [51]get_pmu_exist() = -1 [54]DRAM BOOT DRIVE INFO: V0.33 [57]DRAM CLK = 936 MHz [59]DRAM Type = 3 (2:DDR2,3:DDR3) [62]DRAMC read ODT off. [64]DRAM ODT value: 0x42. [67]ddr_efuse_type: 0xa [70]DRAM SIZE =128 M [72]dram_tpr4:0x0 [74]PLL_DDR_CTRL_REG:0xf8004d00 [77]DRAM_CLK_REG:0xc0000000 [79][TIMING DEBUG] MR2= 0x20 [87]DRAM simple test OK. [89]rtc standby flag is 0x0, super standby flag is 0x0 [94]dram size =128 [97]spinand UBOOT_START_BLK_NUM 8 UBOOT_LAST_BLK_NUM 32 [102]block from 8 to 32 [204]Check is correct. [206]dma 0x29c0c int is not used yet [209]dma 0x29c0c int is free, you do not need to free it again [215]Entry_name = u-boot [222]Entry_name = optee [226]Entry_name = dtb [229]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 [ 3.968116] printk: console [ttyS0] enabled [ 3.976979] printk: bootconsole [earlycon0] disabled [ 3.987894] probe of uart0 returned 1 after 61699 usecs [ 3.994061] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regula tor [ 4.005353] uart uart1: get regulator failed [ 4.010158] uart uart1: uart1 supply uart not found, using dummy regulator [ 4.018114] uart1: ttyS1 at MMIO 0x2500400 (irq = 35, base_baud = 1500000) is a SUNXI [ 4.027225] probe of uart1 returned 1 after 33470 usecs [ 4.033260] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regula tor [ 4.044574] uart uart4: get regulator failed [ 4.049356] uart uart4: uart4 supply uart not found, using dummy regulator [ 4.057297] uart4: ttyS4 at MMIO 0x2501000 (irq = 36, base_baud = 1500000) is a SUNXI [ 4.066399] probe of uart4 returned 1 after 33338 usecs [ 4.072447] initcall sunxi_uart_init+0x0/0x4c returned 0 after 142960 usecs [ 4.080239] calling sunxi_dump_reg_driver_init+0x0/0x10 @ 1 [ 4.086794] probe of 20000.dump_reg returned 1 after 215 usecs [ 4.093572] initcall sunxi_dump_reg_driver_init+0x0/0x10 returned 0 after 6860 usecs [ 4.102214] calling misc_dump_reg_init+0x0/0x58 @ 1 [ 4.107746] misc dump reg init [ 4.111394] initcall misc_dump_reg_init+0x0/0x58 returned 0 after 3550 usecs [ 4.119267] calling iommu_debug_init+0x0/0x80 @ 1 [ 4.125106] initcall iommu_debug_init+0x0/0x80 returned 0 after 491 usecs [ 4.132716] calling topology_sysfs_init+0x0/0x3c @ 1 [ 4.138447] initcall topology_sysfs_init+0x0/0x3c returned 0 after 93 usecs [ 4.146219] calling cacheinfo_sysfs_init+0x0/0x3c @ 1 [ 4.151968] initcall cacheinfo_sysfs_init+0x0/0x3c returned -2 after 21 usecs [ 4.159928] calling rfkill_driver_init+0x0/0x18 @ 1 [ 4.165795] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9 [ 4.172990] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed [ 4.180268] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed [ 4.187653] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1) [ 4.194140] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power. [ 4.201041] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1) [ 4.208707] sunxi-rfkill soc@3000000:rfkill@0: get gpio wlan_regon failed [ 4.216292] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1 [ 4.224361] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled [ 4.231993] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power. [ 4.238733] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1) [ 4.246210] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=136 assert=0 [ 4.253799] probe of soc@3000000:rfkill@0 returned 1 after 88123 usecs [ 4.261150] initcall rfkill_driver_init+0x0/0x18 returned 0 after 93431 usecs [ 4.269164] calling addr_mgt_driver_init+0x0/0x18 @ 1 [ 4.275153] [ADDR_MGT] addr_mgt_probe: module version: v1.0.10 [ 4.282342] [ADDR_MGT] addr_mgt_probe: success. [ 4.287552] probe of soc@3000000:addr_mgt@0 returned 1 after 12447 usecs [ 4.295077] initcall addr_mgt_driver_init+0x0/0x18 returned 0 after 19712 usecs [ 4.303308] calling udmabuf_dev_init+0x0/0xc @ 1 [ 4.308783] initcall udmabuf_dev_init+0x0/0xc returned 0 after 210 usecs [ 4.316241] calling st_init+0x0/0xe8 @ 1 [ 4.320754] dma-buf: Running sanitycheck [ 4.325114] dma-buf: Running dma_fence [ 4.329299] sizeof(dma_fence)=48 [ 4.333003] dma-buf: Running dma_fence/sanitycheck [ 4.338384] dma-buf: Running dma_fence/test_signaling [ 4.344000] dma-buf: Running dma_fence/test_add_callback [ 4.349925] dma-buf: Running dma_fence/test_late_add_callback [ 4.356330] dma-buf: Running dma_fence/test_rm_callback [ 4.362149] dma-buf: Running dma_fence/test_late_rm_callback [ 4.368448] dma-buf: Running dma_fence/test_status [ 4.373780] dma-buf: Running dma_fence/test_error [ 4.379019] dma-buf: Running dma_fence/test_wait [ 4.384155] dma-buf: Running dma_fence/test_wait_timeout [ 4.426729] dma-buf: Running dma_fence/test_stub [ 4.431880] dma-buf: Running dma_fence/race_signal_callback [ 4.506747] thread_signal_callback[0] completed 38180 passes, 14242 misses [ 4.514424] thread_signal_callback[1] completed 38161 passes, 14223 misses [ 4.586722] thread_signal_callback[0] completed 39907 passes, 39904 misses [ 4.594404] thread_signal_callback[1] completed 39921 passes, 39921 misses [ 4.602182] initcall st_init+0x0/0xe8 returned 0 after 274823 usecs [ 4.609196] calling init_sd+0x0/0x1a8 @ 1 [ 4.613913] initcall init_sd+0x0/0x1a8 returned 0 after 150 usecs [ 4.620734] calling init_mtd+0x0/0x104 @ 1 [ 4.625638] initcall init_mtd+0x0/0x104 returned 0 after 236 usecs [ 4.632550] calling ofpart_parser_init+0x0/0x2c @ 1 [ 4.638103] initcall ofpart_parser_init+0x0/0x2c returned 0 after 1 usecs [ 4.645654] calling init_mtdblock+0x0/0xc @ 1 [ 4.650613] initcall init_mtdblock+0x0/0xc returned 0 after 6 usecs [ 4.657601] calling aw_spinand_drv_init+0x0/0x10 @ 1 [ 4.663296] sunxi-spinand: AW SPINand MTD Layer Version: 2.0 20201228 [ 4.670507] sunxi-spinand-phy: AW SPINand Phy Layer Version: 1.10 20200306 [ 4.678356] sunxi-spinand-phy: not detect any munufacture from id table [ 4.685712] sunxi-spinand-phy: get spi-nand Model from fdt fail [ 4.692319] sunxi-spinand-phy: get phy info from fdt fail [ 4.698390] sunxi-spinand-phy: not detect munufacture from fdt [ 4.705046] sunxi-spinand-phy: detect munufacture from id table: Winbond [ 4.712536] sunxi-spinand-phy: detect spinand id: ff21aaef ffffffff [ 4.719517] sunxi-spinand-phy: ========== arch info ========== [ 4.726017] sunxi-spinand-phy: Model: W25N01GVZEIG [ 4.732702] sunxi-spinand-phy: Munufacture: Winbond [ 4.738908] sunxi-spinand-phy: DieCntPerChip: 1 [ 4.744529] sunxi-spinand-phy: BlkCntPerDie: 1024 [ 4.750441] sunxi-spinand-phy: PageCntPerBlk: 64 [ 4.756153] sunxi-spinand-phy: SectCntPerPage: 4 [ 4.761789] sunxi-spinand-phy: OobSizePerPage: 64 [ 4.767514] sunxi-spinand-phy: BadBlockFlag: 0x0 [ 4.773326] sunxi-spinand-phy: OperationOpt: 0x7 [ 4.779154] sunxi-spinand-phy: MaxEraseTimes: 65000 [ 4.785158] sunxi-spinand-phy: EccFlag: 0x0 [ 4.790970] sunxi-spinand-phy: EccType: 2 [ 4.796586] sunxi-spinand-phy: EccProtectedType: 3 [ 4.802207] sunxi-spinand-phy: ======================================== [ 4.809567] sunxi-spinand-phy: [ 4.813060] sunxi-spinand-phy: ========== physical info ========== [ 4.819945] sunxi-spinand-phy: TotalSize: 128 M [ 4.825270] sunxi-spinand-phy: SectorSize: 512 B [ 4.830619] sunxi-spinand-phy: PageSize: 2 K [ 4.835756] sunxi-spinand-phy: BlockSize: 128 K [ 4.841097] sunxi-spinand-phy: OOBSize: 64 B [ 4.846333] sunxi-spinand-phy: ======================================== [ 4.853699] sunxi-spinand-phy: [ 4.857194] sunxi-spinand-phy: ========== logical info ========== [ 4.863975] sunxi-spinand-phy: TotalSize: 128 M [ 4.869315] sunxi-spinand-phy: SectorSize: 512 B [ 4.874639] sunxi-spinand-phy: PageSize: 4 K [ 4.879773] sunxi-spinand-phy: BlockSize: 256 K [ 4.885101] sunxi-spinand-phy: OOBSize: 128 B [ 4.890430] sunxi-spinand-phy: ======================================== [ 4.897910] sunxi-spinand-phy: block lock register: 0x00 [ 4.903935] sunxi-spinand-phy: feature register: 0x19 [ 4.909576] sunxi-spinand-phy: sunxi physic nand init end [ 4.915984] Creating 4 MTD partitions on "sunxi_mtd_nand": [ 4.922117] 0x000000000000-0x000000100000 : "boot0" [ 4.937693] 0x000000100000-0x000000400000 : "uboot" [ 4.946285] random: fast init done [ 4.957665] 0x000000400000-0x000000500000 : "secure_storage" [ 4.977701] 0x000000500000-0x000008000000 : "sys" [ 5.197719] probe of spi0.0 returned 1 after 534467 usecs [ 5.203793] initcall aw_spinand_drv_init+0x0/0x10 returned 0 after 527894 usecs [ 5.211961] calling aw_spinand_debug_init+0x0/0x50 @ 1 [ 5.217821] initcall aw_spinand_debug_init+0x0/0x50 returned 0 after 24 usecs [ 5.225762] calling spidev_init+0x0/0xb8 @ 1 [ 5.230749] initcall spidev_init+0x0/0xb8 returned 0 after 117 usecs [ 5.237845] calling net_olddevs_init+0x0/0x74 @ 1 [ 5.243192] initcall net_olddevs_init+0x0/0x74 returned 0 after 11 usecs [ 5.250656] calling blackhole_netdev_init+0x0/0x84 @ 1 [ 5.256504] initcall blackhole_netdev_init+0x0/0x84 returned 0 after 30 usecs [ 5.264480] calling fixed_mdio_bus_init+0x0/0x104 @ 1 [ 5.270507] libphy: Fixed MDIO Bus: probed [ 5.275076] initcall fixed_mdio_bus_init+0x0/0x104 returned 0 after 4742 usecs [ 5.283130] calling phy_module_init+0x0/0x14 @ 1 [ 5.289474] initcall phy_module_init+0x0/0x14 returned 0 after 1057 usecs [ 5.297065] calling geth_driver_init+0x0/0x10 @ 1 [ 5.302703] initcall geth_driver_init+0x0/0x10 returned 0 after 287 usecs [ 5.310280] calling dwc2_platform_driver_init+0x0/0x10 @ 1 [ 5.317134] initcall dwc2_platform_driver_init+0x0/0x10 returned 0 after 631 usecs [ 5.325566] calling ehci_hcd_init+0x0/0x70 @ 1 [ 5.330611] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 5.337888] initcall ehci_hcd_init+0x0/0x70 returned 0 after 7101 usecs [ 5.345248] calling ehci_platform_init+0x0/0x54 @ 1 [ 5.350782] ehci-platform: EHCI generic platform driver [ 5.356922] initcall ehci_platform_init+0x0/0x54 returned 0 after 5984 usecs [ 5.364768] calling sunxi_ehci_hcd_init+0x0/0x5c @ 1 [ 5.370403] sunxi-ehci: EHCI SUNXI driver [ 5.375300] get ehci0-controller wakeup-source is fail. [ 5.381231] sunxi ehci0-controller don't init wakeup source [ 5.387462] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0c68db0, 0x:c88390 00, irq_no:3a [ 5.399370] [sunxi-ehci0]: Not init ehci0 [ 5.403930] probe of 4101000.ehci0-controller returned 1 after 28808 usecs [ 5.411782] get ehci1-controller wakeup-source is fail. [ 5.417700] sunxi ehci1-controller don't init wakeup source [ 5.423909] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xc0c692d0, 0x:c883d0 00, irq_no:3c [ 5.435847] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator [ 5.448280] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dum my regulator [ 5.460405] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller [ 5.467627] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1 [ 5.477502] sunxi-ehci 4200000.ehci1-controller: irq 60, io mem 0x04200000 [ 5.506743] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00 [ 5.515353] hub 1-0:1.0: USB hub found [ 5.519593] hub 1-0:1.0: 1 port detected [ 5.524218] probe of 1-0:1.0 returned 1 after 8889 usecs [ 5.530309] probe of usb1 returned 1 after 15185 usecs [ 5.536183] probe of 4200000.ehci1-controller returned 1 after 124570 usecs [ 5.544063] initcall sunxi_ehci_hcd_init+0x0/0x5c returned 0 after 169577 usecs [ 5.552213] calling ohci_hcd_mod_init+0x0/0x64 @ 1 [ 5.557641] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 5.564545] initcall ohci_hcd_mod_init+0x0/0x64 returned 0 after 6737 usecs [ 5.572304] calling ohci_platform_init+0x0/0x54 @ 1 [ 5.577832] ohci-platform: OHCI generic platform driver [ 5.583963] initcall ohci_platform_init+0x0/0x54 returned 0 after 5977 usecs [ 5.591822] calling sunxi_ohci_hcd_init+0x0/0x5c @ 1 [ 5.597450] sunxi-ohci: OHCI SUNXI driver [ 5.602346] get ohci0-controller wakeup-source is fail. [ 5.608294] sunxi ohci0-controller don't init wakeup source [ 5.614497] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0c69040 [ 5.624094] [sunxi-ohci0]: Not init ohci0 [ 5.628672] probe of 4101400.ohci0-controller returned 1 after 26501 usecs [ 5.636512] get ohci1-controller wakeup-source is fail. [ 5.642447] sunxi ohci1-controller don't init wakeup source [ 5.648678] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xc0c69560 [ 5.658292] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator [ 5.670703] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dum my regulator [ 5.682817] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller [ 5.690031] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2 [ 5.699794] sunxi-ohci 4200400.ohci1-controller: irq 61, io mem 0x04200400 [ 5.781632] hub 2-0:1.0: USB hub found [ 5.785845] hub 2-0:1.0: 1 port detected [ 5.790492] probe of 2-0:1.0 returned 1 after 8897 usecs [ 5.796552] probe of usb2 returned 1 after 15164 usecs [ 5.802459] probe of 4200400.ohci1-controller returned 1 after 166114 usecs [ 5.810338] initcall sunxi_ohci_hcd_init+0x0/0x5c returned 0 after 207883 usecs [ 5.818486] calling acm_init+0x0/0x114 @ 1 [ 5.823245] usbcore: registered new interface driver cdc_acm [ 5.829557] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters [ 5.838475] initcall acm_init+0x0/0x114 returned 0 after 14964 usecs [ 5.845547] calling ci_hdrc_platform_register+0x0/0x1c @ 1 [ 5.851907] initcall ci_hdrc_platform_register+0x0/0x1c returned 0 after 141 usecs [ 5.860350] calling ci_hdrc_usb2_driver_init+0x0/0x10 @ 1 [ 5.866739] initcall ci_hdrc_usb2_driver_init+0x0/0x10 returned 0 after 267 usecs [ 5.875073] calling ci_hdrc_msm_driver_init+0x0/0x10 @ 1 [ 5.881314] initcall ci_hdrc_msm_driver_init+0x0/0x10 returned 0 after 199 usecs [ 5.889565] calling ci_hdrc_zevio_driver_init+0x0/0x10 @ 1 [ 5.895957] initcall ci_hdrc_zevio_driver_init+0x0/0x10 returned 0 after 182 usecs [ 5.904402] calling usbmisc_imx_driver_init+0x0/0x10 @ 1 [ 5.910936] initcall usbmisc_imx_driver_init+0x0/0x10 returned 0 after 499 usecs [ 5.919187] calling ci_hdrc_imx_driver_init+0x0/0x10 @ 1 [ 5.925636] initcall ci_hdrc_imx_driver_init+0x0/0x10 returned 0 after 426 usecs [ 5.933883] calling tegra_udc_driver_init+0x0/0x10 @ 1 [ 5.939991] initcall tegra_udc_driver_init+0x0/0x10 returned 0 after 277 usecs [ 5.948047] calling gadget_cfs_init+0x0/0x48 @ 1 [ 5.953528] initcall gadget_cfs_init+0x0/0x48 returned 0 after 237 usecs [ 5.961019] calling acmmod_init+0x0/0xc @ 1 [ 5.965772] initcall acmmod_init+0x0/0xc returned 0 after 1 usecs [ 5.972567] calling userial_init+0x0/0x124 @ 1 [ 5.977634] initcall userial_init+0x0/0x124 returned 0 after 10 usecs [ 5.984801] calling gsermod_init+0x0/0xc @ 1 [ 5.989658] initcall gsermod_init+0x0/0xc returned 0 after 1 usecs [ 5.996535] calling rndismod_init+0x0/0xc @ 1 [ 6.001489] initcall rndismod_init+0x0/0xc returned 0 after 0 usecs [ 6.008472] calling ffsmod_init+0x0/0xc @ 1 [ 6.013220] initcall ffsmod_init+0x0/0xc returned 0 after 0 usecs [ 6.020005] calling hidmod_init+0x0/0xc @ 1 [ 6.024755] initcall hidmod_init+0x0/0xc returned 0 after 1 usecs [ 6.031540] calling evdev_init+0x0/0xc @ 1 [ 6.036196] initcall evdev_init+0x0/0xc returned 0 after 2 usecs [ 6.042883] calling i2c_dev_init+0x0/0xb8 @ 1 [ 6.047825] i2c /dev entries driver [ 6.051756] initcall i2c_dev_init+0x0/0xb8 returned 0 after 3830 usecs [ 6.059037] calling init_rc_map_adstech_dvb_t_pci+0x0/0xc @ 1 [ 6.065522] initcall init_rc_map_adstech_dvb_t_pci+0x0/0xc returned 0 after 1 usecs [ 6.074052] calling init_rc_map_alink_dtu_m+0x0/0xc @ 1 [ 6.079977] initcall init_rc_map_alink_dtu_m+0x0/0xc returned 0 after 0 usecs [ 6.087931] calling init_rc_map_anysee+0x0/0xc @ 1 [ 6.093360] initcall init_rc_map_anysee+0x0/0xc returned 0 after 0 usecs [ 6.100826] calling init_rc_map_apac_viewcomp+0x0/0xc @ 1 [ 6.106942] initcall init_rc_map_apac_viewcomp+0x0/0xc returned 0 after 0 usecs [ 6.115074] calling init_rc_map_t2hybrid+0x0/0xc @ 1 [ 6.120703] initcall init_rc_map_t2hybrid+0x0/0xc returned 0 after 0 usecs [ 6.128363] calling init_rc_map_asus_pc39+0x0/0xc @ 1 [ 6.134078] initcall init_rc_map_asus_pc39+0x0/0xc returned 0 after 0 usecs [ 6.141829] calling init_rc_map_asus_ps3_100+0x0/0xc @ 1 [ 6.147845] initcall init_rc_map_asus_ps3_100+0x0/0xc returned 0 after 0 usecs [ 6.155877] calling init_rc_map_ati_tv_wonder_hd_600+0x0/0xc @ 1 [ 6.162662] initcall init_rc_map_ati_tv_wonder_hd_600+0x0/0xc returned 0 after 0 usecs [ 6.171478] calling init_rc_map_ati_x10+0x0/0xc @ 1 [ 6.177015] initcall init_rc_map_ati_x10+0x0/0xc returned 0 after 0 usecs [ 6.184568] calling init_rc_map_avermedia_a16d+0x0/0xc @ 1 [ 6.190777] initcall init_rc_map_avermedia_a16d+0x0/0xc returned 0 after 0 usecs [ 6.199013] calling init_rc_map_avermedia+0x0/0xc @ 1 [ 6.204728] initcall init_rc_map_avermedia+0x0/0xc returned 0 after 0 usecs [ 6.212482] calling init_rc_map_avermedia_cardbus+0x0/0xc @ 1 [ 6.218986] initcall init_rc_map_avermedia_cardbus+0x0/0xc returned 0 after 0 usecs [ 6.227514] calling init_rc_map_avermedia_dvbt+0x0/0xc @ 1 [ 6.233708] initcall init_rc_map_avermedia_dvbt+0x0/0xc returned 0 after 0 usecs [ 6.241947] calling init_rc_map_avermedia_m135a+0x0/0xc @ 1 [ 6.248252] initcall init_rc_map_avermedia_m135a+0x0/0xc returned 0 after 0 usecs [ 6.256572] calling init_rc_map_avermedia_m733a_rm_k6+0x0/0xc @ 1 [ 6.263454] initcall init_rc_map_avermedia_m733a_rm_k6+0x0/0xc returned 0 after 0 usecs [ 6.272369] calling init_rc_map_avermedia_rm_ks+0x0/0xc @ 1 [ 6.278678] initcall init_rc_map_avermedia_rm_ks+0x0/0xc returned 0 after 0 usecs [ 6.287012] calling init_rc_map_avertv_303+0x0/0xc @ 1 [ 6.292826] initcall init_rc_map_avertv_303+0x0/0xc returned 0 after 0 usecs [ 6.300692] calling init_rc_map_azurewave_ad_tu700+0x0/0xc @ 1 [ 6.307296] initcall init_rc_map_azurewave_ad_tu700+0x0/0xc returned 0 after 0 usecs [ 6.315909] calling init_rc_map_behold+0x0/0xc @ 1 [ 6.321347] initcall init_rc_map_behold+0x0/0xc returned 0 after 0 usecs [ 6.328810] calling init_rc_map_behold_columbus+0x0/0xc @ 1 [ 6.335105] initcall init_rc_map_behold_columbus+0x0/0xc returned 0 after 0 usecs [ 6.343437] calling init_rc_map_budget_ci_old+0x0/0xc @ 1 [ 6.349546] initcall init_rc_map_budget_ci_old+0x0/0xc returned 0 after 0 usecs [ 6.357685] calling init_rc_map_cec+0x0/0xc @ 1 [ 6.362821] initcall init_rc_map_cec+0x0/0xc returned 0 after 0 usecs [ 6.369992] calling init_rc_map_cinergy_1400+0x0/0xc @ 1 [ 6.375997] initcall init_rc_map_cinergy_1400+0x0/0xc returned 0 after 0 usecs [ 6.384046] calling init_rc_map_cinergy+0x0/0xc @ 1 [ 6.389579] initcall init_rc_map_cinergy+0x0/0xc returned 0 after 0 usecs [ 6.397145] calling init_rc_map_d680_dmb+0x0/0xc @ 1 [ 6.402762] initcall init_rc_map_d680_dmb+0x0/0xc returned 0 after 0 usecs [ 6.410418] calling init_rc_map_delock_61959+0x0/0xc @ 1 [ 6.416432] initcall init_rc_map_delock_61959+0x0/0xc returned 0 after 0 usecs [ 6.424474] calling init_rc_map+0x0/0xc @ 1 [ 6.429235] initcall init_rc_map+0x0/0xc returned 0 after 0 usecs [ 6.436012] calling init_rc_map+0x0/0xc @ 1 [ 6.440776] initcall init_rc_map+0x0/0xc returned 0 after 0 usecs [ 6.447564] calling init_rc_map_digitalnow_tinytwin+0x0/0xc @ 1 [ 6.454246] initcall init_rc_map_digitalnow_tinytwin+0x0/0xc returned 0 after 0 usecs [ 6.462969] calling init_rc_map_digittrade+0x0/0xc @ 1 [ 6.468794] initcall init_rc_map_digittrade+0x0/0xc returned 0 after 0 usecs [ 6.476634] calling init_rc_map_dm1105_nec+0x0/0xc @ 1 [ 6.482464] initcall init_rc_map_dm1105_nec+0x0/0xc returned 0 after 0 usecs [ 6.490316] calling init_rc_map_dntv_live_dvb_t+0x0/0xc @ 1 [ 6.496610] initcall init_rc_map_dntv_live_dvb_t+0x0/0xc returned 0 after 0 usecs [ 6.504940] calling init_rc_map_dntv_live_dvbt_pro+0x0/0xc @ 1 [ 6.511531] initcall init_rc_map_dntv_live_dvbt_pro+0x0/0xc returned 0 after 0 usecs [ 6.520154] calling init_rc_map_dtt200u+0x0/0xc @ 1 [ 6.525676] initcall init_rc_map_dtt200u+0x0/0xc returned 0 after 0 usecs [ 6.533237] calling init_rc_map_rc5_dvbsky+0x0/0xc @ 1 [ 6.539058] initcall init_rc_map_rc5_dvbsky+0x0/0xc returned 0 after 0 usecs [ 6.546905] calling init_rc_map_dvico_mce+0x0/0xc @ 1 [ 6.552619] initcall init_rc_map_dvico_mce+0x0/0xc returned 0 after 0 usecs [ 6.560372] calling init_rc_map_dvico_portable+0x0/0xc @ 1 [ 6.566571] initcall init_rc_map_dvico_portable+0x0/0xc returned 0 after 0 usecs [ 6.574813] calling init_rc_map_em_terratec+0x0/0xc @ 1 [ 6.580736] initcall init_rc_map_em_terratec+0x0/0xc returned 0 after 0 usecs [ 6.588686] calling init_rc_map_encore_enltv2+0x0/0xc @ 1 [ 6.594785] initcall init_rc_map_encore_enltv2+0x0/0xc returned 0 after 0 usecs [ 6.602922] calling init_rc_map_encore_enltv+0x0/0xc @ 1 [ 6.608936] initcall init_rc_map_encore_enltv+0x0/0xc returned 0 after 0 usecs [ 6.616984] calling init_rc_map_encore_enltv_fm53+0x0/0xc @ 1 [ 6.623474] initcall init_rc_map_encore_enltv_fm53+0x0/0xc returned 0 after 0 usecs [ 6.632001] calling init_rc_map_evga_indtube+0x0/0xc @ 1 [ 6.638018] initcall init_rc_map_evga_indtube+0x0/0xc returned 0 after 0 usecs [ 6.646053] calling init_rc_map_eztv+0x0/0xc @ 1 [ 6.651293] initcall init_rc_map_eztv+0x0/0xc returned 0 after 0 usecs [ 6.658567] calling init_rc_map_flydvb+0x0/0xc @ 1 [ 6.663995] initcall init_rc_map_flydvb+0x0/0xc returned 0 after 0 usecs [ 6.671454] calling init_rc_map_flyvideo+0x0/0xc @ 1 [ 6.677100] initcall init_rc_map_flyvideo+0x0/0xc returned 0 after 0 usecs [ 6.684748] calling init_rc_map_fusionhdtv_mce+0x0/0xc @ 1 [ 6.690959] initcall init_rc_map_fusionhdtv_mce+0x0/0xc returned 0 after 0 usecs [ 6.699205] calling init_rc_map_gadmei_rm008z+0x0/0xc @ 1 [ 6.705309] initcall init_rc_map_gadmei_rm008z+0x0/0xc returned 0 after 0 usecs [ 6.713451] calling init_rc_map_geekbox+0x0/0xc @ 1 [ 6.718980] initcall init_rc_map_geekbox+0x0/0xc returned 0 after 0 usecs [ 6.726530] calling init_rc_map_genius_tvgo_a11mce+0x0/0xc @ 1 [ 6.733128] initcall init_rc_map_genius_tvgo_a11mce+0x0/0xc returned 0 after 0 usecs [ 6.741751] calling init_rc_map_gotview7135+0x0/0xc @ 1 [ 6.747670] initcall init_rc_map_gotview7135+0x0/0xc returned 0 after 0 usecs [ 6.755606] calling init_rc_map_hisi_poplar+0x0/0xc @ 1 [ 6.761527] initcall init_rc_map_hisi_poplar+0x0/0xc returned 0 after 0 usecs [ 6.769475] calling init_rc_map_hisi_tv_demo+0x0/0xc @ 1 [ 6.775483] initcall init_rc_map_hisi_tv_demo+0x0/0xc returned 0 after 0 usecs [ 6.783531] calling init_rc_map_imon_mce+0x0/0xc @ 1 [ 6.789160] initcall init_rc_map_imon_mce+0x0/0xc returned 0 after 0 usecs [ 6.796815] calling init_rc_map_imon_pad+0x0/0xc @ 1 [ 6.802435] initcall init_rc_map_imon_pad+0x0/0xc returned 0 after 0 usecs [ 6.810098] calling init_rc_map_imon_rsc+0x0/0xc @ 1 [ 6.815716] initcall init_rc_map_imon_rsc+0x0/0xc returned 0 after 0 usecs [ 6.823371] calling init_rc_map_iodata_bctv7e+0x0/0xc @ 1 [ 6.829484] initcall init_rc_map_iodata_bctv7e+0x0/0xc returned 0 after 0 usecs [ 6.837624] calling init_rc_it913x_v1_map+0x0/0xc @ 1 [ 6.843339] initcall init_rc_it913x_v1_map+0x0/0xc returned 0 after 0 usecs [ 6.851097] calling init_rc_it913x_v2_map+0x0/0xc @ 1 [ 6.856824] initcall init_rc_it913x_v2_map+0x0/0xc returned 0 after 0 usecs [ 6.864568] calling init_rc_map_kaiomy+0x0/0xc @ 1 [ 6.870010] initcall init_rc_map_kaiomy+0x0/0xc returned 0 after 0 usecs [ 6.877481] calling init_rc_map_khadas+0x0/0xc @ 1 [ 6.882910] initcall init_rc_map_khadas+0x0/0xc returned 0 after 0 usecs [ 6.890372] calling init_rc_map_kworld_315u+0x0/0xc @ 1 [ 6.896284] initcall init_rc_map_kworld_315u+0x0/0xc returned 0 after 0 usecs [ 6.904231] calling init_rc_map_kworld_pc150u+0x0/0xc @ 1 [ 6.910340] initcall init_rc_map_kworld_pc150u+0x0/0xc returned 0 after 0 usecs [ 6.918490] calling init_rc_map_kworld_plus_tv_analog+0x0/0xc @ 1 [ 6.925369] initcall init_rc_map_kworld_plus_tv_analog+0x0/0xc returned 0 after 0 usecs [ 6.934281] calling init_rc_map_leadtek_y04g0051+0x0/0xc @ 1 [ 6.940689] initcall init_rc_map_leadtek_y04g0051+0x0/0xc returned 0 after 0 usecs [ 6.949122] calling init_rc_lme2510_map+0x0/0xc @ 1 [ 6.954643] initcall init_rc_lme2510_map+0x0/0xc returned 0 after 0 usecs [ 6.962199] calling init_rc_map_manli+0x0/0xc @ 1 [ 6.967542] initcall init_rc_map_manli+0x0/0xc returned 0 after 0 usecs [ 6.974898] calling init_rc_map_medion_x10+0x0/0xc @ 1 [ 6.980729] initcall init_rc_map_medion_x10+0x0/0xc returned 0 after 0 usecs [ 6.988580] calling init_rc_map_medion_x10_digitainer+0x0/0xc @ 1 [ 6.995454] initcall init_rc_map_medion_x10_digitainer+0x0/0xc returned 0 after 0 usecs [ 7.004377] calling init_rc_map_medion_x10_or2x+0x0/0xc @ 1 [ 7.010682] initcall init_rc_map_medion_x10_or2x+0x0/0xc returned 0 after 0 usecs [ 7.019016] calling init_rc_map_msi_digivox_ii+0x0/0xc @ 1 [ 7.025215] initcall init_rc_map_msi_digivox_ii+0x0/0xc returned 0 after 0 usecs [ 7.033447] calling init_rc_map_msi_digivox_iii+0x0/0xc @ 1 [ 7.039754] initcall init_rc_map_msi_digivox_iii+0x0/0xc returned 0 after 0 usecs [ 7.048088] calling init_rc_map_msi_tvanywhere+0x0/0xc @ 1 [ 7.054286] initcall init_rc_map_msi_tvanywhere+0x0/0xc returned 0 after 0 usecs [ 7.062520] calling init_rc_map_msi_tvanywhere_plus+0x0/0xc @ 1 [ 7.069209] initcall init_rc_map_msi_tvanywhere_plus+0x0/0xc returned 0 after 0 usecs [ 7.077937] calling init_rc_map_nebula+0x0/0xc @ 1 [ 7.083360] initcall init_rc_map_nebula+0x0/0xc returned 0 after 0 usecs [ 7.090827] calling init_rc_map_nec_terratec_cinergy_xs+0x0/0xc @ 1 [ 7.097909] initcall init_rc_map_nec_terratec_cinergy_xs+0x0/0xc returned 0 after 0 usecs [ 7.107023] calling init_rc_map_norwood+0x0/0xc @ 1 [ 7.112545] initcall init_rc_map_norwood+0x0/0xc returned 0 after 0 usecs [ 7.120106] calling init_rc_map_npgtech+0x0/0xc @ 1 [ 7.125629] initcall init_rc_map_npgtech+0x0/0xc returned 0 after 0 usecs [ 7.133191] calling init_rc_map_odroid+0x0/0xc @ 1 [ 7.138624] initcall init_rc_map_odroid+0x0/0xc returned 0 after 0 usecs [ 7.146082] calling init_rc_map_pctv_sedna+0x0/0xc @ 1 [ 7.151914] initcall init_rc_map_pctv_sedna+0x0/0xc returned 0 after 0 usecs [ 7.159766] calling init_rc_map_pinnacle_color+0x0/0xc @ 1 [ 7.165965] initcall init_rc_map_pinnacle_color+0x0/0xc returned 0 after 0 usecs [ 7.174205] calling init_rc_map_pinnacle_grey+0x0/0xc @ 1 [ 7.180323] initcall init_rc_map_pinnacle_grey+0x0/0xc returned 0 after 0 usecs [ 7.188472] calling init_rc_map_pinnacle_pctv_hd+0x0/0xc @ 1 [ 7.194863] initcall init_rc_map_pinnacle_pctv_hd+0x0/0xc returned 0 after 0 usecs [ 7.203296] calling init_rc_map_pixelview+0x0/0xc @ 1 [ 7.209023] initcall init_rc_map_pixelview+0x0/0xc returned 0 after 0 usecs [ 7.216782] calling init_rc_map_pixelview+0x0/0xc @ 1 [ 7.222502] initcall init_rc_map_pixelview+0x0/0xc returned 0 after 0 usecs [ 7.230256] calling init_rc_map_pixelview+0x0/0xc @ 1 [ 7.235971] initcall init_rc_map_pixelview+0x0/0xc returned 0 after 0 usecs [ 7.243723] calling init_rc_map_pixelview_new+0x0/0xc @ 1 [ 7.249836] initcall init_rc_map_pixelview_new+0x0/0xc returned 0 after 0 usecs [ 7.257997] calling init_rc_map_powercolor_real_angel+0x0/0xc @ 1 [ 7.264873] initcall init_rc_map_powercolor_real_angel+0x0/0xc returned 0 after 0 usecs [ 7.273789] calling init_rc_map_proteus_2309+0x0/0xc @ 1 [ 7.279807] initcall init_rc_map_proteus_2309+0x0/0xc returned 0 after 0 usecs [ 7.287854] calling init_rc_map_purpletv+0x0/0xc @ 1 [ 7.293476] initcall init_rc_map_purpletv+0x0/0xc returned 0 after 0 usecs [ 7.301133] calling init_rc_map_pv951+0x0/0xc @ 1 [ 7.306462] initcall init_rc_map_pv951+0x0/0xc returned 0 after 0 usecs [ 7.313829] calling init_rc_map_rc5_hauppauge_new+0x0/0xc @ 1 [ 7.320329] initcall init_rc_map_rc5_hauppauge_new+0x0/0xc returned 0 after 0 usecs [ 7.328857] calling init_rc_map_rc6_mce+0x0/0xc @ 1 [ 7.334375] initcall init_rc_map_rc6_mce+0x0/0xc returned 0 after 0 usecs [ 7.341936] calling init_rc_map_real_audio_220_32_keys+0x0/0xc @ 1 [ 7.348920] initcall init_rc_map_real_audio_220_32_keys+0x0/0xc returned 0 after 0 usecs [ 7.357931] calling init_rc_map_reddo+0x0/0xc @ 1 [ 7.363266] initcall init_rc_map_reddo+0x0/0xc returned 0 after 0 usecs [ 7.370634] calling init_rc_map_snapstream_firefly+0x0/0xc @ 1 [ 7.377235] initcall init_rc_map_snapstream_firefly+0x0/0xc returned 0 after 0 usecs [ 7.385846] calling init_rc_map_streamzap+0x0/0xc @ 1 [ 7.391574] initcall init_rc_map_streamzap+0x0/0xc returned 0 after 0 usecs [ 7.399330] calling init_rc_map_tango+0x0/0xc @ 1 [ 7.404658] initcall init_rc_map_tango+0x0/0xc returned 0 after 0 usecs [ 7.412033] calling init_rc_map_tanix_tx3mini+0x0/0xc @ 1 [ 7.418145] initcall init_rc_map_tanix_tx3mini+0x0/0xc returned 0 after 0 usecs [ 7.426276] calling init_rc_map_tanix_tx5max+0x0/0xc @ 1 [ 7.432291] initcall init_rc_map_tanix_tx5max+0x0/0xc returned 0 after 0 usecs [ 7.440338] calling init_rc_map_tbs_nec+0x0/0xc @ 1 [ 7.445860] initcall init_rc_map_tbs_nec+0x0/0xc returned 0 after 0 usecs [ 7.453421] calling init_rc_map+0x0/0xc @ 1 [ 7.458181] initcall init_rc_map+0x0/0xc returned 0 after 0 usecs [ 7.464959] calling init_rc_map+0x0/0xc @ 1 [ 7.469722] initcall init_rc_map+0x0/0xc returned 0 after 0 usecs [ 7.476500] calling init_rc_map_terratec_cinergy_c_pci+0x0/0xc @ 1 [ 7.483487] initcall init_rc_map_terratec_cinergy_c_pci+0x0/0xc returned 0 after 0 usecs [ 7.492495] calling init_rc_map_terratec_cinergy_s2_hd+0x0/0xc @ 1 [ 7.499482] initcall init_rc_map_terratec_cinergy_s2_hd+0x0/0xc returned 0 after 0 usecs [ 7.508496] calling init_rc_map_terratec_cinergy_xs+0x0/0xc @ 1 [ 7.515179] initcall init_rc_map_terratec_cinergy_xs+0x0/0xc returned 0 after 0 usecs [ 7.523893] calling init_rc_map_terratec_slim+0x0/0xc @ 1 [ 7.530005] initcall init_rc_map_terratec_slim+0x0/0xc returned 0 after 0 usecs [ 7.538145] calling init_rc_map_terratec_slim_2+0x0/0xc @ 1 [ 7.544443] initcall init_rc_map_terratec_slim_2+0x0/0xc returned 0 after 0 usecs [ 7.552780] calling init_rc_map_tevii_nec+0x0/0xc @ 1 [ 7.558505] initcall init_rc_map_tevii_nec+0x0/0xc returned 0 after 0 usecs [ 7.566249] calling init_rc_map_tivo+0x0/0xc @ 1 [ 7.571492] initcall init_rc_map_tivo+0x0/0xc returned 0 after 0 usecs [ 7.578768] calling init_rc_map_total_media_in_hand+0x0/0xc @ 1 [ 7.585452] initcall init_rc_map_total_media_in_hand+0x0/0xc returned 0 after 0 usecs [ 7.594170] calling init_rc_map_total_media_in_hand_02+0x0/0xc @ 1 [ 7.601150] initcall init_rc_map_total_media_in_hand_02+0x0/0xc returned 0 after 0 usecs [ 7.610160] calling init_rc_map_trekstor+0x0/0xc @ 1 [ 7.615777] initcall init_rc_map_trekstor+0x0/0xc returned 0 after 0 usecs [ 7.623440] calling init_rc_map_tt_1500+0x0/0xc @ 1 [ 7.628972] initcall init_rc_map_tt_1500+0x0/0xc returned 0 after 0 usecs [ 7.636523] calling init_rc_map_twinhan_dtv_cab_ci+0x0/0xc @ 1 [ 7.643127] initcall init_rc_map_twinhan_dtv_cab_ci+0x0/0xc returned 0 after 0 usecs [ 7.651749] calling init_rc_map_twinhan_vp1027+0x0/0xc @ 1 [ 7.657962] initcall init_rc_map_twinhan_vp1027+0x0/0xc returned 0 after 0 usecs [ 7.666187] calling init_rc_map_videomate_k100+0x0/0xc @ 1 [ 7.672401] initcall init_rc_map_videomate_k100+0x0/0xc returned 0 after 0 usecs [ 7.680641] calling init_rc_map_videomate_s350+0x0/0xc @ 1 [ 7.686852] initcall init_rc_map_videomate_s350+0x0/0xc returned 0 after 0 usecs [ 7.695096] calling init_rc_map_videomate_tv_pvr+0x0/0xc @ 1 [ 7.701500] initcall init_rc_map_videomate_tv_pvr+0x0/0xc returned 0 after 0 usecs [ 7.709933] calling init_rc_map_kii_pro+0x0/0xc @ 1 [ 7.715458] initcall init_rc_map_kii_pro+0x0/0xc returned 0 after 0 usecs [ 7.723021] calling init_rc_map_wetek_hub+0x0/0xc @ 1 [ 7.728754] initcall init_rc_map_wetek_hub+0x0/0xc returned 0 after 0 usecs [ 7.736496] calling init_rc_map_wetek_play2+0x0/0xc @ 1 [ 7.742415] initcall init_rc_map_wetek_play2+0x0/0xc returned 0 after 0 usecs [ 7.750361] calling init_rc_map_winfast+0x0/0xc @ 1 [ 7.755881] initcall init_rc_map_winfast+0x0/0xc returned 0 after 0 usecs [ 7.763437] calling init_rc_map_winfast_usbii_deluxe+0x0/0xc @ 1 [ 7.770222] initcall init_rc_map_winfast_usbii_deluxe+0x0/0xc returned 0 after 0 usecs [ 7.779044] calling init_rc_map_su3000+0x0/0xc @ 1 [ 7.784464] initcall init_rc_map_su3000+0x0/0xc returned 0 after 0 usecs [ 7.791923] calling init_rc_map+0x0/0xc @ 1 [ 7.796672] initcall init_rc_map+0x0/0xc returned 0 after 0 usecs [ 7.803456] calling init_rc_map_x96max+0x0/0xc @ 1 [ 7.808892] initcall init_rc_map_x96max+0x0/0xc returned 0 after 0 usecs [ 7.816343] calling init_rc_map_zx_irdec+0x0/0xc @ 1 [ 7.821971] initcall init_rc_map_zx_irdec+0x0/0xc returned 0 after 0 usecs [ 7.829622] calling sunxi_cedar_init+0x0/0x24 @ 1 [ 7.834945] sunxi cedar version 1.1 [ 7.839033] sunxi-cedar 1c0e000.ve: Adding to iommu group 0 [ 7.845263] VE: sunxi_cedar_probe power-domain init!!! [ 7.851007] VE: install start!!! [ 7.851007] [ 7.856591] VE: cedar-ve the get irq is 42 [ 7.856591] [ 7.863035] VE: ve_debug_proc_info:(ptrval), data:(ptrval), lock:(ptrval) [ 7.863035] [ 7.872258] VE: install end!!! [ 7.872258] [ 7.877317] VE: sunxi_cedar_probe [ 7.881113] probe of 1c0e000.ve returned 1 after 42159 usecs [ 7.887632] initcall sunxi_cedar_init+0x0/0x24 returned 0 after 51436 usecs [ 7.895385] calling hci_uart_init+0x0/0xe0 @ 1 [ 7.900444] Bluetooth: HCI UART driver ver 2.3 [ 7.905390] Bluetooth: HCI UART protocol H4 registered [ 7.911119] Bluetooth: HCI UART protocol BCSP registered [ 7.917039] initcall hci_uart_init+0x0/0xe0 returned 0 after 16202 usecs [ 7.924491] calling mmc_pwrseq_simple_driver_init+0x0/0x10 @ 1 [ 7.931325] initcall mmc_pwrseq_simple_driver_init+0x0/0x10 returned 0 after 229 usecs [ 7.940170] calling mmc_pwrseq_emmc_driver_init+0x0/0x10 @ 1 [ 7.946782] initcall mmc_pwrseq_emmc_driver_init+0x0/0x10 returned 0 after 210 usecs [ 7.955402] calling mmc_blk_init+0x0/0xec @ 1 [ 7.960472] initcall mmc_blk_init+0x0/0xec returned 0 after 102 usecs [ 7.967664] calling sunxi_mmc_driver_init+0x0/0x10 @ 1 [ 7.974889] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02) [ 7.984804] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8 [ 7.990978] sunxi-mmc 4020000.sdmmc: No vmmc regulator found [ 7.997284] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found [ 8.003672] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found [ 8.010070] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found [ 8.016559] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found [ 8.023060] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found [ 8.029575] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found [ 8.036490] sunxi-mmc 4020000.sdmmc: Got CD GPIO [ 8.041831] sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail [ 8.048448] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 8.059528] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator [ 8.079617] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SD R12) dt B [ 8.103949] sunxi-mmc 4020000.sdmmc: detmode:gpio irq [ 8.109621] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 8.116966] probe of 4020000.sdmmc returned 1 after 143162 usecs [ 8.127714] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02) [ 8.137633] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8 [ 8.143787] sunxi-mmc 4021000.sdmmc: No vmmc regulator found [ 8.150106] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found [ 8.156504] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found [ 8.162909] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found [ 8.169409] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found [ 8.175900] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found [ 8.182401] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found [ 8.188935] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed [ 8.198255] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 8.209364] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 8.229458] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SD R12) dt B [ 8.253619] sunxi-mmc 4021000.sdmmc: detmode:manually by software [ 8.260599] probe of 4021000.sdmmc returned 1 after 133201 usecs [ 8.267678] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SD R12) dt B [ 8.277161] initcall sunxi_mmc_driver_init+0x0/0x10 returned 0 after 296558 usecs [ 8.282230] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SD R12) dt B [ 8.287558] calling led_pwm_driver_init+0x0/0x10 @ 1 [ 8.300752] sunxi-mmc 4021000.sdmmc: card claims to support voltages below defined range [ 8.305028] initcall led_pwm_driver_init+0x0/0x10 returned 0 after 320 usecs [ 8.321585] calling netlink_init+0x0/0xa0 @ 1 [ 8.323551] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR 25) dt B [ 8.326546] Netlink socket created. [ 8.338088] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(S DR25) dt B [ 8.341846] initcall netlink_init+0x0/0xa0 returned 0 after 14956 usecs [ 8.353618] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(S DR25) dt B [ 8.360833] calling sunxi_led_driver_init+0x0/0x10 @ 1 [ 8.361109] sunxi_led_probe()1881 - start [ 8.373293] mmc1: new high speed SDIO card at address 0001 [ 8.378315] sunxi_get_str_of_property()1693 - failed to get the string of propname led_regulator! [ 8.383059] probe of mmc1:0001 returned 0 after 51 usecs [ 8.388982] sunxi_register_led_classdev()1581 - led_classdev start [ 8.454401] sunxi_led_probe()1977 - finish [ 8.459079] probe of 2008000.ledc returned 1 after 98123 usecs [ 8.465759] initcall sunxi_led_driver_init+0x0/0x10 returned 0 after 102446 usecs [ 8.474117] calling timer_led_trigger_init+0x0/0xc @ 1 [ 8.480051] initcall timer_led_trigger_init+0x0/0xc returned 0 after 101 usecs [ 8.488097] calling defon_led_trigger_init+0x0/0xc @ 1 [ 8.493957] initcall defon_led_trigger_init+0x0/0xc returned 0 after 44 usecs [ 8.501908] calling netdev_trig_init+0x0/0xc @ 1 [ 8.507195] initcall netdev_trig_init+0x0/0xc returned 0 after 40 usecs [ 8.514559] calling hid_init+0x0/0x6c @ 1 [ 8.519236] hidraw: raw HID events driver (C) Jiri Kosina [ 8.525275] initcall hid_init+0x0/0x6c returned 0 after 5999 usecs [ 8.532176] calling usb_kbd_driver_init+0x0/0x18 @ 1 [ 8.537896] usbcore: registered new interface driver usbkbd [ 8.544101] initcall usb_kbd_driver_init+0x0/0x18 returned 0 after 6142 usecs [ 8.552065] calling usb_mouse_driver_init+0x0/0x18 @ 1 [ 8.557952] usbcore: registered new interface driver usbmouse [ 8.564349] initcall usb_mouse_driver_init+0x0/0x18 returned 0 after 6309 usecs [ 8.572502] calling init_exfat+0x0/0x70 @ 1 [ 8.577274] exFAT: Version 1.3.0 [ 8.581002] initcall init_exfat+0x0/0x70 returned 0 after 3631 usecs [ 8.588188] calling extcon_class_init+0x0/0x20 @ 1 [ 8.593683] initcall extcon_class_init+0x0/0x20 returned 0 after 60 usecs [ 8.601257] calling alsa_timer_init+0x0/0x16c @ 1 [ 8.606881] initcall alsa_timer_init+0x0/0x16c returned 0 after 279 usecs [ 8.614433] calling alsa_pcm_init+0x0/0x18 @ 1 [ 8.619530] initcall alsa_pcm_init+0x0/0x18 returned 0 after 4 usecs [ 8.626603] calling snd_soc_init+0x0/0x84 @ 1 [ 8.632063] probe of snd-soc-dummy returned 1 after 122 usecs [ 8.638754] initcall snd_soc_init+0x0/0x84 returned 0 after 7001 usecs [ 8.646019] calling dmic_driver_init+0x0/0x10 @ 1 [ 8.651620] initcall dmic_driver_init+0x0/0x10 returned 0 after 227 usecs [ 8.659210] calling asoc_simple_card_init+0x0/0x10 @ 1 [ 8.665244] initcall asoc_simple_card_init+0x0/0x10 returned 0 after 208 usecs [ 8.673307] calling sunxi_asoc_cpudai_driver_init+0x0/0x10 @ 1 [ 8.680244] probe of 203034c.dummy_cpudai returned 1 after 154 usecs [ 8.687427] initcall sunxi_asoc_cpudai_driver_init+0x0/0x10 returned 0 after 7322 usecs [ 8.696344] calling sunxi_spdif_driver_init+0x0/0x10 @ 1 [ 8.702617] initcall sunxi_spdif_driver_init+0x0/0x10 returned 0 after 232 usecs [ 8.710875] calling sunxi_dmic_driver_init+0x0/0x10 @ 1 [ 8.717029] initcall sunxi_dmic_driver_init+0x0/0x10 returned 0 after 220 usecs [ 8.725166] calling sunxi_daudio_driver_init+0x0/0x10 @ 1 [ 8.731533] initcall sunxi_daudio_driver_init+0x0/0x10 returned 0 after 231 usecs [ 8.739888] calling sunxi_internal_codec_driver_init+0x0/0x10 @ 1 [ 8.747009] [AUDIOCODEC][sunxi_codec_parse_params][2412]:digital_vol:0, lineout_vol:26, mic1gain:31, mic2 gain:31 pa_msleep:120, pa_level:1, pa_pwr_level:1 [ 8.747009] [ 8.764060] [AUDIOCODEC][sunxi_codec_parse_params][2448]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf :0 [ 8.775369] [AUDIOCODEC][sunxi_internal_codec_probe][2609]:codec probe finished [ 8.783612] probe of 2030000.codec returned 1 after 36674 usecs [ 8.790311] initcall sunxi_internal_codec_driver_init+0x0/0x10 returned 0 after 42505 usecs [ 8.799624] calling sunxi_machine_driver_init+0x0/0x10 @ 1 [ 8.806624] debugfs: Directory '203034c.dummy_cpudai' with parent 'audiocodec' already present! [ 8.816373] [SNDCODEC][sunxi_card_init][583]:card init finished [ 8.823425] sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok [ 8.834359] input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0 /input0 [ 8.846358] [SNDCODEC][sunxi_card_dev_probe][836]:register card finished [ 8.853967] probe of 2030340.sound returned 1 after 47937 usecs [ 8.860583] [SNDCODEC][sunxi_hs_init_work][259]:resume-->report switch [ 8.866932] initcall sunxi_machine_driver_init+0x0/0x10 returned 0 after 59664 usecs [ 8.876481] calling sock_diag_init+0x0/0x40 @ 1 [ 8.881773] initcall sock_diag_init+0x0/0x40 returned 0 after 70 usecs [ 8.889077] calling llc_init+0x0/0x24 @ 1 [ 8.893635] initcall llc_init+0x0/0x24 returned 0 after 1 usecs [ 8.900245] calling snap_init+0x0/0x44 @ 1 [ 8.904903] initcall snap_init+0x0/0x44 returned 0 after 3 usecs [ 8.911610] calling blackhole_init+0x0/0xc @ 1 [ 8.916651] initcall blackhole_init+0x0/0xc returned 0 after 2 usecs [ 8.923753] calling fq_codel_module_init+0x0/0xc @ 1 [ 8.929390] initcall fq_codel_module_init+0x0/0xc returned 0 after 1 usecs [ 8.937053] calling init_cgroup_cls+0x0/0xc @ 1 [ 8.942199] initcall init_cgroup_cls+0x0/0xc returned 0 after 0 usecs [ 8.949379] calling nfnetlink_init+0x0/0x70 @ 1 [ 8.954531] initcall nfnetlink_init+0x0/0x70 returned 0 after 16 usecs [ 8.961812] calling nfnl_osf_init+0x0/0x50 @ 1 [ 8.966867] initcall nfnl_osf_init+0x0/0x50 returned 0 after 2 usecs [ 8.973934] calling nf_conntrack_standalone_init+0x0/0xa0 @ 1 [ 8.980932] initcall nf_conntrack_standalone_init+0x0/0xa0 returned 0 after 464 usecs [ 8.989690] calling ctnetlink_init+0x0/0x88 @ 1 [ 8.994850] initcall ctnetlink_init+0x0/0x88 returned 0 after 5 usecs [ 9.002042] calling cttimeout_init+0x0/0x78 @ 1 [ 9.007193] initcall cttimeout_init+0x0/0x78 returned 0 after 2 usecs [ 9.014370] calling nf_log_common_init+0x0/0x8 @ 1 [ 9.019810] initcall nf_log_common_init+0x0/0x8 returned 0 after 0 usecs [ 9.027277] calling nf_log_netdev_init+0x0/0x54 @ 1 [ 9.033336] initcall nf_log_netdev_init+0x0/0x54 returned 0 after 506 usecs [ 9.041145] calling nf_nat_init+0x0/0x104 @ 1 [ 9.046103] initcall nf_nat_init+0x0/0x104 returned 0 after 17 usecs [ 9.053209] calling xt_init+0x0/0xe4 @ 1 [ 9.057692] initcall xt_init+0x0/0xe4 returned 0 after 4 usecs [ 9.064178] calling tcpudp_mt_init+0x0/0x10 @ 1 [ 9.069328] initcall tcpudp_mt_init+0x0/0x10 returned 0 after 3 usecs [ 9.076491] calling connmark_mt_init+0x0/0x48 @ 1 [ 9.081837] initcall connmark_mt_init+0x0/0x48 returned 0 after 1 usecs [ 9.089208] calling netmap_tg_init+0x0/0x10 @ 1 [ 9.094349] initcall netmap_tg_init+0x0/0x10 returned 0 after 1 usecs [ 9.101522] calling redirect_tg_init+0x0/0x10 @ 1 [ 9.106863] initcall redirect_tg_init+0x0/0x10 returned 0 after 1 usecs [ 9.114216] calling masquerade_tg_init+0x0/0x3c @ 1 [ 9.119761] initcall masquerade_tg_init+0x0/0x3c returned 0 after 9 usecs [ 9.127323] calling conntrack_mt_init+0x0/0x10 @ 1 [ 9.132750] initcall conntrack_mt_init+0x0/0x10 returned 0 after 1 usecs [ 9.140215] calling state_mt_init+0x0/0xc @ 1 [ 9.145159] initcall state_mt_init+0x0/0xc returned 0 after 0 usecs [ 9.152135] calling gre_offload_init+0x0/0x44 @ 1 [ 9.157478] initcall gre_offload_init+0x0/0x44 returned 0 after 1 usecs [ 9.164838] calling sysctl_ipv4_init+0x0/0x4c @ 1 [ 9.170367] initcall sysctl_ipv4_init+0x0/0x4c returned 0 after 186 usecs [ 9.177933] calling nf_defrag_init+0x0/0xc @ 1 [ 9.182971] initcall nf_defrag_init+0x0/0xc returned 0 after 1 usecs [ 9.190057] calling ip_tables_init+0x0/0x88 @ 1 [ 9.195227] initcall ip_tables_init+0x0/0x88 returned 0 after 31 usecs [ 9.202534] calling iptable_mangle_init+0x0/0x74 @ 1 [ 9.208333] initcall iptable_mangle_init+0x0/0x74 returned 0 after 159 usecs [ 9.216174] calling cubictcp_register+0x0/0x64 @ 1 [ 9.221632] initcall cubictcp_register+0x0/0x64 returned 0 after 3 usecs [ 9.229106] calling inet6_init+0x0/0x320 @ 1 [ 9.234534] NET: Registered protocol family 10 [ 9.240471] Segment Routing with IPv6 [ 9.244638] initcall inet6_init+0x0/0x320 returned 0 after 10423 usecs [ 9.251942] calling nf_defrag_init+0x0/0x4c @ 1 [ 9.257193] initcall nf_defrag_init+0x0/0x4c returned 0 after 58 usecs [ 9.264456] calling packet_init+0x0/0x78 @ 1 [ 9.269324] NET: Registered protocol family 17 [ 9.274281] initcall packet_init+0x0/0x78 returned 0 after 4839 usecs [ 9.281467] calling br_init+0x0/0x9c @ 1 [ 9.285955] initcall br_init+0x0/0x9c returned 0 after 26 usecs [ 9.292559] calling nf_conntrack_l3proto_bridge_init+0x0/0x18 @ 1 [ 9.299448] initcall nf_conntrack_l3proto_bridge_init+0x0/0x18 returned 0 after 1 usecs [ 9.308795] calling init_machine_late+0x0/0x8c @ 1 [ 9.314231] initcall init_machine_late+0x0/0x8c returned 0 after 7 usecs [ 9.321704] calling swp_emulation_init+0x0/0x64 @ 1 [ 9.327241] Registering SWP/SWPB emulation handler [ 9.332575] initcall swp_emulation_init+0x0/0x64 returned 0 after 5213 usecs [ 9.340429] calling init_oops_id+0x0/0x40 @ 1 [ 9.345382] initcall init_oops_id+0x0/0x40 returned 0 after 6 usecs [ 9.352373] calling pm_qos_power_init+0x0/0x84 @ 1 [ 9.358075] initcall pm_qos_power_init+0x0/0x84 returned 0 after 252 usecs [ 9.365733] calling pm_debugfs_init+0x0/0x34 @ 1 [ 9.371006] initcall pm_debugfs_init+0x0/0x34 returned 0 after 18 usecs [ 9.378376] calling wakeup_reason_init+0x0/0xec @ 1 [ 9.383957] initcall wakeup_reason_init+0x0/0xec returned 0 after 54 usecs [ 9.391612] calling printk_late_init+0x0/0x1cc @ 1 [ 9.397053] initcall printk_late_init+0x0/0x1cc returned 0 after 4 usecs [ 9.404508] calling init_srcu_module_notifier+0x0/0x2c @ 1 [ 9.410721] initcall init_srcu_module_notifier+0x0/0x2c returned 0 after 1 usecs [ 9.418967] calling tk_debug_sleep_time_init+0x0/0x34 @ 1 [ 9.425083] initcall tk_debug_sleep_time_init+0x0/0x34 returned 0 after 14 usecs [ 9.433327] calling fault_around_debugfs+0x0/0x34 @ 1 [ 9.439061] initcall fault_around_debugfs+0x0/0x34 returned 0 after 9 usecs [ 9.446818] calling check_early_ioremap_leak+0x0/0x60 @ 1 [ 9.452927] initcall check_early_ioremap_leak+0x0/0x60 returned 0 after 0 usecs [ 9.461071] calling ubifs_init+0x0/0xc4 @ 1 [ 9.466014] initcall ubifs_init+0x0/0xc4 returned 0 after 185 usecs [ 9.473005] calling init_root_keyring+0x0/0xc @ 1 [ 9.478414] initcall init_root_keyring+0x0/0xc returned 0 after 63 usecs [ 9.485878] calling prandom_reseed+0x0/0x34 @ 1 [ 9.491041] initcall prandom_reseed+0x0/0x34 returned 0 after 10 usecs [ 9.498322] calling clk_debug_init+0x0/0x100 @ 1 [ 9.517098] initcall clk_debug_init+0x0/0x100 returned 0 after 13203 usecs [ 9.524761] calling sync_state_resume_initcall+0x0/0x10 @ 1 [ 9.531091] initcall sync_state_resume_initcall+0x0/0x10 returned 0 after 2 usecs [ 9.539432] calling deferred_probe_initcall+0x0/0x98 @ 1 [ 9.548174] initcall deferred_probe_initcall+0x0/0x98 returned 0 after 2656 usecs [ 9.556521] calling genpd_debug_init+0x0/0x178 @ 1 [ 9.562067] initcall genpd_debug_init+0x0/0x178 returned 0 after 90 usecs [ 9.569649] calling genpd_power_off_unused+0x0/0x70 @ 1 [ 9.575597] initcall genpd_power_off_unused+0x0/0x70 returned 0 after 9 usecs [ 9.583551] calling sync_debugfs_init+0x0/0x74 @ 1 [ 9.589027] initcall sync_debugfs_init+0x0/0x74 returned 0 after 25 usecs [ 9.596585] calling ubi_init+0x0/0x230 @ 1 [ 9.601595] ubi0: attaching mtd3 [ 9.824014] random: crng init done [ 9.870008] ubi0: scanning is finished [ 9.883802] ubi0: attached mtd3 (name "sys", size 123 MiB) [ 9.889971] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes [ 9.897633] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 2048 [ 9.905188] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096 [ 9.912946] ubi0: good PEBs: 492, bad PEBs: 0, corrupted PEBs: 0 [ 9.919632] ubi0: user volume: 9, internal volumes: 1, max. volumes count: 128 [ 9.927685] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0 [ 9.936979] ubi0: available PEBs: 0, total reserved PEBs: 492, PEBs reserved for bad PEB handling: 20 [ 9.947260] ubi0: background thread "ubi_bgt0d" started, PID 1141 [ 9.955224] block ubiblock0_5: created from ubi0:5(rootfs) [ 9.961414] initcall ubi_init+0x0/0x230 returned 0 after 351708 usecs [ 9.968601] calling init_sunxi_hci_class+0x0/0x40 @ 1 [ 9.974403] initcall init_sunxi_hci_class+0x0/0x40 returned 0 after 67 usecs [ 9.982263] calling usb_manager_init+0x0/0x10 @ 1 [ 9.988482] probe of soc@3000000:usbc0@0 returned 1 after 666 usecs [ 9.995593] initcall usb_manager_init+0x0/0x10 returned 0 after 7795 usecs [ 10.003298] calling of_fdt_raw_init+0x0/0x80 @ 1 [ 10.010187] OF: fdt: not creating '/sys/firmware/fdt': CRC check failed [ 10.017571] initcall of_fdt_raw_init+0x0/0x80 returned 0 after 8777 usecs [ 10.025127] calling tcp_congestion_default+0x0/0x14 @ 1 [ 10.031061] initcall tcp_congestion_default+0x0/0x14 returned 0 after 3 usecs [ 10.039013] calling regulatory_init_db+0x0/0x90 @ 1 [ 10.044671] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 10.046738] initcall regulatory_init_db+0x0/0x90 returned 0 after 14 usecs [ 10.054310] cfg80211: failed to load regulatory.db [ 10.061963] calling clk_disable_unused+0x0/0xd8 @ 1 [ 10.072792] clk: Not disabling unused clocks [ 10.077557] initcall clk_disable_unused+0x0/0xd8 returned 0 after 4647 usecs [ 10.085402] calling regulator_init_complete+0x0/0x4c @ 1 [ 10.091428] initcall regulator_init_complete+0x0/0x4c returned 0 after 3 usecs [ 10.099469] calling of_platform_sync_state_init+0x0/0x10 @ 1 [ 10.105864] initcall of_platform_sync_state_init+0x0/0x10 returned 0 after 2 usecs [ 10.114298] calling alsa_sound_last_init+0x0/0x78 @ 1 [ 10.120028] ALSA device list: [ 10.123324] #0: audiocodec [ 10.126530] initcall alsa_sound_last_init+0x0/0x78 returned 0 after 6344 usecs [ 10.134577] alloc_fd: slot 0 not NULL! [ 10.142136] VFS: Mounted root (squashfs filesystem) readonly on device 254:0. [ 10.152332] devtmpfs: mounted [ 10.157590] Freeing unused kernel memory: 1024K [ 10.186890] Run /pseudo_init as init process mount: mounting none on /dev failed: Resource busy [ 10.423312] UBIFS (ubi0:7): default file-system created [ 10.429875] UBIFS (ubi0:7): Mounting in unauthenticated mode [ 10.436309] UBIFS (ubi0:7): background thread "ubifs_bgt0_7" started, PID 1177 [ 10.545064] UBIFS (ubi0:7): UBIFS: mounted UBI device 0, volume 7, name "rootfs_data" [ 10.553850] UBIFS (ubi0:7): LEB size: 258048 bytes (252 KiB), min./max. I/O unit sizes: 4096 bytes/4096 b ytes [ 10.564904] UBIFS (ubi0:7): FS size: 43352064 bytes (41 MiB, 168 LEBs), journal size 2064385 bytes (1 MiB , 8 LEBs) [ 10.576437] UBIFS (ubi0:7): reserved for root: 2047624 bytes (1999 KiB) [ 10.583811] UBIFS (ubi0:7): media format: w5/r0 (latest is w5/r0), UUID A990054B-7A51-40E3-88D5-D2ADE4302 641, small LPT model can't run '/etc/preinit': No such file or directory mount: mounting proc on /proc failed: Resource busy mount: mounting tmpfs on /run failed: No such file or directory hostname: can't open '/etc/hostname': No such file or directory ------run rc.preboot file----- [ 10.726898] UBIFS (ubi0:8): default file-system created [ 10.733373] UBIFS (ubi0:8): Mounting in unauthenticated mode [ 10.739836] UBIFS (ubi0:8): background thread "ubifs_bgt0_8" started, PID 1207 [ 10.847452] UBIFS (ubi0:8): UBIFS: mounted UBI device 0, volume 8, name "UDISK" [ 10.855619] UBIFS (ubi0:8): LEB size: 258048 bytes (252 KiB), min./max. I/O unit sizes: 4096 bytes/4096 b ytes [ 10.866690] UBIFS (ubi0:8): FS size: 6451200 bytes (6 MiB, 25 LEBs), journal size 2064385 bytes (1 MiB, 6 LEBs) [ 10.877943] UBIFS (ubi0:8): reserved for root: 304706 bytes (297 KiB) [ 10.885118] UBIFS (ubi0:8): media format: w5/r0 (latest is w5/r0), UUID 7F2A6990-A27D-4A9F-A55D-0BFEB024E E5F, small LPT model ------run rc.modules file----- [ 11.026483] calling init_module+0x0/0x1000 [usb_storage] @ 1210 [ 11.033383] usbcore: registered new interface driver usb-storage [ 11.040173] initcall init_module+0x0/0x1000 [usb_storage] returned 0 after 6739 usecs [ 11.277307] calling init_module+0x0/0x1000 [8821cs] @ 1213 [ 11.418801] probe of mmc1:0001:1 returned 1 after 135086 usecs [ 11.433472] initcall init_module+0x0/0x1000 [8821cs] returned 0 after 145536 usecs Successfully initialized wpa_supplicant [ 12.442525] start_addr=(0x8000), end_addr=(0x10000), buffer_size=(0x8000), smp_number_max=(4096) ------run rc.final file----- numid=30,iface=MIXER,name='Headphone Switch' ; type=BOOLEAN,access=rw------,values=1 : values=on [ 12.703215] file system registered Load mpp modules mkdir: can't create directory '/dev/pts': File exists [ 12.723016] configfs-gadget 4100000.udc-controller: failed to start g1: -19 mkdir: can't create directory '/dev/shm': File exists sh: write error: No such device [ 12.758806] read descriptors [ 12.762055] read strings cat: can't open '/sys/class/sunxi_info/sys_info': No such file or directory Starting network: Failed to connect to ubus /sbin/ifup: line 51: /sbin/wifi: not found FAIL ifconfig: invalid hw-addr 00: udhcpc: SIOCGIFINDEX: No such device [leo start] chage file File does not exist. /etc/init.d/S60sshd: line 55: touch: not found ================================== Connecting to the network(leo)...... [ 13.536735] [ 13.536735] insmod_device_driver [ 13.536735] [ 13.543901] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dumm y regulator [ 13.739511] sunxi_set_cur_vol_work()397 WARN: get power supply failed [ 13.785946] android_work: sent uevent USB_STATE=CONNECTED [ 13.812985] configfs-gadget gadget: high-speed config #1: c [ 13.819318] android_work: sent uevent USB_STATE=CONFIGURED [ 18.468861] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready Connected to the AP(leo) Getting ip address(leo)...... udhcpc: started, v1.27.2 udhcpc: sending discover udhcpc: sending select for 192.168.199.177 udhcpc: lease of 192.168.199.177 obtained, lease time 86400 Wifi connect ap : Success! ================================== [leo start]Start SSH----------- sh: odhcp6c: not found BusyBox v1.27.2 () built-in shell (ash) ------run profile file----- _____ _ __ _ |_ _||_| ___ _ _ | | |_| ___ _ _ _ _ | | _ | || | | |__ | || || | ||_'_| | | | || | || _ | |_____||_||_|_||___||_,_| |_| |_||_|_||_|_| Tina is Based on OpenWrt! ---------------------------------------------- Tina Linux (Neptune, 61CC0487) ---------------------------------------------- Trying to connect to SWUpdate... Wed Jun 1 00:00:00 GMT 2022 nodev debugfs root@TinaLinux:/# swu_param: #### swu_software: #### swu_mode: #### no swupdate_cmd to run, wait for next swupdate /etc/rc.common: line 128: procd_add_mdns: not found [ 40.376750] usb1-vbus: disabling root@TinaLinux:/# root@TinaLinux:/# /etc/init.d/acm.sh mount: mounting none on /sys/kernel/config failed: Resource busy mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1': File exists mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/strings/0x409': File exists mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/configs/c.1': File exists mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409': File exists echo: write error: Resource busy root@TinaLinux:/# cd dev/ root@TinaLinux:/dev# ls bus mtd0ro random ubi0_2 by-name mtd1 shm ubi0_3 cedar_dev mtd1ro snd ubi0_4 console mtd2 sunxi-reg ubi0_5 cpu_dma_latency mtd2ro sunxi-wlan ubi0_6 disp mtd3 sunxi_pwm0 ubi0_7 fb0 mtd3ro tty ubi0_8 full mtdblock0 ttyGS0 ubi_ctrl g2d mtdblock1 ttyS0 ubiblock0_5 gpiochip0 mtdblock2 ttyS1 udmabuf input mtdblock3 ttyS4 urandom ion null ubi0 usb-ffs kmsg ptmx ubi0_0 zero mtd0 pts ubi0_1 root@TinaLinux:/dev# echo "asdasd" > ttyGS0 ^C root@TinaLinux:/dev# cat /etc/init.d/acm.sh mount -t configfs none /sys/kernel/config mkdir /sys/kernel/config/usb_gadget/g1 echo "0x1f3a" > /sys/kernel/config/usb_gadget/g1/idVendor echo "0x0007" > /sys/kernel/config/usb_gadget/g1/idProduct mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409 mkdir /sys/kernel/config/usb_gadget/g1/functions/acm.usb0 mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1 echo 0xc0 > /sys/kernel/config/usb_gadget/g1/configs/c.1/bmAttributes echo 500 > /sys/kernel/config/usb_gadget/g1/configs/c.1/MaxPower mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409 ln -s /sys/kernel/config/usb_gadget/g1/functions/acm.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/acm.usb0 ls /sys/class/udc/ | xargs echo > /sys/kernel/config/usb_gadget/g1/UDCroot@TinaLinux:/dev# -
回复: T113-S3 板子上用到PB2,PB3,PB4,PB5串口4和串口5 怎么配置才能用起来呢?发布在 MR Series
@damiaa dts里面设置一下打开相应的uart,没有就加上就行啦,那个pin不能被其他的占用了,编译好后启动tina
系统里面就会有/dev/ttyS4 /dev/ttyS5
如果没有就dmesg看看启动的时候pin有没有报错 -
Debian 5.4 内核 H618/H616 高速 SPI 小屏幕实战,ST7789V 跑上 60FPS 折腾总结发布在 H/F/TV Series
主要还是得靠AI,我是第一次玩这东西,坑很多,但是吧最后都填平了,只不过ai被我撸爆了
Orangepi Zero 2W这个板子 H618芯片,板子上的pin接的一个spi屏幕
最终效果
<iframe src="//player.bilibili.com/player.html?isOutside=true&aid=116542847064811&bvid=BV11sRSBDErM&cid=38205524172&p=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>这种Linux板子本身输出是走hdmi的所以对这种spi小屏幕支持得特别不好
我刚开始走驱动的时候把lvgl接进去跑刷出来是0fps,从上往下一页一页刷,简直了这个不是CPU的锅,是驱动的问题,这驱动太老了,本声就是点个亮用的
所以光靠我肯定搞不定,我是撸ai,成功搞定的现在留个总结在这里,以后谁遇上了也有个参考
结果是可以跑到60fps,80mhz spi
简单总结一下原理
一次刷全屏数据,spi频率要拉满,然后需要单出一个线程专门处理dma刷过来的数据,简单点说就是开一次门以后就别关了,有数据就直接进来刷进去,驱动主要慢也就在这,每次刷数据都是找钥匙,开门,数据刷,再关门,神仙也快不起来下面是ai总结的,应该很全面了
一、硬件环境
Orange Pi Zero 2W
H618/H616
官方 Debian 5.4 内核
屏幕:
ST7789V
240x280 SPI LCD二、别直接上 Mainline / tinyDRM
反正我在armbain系统上没成功,即便成功了也没有我现在改的驱动快
Failed to setup spi
EINVAL
三、真正能跑流畅的关键:不是 LVGL,而是 SPI原因:
- syscall 开销
- SPI transfer 切碎
- 小块刷新太多
- DC 切换频繁
最后 CPU 都耗在 ioctl 上。
四、真正有效的路线:fb_st7789v + framebuffer
最终稳定能跑的几个关键参数:
spi-max-frequency = <80000000>;
fps = <60>;
txbuflen = <131072>;六、真正决定 FPS 的核心:改驱动,单独 DMA 刷新线程
这里其实才是整个项目最关键的部分。
一开始:
text fb_st7789v
虽然能显示。
但:
text LVGL 一动就掉帧 SPI write 阻塞 CPU 占用高 动画一卡一卡
后来发现:
text 问题根本不是 SPI 频率 而是刷新机制。
默认:
text fb_st7789v
很多刷新逻辑实际上是:
text 谁调用刷新 谁阻塞等待 SPI DMA 完成
这意味着:
text LVGL render SPI flush DMA wait
全部串行。
结果:
text CPU 大量时间卡在 SPI wait 上。
后来直接开始改驱动。
核心思路:
不让 LVGL 线程直接刷 SPI
而是:
text 单独创建 DMA 刷新线程
流程变成:
text LVGL ↓ 只提交 dirty buffer ↓ 放入刷新队列 ↓ 独立 DMA thread ↓ 后台 SPI DMA 刷新
这样:
text LVGL 渲染
和:
text SPI DMA 发送
彻底解耦。
改完以后最大的变化
原来:
text LVGL flush_cb
会卡住。
改完:
text flush_cb
基本只负责:
- 标记 dirty
- 提交 buffer
- 立即返回
真正 SPI DMA:
text 后台线程异步跑。
这个提升非常大。
为什么这个方法效果这么明显
因为 SPI LCD 真正慢的是:
text SPI transfer 时间
而不是:
text CPU 渲染
尤其:
text 240x280 RGB565
全屏:
text 240 × 280 × 2 ≈ 134KB
60FPS:
text 134KB × 60 ≈ 8MB/s
已经非常接近 SPI 极限。
所以:
text 减少阻塞 减少等待 DMA后台化
比:
text 单纯提高 SPI 频率
更重要。
后面进一步优化的方向
目前还准备继续:
1. DMA 双缓冲
也就是:
text ping-pong buffer
SPI 刷当前 buffer 的时候:
text LVGL 同时渲染下一帧
进一步减少等待。
2. partial refresh
目前已经:
text 只刷 dirty area
但后面准备:
text 合并区域 减少 transaction 次数
因为:
text SPI transaction 次数
很多时候比:
text SPI 频率
更影响 FPS。
3. 更激进 DMA
目前:
text fb_st7789v
本质上还是:
text Linux framebuffer
后面甚至考虑:
text 自己写 ultra-light SPI DMA framebuffer
直接绕过大量 framebuffer/fbtft 历史包袱。
最终结论
最后发现:
text 真正让 SPI 小屏跑流畅的 不是 LVGL 不是 tinyDRM 甚至不只是 SPI 频率
而是:
text 刷新架构。
尤其:
text DMA 异步线程化
提升非常明显。
需要驱动源码的给我私信吧,改了不少东西,可以直接把整个sd卡的img镜像给你
-
回复: D1s ledc驱动代码bug,DMA模式无法使用发布在 MR Series
弄不好真是RV的bug我这是D1s上出现这种情况,我翻了一圈论坛里面貌似都是d1s 会出现这种情况,超过32个灯就出错了,那么这会是芯片的问题,还是代码的问题呢,如果是代码的问题还能搞搞好,如果是芯片的问题我就直接贴一片t113起来得了……
-
回复: D1s ledc驱动代码bug,DMA模式无法使用发布在 MR Series
大佬我这三份文件都和你发的是一样的
我测试了半天那个echo只要改变超过32个灯就直接挂掉了
如果把判断条件直接改成DMA模式,一个灯都亮不了呀
之前在melis里面测试的时候DMA模式就一直没能成功运行
现在换tina了问题依旧
只有cpu模式下能跑不超过32个灯[ 34.124663] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 34.134597] Oops [#1] [ 34.137125] Modules linked in: xr829 sunxi_gpadc [ 34.142277] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.4.61 #152 [ 34.149274] Workqueue: events set_brightness_delayed [ 34.154805] sepc: ffffffe000321d74 ra : ffffffe000321f0c sp : ffffffe00386fcc0 [ 34.162844] gp : ffffffe00067eef8 tp : ffffffe00384ab00 t0 : 0000000000000080 [ 34.170884] t1 : 0000000043265443 t2 : 000000000000000a s0 : ffffffe00386fd50 [ 34.178923] s1 : ffffffe003265240 a0 : 0000000000000000 a1 : 0000000043265444 [ 34.186961] a2 : 0000000000000004 a3 : 0000000000000001 a4 : 0000000000000001 [ 34.195000] a5 : 0000000400000004 a6 : 00000000ffffffff a7 : 0000000000000004 [ 34.203039] s2 : ffffffe003a07410 s3 : 0000000000000004 s4 : 0000000000000001 [ 34.211079] s5 : ffffffe003ed9300 s6 : 0000000000000000 s7 : ffffffe00062ac70 [ 34.219118] s8 : 0000000000000001 s9 : 0000000000000402 s10: ffffffe00062ae28 [ 34.227157] s11: 0000000000000000 t3 : 0000000000000000 t4 : 0000000000000005 [ 34.235196] t5 : ffffffff80000000 t6 : 0000000000040000 [ 34.241106] sstatus: 0000000200000120 sbadaddr: 0000000000000000 scause: 000000000000000d [ 34.250748] ---[ end trace b914e592328ab01f ]--- -
回复: d1s Tina 加载RTL8723DS驱动速度很慢,要卡很久发布在 MR Series
@fanhuacloud 我这里rtl8821cs也是这样
那个wl_reg_on 强制给他上个高电平貌似会快一些,我这加载模块要10s,连网要20s。。。
问了别人也是这个样子,全志的d1s,t113加载rtl的模块都很慢 -
T113 ledc 驱动bug 长时间运行以后出错发布在 MR Series
那个ledc驱动在长时间跑大量数据之后出错啦
报错是这个超时的故障
sunxi_ledc_irq_handler()1313 - wait time is more than 600000 ns,going to reset ledc and drop this operation!为啥会超时呢,一开始运行的都好好的
但是时间一长比如说,让这个ledc驱动器工作个1-2小时以后
这玩意就概率性的挂掉
报错看上去是超时
现象是有一半左右的灯组就不亮了,而且重启程序那部分不亮的灯也再也不会亮了会不会是芯片过热或者被其他什么东西干扰了,我开机几个小时后那个芯片还是有点点热的
而且这个出错是概率性的,关机一段时间再启动又不会出错啦
下面是那个驱动报错那部分的代码
static irqreturn_t sunxi_ledc_irq_handler(int irq, void *dev_id) { unsigned long flags; long delta_time_ns; u32 irq_status, max_ns; struct sunxi_led *led = sunxi_led_global; struct timespec64 current_time; spin_lock_irqsave(&led->lock, flags); irq_status = sunxi_get_reg(LEDC_INT_STS_REG_OFFSET); sunxi_ledc_clear_all_irq(); if (irq_status & LEDC_TRANS_FINISH_INT) { sunxi_ledc_reset(led); led->length = 0; led->result = RESULT_COMPLETE; wake_up(&led->wait); goto out; } if (irq_status & LEDC_WAITDATA_TIMEOUT_INT) { ktime_get_coarse_real_ts64(¤t_time); delta_time_ns = current_time.tv_sec - led->start_time.tv_sec; delta_time_ns *= 1000 * 1000 * 1000; delta_time_ns += current_time.tv_nsec - led->start_time.tv_nsec; max_ns = led->wait_data_time_ns; if (delta_time_ns <= max_ns) { spin_unlock_irqrestore(&led->lock, flags); return IRQ_HANDLED; } sunxi_ledc_reset(led); if (delta_time_ns <= max_ns * 2) { sunxi_ledc_dma_terminate(led); sunxi_ledc_trans_data(led); } else { LED_ERR("wait time is more than %d ns," "going to reset ledc and drop this operation!\n", max_ns); led->result = RESULT_ERR; wake_up(&led->wait); led->length = 0; } goto out; } if (irq_status & LEDC_FIFO_OVERFLOW_INT) { LED_ERR("there exists fifo overflow issue, irq_status=0x%x!\n", irq_status); sunxi_ledc_reset(led); led->result = RESULT_ERR; wake_up(&led->wait); led->length = 0; goto out; } out: spin_unlock_irqrestore(&led->lock, flags); return IRQ_HANDLED; }
leomini5 发布的最新帖子
-
T113 AXP313 调试记录发布在 T Series
之前玩T113S3 都是3个dcdc 供电,那个电路不够简洁,所以换AXP313A
但是换之前被一个大问题困扰,这个PMIC没有配置,能直接把T113带起来嘛
所以我整了个测试板,T113 还是dcdc 供电,然后把信号线接过去测试现在结果来了
1 在什么都没有配置的情况下 T113 默认输出 两路 ldo 一个是1.8v 一个是3.3
然后三路dcdc 都是0.9v那么boot0 应该就没问题了
有3.3 有 0.9 有1.8 其实 都不需要配置pmic就可以直接带起来,只是没有Dram的1.5 然后系统里面那个ldo的3.3v带别的设备不行
所以现在的目标就是把dcdc1 拉到 3.3v 把 dcdc3 拉到1.5v 这样整个板子的供电就基本上都够了 dcdc1 给其他3.3v模块用 1.5v可以直接把dram 带起来
然后调试的思路就是 先让系统配置起来,其实这个简单,只需要把你连接的pin配置好即可 在dts里面配置
比如我这里
TWI1 PB4 PB5 axp1530=AXP313,这两在系统驱动里面是当一样的东西处理 ,所以这里直接这么写就可以了&twi1 { clock-frequency = <100000>; pinctrl-0 = <&twi1_pins_a>; pinctrl-1 = <&twi1_pins_b>; pinctrl-names = "default", "sleep"; status = "okay"; axp1530: pmic@36 { compatible = "x-powers,axp1530"; reg = <0x36>; status = "okay"; wakeup-source; regulators { reg_dcdc1: dcdc1 { regulator-name = "axp1530-dcdc1"; regulator-min-microvolt = <500000>; regulator-max-microvolt = <3300000>; regulator-step-delay-us = <25>; regulator-final-delay-us = <50>; regulator-boot-on; regulator-always-on; }; reg_dcdc2: dcdc2 { regulator-name = "axp1530-dcdc2"; regulator-min-microvolt = <500000>; regulator-max-microvolt = <1540000>; regulator-step-delay-us = <25>; regulator-final-delay-us = <50>; regulator-ramp-delay = <200>; regulator-boot-on; regulator-always-on; }; reg_dcdc3: dcdc3 { regulator-name = "axp1530-dcdc3"; regulator-min-microvolt = <500000>; regulator-max-microvolt = <1840000>; regulator-step-delay-us = <25>; regulator-final-delay-us = <50>; regulator-boot-on; regulator-always-on; }; reg_aldo1: ldo1 { regulator-name = "axp1530-aldo1"; regulator-min-microvolt = <500000>; regulator-max-microvolt = <3500000>; regulator-step-delay-us = <25>; regulator-final-delay-us = <50>; regulator-boot-on; regulator-always-on; }; reg_dldo1: ldo2 { regulator-name = "axp1530-dldo1"; regulator-min-microvolt = <500000>; regulator-max-microvolt = <3500000>; regulator-step-delay-us = <25>; regulator-final-delay-us = <50>; regulator-boot-on; regulator-always-on; }; }; }; };然后系统基本上就很简单能连接并读取芯片数据了
唯一的坑是,我自己抄大佬的原理图没有注意H616那个IO是1.8v的但是我这里T113是3.3v 那个SDA SDL线需要上拉才能工作,拉错电压就会导致数据错误,连接失败。
弄好了以后系统里面就可以这样直接 操作 pmic了,可以直接往twi上发指令root@TinaLinux:~# dmesg | grep -iE "axp|dcdc|ldo|regulator|LEO" [ 0.000000] Linux version 5.4.61 (root@leomini) (arm-openwrt-linux-muslgnueabi-gcc.bin (OpenWrt/Linaro GCC 6.4-2017.11 2017-11) 6.4.1, GNU ld (GNU Binutils) 2.27) #441 SMP PREEMPT Sun Jun 7 16:05:55 UTC 2026 [ 0.019621] calling regulator_init+0x0/0xa8 @ 1 [ 0.019956] regulator-dummy: no parameters [ 0.020273] initcall regulator_init+0x0/0xa8 returned 0 after 9765 usecs [ 0.103615] calling regulator_fixed_voltage_init+0x0/0x10 @ 1 [ 0.105134] initcall regulator_fixed_voltage_init+0x0/0x10 returned 0 after 0 usecs [ 0.105145] calling axp2101_regulator_init+0x0/0x10 @ 1 [ 0.105358] initcall axp2101_regulator_init+0x0/0x10 returned 0 after 0 usecs [ 0.106347] calling axp2101_i2c_init+0x0/0x34 @ 1 [ 0.106404] initcall axp2101_i2c_init+0x0/0x34 returned 0 after 0 usecs [ 0.128501] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pc not found, using dummy regulator [ 0.128995] spi spi0: spi0 supply spi not found, using dummy regulator [ 0.192955] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator [ 0.196032] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator [ 0.196350] uart uart0: get regulator failed [ 0.196382] uart uart0: uart0 supply uart not found, using dummy regulator [ 0.197450] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator [ 0.197768] uart uart1: get regulator failed [ 0.197799] uart uart1: uart1 supply uart not found, using dummy regulator [ 0.738850] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator [ 0.739116] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator [ 0.776756] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator [ 0.776989] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator [ 0.859395] sunxi-mmc 4020000.sdmmc: No vmmc regulator found [ 0.859400] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found [ 0.859406] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found [ 0.859411] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found [ 0.859417] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found [ 0.859422] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found [ 0.859428] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found [ 0.860313] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator [ 0.885065] sunxi-mmc 4021000.sdmmc: No vmmc regulator found [ 0.885071] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found [ 0.885076] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found [ 0.885082] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found [ 0.885088] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found [ 0.885093] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found [ 0.885099] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found [ 0.885869] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 0.912412] sunxi_get_str_of_property()1693 - failed to get the string of propname led_regulator! [ 0.985190] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator [ 0.985827] sunxi-i2c sunxi-i2c1: sunxi-i2c1 supply twi not found, using dummy regulator [ 0.987040] axp20x-i2c 1-0036: AXP20x variant AXP1530 found [ 0.987588] axp20x-i2c 1-0036: LEO smbus read 0x10 ret=31 val=0x1f [ 0.988103] axp20x-i2c 1-0036: LEO smbus read 0x13 ret=40 val=0x28 [ 0.988607] axp20x-i2c 1-0036: LEO smbus read 0x14 ret=40 val=0x28 [ 0.989112] axp20x-i2c 1-0036: LEO smbus read 0x15 ret=40 val=0x28 [ 0.989618] axp20x-i2c 1-0036: LEO smbus read 0x16 ret=13 val=0x0d [ 0.990123] axp20x-i2c 1-0036: LEO smbus read 0x17 ret=28 val=0x1c [ 0.991238] axp2101-regulator axp2101-regulator.0: LEO AXP1530 PATCH 20260607 LOADED [ 0.991252] axp2101-regulator axp2101-regulator.0: LEO AXP1530 skip dcdc freq [ 0.991790] axp2101-regulator axp2101-regulator.0: LEO AXP313A read 0x10 ret=0 val=0x1f [ 0.992300] axp2101-regulator axp2101-regulator.0: LEO AXP313A read 0x13 ret=0 val=0x28 [ 0.992808] axp2101-regulator axp2101-regulator.0: LEO AXP313A read 0x14 ret=0 val=0x28 [ 0.993313] axp2101-regulator axp2101-regulator.0: LEO AXP313A read 0x15 ret=0 val=0x28 [ 0.993817] axp2101-regulator axp2101-regulator.0: LEO AXP313A read 0x16 ret=0 val=0x0d [ 0.994361] axp2101-regulator axp2101-regulator.0: LEO AXP313A read 0x17 ret=0 val=0x1c [ 0.994420] axp20x-i2c 1-0036: Looking up vin1-supply from device tree [ 0.994443] axp20x-i2c 1-0036: Looking up vin1-supply property in node /soc@3000000/twi@2502400/pmic@36 failed [ 0.994458] dcdc1: supplied by regulator-dummy [ 0.994470] regulator-dummy: could not add device link regulator.4 err -2 [ 0.996085] axp1530-dcdc1: 500 <--> 3400 mV at 900 mV [ 0.996878] axp20x-i2c 1-0036: Looking up vin2-supply from device tree [ 0.996899] axp20x-i2c 1-0036: Looking up vin2-supply property in node /soc@3000000/twi@2502400/pmic@36 failed [ 0.996909] dcdc2: supplied by regulator-dummy [ 0.996920] regulator-dummy: could not add device link regulator.5 err -2 [ 0.998503] axp1530-dcdc2: 500 <--> 1540 mV at 900 mV [ 0.999256] axp20x-i2c 1-0036: Looking up vin3-supply from device tree [ 0.999276] axp20x-i2c 1-0036: Looking up vin3-supply property in node /soc@3000000/twi@2502400/pmic@36 failed [ 0.999286] dcdc3: supplied by regulator-dummy [ 0.999296] regulator-dummy: could not add device link regulator.6 err -2 [ 0.999883] axp1530-dcdc3: override max_uV, 1840000 -> 1540000 [ 1.000905] axp1530-dcdc3: 500 <--> 1540 mV at 900 mV [ 1.001671] axp20x-i2c 1-0036: Looking up ldo1in-supply from device tree [ 1.001691] axp20x-i2c 1-0036: Looking up ldo1in-supply property in node /soc@3000000/twi@2502400/pmic@36 failed [ 1.001702] ldo1: supplied by regulator-dummy [ 1.001713] regulator-dummy: could not add device link regulator.7 err -2 [ 1.003291] axp1530-aldo1: 500 <--> 3500 mV at 1800 mV [ 1.004160] axp20x-i2c 1-0036: Looking up ldo2in-supply from device tree [ 1.004179] axp20x-i2c 1-0036: Looking up ldo2in-supply property in node /soc@3000000/twi@2502400/pmic@36 failed [ 1.004190] ldo2: supplied by regulator-dummy [ 1.004200] regulator-dummy: could not add device link regulator.8 err -2 [ 1.005864] axp1530-dldo1: 500 <--> 3500 mV at 3300 mV [ 1.006666] probe of axp2101-regulator.0 returned 1 after 15487 usecs [ 1.007493] axp20x-i2c 1-0036: AXP20X driver loaded [ 1.547358] calling regulatory_init_db+0x0/0x90 @ 1 [ 1.547514] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 1.547524] cfg80211: failed to load regulatory.db [ 1.547606] initcall regulatory_init_db+0x0/0x90 returned 0 after 15 usecs [ 1.547640] calling regulator_init_complete+0x0/0x4c @ 1 [ 1.547653] initcall regulator_init_complete+0x0/0x4c returned 0 after 2 usecs [ 5.186353] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator root@TinaLinux:~# root@TinaLinux:~# for r in /sys/class/regulator/regulator.*; do > echo "== $r ==" > cat $r/name 2>/dev/null > cat $r/microvolts 2>/dev/null > cat $r/state 2>/dev/null > done == /sys/class/regulator/regulator.0 == regulator-dummy == /sys/class/regulator/regulator.1 == pio-18 1800000 == /sys/class/regulator/regulator.2 == pio-33 3300000 == /sys/class/regulator/regulator.3 == usb1-vbus 5000000 == /sys/class/regulator/regulator.4 == axp1530-dcdc1 900000 enabled == /sys/class/regulator/regulator.5 == axp1530-dcdc2 900000 enabled == /sys/class/regulator/regulator.6 == axp1530-dcdc3 900000 enabled == /sys/class/regulator/regulator.7 == axp1530-aldo1 1800000 enabled == /sys/class/regulator/regulator.8 == axp1530-dldo1 3300000 enabled root@TinaLinux:~# i2cset -f -y 1 0x36 0x13 0x69 root@TinaLinux:~# for r in /sys/class/regulator/regulator.*; do > echo "== $r ==" > cat $r/name 2>/dev/null > cat $r/microvolts 2>/dev/null > cat $r/state 2>/dev/null > done == /sys/class/regulator/regulator.0 == regulator-dummy == /sys/class/regulator/regulator.1 == pio-18 1800000 == /sys/class/regulator/regulator.2 == pio-33 3300000 == /sys/class/regulator/regulator.3 == usb1-vbus 5000000 == /sys/class/regulator/regulator.4 == axp1530-dcdc1 3300000 enabled == /sys/class/regulator/regulator.5 == axp1530-dcdc2 900000 enabled == /sys/class/regulator/regulator.6 == axp1530-dcdc3 900000 enabled == /sys/class/regulator/regulator.7 == axp1530-aldo1 1800000 enabled == /sys/class/regulator/regulator.8 == axp1530-dldo1 3300000 enabled root@TinaLinux:~# Read from remote host 192.168.199.179: Connection reset by peer Connection to 192.168.199.179 closed. client_loop: send disconnect: Broken pipe然后再调试boot0,这个调试过程中我发现系统原先默认的PMU接口是PL0 PL1,但是实际上我这个T113S3并没有引出这两脚,所以只能强行更改
但是 改完了以后 也不知道这个系统怎么操作pmu的似乎死活就是连接不上
,所以我直接不改了既然有完整的BOOT0代码,那么直接在boot0里面加自己程序就是最简单的,所以我就直接把自己程序加在里面了lichee/brandy-2.0/spl/nboot/main/boot0_main.c
/* * (C) Copyright 2018 * SPDX-License-Identifier: GPL-2.0+ * wangwei <wangwei@allwinnertech.com> */ /* * 当前测试用: * PB4 / PB5 / TWI1 * * normal_gpio_cfg 字段大概是: * { port, port_num, mul_sel, pull, drv_level, data, reserved[0] } * * port = 2 -> PB * port_num = 4 -> PB4 * port_num = 5 -> PB5 * mul_sel = 2 -> TWI0 复用,先按这个测 * pull = 1 -> 上拉 * reserved[0]=0 -> TWI0 bus */ #include <common.h> #include <private_boot0.h> #include <private_uboot.h> #include <private_toc.h> #include <arch/clock.h> #include <arch/uart.h> #include <arch/dram.h> #include <arch/rtc.h> #include <arch/gpio.h> #include <arch/pmic_bus.h> #include <arch/axp1530_reg.h> #define AXP313A_ADDR 0x36 #define AXP313A_OUTPUT_CONTROL 0x10 #define AXP313A_DCDC1_CONTROL 0x13 #define AXP313A_DCDC2_CONTROL 0x14 #define AXP313A_DCDC3_CONTROL 0x15 #define AXP313A_DCDC1_3V3 0x69 #define AXP313A_DCDC3_1V5 0x55 #define AXP313A_DCDC1_EN (1 << 0) #define AXP313A_DCDC2_EN (1 << 1) #define AXP313A_DCDC3_EN (1 << 2) #define LEO_AXP_ADDR 0x36 #define LEO_AXP_REG_VERSION 0x03 #define LEO_AXP_REG_OUTPUT 0x10 #define LEO_AXP_REG_DCDC1 0x13 #define LEO_AXP_REG_DCDC3 0x15 #define LEO_DCDC1_3V3 0x69 #define LEO_DCDC3_1V5 0x55 #define LEO_DCDC1_EN (1 << 0) #define LEO_DCDC3_EN (1 << 2) #define LEO_TWI1_BASE_REAL 0x02502400U static normal_gpio_cfg leo_lcd_5v_en_gpio[1] = { {5, 10, 1, 0, 2, 1, {0}}, /* PE10 output high */ }; static void leo_enable_lcd_5v_pe10(void) { //int ret; //u32 cfg1; //u32 data; printf("LEO: enable LCD/FPC 5V by PE10 high\n"); boot_set_gpio(leo_lcd_5v_en_gpio, 1, 1); mdelay(100); //cfg1 = readl(PIO_REG_CFG(5, 1)); /* PE8~PE15 在 CFG1 */ //data = readl(PIO_REG_DATA(5)); //printf("LEO: PE10 enable ret=%d PE_CFG1=0x%x PE10_mux=%d PE_DATA=0x%x PE10=%d\n", // ret, // cfg1, // (cfg1 >> 8) & 0xf, // data, // (data >> 10) & 1); } //extern int i2c_has_init; //extern normal_gpio_cfg *twi_gpio; //extern int i2c_read(unsigned char chip, unsigned int addr, int alen, // unsigned char *buffer, int len); //extern int i2c_write(unsigned char chip, unsigned int addr, int alen, // unsigned char *buffer, int len); static void update_uboot_info(phys_addr_t uboot_base, phys_addr_t optee_base, phys_addr_t monitor_base, phys_addr_t rtos_base, u32 dram_size, u16 pmu_type, u16 uart_input, u16 key_input); static int boot0_clear_env(void); static void print_commit_log(void) { printf("HELLO! BOOT0 is starting!\n"); printf("BOOT0 commit : %s\n", BT0_head.hash); sunxi_set_printf_debug_mode(BT0_head.prvt_head.debug_mode, 0); } static void leo_axp313_init_pmic(void) { int ret; u8 val = 0; u8 out = 0; //printf("LEO: axp313 init point before DRAM\n"); /* * 这里不要用 AXP313A_ADDR 乱写了, * 直接用系统现成的 AXP1530_DEVICE_ADDR / AXP1530_RUNTIME_ADDR。 * CFG_SUNXI_TWI 下 runtime addr 就是 0x36。 */ ret = pmic_bus_init(AXP1530_DEVICE_ADDR, AXP1530_RUNTIME_ADDR); printf("LEO: pmic_bus_init ret=%d\n", ret); /* * 先确认 PMIC 已经能访问。 */ ret = pmic_bus_read(AXP1530_RUNTIME_ADDR, AXP1530_OUTPUT_POWER_ON_OFF_CTL, &out); //printf("LEO: read output 0x10 ret=%d val=0x%x\n", ret, out); if (ret) { printf("LEO: AXP read failed, skip voltage config\n"); return; } ret = pmic_bus_read(AXP1530_RUNTIME_ADDR, AXP1530_DC1OUT_VOL, &val); printf("LEO: read DCDC1 0x13 ret=%d val=0x%x\n", ret, val); ret = pmic_bus_read(AXP1530_RUNTIME_ADDR, AXP1530_DC3OUT_VOL, &val); printf("LEO: read DCDC3 0x15 ret=%d val=0x%x\n", ret, val); /* * DCDC1 = 3.3V * AXP1530/AXP313 这套表里: * 1600mV~3400mV 以 100mV 步进。 * 3.3V 对应 0x28。 * * 0x69 就是 3.3V。 */ ret = pmic_bus_write(AXP1530_RUNTIME_ADDR, AXP1530_DC1OUT_VOL, 0x69); //printf("LEO: write DCDC1 3.3V ret=%d\n", ret); if (ret) { return; } mdelay(2); ret = pmic_bus_read(AXP1530_RUNTIME_ADDR, AXP1530_DC1OUT_VOL, &val); printf("LEO: DCDC1 immediately after write ret=%d val=0x%x\n", ret, val); if (ret) { return; } /* * DCDC3 = 1.5V * 1220mV~1540mV 以 20mV 步进。 * 1.5V = 1220 + 14*20,所以寄存器值是前段累计 + 14。 * 你的 Linux 现在也是 0x28,实际显示 DCDC3 at 900mV, * 这里先不要盲目写 0x55,0x55 很可能超范围/不符合这颗芯片表。 * * 如果只是验证,不建议立刻改 DCDC3。 * 真要设置 1.5V,建议调用系统已有 axp1530_set_ddr_voltage(1500)。 */ ret = axp1530_set_ddr_voltage(1500); //printf("LEO: set DCDC3 1.5V ret=%d\n", ret); if (ret) return; /* * 使能 DCDC1 和 DCDC3。 * 不能直接写固定值,要保留其他 rail。 */ ret = pmic_bus_read(AXP1530_RUNTIME_ADDR, AXP1530_OUTPUT_POWER_ON_OFF_CTL, &out); //printf("LEO: read output before enable ret=%d val=0x%x\n", ret, out); if (ret) return; out |= (1 << 0); /* DCDC1 enable */ out |= (1 << 2); /* DCDC3 enable */ ret = pmic_bus_write(AXP1530_RUNTIME_ADDR, AXP1530_OUTPUT_POWER_ON_OFF_CTL, out); //printf("LEO: write output enable ret=%d val=0x%x\n", ret, out); if (ret) return; mdelay(10); ret = pmic_bus_read(AXP1530_RUNTIME_ADDR, AXP1530_OUTPUT_POWER_ON_OFF_CTL, &out); //printf("LEO: output after ret=%d val=0x%x\n", ret, out); ret = pmic_bus_read(AXP1530_RUNTIME_ADDR, AXP1530_DC1OUT_VOL, &val); //printf("LEO: DCDC1 after ret=%d val=0x%x\n", ret, val); ret = pmic_bus_read(AXP1530_RUNTIME_ADDR, AXP1530_DC3OUT_VOL, &val); printf("LEO: DCDC3 after ret=%d val=0x%x\n", ret, val); printf("LEO: axp313 voltage config done\n"); } void main(void) { int dram_size; int status; phys_addr_t uboot_base = 0, optee_base = 0, monitor_base = 0, \ rtos_base = 0, opensbi_base = 0; u16 pmu_type = 0, key_input = 0; /* TODO: set real value */ sunxi_board_init_early(); sunxi_serial_init(BT0_head.prvt_head.uart_port, (void *)BT0_head.prvt_head.uart_ctrl, 6); print_commit_log(); status = sunxi_board_init(); if (status) goto _BOOT_ERROR; leo_enable_lcd_5v_pe10(); //leo_axp313_gpio_i2c_init(); leo_axp313_init_pmic(); if (rtc_probe_fel_flag()) { rtc_clear_fel_flag(); goto _BOOT_ERROR; #ifdef CFG_SUNXI_PHY_KEY } else if (check_update_key(&key_input)) { goto _BOOT_ERROR; #endif } if (BT0_head.prvt_head.enable_jtag) { printf("enable_jtag\n"); boot_set_gpio((normal_gpio_cfg *)BT0_head.prvt_head.jtag_gpio, 5, 1); } char uart_input_value = get_uart_input(); if (uart_input_value == '2') { sunxi_set_printf_debug_mode(3, 0); printf("detected user input 2\n"); goto _BOOT_ERROR; } else if (uart_input_value == 'd') { sunxi_set_printf_debug_mode(8, 1); printf("detected user input d\n"); } else if (uart_input_value == 'q') { printf("detected user input q\n"); sunxi_set_printf_debug_mode(0, 1); } #ifdef FPGA_PLATFORM dram_size = mctl_init((void *)BT0_head.prvt_head.dram_para); #else dram_size = init_DRAM(0, (void *)BT0_head.prvt_head.dram_para); #endif if (!dram_size) { printf("init dram fail\n"); goto _BOOT_ERROR; } else { printf("dram size =%d\n", dram_size); } mmu_enable(dram_size); malloc_init(CONFIG_HEAP_BASE, CONFIG_HEAP_SIZE); status = sunxi_board_late_init(); if (status) goto _BOOT_ERROR; status = load_package(); if (status == 0) load_image(&uboot_base, &optee_base, &monitor_base, &rtos_base, &opensbi_base); else goto _BOOT_ERROR; update_uboot_info(uboot_base, optee_base, monitor_base, rtos_base, dram_size, pmu_type, uart_input_value, key_input); mmu_disable( ); printf("Jump to second Boot.\n"); if (opensbi_base) { boot0_jmp_opensbi(opensbi_base, uboot_base); } else if (monitor_base) { struct spare_monitor_head *monitor_head = (struct spare_monitor_head *)((phys_addr_t)monitor_base); monitor_head->secureos_base = optee_base; monitor_head->nboot_base = uboot_base; boot0_jmp_monitor(monitor_base); } else if (optee_base) boot0_jmp_optee(optee_base, uboot_base); else if (rtos_base) { printf("jump to rtos\n"); boot0_jmp(rtos_base); } else boot0_jmp(uboot_base); while(1); _BOOT_ERROR: boot0_clear_env(); boot0_jmp(FEL_BASE); } static void update_uboot_info(phys_addr_t uboot_base, phys_addr_t optee_base, phys_addr_t monitor_base, phys_addr_t rtos_base, u32 dram_size, u16 pmu_type, u16 uart_input, u16 key_input) { if (rtos_base) return; uboot_head_t *header = (uboot_head_t *) uboot_base; struct sbrom_toc1_head_info *toc1_head = (struct sbrom_toc1_head_info *)CONFIG_BOOTPKG_BASE; header->boot_data.boot_package_size = toc1_head->valid_len; header->boot_data.dram_scan_size = dram_size; memcpy((void *)header->boot_data.dram_para, &BT0_head.prvt_head.dram_para, 32 * sizeof(int)); if (monitor_base) header->boot_data.monitor_exist = 1; if (optee_base) header->boot_data.secureos_exist = 1; #ifndef CONFIG_RISCV header->boot_data.func_mask |= get_uboot_func_mask(UBOOT_FUNC_MASK_ALL); #endif update_flash_para(uboot_base); header->boot_data.pmu_type = pmu_type; header->boot_data.uart_input = uart_input; header->boot_data.key_input = key_input; header->boot_data.debug_mode = sunxi_get_debug_mode_for_uboot(); } static int boot0_clear_env(void) { sunxi_board_exit(); sunxi_board_clock_reset(); mmu_disable(); mdelay(10); return 0; }还需要改的是i2c.c
/lichee/brandy-2.0/spl/drivers/i2c.c/* * (C) Copyright 2016 * SPDX-License-Identifier: GPL-2.0+ *Allwinner Technology Co., Ltd. <www.allwinnertech.com> *weidonghui <weidonghui@allwinnertech.com> * */ #include <common.h> #include <errno.h> #include <asm/io.h> #include <arch/i2c.h> #include <arch/gpio.h> #include <arch/clock.h> #include <private_boot0.h> #define I2C_WRITE 0 #define I2C_READ 1 #define I2C_OK 0 #define I2C_NOK 1 #define I2C_NACK 2 #define I2C_NOK_LA 3 /* Lost arbitration */ #define I2C_NOK_TOUT 4 /* time out */ #define I2C_START_TRANSMIT 0x08 #define I2C_RESTART_TRANSMIT 0x10 #define I2C_ADDRWRITE_ACK 0x18 #define I2C_ADDRREAD_ACK 0x40 #define I2C_DATAWRITE_ACK 0x28 #define I2C_READY 0xf8 #define I2C_DATAREAD_NACK 0x58 #define I2C_DATAREAD_ACK 0x50 normal_gpio_cfg *twi_gpio; int i2c_has_init; #if defined(CONFIG_ARCH_SUN50IW10) normal_gpio_cfg i2c_gpio[4] = { {12, 0, 2, 1, 0, 0, {SUNXI_PHY_R_I2C0} }, /* PL0: 2--SCK */ {12, 1, 2, 1, 0, 0, {SUNXI_PHY_R_I2C0} }, /* PL1: 2--SDA */ }; #elif defined(CONFIG_ARCH_SUN8IW11) normal_gpio_cfg i2c_gpio[4] = { {2, 0, 2, 1, 0, 0, {SUNXI_PHY_R_I2C0} }, /* pb0: 2--sck */ {2, 1, 2, 1, 0, 0, {SUNXI_PHY_R_I2C0} }, /* pb1: 2--sda */ }; #else //系统默认 //normal_gpio_cfg i2c_gpio[4] = { // {12, 0, 3, 1, 0, 0, {SUNXI_PHY_R_I2C0} }, /* pl0: 3--sck */ // {12, 1, 3, 1, 0, 0, {SUNXI_PHY_R_I2C0} }, /* pl1: 3--sda */ //}; //leo change normal_gpio_cfg i2c_gpio[4] = { {2, 4, 4, 1, 0, 0, {1} }, /* PB4: mux4 -- TWI1 SCK/SCL */ {2, 5, 4, 1, 0, 0, {1} }, /* PB5: mux4 -- TWI1 SDA */ }; #endif /* status or interrupt source */ /*------------------------------------------------------------------------------ * Code Status * 00h Bus error * 08h START condition transmitted * 10h Repeated START condition transmitted * 18h Address + Write bit transmitted, ACK received * 20h Address + Write bit transmitted, ACK not received * 28h Data byte transmitted in master mode, ACK received * 30h Data byte transmitted in master mode, ACK not received * 38h Arbitration lost in address or data byte * 40h Address + Read bit transmitted, ACK received * 48h Address + Read bit transmitted, ACK not received * 50h Data byte received in master mode, ACK transmitted * 58h Data byte received in master mode, not ACK transmitted * 60h Slave address + Write bit received, ACK transmitted * 68h Arbitration lost in address as master, slave address + Write bit received, ACK transmitted * 70h General Call address received, ACK transmitted * 78h Arbitration lost in address as master, General Call address received, ACK transmitted * 80h Data byte received after slave address received, ACK transmitted * 88h Data byte received after slave address received, not ACK transmitted * 90h Data byte received after General Call received, ACK transmitted * 98h Data byte received after General Call received, not ACK transmitted * A0h STOP or repeated START condition received in slave mode * A8h Slave address + Read bit received, ACK transmitted * B0h Arbitration lost in address as master, slave address + Read bit received, ACK transmitted * B8h Data byte transmitted in slave mode, ACK received * C0h Data byte transmitted in slave mode, ACK not received * C8h Last byte transmitted in slave mode, ACK received * D0h Second Address byte + Write bit transmitted, ACK received * D8h Second Address byte + Write bit transmitted, ACK not received * F8h No relevant status information or no interrupt *-----------------------------------------------------------------------------*/ static struct sunxi_twi_reg *i2c; static void i2c_debug(void) { i2c_info("i2c->addr :\t0x%x:0x%x\n", &i2c->addr, i2c->addr); i2c_info("i2c->xaddr :\t0x%x:0x%x\n", &i2c->xaddr, i2c->xaddr); i2c_info("i2c->data :\t0x%x:0x%x\n", &i2c->data, i2c->data); i2c_info("i2c->ctl :\t0x%x:0x%x\n", &i2c->ctl, i2c->ctl); i2c_info("i2c->status:\t0x%x:0x%x\n", &i2c->status, i2c->status); i2c_info("i2c->clk :\t0x%x:0x%x\n", &i2c->clk, i2c->clk); i2c_info("i2c->srst :\t0x%x:0x%x\n", &i2c->srst, i2c->srst); i2c_info("i2c->eft :\t0x%x:0x%x\n", &i2c->eft, i2c->eft); i2c_info("i2c->lcr :\t0x%x:0x%x\n", &i2c->lcr, i2c->lcr); i2c_info("i2c->dvfs :\t0x%x:0x%x\n", &i2c->dvfs, i2c->dvfs); } static __s32 i2c_sendbyteaddr(__u32 byteaddr) { __s32 time = 0xffff; __u32 tmp_val; i2c->data = byteaddr & 0xff; i2c->ctl |= (0x01 << 3); /*write 1 to clean int flag*/ while ((time--) && (!(i2c->ctl & 0x08))) ; if (time <= 0) { return -I2C_NOK_TOUT; } tmp_val = i2c->status; i2c_debug(); if (tmp_val != I2C_DATAWRITE_ACK) { return -I2C_DATAWRITE_ACK; } return I2C_OK; } static __s32 i2c_sendstart(void) { __s32 time = 0xffff; __u32 tmp_val; i2c->eft = 0; //leo tmp //i2c->srst = 1; i2c->ctl |= TWI_CTL_STA; while ((time--) && (!(i2c->ctl & TWI_CTL_INTFLG))) ; if (time <= 0) { return -I2C_NOK_TOUT; } tmp_val = i2c->status; if (tmp_val != I2C_START_TRANSMIT) { return -I2C_START_TRANSMIT; } return I2C_OK; } static __s32 i2c_sendslaveaddr(__u32 saddr, __u32 rw) { __s32 time = 0xffff; __u32 tmp_val; rw &= 1; i2c->data = ((saddr & 0xff) << 1) | rw; i2c->ctl |= TWI_CTL_INTFLG; /*write 1 to clean int flag*/ while ((time--) && (!(i2c->ctl & TWI_CTL_INTFLG))) ; if (time <= 0) { // printf("LEO: sendslave timeout addr=0x%x rw=%d ctl=0x%x status=0x%x\n", // saddr, rw, i2c->ctl, i2c->status); return -I2C_NOK_TOUT; } tmp_val = i2c->status; //printf("LEO: sendslave addr=0x%x rw=%d data=0x%x status=0x%x ctl=0x%x\n", // saddr, rw, i2c->data, tmp_val, i2c->ctl); if (rw == I2C_WRITE) /*+write*/ { if (tmp_val != I2C_ADDRWRITE_ACK) { //printf("LEO: SLA+W failed, status=0x%x expected=0x18\n", tmp_val); return -I2C_ADDRWRITE_ACK; } } else /*+read*/ { if (tmp_val != I2C_ADDRREAD_ACK) { //printf("LEO: SLA+R failed, status=0x%x expected=0x40\n", tmp_val); return -I2C_ADDRREAD_ACK; } } i2c_debug(); return I2C_OK; } static __s32 i2c_sendRestart(void) { __s32 time = 0xffff; __u32 tmp_val; tmp_val = i2c->ctl; tmp_val |= 0x20; i2c->ctl = tmp_val; while ((time--) && (!(i2c->ctl & 0x08))) ; if (time <= 0) { return -I2C_NOK_TOUT; } tmp_val = i2c->status; if (tmp_val != I2C_RESTART_TRANSMIT) { return -I2C_RESTART_TRANSMIT; } return I2C_OK; } static __s32 i2c_stop(void) { __s32 time = 0xffff; __u32 tmp_val; i2c->ctl |= (0x01 << 4); i2c->ctl |= (0x01 << 3); while ((time--) && (i2c->ctl & 0x10)) ; if (time <= 0) { return -I2C_NOK_TOUT; } time = 0xffff; while ((time--) && (i2c->status != I2C_READY)) ; tmp_val = i2c->status; if (tmp_val != I2C_READY) { return -I2C_NOK_TOUT; } return I2C_OK; } static __s32 i2c_getdata(__u8 *data_addr, __u32 data_count) { __s32 time = 0xffff; __u32 tmp_val; __u32 i; if (data_count == 1) { i2c->ctl |= (0x01 << 3); while ((time--) && (!(i2c->ctl & 0x08))) ; if (time <= 0) { return -I2C_NOK_TOUT; } for (time = 0; time < 100; time++) ; *data_addr = i2c->data; tmp_val = i2c->status; if (tmp_val != I2C_DATAREAD_NACK) { return -I2C_DATAREAD_NACK; } } else { for (i = 0; i < data_count - 1; i++) { time = 0xffff; /*host should send ack every time when a data packet finished*/ tmp_val = i2c->ctl | (0x01 << 2); tmp_val = i2c->ctl | (0x01 << 3); tmp_val |= 0x04; i2c->ctl = tmp_val; /*i2c->ctl |=(0x01<<3);*/ while ((time--) && (!(i2c->ctl & 0x08))) ; if (time <= 0) { return -I2C_NOK_TOUT; } for (time = 0; time < 100; time++) ; time = 0xffff; data_addr[i] = i2c->data; while ((time--) && (i2c->status != I2C_DATAREAD_ACK)) ; if (time <= 0) { return -I2C_NOK_TOUT; } } time = 0xffff; i2c->ctl &= 0xFb; /*the last data packet,not send ack*/ i2c->ctl |= (0x01 << 3); while ((time--) && (!(i2c->ctl & 0x08))) ; if (time <= 0) { return -I2C_NOK_TOUT; } for (time = 0; time < 100; time++) ; data_addr[data_count - 1] = i2c->data; while ((time--) && (i2c->status != I2C_DATAREAD_NACK)) ; if (time <= 0) { return -I2C_NOK_TOUT; } } return I2C_OK; } int i2c_read(u8 chip, uint addr, int alen, u8 *buffer, int len) { int i, ret, addrlen; char *slave_reg; if (!i2c_has_init) { return -I2C_NOK_TOUT; } ret = i2c_sendstart(); if (ret) { goto i2c_read_err_occur; } ret = i2c_sendslaveaddr(chip, I2C_WRITE); if (ret) { goto i2c_read_err_occur; } /*send byte address*/ if (alen >= 3) { addrlen = 2; } else if (alen <= 1) { addrlen = 0; } else { addrlen = 1; } slave_reg = (char *)&addr; for (i = addrlen; i >= 0; i--) { ret = i2c_sendbyteaddr(slave_reg[i] & 0xff); if (ret) { goto i2c_read_err_occur; } } ret = i2c_sendRestart(); if (ret) { goto i2c_read_err_occur; } ret = i2c_sendslaveaddr(chip, I2C_READ); if (ret) { goto i2c_read_err_occur; } /*get data*/ ret = i2c_getdata(buffer, len); if (ret) { goto i2c_read_err_occur; } i2c_read_err_occur: i2c_stop(); return ret; } static __s32 i2c_senddata(__u8 *data_addr, __u32 data_count) { __s32 time = 0xffff; __u32 i; for (i = 0; i < data_count; i++) { time = 0xffff; i2c->data = data_addr[i]; #if defined(CONFIG_ARCH_SUN5I) || defined(CONFIG_ARCH_SUN7I) i2c->ctl &= 0xF7; #else i2c->ctl |= (0x01 << 3); #endif while ((time--) && (!(i2c->ctl & 0x08))) ; if (time <= 0) { return -I2C_NOK_TOUT; } time = 0xffff; while ((time--) && (i2c->status != I2C_DATAWRITE_ACK)) { ; } if (time <= 0) { return -I2C_NOK_TOUT; } } return I2C_OK; } int i2c_write(u8 chip, uint addr, int alen, u8 *buffer, int len) { int i, ret, ret0, addrlen; char *slave_reg; if (!i2c_has_init) { return -I2C_NOK_TOUT; } ret0 = -1; ret = i2c_sendstart(); if (ret) { goto i2c_write_err_occur; } ret = i2c_sendslaveaddr(chip, I2C_WRITE); if (ret) { goto i2c_write_err_occur; } /*send byte address*/ if (alen >= 3) { addrlen = 2; } else if (alen <= 1) { addrlen = 0; } else { addrlen = 1; } slave_reg = (char *)&addr; for (i = addrlen; i >= 0; i--) { ret = i2c_sendbyteaddr(slave_reg[i] & 0xff); if (ret) { goto i2c_write_err_occur; } } ret = i2c_senddata(buffer, len); if (ret) { goto i2c_write_err_occur; } ret0 = 0; i2c_write_err_occur: i2c_stop(); return ret0; } int axp_i2c_write(unsigned char chip, unsigned char addr, unsigned char data) { return i2c_write(chip, addr, 1, &data, 1); } int axp_i2c_read(unsigned char chip, unsigned char addr, unsigned char *buffer) { return i2c_read(chip, addr, 1, buffer, 1); } void i2c_set_clock(int speed, int slaveaddr) { int i, clk_n, clk_m, pow_2_clk_n; /* reset i2c control */ i = 0xffff; i2c->srst = 1; while ((i2c->srst) && (i)) { i--; } if ((i2c->lcr & 0x30) != 0x30) { /* toggle I2C SCL and SDA until bus idle */ i2c->lcr = 0x05; udelay(500); i = 10; while ((i > 0) && ((i2c->lcr & 0x02) != 2)) { /*control scl and sda output high level*/ i2c->lcr |= 0x08; i2c->lcr |= 0x02; udelay(1000); /*control scl and sda output low level*/ i2c->lcr &= ~0x08; i2c->lcr &= ~0x02; udelay(1000); i--; } i2c->lcr = 0x0; udelay(500); } speed /= 1000; /*khz*/ if (speed < 100) speed = 100; else if (speed > 400) speed = 400; /*Foscl=24000/(2^CLK_N*(CLK_M+1)*10)*/ clk_n = (speed == 100) ? 1 : 0; pow_2_clk_n = 1; for (i = 0; i < clk_n; ++i) pow_2_clk_n *= 2; clk_m = (24000 / 10) / (pow_2_clk_n * speed) - 1; i2c->clk = (clk_m << 3) | clk_n; i2c->ctl |= 0x40; i2c->eft = 0; i2c_debug(); //printf("LEO: final lcr=0x%x lcr&0x30=0x%x\n", // i2c->lcr, i2c->lcr & 0x30); } static void sunxi_i2c_bus_setting(u32 i2c_base, int onoff) { int reg_value = 0; struct sunxi_ccm_reg *const ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; u32 bus_num = (i2c_base - SUNXI_TWI0_BASE)/0x400; if (bus_num <= 5) { #if defined(CONFIG_SUNXI_VERSION1) if (onoff) { //de-assert reg_value = readl(&ccm->apb2_reset_cfg); reg_value |= (1 << bus_num); writel(reg_value, &ccm->apb2_reset_cfg); //gating clock pass reg_value = readl(&ccm->apb2_gate); reg_value &= ~(1 << bus_num); writel(reg_value, &ccm->apb2_gate); mdelay(1); reg_value |= (1 << bus_num); writel(reg_value, &ccm->apb2_gate); } else { //gating clock mask reg_value = readl(&ccm->apb2_gate); reg_value &= ~(1 << bus_num); writel(reg_value, &ccm->apb2_gate); //assert reg_value = readl(&ccm->apb2_reset_cfg); reg_value &= ~(1 << bus_num); writel(reg_value, &ccm->apb2_reset_cfg); } #else if (onoff) { //de-assert reg_value = readl(&ccm->twi_gate_reset); reg_value |= (1 << (16 + bus_num)); writel(reg_value, &ccm->twi_gate_reset); //gating clock pass reg_value = readl(&ccm->twi_gate_reset); reg_value &= ~(1 << bus_num); writel(reg_value, &ccm->twi_gate_reset); mdelay(1); reg_value |= (1 << bus_num); writel(reg_value, &ccm->twi_gate_reset); } else { //gating clock mask reg_value = readl(&ccm->twi_gate_reset); reg_value &= ~(1 << bus_num); writel(reg_value, &ccm->twi_gate_reset); //assert reg_value = readl(&ccm->twi_gate_reset); reg_value &= ~(1 << (16 + bus_num)); writel(reg_value, &ccm->twi_gate_reset); } #endif } else { int r_bus_num = (i2c_base - SUNXI_RTWI_BASE)/0x400; if (onoff) { /*de-assert*/ reg_value = readl(SUNXI_RTWI_BRG_REG); reg_value &= ~(1 << (16 + r_bus_num)); writel(reg_value, SUNXI_RTWI_BRG_REG); reg_value = readl(SUNXI_RTWI_BRG_REG); reg_value |= (1 << (16 + r_bus_num)); writel(reg_value, SUNXI_RTWI_BRG_REG); /*gating clock pass*/ reg_value = readl(SUNXI_RTWI_BRG_REG); reg_value &= ~(1 << r_bus_num); writel(reg_value, SUNXI_RTWI_BRG_REG); mdelay(1); reg_value |= (1 << r_bus_num); writel(reg_value, SUNXI_RTWI_BRG_REG); } else { /*gating clock mask*/ reg_value = readl(SUNXI_RTWI_BRG_REG); reg_value &= ~(1 << r_bus_num); writel(reg_value, SUNXI_RTWI_BRG_REG); /*assert*/ reg_value = readl(SUNXI_RTWI_BRG_REG); reg_value &= ~(1 << (16 + r_bus_num)); writel(reg_value, SUNXI_RTWI_BRG_REG); } } } /* normal_gpio_cfg *get_i2c_gpio(void) { normal_gpio_cfg *boot_i2c_gpio, *temp_gpio; #ifdef CFG_SUNXI_SBOOT boot_i2c_gpio = (normal_gpio_cfg *)sboot_head.i2c_gpio; #elif CFG_SUNXI_FES boot_i2c_gpio = (normal_gpio_cfg *)fes1_head.i2c_gpio; #else boot_i2c_gpio = (normal_gpio_cfg *)BT0_head.i2c_gpio; #endif if (boot_i2c_gpio->port == 0) { // // Setting a non-existent i2c pin // will cause a very long timeout waiting // so enable CFG_SUNXI_AUTO_TWI // #ifdef CFG_SUNXI_AUTO_TWI temp_gpio = NULL; #else temp_gpio = i2c_gpio; #endif } else { temp_gpio = boot_i2c_gpio; } return temp_gpio; } */ normal_gpio_cfg *get_i2c_gpio(void) { normal_gpio_cfg *boot_i2c_gpio, *temp_gpio; const char *src = "unknown"; #ifdef CFG_SUNXI_SBOOT boot_i2c_gpio = (normal_gpio_cfg *)sboot_head.i2c_gpio; src = "sboot_head.i2c_gpio"; #elif CFG_SUNXI_FES boot_i2c_gpio = (normal_gpio_cfg *)fes1_head.i2c_gpio; src = "fes1_head.i2c_gpio"; #else boot_i2c_gpio = (normal_gpio_cfg *)BT0_head.i2c_gpio; src = "BT0_head.i2c_gpio"; #endif printf("LEO: get_i2c_gpio boot source=%s\n", src); printf("LEO: boot_i2c_gpio0 port=%d num=%d mul=%d pull=%d drv=%d data=%d bus=%d\n", boot_i2c_gpio[0].port, boot_i2c_gpio[0].port_num, boot_i2c_gpio[0].mul_sel, boot_i2c_gpio[0].pull, boot_i2c_gpio[0].drv_level, boot_i2c_gpio[0].data, boot_i2c_gpio[0].reserved[0]); printf("LEO: boot_i2c_gpio1 port=%d num=%d mul=%d pull=%d drv=%d data=%d bus=%d\n", boot_i2c_gpio[1].port, boot_i2c_gpio[1].port_num, boot_i2c_gpio[1].mul_sel, boot_i2c_gpio[1].pull, boot_i2c_gpio[1].drv_level, boot_i2c_gpio[1].data, boot_i2c_gpio[1].reserved[0]); printf("LEO: fallback i2c_gpio0 port=%d num=%d mul=%d pull=%d drv=%d data=%d bus=%d\n", i2c_gpio[0].port, i2c_gpio[0].port_num, i2c_gpio[0].mul_sel, i2c_gpio[0].pull, i2c_gpio[0].drv_level, i2c_gpio[0].data, i2c_gpio[0].reserved[0]); printf("LEO: fallback i2c_gpio1 port=%d num=%d mul=%d pull=%d drv=%d data=%d bus=%d\n", i2c_gpio[1].port, i2c_gpio[1].port_num, i2c_gpio[1].mul_sel, i2c_gpio[1].pull, i2c_gpio[1].drv_level, i2c_gpio[1].data, i2c_gpio[1].reserved[0]); if (boot_i2c_gpio->port == 0) { /* * Setting a non-existent i2c pin * will cause a very long timeout waiting * so enable CFG_SUNXI_AUTO_TWI */ #ifdef CFG_SUNXI_AUTO_TWI printf("LEO: boot_i2c_gpio port=0, CFG_SUNXI_AUTO_TWI enabled, force fallback i2c_gpio[]\n"); temp_gpio = i2c_gpio; #else printf("LEO: boot_i2c_gpio port=0, use fallback i2c_gpio[]\n"); temp_gpio = i2c_gpio; #endif } else { printf("LEO: boot_i2c_gpio port!=0, use boot header i2c_gpio\n"); temp_gpio = boot_i2c_gpio; } if (temp_gpio) { /* printf("LEO: selected_i2c_gpio0 port=%d num=%d mul=%d pull=%d drv=%d data=%d bus=%d\n", temp_gpio[0].port, temp_gpio[0].port_num, temp_gpio[0].mul_sel, temp_gpio[0].pull, temp_gpio[0].drv_level, temp_gpio[0].data, temp_gpio[0].reserved[0]); printf("LEO: selected_i2c_gpio1 port=%d num=%d mul=%d pull=%d drv=%d data=%d bus=%d\n", temp_gpio[1].port, temp_gpio[1].port_num, temp_gpio[1].mul_sel, temp_gpio[1].pull, temp_gpio[1].drv_level, temp_gpio[1].data, temp_gpio[1].reserved[0]); */ } else { // printf("LEO: selected_i2c_gpio = NULL\n"); } return temp_gpio; } void i2c_init(ulong i2c_base, int speed, int slaveaddr) { u32 cfg0; u32 pull0; u32 dlevel0; u32 data; struct sunxi_ccm_reg *const ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; printf("LEO: i2c_init base=0x%x speed=%d slaveaddr=0x%x\n", i2c_base, speed, slaveaddr); i2c = (struct sunxi_twi_reg *)i2c_base; printf("LEO: twi_gate_reset before=0x%x\n", readl(&ccm->twi_gate_reset)); // 先配置 PB4/PB5 mux4。 // 当前 twi_gpio 已经由 get_i2c_gpio() 选成 fallback i2c_gpio[]。 boot_set_gpio(twi_gpio, 2, 1); cfg0 = readl(PIO_REG_CFG(2, 0)); pull0 = readl(PIO_REG_PULL(2, 0)); dlevel0 = readl(PIO_REG_DLEVEL(2, 0)); data = readl(PIO_REG_DATA(2)); printf("LEO: after gpio PB_CFG0=0x%x PB4_mux=%d PB5_mux=%d\n", cfg0, (cfg0 >> 16) & 0xf, (cfg0 >> 20) & 0xf); printf("LEO: after gpio PB_PULL0=0x%x PB4_pull=%d PB5_pull=%d\n", pull0, (pull0 >> 8) & 0x3, (pull0 >> 10) & 0x3); printf("LEO: after gpio PB_DLEVEL0=0x%x PB4_drv=%d PB5_drv=%d\n", dlevel0, (dlevel0 >> 8) & 0x3, (dlevel0 >> 10) & 0x3); printf("LEO: after gpio PB_DATA=0x%x PB4=%d PB5=%d\n", data, (data >> 4) & 1, (data >> 5) & 1); // 再开 TWI1 clock/reset。 sunxi_i2c_bus_setting(i2c_base, 1); printf("LEO: twi_gate_reset after=0x%x\n", readl(&ccm->twi_gate_reset)); i2c_set_clock(speed, slaveaddr); //printf("LEO: TWI regs after set_clock ctl=0x%x clk=0x%x srst=0x%x eft=0x%x status=0x%x lcr=0x%x\n", // i2c->ctl, // i2c->clk, // i2c->srst, // i2c->eft, // i2c->status, // i2c->lcr); } /*old void i2c_init(ulong i2c_base, int speed, int slaveaddr) { i2c = (struct sunxi_twi_reg *)i2c_base; boot_set_gpio(twi_gpio, 2, 1); sunxi_i2c_bus_setting(i2c_base, 1); i2c_set_clock(speed, slaveaddr); } */ /* void i2c_init_cpus(int speed, int slaveaddr) { printf("LEO: i2c_init_cpus enter speed=%d slaveaddr=0x%x has_init=%d\n", speed, slaveaddr, i2c_has_init); if (!i2c_has_init) { twi_gpio = get_i2c_gpio(); if (twi_gpio != NULL) { i2c_init(twi_gpio[0].reserved[0] != SUNXI_PHY_R_I2C0 ? (SUNXI_TWI0_BASE + 0x400 * twi_gpio[0].reserved[0]) : (SUNXI_RTWI_BASE + 0x400 * (twi_gpio[0].reserved[0] - SUNXI_PHY_R_I2C0)), speed, slaveaddr); i2c_has_init = 1; printf("LEO: i2c_init_cpus done has_init=%d\n", i2c_has_init); } else { i2c_has_init = 0; printf("LEO: i2c_init_cpus twi_gpio NULL, init skipped\n"); } }else{ printf("LEO: i2c_init_cpus skipped, already has_init=1\n"); } return; } */ void i2c_init_cpus(int speed, int slaveaddr) { //printf("LEO: i2c_init_cpus enter speed=%d slaveaddr=0x%x has_init=%d\n", // speed, slaveaddr, i2c_has_init); speed = 100000; //printf("LEO: force i2c speed=%d\n", speed); if (!i2c_has_init) { ulong base; twi_gpio = get_i2c_gpio(); if (twi_gpio != NULL) { base = (twi_gpio[0].reserved[0] != SUNXI_PHY_R_I2C0 ? (SUNXI_TWI0_BASE + 0x400 * twi_gpio[0].reserved[0]) : (SUNXI_RTWI_BASE + 0x400 * (twi_gpio[0].reserved[0] - SUNXI_PHY_R_I2C0))); //printf("LEO: i2c_init_cpus selected base=0x%x bus=%d\n", // base, twi_gpio[0].reserved[0]); i2c_init(base, speed, slaveaddr); i2c_has_init = 1; //printf("LEO: i2c_init_cpus done has_init=%d\n", i2c_has_init); } else { //printf("LEO: i2c_init_cpus twi_gpio NULL, init skipped\n"); i2c_has_init = 0; } } else { //printf("LEO: i2c_init_cpus skipped, already has_init=%d\n", // i2c_has_init); } return; } void i2c_exit(void) { int i; u32 i2c_base; if (i2c_has_init) { twi_gpio = get_i2c_gpio(); i2c_base = (twi_gpio[0].reserved[0] != SUNXI_PHY_R_I2C0 ? (SUNXI_TWI0_BASE + 0x400 * twi_gpio[0].reserved[0]) : (SUNXI_RTWI_BASE + 0x400 * (twi_gpio[0].reserved[0] - SUNXI_PHY_R_I2C0))); sunxi_i2c_bus_setting(i2c_base, 0); for (i = 0; i < 2; i++) { twi_gpio[i].mul_sel = 0x0; twi_gpio[i].pull = 0; twi_gpio[i].drv_level = 0x0; } boot_set_gpio(twi_gpio, 2, 1); i2c_has_init = 0; } }改好以后boot0 那个pmu就不用管它了,反正自己的程序也能配置好AXP313
[28]HELLO! BOOT0 is starting! [31]BOOT0 commit : [33]set pll start [39]periph0 has been enabled [42]set pll end [44]LEO: get_i2c_gpio boot source=BT0_head.i2c_gpio [48]LEO: boot_i2c_gpio0 port=0 num=0 mul=0 pull=0 drv=0 data=0 bus=0 [55]LEO: boot_i2c_gpio1 port=0 num=0 mul=0 pull=0 drv=0 data=0 bus=0 [61]LEO: fallback i2c_gpio0 port=2 num=4 mul=4 pull=1 drv=0 data=0 bus=1 [68]LEO: fallback i2c_gpio1 port=2 num=5 mul=4 pull=1 drv=0 data=0 bus=1 [74]LEO: boot_i2c_gpio port=0, CFG_SUNXI_AUTO_TWI enabled, force fallback i2c_gpio[] [82]LEO: i2c_init base=0x2502400 speed=100000 slaveaddr=0x36 [88]LEO: twi_gate_reset before=0x0 [91]LEO: after gpio PB_CFG0=0xff44ffff PB4_mux=4 PB5_mux=4 [97]LEO: after gpio PB_PULL0=0x500 PB4_pull=1 PB5_pull=1 [102]LEO: after gpio PB_DLEVEL0=0x11111011 PB4_drv=0 PB5_drv=0 [108]LEO: after gpio PB_DATA=0x0 PB4=0 PB5=0 [113]LEO: twi_gate_reset after=0x20002 [117][pmu]: bus read error [119]board init ok [121]LEO: enable LCD/FPC 5V by PE10 high [225]LEO: PE10 enable ret=0 PE_CFG1=0xfffff1ff PE10_mux=1 PE_DATA=0x400 PE10=1 [232]LEO: axp313 init point before DRAM [236]LEO: pmic_bus_init ret=0 [239]LEO: read output 0x10 ret=0 val=0x1f [243]LEO: read DCDC1 0x13 ret=0 val=0x28 [247]LEO: read DCDC3 0x15 ret=0 val=0x28 [251]LEO: write DCDC1 3.3V ret=0 [257]LEO: DCDC1 immediately after write ret=0 val=0x69 [282]LEO: set DCDC3 1.5V ret=0 [285]LEO: read output before enable ret=0 val=0x1f [290]LEO: write output enable ret=0 val=0x1f [305]LEO: output after ret=0 val=0x1f [308]LEO: DCDC1 after ret=0 val=0x69 [312]LEO: DCDC3 after ret=0 val=0x55 [316]LEO: axp313 voltage config done [319]ZQ value = 0x2e [321]get_pmu_exist() = -1 [324]DRAM BOOT DRIVE INFO: V0.33 [327]DRAM CLK = 936 MHz [329]DRAM Type = 3 (2:DDR2,3:DDR3) [332]DRAMC read ODT off. [335]DRAM ODT value: 0x42. [337]ddr_efuse_type: 0xa [341]DRAM SIZE =128 M [343]dram_tpr4:0x0 [344]PLL_DDR_CTRL_REG:0xf8004d00 [348]DRAM_CLK_REG:0xc0000000 [350][TIMING DEBUG] MR2= 0x20 [358]DRAM simple test OK. [360]rtc standby flag is 0x0, super standby flag is 0x0 [366]dram size =128 [369]LEO: get_i2c_gpio boot source=BT0_head.i2c_gpio [373]LEO: boot_i2c_gpio0 port=0 num=0 mul=0 pull=0 drv=0 data=0 bus=0 [380]LEO: boot_i2c_gpio1 port=0 num=0 mul=0 pull=0 drv=0 data=0 bus=0 [386]LEO: fallback i2c_gpio0 port=2 num=4 mul=4 pull=1 drv=0 data=0 bus=1 [393]LEO: fallback i2c_gpio1 port=2 num=5 mul=4 pull=1 drv=0 data=0 bus=1 [399]LEO: boot_i2c_gpio port=0, CFG_SUNXI_AUTO_TWI enabled, force fallback i2c_gpio[] [407]spinand UBOOT_START_BLK_NUM 8 UBOOT_LAST_BLK_NUM 32 [412]block from 8 to 32 [507]Check is correct. [509]dma 0x2a534 int is not used yet [512]dma 0x2a534 int is free, you do not need to free it again [518]Entry_name = u-boot [525]Entry_name = optee [529]Entry_name = dtb [532]Jump to second Boot.中间调试其实有很多坑,有问题的。。。都被我DEBUG掉了,反正这样就可以 了 哈哈哈
-
全志H618 debain5.4 I2c驱动存在BUG发布在 Wireless & Analog Series
我感觉我肯定不是第一个遇到这BUG的人
所以之前有谁遇到了,帖子发我看看呗我这边是Orangepi zero2w的板子
h618芯片
用的一个i2c的触摸
轮训方式工作,本身没多要求响应多快,所以也就1s1000次跑着玩吧结果,大概每20小时左右触摸挂了
一开始我以为是触摸的锅
我就重置rst不行
重置电源也不行
就直接系统reboot行查到最后,发现直接寄存器重置i2c twi可以
root@orangepizero2w:~# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@orangepizero2w:~# busybox devmem 0x05002418 32 0x1
root@orangepizero2w:~# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@orangepizero2w:~#那个硬件重置指令很神奇,直接就好了,然后吧,这个i2c的口,触摸用的,要么驱动有BUG,要么轮训有问题,很规律的挂掉,大概20小时左右挂一次,帮我记一下,我后面先不改程序的轮训部分,先调整一下,能让它自动检测挂了,然后输出记录,看看多久坏一次,然后再调整才有意义
目前两个方案解决
软件重置那个寄存器但是吧我更想补驱动,哪位大佬贴出来以前人的处理方案呗
谢啦驱动我应该也能补,反正无非就是多撸两下AI
等我后续吧…… -
Debian 5.4 内核 H618/H616 高速 SPI 小屏幕实战,ST7789V 跑上 60FPS 折腾总结发布在 H/F/TV Series
主要还是得靠AI,我是第一次玩这东西,坑很多,但是吧最后都填平了,只不过ai被我撸爆了
Orangepi Zero 2W这个板子 H618芯片,板子上的pin接的一个spi屏幕
最终效果
<iframe src="//player.bilibili.com/player.html?isOutside=true&aid=116542847064811&bvid=BV11sRSBDErM&cid=38205524172&p=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>这种Linux板子本身输出是走hdmi的所以对这种spi小屏幕支持得特别不好
我刚开始走驱动的时候把lvgl接进去跑刷出来是0fps,从上往下一页一页刷,简直了这个不是CPU的锅,是驱动的问题,这驱动太老了,本声就是点个亮用的
所以光靠我肯定搞不定,我是撸ai,成功搞定的现在留个总结在这里,以后谁遇上了也有个参考
结果是可以跑到60fps,80mhz spi
简单总结一下原理
一次刷全屏数据,spi频率要拉满,然后需要单出一个线程专门处理dma刷过来的数据,简单点说就是开一次门以后就别关了,有数据就直接进来刷进去,驱动主要慢也就在这,每次刷数据都是找钥匙,开门,数据刷,再关门,神仙也快不起来下面是ai总结的,应该很全面了
一、硬件环境
Orange Pi Zero 2W
H618/H616
官方 Debian 5.4 内核
屏幕:
ST7789V
240x280 SPI LCD二、别直接上 Mainline / tinyDRM
反正我在armbain系统上没成功,即便成功了也没有我现在改的驱动快
Failed to setup spi
EINVAL
三、真正能跑流畅的关键:不是 LVGL,而是 SPI原因:
- syscall 开销
- SPI transfer 切碎
- 小块刷新太多
- DC 切换频繁
最后 CPU 都耗在 ioctl 上。
四、真正有效的路线:fb_st7789v + framebuffer
最终稳定能跑的几个关键参数:
spi-max-frequency = <80000000>;
fps = <60>;
txbuflen = <131072>;六、真正决定 FPS 的核心:改驱动,单独 DMA 刷新线程
这里其实才是整个项目最关键的部分。
一开始:
text fb_st7789v
虽然能显示。
但:
text LVGL 一动就掉帧 SPI write 阻塞 CPU 占用高 动画一卡一卡
后来发现:
text 问题根本不是 SPI 频率 而是刷新机制。
默认:
text fb_st7789v
很多刷新逻辑实际上是:
text 谁调用刷新 谁阻塞等待 SPI DMA 完成
这意味着:
text LVGL render SPI flush DMA wait
全部串行。
结果:
text CPU 大量时间卡在 SPI wait 上。
后来直接开始改驱动。
核心思路:
不让 LVGL 线程直接刷 SPI
而是:
text 单独创建 DMA 刷新线程
流程变成:
text LVGL ↓ 只提交 dirty buffer ↓ 放入刷新队列 ↓ 独立 DMA thread ↓ 后台 SPI DMA 刷新
这样:
text LVGL 渲染
和:
text SPI DMA 发送
彻底解耦。
改完以后最大的变化
原来:
text LVGL flush_cb
会卡住。
改完:
text flush_cb
基本只负责:
- 标记 dirty
- 提交 buffer
- 立即返回
真正 SPI DMA:
text 后台线程异步跑。
这个提升非常大。
为什么这个方法效果这么明显
因为 SPI LCD 真正慢的是:
text SPI transfer 时间
而不是:
text CPU 渲染
尤其:
text 240x280 RGB565
全屏:
text 240 × 280 × 2 ≈ 134KB
60FPS:
text 134KB × 60 ≈ 8MB/s
已经非常接近 SPI 极限。
所以:
text 减少阻塞 减少等待 DMA后台化
比:
text 单纯提高 SPI 频率
更重要。
后面进一步优化的方向
目前还准备继续:
1. DMA 双缓冲
也就是:
text ping-pong buffer
SPI 刷当前 buffer 的时候:
text LVGL 同时渲染下一帧
进一步减少等待。
2. partial refresh
目前已经:
text 只刷 dirty area
但后面准备:
text 合并区域 减少 transaction 次数
因为:
text SPI transaction 次数
很多时候比:
text SPI 频率
更影响 FPS。
3. 更激进 DMA
目前:
text fb_st7789v
本质上还是:
text Linux framebuffer
后面甚至考虑:
text 自己写 ultra-light SPI DMA framebuffer
直接绕过大量 framebuffer/fbtft 历史包袱。
最终结论
最后发现:
text 真正让 SPI 小屏跑流畅的 不是 LVGL 不是 tinyDRM 甚至不只是 SPI 频率
而是:
text 刷新架构。
尤其:
text DMA 异步线程化
提升非常明显。
需要驱动源码的给我私信吧,改了不少东西,可以直接把整个sd卡的img镜像给你
-
T113有偿开发或者DEBUG个驱动发布在 MR Series
需求:开发个LEDC的驱动,netlink方式传输数据,控制至少80个灯,要能过72小时压力测试
可以用全志的ledc驱动重新开发
或者是把我写好的拿去DEBUG
出现的问题就是ledc驱动会崩溃,超过6小时DMA也奔溃了
有兴趣的大佬联系我呀 flyingbearno1 -
Tina 的镜像打包如何把自己的app塞进去啊?发布在 MR Series
make -j
以后
pack指令这个之前如何把自己的应用app编译好的可执行文件塞到img的镜像里面去啊
我之前尝试过往下面这个文件夹里面塞,但是直接在编译的时候就报错啦/home/tina_whycanpii/tina_d1_open_v2_for_whycanpi/target/allwinner/t113-whycanpii/busybox-init-base-files/etc/init.d那么各位大佬如何把自己的app塞到镜像里面去呢?
-
tina 的Ledc驱动长时间运行问题发布在 MR Series
反正前6个小时能稳定运行,但是6小时以后就不行了
那个驱动程序我改了个数据传输的部分,用了netlink
之前也有个bug能带崩溃整个系统,但是我后来修复了那个问题
现在这个报错会是什么问题呢,看起来像是DMA挂了这个只有长时间运行才发生
那么有木有办法给这个DMA重置一下啊,就像内存整理那样,我每6小时给它整理一下应该也能用这个错误一旦发生了,这个ledc驱动基本上就彻底罢工了,停止程序重新发包也木有用,只能重启系统
我那个程序操作ledc 驱动会一直不停发数据,一直用,就是RGB背光那种幻彩运动的效果
sunxi_ledc_trans_data()1189 - dmaengine_prep_slave_single failed! [26886.219276] sunxi_ledc_trans_data()1189 - dmaengine_prep_slave_single failed! [26886.252494] sunxi_ledc_trans_data()1189 - dmaengine_prep_slave_single failed! -
T113和rtl8821cs不兼容吗?发布在 MR Series
运行3小时,网卡就蹦了
还带着系统一起蹦了,这怎么玩啊[10963.415133] 8<--- cut here --- [10963.418572] Unable to handle kernel NULL pointer dereference at virtual address 00000150 [10963.427581] pgd = c9704b51 [10963.430586] [00000150] *pgd=00000000 [10963.434565] Internal error: Oops: 17 [#1] PREEMPT SMP ARM [10963.440567] Modules linked in: 8821cs [10963.444647] CPU: 1 PID: 1241 Comm: RTW_RECV_THREAD Not tainted 5.4.61 #317 [10963.452291] Hardware name: Generic DT based system [10963.457624] PC is at __kmalloc_track_caller+0x130/0x194 [10963.463435] LR is at slab_pre_alloc_hook+0x18/0x2c [10963.468755] pc : [<c01d3214>] lr : [<c01d1600>] psr: 20000013 [10963.475720] sp : c3d61e40 ip : a0000013 fp : 00000000 [10963.481528] r10: 0011edd1 r9 : c3d61e40 r8 : c0572fd4 [10963.487333] r7 : 00082cc0 r6 : c3d60000 r5 : c5801900 r4 : 00000150 [10963.494594] r3 : 00000000 r2 : 05483000 r1 : 0011edd1 r0 : c5801900 [10963.501851] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [10963.509786] Control: 10c5387d Table: 44ed406a DAC: 00000051 [10963.516169] Process RTW_RECV_THREAD (pid: 1241, stack limit = 0x70278199) [10963.523715] Stack: (0xc3d61e40 to 0xc3d62000) [10963.528564] 1e40: c4d74180 00000cc0 c3d61e7b c0572fd4 00000400 00000cc0 c940972c c0572f20 [10963.537672] 1e60: c4d74180 000002c0 c5812f00 c0b04e08 00000000 c0572fd4 000002c0 13ed6e21 [10963.546772] 1e80: 00000000 c4d74540 000002c0 00000048 c439d000 c439d160 00000000 c0575194 [10963.555870] 1ea0: c945bd04 00000002 c9408000 bf0692e0 c945bd04 c948d000 c9408000 bf079344 [10963.564973] 1ec0: c948d000 00000001 c9408000 bf034968 00000132 c945c324 c3da8060 c945bd04 [10963.574084] 1ee0: c4d74540 c945c324 00000001 c4e9f048 c3da8060 c9408000 c4e9f04c c3d2fa70 [10963.583184] 1f00: c9408000 bf048cac 00000160 c945c324 00000038 00000160 c3da8048 00000160 [10963.592284] 1f20: c3d2fa70 bf0bb494 c940972c c9409718 c940986c c940986c 00000018 13ed6e21 [10963.601382] 1f40: 00000001 c9408000 00000001 c940971c c3d60030 bf048ce8 c4f0fc5c c4ecc81c [10963.610483] 1f60: 00000000 bf095258 c9408000 bf048da4 00000001 13ed6e21 c4ecc800 c4ecc800 [10963.619575] 1f80: c3d60000 c53a3100 c9408000 c0134360 c53a3100 c0134220 00000000 00000000 [10963.628674] 1fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [10963.637774] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10963.646869] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [10963.655979] [<c01d3214>] (__kmalloc_track_caller) from [<c0572f20>] (__kmalloc_reserve.constprop.48+0x20/0x68) [10963.667112] [<c0572f20>] (__kmalloc_reserve.constprop.48) from [<c0572fd4>] (__alloc_skb+0x6c/0x150) [10963.677276] [<c0572fd4>] (__alloc_skb) from [<c0575194>] (skb_copy+0x38/0x98) [10963.685792] [<c0575194>] (skb_copy) from [<bf0692e0>] (dbg_rtw_skb_copy+0x34/0x58 [8821cs]) [10963.695815] [<bf0692e0>] (dbg_rtw_skb_copy [8821cs]) from [<bf079344>] (rtw_os_recvframe_duplicate_skb+0x28/0x84 [8821cs]) [10963.708778] [<bf079344>] (rtw_os_recvframe_duplicate_skb [8821cs]) from [<bf034968>] (rtw_mi_buddy_clone_bcmc_packet+0xf0/0x154 [8821cs]) [10963.723218] [<bf034968>] (rtw_mi_buddy_clone_bcmc_packet [8821cs]) from [<bf048cac>] (pre_recv_entry+0xb8/0xf4 [8821cs]) [10963.736017] [<bf048cac>] (pre_recv_entry [8821cs]) from [<bf0bb494>] (rtl8821cs_recv_hdl+0x27c/0x36c [8821cs]) [10963.747729] [<bf0bb494>] (rtl8821cs_recv_hdl [8821cs]) from [<bf095258>] (rtw_hal_recv_hdl+0x10/0x14 [8821cs]) [10963.759532] [<bf095258>] (rtw_hal_recv_hdl [8821cs]) from [<bf048da4>] (rtw_recv_thread+0xbc/0x170 [8821cs]) [10963.770821] [<bf048da4>] (rtw_recv_thread [8821cs]) from [<c0134360>] (kthread+0x140/0x14c) [10963.780119] [<c0134360>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [10963.788153] Exception stack(0xc3d61fb0 to 0xc3d61ff8) [10963.793774] 1fa0: 00000000 00000000 00000000 00000000 [10963.802875] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10963.811967] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [10963.819333] Code: eb149195 e1a00004 e8bd87f0 e5953014 (e7940003) [10963.826177] ---[ end trace cb39a3ed387912af ]--- [10964.463445] 8<--- cut here --- [10964.466887] Unable to handle kernel NULL pointer dereference at virtual address 00000150 [10964.475912] pgd = 656192c3 [10964.478918] [00000150] *pgd=44087835, *pte=00000000, *ppte=00000000 [10964.485907] Internal error: Oops: 17 [#2] PREEMPT SMP ARM [10964.491908] Modules linked in: 8821cs [10964.495985] CPU: 1 PID: 1369 Comm: main Tainted: G D 5.4.61 #317 [10964.504112] Hardware name: Generic DT based system [10964.509446] PC is at __kmalloc_track_caller+0x130/0x194 [10964.515255] LR is at slab_pre_alloc_hook+0x18/0x2c [10964.520578] pc : [<c01d3214>] lr : [<c01d1600>] psr: 20000013 [10964.527546] sp : c5867e00 ip : a0000013 fp : c548d400 [10964.533350] r10: 0011edd1 r9 : c5867e00 r8 : c0572fd4 [10964.539161] r7 : 00082cc0 r6 : c5866000 r5 : c5801900 r4 : 00000150 [10964.546418] r3 : 00000000 r2 : 05483000 r1 : 0011edd1 r0 : c5801900 [10964.553683] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [10964.561615] Control: 10c5387d Table: 44ed406a DAC: 00000051 [10964.568006] Process main (pid: 1369, stack limit = 0x0667a97e) [10964.574500] Stack: (0xc5867e00 to 0xc5868000) [10964.579343] 7e00: c4d749c0 00000cc0 c5867e3b c0572fd4 000002c0 00000cc0 c0b04e08 c0572f20 [10964.588442] 7e20: c4d749c0 00000150 c5812f00 c0b04e08 00000000 c0572fd4 00000150 13ed6e21 [10964.597544] 7e40: 00000000 00000000 00000150 00000000 c4c73800 c5867ed4 00000008 c05c8144 [10964.606648] 7e60: c0801030 c013557c c5867e94 c50fedc0 c50fedc0 00000000 00000554 00000000 [10964.615746] 7e80: 00000000 13ed6e21 0000000c c5867f04 c548d400 b69c6c84 00000000 0000000c [10964.624847] 7ea0: c0b04e08 00000008 b69c6d04 c056b804 c5867f04 c056ce5c c5867edc 13ed6e21 [10964.633946] 7ec0: c5867f20 00000000 00000001 b6ee6510 00000150 c5867f04 0000000c 00000005 [10964.643043] 7ee0: 00000000 00000150 c5867ecc 00000001 c5867f20 00000000 00000000 00000000 [10964.652148] 7f00: c0b04e08 00000010 00000000 00000000 00000001 c5867f80 c5866000 c016e08c [10964.661251] 7f20: c5867f20 00000000 00000000 00000000 cbea05c6 000009f8 cbe94276 000009f8 [10964.670350] 7f40: c016d310 c5eaa680 01000000 00000000 00000000 00000000 00000000 c016adf0 [10964.679451] 7f60: ee073a90 13ed6e21 b69c6718 c0b04e08 00000000 000000a2 c0101228 c016e1a0 [10964.688546] 7f80: 00000000 13ed6e21 b69c6c84 0000000c 00000000 00000122 c0101228 c5866000 [10964.697643] 7fa0: 00000122 c0101000 b69c6c84 0000000c 00000008 b6ee6510 00000150 00000000 [10964.706745] 7fc0: b69c6c84 0000000c 00000000 00000122 b69c6d24 00000000 b6f5e540 b69c6d04 [10964.715840] 7fe0: b69c66f0 b69c66dc b6f3545c b6f34968 60000010 00000008 00000000 00000000 [10964.724945] [<c01d3214>] (__kmalloc_track_caller) from [<c0572f20>] (__kmalloc_reserve.constprop.48+0x20/0x68) [10964.736078] [<c0572f20>] (__kmalloc_reserve.constprop.48) from [<c0572fd4>] (__alloc_skb+0x6c/0x150) [10964.746244] [<c0572fd4>] (__alloc_skb) from [<c05c8144>] (netlink_sendmsg+0x118/0x304) [10964.755057] [<c05c8144>] (netlink_sendmsg) from [<c056b804>] (sock_sendmsg_nosec+0x14/0x24) [10964.764350] [<c056b804>] (sock_sendmsg_nosec) from [<c056ce5c>] (__sys_sendto+0xc0/0xf8) [10964.773353] [<c056ce5c>] (__sys_sendto) from [<c0101000>] (ret_fast_syscall+0x0/0x54) [10964.782059] Exception stack(0xc5867fa8 to 0xc5867ff0) [10964.787677] 7fa0: b69c6c84 0000000c 00000008 b6ee6510 00000150 00000000 [10964.796778] 7fc0: b69c6c84 0000000c 00000000 00000122 b69c6d24 00000000 b6f5e540 b69c6d04 [10964.805868] 7fe0: b69c66f0 b69c66dc b6f3545c b6f34968 [10964.811489] Code: eb149195 e1a00004 e8bd87f0 e5953014 (e7940003) [10964.818300] ---[ end trace cb39a3ed387912b0 ]--- [10982.763500] 8<--- cut here --- [10982.766926] Unable to handle kernel NULL pointer dereference at virtual address 00000150 [10982.775938] pgd = c9704b51 [10982.778944] [00000150] *pgd=00000000 [10982.782923] Internal error: Oops: 17 [#3] PREEMPT SMP ARM [10982.788922] Modules linked in: 8821cs [10982.793001] CPU: 1 PID: 1242 Comm: RTW_CMD_THREAD Tainted: G D 5.4.61 #317 [10982.802096] Hardware name: Generic DT based system [10982.807430] PC is at __kmalloc+0x130/0x194 [10982.811984] LR is at slab_pre_alloc_hook+0x18/0x2c [10982.817314] pc : [<c01d33a8>] lr : [<c01d1600>] psr: 20000013 [10982.824287] sp : c3c35ba0 ip : 000ee2e0 fp : bf03102c [10982.830093] r10: 0011edd1 r9 : c3c35ba0 r8 : bf068bf4 [10982.835906] r7 : 00000a20 r6 : c3c34000 r5 : c5801900 r4 : 00000150 [10982.843167] r3 : 00000000 r2 : 05483000 r1 : 0011edd1 r0 : c5801900 [10982.850426] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [10982.858354] Control: 10c5387d Table: 44ed406a DAC: 00000051 [10982.864744] Process RTW_CMD_THREAD (pid: 1242, stack limit = 0xd56f1c7d) [10982.872195] Stack: (0xc3c35ba0 to 0xc3c36000) [10982.877042] 5ba0: c9408000 000002f0 000002f0 00000001 c940806c c9408080 bf141fdc bf068bf4 [10982.886143] 5bc0: c9408000 bf068c04 c9408000 00000001 000002f0 bf0691e0 c9408000 c4c54400 [10982.895241] 5be0: c3c35c0c bf0034ec c9408080 bf141fdc bf03102c c9408000 c9408018 c9408074 [10982.904342] 5c00: 00000001 bf013b6c 2401036c 00000001 00000001 00000005 5f6f656c 00000035 [10982.913438] 5c20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10982.922527] 5c40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10982.931626] 5c60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10982.940726] 5c80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10982.949826] 5ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10982.958931] 5cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10982.968027] 5ce0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10982.977126] 5d00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10982.986230] 5d20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10982.995330] 5d40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.004432] 5d60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.013529] 5d80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.022624] 5da0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.031727] 5dc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.040828] 5de0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.049923] 5e00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.059022] 5e20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.068124] 5e40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.077224] 5e60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.086325] 5e80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.095423] 5ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.104527] 5ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.113622] 5ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 13ed6e21 [10983.122724] 5f00: c9408018 c9408000 c5b27204 c9469f20 c9408018 00000000 c9409440 bf01df48 [10983.131825] 5f20: c9408000 bf01e0a8 c5b27200 c9408000 c5b27204 00104cd8 bf164000 bf0310ac [10983.140929] 5f40: c4c54840 c9408000 c9409460 bf000f3c c3c34000 c53a3100 c5b27200 c940948c [10983.150024] 5f60: c4f0fc5c 13ed6e21 60000113 c4eccd80 c3c34000 c53a3100 c9408000 bf000ddc [10983.159125] 5f80: c4f0fc5c c4eccd9c 00000000 c0134360 c53a3100 c0134220 00000000 00000000 [10983.168225] 5fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [10983.177325] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.186425] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [10983.196109] [<c01d33a8>] (__kmalloc) from [<bf068bf4>] (_rtw_malloc+0x30/0x34 [8821cs]) [10983.205697] [<bf068bf4>] (_rtw_malloc [8821cs]) from [<bf068c04>] (_rtw_zmalloc+0xc/0x2c [8821cs]) [10983.216272] [<bf068c04>] (_rtw_zmalloc [8821cs]) from [<bf0691e0>] (dbg_rtw_zmalloc+0x10/0x30 [8821cs]) [10983.227271] [<bf0691e0>] (dbg_rtw_zmalloc [8821cs]) from [<bf0034ec>] (rtw_sitesurvey_cmd+0x50/0x1a0 [8821cs]) [10983.239228] [<bf0034ec>] (rtw_sitesurvey_cmd [8821cs]) from [<bf013b6c>] (rtw_do_join+0x2bc/0x2d0 [8821cs]) [10983.250703] [<bf013b6c>] (rtw_do_join [8821cs]) from [<bf01df48>] (_rtw_roaming+0x3c/0x70 [8821cs]) [10983.261325] [<bf01df48>] (_rtw_roaming [8821cs]) from [<bf01e0a8>] (rtw_stadel_event_callback+0xfc/0x298 [8821cs]) [10983.273407] [<bf01e0a8>] (rtw_stadel_event_callback [8821cs]) from [<bf0310ac>] (mlme_evt_hdl+0x80/0x94 [8821cs]) [10983.285387] [<bf0310ac>] (mlme_evt_hdl [8821cs]) from [<bf000f3c>] (rtw_cmd_thread+0x160/0x494 [8821cs]) [10983.296221] [<bf000f3c>] (rtw_cmd_thread [8821cs]) from [<c0134360>] (kthread+0x140/0x14c) [10983.305422] [<c0134360>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [10983.313455] Exception stack(0xc3c35fb0 to 0xc3c35ff8) [10983.319073] 5fa0: 00000000 00000000 00000000 00000000 [10983.328165] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [10983.337262] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [10983.344624] Code: eb149130 e1a00004 e8bd87f0 e5953014 (e7940003) [10983.351425] ---[ end trace cb39a3ed387912b1 ]--- [10983.356575] Kernel panic - not syncing: Fatal exception in interrupt [10983.363652] CPU0: stopping [10983.366669] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 5.4.61 #317 [10983.374997] Hardware name: Generic DT based system [10983.380340] [<c010de60>] (unwind_backtrace) from [<c010a5f8>] (show_stack+0x10/0x14) [10983.388955] [<c010a5f8>] (show_stack) from [<c06f8c28>] (dump_stack+0x88/0xa4) [10983.396993] [<c06f8c28>] (dump_stack) from [<c010c234>] (handle_IPI+0xe4/0x180) [10983.405131] [<c010c234>] (handle_IPI) from [<c035f23c>] (gic_handle_irq+0x70/0x78) [10983.413554] [<c035f23c>] (gic_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8) [10983.421878] Exception stack(0xc0b01f40 to 0xc0b01f88) [10983.427497] 1f40: 068fd1d0 c5eac374 00000000 c0114760 00000001 c0b00000 c0b04e28 c0b04e64 [10983.436595] 1f60: c0b4d000 c5fff540 c0a270c0 00000000 00000000 c0b01f90 c0107f48 c0107f38 [10983.445690] 1f80: 60000013 ffffffff [10983.449571] [<c01021cc>] (__irq_svc) from [<c0107f38>] (arch_cpu_idle+0x1c/0x38) [10983.457803] [<c0107f38>] (arch_cpu_idle) from [<c013df64>] (do_idle+0xd4/0x128) [10983.465947] [<c013df64>] (do_idle) from [<c013e250>] (cpu_startup_entry+0x18/0x20) [10983.474373] [<c013e250>] (cpu_startup_entry) from [<c0a00c80>] (start_kernel+0x364/0x3f4) [10983.483478] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- -
T113 wpa 自动联网后,再次联网,带蹦了驱动和系统发布在 MR Series
wifi模组是 rtl8821cs
wpa自动联网没问题,但是用tina的api重新联网后系统崩溃,驱动也挂了这会是什么原因呢?
用那个api联网的话需要先disconnect之前的网络吗?
root@TinaLinux:/# swu_param: #### swu_software: #### swu_mode: #### no swupdate_cmd to run, wait for next swupdate [ 40.449098] usb1-vbus: disabling [ 51.807292] 8<--- cut here --- [ 51.810729] Unable to handle kernel paging request at virtual address 0311f3f8 [ 51.818767] pgd = 81c8e1c3 [ 51.821785] [0311f3f8] *pgd=00000000 [ 51.825766] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [ 51.831673] Modules linked in: 8821cs [ 51.835748] CPU: 1 PID: 1242 Comm: RTW_CMD_THREAD Not tainted 5.4.61 #317 [ 51.843299] Hardware name: Generic DT based system [ 51.848634] PC is at __kmalloc+0x130/0x194 [ 51.853183] LR is at slab_pre_alloc_hook+0x18/0x2c [ 51.858507] pc : [<c01d33a8>] lr : [<c01d1600>] psr: 20000013 [ 51.865476] sp : c4c479b0 ip : 00000024 fp : c4ebd824 [ 51.871284] r10: 000003fd r9 : c4c479b0 r8 : c06d5e94 [ 51.877088] r7 : 00000b20 r6 : c4c46000 r5 : c5801c00 r4 : 0311f3f8 [ 51.884346] r3 : 00000000 r2 : 05483000 r1 : 000003fd r0 : c5801c00 [ 51.891607] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 51.899542] Control: 10c5387d Table: 45b5806a DAC: 00000051 [ 51.905931] Process RTW_CMD_THREAD (pid: 1242, stack limit = 0x297004dd) [ 51.913382] Stack: (0xc4c479b0 to 0xc4c48000) [ 51.918230] 79a0: 00000001 00000000 c4ebd800 c4d77800 [ 51.927328] 79c0: c4c47a18 c4ea427c c4d778b0 c06d5e94 00000154 c0b04e08 00000000 00000154 [ 51.936428] 79e0: c4ea427c c4d77aa0 c06d6b44 c4d77aa0 c4c47b58 c4ebd800 c4f05000 c0b04e08 [ 51.945530] 7a00: c4ea427c 00000154 c4ebd824 c06d6ab0 00000000 00000000 00000000 00000000 [ 51.954623] 7a20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 51.963729] 7a40: ffff9eef 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 51.972826] 7a60: c4ea427c 00000000 c4f05000 c4f05000 00000000 00000000 00000000 00000000 [ 51.981928] 7a80: 00000000 ffffde68 14110064 a871f944 0000c50c 00000000 00000000 00000000 [ 51.991038] 7aa0: 00000000 13ed6e21 c0b04e08 00000a20 00000178 c4ebd800 c4c47b58 0311f408 [ 52.000128] 7ac0: 00000000 c94270f5 ffffde68 c06d6ba8 00000a20 c4d77aa0 0311f401 00000001 [ 52.009224] 7ae0: c9426cf5 c01d277c c5ebac00 c5a44b80 c4d77aa0 c01d32bc 0000000b 000003e8 [ 52.018324] 7b00: 000003e8 c4d77aa0 c9408000 01721400 e61556b1 13ed6e21 c9427000 c4ebd800 [ 52.027415] 7b20: 00000178 c942706d c4d77aa0 0311f408 00000000 c94270f5 ffffde68 bf07f738 [ 52.036512] 7b40: 00000a20 13ed6e21 c94270f5 c4ea427c 00000000 0000d685 c4ea427c 00000000 [ 52.045618] 7b60: ffffde68 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 52.054717] 7b80: 00000000 00000000 00000002 ffff53dc ffffffff 13ed6e21 c5858000 0000000b [ 52.063819] 7ba0: c9427000 c428b70c c940806c c9408000 c9408074 00000000 00000000 bf08013c [ 52.072922] 7bc0: 40000013 c07112b0 c4c47bec c4c47bec c0a35540 c9409890 ffff9fb7 00000001 [ 52.082021] 7be0: 00000001 bf033370 00000001 bf032ef0 c9408938 13ed6e21 40000013 c9408000 [ 52.091119] 7c00: c9408018 c5276204 ffff9eef bf164000 c9409440 bf141fdc bf03102c bf080238 [ 52.100219] 7c20: c9408000 bf01c86c c4c47cbc c4c47ccc c084297c c04f5594 00000004 00000001 [ 52.109316] 7c40: c5b5c380 00001000 00000004 13ed6e21 c582e800 7fffffff c4c47cf0 c4c46000 [ 52.118414] 7c60: 7fffffff c070e680 00000001 c5a44b00 c013a764 00000100 00000122 13ed6e21 [ 52.127516] 7c80: 00000004 c4c47cf4 c4c47cf0 7fffffff 00000002 c084297c c094dc40 00000000 [ 52.136616] 7ca0: c4c47cf4 c070e780 c582e800 c0b04e08 c4c47ce0 c4c47cf0 c084297c c04f5594 [ 52.145713] 7cc0: c4c47d40 c0b04e08 c582e800 00000000 00000042 00000034 00000000 c04f58c8 [ 52.154814] 7ce0: 00000000 c4c47d40 00000000 00000000 00000000 00030003 c4c47cf8 c4c47cf8 [ 52.163916] 7d00: 00000000 00000000 c4c47d08 c4c47d08 c04f5010 00000000 00000000 00000000 [ 52.173011] 7d20: c582eb48 00000000 00000001 c0b04e08 c582eb48 00000001 00000003 00000000 [ 52.182106] 7d40: 00000000 c4c47d58 c0b04e08 c0148d78 00000000 c4c47d58 00000000 c0b04e08 [ 52.191205] 7d60: 00000000 c4c47d64 c4c47d64 13ed6e21 e61556b1 13ed6e21 4e1e6fdc 00000001 [ 52.200309] 7d80: c59d4410 0000000d c59d44e4 20000013 00000001 00000001 fffffff3 c03fee74 [ 52.209403] 7da0: c50fe400 c4c47e54 00000042 00000043 00000000 bf06eea8 c5b5c380 00000001 [ 52.218500] 7dc0: c9408000 00000040 c5b5c380 c4c47e53 00020000 00000000 00000000 13ed6e21 [ 52.227592] 7de0: 00000000 bf06ec08 00000000 c428b000 00000000 00000000 00000000 00020042 [ 52.236696] 7e00: 00000000 bf064344 00000000 13ed6e21 c4c47e53 00000001 00000004 c428b000 [ 52.245787] 7e20: 00000042 00000000 001604d4 00000000 c9409440 c9408000 c5276200 bf064384 [ 52.254890] 7e40: 00000000 00000001 0000011c bf0bc690 12000044 13ed6e21 00000002 00000032 [ 52.263992] 7e60: c52cf000 bf0d3ce0 00000000 bf04a0f4 c5a44b00 fffff834 ffffffff 13ed6e21 [ 52.273098] 7e80: c5801e00 c01d32bc c5b5c380 0000000c 60000013 c07112b0 c9409440 c014d140 [ 52.282195] 7ea0: c5b5c380 c9409440 c5b5c380 bf06979c c5b5c380 00000000 00000000 00000000 [ 52.291294] 7ec0: c5f9fb80 c5b5cc80 c5801e00 ffff9eef bf164000 00000001 bf141fdc c01d277c [ 52.300395] 7ee0: c9409440 c9408000 c5276200 c0b04e08 c9409440 c5b5cc80 00000000 13ed6e21 [ 52.309501] 7f00: c940ce94 00000001 00000028 c9409460 80000013 c07112b0 c428bc28 c014d140 [ 52.318597] 7f20: c428b000 13ed6e21 c428b000 c5276200 c9408000 c5276204 ffff9eef bf0310ac [ 52.327693] 7f40: c5b5c380 c9408000 c9409460 bf000f3c c4c46000 c5a1f140 c5276200 c940948c [ 52.336794] 7f60: c4eb1c5c 13ed6e21 60000113 c4edf400 c4c46000 c5a1f140 c9408000 bf000ddc [ 52.345891] 7f80: c4eb1c5c c4edf41c 00000000 c0134360 c5a1f140 c0134220 00000000 00000000 [ 52.354976] 7fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [ 52.364076] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 52.373171] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 52.382285] [<c01d33a8>] (__kmalloc) from [<c06d5e94>] (cfg80211_bss_update+0x400/0x4f0) [ 52.391295] [<c06d5e94>] (cfg80211_bss_update) from [<c06d6ab0>] (cfg80211_inform_single_bss_frame_data+0x198/0x260) [ 52.403002] [<c06d6ab0>] (cfg80211_inform_single_bss_frame_data) from [<c06d6ba8>] (cfg80211_inform_bss_frame_data+0x30/0x304) [ 52.416260] [<c06d6ba8>] (cfg80211_inform_bss_frame_data) from [<bf07f738>] (rtw_cfg80211_inform_bss+0x264/0x2f8 [8821cs]) [ 52.429431] [<bf07f738>] (rtw_cfg80211_inform_bss [8821cs]) from [<bf08013c>] (rtw_cfg80211_is_target_wps_scan+0x118/0x208 [8821cs]) [ 52.443554] [<bf08013c>] (rtw_cfg80211_is_target_wps_scan [8821cs]) from [<bf080238>] (rtw_cfg80211_surveydone_event_callback+0xc/0x10 [8821cs]) [ 52.458827] [<bf080238>] (rtw_cfg80211_surveydone_event_callback [8821cs]) from [<bf01c86c>] (rtw_surveydone_event_callback+0x130/0x4a4 [8821cs]) [ 52.474196] [<bf01c86c>] (rtw_surveydone_event_callback [8821cs]) from [<bf0310ac>] (mlme_evt_hdl+0x80/0x94 [8821cs]) [ 52.486873] [<bf0310ac>] (mlme_evt_hdl [8821cs]) from [<bf000f3c>] (rtw_cmd_thread+0x160/0x494 [8821cs]) [ 52.497850] [<bf000f3c>] (rtw_cmd_thread [8821cs]) from [<c0134360>] (kthread+0x140/0x14c) [ 52.507058] [<c0134360>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 52.515088] Exception stack(0xc4c47fb0 to 0xc4c47ff8) [ 52.520708] 7fa0: 00000000 00000000 00000000 00000000 [ 52.529818] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 52.538921] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 52.546286] Code: eb149130 e1a00004 e8bd87f0 e5953014 (e7940003) [ 52.553083] ---[ end trace b9f93dabdfd7ea30 ]--- [ 52.558217] Kernel panic - not syncing: Fatal exception in interrupt [ 52.565292] CPU0: stopping [ 52.568311] CPU: 0 PID: 1296 Comm: main Tainted: G D 5.4.61 #317 [ 52.576432] Hardware name: Generic DT based system [ 52.581774] [<c010de60>] (unwind_backtrace) from [<c010a5f8>] (show_stack+0x10/0x14) [ 52.590391] [<c010a5f8>] (show_stack) from [<c06f8c28>] (dump_stack+0x88/0xa4) [ 52.598432] [<c06f8c28>] (dump_stack) from [<c010c234>] (handle_IPI+0xe4/0x180) [ 52.606576] [<c010c234>] (handle_IPI) from [<c035f23c>] (gic_handle_irq+0x70/0x78) [ 52.614999] [<c035f23c>] (gic_handle_irq) from [<c01025b0>] (__irq_usr+0x50/0x80) [ 52.623322] Exception stack(0xc4eb1fb0 to 0xc4eb1ff8) [ 52.628941] 1fa0: 00000000 beebd36c 000000ff 00000002 [ 52.638038] 1fc0: 00000090 beebdd54 00000001 00014ec8 00000001 00451c04 beebdd54 beebd45c [ 52.647134] 1fe0: 000000aa beebd318 000b1640 000b187c 20000010 ffffffff [ 52.654492] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
