All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 4/4] board: orangepi: lite2: Add WiFi support
Date: Sat,  3 Nov 2018 18:26:08 +0530	[thread overview]
Message-ID: <20181103125608.2255-4-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20181103125608.2255-1-jagan@amarulasolutions.com>

Orangepi lite2 board has AP6356S WiFi/BT combo, but does
not have ethernet port. So it makes sense to enable wireless
networking by default:
- add broadcom wireless firmware package to image
- add basic wireless tools to image
- add rootfs overlay with proper NVRAM file for on-board AP6356S chip
- add mdev to image to enable module autoloading
- update readme.txt to test wifi

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 board/orangepi/orangepi-lite2/readme.txt      |  9 ++
 .../lib/firmware/brcm/brcmfmac43455-sdio.txt  | 82 +++++++++++++++++++
 configs/orangepi_lite2_defconfig              | 13 +++
 3 files changed, 104 insertions(+)
 create mode 100755 board/orangepi/orangepi-lite2/rootfs_overlay/lib/firmware/brcm/brcmfmac43455-sdio.txt

diff --git a/board/orangepi/orangepi-lite2/readme.txt b/board/orangepi/orangepi-lite2/readme.txt
index abca9da6da..bed561b562 100644
--- a/board/orangepi/orangepi-lite2/readme.txt
+++ b/board/orangepi/orangepi-lite2/readme.txt
@@ -33,3 +33,12 @@ Copy the bootable "sdcard.img" onto an SD card with "dd":
 
 Insert the micro SDcard in your Orangepi Lite2 and power it up. The console
 is on the serial line, 115200 8N1.
+
+WiFi
+====
+
+ # wpa_passphrase ACCESSPOINTNAME >> /etc/wpa_supplicant.conf
+   (type password and enter)
+ # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
+ # udhcpc -i wlan0
+ # ping google.com
diff --git a/board/orangepi/orangepi-lite2/rootfs_overlay/lib/firmware/brcm/brcmfmac43455-sdio.txt b/board/orangepi/orangepi-lite2/rootfs_overlay/lib/firmware/brcm/brcmfmac43455-sdio.txt
new file mode 100755
index 0000000000..c1cc4c3c2e
--- /dev/null
+++ b/board/orangepi/orangepi-lite2/rootfs_overlay/lib/firmware/brcm/brcmfmac43455-sdio.txt
@@ -0,0 +1,82 @@
+#AP6255_NVRAM_V1.0_29052015
+
+NVRAMRev=$Rev: 498373 $
+sromrev=11
+vendid=0x14e4
+devid=0x43ab
+manfid=0x2d0
+prodid=0x06e4
+macaddr=00:90:4c:c5:12:38
+nocrc=1
+boardtype=0x6e4
+boardrev=0x1304
+xtalfreq=37400
+#boardflags: 5GHz eTR switch by default
+#2.4GHz eTR switch by default
+#bit1 for btcoex
+boardflags=0x00080201
+boardflags2=0x40000000
+boardflags3=0x48200100
+rxgains2gelnagaina0=0
+rxgains2gtrisoa0=0
+rxgains2gtrelnabypa0=0
+rxgains5gelnagaina0=0
+rxgains5gtrisoa0=0
+rxgains5gtrelnabypa0=0
+rxchain=1
+txchain=1
+aa2g=1
+aa5g=1
+tssipos5g=1
+tssipos2g=1
+femctrl=0
+AvVmid_c0=0,157,1,126,1,126,1,126,1,126
+pa2ga0=-112,6296,-662
+pa2ga1=-165,3699,-515
+pa5ga0=-143,6016,-683,-141,6013,-678,-137,5988,-670,-136,5982,-670
+pa5ga1=-161,3544,-499,-166,3543,-497,-169,3569,-497,-171,3598,-498
+itrsw=1
+pdoffset2g40ma0=10
+pdoffset40ma0=0xaaaa
+pdoffset80ma0=0xaaaa
+extpagain5g=2
+extpagain2g=2
+tworangetssi2g=1
+tworangetssi5g=1
+# LTECX flags
+# WCI2
+ltecxmux=0
+ltecxpadnum=0x0504
+ltecxfnsel=0x22
+ltecxgcigpio=0x32
+
+maxp2ga0=64
+ofdmlrbw202gpo=0x0033
+dot11agofdmhrbw202gpo=0x1553
+mcsbw202gpo=0x99355533
+
+maxp5ga0=80,82,76,77
+
+mcsbw205glpo=0x99755000
+mcsbw205gmpo=0x9df55000
+mcsbw205ghpo=0x99855000
+
+mcsbw405glpo=0xb8555000
+mcsbw405gmpo=0xed955000
+mcsbw405ghpo=0xd9755000
+
+mcsbw805glpo=0xc8555000
+mcsbw805gmpo=0xe9555000
+mcsbw805ghpo=0xd9555000
+
+swctrlmap_2g=0x00040004,0x00020002,0x00040004,0x010a02,0x1ff
+swctrlmap_5g=0x00100010,0x00200020,0x00100010,0x010a02,0x2f4
+swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000
+swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000
+
+vcodivmode=1
+deadman_to=481500000
+ed_thresh2g=-54
+ed_thresh5g=-54
+
+muxenab=0x10
diff --git a/configs/orangepi_lite2_defconfig b/configs/orangepi_lite2_defconfig
index 29e648c9b0..16d73e14ae 100644
--- a/configs/orangepi_lite2_defconfig
+++ b/configs/orangepi_lite2_defconfig
@@ -42,6 +42,19 @@ BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-lite2/genimage.cfg"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/orangepi-lite2/post-build.sh"
+BR2_ROOTFS_OVERLAY="board/orangepi/orangepi-lite2/rootfs_overlay"
+
+# wireless firmware
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y
+
+# wireless tools
+BR2_PACKAGE_IW=y
+BR2_PACKAGE_WPA_SUPPLICANT=y
+BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
+BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
+BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
-- 
2.18.0.321.gffc6fa0e3

  parent reply	other threads:[~2018-11-03 12:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-03 12:56 [Buildroot] [PATCH 1/4] uboot: bump to version 2018.09 Jagan Teki
2018-11-03 12:56 ` [Buildroot] [PATCH v2 2/4] board: orangepi: Add Orangepi One Plus support Jagan Teki
2018-11-03 19:27   ` Baruch Siach
2018-12-16 15:00   ` Thomas Petazzoni
2018-11-03 12:56 ` [Buildroot] [PATCH 3/4] board: orangepi: Add Orangepi Lite2 support Jagan Teki
2018-12-16 15:00   ` Thomas Petazzoni
2018-11-03 12:56 ` Jagan Teki [this message]
2018-12-16 15:00   ` [Buildroot] [PATCH 4/4] board: orangepi: lite2: Add WiFi support Thomas Petazzoni
2018-11-03 14:56 ` [Buildroot] [PATCH 1/4] uboot: bump to version 2018.09 Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181103125608.2255-4-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.