Miouyouyou / MyyQi

Working kernel with Mali r17p0 for RK3288 systems (MiQi boards and ASUS Tinkerboard (beta))
27 stars 6 forks source link

Adding Rockchip WiFi to your Kernel #6

Closed sghazagh closed 7 years ago

sghazagh commented 7 years ago

Hi, I didn't know how I can contact you, so I am posting it here...

I search through Rockchip RTL8723bs Wireless driver and I just think that you can implement the driver in your kernel compile by doing this:

Add: ./drivers/net/wireless/rockchip_wlan/ folder to your branch add to file "./drivers/net/wireless/Makefile" --> obj-$(CONFIG_WL_ROCKCHIP) += rockchip_wlan/ Add to file "./drivers/net/wireless/Kconfig" --> source "drivers/net/wireless/rockchip_wlan/Kconfig" Copy "include/linux/rfkill-wlan.h" to your "include/linux/" folder Try and see if the Kernel can make the module. The setting has Auto Load option which loads the module by kernel automatically. If you do not have TinkerBoard, send me the Kernel and I can test that for you.

( I might be able to test it myself and let you know if I was successful)

UPDATE: I got some error for SIGNAL things which I think the newer kernel has... Too complicated for me. Hope you can get it works

sghazagh commented 7 years ago

Fixed the above issue as I found this:

Linux 4.11 moves signal function declarations to its own header file:
Linux: 174cd4b1e5fb ("sched/headers: Prepare to move signal wakeup &
sigpending methods from <linux/sched.h> into <linux/sched/signal.h>")

User new header file "linux/sched/signal.h" to fix build error.

But got something else then... Kernel 4.4.y is much different than 4.11.y !!!!! i give up and leave it with you...

Miouyouyou commented 7 years ago

I'll take a look at that. There are similar Realtek chips that are already integrated into the kernel, so I'll have to compare the code between the two implementations, and see what really change between the two.

For moment, I'd like to add the right informations in the DTS file, in order for the Linux system to be able to detect the hardware and load up the appropriate module, if there's actually a usable driver mainlined in the kernel.

I'll try to focus on that this week, knowing that I have a few other jobs to finish as well, and others that come piling up. :)

Miouyouyou commented 7 years ago

Okay, I've started to take a more in-depth look at this and it seems that, on the Tinkerboard kernel, the Wifi drivers are actually detected and manage through the Radio Frequency Kill subsystem...

This... will take more time than I thought...

I'll try to make it detected through the driver, as I think that's the way it should be...

Miouyouyou commented 7 years ago

So, first I'll add the RTL8723BS driver which is actually already included in the kernel, as a 'Staging driver', recompile the whole thing and do a second release with the driver in module, so that anyone can continue testing.

Miouyouyou commented 7 years ago

Might have been a bit quick on the trigger here, since this driver is using the SDIO subsystem. I don't know if that's the case with the official driver. I'll see if there's major differences between the two.

sghazagh commented 7 years ago

Hi, You're right. The RTL8723bs is already in kernel as Staging Driver. I had included that and compiled. But that didn't work. As it creates a module named "s8723bs".

The official one, as you mentioned, uses SDIO sybsystem because it routs the audio to HDMI as well. After compile, it creates "8723bs" module which is auto-loaded by default and it works fine.

If you download my latest image (same link, update 30/May) I also have included the Sound/Audio driver. the Driver itself is not that hard to find as whole folder is available in official kernel which I mentioned above. porting that to new kernel is a little bit tricky as new kernel for instance uses different header file for signal (linux/sched/signal.h instead of linux/signal.h). That makes the code to not compile and stops. If you get through the compile and fix the headers and requirements for new kernel compilation, I think that works fine if the compile finishes!!!

Miouyouyou commented 7 years ago

Alright, I'll try to adapt the driver to the kernel and see how it goes.

sghazagh commented 7 years ago

So sorry Tony (Miouyouyou), I really don't know how I can contact you thats why I need to post it here: In this post, you mentioned you have fixed the TinkerBoard reboot issue: Here

Can you please let me have the patch or commit link to the changes then I can see if that fixes the issue I have with rebooting the Tinker Board through sysrq?

I appreciate your help.... (I explained, when I resize my SD card and reboot by echo b > /proc/sysrq-trigger the board do not restart)

Miouyouyou commented 7 years ago

If you want to contact @TonyMac32 , you should try the ARMbian forum. I'm not Tony though :smile_cat: .

That said, there have been some updates here : https://forum.armbian.com/index.php?/topic/3327-asus-tinkerboard/&page=11

It seems that @TonyMac32 was able to use the Wifi with a 4.12 kernel. I'll take a look at the patches, reimport them here too and I guess that we'll have support for Tinkerboards Wifi chips ! Yay ! Note that he provides his patches to ARMbian directly, so their linux-rockchip-next kernel package should also integrate Wifi support in a few days !

Meanwhile, I'll try to take a look at the SysRQ issue next week.

sghazagh commented 7 years ago

My apologies, I thought you are a same person, but that doesn't really matter. If you can help, I appreciate... :)

Tonymac32 commented 7 years ago

Hello sghazagh, The version with support will be linux-rockchip-dev, which is the 4.12 kernel, next has been frozen at 4.11. I have fixed the reboot issue on 4.4, using a rockchip hack of the kernel to put a delay in the power sequence during shutdown, however it was not effective on 4.11 or 4.12. What is happening is the SD card supply is not set back to 3.3 Volts (legacy SD card mode) from 1.8 Volts (high-speed mode) and is quite possibly shut off entirely when it needs to be on to boot.

sghazagh commented 7 years ago

Hi Tonymac32, Thanks for your reply. Where is this branch, "linux-rockchip-dev"? is it in mainline kernel or other GITHUB resources? May I kindly get your advise how I can fix the reboot issue you mentioned above in 4.4 kernel?

Miouyouyou also is going to have a look on this issue. Your help might speed up the process as at the moment the official kernel in Tinkerboard GITHUB has this issue.

P.S: please provide code ot commit to the change than we can replicate otherwise, me myself, has not that C knowledge to be able to hack the Kernel source. Appreciate your help...

Miouyouyou commented 7 years ago

So, the GIT repository in question is : https://github.com/armbian/build

I'll try to import the WiFi patches and prepare everything for the next RC release. I'll also re-enable the two DTS files, the rk3288-miniarm.dts file from @Tonymac32 and the mainline rk3288-tinker.dts .

Miouyouyou commented 7 years ago

Also, linux-rockchip-dev is a Debian packaged kernel provided by https://www.armbian.com/kernel/ . Most of patches applied here are also imported and applied to these ones.

sghazagh commented 7 years ago

I appreciate Armbian works, but I don't want to get whole Armbian build as I already have my own rootfs. I even do not want to use their kernel as it's not clear to me what they have done and what not.

Miouyouyou, I plan to use your Kernel in my rootfs as you share everything here and I understand the script, patches and the rest... I only want to have WiFi enabled which you said you will add it.

I also need to see how I can fix the issue with "sysrq" reboot. I don't want to add 3rd party repository and install patches or applications that I do not understand what is happening behind the scene!

I think you guys can help me get that changes to apply or at least see if your kernel has a same issue or not! It might be the common issue which you experience in your kernel too!!!

Hope you can help...

Therfore, I hope you can give me clear answer of how can we fix the sysrq boot issue!

Miouyouyou commented 7 years ago

Alright, the new set of patches should be available in a few minutes. Test them and tell me if these work or not :)

