unifreq / linux-5.15.y

clone from https://github.com/chewitt/linux branch amlogic-5.15.y, And will add some patches that I have collected, which can be used for the aarch64 openwrt firmware, or for general occasions such as armbian.
Other
32 stars 86 forks source link

about uwe5622 driver in orangepi-zero2! #4

Open sputnik2019 opened 2 years ago

sputnik2019 commented 2 years ago

Have you verified this driver in orangepi-zero2?After I compiled, I found that I did not find that the device when linux booting,and driver was not running。 my dts: &mmc1 { vmmc-supply = <&reg_aldo2>; mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; status = "okay";

uwe-bsp {
    compatible = "unisoc,uwe_bsp";
    keep-power-on;
    data-irq;
    //adma-tx;
    adma-rx;
    //blksz-512;
    status = "okay";
};

};

my config CONFIG_SPARD_WLAN_SUPPORT=y CONFIG_SC23XX=y

CONFIG_UMW2653 is not set

CONFIG_SC2342_INTEG is not set

CONFIG_SC2355 is not set

CONFIG_SC2366 is not set

CONFIG_WCN_BSP_DRIVER_BUILDIN is not set

CONFIG_RK_WIFI_DEVICE_UWE5621 is not set

CONFIG_RK_WIFI_DEVICE_UWE5622 is not set

CONFIG_AW_WIFI_DEVICE_UWE5622=y CONFIG_AW_BIND_VERIFY=y CONFIG_WLAN_UWE5622=m CONFIG_SPRDWL_NG=m CONFIG_UNISOC_WIFI_PS=y

CONFIG_TTY_OVERY_SDIO is not set

afaulkner420 commented 2 years ago

I found the same with the driver. I'm trying to load it for the orangepi 3 lts. Builds, is found in /vendor/modules but isn't loaded at boot. And can't be loaded with "insmod"

unifreq commented 2 years ago

I don't have this hardware, this driver is only provided to some netizens who need it for testing, and I am not testing it myself.

afaulkner420 commented 2 years ago

Well this is exactly what I'm working on at the moment. Feel free for anyone to pipe in!

https://forum.armbian.com/topic/19846-orange-pi3-lts/

https://github.com/afaulkner420/Linux-Mainline-5.15y

unifreq commented 2 years ago

The driver source code comes from here:

https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-5.10/drivers/net/wireless/uwe5622

afaulkner420 commented 2 years ago

That's exactly where I got mine. Except I forward ported to 5.15y

afaulkner420 commented 2 years ago

I'd be very surprised if the driver doesn't error out on alloc_tty_driver... this was deprecated along with other functions within tty.c Tty_driver.h needs a commit reverting j order to process the old function. See my commits on my github

sputnik2019 commented 2 years ago

https://github.com/jernejsk/linux-1/commits/h616-full

afaulkner420 commented 2 years ago

Oooh very nice! I shall try this! Have you tried it? Does it load etc? Do you get WiFi?

afaulkner420 commented 2 years ago

I don't know about anyone else, but I can't get any of these drivers to compile without errors...

sputnik2019 commented 2 years ago

I don't know about anyone else, but I can't get any of these drivers to compile without errors...

Does it work now in Linux?

afaulkner420 commented 2 years ago

I can't get it to build no.

sputnik2019 commented 2 years ago

Now user your driver wireless is ok。But Bluetooth still doesn't work。 /usr/bin/hciattach_opi -n -s 1500000 /dev/ttyBT0 sprd Can't open serial port: No such file or directory Can't initialize device: No such file or directory

/dev/ttyBT0 node is not generated。

afaulkner420 commented 2 years ago

It's not driver related. Check my armbian build repo. Check the fix-bt branch...

Your 1 line of code away from having it fully working!

sputnik2019 commented 2 years ago

