Skip to content

Commit a8ee68a

Browse files
committed
Wireless driver for Opi Zero - fixed loading path /lib/firmware, patch for DHD driver to prevent wrong detection, extra uboot config for OPI zero .... with one problem to solve. Module failing to load at first try ... workaround installed until this is solved.
1 parent 18e4192 commit a8ee68a

File tree

5 files changed

+67
-9
lines changed

5 files changed

+67
-9
lines changed

config/boards/orangepizero.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# H2+ quad core 256/512MB SoC Wi-Fi/Ethernet
22
BOARD_NAME="Orange Pi Zero"
33
LINUXFAMILY=sun8i
4-
BOOTCONFIG=FriendlyARM_NanoPi_NEO_defconfig
5-
MODULES="#gpio_sunxi #w1-sunxi #w1-gpio #w1-therm #sunxi-cir xradio"
4+
BOOTCONFIG=orangepi_zero_defconfig
5+
MODULES="#gpio_sunxi #w1-sunxi #w1-gpio #w1-therm #sunxi-cir xradio_wlan xradio_wlan"
66
MODULES_NEXT=""
77
CPUMIN=240000
88
CPUMAX=1200000
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c b/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c
2+
index 19e0018..e427b77 100755
3+
--- a/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c
4+
+++ b/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c
5+
@@ -219,7 +219,6 @@ static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
6+
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4334) },
7+
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4324) },
8+
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_43239) },
9+
- { SDIO_DEVICE_CLASS(SDIO_CLASS_NONE) },
10+
{ /* end: all zeroes */ },
11+
};
12+

patch/kernel/sun8i-default/wireless-opi-zero.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ index 0000000..235d117
127127
+ccflags-y += -DCONFIG_XRADIO_SUSPEND_POWER_OFF
128128
+# Use vfs for firmware load when request_firmware
129129
+# can't work on other platform.
130-
+ccflags-y += -DUSE_VFS_FIRMWARE
130+
+# ccflags-y += -DUSE_VFS_FIRMWARE
131131
+
132132
+# Extra IE for probe response from upper layer is needed in P2P GO
133133
+# For offloading probe response to FW, the extra IE must be included
@@ -7854,13 +7854,13 @@ index 0000000..4816322
78547854
+
78557855
+#define XR819_HW_REV0 (8190)
78567856
+#ifdef USE_VFS_FIRMWARE
7857-
+#define XR819_BOOTLOADER ("/system/etc/firmware/boot_xr819.bin")
7858-
+#define XR819_FIRMWARE ("/system/etc/firmware/fw_xr819.bin")
7859-
+#define XR819_SDD_FILE ("/system/etc/firmware/sdd_xr819.bin")
7857+
+#define XR819_BOOTLOADER ("/lib/firmware/xr819/boot_xr819.bin")
7858+
+#define XR819_FIRMWARE ("/lib/firmware/xr819/fw_xr819.bin")
7859+
+#define XR819_SDD_FILE ("/lib/firmware/xr819/sdd_xr819.bin")
78607860
+#else
7861-
+#define XR819_BOOTLOADER ("boot_xr819.bin")
7862-
+#define XR819_FIRMWARE ("fw_xr819.bin")
7863-
+#define XR819_SDD_FILE ("sdd_xr819.bin")
7861+
+#define XR819_BOOTLOADER ("xr819/boot_xr819.bin")
7862+
+#define XR819_FIRMWARE ("xr819/fw_xr819.bin")
7863+
+#define XR819_SDD_FILE ("xr819/sdd_xr819.bin")
78647864
+#endif
78657865
+
78667866
+#define SDD_PTA_CFG_ELT_ID 0xEB
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig
2+
new file mode 100755
3+
index 0000000..a62d565
4+
--- /dev/null
5+
+++ b/configs/orangepi_zero_defconfig
6+
@@ -0,0 +1,16 @@
7+
+CONFIG_ARM=y
8+
+CONFIG_ARCH_SUNXI=y
9+
+CONFIG_MACH_SUN8I_H3=y
10+
+CONFIG_DRAM_CLK=408
11+
+CONFIG_DRAM_ZQ=3881979
12+
+CONFIG_DRAM_ODT_EN=y
13+
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-one"
14+
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
15+
+CONFIG_SPL=y
16+
+# CONFIG_CMD_IMLS is not set
17+
+# CONFIG_CMD_FLASH is not set
18+
+# CONFIG_CMD_FPGA is not set
19+
+CONFIG_SUN8I_EMAC=y
20+
+CONFIG_USB_EHCI_HCD=y
21+
+CONFIG_SYS_CLK_FREQ=480000000
22+
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
23+
\ No newline at end of file
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig
2+
new file mode 100755
3+
index 0000000..a62d565
4+
--- /dev/null
5+
+++ b/configs/orangepi_zero_defconfig
6+
@@ -0,0 +1,16 @@
7+
+CONFIG_ARM=y
8+
+CONFIG_ARCH_SUNXI=y
9+
+CONFIG_MACH_SUN8I_H3=y
10+
+CONFIG_DRAM_CLK=408
11+
+CONFIG_DRAM_ZQ=3881979
12+
+CONFIG_DRAM_ODT_EN=y
13+
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-one"
14+
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
15+
+CONFIG_SPL=y
16+
+# CONFIG_CMD_IMLS is not set
17+
+# CONFIG_CMD_FLASH is not set
18+
+# CONFIG_CMD_FPGA is not set
19+
+CONFIG_SUN8I_EMAC=y
20+
+CONFIG_USB_EHCI_HCD=y
21+
+CONFIG_SYS_CLK_FREQ=480000000
22+
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
23+
\ No newline at end of file

0 commit comments

Comments
 (0)