I also added the firmwares required by the Wifi driver in firmwares

sghazagh commented 7 years ago

I just updated the "GetPatchAndCompileKernel.sh" script and run it, got this error:

...
TX011-SW-99002-r17p0-01rel0/driver/product/kernel/include/linux/ump-import.h
TX011-SW-99002-r17p0-01rel0/driver/product/kernel/include/linux/ump-ioctl.h
TX011-SW-99002-r17p0-01rel0/driver/product/kernel/include/linux/ump.h
TX011-SW-99002-r17p0-01rel0/driver/product/kernel/license.txt
TX011-SW-99002-r17p0-01rel0/driver/product/kernel/patches/
TX011-SW-99002-r17p0-01rel0/driver/product/kernel/patches/integrate_kds_with_dma_buf.patch
TX011-SW-99002-r17p0-01rel0/driver/product/kernel/sconscript
cp: cannot stat ‘0014-ARMbian-RK3288-DTSI-changes.patch’: No such file or directory
cp: cannot stat ‘0015-Enabling-Tinkerboard-s-Wifi-Third-tentative.patch’: No such file or directory
cp: cannot stat ‘0016-Added-support-for-Tinkerboard-s-SPI-interface.patch’: No such file or directory
cp: cannot stat ‘0200-The-Tinkerboard-DTS-file-maintained-by-TonyMac32-and.patch’: No such file or directory
Could not copy 

Now I am fetching the repository again and see if it works...

Remember from last time: I want to have my own name after modules. So if I adjust the script variable "export MYY_VERSION=" to my own name, the script also does not work!

sghazagh commented 7 years ago

Have to "reset hard" the "fetch" however, the "linux" folder was there with version -rc2, your git command couldn't get the latest version (-rc4) to update the "linux" folder. I do recommend add an option to ask if remote git is different than local and if user accepts the git update then the "linux" folder get updated as well. I normally do that to update the local branch from remote:

git add .
git commit -m "commit detail"
git fetch origin
git reset --hard origin/<branch>  <-- for your repository, branch would be "master"
git merge

You should do this for "linux" folder too if user wanted to update. Other than that, the compile started and it's booting the Tinker Board as well.

WIFI: First of all, Network Manager does not see any wifi network but I can see that the device wlan0 is available as "rfkill list" list the device. I couldn't access the WIFI through Network Manager. I tried to get it up manually by using command bellow as root: ip link set wlan0 up but I received this error: RTNETLINK answer: Operation not permitted Shouldn't be like that... When device is available, why the Network Manager cannot see that??? So so far, well done... but need to get it working

Regarding Script: Suggestion 1: I do not understand this bit:

if [ -z ${MYY_GIT_RELEASE+x} ]; then
        #exit 0

People need to get modules as well, so why you exit if no one set the required variable. I disabled it to be able to get it work

Suggestion 2: remove "CONFIG_LOCALVERSION="-The-Twelve-MyyQi" from default config. Instead, add this to your code. User might need to set it's own name for kernel modules. Like what I want:

export KERNEL_SERIES=v4.12
export KERNEL_BRANCH=v4.12-rc4
export KERNEL_VERSION=4.12.0-rc4
export MYY_VERSION=-The-Twelve-MyyQi+
export LOCALVERSION=-ELAR-Systems
export MALI_VERSION=r17p0-01rel0
export MALI_BASE_URL=https://developer.arm.com/-/media/Files/downloads/mali-drivers/kernel/mali-midgard-gpu

In this way, I could get my kernel modules with my own prefixed name.

Suggestion 3: let script ask to update "linux" folder if they want to. explained above...

Hope you get it to the point that it gets known by Network Manager and load the WIFI.

Meanwhile, Audio is working just fine ;) But: Bluetooth is not seen as a device!

sghazagh commented 7 years ago

I ended up removing "linux" folder again as it didn't get the -rc4 therfor Mali patches not applied. Will try again after download finished and update you with the result...

Above feedback still are valid though...

Miouyouyou commented 7 years ago

Ah, I tried to use the patches directory instead of redownloading everything when the patches directory was present, since this script is generally either downloaded alone (without anything) or part of a git clone that includes the patches directory. But I guess I could execute the download phase instead, if there's an issue during the copy, yeah.

MYY_VERSION is only used to fetch the appropriate configuration file. There's actually no instruction that modify the kernel name suffix inside the .config file, in this script. You might want to run the script once after exporting MAKE_CONFIG=menuconfig , and set up the name you'd like to use instead. Then next runs will use the same .config file. :smiley: I'll see if I can separate the LOCALVERSION and .config file name.

I don't know if I'll make the script recovers from complex cases, since it's not the main purpose currently. I'd like to avoid involving things like 'cmake' just to configure the script. It tends to be kind of 'one-shot' script that can be run by copy-pasting it in the terminal. Fetching the whole repository is mainly aimed at:

The last exit 0 will be removed, yeah. However, I still don't know about the modules copy. I guess I'll reverse the process and copy everything in /tmp , as the main purpose of this script is 'cross-compilation', and then let the user disable the process by setting a variable like NOINSTALLINTMP or something like that.

Miouyouyou commented 7 years ago

As for the WIFI, is there any info in dmesg ? Are the firmwares loaded correctly ?

sghazagh commented 7 years ago

Ok my friend, The Kernel 4.12.0-rc4 compiled as well.... have same issue. Yes, issue with firmware...


