Coder Social home page Coder Social logo

xradio's Introduction

xradio

Port Allwinner xradio driver to mainline Linux.

#Building

Something like this:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -C <PATH TO YOUR LINUX SRC> M=$PWD modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -C <PATH TO YOUR LINUX SRC> M=$PWD INSTALL_MOD_PATH=<PATH TO INSTALL MODULE> modules_install

#How to use this

You need to specify one or two regulators for the xr819's 1.8v and 3.3v supplies in your device tree. The orange pi zero only has control over the 1.8v regulator and a 3.3v fixed regulator is provided elsewhere so we one need one there:

vdd_wifi: vdd_wifi {
	compatible = "regulator-fixed";
	regulator-name = "wifi";
	regulator-min-microvolt = <1800000>;
	regulator-max-microvolt = <1800000>;
	gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>;
	startup-delay-us = <70000>;
	enable-active-high;
};

Next you need a pwrseq node that controls the reset pin of the xr819.

pwrseq_wifi: pwrseq_wifi@0 {
	compatible = "mmc-pwrseq-simple";
	pinctrl-names = "default";
	pinctrl-0 = <&wifi_rst>;
	reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>;
	post-power-on-delay-ms = <50>;
};

Next you need to add some things to the mmc node that the xr819 is connected to.

&mmc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&mmc1_pins_a>;
	vqmmc-supply = <&vdd_wifi>;
	vmmc-supply = <&reg_vcc3v3>;
	bus-width = <4>;
	mmc-pwrseq = <&pwrseq_wifi>;
	non-removable;
	status = "okay";

        xr819wifi: xr819wifi@1 {
                reg = <1>;
                compatible = "xradio,xr819";
                pinctrl-names = "default";
                pinctrl-0 = <&wifi_wake>;
                interrupt-parent = <&pio>;
                interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
                interrupt-names = "host-wake";
                local-mac-address = [dc 44 6d c0 ff ee];
        };
};

vqmmc-supply and vmmc-supply should reference the regulators that control the xr819 supplies. The device tree for the SoC the orange pi zero is based on supplies a fixed 3.3v regulator so we use that for vmmc-supply and provide the 1.8v controllable regulator as vqmmc-supply. vqmcc-supply is apparently for the IO supply which is 3.3v for the orange pi zero but swapping vqmmc and vmmc around results in the kernel complaining that the card's (the xr819) required IO voltage isn't supported. The setup above might not be technically correct but does work. The xr819 node should be self explanatory. The compatible string is used by the driver to find the node. The wake interrupt from the xr819 needs to be provided.

Finally you can specify a MAC address to use. If you don't set one you will get a random one on each boot. Instead of creating a new device tree file for every system you should probably overwrite the address given after loading the device tree in u-boot. For the sunxi uboot all you have to actually do is add something like "ethernet1 = &xr819wifi;" to the aliases section of the device tree you give to the kernel and u-boot will update the mac address to something based on the unique chip id for you.

What works, what doesn't

Working:

Standard client station mode seems to work fine. Master (AP) mode works with WPA/WPA2 enabled etc. Dual role station and master mode.

#Issues

The firmware running on the xr819 is very crash happy and the driver is a bit stupid. For example the driver can get confused about how many packets of data the xr819 has for it to read and can try to read too many. The firmware on the xr819 responds by triggering an assert and shutting down. The driver gets a packet that tells it that the firmware is dead and shuts down the thread used to push and pull data but the rest of the driver and the os has no idea and if the os tries to interact with the driver everything starts to lock up.

Pings from the device to the network are faster than from the network to the device. This seems to be because of latency between the interrupt and servicing RX reports from the device.

#Fun stuff

The driver is based on the driver for the ST CW1100/CW1200 chips. The XR819 is probably a clone, licensed version or actually a CW1100 family chip that has been packaged by xradio/allwinner as the CW1100 is available as a raw wafer.

The silicon version from the XR819 and procedure for loading firmware matches up with the CW1x60 chips which were apparently never released so maybe Allwinner bought the design after the ST/Ericsson split?

If anyone wants to mainline support for the XR819 they should probably do it by adding support for the XR819 to the existing CW1200 driver so they don't have to get thousands and thousands of lines of code signed off.

xradio's People

Contributors

andre-arm avatar demirten avatar fifteenhex avatar icenowy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xradio's Issues

Can't connect open wifi networks

I tried with network-manager, networking and wpa_supplicant but cant connect APs that doesnt have encryption. I think there is driver related problem. My system is orange pi zero and ubuntu 16.04 nightly armbian release(which dont give any support for it) ๐Ÿ˜…

OpenWRT/LEDE wlan0(mac80211): Interface type not supported

Hi,
Using this guide:
https://gist.github.com/praveenbm5/3c81692e6b2b651bb450fb7fc45dff4d

adding wifi config of:

config wifi-device radio0
        option type     'mac80211'
        option channel  'auto'
        option path 'platform/soc/1c10000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'

gives:

root@LEDE:~# wifi
wlan0(mac80211): Interface type not supported
wlan0(mac80211): Interface type not supported

it can scan networks properly but not activate AP mode or STA
I believe that probably due driver is not (fully) mac80211 compatible, does it?

kernel Oops for xr819 module

Hello I'm try to use this xr819 driver for allwinner H6. My kernel version is mainline 5.3. I get the dmesg as follows:

[    9.100604] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[    9.109409] Mem abort info:
[    9.112205]   ESR = 0x96000004
[    9.115262]   Exception class = DABT (current EL), IL = 32 bits
[    9.121180]   SET = 0, FnV = 0
[    9.124234]   EA = 0, S1PTW = 0
[    9.127374] Data abort info:
[    9.130254]   ISV = 0, ISS = 0x00000004
[    9.134088]   CM = 0, WnR = 0
[    9.137059] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000a2fea000
[    9.143497] [0000000000000000] pgd=0000000000000000
[    9.148378] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[    9.153948] Modules linked in: xradio_wlan(+) crct10dif_ce dwmac_sun8i rfkill_gpio ipv6 nf_defrag_ipv6
[    9.163269] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.3.5-g45c72b0-dirty #24
[    9.170489] Hardware name: Tanix TX6 (DT)
[    9.174500] pstate: a0000085 (NzCv daIf -PAN -UAO)
[    9.179303] pc : __wake_up_common+0x60/0x150
[    9.183574] lr : __wake_up_common_lock+0x80/0xc8
[    9.188190] sp : ffff000010003cf0
[    9.191503] x29: ffff000010003cf0 x28: 0000000000000000 
[    9.196816] x27: 0000000000000000 x26: 0000000000000001 
[    9.202129] x25: 0000000000000000 x24: 0000000000000000 
[    9.207441] x23: 0000000000000003 x22: ffff80006315e360 
[    9.212754] x21: ffff000010003da0 x20: 0000000000000001 
[    9.218066] x19: ffff80006315e358 x18: 0000000000000000 
[    9.223379] x17: 0000000000000000 x16: 0000000000000000 
[    9.228691] x15: 0000000000000000 x14: 0000000000000000 
[    9.234003] x13: 0000000000000000 x12: 0000000000000000 
[    9.239316] x11: 0000000000000003 x10: 0000000000000040 
[    9.244628] x9 : ffff000010ec0c10 x8 : ffff000010ec0c08 
[    9.249940] x7 : ffff800064dacbb0 x6 : ffffffffffffffe8 
[    9.255252] x5 : ffff000010003da0 x4 : 0000000000000000 
[    9.260565] x3 : 0000000000000000 x2 : 0000000000000001 
[    9.265877] x1 : 0000000000000003 x0 : 0000000000000000 
[    9.271189] Call trace:
[    9.273640]  __wake_up_common+0x60/0x150
[    9.277564]  __wake_up_common_lock+0x80/0xc8
[    9.281835]  __wake_up+0x14/0x20
[    9.285092]  xradio_irq_handler+0x28/0x30 [xradio_wlan]
[    9.290337]  sdio_irq_handler+0x14/0x28 [xradio_wlan]
[    9.295392]  __handle_irq_event_percpu+0x74/0x188
[    9.300098]  handle_irq_event_percpu+0x34/0x88
[    9.304542]  handle_irq_event+0x48/0x78
[    9.308381]  handle_fasteoi_irq+0xb4/0x188
[    9.312478]  generic_handle_irq+0x24/0x38
[    9.316492]  sunxi_pinctrl_irq_handler+0x120/0x1c0
[    9.321283]  generic_handle_irq+0x24/0x38
[    9.325294]  __handle_domain_irq+0x5c/0xb0
[    9.329392]  gic_handle_irq+0x58/0xa8
[    9.333055]  el1_irq+0xb8/0x180
[    9.336200]  arch_cpu_idle+0x10/0x18
[    9.339780]  do_idle+0x1d0/0x2b0
[    9.343011]  cpu_startup_entry+0x20/0x28
[    9.346937]  rest_init+0xd4/0xe0
[    9.350171]  arch_call_rest_init+0xc/0x14
[    9.354184]  start_kernel+0x460/0x48c
[    9.357851] Code: 2a0103f7 f9002bbb aa0403f9 5280001b (f9400cd3) 
[    9.363950] ---[ end trace 0fb63f6098d742c3 ]---
[    9.368568] Kernel panic - not syncing: Fatal exception in interrupt
[    9.374922] SMP: stopping secondary CPUs
[    9.378846] Kernel Offset: disabled
[    9.382336] CPU features: 0x0002,20002004
[    9.386344] Memory Limit: none
[    9.389403] Rebooting in 10 seconds..

My dts file :

#include "sun50i-h6.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
	model = "Tanix TX6";
	compatible = "oranth,tanix-tx6", "allwinner,sun50i-h6";

	aliases {
		ethernet0 = &emac;
		ethernet1 = &xr819wifi;
		serial0 = &uart0;
	};

	vdd_wifi: vdd_wifi {
		compatible = "regulator-fixed";
		regulator-name = "wifi";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; //PH4
		startup-delay-us = <70000>;
		enable-active-high;
	};

	
	pwrseq_wifi: pwrseq_wifi@0 {
		compatible = "mmc-pwrseq-simple";
//		pinctrl-names = "default";
//		pinctrl-0 = <&wifi_rst>;
		reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; //PM3
		post-power-on-delay-ms = <50>;
	};
	
};



&mmc1 {
//	pinctrl-names = "default";
//	pinctrl-0 = <&mmc1_pins>;
	vqmmc-supply = <&vdd_wifi>;
	vmmc-supply = <&reg_vcc3v3>;
	mmc-pwrseq = <&pwrseq_wifi>;
	bus-width = <4>;
	non-removable;
	status = "okay";

        xr819wifi: xr819wifi@1 {
                reg = <1>;
                compatible = "xradio,xr819";
//                pinctrl-names = "default";
//                pinctrl-0 = <&wifi_wake>;
                interrupt-parent = <&r_pio>;
                interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* PM0 *///<6 10 IRQ_TYPE_EDGE_RISING>;
                interrupt-names = "host-wake";
                local-mac-address = [dc 44 6d c0 ff ee];
        };
};