root@orangepizero2:~# hciattach_opi -n -s 1500000 /dev/ttyBT0 sprd SPRD Bluetooth init uart with init speed:1500000, final_speed:1500000, type:HCI UART H4 SPRD Bluetooth: Attempt to load conf from /lib/firmware/bt_configure_pskey.ini SPRD Bluetooth: device_class -> 0x001F00 SPRD Bluetooth: feature_set -> 0xBF, 0xFF, 0x8D, 0xFE, 0xDB, 0x3D, 0x7B, 0x87, 0xFF, 0xA7, 0xFF, 0x7F, 0x00, 0xE0, 0xF7, 0x3E SPRD Bluetooth: device_addr -> 0x6D, 0x6D, 0x8E, 0x8E, 0x8F, 0x8F SPRD Bluetooth: comp_id -> 0x01EC SPRD Bluetooth: g_sys_uart0_communication_supported -> 1 SPRD Bluetooth: cp2_log_mode -> 1 SPRD Bluetooth: LogLevel -> 0xFF SPRD Bluetooth: g_central_or_perpheral -> 0 SPRD Bluetooth: Log_BitMask -> 0xFFFF SPRD Bluetooth: super_ssp_enable -> 0 SPRD Bluetooth: common_rfu_b3 -> 0 SPRD Bluetooth: common_rfu_w -> 0x00000000, 0x00000000 SPRD Bluetooth: le_rfu_w -> 0x00000000, 0x000000000 SPRD Bluetooth: lmp_rfu_w -> 0x00000000, 0x000000000 SPRD Bluetooth: lc_rfu_w -> 0x00000000, 0x000000000 SPRD Bluetooth: g_wbs_nv_117 -> 0x004D SPRD Bluetooth: g_wbs_nv_118 -> 0x0166 SPRD Bluetooth: g_nbv_nv_117 -> 0x004D SPRD Bluetooth: g_nbv_nv_118 -> 0x0166 SPRD Bluetooth: g_sys_sco_transmit_mode -> 0 SPRD Bluetooth: audio_rfu_b1 -> 0 SPRD Bluetooth: audio_rfu_b2 -> 0 SPRD Bluetooth: audio_rfu_b3 -> 0 SPRD Bluetooth: audio_rfu_w -> 0x00000000, 0x00000000 SPRD Bluetooth: g_sys_sleep_in_standby_supported -> 1 SPRD Bluetooth: g_sys_sleep_master_supported -> 1 SPRD Bluetooth: g_sys_sleep_slave_supported -> 1 SPRD Bluetooth: power_rfu_b1 -> 0 SPRD Bluetooth: power_rfu_w -> 0x00000000, 0x00000000 SPRD Bluetooth: win_ext -> 40 SPRD Bluetooth: edr_tx_edr_delay -> 6 SPRD Bluetooth: edr_rx_edr_delay -> 8 SPRD Bluetooth: tx_delay -> 12 SPRD Bluetooth: rx_delay -> 34 SPRD Bluetooth: bb_rfu_w -> 0x00000000, 0x00000000 SPRD Bluetooth: agc_mode -> 0 SPRD Bluetooth: diff_or_eq -> 0xFF SPRD Bluetooth: ramp_mode -> 0 SPRD Bluetooth: modem_rfu_b1 -> 0 SPRD Bluetooth: modem_rfu_w -> 0x00000000, 0x00000000 SPRD Bluetooth: BQB_BitMask_1 -> 0x00000000 SPRD Bluetooth: BQB_BitMask_2 -> 0x00000000 SPRD Bluetooth: bt_coex_threshold -> 0x04E2, 0x1F40, 0x0020, 0x00C8, 0x0006, 0x0000, 0x0000, 0x0000 SPRD Bluetooth: other_rfu_w -> 0x00000000, 0x00000000 SPRD Bluetooth: Attempt to load conf from /lib/firmware/bt_configure_rf.ini SPRD Bluetooth: g_GainValue_A -> 0xE000, 0xE000, 0xE000, 0xE000, 0xE000, 0xE000 SPRD Bluetooth: g_ClassicPowerValue_A -> 0x4115, 0x3A15, 0x3415, 0x2E15, 0x2715, 0x2115, 0x1715, 0x1115, 0x0B15, 0x0715 SPRD Bluetooth: g_LEPowerValue_A -> 0x3B15, 0x3715, 0x3315, 0x2F15, 0x2B15, 0x2715, 0x2315, 0x1F15, 0x1B15, 0x1715, 0x1315, 0x0F15, 0x0B15, 0x0815, 0x0415, 0x0015 SPRD Bluetooth: g_BRChannelpwrvalue_A -> 0x0615, 0x0615, 0x0615, 0x0615, 0x0615, 0x0615, 0x0615, 0x0615 SPRD Bluetooth: g_EDRChannelpwrvalue_A -> 0x0615, 0x0615, 0x0615, 0x0715, 0x0715, 0x0715, 0x0715, 0x0715 SPRD Bluetooth: g_LEChannelpwrvalue_A -> 0x1515, 0x1515, 0x1515, 0x1515, 0x1515, 0x1515, 0x1515, 0x1515 SPRD Bluetooth: g_GainValue_B -> 0xE000, 0xE000, 0xE000, 0xE000, 0xE000, 0xE000 SPRD Bluetooth: g_ClassicPowerValue_B -> 0x4915, 0x4315, 0x4115, 0x3915, 0x3115, 0x2A15, 0x2215, 0x1B15, 0x1415, 0x0E15 SPRD Bluetooth: g_LEPowerValue_B -> 0x4B15, 0x4B15, 0x4B15, 0x4B15, 0x4B15, 0x4615, 0x4015, 0x3B15, 0x3615, 0x3015, 0x2B15, 0x2615, 0x2015, 0x1A15, 0x1415, 0x0E15 SPRD Bluetooth: g_BRChannelpwrvalue_B -> 0x0815, 0x0915, 0x0C15, 0x0C15, 0x0C15, 0x0C15, 0x0C15, 0x0B15 SPRD Bluetooth: g_EDRChannelpwrvalue_B -> 0x0A15, 0x0B15, 0x0D15, 0x0E15, 0x0E15, 0x0E15, 0x0E15, 0x0D15 SPRD Bluetooth: g_LEChannelpwrvalue_B -> 0x0E15,0x0E15,0x1115,0x1115,0x1115,0x1115,0x1115,0x1015 SPRD Bluetooth: LE_fix_powerword -> 0x00 SPRD Bluetooth: Classic_pc_by_channel -> 0xFF SPRD Bluetooth: LE_pc_by_channel -> 0xFF SPRD Bluetooth: RF_switch_mode -> 0x02 SPRD Bluetooth: Data_Capture_Mode -> 0x00 SPRD Bluetooth: Analog_IQ_Debug_Mode -> 0x00 SPRD Bluetooth: RF_common_rfu_b3 -> 0x55 SPRD Bluetooth: RF_common_rfu_w -> 0x555F4334, 0x55555555, 0x55555555, 0x55555555, 0x55555555 SPRD Bluetooth: set_mac_address SPRD Bluetooth: marlin3_pskey_preload SPRD Bluetooth: sprd_vnd_send_hci_vsc SPRD Bluetooth: a0 fc b0 00 1f 00 00 bf ff 8d fe db 3d 7b 87 ff SPRD Bluetooth: a7 ff 7f 00 e0 f7 3e 15 14 13 12 11 10 ec 01 01 SPRD Bluetooth: 01 ff 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 SPRD Bluetooth: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SPRD Bluetooth: 00 00 00 00 00 00 00 4d 00 66 01 4d 00 66 01 00 SPRD Bluetooth: 00 00 00 00 00 00 00 00 00 00 00 01 01 01 00 00 SPRD Bluetooth: 00 00 00 00 00 00 00 28 00 00 00 06 08 0c 22 00 SPRD Bluetooth: 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 SPRD Bluetooth: 00 00 00 00 00 00 00 00 00 00 00 e2 04 40 1f 20 SPRD Bluetooth: 00 c8 00 06 00 00 00 00 00 00 00 00 00 00 00 00 SPRD Bluetooth: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SPRD Bluetooth: 00 00 00 Initialization timed out.