[    0.000000] Booting Linux on physical CPU 0x500
[    0.000000] Linux version 4.12.0-rc4-ELAR-Systems (root@VM-CC) (gcc version 4.9.4 (Linaro GCC 4.9-2017.01) ) #1 SMP PREEMPT Tue Jun 6 20:37:37 AEST 2017
[    0.000000] CPU: ARMv7 Processor [410fc0d1] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Rockchip RK3288 Tinker Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 524288
[    0.000000] free_area_init_node: node 0, pgdat c13e2780, node_mem_map eeffa000
[    0.000000]   Normal zone: 1536 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:31
[    0.000000]   HighMem zone: 327680 pages, LIFO batch:31
[    0.000000] percpu: Embedded 17 pages/cpu @eef94000 s40832 r8192 d20608 u69632
[    0.000000] pcpu-alloc: s40832 r8192 d20608 u69632 alloc=17*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
[    0.000000] Kernel command line: earlyprintk console=tty1 root=/dev/mmcblk0p2 rw init=/sbin/init
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 2055388K/2097152K available (12288K kernel code, 958K rwdata, 3180K rodata, 1024K init, 4657K bss, 41764K reserved, 0K cma-reserved, 1310720K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
                   lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0xc0008000 - 0xc0d00000   (13280 kB)
                     .init : 0xc1200000 - 0xc1300000   (1024 kB)
                     .data : 0xc1300000 - 0xc13ef9b0   ( 959 kB)
                      .bss : 0xc13fe014 - 0xc188a488   (4658 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 45770 entries in 135 pages
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000027] Switching to timer-based delay loop, resolution 41ns
[    0.001608] Console: colour dummy device 80x30
[    0.002497] console [tty1] enabled
[    0.002582] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=24000)
[    0.002660] pid_max: default: 32768 minimum: 301
[    0.002767] Security Framework initialized
[    0.002809] Yama: becoming mindful.
[    0.002902] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002953] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.003868] CPU: Testing write buffer coherency: ok
[    0.004286] CPU0: thread -1, cpu 0, socket 5, mpidr 80000500
[    0.008807] Setting up static identity map for 0x100000 - 0x100060
[    0.017010] smp: Bringing up secondary CPUs ...
[    0.026612] CPU1: thread -1, cpu 1, socket 5, mpidr 80000501
[    0.035870] CPU2: thread -1, cpu 2, socket 5, mpidr 80000502
[    0.045140] CPU3: thread -1, cpu 3, socket 5, mpidr 80000503
[    0.045296] smp: Brought up 1 node, 4 CPUs
[    0.045446] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[    0.045488] CPU: All CPU(s) started in SVC mode.
[    0.047350] devtmpfs: initialized
[    0.063544] VFP support v0.3: implementor 41 architecture 3 part 30 variant d rev 0
[    0.063986] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.064072] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.064513] xor: measuring software checksum speed
[    0.074437]    arm4regs  :  1032.000 MB/sec
[    0.084583]    8regs     :   800.000 MB/sec
[    0.094722]    32regs    :   796.000 MB/sec
[    0.094765] xor: using function: arm4regs (1032.000 MB/sec)
[    0.094814] pinctrl core: initialized pinctrl subsystem
[    0.096118] NET: Registered protocol family 16
[    0.096748] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.099026] cpuidle: using governor ladder
[    0.099123] cpuidle: using governor menu
[    0.100107] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.100178] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.128050] gpio gpiochip0: (gpio0): added GPIO chardev (254:0)
[    0.128222] gpiochip_setup_dev: registered GPIOs 0 to 23 on device: gpiochip0 (gpio0)
[    0.128536] gpio gpiochip1: (gpio1): added GPIO chardev (254:1)
[    0.128748] gpiochip_setup_dev: registered GPIOs 24 to 55 on device: gpiochip1 (gpio1)
[    0.129045] gpio gpiochip2: (gpio2): added GPIO chardev (254:2)
[    0.129217] gpiochip_setup_dev: registered GPIOs 56 to 87 on device: gpiochip2 (gpio2)
[    0.129510] gpio gpiochip3: (gpio3): added GPIO chardev (254:3)
[    0.129681] gpiochip_setup_dev: registered GPIOs 88 to 119 on device: gpiochip3 (gpio3)
[    0.130031] gpio gpiochip4: (gpio4): added GPIO chardev (254:4)
[    0.130184] gpiochip_setup_dev: registered GPIOs 120 to 151 on device: gpiochip4 (gpio4)
[    0.130451] gpio gpiochip5: (gpio5): added GPIO chardev (254:5)
[    0.130601] gpiochip_setup_dev: registered GPIOs 152 to 183 on device: gpiochip5 (gpio5)
[    0.130915] gpio gpiochip6: (gpio6): added GPIO chardev (254:6)
[    0.131052] gpiochip_setup_dev: registered GPIOs 184 to 215 on device: gpiochip6 (gpio6)
[    0.131339] gpio gpiochip7: (gpio7): added GPIO chardev (254:7)
[    0.131476] gpiochip_setup_dev: registered GPIOs 216 to 247 on device: gpiochip7 (gpio7)
[    0.131736] gpio gpiochip8: (gpio8): added GPIO chardev (254:8)
[    0.131925] gpiochip_setup_dev: registered GPIOs 248 to 263 on device: gpiochip8 (gpio8)
[    0.195762] raid6: int32x1  gen()    89 MB/s
[    0.212811] raid6: int32x1  xor()   107 MB/s
[    0.230274] raid6: int32x2  gen()   140 MB/s
[    0.247267] raid6: int32x2  xor()   113 MB/s
[    0.264699] raid6: int32x4  gen()   113 MB/s
[    0.281869] raid6: int32x4  xor()    99 MB/s
[    0.299221] raid6: int32x8  gen()   121 MB/s
[    0.316593] raid6: int32x8  xor()    95 MB/s
[    0.316637] raid6: using algorithm int32x2 gen() 140 MB/s
[    0.316678] raid6: .... xor() 113 MB/s, rmw enabled
[    0.316717] raid6: using intx1 recovery algorithm
[    0.317176] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/vsys-regulator[0]'
[    0.317765] of_get_named_gpiod_flags: parsed 'gpio' property of node '/sdmmc-regulator[0]' - status (0)
[    0.318509] iommu: Adding device ff9a0000.vpu-service to group 0
[    0.318641] iommu: Adding device ff9c0000.hevc-service to group 1
[    0.318879] iommu: Adding device ff930000.vop to group 2
[    0.319040] iommu: Adding device ff940000.vop to group 3
[    0.321423] SCSI subsystem initialized
[    0.321832] usbcore: registered new interface driver usbfs
[    0.321960] usbcore: registered new interface driver hub
[    0.322152] usbcore: registered new device driver usb
[    0.322349] Linux video capture interface: v2.00
[    0.322436] pps_core: LinuxPPS API ver. 1 registered
[    0.322480] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.322601] PTP clock support registered
[    0.323224] Advanced Linux Sound Architecture Driver Initialized.
[    0.324067] Bluetooth: Core ver 2.22
[    0.324173] NET: Registered protocol family 31
[    0.324217] Bluetooth: HCI device and connection manager initialized
[    0.324270] Bluetooth: HCI socket layer initialized
[    0.324318] Bluetooth: L2CAP socket layer initialized
[    0.324401] Bluetooth: SCO socket layer initialized
[    0.325766] clocksource: Switched to clocksource arch_sys_counter
[    0.449419] FS-Cache: Loaded
[    0.449807] CacheFiles: Loaded
[    0.469820] NET: Registered protocol family 2
[    0.470726] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.470933] TCP bind hash table entries: 8192 (order: 5, 163840 bytes)
[    0.471242] TCP: Hash tables configured (established 8192 bind 8192)
[    0.471412] UDP hash table entries: 512 (order: 2, 24576 bytes)
[    0.471518] UDP-Lite hash table entries: 512 (order: 2, 24576 bytes)
[    0.471914] NET: Registered protocol family 1
[    0.472679] RPC: Registered named UNIX socket transport module.
[    0.472730] RPC: Registered udp transport module.
[    0.472819] RPC: Registered tcp transport module.
[    0.472863] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.474394] hw perfevents: enabled with armv7_cortex_a12 PMU driver, 7 counters available
[    0.477559] Initialise system trusted keyrings
[    0.477878] workingset: timestamp_bits=30 max_order=19 bucket_order=0
[    0.491232] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.493101] FS-Cache: Netfs 'nfs' registered for caching
[    0.493943] NFS: Registering the id_resolver key type
[    0.494016] Key type id_resolver registered
[    0.494057] Key type id_legacy registered
[    0.494111] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.494165] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.496068] Key type cifs.spnego registered
[    0.496133] Key type cifs.idmap registered
[    0.496178] ntfs: driver 2.1.32 [Flags: R/W].
[    0.496945] fuse init (API version 7.26)
[    0.498395] JFS: nTxBlock = 8192, nTxLock = 65536
[    0.505284] SGI XFS with security attributes, no debug enabled
[    0.515936] NET: Registered protocol family 38
[    0.515992] Key type asymmetric registered
[    0.516033] Asymmetric key parser 'x509' registered
[    0.516148] bounce: pool size: 64 pages
[    0.516244] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.516311] io scheduler noop registered
[    0.516349] io scheduler deadline registered
[    0.516643] io scheduler cfq registered (default)
[    0.516689] io scheduler mq-deadline registered
[    0.516729] io scheduler kyber registered
[    0.525358] dma-pl330 ff250000.dma-controller: Loaded driver for PL330 DMAC-241330
[    0.525436] dma-pl330 ff250000.dma-controller:   DBUFF-128x8bytes Num_Chans-8 Num_Peri-20 Num_Events-16
[    0.526728] dma-pl330 ffb20000.dma-controller: Loaded driver for PL330 DMAC-241330
[    0.526843] dma-pl330 ffb20000.dma-controller:   DBUFF-64x8bytes Num_Chans-5 Num_Peri-6 Num_Events-10
[    0.527741] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.530705] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 46, base_baud = 1500000) is a 16550A
[    0.532104] ff190000.serial: ttyS1 at MMIO 0xff190000 (irq = 47, base_baud = 1500000) is a 16550A
[    0.533481] ff690000.serial: ttyS2 at MMIO 0xff690000 (irq = 48, base_baud = 1500000) is a 16550A
[    0.534904] ff1b0000.serial: ttyS3 at MMIO 0xff1b0000 (irq = 49, base_baud = 1500000) is a 16550A
[    0.535921] dw-apb-uart: probe of ff1c0000.serial failed with error -28
[    0.540409] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7a808)
[    0.541037] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7a808)
[    0.541197] rockchip-drm display-subsystem: failed to bind ff980000.hdmi (ops 0xc0d7b950): -517
[    0.541659] rockchip-drm display-subsystem: master bind failed: -517
[    0.542097] usbcore: registered new interface driver udl
[    0.544910] mali ffa30000.mali: Failed to get regulator
[    0.544962] mali ffa30000.mali: Power control initialization failed
[    0.547072] brd: module loaded
[    0.561413] loop: module loaded
[    0.562674] zram: Added device: zram0
[    0.562813] lkdtm: No crash points registered, enable through debugfs
[    0.566962] libphy: Fixed MDIO Bus: probed
[    0.567011] tun: Universal TUN/TAP device driver, 1.6
[    0.569025] rk_gmac-dwmac ff290000.ethernet: PTP uses main clock
[    0.569127] rk_gmac-dwmac ff290000.ethernet: phy regulator is not available yet, deferred probing
[    0.570118] PPP generic driver version 2.4.2
[    0.570886] usbcore: registered new interface driver rt2500usb
[    0.571014] usbcore: registered new interface driver rt73usb
[    0.571134] usbcore: registered new interface driver rt2800usb
[    0.571284] usbcore: registered new interface driver rtl8192cu
[    0.571404] usbcore: registered new interface driver rtl8xxxu
[    0.571539] usbcore: registered new interface driver rndis_wlan
[    0.571586] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[    0.571718] usbcore: registered new interface driver pegasus
[    0.571878] usbcore: registered new interface driver rtl8150
[    0.572002] usbcore: registered new interface driver r8152
[    0.572129] usbcore: registered new interface driver asix
[    0.572241] usbcore: registered new interface driver ax88179_178a
[    0.572351] usbcore: registered new interface driver cdc_ether
[    0.572458] usbcore: registered new interface driver dm9601
[    0.572583] usbcore: registered new interface driver smsc75xx
[    0.572709] usbcore: registered new interface driver smsc95xx
[    0.572869] usbcore: registered new interface driver net1080
[    0.572985] usbcore: registered new interface driver rndis_host
[    0.573106] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    0.573264] usbcore: registered new interface driver cdc_ncm
[    0.573375] usbcore: registered new interface driver cdc_mbim
[    0.573940] dwc2 ff540000.usb: ff540000.usb supply vusb_d not found, using dummy regulator
[    0.574123] dwc2 ff540000.usb: ff540000.usb supply vusb_a not found, using dummy regulator
[    0.677941] dwc2 ff540000.usb: DWC OTG Controller
[    0.678024] dwc2 ff540000.usb: new USB bus registered, assigned bus number 1
[    0.678112] dwc2 ff540000.usb: irq 55, io mem 0xff540000
[    0.678550] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.678607] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.678672] usb usb1: Product: DWC OTG Controller
[    0.678714] usb usb1: Manufacturer: Linux 4.12.0-rc4-ELAR-Systems dwc2_hsotg
[    0.678807] usb usb1: SerialNumber: ff540000.usb
[    0.679856] hub 1-0:1.0: USB hub found
[    0.679964] hub 1-0:1.0: 1 port detected
[    0.680958] dwc2 ff580000.usb: ff580000.usb supply vusb_d not found, using dummy regulator
[    0.681142] dwc2 ff580000.usb: ff580000.usb supply vusb_a not found, using dummy regulator
[    0.998847] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g-tx-fifo-size, setting to default average
[    0.998960] dwc2 ff580000.usb: EPs: 10, dedicated fifos, 972 entries in SPRAM
[    0.999477] dwc2 ff580000.usb: DWC OTG Controller
[    0.999555] dwc2 ff580000.usb: new USB bus registered, assigned bus number 2
[    0.999640] dwc2 ff580000.usb: irq 56, io mem 0xff580000
[    1.000120] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    1.000178] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.000243] usb usb2: Product: DWC OTG Controller
[    1.000284] usb usb2: Manufacturer: Linux 4.12.0-rc4-ELAR-Systems dwc2_hsotg
[    1.000331] usb usb2: SerialNumber: ff580000.usb
[    1.001333] hub 2-0:1.0: USB hub found
[    1.001450] hub 2-0:1.0: 1 port detected
[    1.003734] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.003830] ehci-platform: EHCI generic platform driver
[    1.004271] ehci-platform ff500000.usb: EHCI Host Controller
[    1.004679] ehci-platform ff500000.usb: new USB bus registered, assigned bus number 3
[    1.004944] ehci-platform ff500000.usb: irq 54, io mem 0xff500000
[    1.042847] usb 1-1: new high-speed USB device number 2 using dwc2
[    1.049864] ehci-platform ff500000.usb: USB 2.0 started, EHCI 1.00
[    1.050217] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[    1.050273] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.050338] usb usb3: Product: EHCI Host Controller
[    1.050381] usb usb3: Manufacturer: Linux 4.12.0-rc4-ELAR-Systems ehci_hcd
[    1.050427] usb usb3: SerialNumber: ff500000.usb
[    1.051471] hub 3-0:1.0: USB hub found
[    1.051576] hub 3-0:1.0: 1 port detected
[    1.052641] usbcore: registered new interface driver cdc_acm
[    1.052690] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    1.052901] usbcore: registered new interface driver usblp
[    1.053023] usbcore: registered new interface driver cdc_wdm
[    1.053217] usbcore: registered new interface driver usb-storage
[    1.053404] usbcore: registered new interface driver usbserial
[    1.053514] usbcore: registered new interface driver usbserial_generic
[    1.053611] usbserial: USB Serial support registered for generic
[    1.053729] usbcore: registered new interface driver cp210x
[    1.053859] usbserial: USB Serial support registered for cp210x
[    1.054006] usbcore: registered new interface driver ftdi_sio
[    1.054095] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.054361] usbcore: registered new interface driver keyspan
[    1.054451] usbserial: USB Serial support registered for Keyspan - (without firmware)
[    1.054558] usbserial: USB Serial support registered for Keyspan 1 port adapter
[    1.054661] usbserial: USB Serial support registered for Keyspan 2 port adapter
[    1.054813] usbserial: USB Serial support registered for Keyspan 4 port adapter
[    1.054962] usbcore: registered new interface driver option
[    1.055051] usbserial: USB Serial support registered for GSM modem (1-port)
[    1.055363] usbcore: registered new interface driver oti6858
[    1.055452] usbserial: USB Serial support registered for oti6858
[    1.055569] usbcore: registered new interface driver pl2303
[    1.055657] usbserial: USB Serial support registered for pl2303
[    1.055824] usbcore: registered new interface driver qcserial
[    1.055916] usbserial: USB Serial support registered for Qualcomm USB modem
[    1.056056] usbcore: registered new interface driver sierra
[    1.056145] usbserial: USB Serial support registered for Sierra USB modem
[    1.057426] usbcore: registered new interface driver iforce
[    1.057580] usbcore: registered new interface driver xpad
[    1.057892] usbcore: registered new interface driver usbtouchscreen
[    1.058719] i2c /dev entries driver
[    1.059970] rk3x-i2c ff140000.i2c: Initialized RK3xxx I2C bus at f0f09000
[    1.060960] rk3x-i2c ff150000.i2c: Initialized RK3xxx I2C bus at f0f0b000
[    1.061979] rk3x-i2c ff160000.i2c: Initialized RK3xxx I2C bus at f0f0d000
[    1.062979] rk3x-i2c ff170000.i2c: Initialized RK3xxx I2C bus at f0f0f000
[    1.068867] rk808 0-001b: GPIO lookup for consumer dvs
[    1.068880] rk808 0-001b: using device tree for GPIO lookup
[    1.068927] of_get_named_gpiod_flags: parsed 'dvs-gpios' property of node '/i2c@ff650000/pmic@1b[0]' - status (0)
[    1.069166] rk808 0-001b: GPIO lookup for consumer dvs
[    1.069179] rk808 0-001b: using device tree for GPIO lookup
[    1.069231] of_get_named_gpiod_flags: parsed 'dvs-gpios' property of node '/i2c@ff650000/pmic@1b[1]' - status (0)
[    1.069379] DCDC_REG1: supplied by vcc_sys
[    1.070864] DCDC_REG2: supplied by vcc_sys
[    1.072102] DCDC_REG3: supplied by vcc_sys
[    1.072618] DCDC_REG4: supplied by vcc_sys
[    1.073705] LDO_REG1: supplied by vcc_sys
[    1.075567] LDO_REG2: supplied by vcc_sys
[    1.077026] LDO_REG3: supplied by vcc_sys
[    1.078595] LDO_REG4: supplied by vcc_io
[    1.080125] LDO_REG5: supplied by vcc_io
[    1.081197] LDO_REG6: supplied by vcc_io
[    1.082889] LDO_REG7: supplied by vcc_sys
[    1.084511] LDO_REG8: supplied by vcc_sys
[    1.086026] SWITCH_REG1: supplied by vcc_io
[    1.086523] SWITCH_REG2: supplied by vcc_io
[    1.091132] rk808-rtc rk808-rtc: rtc core: registered rk808-rtc as rtc0
[    1.091741] rk3x-i2c ff650000.i2c: Initialized RK3xxx I2C bus at f0f11000
[    1.092832] rk3x-i2c ff660000.i2c: Initialized RK3xxx I2C bus at f0f13000
[    1.093528] usbcore: registered new interface driver uvcvideo
[    1.093574] USB Video Class driver (1.1.1)
[    1.093613] Driver for 1-wire Dallas network protocol.
[    1.097663] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com
[    1.098288] Bluetooth: HCI UART driver ver 2.3
[    1.098338] Bluetooth: HCI UART protocol H4 registered
[    1.098380] Bluetooth: HCI UART protocol LL registered
[    1.098420] Bluetooth: HCI UART protocol ATH3K registered
[    1.098565] usbcore: registered new interface driver bfusb
[    1.098704] usbcore: registered new interface driver btusb
[    1.098797] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    1.102043] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 500000 KHz
[    1.102290] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 600000 KHz
[    1.103107] pwrseq_simple sdio-pwrseq: GPIO lookup for consumer reset
[    1.103111] pwrseq_simple sdio-pwrseq: using device tree for GPIO lookup
[    1.103122] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/sdio-pwrseq[0]' - status (0)
[    1.103142] pwrseq_simple sdio-pwrseq: GPIO lookup for consumer reset
[    1.103145] pwrseq_simple sdio-pwrseq: using device tree for GPIO lookup
[    1.103157] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/sdio-pwrseq[1]' - status (0)
[    1.103272] sdhci: Secure Digital Host Controller Interface driver
[    1.103286] sdhci: Copyright(c) Pierre Ossman
[    1.103297] Synopsys Designware Multimedia Card Interface Driver
[    1.103720] dwmmc_rockchip ff0c0000.dwmmc: IDMAC supports 32-bit address mode.
[    1.103772] dwmmc_rockchip ff0c0000.dwmmc: Using internal DMA controller.
[    1.103789] dwmmc_rockchip ff0c0000.dwmmc: Version ID is 270a
[    1.103822] dwmmc_rockchip ff0c0000.dwmmc: DW MMC controller at irq 38,32 bit host data width,256 deep fifo
[    1.103923] dwmmc_rockchip ff0c0000.dwmmc: GPIO lookup for consumer cd
[    1.103926] dwmmc_rockchip ff0c0000.dwmmc: using device tree for GPIO lookup
[    1.103930] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/dwmmc@ff0c0000[0]'
[    1.103934] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/dwmmc@ff0c0000[0]'
[    1.103937] dwmmc_rockchip ff0c0000.dwmmc: using lookup tables for GPIO lookup
[    1.103940] dwmmc_rockchip ff0c0000.dwmmc: lookup for GPIO cd failed
[    1.103944] dwmmc_rockchip ff0c0000.dwmmc: GPIO lookup for consumer wp
[    1.103947] dwmmc_rockchip ff0c0000.dwmmc: using device tree for GPIO lookup
[    1.103950] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/dwmmc@ff0c0000[0]'
[    1.103953] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/dwmmc@ff0c0000[0]'
[    1.103956] dwmmc_rockchip ff0c0000.dwmmc: using lookup tables for GPIO lookup
[    1.103959] dwmmc_rockchip ff0c0000.dwmmc: lookup for GPIO wp failed
[    1.115810] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    1.127795] dwmmc_rockchip ff0c0000.dwmmc: 1 slots initialized
[    1.128103] dwmmc_rockchip ff0d0000.dwmmc: IDMAC supports 32-bit address mode.
[    1.128133] dwmmc_rockchip ff0d0000.dwmmc: Using internal DMA controller.
[    1.128150] dwmmc_rockchip ff0d0000.dwmmc: Version ID is 270a
[    1.128178] dwmmc_rockchip ff0d0000.dwmmc: DW MMC controller at irq 39,32 bit host data width,256 deep fifo
[    1.128203] dwmmc_rockchip ff0d0000.dwmmc: 'clock-freq-min-max' property was deprecated.
[    1.128240] dwmmc_rockchip ff0d0000.dwmmc: GPIO lookup for consumer wp
[    1.128243] dwmmc_rockchip ff0d0000.dwmmc: using device tree for GPIO lookup
[    1.128247] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/dwmmc@ff0d0000[0]'
[    1.128250] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/dwmmc@ff0d0000[0]'
[    1.128253] dwmmc_rockchip ff0d0000.dwmmc: using lookup tables for GPIO lookup
[    1.128257] dwmmc_rockchip ff0d0000.dwmmc: lookup for GPIO wp failed
[    1.128287] dwmmc_rockchip ff0d0000.dwmmc: allocated mmc-pwrseq
[    1.128301] mmc_host mmc1: card is non-removable.
[    1.139780] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    1.151840] dwmmc_rockchip ff0d0000.dwmmc: 1 slots initialized
[    1.151940] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.152036] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/pwr-led[0]' - status (0)
[    1.152042] no flags found for gpios
[    1.152109] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/act-led[0]' - status (0)
[    1.152115] no flags found for gpios
[    1.152179] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/heartbeat-led[0]' - status (0)
[    1.152184] no flags found for gpios
[    1.152345] ledtrig-cpu: registered to indicate activity on CPUs
[    1.152400] hidraw: raw HID events driver (C) Jiri Kosina
[    1.152801] usbcore: registered new interface driver usbhid
[    1.152818] usbhid: USB HID core driver
[    1.153003] ashmem: initialized
[    1.153958] usbcore: registered new interface driver snd-usb-audio
[    1.155206] u32 classifier
[    1.155221] Netfilter messages via NETLINK v0.30.
[    1.155355] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[    1.155476] ctnetlink v0.93: registering with nfnetlink.
[    1.155624] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.155786] Initializing XFRM netlink socket
[    1.156081] NET: Registered protocol family 10
[    1.156515] Segment Routing with IPv6
[    1.156567] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    1.156657] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.156978] NET: Registered protocol family 17
[    1.157000] NET: Registered protocol family 15
[    1.157079] Bluetooth: RFCOMM socket layer initialized
[    1.157104] Bluetooth: RFCOMM ver 1.11
[    1.157120] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    1.157135] Bluetooth: HIDP socket layer initialized
[    1.157169] 8021q: 802.1Q VLAN Support v1.8
[    1.157188] lib80211: common routines for IEEE802.11 drivers
[    1.157201] lib80211_crypt: registered algorithm 'NULL'
[    1.157204] lib80211_crypt: registered algorithm 'WEP'
[    1.157209] lib80211_crypt: registered algorithm 'CCMP'
[    1.157212] lib80211_crypt: registered algorithm 'TKIP'
[    1.157223] Key type dns_resolver registered
[    1.157326] ThumbEE CPU extension supported.
[    1.157343] Registering SWP/SWPB emulation handler
[    1.157641] Loading compiled-in X.509 certificates
[    1.158227] Btrfs loaded, crc32c=crc32c-generic
[    1.162568] random: fast init done
[    1.165884] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7a808)
[    1.166112] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7a808)
[    1.166222] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[    1.166504] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d7b950)
[    1.166525] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.166537] [drm] No driver support for vblank timestamp query.
[    1.173148] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
[    1.173869] mmc1: new high speed SDIO card at address 0001
[    1.218128] mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 100000000Hz, actual 100000000HZ div = 0)
[    1.219142] usb 1-1: New USB device found, idVendor=05e3, idProduct=0610
[    1.219169] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.219184] usb 1-1: Product: USB2.0 Hub
[    1.219754] hub 1-1:1.0: USB hub found
[    1.220072] hub 1-1:1.0: 4 ports detected
[    1.342833] Console: switching to colour frame buffer device 240x67
[    1.358704] rockchip-drm display-subsystem: fb0:  frame buffer device
[    1.359025] [drm] Initialized rockchip 1.0.0 20140818 for display-subsystem on minor 0
[    1.359724] mali ffa30000.mali: GPU identified as 0x0750 r0p0 status 1
[    1.360340] mali ffa30000.mali: Probed as mali0
[    1.360908] rk_gmac-dwmac ff290000.ethernet: PTP uses main clock
[    1.361028] rk_gmac-dwmac ff290000.ethernet: clock input or output? (input).
[    1.361106] rk_gmac-dwmac ff290000.ethernet: TX delay(0x30).
[    1.361172] rk_gmac-dwmac ff290000.ethernet: RX delay(0x10).
[    1.361290] rk_gmac-dwmac ff290000.ethernet: clock input from PHY
[    1.366362] rk_gmac-dwmac ff290000.ethernet: init for RGMII
[    1.366440] stmmac - user ID: 0x10, Synopsys ID: 0x35
[    1.366497] rk_gmac-dwmac ff290000.ethernet: Ring mode enabled
[    1.366559] rk_gmac-dwmac ff290000.ethernet: DMA HW capability register supported
[    1.366637] rk_gmac-dwmac ff290000.ethernet: Normal descriptors
[    1.366700] rk_gmac-dwmac ff290000.ethernet: RX Checksum Offload Engine supported
[    1.366795] usb 3-1: new high-speed USB device number 2 using ehci-platform
[    1.366893] rk_gmac-dwmac ff290000.ethernet: COE Type 2
[    1.366949] rk_gmac-dwmac ff290000.ethernet: TX Checksum insertion supported
[    1.367023] rk_gmac-dwmac ff290000.ethernet: Wake-Up On Lan supported
[    1.367109] rk_gmac-dwmac ff290000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    1.367251] of_get_named_gpiod_flags: parsed 'snps,reset-gpio' property of node '/ethernet@ff290000[0]' - status (0)
[    1.515028] dwmmc_rockchip ff0c0000.dwmmc: Successfully tuned phase to 129
[    1.515121] mmc0: new ultra high speed SDR50 SDHC card at address aaaa
[    1.515501] mmcblk0: mmc0:aaaa SU08G 7.40 GiB 
[    1.516502]  mmcblk0: p1 p2
[    1.579757] usb 1-1.1: new low-speed USB device number 3 using dwc2
[    1.663304] usb 1-1.1: New USB device found, idVendor=046d, idProduct=c52a
[    1.663386] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.663466] usb 1-1.1: Product: 2.4GHz Cordless Desktop
[    1.663523] usb 1-1.1: Manufacturer: Logitech
[    1.669443] input: Logitech 2.4GHz Cordless Desktop as /devices/platform/ff540000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:046D:C52A.0001/input/input0
[    1.721261] hid-generic 0003:046D:C52A.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech 2.4GHz Cordless Desktop] on usb-ff540000.usb-1.1/input0
[    1.730115] input: Logitech 2.4GHz Cordless Desktop as /devices/platform/ff540000.usb/usb1/1-1/1-1.1/1-1.1:1.1/0003:046D:C52A.0002/input/input1
[    1.785149] hid-generic 0003:046D:C52A.0002: input,hiddev96,hidraw1: USB HID v1.11 Mouse [Logitech 2.4GHz Cordless Desktop] on usb-ff540000.usb-1.1/input1
[    1.790273] usb 3-1: config 1 has an invalid interface number: 255 but max is 6
[    1.793564] usb 3-1: config 1 has no interface number 6
[    1.801260] usb 3-1: New USB device found, idVendor=0bda, idProduct=481a
[    1.804546] usb 3-1: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[    1.807823] usb 3-1: Product: USB Audio
[    1.811082] usb 3-1: Manufacturer: Generic
[    1.814350] usb 3-1: SerialNumber: 201405280001
[    2.413968] libphy: stmmac: probed
[    2.417234] rk_gmac-dwmac ff290000.ethernet (unnamed net_device) (uninitialized): PHY ID 001cc915 at 0 IRQ POLL (stmmac-0:00) active
[    2.420571] rk_gmac-dwmac ff290000.ethernet (unnamed net_device) (uninitialized): PHY ID 001cc915 at 1 IRQ POLL (stmmac-0:01)
[    2.424395] OF: /sound/simple-audio-card,codec: could not get #sound-dai-cells for /hdmi@ff980000
[    2.427704] asoc-simple-card sound: parse error -22
[    2.431005] asoc-simple-card: probe of sound failed with error -22
[    2.434522] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/button@0[0]' - status (0)
[    2.434539] gpio-5 (GPIO Key Power): gpiod_set_debounce: missing set() or set_config() operations
[    2.434662] input: gpio-keys as /devices/platform/gpio-keys/input/input2
[    2.438564] rk808-rtc rk808-rtc: setting system clock to 2017-06-06 10:44:13 UTC (1496745853)
[    2.442197] vcc_sd: supplied by vcc_io
[    2.445460] vcc_sd: disabling
[    2.448631] ALSA device list:
[    2.451782]   No soundcards found.
[    2.774475] random: crng init done
[    3.919229] input: Generic USB Audio as /devices/platform/ff500000.usb/usb3/3-1/3-1:1.255/0003:0BDA:481A.0003/input/input3
[    3.973987] hid-generic 0003:0BDA:481A.0003: input,hiddev97,hidraw2: USB HID v1.11 Device [Generic USB Audio] on usb-ff500000.usb-1/input255
[    3.980064] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    3.993570] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.996914] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    4.001601] devtmpfs: mounted
[    4.005992] Freeing unused kernel memory: 1024K
[    4.009433] rodata_test: all tests were successful
[    4.243906] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
[    4.247858] systemd[1]: Detected architecture arm.
[    4.270457] systemd[1]: Set hostname to <ELAR-Systems>.
[    4.494433] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    4.503845] systemd[1]: Reached target Remote File Systems (Pre).
[    4.513196] systemd[1]: Listening on fsck to fsckd communication Socket.
[    4.522807] systemd[1]: Created slice System Slice.
[    4.539178] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    4.548714] systemd[1]: Reached target Swap.
[    4.558096] systemd[1]: Reached target Encrypted Volumes.
[    4.760085] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    4.977821] systemd-journald[149]: Received request to flush runtime journal from PID 1
[    5.707222] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[    5.711528] RTL8723BS: module init start
[    5.711535] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[    5.711537] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[    5.711764] pnetdev = ee9ea000
[    5.751805] RTL8723BS: rtw_ndev_init(wlan0)
[    5.752633] RTL8723BS: module init ret =0
[    8.380539] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[    8.388503] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[    8.389507] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[    8.389513] Request firmware failed with error 0xfffffffe
[    8.409289] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.409413] rk_gmac-dwmac ff290000.ethernet eth0: device MAC address fe:09:e7:82:c1:be
[    8.410318] Generic PHY stmmac-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-0:00, irq=-1)
[    8.493253] rk_gmac-dwmac ff290000.ethernet eth0: PTP not supported by HW
[    8.493427] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.535405] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.575294] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.608072] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[    8.608106] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[    8.608110] Request firmware failed with error 0xfffffffe
[    8.609616] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[    8.609648] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[    8.609653] Request firmware failed with error 0xfffffffe
[   19.012683] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[   19.012717] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[   19.012721] Request firmware failed with error 0xfffffffe
[   19.013631] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[   19.013666] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[   19.013670] Request firmware failed with error 0xfffffffe
[   29.016511] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[   29.016544] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[   29.016549] Request firmware failed with error 0xfffffffe
[   29.017408] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[   29.017433] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[   29.017438] Request firmware failed with error 0xfffffffe
[   38.762375] ttyS0 - failed to request DMA
[   39.021621] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[   39.021653] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[   39.021657] Request firmware failed with error 0xfffffffe
[   39.022534] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[   39.022559] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[   39.022562] Request firmware failed with error 0xfffffffe
[   49.013360] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[   49.013395] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[   49.013400] Request firmware failed with error 0xfffffffe
[   49.014442] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[   49.014472] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[   49.014478] Request firmware failed with error 0xfffffffe
[   54.041024] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   54.058580] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   59.016145] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[   59.016180] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[   59.016185] Request firmware failed with error 0xfffffffe
[   59.017275] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[   59.017303] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[   59.017308] Request firmware failed with error 0xfffffffe
[   99.063140] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   99.099946] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  144.063488] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  144.107477] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  189.079495] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
sghazagh commented 7 years ago