can you gave me some advice about how to address this problem? tks.
best wishes.

Receive failure: 4

re: https://forum.armbian.com/topic/11966-orange-pi-zero-wifi-no-arp-replies/

Linux orangepizero 4.19.62-sunxi #5.92 SMP Wed Jul 31 22:07:23 CEST 2019 armv7l armv7l armv7l GNU/Linux

i get a constant spew of the following on my orange pi zero:

[  579.112461] xradio_wlan mmc1:0001:1: [RX] IF=0, Receive failure: 4.
[  579.112469] xradio_wlan mmc1:0001:1: dropped received frame
[  579.113597] xradio_wlan mmc1:0001:1: [RX] IF=0, Receive failure: 4.
[  579.113604] xradio_wlan mmc1:0001:1: dropped received frame
[  580.034552] xradio_wlan mmc1:0001:1: [RX] IF=0, Receive failure: 4.
[  580.034607] xradio_wlan mmc1:0001:1: dropped received frame
[  580.035533] xradio_wlan mmc1:0001:1: [RX] IF=0, Receive failure: 4.
[  580.035579] xradio_wlan mmc1:0001:1: dropped received frame

also, the Zero does not answer ARP requests from my windows machine any of my other machines, so they are unable to access it. if i add the ARP address manually (or if the Zero sends a packet first), then it works fine.

Device Tree Documentation

Hello,
I have no Idea how to perform the stuff in the How to use this section (e.g. where the file(s) are i shall copy there lines to).
Do you have documentation/reference material on the device tree stuff?

Supported Linux versions

Dear developers, please could you tell what kernel versions is the driver supposed to work with?

Wifi Channel Change crashes the kernel

I'm trying to use Network-manager and dnsmasq for supporting AP and client(station) mode same time.

It looks working properly. But if station's target router wifi channel is changed, kernel goes to hang sometimes. Below is the error message.

How can I make it not to hang kernel? Then I can reboot the system or do others.

Is it because of this line?

xradio/wsm.c

Line 1780 in 6660fe2

