mirror of
https://github.com/open-sdr/openwifi.git
synced 2024-12-18 21:28:07 +00:00
Merge pull request #11 from open-sdr/pre-release
pre-release branch is verified
This commit is contained in:
commit
fe2c8c8fc2
447
README.md
447
README.md
@ -5,296 +5,185 @@
|
||||
|
||||
This repository includes Linux driver and software. [openwifi-hw](https://github.com/open-sdr/openwifi-hw) repository has the FPGA design. [[Project document](https://github.com/open-sdr/openwifi/tree/master/doc)]
|
||||
|
||||
[Demo [video](https://youtu.be/NpjEaszd5u4) and video [download](https://users.ugent.be/~xjiao/openwifi-low-aac.mp4)] [openwifi [maillist](https://lists.ugent.be/wws/subscribe/openwifi)] [[Cite openwifi project](#cite-openwifi-project)]
|
||||
[Demo [video](https://youtu.be/NpjEaszd5u4) and video [download](https://users.ugent.be/~xjiao/openwifi-low-aac.mp4)] [openwifi [maillist](https://lists.ugent.be/wws/subscribe/openwifi)] [[Cite openwifi project](#Cite-openwifi-project)]
|
||||
|
||||
Openwifi code has dual licenses. AGPLv3 is the opensource license. For non-opensource license, please contact Filip.Louagie@UGent.be. Openwifi project also leverages some 3rd party modules. It is user's duty to check and follow licenses of those modules according to the purpose/usage. You can find [an example explanation from Analog Devices](https://github.com/analogdevicesinc/hdl/blob/master/LICENSE) for this compound license conditions. [[How to contribute]](https://github.com/open-sdr/openwifi/blob/master/CONTRIBUTING.md).
|
||||
|
||||
Openwifi was born in [ORCA project](https://www.orca-project.eu/) (EU's Horizon2020 programme under agreement number 732174).
|
||||
|
||||
**Features:**
|
||||
|
||||
* 802.11a/g
|
||||
* 802.11n MCS 0~7 (Only PHY rx for now. Full system support of 802.11n will come soon)
|
||||
* 20MHz bandwidth; 70 MHz to 6 GHz frequency range
|
||||
* Mode tested: Ad-hoc; Station; AP, Monitor
|
||||
* DCF (CSMA/CA) low MAC layer in FPGA (10us SIFS is achieved)
|
||||
* Configurable channel access priority parameters:
|
||||
* duration of RTS/CTS, CTS-to-self
|
||||
* SIFS/DIFS/xIFS/slot-time/CW/etc
|
||||
* Time slicing based on MAC address
|
||||
* Easy to change bandwidth and frequency:
|
||||
* 2MHz for 802.11ah in sub-GHz
|
||||
* 10MHz for 802.11p/vehicle in 5.9GHz
|
||||
* On roadmap: **802.11ax**
|
||||
- 802.11a/g
|
||||
- 802.11n MCS 0~7 (Only PHY rx for now. Full system support of 802.11n will come soon)
|
||||
- 20MHz bandwidth; 70 MHz to 6 GHz frequency range
|
||||
- Mode tested: Ad-hoc; Station; AP, Monitor
|
||||
- DCF (CSMA/CA) low MAC layer in FPGA (10us SIFS is achieved)
|
||||
- Configurable channel access priority parameters:
|
||||
- duration of RTS/CTS, CTS-to-self
|
||||
- SIFS/DIFS/xIFS/slot-time/CW/etc
|
||||
- Time slicing based on MAC address
|
||||
- Easy to change bandwidth and frequency:
|
||||
- 2MHz for 802.11ah in sub-GHz
|
||||
- 10MHz for 802.11p/vehicle in 5.9GHz
|
||||
- On roadmap: **802.11ax**
|
||||
|
||||
**Performance (AP: openwifi at channel 44, client: TL-WDN4200 N900 Wireless Dual Band USB Adapter. iperf test):**
|
||||
* AP --> client: 30.6Mbps(TCP), 38.8Mbps(UDP)
|
||||
* client --> AP: 17.0Mbps(TCP), 21.5Mbps(UDP)
|
||||
**Performance (AP: openwifi at channel 44, client: TL-WDN4200 N900 USB Dongle):**
|
||||
- AP --> client: 30.6Mbps(TCP), 38.8Mbps(UDP)
|
||||
- client --> AP: 17.0Mbps(TCP), 21.5Mbps(UDP)
|
||||
|
||||
**Supported SDR platforms:**
|
||||
**Supported SDR platforms:** (Check [Porting guide](#Porting-guide) for your new board if it isn't in the list)
|
||||
|
||||
board_name|actual boards used|status
|
||||
board_name|board combination|status
|
||||
-------|-------|----
|
||||
zc706_fmcs2|Xilinx ZC706 dev board + FMCOMMS2/3/4|Done
|
||||
adrv9361z7035|ADRV9361Z7035 SOM + ADRV1CRR-BOB carrier board|Coming soon!
|
||||
adrv9361z7035_fmc|ADRV9361Z7035 SOM + ADRV1CRR-FMC carrier board|Coming soon!
|
||||
adrv9364z7020|ADRV9364Z7020 SOM + ADRV1CRR-BOB carrier board|Coming soon!
|
||||
zed_fmcs2|Xilinx zed board + FMCOMMS2/3/4|Coming soon!
|
||||
zed_fmcs2|Xilinx zed board + FMCOMMS2/3/4|Done
|
||||
adrv9364z7020|ADRV9364Z7020 SOM + ADRV1CRR-BOB carrier board|Done
|
||||
adrv9361z7035|ADRV9361Z7035 SOM + ADRV1CRR-BOB carrier board|Done
|
||||
adrv9361z7035_fmc|ADRV9361Z7035 SOM + ADRV1CRR-FMC carrier board|Done
|
||||
zc702_fmcs2|Xilinx ZC702 dev board + FMCOMMS2/3/4|Done
|
||||
zcu102_fmcs2|Xilinx ZCU102 dev board + FMCOMMS2/3/4|Future
|
||||
zcu102_9371|Xilinx ZCU102 dev board + ADRV9371|Future
|
||||
|
||||
* board_name is used to identify FPGA design in openwifi-hw/boards/ and rf script in user_space/rf_init_board_name.sh
|
||||
* Don't have any boards? Or you like JTAG boot instead of SD card? Check our test bed [w-iLab.t](https://doc.ilabt.imec.be/ilabt/wilab/tutorials/openwifi.html) tutorial.
|
||||
- board_name is used to identify FPGA design in openwifi-hw/boards/
|
||||
- Don't have any boards? Or you like JTAG boot instead of SD card? Check our test bed [w-iLab.t](https://doc.ilabt.imec.be/ilabt/wilab/tutorials/openwifi.html) tutorial.
|
||||
|
||||
**Quick start:** (Example instructions are verified on Ubuntu 16/18)
|
||||
[[Quick start](#Quick-start)]
|
||||
[[Basic operations](#Basic-operations)]
|
||||
[[Update FPGA](#Update-FPGA)]
|
||||
[[Update Driver](#Update-Driver)]
|
||||
[[Update sdrctl](#Update-sdrctl)]
|
||||
[[Easy Access and etc](#Easy-Access-and-etc)]
|
||||
|
||||
* Download pre-built [openwifi Linux .img.xz file](https://users.ugent.be/~xjiao/) (It might not have the latest bug-fixes/features. Check related sections on how to udpate files in img if needed). Burn the img file to a SD card.
|
||||
* Connect RX/TX antenna to RX1A/TX2A ports(For fmcomms4/ad9364, you may connect antennas to TXA/RXA), and make two antennas orthogonal to each other for good isolation. Config the board to SD card boot mode by switches (Read the board spec on internet). Insert the SD card to the board.
|
||||
[[Build openwifi Linux img from scratch](#Build-openwifi-Linux-img-from-scratch)]
|
||||
[[Special note for 11b](#Special-note-for-11b)]
|
||||
[[Porting guide](#Porting-guide)]
|
||||
[[Cite openwifi project](#Cite-openwifi-project)]
|
||||
|
||||
* Connect the board to PC. (PC IP address should be 192.168.10.1). Power on the board. Then from PC:
|
||||
```
|
||||
ssh root@192.168.10.122
|
||||
(password: openwifi)
|
||||
cd openwifi
|
||||
cp rf_init_board_name.sh rf_init.sh
|
||||
(If there isn't rf_init.sh, rename your board rf script, such as rf_init_adrv9361z7035.sh, to rf_init.sh for wgd.sh to call)
|
||||
service network-manager stop
|
||||
./wgd.sh
|
||||
(For fmcomms4, you need an extra command: ./set_ant.sh rx1 tx1)
|
||||
ifconfig sdr0 up
|
||||
iwlist sdr0 scan
|
||||
(you should see the Wi-Fi scan result)
|
||||
```
|
||||
* Setup openwifi hotspot over topology: client -- (sdr0)|board|(eth0) -- (***ethX***)|PC|(***ethY***) -- internet
|
||||
* Enable **IP forwarding** on both **board** and **PC** (uncomment net.ipv4.ip_forward=1 in /etc/sysctl.conf)
|
||||
* Then, on board:
|
||||
|
||||
ifconfig sdr0 192.168.13.1
|
||||
route add default gw 192.168.10.1
|
||||
service isc-dhcp-server restart
|
||||
hostapd hostapd-openwifi.conf
|
||||
* Then, on PC:
|
||||
|
||||
sudo iptables -t nat -A POSTROUTING -o ethY -j MASQUERADE
|
||||
sudo ip route add 192.168.13.0/24 via 192.168.10.122 dev ethX
|
||||
* Now you can connect openwifi by your devices (phone, laptop, etc)
|
||||
* Connect openwifi to another hotspot. Terminate hostapd, edit wpa-connect.conf properly, then:
|
||||
|
||||
./wgd.sh
|
||||
(For fmcomms4, you need an extra command: ./set_ant.sh rx1 tx1)
|
||||
route del default gw 192.168.10.1
|
||||
wpa_supplicant -i sdr0 -c wpa-connect.conf
|
||||
(Wait for connection done, then open another ssh terminal)
|
||||
dhclient sdr0
|
||||
(Wait for its done, then you should have connection)
|
||||
|
||||
* Real-time control/config via "sdrctl" (register, time slice config, etc), please go to openwifi/doc.
|
||||
|
||||
* ***Note***: If openwifi stops working after ~2 hours, it means the evaluation license of Xilinx Viterbi decoder has expired. You need to power cycle the board. Run this command several times on board to confirm:
|
||||
|
||||
root@analog:~/openwifi# ./sdrctl dev sdr0 get reg rx 20
|
||||
SENDaddr: 00040050
|
||||
reg val: 34be0123
|
||||
(If the last number of reg val is always 3, that means the Viterbi decoder stops working)
|
||||
|
||||
**Build openwifi Linux img based on openwifi FPGA and driver:**
|
||||
|
||||
* Install Vivado/SDK 2017.4.1 (If you don't need to re-compile FPGA, WebPack version without license is enough)
|
||||
* Get pre-built FPGA files from openwifi-hw repository.
|
||||
```
|
||||
git submodule init openwifi-hw
|
||||
git submodule update openwifi-hw
|
||||
cd openwifi-hw
|
||||
git checkout master
|
||||
git pull
|
||||
```
|
||||
* Build Linux kernel and modules:
|
||||
```
|
||||
export XILINX_DIR=your_Xilinx_directory
|
||||
cd openwifi
|
||||
git submodule init adi-linux
|
||||
git submodule update adi-linux
|
||||
(Will take a while)
|
||||
cd adi-linux
|
||||
git reset --hard 4220d5d24c6c7589fc702db4f941f0632b5ad767
|
||||
cp ../kernel_boot/kernel_config ./.config
|
||||
source $XILINX_DIR/SDK/2017.4/settings64.sh
|
||||
export ARCH=arm
|
||||
export CROSS_COMPILE=arm-linux-gnueabihf-
|
||||
make -j12 UIMAGE_LOADADDR=0x8000 uImage
|
||||
(Answer "y" to Xilinx DMA Engines (XILINX_DMA_ENGINES) [N/y/?] (NEW))
|
||||
make modules
|
||||
```
|
||||
* Build openwifi Linux driver modules:
|
||||
```
|
||||
export OPENWIFI_DIR=your_openwifi_directory
|
||||
cd $OPENWIFI_DIR/driver
|
||||
./make_all.sh $XILINX_DIR/SDK/2017.4/ $OPENWIFI_DIR/adi-linux/
|
||||
```
|
||||
* Build openwifi Linux devicetree:
|
||||
```
|
||||
export BOARD_NAME=board_name
|
||||
(Check the board_name naming in the table of supported SDR platforms)
|
||||
cd $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME
|
||||
dtc -I dts -O dtb -o devicetree.dtb devicetree.dts
|
||||
cp devicetree.dtb $OPENWIFI_DIR/kernel_boot/
|
||||
```
|
||||
* Build openwifi BOOT.BIN based on FPGA files generated in openwifi-hw:
|
||||
```
|
||||
cd $OPENWIFI_DIR/kernel_boot
|
||||
source $XILINX_DIR/SDK/2017.4/settings64.sh
|
||||
./build_boot_bin.sh ../openwifi-hw/boards/$BOARD_NAME/sdk/system_top_hw_platform_0/system.hdf ./boards/$BOARD_NAME/u-boot.elf
|
||||
(u-boot.elf is renamed from the compressed file in the board directory of original Analog Devices SD card boot partition)
|
||||
```
|
||||
* Prepare correct rf_init.sh in host openwifi/user_space
|
||||
```
|
||||
cd $OPENWIFI_DIR/user_space
|
||||
cp rf_init_board_name.sh rf_init.sh
|
||||
(If there isn't rf_init.sh, rename your board rf script, such as rf_init_adrv9361z7035.sh, to rf_init.sh for "wgd.sh remote" to download)
|
||||
```
|
||||
* Download [2017_R1-2018_01_29.img.xz](http://swdownloads.analog.com/cse/2017_R1-2018_01_29.img.xz) from [Analog Devices Wiki](https://wiki.analog.com/resources/tools-software/linux-software/zynq_images). Burn it into a SD card via your PC.
|
||||
* Mount SD card BOOT/rootfs partitions to SDCARD_DIR directory of your PC (If it is mounted automatically, find the directory). Then copy built files to SD card via your PC. (You can also update files over ftp/ssh after your full system runs. Please check next section. Read carefully user_space/sdcard_boot_update.sh and set your ftp root directory to $OPENWIFI_DIR in your PC):
|
||||
```
|
||||
export SDCARD_DIR=sdcard_mount_point
|
||||
cp $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME/devicetree.dtb $SDCARD_DIR/BOOT
|
||||
cp $OPENWIFI_DIR/kernel_boot/output_boot_bin/BOOT.BIN $SDCARD_DIR/BOOT
|
||||
cp $OPENWIFI_DIR/adi-linux/arch/arm/boot/uImage $SDCARD_DIR/BOOT
|
||||
cd $SDCARD_DIR/BOOT
|
||||
sync
|
||||
|
||||
sudo mkdir $SDCARD_DIR/rootfs/root/openwifi
|
||||
sudo find $OPENWIFI_DIR/driver -name \*.ko -exec cp {} $SDCARD_DIR/rootfs/root/openwifi/ \;
|
||||
sudo cp $OPENWIFI_DIR/user_space/* $SDCARD_DIR/rootfs/root/openwifi/ -rf
|
||||
|
||||
sudo mkdir $SDCARD_DIR/rootfs/lib/modules
|
||||
sudo mkdir $SDCARD_DIR/rootfs/lib/modules/4.14.0-g4220d5d
|
||||
sudo find $OPENWIFI_DIR/adi-linux -name \*.ko -exec cp {} $SDCARD_DIR/rootfs/lib/modules/4.14.0-g4220d5d/ \;
|
||||
sudo rm $SDCARD_DIR/rootfs/lib/modules/4.14.0-g4220d5d/{axidmatest.ko,xilinx_dma.ko,adi_axi_hdmi.ko,ad9361_drv.ko} -f
|
||||
|
||||
sudo rm $SDCARD_DIR/rootfs/etc/udev/rules.d/70-persistent-net.rules
|
||||
sudo cp $OPENWIFI_DIR/kernel_boot/70-persistent-net.rules $SDCARD_DIR/rootfs/etc/udev/rules.d/
|
||||
(Above rule will auto-rename wlan0 to sdr0 which is the openwifi NIC name)
|
||||
cd $SDCARD_DIR/rootfs
|
||||
sync
|
||||
```
|
||||
**Run Linux and do some post-config:**
|
||||
|
||||
* Insert the SD card to the board, power on and run serial console (such as minicom) from a PC via USB-UART cable to the board. After booting completes, in the PC serial console:
|
||||
```
|
||||
depmod
|
||||
(Ignore the error messages)
|
||||
modprobe mac80211
|
||||
(if you get error like: could not open moddep file 'lib/modules/4.14.0XXXYYYZZZ/modules.dep.bin', you could make a symbol link and modprobe again)
|
||||
ln -s /lib/modules/4.14.0-g4220d5d /lib/modules/4.14.0XXXYYYZZZ
|
||||
depmod
|
||||
modprobe mac80211
|
||||
|
||||
cd openwifi
|
||||
cp rf_init_board_name.sh rf_init.sh
|
||||
(rename your board rf script, such as rf_init_adrv9361z7035.sh, to rf_init.sh for wgd.sh to call)
|
||||
./wgd.sh
|
||||
(For fmcomms4, you need an extra command: ./set_ant.sh rx1 tx1)
|
||||
(Wait for the completion)
|
||||
ifconfig
|
||||
(You should see sdr0 interface)
|
||||
iwlist sdr0 scan
|
||||
(You should see the Wi-Fi scan results)
|
||||
```
|
||||
* Config ssh server and ethernet IP address of the board. In the PC serial console:
|
||||
```
|
||||
passwd
|
||||
(ssh server needs a password, such as "openwifi")
|
||||
Add "UseDNS no" to /etc/ssh/sshd_config, otherwise ssh login takes too long time
|
||||
Set static IP to board (If you have DHCP server on PC, you can skip this step)
|
||||
Add following content to /etc/network/interfaces
|
||||
auto lo eth0
|
||||
iface lo inet loopback
|
||||
iface eth0 inet static
|
||||
address 192.168.10.122
|
||||
netmask 255.255.255.0
|
||||
Add following content to /etc/resolv.conf
|
||||
nameserver 8.8.8.8
|
||||
nameserver 4.4.4.4
|
||||
|
||||
Disable update (long time hang) on boot or ssh session:
|
||||
sudo chmod -x /etc/update-motd.d/90-updates-available
|
||||
sudo chmod -x /etc/update-motd.d/91-release-upgrade
|
||||
|
||||
reboot the board, and set proper IP (192.168.10.1) of the connected PC, then from the PC:
|
||||
ssh roo@192.168.10.122
|
||||
(password: openwifi)
|
||||
route add default gw 192.168.10.1
|
||||
(above route is necessary for your board to access internent via your PC)
|
||||
```
|
||||
* Make on board file update easier:
|
||||
* Option 1: Access the board disk/rootfs from Ubuntu PC: "File manager --> Connect to Server...", input: sftp://root@192.168.10.122/root . Then you can operate files on board like normal files on your disk. To update files that need to be in boot partition (BOOT.BIN, uImage and devicetree.dtb), you can transfer those files to rootfs firstly, then on board:
|
||||
|
||||
mkdir /sdcard
|
||||
mount /dev/mmcblk0p1 /sdcard
|
||||
cp file /sdcard
|
||||
cd /sdcard
|
||||
sync
|
||||
cd /
|
||||
umount /sdcard
|
||||
(Remember to power cycle the board)
|
||||
* Option 2: Setup [ftp server](https://help.ubuntu.com/lts/serverguide/ftp-server.html) on PC, allow anonymous and change ftp root directory to $OPENWIFI_DIR. Then on board:
|
||||
|
||||
mkdir /sdcard
|
||||
./sdcard_boot_update.sh
|
||||
(Above command downloads uImage, BOOT.BIN and devicetree.dtb, then copy them into boot partition. Remember to power cycle)
|
||||
./wgd.sh remote
|
||||
(Above command downloads driver files, and brings up sdr0)
|
||||
(For fmcomms4, you need an extra command: ./set_ant.sh rx1 tx1)
|
||||
|
||||
**Compile sdrctl on the board** ("On the board" means that you login to the board via ssh)
|
||||
```
|
||||
sudo apt-get install libnl-3-dev
|
||||
sudo apt-get install libnl-genl-3-dev
|
||||
(Please find the next section to see how to connect board to the internet via your PC)
|
||||
(or find out .deb files by above commands and copy .deb to the board, if you do not have internet)
|
||||
|
||||
copy $OPENWIFI_DIR/user_space/sdrctl_src to the board, then on the board:
|
||||
cd sdrctl_src
|
||||
chmod +x version.sh
|
||||
make
|
||||
```
|
||||
|
||||
**Internet config**
|
||||
* Connect board to internet. Topology: board|(eth0) -- (***ethX***)|PC|(***ethY***) -- internet
|
||||
* Enable **IP forwarding** on both **board** and **PC** (uncomment net.ipv4.ip_forward=1 in /etc/sysctl.conf)
|
||||
* On board:
|
||||
## Quick start
|
||||
- Burn [openwifi image](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan.img.xz) into a SD card (Double clikc in Ubuntu or "Open With Disk Image Writer"). You can see two partitions (BOOT and rootfs) when you insert the SD card to your PC. You need to use **correct files in the BOOT partition** according to the **platform you have**. Just **overwrite** the files in the base directory with the files in **board_name** directory of BOOT partiton.
|
||||
- Connect two antennas to RXA/TXA ports. Config the board to SD card boot mode (check your board manual). Insert the SD card to the board.
|
||||
- Power on. login to the board from your PC (PC Ethernet should have IP 192.168.10.1) with one time password **analog**.
|
||||
```
|
||||
route add default gw 192.168.10.1
|
||||
ssh root@192.168.10.122
|
||||
```
|
||||
* On PC. After this your board should have internet via NAT through your PC.
|
||||
|
||||
- Setup routing/NAT **on the PC** for the board -- this is **important** for post installation/config.
|
||||
```
|
||||
sudo sysctl -w net.ipv4.ip_forward=1
|
||||
sudo iptables -t nat -A POSTROUTING -o ethY -j MASQUERADE
|
||||
```
|
||||
* Setup AP for Wi-Fi client. Topology: client -- (sdr0)|board|(eth0) -- (***ethX***)|PC|(***ethY***) -- internet
|
||||
* On board: Install dhcp server preparing for serving your openwifi clients via hostapd.
|
||||
```
|
||||
sudo apt-get install isc-dhcp-server
|
||||
sudo apt-get install Haveged
|
||||
sudo apt-get install hostapd
|
||||
cd openwifi
|
||||
cp dhcpd.conf /etc/dhcp/dhcpd.conf
|
||||
service network-manager stop
|
||||
./wgd.sh
|
||||
(For fmcomms4, you need an extra command: ./set_ant.sh rx1 tx1)
|
||||
ifconfig sdr0 up
|
||||
ifconfig sdr0 192.168.13.1
|
||||
route add default gw 192.168.10.1
|
||||
service isc-dhcp-server restart
|
||||
hostapd hostapd-openwifi.conf
|
||||
```
|
||||
* On PC:
|
||||
```
|
||||
sudo ip route add 192.168.13.0/24 via 192.168.10.122 dev ethX
|
||||
```
|
||||
* Now you can connect openwifi hotspot from your phone/laptop and access the internet.
|
||||
**ethX** is the PC NIC name connecting the board. **ethY** is the PC NIC name connecting internet.
|
||||
|
||||
If you want, uncommenting "net.ipv4.ip_forward=1" in /etc/sysctl.conf to make IP forwarding persistent on PC.
|
||||
- Run **one time** script on board to complete post installation/config (After this, password becomes **openwifi**)
|
||||
```
|
||||
cd ~/openwifi && ./post_config.sh
|
||||
```
|
||||
- Run openwifi AP together with the on board webserver
|
||||
```
|
||||
~/openwifi/fosdem.sh
|
||||
```
|
||||
- After you see the "openwifi" SSID on your device (Phone/Laptop/etc), connect it. Browser to 192.168.13.1 on your deivce, you should see the webpage hosted by the webserver on board.
|
||||
- Note 1: If your device doesn't support 5GHz (ch44), please change the **hostapd-openwifi.conf** on board and re-run fosdem.sh.
|
||||
- Note 2: After ~2 hours, the Viterbi decoder will halt (Xilinx Evaluation License). Just power cycle the board if it happens.
|
||||
|
||||
**Connecting a client to openwifi AP in 2.4GHz**
|
||||
## Basic operations
|
||||
The board actually is an Linux/Ubuntu computer which is running **hostapd** to offer Wi-Fi AP functionality over the Wi-Fi Network Interface (NIC). The NIC is implemented by openwifi-hw FPGA design. We use the term **"On board"** to indicate that the commands should be executed after ssh login to the board. **"On PC"** means the commands should run on PC.
|
||||
- Bring up the openwifi NIC sdr0:
|
||||
```
|
||||
cd ~/openwifi && ./wgd.sh
|
||||
```
|
||||
- Use openwifi as client to connect other AP (Change wpa-connect.conf on board firstly):
|
||||
```
|
||||
route del default gw 192.168.10.1
|
||||
wpa_supplicant -i sdr0 -c wpa-connect.conf &
|
||||
dhclient sdr0
|
||||
```
|
||||
- Use openwifi in ad-hoc mode: Please check **sdr-ad-hoc-up.sh** and **sdr-ad-hoc-join.sh**.
|
||||
- Use openwifi in monitor mode: Please check **monitor_ch.sh**.
|
||||
- The Linux native Wi-Fi tools/Apps (iwconfig/ifconfig/iwlist/iw/hostapd/wpa_supplicant/etc) can run over openwifi NIC in the same way as commercial Wi-Fi chip.
|
||||
- **sdrctl** is a dedicated tool to access openwifi driver/FPGA, please check doc directory for more information.
|
||||
|
||||
## Update FPGA
|
||||
|
||||
Since the pre-built SD card image might not have the latest bug-fixes/updates, it is recommended to udpate the fpga bitstream on board.
|
||||
|
||||
- Install Vivado/SDK 2017.4.1 (If you don't need to generate new FPGA bitstream, WebPack version without license is enough)
|
||||
- Setup environment variables (use absolute path):
|
||||
```
|
||||
export XILINX_DIR=your_Xilinx_directory
|
||||
export OPENWIFI_DIR=your_openwifi_directory
|
||||
export BOARD_NAME=your_board_name
|
||||
```
|
||||
- Get the latest FPGA bitstream from openwifi-hw, generate BOOT.BIN and transfer it on board via ssh channel:
|
||||
```
|
||||
$OPENWIFI_DIR/user_space/get_fpga.sh $OPENWIFI_DIR
|
||||
$OPENWIFI_DIR/user_space/boot_bin_gen.sh $OPENWIFI_DIR $XILINX_DIR $BOARD_NAME
|
||||
scp $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN root@192.168.10.122:
|
||||
```
|
||||
- On board: Put the BOOT.BIN into the BOOT partition.
|
||||
```
|
||||
mount /dev/mmcblk0p1 /mnt
|
||||
cp ~/BOOT.BIN /mnt
|
||||
umount /mnt
|
||||
```
|
||||
**Power cycle** the board to load new FPGA bitstream.
|
||||
|
||||
## Update Driver
|
||||
|
||||
Since the pre-built SD card image might not have the latest bug-fixes/updates, it is recommended to udpate the driver on board.
|
||||
- Prepare Analog Devices Linux kernel source code (only need to run once):
|
||||
```
|
||||
$OPENWIFI_DIR/user_space/prepare_kernel_src.sh $OPENWIFI_DIR $XILINX_DIR
|
||||
```
|
||||
- Compile the latest openwifi driver
|
||||
```
|
||||
$OPENWIFI_DIR/driver/make_all.sh $OPENWIFI_DIR $XILINX_DIR
|
||||
```
|
||||
- Copy the driver files to the board via ssh channel
|
||||
```
|
||||
scp `find $OPENWIFI_DIR/driver/ -name \*.ko` root@192.168.10.122:openwifi/
|
||||
```
|
||||
Now you can use **wgd.sh** on board to load the new openwifi driver.
|
||||
|
||||
## Update sdrctl
|
||||
- Copy the sdrctl source files to the board via ssh channel
|
||||
```
|
||||
scp `find $OPENWIFI_DIR/user_space/sdrctl_src/ -name \*.*` root@192.168.10.122:openwifi/sdrctl_src/
|
||||
```
|
||||
- Compile the sdrctl **on board**:
|
||||
```
|
||||
cd ~/openwifi/sdrctl_src/ && make && cp sdrctl ../ && cd ..
|
||||
```
|
||||
## Easy Access and etc
|
||||
|
||||
- FPGA and driver on board update scripts
|
||||
- Setup [ftp server](https://help.ubuntu.com/lts/serverguide/ftp-server.html) on PC, allow anonymous and change ftp root directory to $OPENWIFI_DIR.
|
||||
- On board:
|
||||
```
|
||||
./sdcard_boot_update.sh $BOARD_NAME
|
||||
(Above command downloads uImage, BOOT.BIN and devicetree.dtb, then copy them into boot partition. Remember to power cycle)
|
||||
./wgd.sh remote
|
||||
(Above command downloads driver files, and brings up sdr0)
|
||||
```
|
||||
- Access the board disk/rootfs like a disk:
|
||||
- On PC: "File manager --> Connect to Server...", input: sftp://root@192.168.10.122/root
|
||||
- Input password "openwifi"
|
||||
|
||||
## Build openwifi Linux img from scratch
|
||||
- Download [2017_R1-2018_01_29.img.xz](http://swdownloads.analog.com/cse/2017_R1-2018_01_29.img.xz) from [Analog Devices Wiki](https://wiki.analog.com/resources/tools-software/linux-software/zynq_images). Burn it to a SD card.
|
||||
- Insert the SD card to your Linux PC. Find out the mount point (that has two sub directories BOOT and rootfs), and setup environment variables (use absolute path):
|
||||
```
|
||||
export SDCARD_DIR=sdcard_mount_point
|
||||
export XILINX_DIR=your_Xilinx_directory
|
||||
export OPENWIFI_DIR=your_openwifi_directory
|
||||
export BOARD_NAME=your_board_name
|
||||
```
|
||||
- Run script to update SD card:
|
||||
```
|
||||
$OPENWIFI_DIR/user_space/update_sdcard.sh $OPENWIFI_DIR $XILINX_DIR $BOARD_NAME $SDCARD_DIR
|
||||
```
|
||||
- Now you can start from [Quick start](#Quick-start)
|
||||
|
||||
## Special note for 11b
|
||||
|
||||
Openwifi only applies OFDM as its modulation scheme and as a result, it is not backward compatible with 802.11b clients or modes of operation. This is usually the case during beacon transmission, connection establishment, and robust communication.
|
||||
|
||||
@ -304,20 +193,19 @@ For hostapd program, 802.11b rates can be suppressed using configuration command
|
||||
|
||||
On the other hand, the wpa_supplicant program on the client side (commercial Wi-Fi dongle/board) cannot suppress 802.11b rates out of the box in 2.4GHz band, so there will be an issue when connecting openwifi (OFDM only). A patched wpa_supplicant should be used at the client side.
|
||||
```
|
||||
cd openwifi/user_space
|
||||
wget http://w1.fi/releases/wpa_supplicant-2.1.tar.gz
|
||||
tar xzvf wpa_supplicant-2.1.tar.gz
|
||||
patch -d wpa_supplicant-2.1/src/drivers/ < driver_nl80211.patch
|
||||
cd wpa_supplicant-2.1/wpa_supplicant/
|
||||
cp defconfig .config
|
||||
sed -i 's/#CONFIG_LIBNL32.*/CONFIG_LIBNL32=y/g' .config
|
||||
make -j16
|
||||
sudo make install
|
||||
cd ../../
|
||||
rm -r wpa_supplicant-2.1/ wpa_supplicant-2.1.tar.gz
|
||||
$OPENWIFI_DIR/user_space/build_wpa_supplicant_wo11b.sh $OPENWIFI_DIR
|
||||
```
|
||||
## Porting guide
|
||||
|
||||
## cite openwifi project
|
||||
This section explains the porting work by showing the differences between openwifi and Analog Devices reference design. We use **2018_r1** of [HDL Reference Designs](https://github.com/analogdevicesinc/hdl).
|
||||
- Open the fmcomms2 + zc706 reference design at hdl/projects/fmcomms2/zc706 (Please read Analog Devices help)
|
||||
- Open the openwifi design zc706_fmcs2 at openwifi-hw/boards/zc706_fmcs2 (Please read openwifi-hw repository)
|
||||
- "Open Block Design", you will see the differences between openwifi and the reference design. Both in "diagram" and in "Address Editor".
|
||||
- The address/interrupts of FPGA blocks hooked to the ARM bus should be put/aligned to the devicetree file openwifi/kernel_boot/boards/zc706_fmcs2/devicetree.dts. Linux will parse the devicetree.dtb when booting to know information of attached deivce (FPGA blocks in our case).
|
||||
- We use dtc command to get devicetree.dts converted from devicetree.dtb in [Analog Devices Linux image](https://wiki.analog.com/resources/tools-software/linux-software/zynq_images), then do modification according to what we have added/modified to the reference design.
|
||||
- Please learn the script in [[Build openwifi Linux img from scratch](#Build-openwifi-Linux-img-from-scratch)] to understand how we generate devicetree.dtb, BOOT.BIN and Linux kernel uImage and put them together to build the full SD card image.
|
||||
|
||||
## Cite openwifi project
|
||||
|
||||
Any use of openwifi project which results in a publication should include a citation via (bibtex example):
|
||||
```
|
||||
@ -328,3 +216,4 @@ Any use of openwifi project which results in a publication should include a cita
|
||||
year = {2019},
|
||||
}
|
||||
```
|
||||
Openwifi was born in [ORCA project](https://www.orca-project.eu/) (EU's Horizon2020 programme under agreement number 732174).
|
||||
|
@ -60,6 +60,7 @@ addr1|target MAC address of tx slice 1|32bit. for address 6c:fd:b9:4c:b1:c1, you
|
||||
slice_total1|tx slice 1 cycle length in us|for length 50ms, you set 49999
|
||||
slice_start1|tx slice 1 cycle start time in us|for start at 10ms, you set 10000
|
||||
slice_end1| tx slice 1 cycle end time in us|for end at 40ms, you set 39999
|
||||
tsf| sets TSF value| it requires two values "high_TSF low_TSF". Decimal
|
||||
|
||||
### Get and set a register of a module
|
||||
```
|
||||
@ -107,7 +108,7 @@ module_name: **tx_intf**
|
||||
|
||||
reg_idx|meaning|comment
|
||||
-------|-------|----
|
||||
13|tx I/Q digital gain before DUC|current optimal value: 237
|
||||
13|tx I/Q digital gain before DUC|current optimal value: 100
|
||||
14|enable/disable tx interrupt|196672(0x30040):disable, 64(0x40):enable
|
||||
|
||||
module_name: **rx**
|
||||
|
@ -107,6 +107,7 @@ const char *rx_intf_compatible_str = "sdr,rx_intf";
|
||||
#define RX_INTF_REG_NUM_DMA_SYMBOL_TO_PL_ADDR (8*4)
|
||||
#define RX_INTF_REG_NUM_DMA_SYMBOL_TO_PS_ADDR (9*4)
|
||||
#define RX_INTF_REG_CFG_DATA_TO_ANT_ADDR (10*4)
|
||||
#define RX_INTF_REG_BB_GAIN_ADDR (11*4)
|
||||
#define RX_INTF_REG_TLAST_TIMEOUT_TOP_ADDR (12*4)
|
||||
#define RX_INTF_REG_S2MM_INTR_DELAY_COUNT_ADDR (13*4)
|
||||
#define RX_INTF_REG_ANT_SEL_ADDR (16*4)
|
||||
@ -159,6 +160,7 @@ struct rx_intf_driver_api {
|
||||
void (*RX_INTF_REG_NUM_DMA_SYMBOL_TO_PL_write)(u32 value);
|
||||
void (*RX_INTF_REG_NUM_DMA_SYMBOL_TO_PS_write)(u32 value);
|
||||
void (*RX_INTF_REG_CFG_DATA_TO_ANT_write)(u32 value);
|
||||
void (*RX_INTF_REG_BB_GAIN_write)(u32 value);
|
||||
void (*RX_INTF_REG_ANT_SEL_write)(u32 value);
|
||||
void (*RX_INTF_REG_INTERRUPT_TEST_write)(u32 value);
|
||||
|
||||
|
@ -1,14 +1,29 @@
|
||||
#!/bin/bash
|
||||
xilinx_sdk_dir=$1
|
||||
adi_lnx_dir=$2\
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "You must enter exactly 2 command line arguments"
|
||||
echo "First argument is the path, second argument is the path to adi linux repository, please don't add slash at the end of the path"
|
||||
echo "Eg, ./make_all.sh /opt/Xilinx/SDK/2017.4 /home/gitfolder/linux"
|
||||
echo "You must enter exactly 2 arguments: \$OPENWIFI_DIR \$XILINX_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OPENWIFI_DIR=$1
|
||||
XILINX_DIR=$2
|
||||
|
||||
if [ -f "$OPENWIFI_DIR/LICENSE" ]; then
|
||||
echo "\$OPENWIFI_DIR is found!"
|
||||
else
|
||||
echo "\$OPENWIFI_DIR is not correct. Please check!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$XILINX_DIR/SDK" ]; then
|
||||
echo "\$XILINX_DIR is found!"
|
||||
else
|
||||
echo "\$XILINX_DIR is not correct. Please check!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
adi_lnx_dir=$OPENWIFI_DIR/adi-linux/
|
||||
xilinx_sdk_dir=$XILINX_DIR/SDK/2017.4/
|
||||
|
||||
# check if user entered the right path to SDK
|
||||
if [ -d "$xilinx_sdk_dir" ]; then
|
||||
echo " setup sdk path ${xilinx_sdk_dir}"
|
||||
@ -28,25 +43,25 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
home_dir=$(pwd)
|
||||
|
||||
#source ~/Xilinx/SDK/2017.4/settings64.sh
|
||||
#set -x
|
||||
cd $OPENWIFI_DIR/driver/
|
||||
make KDIR=$adi_lnx_dir
|
||||
cd openofdm_tx
|
||||
cd $OPENWIFI_DIR/driver/openofdm_tx
|
||||
make KDIR=$adi_lnx_dir
|
||||
cd ../openofdm_rx
|
||||
cd $OPENWIFI_DIR/driver/openofdm_rx
|
||||
make KDIR=$adi_lnx_dir
|
||||
cd ../tx_intf
|
||||
cd $OPENWIFI_DIR/driver/tx_intf
|
||||
make KDIR=$adi_lnx_dir
|
||||
cd ../rx_intf
|
||||
cd $OPENWIFI_DIR/driver/rx_intf
|
||||
make KDIR=$adi_lnx_dir
|
||||
cd ../xpu
|
||||
cd $OPENWIFI_DIR/driver/xpu
|
||||
make KDIR=$adi_lnx_dir
|
||||
cd ../ad9361
|
||||
cd $OPENWIFI_DIR/driver/ad9361
|
||||
make KDIR=$adi_lnx_dir
|
||||
cd ../xilinx_dma
|
||||
cd $OPENWIFI_DIR/driver/xilinx_dma
|
||||
./make_xilinx_dma.sh $adi_lnx_dir $sdk_setting
|
||||
cd ..
|
||||
|
||||
|
||||
cd $home_dir
|
||||
|
@ -136,6 +136,10 @@ static inline void RX_INTF_REG_CFG_DATA_TO_ANT_write(u32 value){
|
||||
reg_write(RX_INTF_REG_CFG_DATA_TO_ANT_ADDR, value);
|
||||
}
|
||||
|
||||
static inline void RX_INTF_REG_BB_GAIN_write(u32 value) {
|
||||
reg_write(RX_INTF_REG_BB_GAIN_ADDR, value);
|
||||
}
|
||||
|
||||
static inline void RX_INTF_REG_ANT_SEL_write(u32 value){
|
||||
reg_write(RX_INTF_REG_ANT_SEL_ADDR, value);
|
||||
}
|
||||
@ -325,6 +329,7 @@ static inline u32 hw_init(enum rx_intf_mode mode, u32 num_dma_symbol_to_pl, u32
|
||||
rx_intf_api->RX_INTF_REG_NUM_DMA_SYMBOL_TO_PL_write(num_dma_symbol_to_pl);
|
||||
rx_intf_api->RX_INTF_REG_NUM_DMA_SYMBOL_TO_PS_write(num_dma_symbol_to_ps);
|
||||
rx_intf_api->RX_INTF_REG_CFG_DATA_TO_ANT_write(1<<8);
|
||||
rx_intf_api->RX_INTF_REG_BB_GAIN_write(4);
|
||||
rx_intf_api->RX_INTF_REG_ANT_SEL_write(ant_sel);
|
||||
|
||||
rx_intf_api->RX_INTF_REG_MULTI_RST_write(0x14);//rst m/s axis
|
||||
@ -390,6 +395,7 @@ static int dev_probe(struct platform_device *pdev)
|
||||
rx_intf_api->RX_INTF_REG_NUM_DMA_SYMBOL_TO_PL_write=RX_INTF_REG_NUM_DMA_SYMBOL_TO_PL_write;
|
||||
rx_intf_api->RX_INTF_REG_NUM_DMA_SYMBOL_TO_PS_write=RX_INTF_REG_NUM_DMA_SYMBOL_TO_PS_write;
|
||||
rx_intf_api->RX_INTF_REG_CFG_DATA_TO_ANT_write=RX_INTF_REG_CFG_DATA_TO_ANT_write;
|
||||
rx_intf_api->RX_INTF_REG_BB_GAIN_write=RX_INTF_REG_BB_GAIN_write;
|
||||
rx_intf_api->RX_INTF_REG_ANT_SEL_write=RX_INTF_REG_ANT_SEL_write;
|
||||
rx_intf_api->RX_INTF_REG_INTERRUPT_TEST_write=RX_INTF_REG_INTERRUPT_TEST_write;
|
||||
|
||||
|
19
driver/sdr.c
19
driver/sdr.c
@ -779,7 +779,7 @@ static void openwifi_tx(struct ieee80211_hw *dev,
|
||||
//ring_len = (ring->bd_wr_idx>=ring->bd_rd_idx)?(ring->bd_wr_idx-ring->bd_rd_idx):(ring->bd_wr_idx+NUM_TX_BD-ring->bd_rd_idx);
|
||||
ring_len = ((ring->bd_wr_idx-ring->bd_rd_idx)&(NUM_TX_BD-1));
|
||||
ring_room_left = NUM_TX_BD - ring_len;
|
||||
if (ring_len>12)
|
||||
if (ring_len>28)
|
||||
printk("%s openwifi_tx: WARNING ring len %d\n", sdr_compatible_str,ring_len);
|
||||
// printk("%s openwifi_tx: WARNING ring len %d HW fifo %d q %d\n", sdr_compatible_str,ring_len,tx_intf_api->TX_INTF_REG_S_AXIS_FIFO_DATA_COUNT_read()&0xFFFF, ((tx_intf_api->TX_INTF_REG_PHY_QUEUE_TX_SN_read())>>16)&0xFF );
|
||||
|
||||
@ -927,7 +927,8 @@ static int openwifi_start(struct ieee80211_hw *dev)
|
||||
// xpu_api->XPU_REG_CSMA_CFG_write(3);
|
||||
|
||||
//xpu_api->XPU_REG_SEND_ACK_WAIT_TOP_write( ((1030-238)<<16)|0 );//high 16bit 5GHz; low 16 bit 2.4GHz (Attention, current tx core has around 1.19us starting delay that makes the ack fall behind 10us SIFS in 2.4GHz! Need to improve TX in 2.4GHz!)
|
||||
xpu_api->XPU_REG_SEND_ACK_WAIT_TOP_write( ((1030)<<16)|0 );//now our tx send out I/Q immediately
|
||||
//xpu_api->XPU_REG_SEND_ACK_WAIT_TOP_write( ((1030)<<16)|0 );//now our tx send out I/Q immediately
|
||||
xpu_api->XPU_REG_SEND_ACK_WAIT_TOP_write( ((1030+450)<<16)|(0+450) );//we have more time when we use FIR in AD9361
|
||||
|
||||
xpu_api->XPU_REG_RECV_ACK_COUNT_TOP0_write( (((45+2+2)*200 + 300)<<16) | 200 );//2.4GHz. extra 300 clocks are needed when rx core fall into fake ht detection phase (rx mcs 6M)
|
||||
xpu_api->XPU_REG_RECV_ACK_COUNT_TOP1_write( (((51+2+2)*200 + 300)<<16) | 200 );//5GHz. extra 300 clocks are needed when rx core fall into fake ht detection phase (rx mcs 6M)
|
||||
@ -1514,6 +1515,16 @@ static int openwifi_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *
|
||||
if (nla_put_u32(skb, OPENWIFI_ATTR_RSSI_TH, tmp))
|
||||
goto nla_put_failure;
|
||||
return cfg80211_testmode_reply(skb);
|
||||
case OPENWIFI_CMD_SET_TSF:
|
||||
printk("openwifi_set_tsf_1");
|
||||
if ( (!tb[OPENWIFI_ATTR_HIGH_TSF]) || (!tb[OPENWIFI_ATTR_LOW_TSF]) )
|
||||
return -EINVAL;
|
||||
printk("openwifi_set_tsf_2");
|
||||
u32 tsft_high = nla_get_u32(tb[OPENWIFI_ATTR_HIGH_TSF]);
|
||||
u32 tsft_low = nla_get_u32(tb[OPENWIFI_ATTR_LOW_TSF]);
|
||||
xpu_api->XPU_REG_TSF_LOAD_VAL_write(tsft_high,tsft_low);
|
||||
printk("%s openwifi_set_tsf: %08x%08x\n", sdr_compatible_str,tsft_high,tsft_low);
|
||||
return 0;
|
||||
|
||||
case REG_CMD_SET:
|
||||
if ( (!tb[REG_ATTR_ADDR]) || (!tb[REG_ATTR_VAL]) )
|
||||
@ -1730,12 +1741,14 @@ static int openwifi_dev_probe(struct platform_device *pdev)
|
||||
err = -ENOMEM;
|
||||
goto err_free_dev;
|
||||
}
|
||||
printk("%s bus_find_device ad9361-phy: %s\n", sdr_compatible_str, tmp_dev->init_name);
|
||||
priv->ad9361_phy = ad9361_spi_to_phy((struct spi_device*)tmp_dev);
|
||||
if (!(priv->ad9361_phy)) {
|
||||
printk(KERN_ERR "%s ad9361_spi_to_phy failed\n",sdr_compatible_str);
|
||||
err = -ENOMEM;
|
||||
goto err_free_dev;
|
||||
}
|
||||
printk("%s ad9361_spi_to_phy ad9361-phy: %s\n", sdr_compatible_str, priv->ad9361_phy->spi->modalias);
|
||||
|
||||
priv->ctrl_out.en_mask=0xFF;
|
||||
priv->ctrl_out.index=0x16;
|
||||
@ -1817,7 +1830,7 @@ static int openwifi_dev_probe(struct platform_device *pdev)
|
||||
|
||||
// // test ddc at central, duc at central+10M. It works. And also change rx BW from 40MHz to 20MHz in rf_init.sh. Rx sampling rate is still 40Msps
|
||||
priv->rx_intf_cfg = RX_INTF_BW_20MHZ_AT_0MHZ_ANT0;
|
||||
priv->tx_intf_cfg = TX_INTF_BW_20MHZ_AT_N_10MHZ_ANT1;
|
||||
priv->tx_intf_cfg = TX_INTF_BW_20MHZ_AT_N_10MHZ_ANT0; // Let's use rx0 tx0 as default mode, because it works for both 9361 and 9364
|
||||
// // try another antenna option
|
||||
//priv->rx_intf_cfg = RX_INTF_BW_20MHZ_AT_0MHZ_ANT1;
|
||||
//priv->tx_intf_cfg = TX_INTF_BW_20MHZ_AT_N_10MHZ_ANT0;
|
||||
|
@ -264,7 +264,7 @@ static inline u32 hw_init(enum tx_intf_mode mode, u32 num_dma_symbol_to_pl, u32
|
||||
tx_intf_api->TX_INTF_REG_CFG_DATA_TO_ANT_write(0);
|
||||
tx_intf_api->TX_INTF_REG_INTERRUPT_SEL_write(0x40); //.src_sel0(slv_reg14[2:0]), .src_sel1(slv_reg14[6:4]), 0-s00_axis_tlast,1-ap_start,2-tx_start_from_acc,3-tx_end_from_acc,4-xpu signal
|
||||
tx_intf_api->TX_INTF_REG_INTERRUPT_SEL_write(0x30040); //disable interrupt
|
||||
tx_intf_api->TX_INTF_REG_BB_GAIN_write(237);
|
||||
tx_intf_api->TX_INTF_REG_BB_GAIN_write(100);
|
||||
tx_intf_api->TX_INTF_REG_ANT_SEL_write(ant_sel);
|
||||
tx_intf_api->TX_INTF_REG_WIFI_TX_MODE_write((1<<3)|(2<<4));
|
||||
tx_intf_api->TX_INTF_REG_MULTI_RST_write(0x434);
|
||||
|
@ -735,7 +735,7 @@
|
||||
tx_dma: dma@80400000 {
|
||||
#dma-cells = <1>;
|
||||
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "xlnx,axi-dma-1.00.a";
|
||||
interrupt-names = "mm2s_introut", "s2mm_introut";
|
||||
interrupt-parent = <1>;
|
||||
@ -763,7 +763,7 @@
|
||||
rx_dma: dma@80410000 {
|
||||
#dma-cells = <1>;
|
||||
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "xlnx,axi-dma-1.00.a";
|
||||
//dma-coherent ;
|
||||
interrupt-names = "mm2s_introut", "s2mm_introut";
|
||||
@ -791,7 +791,7 @@
|
||||
|
||||
tx_intf_0: tx_intf@83c00000 {
|
||||
clock-names = "s00_axi_aclk", "s00_axis_aclk", "s01_axis_aclk", "m00_axis_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "sdr,tx_intf";
|
||||
interrupt-names = "tx_itrpt0", "tx_itrpt1";
|
||||
interrupt-parent = <1>;
|
||||
@ -803,7 +803,7 @@
|
||||
|
||||
rx_intf_0: rx_intf@83c20000 {
|
||||
clock-names = "s00_axi_aclk", "s00_axis_aclk", "m00_axis_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "sdr,rx_intf";
|
||||
interrupt-names = "not_valid_anymore", "rx_pkt_intr";
|
||||
interrupt-parent = <1>;
|
||||
@ -815,21 +815,21 @@
|
||||
|
||||
openofdm_tx_0: openofdm_tx@83c10000 {
|
||||
clock-names = "clk";
|
||||
clocks = <0x2 0x10>;
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,openofdm_tx";
|
||||
reg = <0x83c10000 0x10000>;
|
||||
};
|
||||
|
||||
openofdm_rx_0: openofdm_rx@83c30000 {
|
||||
clock-names = "clk";
|
||||
clocks = <0x2 0x10>;
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,openofdm_rx";
|
||||
reg = <0x83c30000 0x10000>;
|
||||
};
|
||||
|
||||
xpu_0: xpu@83c40000 {
|
||||
clock-names = "s00_axi_aclk";
|
||||
clocks = <0x2 0x10>;
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,xpu";
|
||||
reg = <0x83c40000 0x10000>;
|
||||
};
|
||||
|
@ -885,7 +885,7 @@
|
||||
tx_dma: dma@80400000 {
|
||||
#dma-cells = <1>;
|
||||
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "xlnx,axi-dma-1.00.a";
|
||||
interrupt-names = "mm2s_introut", "s2mm_introut";
|
||||
interrupt-parent = <1>;
|
||||
@ -913,7 +913,7 @@
|
||||
rx_dma: dma@80410000 {
|
||||
#dma-cells = <1>;
|
||||
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "xlnx,axi-dma-1.00.a";
|
||||
//dma-coherent ;
|
||||
interrupt-names = "mm2s_introut", "s2mm_introut";
|
||||
@ -941,7 +941,7 @@
|
||||
|
||||
tx_intf_0: tx_intf@83c00000 {
|
||||
clock-names = "s00_axi_aclk", "s00_axis_aclk", "s01_axis_aclk", "m00_axis_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "sdr,tx_intf";
|
||||
interrupt-names = "tx_itrpt0", "tx_itrpt1";
|
||||
interrupt-parent = <1>;
|
||||
@ -953,7 +953,7 @@
|
||||
|
||||
rx_intf_0: rx_intf@83c20000 {
|
||||
clock-names = "s00_axi_aclk", "s00_axis_aclk", "m00_axis_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "sdr,rx_intf";
|
||||
interrupt-names = "not_valid_anymore", "rx_pkt_intr";
|
||||
interrupt-parent = <1>;
|
||||
@ -965,21 +965,21 @@
|
||||
|
||||
openofdm_tx_0: openofdm_tx@83c10000 {
|
||||
clock-names = "clk";
|
||||
clocks = <0x2 0x10>;
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,openofdm_tx";
|
||||
reg = <0x83c10000 0x10000>;
|
||||
};
|
||||
|
||||
openofdm_rx_0: openofdm_rx@83c30000 {
|
||||
clock-names = "clk";
|
||||
clocks = <0x2 0x10>;
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,openofdm_rx";
|
||||
reg = <0x83c30000 0x10000>;
|
||||
};
|
||||
|
||||
xpu_0: xpu@83c40000 {
|
||||
clock-names = "s00_axi_aclk";
|
||||
clocks = <0x2 0x10>;
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,xpu";
|
||||
reg = <0x83c40000 0x10000>;
|
||||
};
|
||||
|
931
kernel_boot/boards/adrv9364z7020/devicetree.dts
Normal file
931
kernel_boot/boards/adrv9364z7020/devicetree.dts
Normal file
@ -0,0 +1,931 @@
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
compatible = "xlnx,zynq-7000";
|
||||
interrupt-parent = <0x1>;
|
||||
model = "Analog Devices ADRV9364-Z7020 (Z7020/AD9364)";
|
||||
|
||||
cpus {
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
|
||||
cpu@0 {
|
||||
compatible = "arm,cortex-a9";
|
||||
device_type = "cpu";
|
||||
reg = <0x0>;
|
||||
clocks = <0x2 0x3>;
|
||||
clock-latency = <0x3e8>;
|
||||
cpu0-supply = <0x3>;
|
||||
operating-points = <0xa2c2b 0xf4240 0x51616 0xf4240>;
|
||||
};
|
||||
|
||||
cpu@1 {
|
||||
compatible = "arm,cortex-a9";
|
||||
device_type = "cpu";
|
||||
reg = <0x1>;
|
||||
clocks = <0x2 0x3>;
|
||||
};
|
||||
};
|
||||
|
||||
fpga-full {
|
||||
compatible = "fpga-region";
|
||||
fpga-mgr = <0x4>;
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pmu@f8891000 {
|
||||
compatible = "arm,cortex-a9-pmu";
|
||||
interrupts = <0x0 0x5 0x4 0x0 0x6 0x4>;
|
||||
interrupt-parent = <0x1>;
|
||||
reg = <0xf8891000 0x1000 0xf8893000 0x1000>;
|
||||
};
|
||||
|
||||
fixedregulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "VCCPINT";
|
||||
regulator-min-microvolt = <0xf4240>;
|
||||
regulator-max-microvolt = <0xf4240>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
linux,phandle = <0x3>;
|
||||
phandle = <0x3>;
|
||||
};
|
||||
|
||||
amba {
|
||||
u-boot,dm-pre-reloc;
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
interrupt-parent = <0x1>;
|
||||
ranges;
|
||||
|
||||
adc@f8007100 {
|
||||
compatible = "xlnx,zynq-xadc-1.00.a";
|
||||
reg = <0xf8007100 0x20>;
|
||||
interrupts = <0x0 0x7 0x4>;
|
||||
interrupt-parent = <0x1>;
|
||||
clocks = <0x2 0xc>;
|
||||
};
|
||||
|
||||
can@e0008000 {
|
||||
compatible = "xlnx,zynq-can-1.0";
|
||||
status = "disabled";
|
||||
clocks = <0x2 0x13 0x2 0x24>;
|
||||
clock-names = "can_clk", "pclk";
|
||||
reg = <0xe0008000 0x1000>;
|
||||
interrupts = <0x0 0x1c 0x4>;
|
||||
interrupt-parent = <0x1>;
|
||||
tx-fifo-depth = <0x40>;
|
||||
rx-fifo-depth = <0x40>;
|
||||
};
|
||||
|
||||
can@e0009000 {
|
||||
compatible = "xlnx,zynq-can-1.0";
|
||||
status = "disabled";
|
||||
clocks = <0x2 0x14 0x2 0x25>;
|
||||
clock-names = "can_clk", "pclk";
|
||||
reg = <0xe0009000 0x1000>;
|
||||
interrupts = <0x0 0x33 0x4>;
|
||||
interrupt-parent = <0x1>;
|
||||
tx-fifo-depth = <0x40>;
|
||||
rx-fifo-depth = <0x40>;
|
||||
};
|
||||
|
||||
gpio@e000a000 {
|
||||
compatible = "xlnx,zynq-gpio-1.0";
|
||||
#gpio-cells = <0x2>;
|
||||
clocks = <0x2 0x2a>;
|
||||
gpio-controller;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <0x2>;
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x14 0x4>;
|
||||
reg = <0xe000a000 0x1000>;
|
||||
linux,phandle = <0x6>;
|
||||
phandle = <0x6>;
|
||||
};
|
||||
|
||||
i2c@e0004000 {
|
||||
compatible = "cdns,i2c-r1p10";
|
||||
status = "disabled";
|
||||
clocks = <0x2 0x26>;
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x19 0x4>;
|
||||
reg = <0xe0004000 0x1000>;
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
};
|
||||
|
||||
i2c@e0005000 {
|
||||
compatible = "cdns,i2c-r1p10";
|
||||
status = "disabled";
|
||||
clocks = <0x2 0x27>;
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x30 0x4>;
|
||||
reg = <0xe0005000 0x1000>;
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
};
|
||||
|
||||
interrupt-controller@f8f01000 {
|
||||
compatible = "arm,cortex-a9-gic";
|
||||
#interrupt-cells = <0x3>;
|
||||
interrupt-controller;
|
||||
reg = <0xf8f01000 0x1000 0xf8f00100 0x100>;
|
||||
linux,phandle = <0x1>;
|
||||
phandle = <0x1>;
|
||||
};
|
||||
|
||||
cache-controller@f8f02000 {
|
||||
compatible = "arm,pl310-cache";
|
||||
reg = <0xf8f02000 0x1000>;
|
||||
interrupts = <0x0 0x2 0x4>;
|
||||
arm,data-latency = <0x3 0x2 0x2>;
|
||||
arm,tag-latency = <0x2 0x2 0x2>;
|
||||
cache-unified;
|
||||
cache-level = <0x2>;
|
||||
};
|
||||
|
||||
memory-controller@f8006000 {
|
||||
compatible = "xlnx,zynq-ddrc-a05";
|
||||
reg = <0xf8006000 0x1000>;
|
||||
};
|
||||
|
||||
ocmc@f800c000 {
|
||||
compatible = "xlnx,zynq-ocmc-1.0";
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x3 0x4>;
|
||||
reg = <0xf800c000 0x1000>;
|
||||
};
|
||||
|
||||
serial@e0000000 {
|
||||
compatible = "xlnx,xuartps", "cdns,uart-r1p8";
|
||||
status = "disabled";
|
||||
clocks = <0x2 0x17 0x2 0x28>;
|
||||
clock-names = "uart_clk", "pclk";
|
||||
reg = <0xe0000000 0x1000>;
|
||||
interrupts = <0x0 0x1b 0x4>;
|
||||
};
|
||||
|
||||
serial@e0001000 {
|
||||
compatible = "xlnx,xuartps", "cdns,uart-r1p8";
|
||||
status = "okay";
|
||||
clocks = <0x2 0x18 0x2 0x29>;
|
||||
clock-names = "uart_clk", "pclk";
|
||||
reg = <0xe0001000 0x1000>;
|
||||
interrupts = <0x0 0x32 0x4>;
|
||||
};
|
||||
|
||||
spi@e0006000 {
|
||||
compatible = "xlnx,zynq-spi-r1p6";
|
||||
reg = <0xe0006000 0x1000>;
|
||||
status = "okay";
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x1a 0x4>;
|
||||
clocks = <0x2 0x19 0x2 0x22>;
|
||||
clock-names = "ref_clk", "pclk";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
|
||||
ad9361-phy@0 {
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
#clock-cells = <0x1>;
|
||||
compatible = "adi,ad9361";
|
||||
reg = <0x0>;
|
||||
spi-cpha;
|
||||
spi-max-frequency = <0x989680>;
|
||||
clocks = <0x5 0x0>;
|
||||
clock-names = "ad9364_ext_refclk";
|
||||
clock-output-names = "rx_sampl_clk", "tx_sampl_clk";
|
||||
adi,digital-interface-tune-skip-mode = <0x0>;
|
||||
adi,pp-tx-swap-enable;
|
||||
adi,pp-rx-swap-enable;
|
||||
adi,rx-frame-pulse-mode-enable;
|
||||
adi,lvds-mode-enable;
|
||||
adi,lvds-bias-mV = <0x96>;
|
||||
adi,lvds-rx-onchip-termination-enable;
|
||||
adi,rx-data-delay = <0x4>;
|
||||
adi,tx-fb-clock-delay = <0x7>;
|
||||
adi,xo-disable-use-ext-refclk-enable;
|
||||
adi,2rx-2tx-mode-enable;
|
||||
adi,frequency-division-duplex-mode-enable;
|
||||
adi,rx-rf-port-input-select = <0x0>;
|
||||
adi,tx-rf-port-input-select = <0x0>;
|
||||
adi,tx-attenuation-mdB = <0x2710>;
|
||||
adi,rf-rx-bandwidth-hz = <0x112a880>;
|
||||
adi,rf-tx-bandwidth-hz = <0x112a880>;
|
||||
adi,rx-synthesizer-frequency-hz = <0x0 0x8f0d1800>;
|
||||
adi,tx-synthesizer-frequency-hz = <0x0 0x92080880>;
|
||||
adi,rx-path-clock-frequencies = <0x3a980000 0xea60000 0x7530000 0x3a98000 0x1d4c000 0x1d4c000>;
|
||||
adi,tx-path-clock-frequencies = <0x3a980000 0x7530000 0x7530000 0x3a98000 0x1d4c000 0x1d4c000>;
|
||||
adi,gc-rx1-mode = <0x2>;
|
||||
adi,gc-rx2-mode = <0x2>;
|
||||
adi,gc-adc-ovr-sample-size = <0x4>;
|
||||
adi,gc-adc-small-overload-thresh = <0x2f>;
|
||||
adi,gc-adc-large-overload-thresh = <0x3a>;
|
||||
adi,gc-lmt-overload-high-thresh = <0x320>;
|
||||
adi,gc-lmt-overload-low-thresh = <0x2c0>;
|
||||
adi,gc-dec-pow-measurement-duration = <0x2000>;
|
||||
adi,gc-low-power-thresh = <0x18>;
|
||||
adi,mgc-inc-gain-step = <0x2>;
|
||||
adi,mgc-dec-gain-step = <0x2>;
|
||||
adi,mgc-split-table-ctrl-inp-gain-mode = <0x0>;
|
||||
adi,agc-attack-delay-extra-margin-us = <0x1>;
|
||||
adi,agc-outer-thresh-high = <0x5>;
|
||||
adi,agc-outer-thresh-high-dec-steps = <0x2>;
|
||||
adi,agc-inner-thresh-high = <0xa>;
|
||||
adi,agc-inner-thresh-high-dec-steps = <0x1>;
|
||||
adi,agc-inner-thresh-low = <0xc>;
|
||||
adi,agc-inner-thresh-low-inc-steps = <0x1>;
|
||||
adi,agc-outer-thresh-low = <0x12>;
|
||||
adi,agc-outer-thresh-low-inc-steps = <0x2>;
|
||||
adi,agc-adc-small-overload-exceed-counter = <0xa>;
|
||||
adi,agc-adc-large-overload-exceed-counter = <0xa>;
|
||||
adi,agc-adc-large-overload-inc-steps = <0x2>;
|
||||
adi,agc-lmt-overload-large-exceed-counter = <0xa>;
|
||||
adi,agc-lmt-overload-small-exceed-counter = <0xa>;
|
||||
adi,agc-lmt-overload-large-inc-steps = <0x2>;
|
||||
adi,agc-gain-update-interval-us = <0x3e8>;
|
||||
adi,fagc-dec-pow-measurement-duration = <0x40>;
|
||||
adi,fagc-lp-thresh-increment-steps = <0x1>;
|
||||
adi,fagc-lp-thresh-increment-time = <0x5>;
|
||||
adi,fagc-energy-lost-stronger-sig-gain-lock-exit-cnt = <0x8>;
|
||||
adi,fagc-final-overrange-count = <0x3>;
|
||||
adi,fagc-gain-index-type-after-exit-rx-mode = <0x0>;
|
||||
adi,fagc-lmt-final-settling-steps = <0x1>;
|
||||
adi,fagc-lock-level = <0xa>;
|
||||
adi,fagc-lock-level-gain-increase-upper-limit = <0x5>;
|
||||
adi,fagc-lock-level-lmt-gain-increase-enable;
|
||||
adi,fagc-lpf-final-settling-steps = <0x1>;
|
||||
adi,fagc-optimized-gain-offset = <0x5>;
|
||||
adi,fagc-power-measurement-duration-in-state5 = <0x40>;
|
||||
adi,fagc-rst-gla-engergy-lost-goto-optim-gain-enable;
|
||||
adi,fagc-rst-gla-engergy-lost-sig-thresh-below-ll = <0xa>;
|
||||
adi,fagc-rst-gla-engergy-lost-sig-thresh-exceeded-enable;
|
||||
adi,fagc-rst-gla-if-en-agc-pulled-high-mode = <0x0>;
|
||||
adi,fagc-rst-gla-large-adc-overload-enable;
|
||||
adi,fagc-rst-gla-large-lmt-overload-enable;
|
||||
adi,fagc-rst-gla-stronger-sig-thresh-above-ll = <0xa>;
|
||||
adi,fagc-rst-gla-stronger-sig-thresh-exceeded-enable;
|
||||
adi,fagc-state-wait-time-ns = <0x104>;
|
||||
adi,fagc-use-last-lock-level-for-set-gain-enable;
|
||||
adi,rssi-restart-mode = <0x3>;
|
||||
adi,rssi-delay = <0x1>;
|
||||
adi,rssi-wait = <0x1>;
|
||||
adi,rssi-duration = <0x3e8>;
|
||||
adi,ctrl-outs-index = <0x0>;
|
||||
adi,ctrl-outs-enable-mask = <0xff>;
|
||||
adi,temp-sense-measurement-interval-ms = <0x3e8>;
|
||||
adi,temp-sense-offset-signed = <0xce>;
|
||||
adi,temp-sense-periodic-measurement-enable;
|
||||
adi,aux-dac-manual-mode-enable;
|
||||
adi,aux-dac1-default-value-mV = <0x0>;
|
||||
adi,aux-dac1-rx-delay-us = <0x0>;
|
||||
adi,aux-dac1-tx-delay-us = <0x0>;
|
||||
adi,aux-dac2-default-value-mV = <0x0>;
|
||||
adi,aux-dac2-rx-delay-us = <0x0>;
|
||||
adi,aux-dac2-tx-delay-us = <0x0>;
|
||||
en_agc-gpios = <0x6 0x62 0x0>;
|
||||
sync-gpios = <0x6 0x63 0x0>;
|
||||
reset-gpios = <0x6 0x64 0x0>;
|
||||
enable-gpios = <0x6 0x65 0x0>;
|
||||
txnrx-gpios = <0x6 0x66 0x0>;
|
||||
linux,phandle = <0xb>;
|
||||
phandle = <0xb>;
|
||||
};
|
||||
};
|
||||
|
||||
spi@e0007000 {
|
||||
compatible = "xlnx,zynq-spi-r1p6";
|
||||
reg = <0xe0007000 0x1000>;
|
||||
status = "disabled";
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x31 0x4>;
|
||||
clocks = <0x2 0x1a 0x2 0x23>;
|
||||
clock-names = "ref_clk", "pclk";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
};
|
||||
|
||||
spi@e000d000 {
|
||||
clock-names = "ref_clk", "pclk";
|
||||
clocks = <0x2 0xa 0x2 0x2b>;
|
||||
compatible = "xlnx,zynq-qspi-1.0";
|
||||
status = "okay";
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x13 0x4>;
|
||||
reg = <0xe000d000 0x1000>;
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
is-dual = <0x0>;
|
||||
num-cs = <0x1>;
|
||||
|
||||
ps7-qspi@0 {
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
spi-tx-bus-width = <0x1>;
|
||||
spi-rx-bus-width = <0x4>;
|
||||
compatible = "n25q256a", "jedec,spi-nor";
|
||||
reg = <0x0>;
|
||||
spi-max-frequency = <0x2faf080>;
|
||||
|
||||
partition@qspi-fsbl-uboot {
|
||||
label = "qspi-fsbl-uboot";
|
||||
reg = <0x0 0xe0000>;
|
||||
};
|
||||
|
||||
partition@qspi-uboot-env {
|
||||
label = "qspi-uboot-env";
|
||||
reg = <0xe0000 0x20000>;
|
||||
};
|
||||
|
||||
partition@qspi-linux {
|
||||
label = "qspi-linux";
|
||||
reg = <0x100000 0x500000>;
|
||||
};
|
||||
|
||||
partition@qspi-device-tree {
|
||||
label = "qspi-device-tree";
|
||||
reg = <0x600000 0x20000>;
|
||||
};
|
||||
|
||||
partition@qspi-rootfs {
|
||||
label = "qspi-rootfs";
|
||||
reg = <0x620000 0xce0000>;
|
||||
};
|
||||
|
||||
partition@qspi-bitstream {
|
||||
label = "qspi-bitstream";
|
||||
reg = <0x1300000 0xd00000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
memory-controller@e000e000 {
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
status = "disabled";
|
||||
clock-names = "memclk", "aclk";
|
||||
clocks = <0x2 0xb 0x2 0x2c>;
|
||||
compatible = "arm,pl353-smc-r2p1";
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x12 0x4>;
|
||||
ranges;
|
||||
reg = <0xe000e000 0x1000>;
|
||||
|
||||
flash@e1000000 {
|
||||
status = "disabled";
|
||||
compatible = "arm,pl353-nand-r2p1";
|
||||
reg = <0xe1000000 0x1000000>;
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
};
|
||||
|
||||
flash@e2000000 {
|
||||
status = "disabled";
|
||||
compatible = "cfi-flash";
|
||||
reg = <0xe2000000 0x2000000>;
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
ethernet@e000b000 {
|
||||
compatible = "cdns,zynq-gem", "cdns,gem";
|
||||
reg = <0xe000b000 0x1000>;
|
||||
status = "okay";
|
||||
interrupts = <0x0 0x16 0x4>;
|
||||
clocks = <0x2 0x1e 0x2 0x1e 0x2 0xd>;
|
||||
clock-names = "pclk", "hclk", "tx_clk";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
phy-handle = <0x7>;
|
||||
phy-mode = "rgmii-id";
|
||||
|
||||
phy@0 {
|
||||
device_type = "ethernet-phy";
|
||||
reg = <0x0>;
|
||||
marvell,reg-init = <0x3 0x10 0xff00 0x1e 0x3 0x11 0xfff0 0x0>;
|
||||
linux,phandle = <0x7>;
|
||||
phandle = <0x7>;
|
||||
};
|
||||
};
|
||||
|
||||
ethernet@e000c000 {
|
||||
compatible = "cdns,zynq-gem", "cdns,gem";
|
||||
reg = <0xe000c000 0x1000>;
|
||||
status = "disabled";
|
||||
interrupts = <0x0 0x2d 0x4>;
|
||||
clocks = <0x2 0x1f 0x2 0x1f 0x2 0xe>;
|
||||
clock-names = "pclk", "hclk", "tx_clk";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
};
|
||||
|
||||
sdhci@e0100000 {
|
||||
compatible = "arasan,sdhci-8.9a";
|
||||
status = "okay";
|
||||
clock-names = "clk_xin", "clk_ahb";
|
||||
clocks = <0x2 0x15 0x2 0x20>;
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x18 0x4>;
|
||||
reg = <0xe0100000 0x1000>;
|
||||
broken-adma2;
|
||||
disable-wp;
|
||||
};
|
||||
|
||||
sdhci@e0101000 {
|
||||
compatible = "arasan,sdhci-8.9a";
|
||||
status = "disabled";
|
||||
clock-names = "clk_xin", "clk_ahb";
|
||||
clocks = <0x2 0x16 0x2 0x21>;
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x2f 0x4>;
|
||||
reg = <0xe0101000 0x1000>;
|
||||
broken-adma2;
|
||||
};
|
||||
|
||||
slcr@f8000000 {
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
compatible = "xlnx,zynq-slcr", "syscon", "simple-mfd";
|
||||
reg = <0xf8000000 0x1000>;
|
||||
ranges;
|
||||
linux,phandle = <0x8>;
|
||||
phandle = <0x8>;
|
||||
|
||||
clkc@100 {
|
||||
#clock-cells = <0x1>;
|
||||
compatible = "xlnx,ps7-clkc";
|
||||
fclk-enable = <0xf>;
|
||||
clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x", "dci", "lqspi", "smc", "pcap", "gem0", "gem1", "fclk0", "fclk1", "fclk2", "fclk3", "can0", "can1", "sdio0", "sdio1", "uart0", "uart1", "spi0", "spi1", "dma", "usb0_aper", "usb1_aper", "gem0_aper", "gem1_aper", "sdio0_aper", "sdio1_aper", "spi0_aper", "spi1_aper", "can0_aper", "can1_aper", "i2c0_aper", "i2c1_aper", "uart0_aper", "uart1_aper", "gpio_aper", "lqspi_aper", "smc_aper", "swdt", "dbg_trc", "dbg_apb";
|
||||
reg = <0x100 0x100>;
|
||||
ps-clk-frequency = <0x1fca055>;
|
||||
linux,phandle = <0x2>;
|
||||
phandle = <0x2>;
|
||||
};
|
||||
|
||||
rstc@200 {
|
||||
compatible = "xlnx,zynq-reset";
|
||||
reg = <0x200 0x48>;
|
||||
#reset-cells = <0x1>;
|
||||
syscon = <0x8>;
|
||||
};
|
||||
|
||||
pinctrl@700 {
|
||||
compatible = "xlnx,pinctrl-zynq";
|
||||
reg = <0x700 0x200>;
|
||||
syscon = <0x8>;
|
||||
};
|
||||
};
|
||||
|
||||
dmac@f8003000 {
|
||||
compatible = "arm,pl330", "arm,primecell";
|
||||
reg = <0xf8003000 0x1000>;
|
||||
interrupt-parent = <0x1>;
|
||||
interrupt-names = "abort", "dma0", "dma1", "dma2", "dma3", "dma4", "dma5", "dma6", "dma7";
|
||||
interrupts = <0x0 0xd 0x4 0x0 0xe 0x4 0x0 0xf 0x4 0x0 0x10 0x4 0x0 0x11 0x4 0x0 0x28 0x4 0x0 0x29 0x4 0x0 0x2a 0x4 0x0 0x2b 0x4>;
|
||||
#dma-cells = <0x1>;
|
||||
#dma-channels = <0x8>;
|
||||
#dma-requests = <0x4>;
|
||||
clocks = <0x2 0x1b>;
|
||||
clock-names = "apb_pclk";
|
||||
};
|
||||
|
||||
devcfg@f8007000 {
|
||||
compatible = "xlnx,zynq-devcfg-1.0";
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x8 0x4>;
|
||||
reg = <0xf8007000 0x100>;
|
||||
clocks = <0x2 0xc 0x2 0xf 0x2 0x10 0x2 0x11 0x2 0x12>;
|
||||
clock-names = "ref_clk", "fclk0", "fclk1", "fclk2", "fclk3";
|
||||
syscon = <0x8>;
|
||||
linux,phandle = <0x4>;
|
||||
phandle = <0x4>;
|
||||
};
|
||||
|
||||
efuse@f800d000 {
|
||||
compatible = "xlnx,zynq-efuse";
|
||||
reg = <0xf800d000 0x20>;
|
||||
};
|
||||
|
||||
timer@f8f00200 {
|
||||
compatible = "arm,cortex-a9-global-timer";
|
||||
reg = <0xf8f00200 0x20>;
|
||||
interrupts = <0x1 0xb 0x301>;
|
||||
interrupt-parent = <0x1>;
|
||||
clocks = <0x2 0x4>;
|
||||
};
|
||||
|
||||
timer@f8001000 {
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0xa 0x4 0x0 0xb 0x4 0x0 0xc 0x4>;
|
||||
compatible = "cdns,ttc";
|
||||
clocks = <0x2 0x6>;
|
||||
reg = <0xf8001000 0x1000>;
|
||||
};
|
||||
|
||||
timer@f8002000 {
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x25 0x4 0x0 0x26 0x4 0x0 0x27 0x4>;
|
||||
compatible = "cdns,ttc";
|
||||
clocks = <0x2 0x6>;
|
||||
reg = <0xf8002000 0x1000>;
|
||||
};
|
||||
|
||||
timer@f8f00600 {
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x1 0xd 0x301>;
|
||||
compatible = "arm,cortex-a9-twd-timer";
|
||||
reg = <0xf8f00600 0x20>;
|
||||
clocks = <0x2 0x4>;
|
||||
};
|
||||
|
||||
usb@e0002000 {
|
||||
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
|
||||
status = "okay";
|
||||
clocks = <0x2 0x1c>;
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x15 0x4>;
|
||||
reg = <0xe0002000 0x1000>;
|
||||
phy_type = "ulpi";
|
||||
dr_mode = "host";
|
||||
xlnx,phy-reset-gpio = <0x6 0x7 0x0>;
|
||||
};
|
||||
|
||||
usb@e0003000 {
|
||||
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
|
||||
status = "disabled";
|
||||
clocks = <0x2 0x1d>;
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x2c 0x4>;
|
||||
reg = <0xe0003000 0x1000>;
|
||||
phy_type = "ulpi";
|
||||
};
|
||||
|
||||
watchdog@f8005000 {
|
||||
clocks = <0x2 0x2d>;
|
||||
compatible = "cdns,wdt-r1p2";
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x9 0x1>;
|
||||
reg = <0xf8005000 0x1000>;
|
||||
timeout-sec = <0xa>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
ethernet0 = "/amba/ethernet@e000b000";
|
||||
serial0 = "/amba/serial@e0001000";
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x40000000>;
|
||||
};
|
||||
|
||||
chosen {
|
||||
linux,stdout-path = "/amba@0/uart@E0001000";
|
||||
};
|
||||
|
||||
clocks {
|
||||
|
||||
clock@0 {
|
||||
#clock-cells = <0x0>;
|
||||
compatible = "adjustable-clock";
|
||||
clock-frequency = <0x2625a00>;
|
||||
clock-accuracy = <0x30d40>;
|
||||
clock-output-names = "ad9364_ext_refclk";
|
||||
linux,phandle = <0x5>;
|
||||
phandle = <0x5>;
|
||||
};
|
||||
|
||||
clock@1 {
|
||||
#clock-cells = <0x0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <0x16e3600>;
|
||||
clock-output-names = "24MHz";
|
||||
linux,phandle = <0x9>;
|
||||
phandle = <0x9>;
|
||||
};
|
||||
};
|
||||
|
||||
usb-ulpi-gpio-gate@0 {
|
||||
compatible = "gpio-gate-clock";
|
||||
clocks = <0x9>;
|
||||
#clock-cells = <0x0>;
|
||||
enable-gpios = <0x6 0x9 0x1>;
|
||||
};
|
||||
|
||||
fpga-axi@0 {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
ranges;
|
||||
|
||||
i2c@41600000 {
|
||||
compatible = "xlnx,axi-iic-1.02.a", "xlnx,xps-iic-2.00.a";
|
||||
reg = <0x41600000 0x10000>;
|
||||
interrupt-parent = <0x1>;
|
||||
interrupts = <0x0 0x3a 0x4>;
|
||||
clocks = <0x2 0xf>;
|
||||
clock-names = "pclk";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
|
||||
ad7291@20 {
|
||||
compatible = "adi,ad7291";
|
||||
reg = <0x20>;
|
||||
};
|
||||
|
||||
ad7291-bob@2C {
|
||||
compatible = "adi,ad7291";
|
||||
reg = <0x2c>;
|
||||
};
|
||||
|
||||
eeprom@50 {
|
||||
compatible = "at24,24c32";
|
||||
reg = <0x50>;
|
||||
};
|
||||
};
|
||||
|
||||
dma@7c400000 {
|
||||
compatible = "adi,axi-dmac-1.00.a";
|
||||
reg = <0x7c400000 0x10000>;
|
||||
#dma-cells = <0x1>;
|
||||
interrupts = <0x0 0x39 0x0>;
|
||||
clocks = <0x2 0x10>;
|
||||
linux,phandle = <0xa>;
|
||||
phandle = <0xa>;
|
||||
|
||||
adi,channels {
|
||||
#size-cells = <0x0>;
|
||||
#address-cells = <0x1>;
|
||||
|
||||
dma-channel@0 {
|
||||
reg = <0x0>;
|
||||
adi,source-bus-width = <0x40>;
|
||||
adi,source-bus-type = <0x2>;
|
||||
adi,destination-bus-width = <0x40>;
|
||||
adi,destination-bus-type = <0x0>;
|
||||
adi,length-width = <0x18>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dma@7c420000 {
|
||||
compatible = "adi,axi-dmac-1.00.a";
|
||||
reg = <0x7c420000 0x10000>;
|
||||
#dma-cells = <0x1>;
|
||||
interrupts = <0x0 0x38 0x0>;
|
||||
clocks = <0x2 0x10>;
|
||||
linux,phandle = <0xc>;
|
||||
phandle = <0xc>;
|
||||
|
||||
adi,channels {
|
||||
#size-cells = <0x0>;
|
||||
#address-cells = <0x1>;
|
||||
|
||||
dma-channel@0 {
|
||||
reg = <0x0>;
|
||||
adi,source-bus-width = <0x40>;
|
||||
adi,source-bus-type = <0x0>;
|
||||
adi,destination-bus-width = <0x40>;
|
||||
adi,destination-bus-type = <0x2>;
|
||||
adi,length-width = <0x18>;
|
||||
adi,cyclic;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sdr: sdr {
|
||||
compatible ="sdr,sdr";
|
||||
dmas = <&rx_dma 0
|
||||
&rx_dma 1
|
||||
&tx_dma 0
|
||||
&tx_dma 1>;
|
||||
dma-names = "rx_dma_mm2s", "rx_dma_s2mm", "tx_dma_mm2s", "tx_dma_s2mm";
|
||||
interrupt-names = "not_valid_anymore", "rx_pkt_intr", "tx_itrpt0", "tx_itrpt1";
|
||||
interrupt-parent = <1>;
|
||||
interrupts = <0 29 1 0 30 1 0 33 1 0 34 1>;
|
||||
} ;
|
||||
|
||||
axidmatest_1: axidmatest@1 {
|
||||
compatible ="xlnx,axi-dma-test-1.00.a";
|
||||
dmas = <&rx_dma 0
|
||||
&rx_dma 1>;
|
||||
dma-names = "axidma0", "axidma1";
|
||||
} ;
|
||||
|
||||
tx_dma: dma@80400000 {
|
||||
#dma-cells = <1>;
|
||||
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "xlnx,axi-dma-1.00.a";
|
||||
interrupt-names = "mm2s_introut", "s2mm_introut";
|
||||
interrupt-parent = <1>;
|
||||
interrupts = <0 35 4 0 36 4>;
|
||||
reg = <0x80400000 0x10000>;
|
||||
xlnx,addrwidth = <0x20>;
|
||||
xlnx,include-sg ;
|
||||
xlnx,sg-length-width = <0xe>;
|
||||
dma-channel@80400000 {
|
||||
compatible = "xlnx,axi-dma-mm2s-channel";
|
||||
dma-channels = <0x1>;
|
||||
interrupts = <0 35 4>;
|
||||
xlnx,datawidth = <0x40>;
|
||||
xlnx,device-id = <0x0>;
|
||||
};
|
||||
dma-channel@80400030 {
|
||||
compatible = "xlnx,axi-dma-s2mm-channel";
|
||||
dma-channels = <0x1>;
|
||||
interrupts = <0 36 4>;
|
||||
xlnx,datawidth = <0x40>;
|
||||
xlnx,device-id = <0x0>;
|
||||
};
|
||||
};
|
||||
|
||||
rx_dma: dma@80410000 {
|
||||
#dma-cells = <1>;
|
||||
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "xlnx,axi-dma-1.00.a";
|
||||
//dma-coherent ;
|
||||
interrupt-names = "mm2s_introut", "s2mm_introut";
|
||||
interrupt-parent = <1>;
|
||||
interrupts = <0 31 4 0 32 4>;
|
||||
reg = <0x80410000 0x10000>;
|
||||
xlnx,addrwidth = <0x20>;
|
||||
xlnx,include-sg ;
|
||||
xlnx,sg-length-width = <0xe>;
|
||||
dma-channel@80410000 {
|
||||
compatible = "xlnx,axi-dma-mm2s-channel";
|
||||
dma-channels = <0x1>;
|
||||
interrupts = <0 31 4>;
|
||||
xlnx,datawidth = <0x40>;
|
||||
xlnx,device-id = <0x1>;
|
||||
};
|
||||
dma-channel@80410030 {
|
||||
compatible = "xlnx,axi-dma-s2mm-channel";
|
||||
dma-channels = <0x1>;
|
||||
interrupts = <0 32 4>;
|
||||
xlnx,datawidth = <0x40>;
|
||||
xlnx,device-id = <0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
tx_intf_0: tx_intf@83c00000 {
|
||||
clock-names = "s00_axi_aclk", "s00_axis_aclk", "s01_axis_aclk", "m00_axis_aclk";
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "sdr,tx_intf";
|
||||
interrupt-names = "tx_itrpt0", "tx_itrpt1";
|
||||
interrupt-parent = <1>;
|
||||
interrupts = <0 33 1 0 34 1>;
|
||||
reg = <0x83c00000 0x10000>;
|
||||
xlnx,s00-axi-addr-width = <0x7>;
|
||||
xlnx,s00-axi-data-width = <0x20>;
|
||||
};
|
||||
|
||||
rx_intf_0: rx_intf@83c20000 {
|
||||
clock-names = "s00_axi_aclk", "s00_axis_aclk", "m00_axis_aclk";
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "sdr,rx_intf";
|
||||
interrupt-names = "not_valid_anymore", "rx_pkt_intr";
|
||||
interrupt-parent = <1>;
|
||||
interrupts = <0 29 1 0 30 1>;
|
||||
reg = <0x83c20000 0x10000>;
|
||||
xlnx,s00-axi-addr-width = <0x7>;
|
||||
xlnx,s00-axi-data-width = <0x20>;
|
||||
};
|
||||
|
||||
openofdm_tx_0: openofdm_tx@83c10000 {
|
||||
clock-names = "clk";
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,openofdm_tx";
|
||||
reg = <0x83c10000 0x10000>;
|
||||
};
|
||||
|
||||
openofdm_rx_0: openofdm_rx@83c30000 {
|
||||
clock-names = "clk";
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,openofdm_rx";
|
||||
reg = <0x83c30000 0x10000>;
|
||||
};
|
||||
|
||||
xpu_0: xpu@83c40000 {
|
||||
clock-names = "s00_axi_aclk";
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,xpu";
|
||||
reg = <0x83c40000 0x10000>;
|
||||
};
|
||||
|
||||
cf-ad9361-lpc@79020000 {
|
||||
compatible = "adi,axi-ad9361-6.00.a";
|
||||
reg = <0x79020000 0x6000>;
|
||||
dmas = <0xa 0x0>;
|
||||
dma-names = "rx";
|
||||
spibus-connected = <0xb>;
|
||||
};
|
||||
|
||||
cf-ad9361-dds-core-lpc@79024000 {
|
||||
compatible = "adi,axi-ad9361-dds-6.00.a";
|
||||
reg = <0x79024000 0x1000>;
|
||||
clocks = <0xb 0xd>;
|
||||
clock-names = "sampl_clk";
|
||||
dmas = <0xc 0x0>;
|
||||
dma-names = "tx";
|
||||
};
|
||||
|
||||
mwipcore@43c00000 {
|
||||
compatible = "mathworks,mwipcore-axi4lite-v1.00";
|
||||
reg = <0x43c00000 0xffff>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led0 {
|
||||
label = "led0:green";
|
||||
gpios = <0x6 0x3a 0x0>;
|
||||
};
|
||||
|
||||
led1 {
|
||||
label = "led1:green";
|
||||
gpios = <0x6 0x3b 0x0>;
|
||||
};
|
||||
|
||||
led2 {
|
||||
label = "led2:green";
|
||||
gpios = <0x6 0x3c 0x0>;
|
||||
};
|
||||
|
||||
led3 {
|
||||
label = "led3:green";
|
||||
gpios = <0x6 0x3d 0x0>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
autorepeat;
|
||||
|
||||
pb0 {
|
||||
label = "Left";
|
||||
linux,code = <0x69>;
|
||||
gpios = <0x6 0x36 0x0>;
|
||||
};
|
||||
|
||||
pb1 {
|
||||
label = "Right";
|
||||
linux,code = <0x6a>;
|
||||
gpios = <0x6 0x37 0x0>;
|
||||
};
|
||||
|
||||
pb2 {
|
||||
label = "Up";
|
||||
linux,code = <0x67>;
|
||||
gpios = <0x6 0x38 0x0>;
|
||||
};
|
||||
|
||||
pb3 {
|
||||
label = "Down";
|
||||
linux,code = <0x6c>;
|
||||
gpios = <0x6 0x39 0x0>;
|
||||
};
|
||||
|
||||
sw0 {
|
||||
label = "SW0";
|
||||
linux,input-type = <0x5>;
|
||||
linux,code = <0x0>;
|
||||
gpios = <0x6 0x3e 0x0>;
|
||||
};
|
||||
|
||||
sw1 {
|
||||
label = "SW1";
|
||||
linux,input-type = <0x5>;
|
||||
linux,code = <0x1>;
|
||||
gpios = <0x6 0x3f 0x0>;
|
||||
};
|
||||
|
||||
sw2 {
|
||||
label = "SW2";
|
||||
linux,input-type = <0x5>;
|
||||
linux,code = <0x2>;
|
||||
gpios = <0x6 0x40 0x0>;
|
||||
};
|
||||
|
||||
sw3 {
|
||||
label = "SW3";
|
||||
linux,input-type = <0x5>;
|
||||
linux,code = <0x3>;
|
||||
gpios = <0x6 0x41 0x0>;
|
||||
};
|
||||
};
|
||||
};
|
BIN
kernel_boot/boards/adrv9364z7020/u-boot.elf
Normal file
BIN
kernel_boot/boards/adrv9364z7020/u-boot.elf
Normal file
Binary file not shown.
1110
kernel_boot/boards/zc702_fmcs2/devicetree.dts
Normal file
1110
kernel_boot/boards/zc702_fmcs2/devicetree.dts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
kernel_boot/boards/zc702_fmcs2/u-boot.elf
Normal file
BIN
kernel_boot/boards/zc702_fmcs2/u-boot.elf
Normal file
Binary file not shown.
@ -945,7 +945,7 @@
|
||||
tx_dma: dma@80400000 {
|
||||
#dma-cells = <1>;
|
||||
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "xlnx,axi-dma-1.00.a";
|
||||
interrupt-names = "mm2s_introut", "s2mm_introut";
|
||||
interrupt-parent = <1>;
|
||||
@ -973,7 +973,7 @@
|
||||
rx_dma: dma@80410000 {
|
||||
#dma-cells = <1>;
|
||||
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "xlnx,axi-dma-1.00.a";
|
||||
//dma-coherent ;
|
||||
interrupt-names = "mm2s_introut", "s2mm_introut";
|
||||
@ -1001,7 +1001,7 @@
|
||||
|
||||
tx_intf_0: tx_intf@83c00000 {
|
||||
clock-names = "s00_axi_aclk", "s00_axis_aclk", "s01_axis_aclk", "m00_axis_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "sdr,tx_intf";
|
||||
interrupt-names = "tx_itrpt0", "tx_itrpt1";
|
||||
interrupt-parent = <1>;
|
||||
@ -1013,7 +1013,7 @@
|
||||
|
||||
rx_intf_0: rx_intf@83c20000 {
|
||||
clock-names = "s00_axi_aclk", "s00_axis_aclk", "m00_axis_aclk";
|
||||
clocks = <0x2 0x10>, <0x2 0x10>, <0x2 0x10>;
|
||||
clocks = <0x2 0x11>, <0x2 0x11>, <0x2 0x11>;
|
||||
compatible = "sdr,rx_intf";
|
||||
interrupt-names = "not_valid_anymore", "rx_pkt_intr";
|
||||
interrupt-parent = <1>;
|
||||
@ -1025,21 +1025,21 @@
|
||||
|
||||
openofdm_tx_0: openofdm_tx@83c10000 {
|
||||
clock-names = "clk";
|
||||
clocks = <0x2 0x10>;
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,openofdm_tx";
|
||||
reg = <0x83c10000 0x10000>;
|
||||
};
|
||||
|
||||
openofdm_rx_0: openofdm_rx@83c30000 {
|
||||
clock-names = "clk";
|
||||
clocks = <0x2 0x10>;
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,openofdm_rx";
|
||||
reg = <0x83c30000 0x10000>;
|
||||
};
|
||||
|
||||
xpu_0: xpu@83c40000 {
|
||||
clock-names = "s00_axi_aclk";
|
||||
clocks = <0x2 0x10>;
|
||||
clocks = <0x2 0x11>;
|
||||
compatible = "sdr,xpu";
|
||||
reg = <0x83c40000 0x10000>;
|
||||
};
|
||||
|
1084
kernel_boot/boards/zed_fmcs2/devicetree.dts
Normal file
1084
kernel_boot/boards/zed_fmcs2/devicetree.dts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
kernel_boot/boards/zed_fmcs2/u-boot.elf
Normal file
BIN
kernel_boot/boards/zed_fmcs2/u-boot.elf
Normal file
Binary file not shown.
@ -1,21 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "You must enter the \$BOARD_NAME as argument"
|
||||
echo "Like: adrv9364z7020 adrv9361z7035 adrv9361z7035_fmc zc706_fmcs2 zed_fmcs2 zc702_fmcs2"
|
||||
exit 1
|
||||
fi
|
||||
BOARD_NAME=$1
|
||||
|
||||
if [ "$BOARD_NAME" != "zc706_fmcs2" ] && [ "$BOARD_NAME" != "zc702_fmcs2" ] && [ "$BOARD_NAME" != "zed_fmcs2" ] && [ "$BOARD_NAME" != "adrv9361z7035" ] && [ "$BOARD_NAME" != "adrv9361z7035_fmc" ] && [ "$BOARD_NAME" != "adrv9364z7020" ]; then
|
||||
echo "\$BOARD_NAME is not correct. Please check!"
|
||||
exit 1
|
||||
else
|
||||
echo "\$BOARD_NAME is found!"
|
||||
fi
|
||||
|
||||
|
||||
set -ex
|
||||
|
||||
HDF_FILE=$1
|
||||
UBOOT_FILE=$2
|
||||
BUILD_DIR=build_boot_bin
|
||||
OUTPUT_DIR=output_boot_bin
|
||||
HDF_FILE=../openwifi-hw/boards/$BOARD_NAME/sdk/system_top_hw_platform_0/system.hdf
|
||||
UBOOT_FILE=./boards/$BOARD_NAME/u-boot.elf
|
||||
BUILD_DIR=./boards/$BOARD_NAME/build_boot_bin
|
||||
OUTPUT_DIR=./boards/$BOARD_NAME/output_boot_bin
|
||||
|
||||
usage () {
|
||||
echo usage: $0 system_top.hdf u-boot.elf [output-archive]
|
||||
exit 1
|
||||
}
|
||||
# usage () {
|
||||
# echo usage: $0 system_top.hdf u-boot.elf [output-archive]
|
||||
# exit 1
|
||||
# }
|
||||
|
||||
depends () {
|
||||
echo Xilinx $1 must be installed and in your PATH
|
||||
echo try: source /opt/Xilinx/Vivado/201x.x/settings64.sh
|
||||
exit 1
|
||||
}
|
||||
# depends () {
|
||||
# echo Xilinx $1 must be installed and in your PATH
|
||||
# echo try: source /opt/Xilinx/Vivado/201x.x/settings64.sh
|
||||
# exit 1
|
||||
# }
|
||||
|
||||
### Check command line parameters
|
||||
echo $HDF_FILE | grep -q ".hdf" || usage
|
||||
@ -81,7 +97,7 @@ cp $BUILD_DIR/build/sdk/hw_0/system_top.bit $OUTPUT_DIR/system_top.bit
|
||||
rm $BUILD_DIR -rf
|
||||
)
|
||||
|
||||
### Optionally tar.gz the entire output folder with the name given in argument 3
|
||||
if [ ${#3} -ne 0 ]; then
|
||||
tar czvf $3.tar.gz $OUTPUT_DIR
|
||||
fi
|
||||
# ### Optionally tar.gz the entire output folder with the name given in argument 3
|
||||
# if [ ${#3} -ne 0 ]; then
|
||||
# tar czvf $3.tar.gz $OUTPUT_DIR
|
||||
# fi
|
||||
|
@ -3351,7 +3351,7 @@ CONFIG_AXI_DMAC=y
|
||||
# CONFIG_INTEL_IDMA64 is not set
|
||||
# CONFIG_NBPFAXI_DMA is not set
|
||||
CONFIG_PL330_DMA=y
|
||||
CONFIG_XILINX_DMA_ENGINES=m
|
||||
CONFIG_XILINX_DMA_ENGINES=y
|
||||
CONFIG_XILINX_DMATEST=m
|
||||
# CONFIG_XILINX_VDMATEST is not set
|
||||
# CONFIG_XILINX_CDMATEST is not set
|
||||
|
53
user_space/boot_bin_gen.sh
Executable file
53
user_space/boot_bin_gen.sh
Executable file
@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "You must enter exactly 3 arguments: \$OPENWIFI_DIR \$XILINX_DIR \$BOARD_NAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OPENWIFI_DIR=$1
|
||||
XILINX_DIR=$2
|
||||
BOARD_NAME=$3
|
||||
|
||||
if [ -f "$OPENWIFI_DIR/LICENSE" ]; then
|
||||
echo "\$OPENWIFI_DIR is found!"
|
||||
else
|
||||
echo "\$OPENWIFI_DIR is not correct. Please check!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$XILINX_DIR/SDK" ]; then
|
||||
echo "\$XILINX_DIR is found!"
|
||||
else
|
||||
echo "\$XILINX_DIR is not correct. Please check!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$BOARD_NAME" != "zc706_fmcs2" ] && [ "$BOARD_NAME" != "zc702_fmcs2" ] && [ "$BOARD_NAME" != "zed_fmcs2" ] && [ "$BOARD_NAME" != "adrv9361z7035" ] && [ "$BOARD_NAME" != "adrv9361z7035_fmc" ] && [ "$BOARD_NAME" != "adrv9364z7020" ]; then
|
||||
echo "\$BOARD_NAME is not correct. Please check!"
|
||||
exit 1
|
||||
else
|
||||
echo "\$BOARD_NAME is found!"
|
||||
fi
|
||||
|
||||
home_dir=$(pwd)
|
||||
|
||||
set -ex
|
||||
|
||||
# check if user entered the right path to SDK
|
||||
if [ -d "$XILINX_DIR" ]; then
|
||||
source $XILINX_DIR/SDK/2017.4/settings64.sh
|
||||
else
|
||||
echo "Error: XILINX_DIR: ${XILINX_DIR} not found. Can not continue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$OPENWIFI_DIR" ]; then
|
||||
cd $OPENWIFI_DIR/kernel_boot
|
||||
else
|
||||
echo "Error: OPENWIFI_DIR: ${OPENWIFI_DIR} not found. Can not continue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./build_boot_bin.sh $BOARD_NAME
|
||||
|
||||
cd $home_dir
|
21
user_space/build_wpa_supplicant_wo11b.sh
Executable file
21
user_space/build_wpa_supplicant_wo11b.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "You must enter exactly 1 arguments: \$OPENWIFI_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OPENWIFI_DIR=$1
|
||||
|
||||
set -x
|
||||
|
||||
cd $OPENWIFI_DIR/user_space
|
||||
wget http://w1.fi/releases/wpa_supplicant-2.1.tar.gz
|
||||
tar xzvf wpa_supplicant-2.1.tar.gz
|
||||
patch -d wpa_supplicant-2.1/src/drivers/ < driver_nl80211.patch
|
||||
cd wpa_supplicant-2.1/wpa_supplicant/
|
||||
cp defconfig .config
|
||||
sed -i 's/#CONFIG_LIBNL32.*/CONFIG_LIBNL32=y/g' .config
|
||||
make -j16
|
||||
# sudo make install
|
||||
cd ../../
|
||||
rm -r wpa_supplicant-2.1/ wpa_supplicant-2.1.tar.gz
|
15
user_space/fosdem.sh
Executable file
15
user_space/fosdem.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
killall hostapd
|
||||
killall webfsd
|
||||
|
||||
cd ~/openwifi
|
||||
service network-manager stop
|
||||
./wgd.sh
|
||||
ifconfig sdr0 192.168.13.1
|
||||
route add default gw 192.168.10.1
|
||||
service isc-dhcp-server restart
|
||||
hostapd hostapd-openwifi.conf &
|
||||
sleep 5
|
||||
cd webserver
|
||||
webfsd -F -p 80 -f index.html &
|
28
user_space/get_fpga.sh
Executable file
28
user_space/get_fpga.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "You must enter the \$OPENWIFI_DIR (the openwifi root directory) as argument"
|
||||
exit 1
|
||||
fi
|
||||
OPENWIFI_DIR=$1
|
||||
|
||||
|
||||
if [ -f "$OPENWIFI_DIR/LICENSE" ]; then
|
||||
echo "\$OPENWIFI_DIR is found!"
|
||||
else
|
||||
echo "\$OPENWIFI_DIR is not correct. Please check!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
home_dir=$(pwd)
|
||||
|
||||
set -ex
|
||||
|
||||
cd $OPENWIFI_DIR/
|
||||
git submodule init openwifi-hw
|
||||
git submodule update openwifi-hw
|
||||
cd openwifi-hw
|
||||
git checkout master
|
||||
git pull
|
||||
|
||||
cd $home_dir
|
39
user_space/openwifi_ad9361_fir.ftr
Normal file
39
user_space/openwifi_ad9361_fir.ftr
Normal file
@ -0,0 +1,39 @@
|
||||
# Data Sample Frequency = 40000000 Hz
|
||||
TX 3 GAIN 0 INT 1
|
||||
RX 3 GAIN -6 DEC 1
|
||||
RTX 1280000000 160000000 80000000 40000000 40000000 40000000
|
||||
RRX 1280000000 160000000 80000000 40000000 40000000 40000000
|
||||
BWTX 35301580
|
||||
BWRX 20172411
|
||||
-2628,-2628
|
||||
2130,2130
|
||||
1397,1397
|
||||
-487,-487
|
||||
-1098,-1098
|
||||
865,865
|
||||
2132,2132
|
||||
-112,-112
|
||||
-2468,-2468
|
||||
-169,-169
|
||||
3686,3686
|
||||
1455,1455
|
||||
-5304,-5304
|
||||
-4052,-4052
|
||||
11297,11297
|
||||
27949,27949
|
||||
27949,27949
|
||||
11297,11297
|
||||
-4052,-4052
|
||||
-5304,-5304
|
||||
1455,1455
|
||||
3686,3686
|
||||
-169,-169
|
||||
-2468,-2468
|
||||
-112,-112
|
||||
2132,2132
|
||||
865,865
|
||||
-1098,-1098
|
||||
-487,-487
|
||||
1397,1397
|
||||
2130,2130
|
||||
-2628,-2628
|
37
user_space/post_config.sh
Executable file
37
user_space/post_config.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# setup kernel module directory
|
||||
if [ -d "/lib/modules/$(uname -r)" ]; then
|
||||
echo "/lib/modules/$(uname -r) already exists."
|
||||
else
|
||||
ln -s /lib/modules/openwifi /lib/modules/$(uname -r)
|
||||
fi
|
||||
depmod
|
||||
modprobe mac80211
|
||||
|
||||
# add gateway (PC) for internet access
|
||||
route add default gw 192.168.10.1 || true
|
||||
|
||||
# build sdrctl
|
||||
sudo apt-get -y install libnl-3-dev
|
||||
sudo apt-get -y install libnl-genl-3-dev
|
||||
cd sdrctl_src
|
||||
make
|
||||
cp sdrctl ../
|
||||
cd ..
|
||||
|
||||
# install and setup dhcp server
|
||||
sudo apt-get -y install isc-dhcp-server
|
||||
cp dhcpd.conf /etc/dhcp/dhcpd.conf
|
||||
|
||||
# install hostapd and other useful tools
|
||||
sudo apt-get -y install hostapd
|
||||
sudo apt-get -y install nano
|
||||
sudo apt-get -y install tcpdump
|
||||
sudo apt-get -y install webfs
|
||||
sudo apt-get -y install iperf
|
||||
|
||||
# change the password to openwifi
|
||||
echo -e "openwifi\nopenwifi" | passwd
|
39
user_space/prepare_kernel_src.sh
Executable file
39
user_space/prepare_kernel_src.sh
Executable file
@ -0,0 +1,39 @@
|
||||
|
||||
#!/bin/bash
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "You must enter exactly 2 arguments: \$OPENWIFI_DIR \$XILINX_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OPENWIFI_DIR=$1
|
||||
XILINX_DIR=$2
|
||||
|
||||
|
||||
if [ -f "$OPENWIFI_DIR/LICENSE" ]; then
|
||||
echo "\$OPENWIFI_DIR is found!"
|
||||
else
|
||||
echo "\$OPENWIFI_DIR is not correct. Please check!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$XILINX_DIR/SDK" ]; then
|
||||
echo "\$XILINX_DIR is found!"
|
||||
else
|
||||
echo "\$XILINX_DIR is not correct. Please check!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
home_dir=$(pwd)
|
||||
|
||||
cd $OPENWIFI_DIR/
|
||||
git submodule init adi-linux
|
||||
git submodule update adi-linux
|
||||
cd adi-linux
|
||||
git reset --hard 4220d5d24c6c7589fc702db4f941f0632b5ad767
|
||||
cp ../kernel_boot/kernel_config ./.config
|
||||
source $XILINX_DIR/SDK/2017.4/settings64.sh
|
||||
export ARCH=arm
|
||||
export CROSS_COMPILE=arm-linux-gnueabihf-
|
||||
make oldconfig && make prepare && make modules_prepare
|
||||
|
||||
cd $home_dir
|
87
user_space/rf_init_adrv9361z7035.sh → user_space/rf_init.sh
Normal file → Executable file
87
user_space/rf_init_adrv9361z7035.sh → user_space/rf_init.sh
Normal file → Executable file
@ -2,55 +2,58 @@
|
||||
|
||||
home_dir=$(pwd)
|
||||
|
||||
cd /sys/bus/iio/devices/iio:device1
|
||||
if test -f "openwifi_ad9361_fir.ftr"; then
|
||||
echo "Found openwifi_ad9361_fir.ftr"
|
||||
else
|
||||
echo "Can not find openwifi_ad9361_fir.ftr!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -x
|
||||
if test -f "/sys/bus/iio/devices/iio:device0/in_voltage_rf_bandwidth"; then
|
||||
cd /sys/bus/iio/devices/iio:device0/
|
||||
else if test -f "/sys/bus/iio/devices/iio:device1/in_voltage_rf_bandwidth"; then
|
||||
cd /sys/bus/iio/devices/iio:device1/
|
||||
else if test -f "/sys/bus/iio/devices/iio:device2/in_voltage_rf_bandwidth"; then
|
||||
cd /sys/bus/iio/devices/iio:device2/
|
||||
else if test -f "/sys/bus/iio/devices/iio:device3/in_voltage_rf_bandwidth"; then
|
||||
cd /sys/bus/iio/devices/iio:device3/
|
||||
else if test -f "/sys/bus/iio/devices/iio:device4/in_voltage_rf_bandwidth"; then
|
||||
cd /sys/bus/iio/devices/iio:device4/
|
||||
else
|
||||
echo "Can not find in_voltage_rf_bandwidth!"
|
||||
echo "Check log to make sure ad9361 driver is loaded!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
set +x
|
||||
|
||||
echo "rx bw"
|
||||
cat in_voltage_rf_bandwidth
|
||||
#echo 37500000 > in_voltage_rf_bandwidth
|
||||
echo 17500000 > in_voltage_rf_bandwidth
|
||||
cat in_voltage_rf_bandwidth
|
||||
sync
|
||||
|
||||
echo "tx_bw"
|
||||
cat out_voltage_rf_bandwidth
|
||||
echo 37500000 > out_voltage_rf_bandwidth
|
||||
#echo 40000000 > out_voltage_rf_bandwidth
|
||||
#echo 20000000 > out_voltage_rf_bandwidth
|
||||
cat out_voltage_rf_bandwidth
|
||||
sync
|
||||
#sleep 0.5
|
||||
|
||||
echo "rx rate"
|
||||
cat in_voltage_sampling_frequency
|
||||
echo 40000000 > in_voltage_sampling_frequency
|
||||
#echo 20000000 > in_voltage_sampling_frequency
|
||||
cat in_voltage_sampling_frequency
|
||||
sync
|
||||
|
||||
echo "tx rate"
|
||||
cat out_voltage_sampling_frequency
|
||||
echo 40000000 > out_voltage_sampling_frequency
|
||||
#echo 20000000 > out_voltage_sampling_frequency
|
||||
cat out_voltage_sampling_frequency
|
||||
sync
|
||||
sleep 1
|
||||
|
||||
echo "rx lo"
|
||||
cat out_altvoltage0_RX_LO_frequency
|
||||
#echo 2427000000 > out_altvoltage0_RX_LO_frequency
|
||||
echo 5240000000 > out_altvoltage0_RX_LO_frequency
|
||||
#echo 2320000000 > out_altvoltage0_RX_LO_frequency
|
||||
cat out_altvoltage0_RX_LO_frequency
|
||||
sync
|
||||
echo 5250000000 > out_altvoltage1_TX_LO_frequency
|
||||
sync
|
||||
|
||||
echo "tx lo"
|
||||
cat out_altvoltage1_TX_LO_frequency
|
||||
#echo 2447000000 > out_altvoltage1_TX_LO_frequency
|
||||
echo 5250000000 > out_altvoltage1_TX_LO_frequency
|
||||
#echo 2320000000 > out_altvoltage1_TX_LO_frequency
|
||||
cat out_altvoltage1_TX_LO_frequency
|
||||
cat $home_dir/openwifi_ad9361_fir.ftr > filter_fir_config
|
||||
sync
|
||||
#sleep 1
|
||||
sleep 0.5
|
||||
echo 1 > in_voltage_filter_fir_en
|
||||
echo 0 > out_voltage_filter_fir_en
|
||||
cat filter_fir_config
|
||||
cat in_voltage_filter_fir_en
|
||||
cat out_voltage_filter_fir_en
|
||||
|
||||
echo "rx0 agc fast_attack"
|
||||
#echo "rx0 agc manual"
|
||||
@ -69,6 +72,16 @@ cat in_voltage1_gain_control_mode
|
||||
sync
|
||||
sleep 1
|
||||
|
||||
cat in_voltage_sampling_frequency
|
||||
cat in_voltage_rf_bandwidth
|
||||
cat out_voltage_sampling_frequency
|
||||
cat out_voltage_rf_bandwidth
|
||||
|
||||
echo "rssi"
|
||||
cat in_voltage0_rssi
|
||||
cat in_voltage1_rssi
|
||||
|
||||
# # --------not neede maybe-------- # #
|
||||
echo "rx0 gain to 70" # this set gain is gpio gain - 5dB (test with agc and read back gpio in driver)
|
||||
cat in_voltage0_hardwaregain
|
||||
echo 70 > in_voltage0_hardwaregain
|
||||
@ -92,9 +105,7 @@ cat out_voltage1_hardwaregain
|
||||
echo 0 > out_voltage1_hardwaregain
|
||||
cat out_voltage1_hardwaregain
|
||||
sync
|
||||
|
||||
echo "rssi"
|
||||
cat in_voltage0_rssi
|
||||
cat in_voltage1_rssi
|
||||
# # --------not neede maybe-------- # #
|
||||
|
||||
cd $home_dir
|
||||
|
@ -1,100 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
home_dir=$(pwd)
|
||||
|
||||
cd /sys/bus/iio/devices/iio:device3
|
||||
|
||||
echo "rx bw"
|
||||
cat in_voltage_rf_bandwidth
|
||||
#echo 37500000 > in_voltage_rf_bandwidth
|
||||
echo 17500000 > in_voltage_rf_bandwidth
|
||||
cat in_voltage_rf_bandwidth
|
||||
sync
|
||||
|
||||
echo "tx_bw"
|
||||
cat out_voltage_rf_bandwidth
|
||||
echo 37500000 > out_voltage_rf_bandwidth
|
||||
#echo 40000000 > out_voltage_rf_bandwidth
|
||||
#echo 20000000 > out_voltage_rf_bandwidth
|
||||
cat out_voltage_rf_bandwidth
|
||||
sync
|
||||
#sleep 0.5
|
||||
|
||||
echo "rx rate"
|
||||
cat in_voltage_sampling_frequency
|
||||
echo 40000000 > in_voltage_sampling_frequency
|
||||
#echo 20000000 > in_voltage_sampling_frequency
|
||||
cat in_voltage_sampling_frequency
|
||||
sync
|
||||
|
||||
echo "tx rate"
|
||||
cat out_voltage_sampling_frequency
|
||||
echo 40000000 > out_voltage_sampling_frequency
|
||||
#echo 20000000 > out_voltage_sampling_frequency
|
||||
cat out_voltage_sampling_frequency
|
||||
sync
|
||||
sleep 1
|
||||
|
||||
echo "rx lo"
|
||||
cat out_altvoltage0_RX_LO_frequency
|
||||
#echo 2427000000 > out_altvoltage0_RX_LO_frequency
|
||||
echo 5240000000 > out_altvoltage0_RX_LO_frequency
|
||||
#echo 2320000000 > out_altvoltage0_RX_LO_frequency
|
||||
cat out_altvoltage0_RX_LO_frequency
|
||||
sync
|
||||
|
||||
echo "tx lo"
|
||||
cat out_altvoltage1_TX_LO_frequency
|
||||
#echo 2447000000 > out_altvoltage1_TX_LO_frequency
|
||||
echo 5250000000 > out_altvoltage1_TX_LO_frequency
|
||||
#echo 2320000000 > out_altvoltage1_TX_LO_frequency
|
||||
cat out_altvoltage1_TX_LO_frequency
|
||||
sync
|
||||
#sleep 1
|
||||
|
||||
echo "rx0 agc fast_attack"
|
||||
#echo "rx0 agc manual"
|
||||
cat in_voltage0_gain_control_mode
|
||||
echo fast_attack > in_voltage0_gain_control_mode
|
||||
#echo manual > in_voltage0_gain_control_mode
|
||||
cat in_voltage0_gain_control_mode
|
||||
sync
|
||||
|
||||
echo "rx1 agc fast_attack"
|
||||
#echo "rx1 agc manual"
|
||||
cat in_voltage1_gain_control_mode
|
||||
echo fast_attack > in_voltage1_gain_control_mode
|
||||
#echo manual > in_voltage1_gain_control_mode
|
||||
cat in_voltage1_gain_control_mode
|
||||
sync
|
||||
sleep 1
|
||||
|
||||
echo "rx0 gain to 70" # this set gain is gpio gain - 5dB (test with agc and read back gpio in driver)
|
||||
cat in_voltage0_hardwaregain
|
||||
echo 70 > in_voltage0_hardwaregain
|
||||
cat in_voltage0_hardwaregain
|
||||
sync
|
||||
|
||||
echo "rx1 gain to 70"
|
||||
cat in_voltage1_hardwaregain
|
||||
echo 70 > in_voltage1_hardwaregain
|
||||
cat in_voltage1_hardwaregain
|
||||
sync
|
||||
|
||||
echo "tx0 gain -89dB"
|
||||
cat out_voltage0_hardwaregain
|
||||
echo -89 > out_voltage0_hardwaregain
|
||||
cat out_voltage0_hardwaregain
|
||||
sync
|
||||
|
||||
echo "tx1 gain 0dB"
|
||||
cat out_voltage1_hardwaregain
|
||||
echo 0 > out_voltage1_hardwaregain
|
||||
cat out_voltage1_hardwaregain
|
||||
sync
|
||||
|
||||
echo "rssi"
|
||||
cat in_voltage0_rssi
|
||||
cat in_voltage1_rssi
|
||||
|
||||
cd $home_dir
|
@ -1,100 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
home_dir=$(pwd)
|
||||
|
||||
cd /sys/bus/iio/devices/iio:device2
|
||||
|
||||
echo "rx bw"
|
||||
cat in_voltage_rf_bandwidth
|
||||
#echo 37500000 > in_voltage_rf_bandwidth
|
||||
echo 17500000 > in_voltage_rf_bandwidth
|
||||
cat in_voltage_rf_bandwidth
|
||||
sync
|
||||
|
||||
echo "tx_bw"
|
||||
cat out_voltage_rf_bandwidth
|
||||
echo 37500000 > out_voltage_rf_bandwidth
|
||||
#echo 40000000 > out_voltage_rf_bandwidth
|
||||
#echo 20000000 > out_voltage_rf_bandwidth
|
||||
cat out_voltage_rf_bandwidth
|
||||
sync
|
||||
#sleep 0.5
|
||||
|
||||
echo "rx rate"
|
||||
cat in_voltage_sampling_frequency
|
||||
echo 40000000 > in_voltage_sampling_frequency
|
||||
#echo 20000000 > in_voltage_sampling_frequency
|
||||
cat in_voltage_sampling_frequency
|
||||
sync
|
||||
|
||||
echo "tx rate"
|
||||
cat out_voltage_sampling_frequency
|
||||
echo 40000000 > out_voltage_sampling_frequency
|
||||
#echo 20000000 > out_voltage_sampling_frequency
|
||||
cat out_voltage_sampling_frequency
|
||||
sync
|
||||
sleep 1
|
||||
|
||||
echo "rx lo"
|
||||
cat out_altvoltage0_RX_LO_frequency
|
||||
#echo 2427000000 > out_altvoltage0_RX_LO_frequency
|
||||
echo 5240000000 > out_altvoltage0_RX_LO_frequency
|
||||
#echo 2320000000 > out_altvoltage0_RX_LO_frequency
|
||||
cat out_altvoltage0_RX_LO_frequency
|
||||
sync
|
||||
|
||||
echo "tx lo"
|
||||
cat out_altvoltage1_TX_LO_frequency
|
||||
#echo 2447000000 > out_altvoltage1_TX_LO_frequency
|
||||
echo 5250000000 > out_altvoltage1_TX_LO_frequency
|
||||
#echo 2320000000 > out_altvoltage1_TX_LO_frequency
|
||||
cat out_altvoltage1_TX_LO_frequency
|
||||
sync
|
||||
#sleep 1
|
||||
|
||||
echo "rx0 agc fast_attack"
|
||||
#echo "rx0 agc manual"
|
||||
cat in_voltage0_gain_control_mode
|
||||
echo fast_attack > in_voltage0_gain_control_mode
|
||||
#echo manual > in_voltage0_gain_control_mode
|
||||
cat in_voltage0_gain_control_mode
|
||||
sync
|
||||
|
||||
echo "rx1 agc fast_attack"
|
||||
#echo "rx1 agc manual"
|
||||
cat in_voltage1_gain_control_mode
|
||||
echo fast_attack > in_voltage1_gain_control_mode
|
||||
#echo manual > in_voltage1_gain_control_mode
|
||||
cat in_voltage1_gain_control_mode
|
||||
sync
|
||||
sleep 1
|
||||
|
||||
echo "rx0 gain to 70" # this set gain is gpio gain - 5dB (test with agc and read back gpio in driver)
|
||||
cat in_voltage0_hardwaregain
|
||||
echo 70 > in_voltage0_hardwaregain
|
||||
cat in_voltage0_hardwaregain
|
||||
sync
|
||||
|
||||
echo "rx1 gain to 70"
|
||||
cat in_voltage1_hardwaregain
|
||||
echo 70 > in_voltage1_hardwaregain
|
||||
cat in_voltage1_hardwaregain
|
||||
sync
|
||||
|
||||
echo "tx0 gain -89dB"
|
||||
cat out_voltage0_hardwaregain
|
||||
echo -89 > out_voltage0_hardwaregain
|
||||
cat out_voltage0_hardwaregain
|
||||
sync
|
||||
|
||||
echo "tx1 gain 0dB"
|
||||
cat out_voltage1_hardwaregain
|
||||
echo 0 > out_voltage1_hardwaregain
|
||||
cat out_voltage1_hardwaregain
|
||||
sync
|
||||
|
||||
echo "rssi"
|
||||
cat in_voltage0_rssi
|
||||
cat in_voltage1_rssi
|
||||
|
||||
cd $home_dir
|
@ -1,9 +1,16 @@
|
||||
#!/bin/bash
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "You must enter the \$BOARD_NAME as argument"
|
||||
echo "Like: adrv9364z7020 adrv9361z7035 adrv9361z7035_fmc zc706_fmcs2 zed_fmcs2 zc702_fmcs2"
|
||||
exit 1
|
||||
fi
|
||||
BOARD_NAME=$1
|
||||
|
||||
set -x
|
||||
|
||||
rm BOOT.BIN
|
||||
sync
|
||||
wget ftp://192.168.10.1/kernel_boot/output_boot_bin/BOOT.BIN
|
||||
wget ftp://192.168.10.1/kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN
|
||||
sync
|
||||
rm uImage
|
||||
sync
|
||||
@ -11,18 +18,18 @@ wget ftp://192.168.10.1/adi-linux/arch/arm/boot/uImage
|
||||
sync
|
||||
rm devicetree.dtb
|
||||
sync
|
||||
wget ftp://192.168.10.1/kernel_boot/devicetree.dtb
|
||||
wget ftp://192.168.10.1/kernel_boot/boards/$BOARD_NAME/devicetree.dtb
|
||||
sync
|
||||
#slepp 0.5
|
||||
mount /dev/mmcblk0p1 /sdcard
|
||||
mount /dev/mmcblk0p1 /mnt
|
||||
sync
|
||||
#sleep 0.5
|
||||
cp BOOT.BIN /sdcard/ -f
|
||||
cp uImage /sdcard/ -f
|
||||
cp devicetree.dtb /sdcard/ -f
|
||||
cp BOOT.BIN /mnt/ -f
|
||||
cp uImage /mnt/ -f
|
||||
cp devicetree.dtb /mnt/ -f
|
||||
sync
|
||||
#sleep 0.5
|
||||
umount /sdcard
|
||||
umount /mnt
|
||||
sync
|
||||
#sleep 3
|
||||
sudo reboot now
|
||||
|
@ -215,6 +215,72 @@ static int handle_set_rssi_th(struct nl80211_state *state,
|
||||
}
|
||||
COMMAND(set, rssi_th, "<rssi_th in value>", NL80211_CMD_TESTMODE, 0, CIB_NETDEV, handle_set_rssi_th, "set rssi_th");
|
||||
|
||||
|
||||
static int handle_set_tsf(struct nl80211_state *state,
|
||||
struct nl_cb *cb,
|
||||
struct nl_msg *msg,
|
||||
int argc, char **argv,
|
||||
enum id_input id)
|
||||
{
|
||||
struct nlattr *tmdata;
|
||||
char *end;
|
||||
unsigned int reg_cat, high_tsf, low_tsf;
|
||||
|
||||
tmdata = nla_nest_start(msg, NL80211_ATTR_TESTDATA);
|
||||
if (!tmdata) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
high_tsf = strtoul(argv[0], &end, 10);
|
||||
if (*end) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
low_tsf = strtoul(argv[1], &end, 10);
|
||||
if (*end) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
NLA_PUT_U32(msg, OPENWIFI_ATTR_CMD, OPENWIFI_CMD_SET_TSF);
|
||||
NLA_PUT_U32(msg, OPENWIFI_ATTR_HIGH_TSF, high_tsf);
|
||||
NLA_PUT_U32(msg, OPENWIFI_ATTR_LOW_TSF, low_tsf);
|
||||
|
||||
nla_nest_end(msg, tmdata);
|
||||
|
||||
printf("high_tsf val: %08x\n", high_tsf);
|
||||
printf("low_tsf val: %08x\n", low_tsf);
|
||||
|
||||
return 0;
|
||||
|
||||
/*struct nlattr *tmdata;
|
||||
char *end;
|
||||
unsigned int tmp;
|
||||
|
||||
tmdata = nla_nest_start(msg, NL80211_ATTR_TESTDATA);
|
||||
if (!tmdata) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
tmp = strtoul(argv[0], &end, 10);
|
||||
|
||||
if (*end) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
NLA_PUT_U32(msg, OPENWIFI_ATTR_CMD, OPENWIFI_CMD_SET_TSF);
|
||||
NLA_PUT_U64(msg, OPENWIFI_ATTR_TSF, tmp);
|
||||
|
||||
nla_nest_end(msg, tmdata);
|
||||
|
||||
printf("openwifi tsf: %d\n", tmp);
|
||||
|
||||
return 0;*/
|
||||
|
||||
nla_put_failure:
|
||||
return -ENOBUFS;
|
||||
}
|
||||
COMMAND(set, tsf, "<high_tsf value low_tsf value>", NL80211_CMD_TESTMODE, 0, CIB_NETDEV, handle_set_tsf, "set tsf");
|
||||
|
||||
static int handle_get_rssi_th(struct nl80211_state *state,
|
||||
struct nl_cb *cb,
|
||||
struct nl_msg *msg,
|
||||
|
@ -14,9 +14,11 @@ enum openwifi_testmode_attr {
|
||||
OPENWIFI_ATTR_SLICE_START1 = 9,
|
||||
OPENWIFI_ATTR_SLICE_END1 = 10,
|
||||
OPENWIFI_ATTR_RSSI_TH = 11,
|
||||
OPENWIFI_ATTR_HIGH_TSF = 12,
|
||||
OPENWIFI_ATTR_LOW_TSF = 13,
|
||||
|
||||
REG_ATTR_ADDR = 12,
|
||||
REG_ATTR_VAL = 13,
|
||||
REG_ATTR_ADDR = 14,
|
||||
REG_ATTR_VAL = 15,
|
||||
|
||||
/* keep last */
|
||||
__OPENWIFI_ATTR_AFTER_LAST,
|
||||
@ -54,8 +56,10 @@ enum openwifi_testmode_cmd {
|
||||
OPENWIFI_CMD_SET_RSSI_TH = 18,
|
||||
OPENWIFI_CMD_GET_RSSI_TH = 19,
|
||||
|
||||
REG_CMD_SET = 20,
|
||||
REG_CMD_GET = 21,
|
||||
OPENWIFI_CMD_SET_TSF = 20,
|
||||
|
||||
REG_CMD_SET = 21,
|
||||
REG_CMD_GET = 22,
|
||||
};
|
||||
|
||||
static const struct nla_policy openwifi_testmode_policy[OPENWIFI_ATTR_MAX + 1] = {
|
||||
@ -70,6 +74,8 @@ static const struct nla_policy openwifi_testmode_policy[OPENWIFI_ATTR_MAX + 1] =
|
||||
[OPENWIFI_ATTR_SLICE_START1] = { .type = NLA_U32 },
|
||||
[OPENWIFI_ATTR_SLICE_END1] = { .type = NLA_U32 },
|
||||
[OPENWIFI_ATTR_RSSI_TH] = { .type = NLA_U32 },
|
||||
[OPENWIFI_ATTR_HIGH_TSF] = { .type = NLA_U32 },
|
||||
[OPENWIFI_ATTR_LOW_TSF] = { .type = NLA_U32 },
|
||||
|
||||
[REG_ATTR_ADDR] = { .type = NLA_U32 },
|
||||
[REG_ATTR_VAL] = { .type = NLA_U32 },
|
||||
|
130
user_space/update_sdcard.sh
Executable file
130
user_space/update_sdcard.sh
Executable file
@ -0,0 +1,130 @@
|
||||
|
||||
#!/bin/bash
|
||||
if [ "$#" -ne 4 ]; then
|
||||
echo "You have input $# arguments."
|
||||
echo "You must enter exactly 4 arguments: \$OPENWIFI_DIR \$XILINX_DIR \$BOARD_NAME \$SDCARD_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OPENWIFI_DIR=$1
|
||||
XILINX_DIR=$2
|
||||
BOARD_NAME=$3
|
||||
SDCARD_DIR=$4
|
||||
|
||||
if [ -f "$OPENWIFI_DIR/LICENSE" ]; then
|
||||
echo "\$OPENWIFI_DIR is found!"
|
||||
else
|
||||
echo "\$OPENWIFI_DIR is not correct. Please check!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$XILINX_DIR/SDK" ]; then
|
||||
echo "\$XILINX_DIR is found!"
|
||||
else
|
||||
echo "\$XILINX_DIR is not correct. Please check!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$BOARD_NAME" != "zc706_fmcs2" ] && [ "$BOARD_NAME" != "zc702_fmcs2" ] && [ "$BOARD_NAME" != "zed_fmcs2" ] && [ "$BOARD_NAME" != "adrv9361z7035" ] && [ "$BOARD_NAME" != "adrv9361z7035_fmc" ] && [ "$BOARD_NAME" != "adrv9364z7020" ]; then
|
||||
echo "\$BOARD_NAME is not correct. Please check!"
|
||||
exit 1
|
||||
else
|
||||
echo "\$BOARD_NAME is found!"
|
||||
fi
|
||||
|
||||
# detect SD card mounting status
|
||||
if [ -d "$SDCARD_DIR/BOOT/" ]; then
|
||||
echo "$SDCARD_DIR/BOOT/"
|
||||
else
|
||||
echo "$SDCARD_DIR/BOOT/ does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$SDCARD_DIR/rootfs/" ]; then
|
||||
echo "$SDCARD_DIR/rootfs/"
|
||||
else
|
||||
echo "$SDCARD_DIR/rootfs/ does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo ls
|
||||
|
||||
home_dir=$(pwd)
|
||||
|
||||
set -x
|
||||
|
||||
if [ -f "$OPENWIFI_DIR/adi-linux/arch/arm/boot/uImage" ]; then
|
||||
echo "Skip the time costly Linux kernel compiling."
|
||||
else
|
||||
# Build the Linux kernel uImage and modules
|
||||
cd $OPENWIFI_DIR/
|
||||
git submodule init adi-linux
|
||||
git submodule update adi-linux
|
||||
cd adi-linux
|
||||
git reset --hard 4220d5d24c6c7589fc702db4f941f0632b5ad767
|
||||
cp ../kernel_boot/kernel_config ./.config
|
||||
source $XILINX_DIR/SDK/2017.4/settings64.sh
|
||||
export ARCH=arm
|
||||
export CROSS_COMPILE=arm-linux-gnueabihf-
|
||||
make oldconfig && make prepare && make modules_prepare
|
||||
make -j12 UIMAGE_LOADADDR=0x8000 uImage
|
||||
make modules
|
||||
fi
|
||||
|
||||
$OPENWIFI_DIR/user_space/get_fpga.sh $OPENWIFI_DIR
|
||||
|
||||
BOARD_NAME_ALL="zc706_fmcs2 zed_fmcs2 zc702_fmcs2 adrv9361z7035 adrv9361z7035_fmc adrv9364z7020"
|
||||
for BOARD_NAME_TMP in $BOARD_NAME_ALL
|
||||
do
|
||||
# if [ -f "$OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN" ]; then
|
||||
# echo "Skip the BOOT.BIN generation."
|
||||
# else
|
||||
# # Build BOOT.BIN
|
||||
$OPENWIFI_DIR/user_space/boot_bin_gen.sh $OPENWIFI_DIR $XILINX_DIR $BOARD_NAME_TMP
|
||||
# fi
|
||||
dtc -I dts -O dtb -o $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME_TMP/devicetree.dtb $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME_TMP/devicetree.dts
|
||||
mkdir $SDCARD_DIR/BOOT/$BOARD_NAME_TMP
|
||||
cp $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME_TMP/devicetree.dtb $SDCARD_DIR/BOOT/$BOARD_NAME_TMP
|
||||
cp $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME_TMP/output_boot_bin/BOOT.BIN $SDCARD_DIR/BOOT/$BOARD_NAME_TMP
|
||||
done
|
||||
|
||||
# Copy uImage BOOT.BIN and devicetree to SD card BOOT partition
|
||||
cp $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME/devicetree.dtb $SDCARD_DIR/BOOT/
|
||||
cp $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN $SDCARD_DIR/BOOT/
|
||||
cp $OPENWIFI_DIR/adi-linux/arch/arm/boot/uImage $SDCARD_DIR/BOOT/
|
||||
|
||||
# build openwifi driver
|
||||
$OPENWIFI_DIR/driver/make_all.sh $OPENWIFI_DIR $XILINX_DIR
|
||||
|
||||
# Copy files to SD card rootfs partition
|
||||
sudo mkdir $SDCARD_DIR/rootfs/root/openwifi
|
||||
sudo find $OPENWIFI_DIR/driver -name \*.ko -exec cp {} $SDCARD_DIR/rootfs/root/openwifi/ \;
|
||||
sudo cp $OPENWIFI_DIR/user_space/* $SDCARD_DIR/rootfs/root/openwifi/ -rf
|
||||
sudo wget -P $SDCARD_DIR/rootfs/root/openwifi/webserver/ https://users.ugent.be/~xjiao/openwifi-low-aac.mp4
|
||||
|
||||
sudo mkdir $SDCARD_DIR/rootfs/lib/modules
|
||||
sudo mkdir $SDCARD_DIR/rootfs/lib/modules/openwifi
|
||||
sudo find $OPENWIFI_DIR/adi-linux -name \*.ko -exec cp {} $SDCARD_DIR/rootfs/lib/modules/openwifi/ \;
|
||||
sudo rm $SDCARD_DIR/rootfs/lib/modules/openwifi/{axidmatest.ko,xilinx_dma.ko,adi_axi_hdmi.ko,ad9361_drv.ko} -f
|
||||
|
||||
sudo rm $SDCARD_DIR/rootfs/etc/udev/rules.d/70-persistent-net.rules
|
||||
sudo cp $OPENWIFI_DIR/kernel_boot/70-persistent-net.rules $SDCARD_DIR/rootfs/etc/udev/rules.d/
|
||||
sudo mv $SDCARD_DIR/rootfs/lib/udev/rules.d/75-persistent-net-generator.rules $SDCARD_DIR/rootfs/lib/udev/rules.d/75-persistent-net-generator.rules.bak
|
||||
|
||||
# Some setup
|
||||
sudo echo -e "\nauto lo eth0\niface lo inet loopback\niface eth0 inet static\naddress 192.168.10.122\nnetmask 255.255.255.0\n" | sudo tee -a $SDCARD_DIR/rootfs/etc/network/interfaces
|
||||
sudo echo -e "\nnameserver 8.8.8.8\nnameserver 4.4.4.4\n" | sudo tee -a $SDCARD_DIR/rootfs/etc/resolv.conf
|
||||
sudo echo -e "\nUseDNS no\n" | sudo tee -a $SDCARD_DIR/rootfs/etc/ssh/sshd_config
|
||||
sudo echo -e "\nnet.ipv4.ip_forward=1\n" | sudo tee -a $SDCARD_DIR/rootfs/etc/sysctl.conf
|
||||
sudo chmod -x $SDCARD_DIR/rootfs/etc/update-motd.d/90-updates-available
|
||||
sudo chmod -x $SDCARD_DIR/rootfs/etc/update-motd.d/91-release-upgrade
|
||||
|
||||
cd $SDCARD_DIR/BOOT
|
||||
sync
|
||||
cd $SDCARD_DIR/rootfs
|
||||
sync
|
||||
|
||||
cd $home_dir
|
||||
|
||||
umount $SDCARD_DIR/BOOT/
|
||||
umount $SDCARD_DIR/rootfs/
|
5
user_space/webserver/index.html
Normal file
5
user_space/webserver/index.html
Normal file
@ -0,0 +1,5 @@
|
||||
<h1>Welcome to <strong><span style="color: #0000ff;"><a style="color: #0000ff;" href="https://github.com/open-sdr/openwifi">openwifi</a></span>. <img src="openwifi-logo-small.jpg" alt="" /></strong></h1>
|
||||
<h1><span style="color: #0000ff;"><strong>open-source IEEE802.11/Wi-Fi baseband chip/FPGA design</strong></span></h1>
|
||||
<p><span style="color: #0000ff;"><strong><video controls="controls" width="1080" height="960">
|
||||
<source src="openwifi-low-aac.mp4" type="video/mp4" /></video></strong></span></p>
|
||||
<p><span style="color: #0000ff;"><strong><img src="openwifi-detail.jpg" alt="" /></strong></span></p>
|
BIN
user_space/webserver/openwifi-detail.jpg
Normal file
BIN
user_space/webserver/openwifi-detail.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 568 KiB |
BIN
user_space/webserver/openwifi-logo-small.jpg
Normal file
BIN
user_space/webserver/openwifi-logo-small.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
@ -101,7 +101,7 @@ then
|
||||
fi
|
||||
sleep 1
|
||||
|
||||
echo "set RF frontend: ant0 rx, ant1 tx"
|
||||
echo "set RF frontend"
|
||||
# if [ $last_input == "remote" ]
|
||||
# then
|
||||
# rm rf_init.sh
|
||||
@ -214,6 +214,3 @@ dmesg
|
||||
# dmesg -c
|
||||
# sleep 0.1
|
||||
# ifconfig sdr0 up
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user