Hang on... It seems it is trying to read firmware from rtlwifi folder...

Update: I copied the firmware files you have provided into the /lib/firmware/rtlwifi folder and wifi is working now Wowwwwwwwwwwwwwwwww

Well done bro :)))))

sghazagh commented 7 years ago

can you explain me what are these files: vmlinuz-4.12.0-rc4-ELAR-Systems System.map-4.12.0-rc4-ELAR-Systems

I haven't used them and but devise is booting just fine!

Meanwhile, I do not see Mali Driver Loaded! I'm just seeing r8723bs and dw_hdmi_i2s_audio modules are loded! I remember in older version I was seeing Mali driver loaded as a module as well!!!

Next step: Bluetooth ;)

Miouyouyou commented 7 years ago

Ah... I might have integrated it instead of building it as a module... I'll build the Mali driver as a module for the next release. There have been some hiccups between -rc3 and -rc4 in terms of configuration :smiley:

However, as long as /dev/mali0 is there, the Mali driver should be usable.

Anyway, nice to see that the Wifi is working !

Concerning the vmlinuz and System.map, the vmlinuz should be a vmlinux file compressed. vmlinux being the kernel executable image itself. Now, the thing is make zImage tends to also create a compressed image that is far smaller that vmlinuz so I'm not actually using it. However, this file is created automatically when doing make install and this should actually be used by the U-Boot instead of the zImage. That said, my few attempts at loading a vmlinuz image directly failed while the zImage always worked so...