if (raceCheck == 0xFFFF) {


[20148.872296] rcu: INFO: rcu_sched self-detected stall on CPU
[20148.877893] rcu: 1-....: (4945709 ticks this GP) idle=8aa/1/0x40000002 softirq=9640/9640 fqs=2447771
[20148.887182] rcu: (t=4967445 jiffies g=15521 q=274313)
[20148.892407] NMI backtrace for cpu 1
[20148.895897] CPU: 1 PID: 396 Comm: xradio_bh Tainted: G D W 4.19.20-sunxi #5.75
[20148.904234] Hardware name: Allwinner sun8i Family
[20148.908959] [] (unwind_backtrace) from [] (show_stack+0x11/0x14)
[20148.916701] [] (show_stack) from [] (dump_stack+0x69/0x78)
[20148.923921] [] (dump_stack) from [] (nmi_cpu_backtrace+0x8f/0x90)
[20148.931746] [] (nmi_cpu_backtrace) from [] (nmi_trigger_cpumask_backtrace+0xaf/0xe0)
[20148.941216] [] (nmi_trigger_cpumask_backtrace) from [] (rcu_dump_cpu_stacks+0x7b/0x98)
[20148.950861] [] (rcu_dump_cpu_stacks) from [] (rcu_check_callbacks+0x4f5/0x6c8)
[20148.959815] [] (rcu_check_callbacks) from [] (update_process_times+0x2b/0x48)
[20148.968681] [] (update_process_times) from [] (tick_sched_timer+0x37/0x74)
[20148.977277] [] (tick_sched_timer) from [] (__hrtimer_run_queues+0x105/0x254)
[20148.986055] [] (__hrtimer_run_queues) from [] (hrtimer_interrupt+0xb5/0x200)
[20148.994835] [] (hrtimer_interrupt) from [] (arch_timer_handler_phys+0x25/0x28)
[20149.003787] [] (arch_timer_handler_phys) from [] (handle_percpu_devid_irq+0x57/0x19c)
[20149.013346] [] (handle_percpu_devid_irq) from [] (generic_handle_irq+0x1d/0x28)
[20149.022383] [] (generic_handle_irq) from [] (__handle_domain_irq+0x45/0x84)
[20149.031076] [] (__handle_domain_irq) from [] (gic_handle_irq+0x39/0x68)
[20149.039421] [] (gic_handle_irq) from [] (__irq_svc+0x65/0x94)
[20149.046892] Exception stack(0xd66c9de8 to 0xd66c9e30)
[20149.051941] 9de0: c9ae0e4c 00000000 0000287c 0000287b 00000000 d6480e00
[20149.060110] 9e00: c0d04d48 c9ae0d18 d648100c 00000080 d64811fc 00000000 ce9bc61c d66c9e38
[20149.068276] 9e20: bfb2d42d c08db396 20070033 ffffffff
[20149.073328] [] (__irq_svc) from [] (_raw_spin_lock+0x26/0x34)
[20149.080830] [] (_raw_spin_lock) from [] (wsm_handle_rx+0x828/0xc7c [xradio_wlan])
[20149.090066] [] (wsm_handle_rx [xradio_wlan]) from [] (xradio_bh_exchange+0x27c/0x588 [xradio_wlan])
[20149.100862] [] (xradio_bh_exchange [xradio_wlan]) from [] (xradio_bh+0x128/0x270 [xradio_wlan])
[20149.111301] [] (xradio_bh [xradio_wlan]) from [] (kthread+0xfd/0x104)
[20149.119470] [] (kthread) from [] (ret_from_fork+0x11/0x38)
[20149.126680] Exception stack(0xd66c9fb0 to 0xd66c9ff8)
[20149.131726] 9fa0: 00000000 00000000 00000000 00000000
[20149.139894] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[20149.148061] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000

Dear, Xradio on orangepi-zero xunlong github linux kernel makes crash when builtin modules

I've forked from xunlong github.
my link is https://github.com/trustfarm/orangepi_h2_linux_tfarm

I've made xradio to kernel built-in , not after module loading.
there's always crash.

I think it's related with and kernel module sequence .
Did you have guess why? and is it already patched in your xradio branch?

I hope you did close it. thanks.

--- logs ---

[ 0.367093] sunxi_reg_init enter
[ 0.369006] audit: initializing netlink socket (disabled)
[ 0.369134] type=2000 audit(0.360:1): initialized
[ 0.376297] NTFS driver 2.1.30 [Flags: R/W].
[ 0.376861] fuse init (API version 7.18)
[ 0.378005] msgmni has been set to 889
[ 0.381958] io scheduler noop registered
[ 0.382028] io scheduler deadline registered
[ 0.382340] io scheduler cfq registered (default)
[ 0.383248] this module is used not!
[ 0.383329] [DISP]disp_module_init
[ 0.384112] cmdline,init_disp=
[ 0.384202] cmdline,disp=
[ 0.394789] [DISP] Fb_map_kernel_logo,line:989:Fb_map_kernel_logo failed!
[ 0.399408] [DISP]disp_module_init finish
[ 0.399948] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[ 0.400105] sw_uart_get_devinfo()1503 - uart1 has no uart_regulator.
[ 0.400186] sw_uart_get_devinfo()1503 - uart2 has no uart_regulator.
[ 0.401361] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[ 0.401442] sw_uart_pm()890 - uart0 clk is already enable
[ 0.401521] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[ 0.513884] console [ttyS0] enabled
[ 1.082134] uart1: ttyS1 at MMIO 0x1c28400 (irq = 33) is a SUNXI
[ 1.152620] uart2: ttyS2 at MMIO 0x1c28800 (irq = 34) is a SUNXI
[ 1.161411] sunxi_di_init get di_by_pass err!
[ 1.167448] sunxi_reset_fetch_sysconfig_para fail
[ 1.172894] ir_cut_fetch_sysconfig_para fail
[ 1.188357] loop: module loaded
[ 1.192021] Get boot type cmd line fail
[ 1.197166] usbcore: registered new interface driver pn533
[ 1.205477] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[ 1.212734] sunxi_spi_chan_cfg()1376 - [spi-1] has no spi_regulator.
[ 1.221182] spi spi0: master is unqueued, this is deprecated
[ 1.227947] tun: Universal TUN/TAP device driver, 1.6
[ 1.233724] tun: (C) 1999-2004 Max Krasnyansky [email protected]
[ 1.242906] PPP generic driver version 2.4.2
[ 1.248185] PPP BSD Compression module registered
[ 1.253566] PPP Deflate Compression module registered
[ 1.261161] PPP MPPE Compression module registered
[ 1.266609] NET: Registered protocol family 24
[ 1.271753] PPTP driver version 0.8.5
[ 1.276640] [XRADIO] Driver Label:L34M.01.08.0002 Jan 20 2017 14:22:32
[ 1.284275] [XRADIO] Allocated hw_priv @ d506d0e0
[ 1.290353] xradio wlan power on
[ 1.446265] ------------[ cut here ]------------
[ 1.450010] kernel BUG at drivers/mmc/host/sunxi-mci.c:2755!
[ 1.450010] sunxi oops: enable sdcard JTAG interface
[ 1.450010] sunxi oops: cpu frequency: 408 MHz
[ 1.450010] sunxi oops: ddr frequency: 624 MHz
[ 1.450010] sunxi oops: gpu frequency: 105 MHz
[ 1.450010] sunxi oops: cpu temperature: 217
[ 1.450010] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[ 1.450010] Modules linked in:
[ 1.450010] CPU: 2 Not tainted (3.4.39-zero #4)
[ 1.450010] PC is at sunxi_mci_rescan_card+0x4c/0x54
[ 1.450010] LR is at xradio_sdio_detect+0x28/0x98
[ 1.450010] pc : [] lr : [] psr: 60000013
[ 1.450010] sp : d5883e88 ip : d5883e98 fp : d5883e94
[ 1.450010] r10: c0bb39c0 r9 : 00000000 r8 : 00000000
[ 1.450010] r7 : d506d394 r6 : d506d398 r5 : c0c6c4d0 r4 : 00000001
[ 1.450010] r3 : 00000000 r2 : 00000001 r1 : 00000001 r0 : 00000001
[ 1.450010] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 1.450010] Control: 10c5387d Table: 4000406a DAC: 00000015
[ 1.450010]
[ 1.450010] PC: 0xc0504024:
[ 1.450010] 4024 e593c03c e31c0c02 1afffff8 e593003c e2100c02 089da830 e1a01004 e59f000c
[ 1.450010] 4044 eb09357b e3e00000 e89da830 c0b000c0 c09ada28 e1a0c00d e92dd800 e24cb004
[ 1.450010] 4064 e92d4000 e8bd4000 e3500003 8a00000a e59f302c e7933100 e3530000 0a000007
[ 1.450010] 4084 e2911000 e5930004 13a01001 e5831074 e3a01000 ebffb086 e89da800 e7f001f2
[ 1.450010] 40a4 e7f001f2 c0cb5464 e1a0c00d e92dd8f0 e24cb004 e92d4000 e8bd4000 e1a05000
[ 1.450010] 40c4 e3a00b02 e3a01c03 e3a02000 e34001c2 e3a04000 ebec650d e1a07000 e3a00000
[ 1.450010] 40e4 e3a01b01 e3a02000 e34001c2 ebec6507 e5951034 e1a06000 e59532c0 e59f01e0
[ 1.450010] 4104 e3510000 05951010 e5932004 eb093548 e314000f 0a000059 e59532cc e7931004
[ 1.450010]
[ 1.450010] LR: 0xc03e4d78:
[ 1.450010] 4d78 c093b274 c09841ac c0974a7c c0b3c97c c094d144 e1a0c00d e92dd830 e24cb004
[ 1.450010] 4d98 e92d4000 e8bd4000 e3a04032 e59f5020 ebffffc3 e30605b0 e5953004 e3400666
[ 1.450010] 4db8 e12fff33 e2544001 1afffff9 e1a00004 e89da830 c0b3c97c e1a0c00d e92dd830
[ 1.450010] 4dd8 e24cb004 e92d4000 e8bd4000 e1a01000 e1a04000 e59f505c e5950000 eb047c97
[ 1.450010] 4df8 e59f3054 e5d33000 e3130001 1a000009 e59f5048 e3a0400a e30605b0 e5953004
[ 1.450010] 4e18 e3400666 e12fff33 e2544001 1afffff9 e1a00004 e89da830 e59f3024 e3540000
[ 1.450010] 4e38 e59f1020 e5952000 11a01003 e59f0018 eb0db1fa eaffffed c0c6c4d0 c0b4c284
[ 1.450010] 4e58 c0b3c97c c09841c8 c09841d0 c09841d8 e1a0c00d e92dd9f0 e24cb004 e24dd014
[ 1.450010]
[ 1.450010] SP: 0xd5883e08:
[ 1.450010] 3e08 0941adc9 00000000 c0bb39c0 d5883e64 0000000c d5883e30 c05040a8 60000013
[ 1.450010] 3e28 c000e694 00000000 d5883e94 d5883e40 c000e3ec c000820c 00000001 00000001
[ 1.450010] 3e48 00000001 00000000 00000001 c0c6c4d0 d506d398 d506d394 00000000 00000000
[ 1.450010] 3e68 c0bb39c0 d5883e94 d5883e98 d5883e88 c03e4df8 c05040a4 60000013 ffffffff
[ 1.450010] 3e88 d5883eac d5883e98 c03e4df8 c0504064 c0c6cff8 c0b4c298 d5883ef4 d5883eb0
[ 1.450010] 3ea8 c03ece78 c03e4ddc c0751680 c002b0ac d540e668 d5883ed4 d5883ef4 d5883ee0
[ 1.450010] 3ec8 c03ce084 d506d0e0 d506c360 c0ad9f8c c0bb39c0 c0ac1200 0000012e c0bb39c0
[ 1.450010] 3ee8 d5883f44 d5883ef8 c03cef3c c03ecdc8 0000012e c0bb39c0 d5883f24 d5883f10
[ 1.450010]
[ 1.450010] IP: 0xd5883e18:
[ 1.450010] 3e18 0000000c d5883e30 c05040a8 60000013 c000e694 00000000 d5883e94 d5883e40
[ 1.450010] 3e38 c000e3ec c000820c 00000001 00000001 00000001 00000000 00000001 c0c6c4d0
[ 1.450010] 3e58 d506d398 d506d394 00000000 00000000 c0bb39c0 d5883e94 d5883e98 d5883e88
[ 1.450010] 3e78 c03e4df8 c05040a4 60000013 ffffffff d5883eac d5883e98 c03e4df8 c0504064
[ 1.450010] 3e98 c0c6cff8 c0b4c298 d5883ef4 d5883eb0 c03ece78 c03e4ddc c0751680 c002b0ac
[ 1.450010] 3eb8 d540e668 d5883ed4 d5883ef4 d5883ee0 c03ce084 d506d0e0 d506c360 c0ad9f8c
[ 1.450010] 3ed8 c0bb39c0 c0ac1200 0000012e c0bb39c0 d5883f44 d5883ef8 c03cef3c c03ecdc8
[ 1.450010] 3ef8 0000012e c0bb39c0 d5883f24 d5883f10 c0278754 c027799c c07d5758 c03ea25c
[ 1.450010]
[ 1.450010] FP: 0xd5883e14:
[ 1.450010] 3e14 d5883e64 0000000c d5883e30 c05040a8 60000013 c000e694 00000000 d5883e94
[ 1.450010] 3e34 d5883e40 c000e3ec c000820c 00000001 00000001 00000001 00000000 00000001
[ 1.450010] 3e54 c0c6c4d0 d506d398 d506d394 00000000 00000000 c0bb39c0 d5883e94 d5883e98
[ 1.450010] 3e74 d5883e88 c03e4df8 c05040a4 60000013 ffffffff d5883eac d5883e98 c03e4df8
[ 1.450010] 3e94 c0504064 c0c6cff8 c0b4c298 d5883ef4 d5883eb0 c03ece78 c03e4ddc c0751680
[ 1.450010] 3eb4 c002b0ac d540e668 d5883ed4 d5883ef4 d5883ee0 c03ce084 d506d0e0 d506c360
[ 1.450010] 3ed4 c0ad9f8c c0bb39c0 c0ac1200 0000012e c0bb39c0 d5883f44 d5883ef8 c03cef3c
[ 1.450010] 3ef4 c03ecdc8 0000012e c0bb39c0 d5883f24 d5883f10 c0278754 c027799c c07d5758
[ 1.450010]
[ 1.450010] R5: 0xc0c6c450:
[ 1.450010] c450 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] c470 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] c490 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] c4b0 00000000 00000000 00000000 00000000 00000000 d506d0e0 00000000 00000000
[ 1.450010] c4d0 00000001 00000167 000000ca 00000000 00000000 00000000 00000000 00000000
[ 1.450010] c4f0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] c510 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] c530 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010]
[ 1.450010] R6: 0xd506d318:
[ 1.450010] d318 00000000 00000000 00000000 00000011 00000000 00000000 d506d330 d506d330
[ 1.450010] d338 c03cad24 d506d0e0 d506c360 0ef491dc 91dc2a89 2b890ef4 0ef491dc 00002b09
[ 1.450010] d358 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] d378 d5b91440 00000001 00000000 00000000 d506d388 d506d388 00000000 00000000
[ 1.450010] d398 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ffffffa2
[ 1.450010] d3b8 00000000 c0b4becc c0b4bf5c 00000000 00000000 c0b4c038 00000000 00000000
[ 1.450010] d3d8 00000000 d506d3dc d506d3dc b1070400 00000000 00000000 00000000 00000000
[ 1.450010] d3f8 00000000 00000000 00000000 00000000 d58c4000 c03dd11c d506d0e0 ffffffff
[ 1.450010]
[ 1.450010] R7: 0xd506d314:
[ 1.450010] d314 d5b912c0 00000000 00000000 00000000 00000011 00000000 00000000 d506d330
[ 1.450010] d334 d506d330 c03cad24 d506d0e0 d506c360 0ef491dc 91dc2a89 2b890ef4 0ef491dc
[ 1.450010] d354 00002b09 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] d374 00000000 d5b91440 00000001 00000000 00000000 d506d388 d506d388 00000000
[ 1.450010] d394 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] d3b4 ffffffa2 00000000 c0b4becc c0b4bf5c 00000000 00000000 c0b4c038 00000000
[ 1.450010] d3d4 00000000 00000000 d506d3dc d506d3dc b1070400 00000000 00000000 00000000
[ 1.450010] d3f4 00000000 00000000 00000000 00000000 00000000 d58c4000 c03dd11c d506d0e0
[ 1.450010]
[ 1.450010] R10: 0xc0bb3940:
[ 1.450010] 3940 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] 3960 00000004 00000014 00000003 00554e47 296cf320 6d62c9bd 7df9e000 c77a8718
[ 1.450010] 3980 159f1dff 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] 39a0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] 39c0 00000000 c125e83b 00000000 00000000 00000000 c125e740 c125e800 00000000
[ 1.450010] 39e0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] 3a00 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] 3a20 00000000 00000001 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.450010] Process swapper/0 (pid: 1, stack limit = 0xd58822f8)
[ 1.450010] Stack: (0xd5883e88 to 0xd5884000)
[ 1.450010] 3e80: d5883eac d5883e98 c03e4df8 c0504064 c0c6cff8 c0b4c298
[ 1.450010] 3ea0: d5883ef4 d5883eb0 c03ece78 c03e4ddc c0751680 c002b0ac d540e668 d5883ed4
[ 1.450010] 3ec0: d5883ef4 d5883ee0 c03ce084 d506d0e0 d506c360 c0ad9f8c c0bb39c0 c0ac1200
[ 1.450010] 3ee0: 0000012e c0bb39c0 d5883f44 d5883ef8 c03cef3c c03ecdc8 0000012e c0bb39c0
[ 1.450010] 3f00: d5883f24 d5883f10 c0278754 c027799c c07d5758 c03ea25c d5883f44 c0b4c284
[ 1.450010] 3f20: 00000006 c0ad9f8c c0bb39c0 c0ac1200 0000012e c0bb39c0 d5883f5c d5883f48
[ 1.450010] 3f40: c0ac1258 c03cef0c 00000000 d5882000 d5883fb4 d5883f60 c000868c c0ac120c
[ 1.450010] 3f60: d5883fb4 d5883f70 c0ac1200 00000000 c0a0f404 00000006 00000006 c09294b4
[ 1.450010] 3f80: c0a0e124 00000000 d5883fb4 c0ad9fac 00000006 c0ad9f8c c0bb39c0 c0aa22b8
[ 1.450010] 3fa0: 0000012e c0af9424 d5883ff4 d5883fb8 c0aa2a10 c0008650 00000006 00000006
[ 1.450010] 3fc0: c0aa22b8 c0aa28b4 c000fa04 00000000 c0aa28b4 c000fa04 00000013 00000000
[ 1.450010] 3fe0: 00000000 00000000 00000000 d5883ff8 c000fa04 c0aa28c0 bffd5ffe bffffeff
[ 1.450010] [] (sunxi_mci_rescan_card+0x4c/0x54) from [] (xradio_sdio_detect+0x28/0x98)
[ 1.450010] [] (xradio_sdio_detect+0x28/0x98) from [] (sbus_sdio_init+0xbc/0x1d8)
[ 1.450010] [] (sbus_sdio_init+0xbc/0x1d8) from [] (xradio_core_init+0x3c/0x46c)
[ 1.450010] [] (xradio_core_init+0x3c/0x46c) from [] (xradio_core_entry+0x58/0x6c)
[ 1.450010] [] (xradio_core_entry+0x58/0x6c) from [] (do_one_initcall+0x48/0x18c)
[ 1.450010] [] (do_one_initcall+0x48/0x18c) from [] (kernel_init+0x15c/0x220)
[ 1.450010] [] (kernel_init+0x15c/0x220) from [] (kernel_thread_exit+0x0/0x8)
[ 1.450010] Code: e3a01000 ebffb086 e89da800 e7f001f2 (e7f001f2)
[ 2.480295] ---[ end trace 58250388c4a1b394 ]---
[ 2.485601] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 2.485620]
[ 2.496021] CPU0: stopping
[ 2.499137] [] (unwind_backtrace+0x0/0x104) from [] (dump_stack+0x20/0x24)
[ 2.505997] [] (dump_stack+0x20/0x24) from [] (handle_IPI+0x2c0/0x2f8)
[ 2.505997] [] (handle_IPI+0x2c0/0x2f8) from [] (gic_handle_irq+0x60/0x68)
[ 2.505997] [] (gic_handle_irq+0x60/0x68) from [] (__irq_svc+0x40/0x70)
[ 2.505997] Exception stack(0xc0affbc0 to 0xc0affc08)
[ 2.505997] fbc0: 00000001 d58b2d40 0076f000 c126b640 00000000 00000000 c0b20c80 00000000
[ 2.505997] fbe0: c0b202ac 00000001 d58904d0 c0affc14 c0affc18 c0affc08 c0067f70 c005e2b4
[ 2.505997] fc00: a0000113 ffffffff
[ 2.505997] [] (__irq_svc+0x40/0x70) from [] (idle_cpu+0x28/0x64)
[ 2.505997] [] (idle_cpu+0x28/0x64) from [] (find_busiest_group+0x1bc/0xb88)
[ 2.505997] [] (find_busiest_group+0x1bc/0xb88) from [] (load_balance+0xc8/0x6e4)
[ 2.505997] [] (load_balance+0xc8/0x6e4) from [] (rebalance_domains+0xb0/0x19c)
[ 2.505997] [] (rebalance_domains+0xb0/0x19c) from [] (run_rebalance_domains+0x48/0x148)
[ 2.505997] [] (run_rebalance_domains+0x48/0x148) from [] (__do_softirq+0xec/0x280)
[ 2.505997] [] (__do_softirq+0xec/0x280) from [] (irq_exit+0x98/0xa0)
[ 2.505997] [] (irq_exit+0x98/0xa0) from [] (scheduler_ipi+0x84/0xe0)
[ 2.505997] [] (scheduler_ipi+0x84/0xe0) from [] (handle_IPI+0x228/0x2f8)
[ 2.505997] [] (handle_IPI+0x228/0x2f8) from [] (gic_handle_irq+0x60/0x68)
[ 2.505997] [] (gic_handle_irq+0x60/0x68) from [] (__irq_svc+0x40/0x70)
[ 2.505997] Exception stack(0xc0afff10 to 0xc0afff58)
[ 2.505997] ff00: 00000000 0000001f 0000000f 00000000
[ 2.505997] ff20: c0afe000 c0bb3a88 c075e334 c0afe000 c0b28990 410fc075 c0afe000 c0afff64
[ 2.505997] ff40: c0afff68 c0afff58 c000fac8 c000facc 60000013 ffffffff
[ 2.505997] [] (__irq_svc+0x40/0x70) from [] (default_idle+0x38/0x40)
[ 2.505997] [] (default_idle+0x38/0x40) from [] (cpu_idle+0xb0/0x104)
[ 2.505997] [] (cpu_idle+0xb0/0x104) from [] (rest_init+0x9c/0xb8)
[ 2.505997] [] (rest_init+0x9c/0xb8) from [] (start_kernel+0x2dc/0x330)
[ 2.505997] [] (start_kernel+0x2dc/0x330) from [<40008044>] (0x40008044)
[ 2.506014] CPU3: stopping
[ 2.506014] [] (unwind_backtrace+0x0/0x104) from [] (dump_stack+0x20/0x24)
[ 2.506014] [] (dump_stack+0x20/0x24) from [] (handle_IPI+0x2c0/0x2f8)
[ 2.506014] [] (handle_IPI+0x2c0/0x2f8) from [] (gic_handle_irq+0x60/0x68)
[ 2.506014] [] (gic_handle_irq+0x60/0x68) from [] (__irq_svc+0x40/0x70)
[ 2.506014] Exception stack(0xd58f7f60 to 0xd58f7fa8)
[ 2.506014] 7f60: 00000000 00000022 0000000f 00000000 d58f6000 c0bb3a88 c075e334 d58f6000
[ 2.506014] 7f80: c0b28990 410fc075 d58f6000 d58f7fb4 d58f7fb8 d58f7fa8 c000fac8 c000facc
[ 2.506014] 7fa0: 60000013 ffffffff
[ 2.506014] [] (__irq_svc+0x40/0x70) from [] (default_idle+0x38/0x40)
[ 2.506014] [] (default_idle+0x38/0x40) from [] (cpu_idle+0xb0/0x104)
[ 2.506014] [] (cpu_idle+0xb0/0x104) from [] (secondary_start_kernel+0x104/0x128)
[ 2.506014] [] (secondary_start_kernel+0x104/0x128) from [<4074d374>] (0x4074d374)
[ 2.506014] CPU1: stopping
[ 2.506014] [] (unwind_backtrace+0x0/0x104) from [] (dump_stack+0x20/0x24)
[ 2.506014] [] (dump_stack+0x20/0x24) from [] (handle_IPI+0x2c0/0x2f8)
[ 2.506014] [] (handle_IPI+0x2c0/0x2f8) from [] (gic_handle_irq+0x60/0x68)
[ 2.506014] [] (gic_handle_irq+0x60/0x68) from [] (__irq_svc+0x40/0x70)
[ 2.506014] Exception stack(0xd58bdf60 to 0xd58bdfa8)
[ 2.506014] df60: 00000000 00000020 0000000f 00000000 d58bc000 c0bb3a88 c075e334 d58bc000
[ 2.506014] df80: c0b28990 410fc075 d58bc000 d58bdfb4 d58bdfb8 d58bdfa8 c000fac8 c000facc
[ 2.506014] dfa0: 60000013 ffffffff
[ 2.506014] [] (__irq_svc+0x40/0x70) from [] (default_idle+0x38/0x40)
[ 2.506014] [] (default_idle+0x38/0x40) from [] (cpu_idle+0xb0/0x104)
[ 2.506014] [] (cpu_idle+0xb0/0x104) from [] (secondary_start_kernel+0x104/0x128)
[ 2.506014] [] (secondary_start_kernel+0x104/0x128) from [<4074d374>] (0x4074d374)
[ 2.968223] [hotplug]: cpu(2) try to kill cpu(0)
[ 3.973920] [hotplug]: try to kill cpu:0 failed!
[ 3.979174] [hotplug]: cpu(2) try to kill cpu(1)
[ 4.984860] [hotplug]: try to kill cpu:1 failed!
[ 4.990138] [hotplug]: cpu(2) try to kill cpu(3)
[ 5.995793] [hotplug]: try to kill cpu:3 failed!
[ 6.001080] Rebooting in 10 seconds..
[ 16.008761] Restarting Linux version 3.4.39-zero (cpplover@dev) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #4 SMP PREEMPT Fri Jan 20 14:33:24 KST 2017
[ 16.008799]