The System.map is only used for debugging, bug reporting and compiling OOT modules. It provides a map of the addresses of the different procedures symbols (procedures names, global variables names, ...) used by the kernel. You might not need it but if you want to send a bug report to the LKML, they'll want you to provide this file.

Miouyouyou commented 7 years ago

For the Bluetooth, I wonder what chip is used. Is it the same as the Wifi chip ?

sghazagh commented 7 years ago

Well done mate. You made me your fan :) Thanks for the explanation. For Blutooth, I'll let you know by tomorrow, the official image has some info which should help.

I have to go to sleep, it's night here in Australia....If you don't mind, where are you from?

Miouyouyou commented 7 years ago

I'm from France. So, it's noon here :).

Have a good night and I'll take a look at the reboot issue this week-end or next week !

sghazagh commented 7 years ago

Hello my friend, The chip is same and supports both Wifi and BT. Have a look at this file PDF which is rtl8723bs chip specification.

One thing which made me curious is that, the BT uses UART as per specification says. I use u-boot which uses UART2. I thought maybe UART is conflicting between U-Boot and BT?

I am not sure as I do not understand the hardware things that much. What do you think? Can that happens or I am totally wrong? If yes, I can change the mainline U-Boot to use another UART like UART1 or UART3 for instance. Do you think that might resolve the BT issue as the BT cannot be listed in the devices at all!

In official image, if you list devices by "rfkill list" it gives you two device:

But in my rootfs/your kernel we only can see "phy0" and that is WLAN! Any thought?

You understand Schematic but I don't. Can you have a look at Tinker Board Schematic and see if my claim is correct or not?

UPDATE: I changed the u-boot to use UART1 in tinker board u-boot DTS file and got the output on uart1. However, there was no change and I still couldn't see the BT device!

Miouyouyou commented 7 years ago

Interesting, I've seen some firmwares for the Bluetooth device but, looking at your dmesg, it looks like the system is not trying to load the Bluetooth firmware at all. I'll try to take a look at the code and see if there's any relevant in that matter.

If I'm not mistaken, this should be the BT firmware : https://github.com/Miouyouyou/MyyQi/blob/master/firmwares/rtl8723bs_bt.bin

Meanwhile, could you take a look at the official image with BT working and see if there's any useful firmware image, and look at dmesg for BT related messages.

I'll take a look at the schematics and at the Tinkerboard's 4.4 kernel DTS and see if there's anything missing in the rk3288-tinker.dts and rk3288-miniarm.dts that might be useful.

sghazagh commented 7 years ago

I also have tried the official Kernel with modules and firmware and device tree. Same happened and I cannot see any devices! When I use Blutooth Manager app , it says the BT should be enabled. I don't know if any GPIO or something needs to power up the device. I checked the official image /sys/class/gpio and all GPIOS available there is available in my rootfs too!