U-Boot SPL 2016.09 (Jan 19 2017 - 17:18:22)
DRAM: 512 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC1

U-Boot 2016.09 (Jan 19 2017 - 17:18:22 +0900) Allwinner Technology

Firmware crash

I saw somewhere else that you were seeing the firmware crash after loading.
This seems to be because of not properly resetting the chip before the mmc subsystem tries to init the sdio card.

The driver built from your source starts up correctly with my device tree (https://github.com/fifteenhex/linux/blob/bde4b4a1ea3a8d6b7c757143e0724be9dddd0b36/arch/arm/boot/dts/sun8i-h2-orangepi-zero.dts) and crashes a bit later on:

[ 1285.967060] xradio_wlan: loading out-of-tree module taints kernel.
[ 1285.989342] [XRADIO] Driver Label:L34M.01.08.0002
[ 1285.994355] [XRADIO] Allocated hw_priv @ cdcb8ce0
[ 1285.999830] [XRADIO_ERR] Access_file failed, path:/data/xr_wifi.conf!
[ 1286.008504] [SBUS] XRadio Device:sdio clk=50000000
[ 1286.016616] [XRADIO] XRADIO_HW_REV 1.0 detected.
[ 1286.158275] [XRADIO] Bootloader complete
[ 1286.234596] [XRADIO] Firmware completed.
[ 1286.249148] [WSM] Firmware Label:XR_C01.08.0043 Jun 6 2016 20:41:04
[ 1286.255540] [XRADIO] Firmware Startup Done.
[ 1286.259839] ------------[ cut here ]------------
[ 1286.264684] WARNING: CPU: 0 PID: 368 at /home/daniel/coding/pizero/xradio/bh.c:749 xradio_bh+0x5e2/0xc54 [xradio_wlan]
[ 1286.275421] Modules linked in: xradio_wlan(O+)
[ 1286.279968] CPU: 0 PID: 368 Comm: xradio_bh Tainted: G O 4.9.0-rc5+ #15
[ 1286.287712] Hardware name: Allwinner sun8i Family
[ 1286.292451] [] (unwind_backtrace) from [] (show_stack+0xb/0xc)
[ 1286.300037] [] (show_stack) from [] (dump_stack+0x5b/0x70)
[ 1286.307275] [] (dump_stack) from [] (__warn+0x8b/0xa8)
[ 1286.314164] [] (__warn) from [] (warn_slowpath_null+0x11/0x16)
[ 1286.321888] [] (warn_slowpath_null) from [] (xradio_bh+0x5e2/0xc54 [xradio_wlan])
[ 1286.331265] [] (xradio_bh [xradio_wlan]) from [] (kthread+0x89/0x98)
[ 1286.339388] [] (kthread) from [] (ret_from_fork+0x11/0x20)
[ 1286.346684] ---[ end trace 6d64e7e1f2176ae8 ]---
[ 1286.351336] [BH_ERR] wsm_seq=0.
[ 1286.354501] [BH_ERR] Fatal error, exitting code=751.
[ 1286.359515] [WSM_ERR] wsm_upper_restart
[ 1288.338586] [WSM_ERR] ***CMD timeout!>>> 0x0006 (12), buf_use=0, bh_state=751
[ 1288.345945] ------------[ cut here ]------------

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.