in official image /lib/firmware, it was a folder rtlbt which had two files:

I already have copied them into my rootfs /lib/firmware folder!

But the interesting point is that, dmesg say nothing about Bluetooth ! Whole dmesg log is added above!

Meanwhile, it seems that the reboot does not work on your kernel 4.12.0-rc4! Is there anything that you can fix?

UPDATE: Actually, i see some message for bluetooth in dmesg:

...
[    0.323474] Bluetooth: Core ver 2.22
[    0.323581] NET: Registered protocol family 31
[    0.323624] Bluetooth: HCI device and connection manager initialized
[    0.323678] Bluetooth: HCI socket layer initialized
[    0.323725] Bluetooth: L2CAP socket layer initialized
[    0.323808] Bluetooth: SCO socket layer initialized
...
...
....
[    1.101492] Bluetooth: HCI UART driver ver 2.3
[    1.101542] Bluetooth: HCI UART protocol H4 registered
[    1.101584] Bluetooth: HCI UART protocol LL registered
[    1.101624] Bluetooth: HCI UART protocol ATH3K registered
[    1.101769] usbcore: registered new interface driver bfusb
[    1.101909] usbcore: registered new interface driver btusb
[    1.101954] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
Miouyouyou commented 7 years ago

Hmm... I'll try to see at the SunXi boards that use the same drivers, see if they enable bluetooth and how they enable it. I'll also take a look at rk3288-veyron and see how they enable bluetooth for their Google Chromebook. Even if that's not the same chip, it might provide some useful hints.

sghazagh commented 7 years ago

Thanks, will follow you to see if you get any progress...

Thanks again

Tonymac32 commented 7 years ago

I haven't had the time, but also take a look at this perhaps: https://github.com/lwfinger/rtl8723bs_bt It mentions H5 protocol, I believe CONFIG_BT_HCIUART_3WIRE which isn't set in the Armbian config.
The device should not be on the 2nd UART, as that is exposed on the GPIO header.

Tonymac32 commented 7 years ago

I would suggest closing this issue and opening a new one for BT. ;-)

sghazagh commented 7 years ago

Agree... Just remember to move Firmware to "rtlwifi" folder as by default it's looking for that folder to find the firmwars.