openwrt/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches

29 lines
672 B
Plaintext
Raw Normal View History

ipq40xx: add support for Compex WPJ428 * QCA IPQ4028 * 256 MB of RAM * 32 MB of SPI NOR flash (mx25l25635e) * 128 MB of SPI NAND flash (gd5f1gq4ucy1g) * 2T2R 2.4 GHz - QCA4019 hw1.0 (SoC) - uses AP-DK03 BDF from QCA4019/hw1.0/board-2.bin * 2T2R 5 GHz - QCA4019 hw1.0 (SoC) - uses AP-DK03 BDF from QCA4019/hw1.0/board-2.bin * 2 fully software controllable GPIO-LEDs * 2 additional GPIO-LEDs which also affect the SIM card detection * 1x button (reset) * 1x GPIO buzzer * 1x USB (xHCI) * 1x NGFF (USB-only with Dual-SIM support, untested) * TTL pins are on board (R124 is next to GND, then follows: RX, TX, VCC) * 2x gigabit ethernet - phy@mdio4: + Manual: Ethernet port 0 + gmac0 (ethaddr) in original firmware + 802.3af POE (HV version) + 24v passive POE (LV version) - phy@mdio3: + Manual: Ethernet port 1 + gmac1 (eth1addr) in original firmware * DC Jack connector + 24-56V (HV version) + 12-24V (LV version) The SPI NAND flash isn't supported at the moment. The bootloader has to be updated before OpenWrt is installed to fix a reboot problem. The nor-ipq40xx-single.img from https://downloads.compex.com.sg/?dir=uploads/QSDK/QCA-Reference/WPJ428/b170123-IPQ40xx-Reference-Firmware has to be downloaded and the transfered in u-boot via TFTP set ipaddr 192.168.1.11 set serverip 192.168.1.10 ping ${serverip} tftpboot 0x84000000 nor-ipq40xx-single.img imgaddr=0x84000000 && source $imgaddr:script The sysupgrade image can be installed directly on flash using u-boot: sf probe tftpboot 0x84000000 openwrt-ipq40xx-compex_wpj428-squashfs-sysupgrade.bin sf erase 0x00180000 +$filesize sf write 0x84000000 0x00180000 $filesize bootipq The initramfs image can be started using tftpboot 0x82000000 openwrt-ipq40xx-compex_wpj428-initramfs-fit-uImage.itb set fdt_high 0x83000000 bootm 0x82000000 The used SIM card slot can be changed using # slot 1 (also enables orange LED) echo 1 > /sys/class/gpio/gpio3/value # slot 2 echo 0 > /sys/class/gpio/gpio3/value It can be checked whether a SIM card is inserted in the current slot and the red LED is subsequently on via: echo 2 > /sys/class/gpio/export cat /sys/class/gpio/gpio2/value Signed-off-by: Sven Eckelmann <sven@narfation.org>
2018-03-02 11:56:53 +01:00
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
ipq40xx: add support for Cell C RTL30VW Cell C RTL30VW is a LTE router with tho gigabit ethernets and integrated QMI mPCIE modem. This is stripped version of ASKEY RTL0030VW. Hardware: Specification: -CPU: IPQ4019 -RAM: 256MB -Flash: NAND 128MB + NOR 16MB -WiFi: Integrated bgn/ac -LTE: mPCIe card (Modem chipset MDM9230) -LAN: 2 Gigabit Ports -USB: 2x USB2.0 -Serial console: RJ-45 115200 8n1 -Unsupported VoIP Known issues: None so far. Instruction install: There are two methods: Factory web-gui and serial + tftp. Web-gui: 1. Apply factory image via stock web-gui. Serial + initramfs: 1. Rename OpenWrt initramfs image to "image" 2. Connect serial console (115200,8n1) 3. Set IP to different than 192.168.1.11, but 24 bit mask, eg. 192.168.1.4. 4. U-Boot commands: sf probe && sf read 0x80000000 0x180000 0x10000 setenv serverip 192.168.1.4 set fdt_high 0x85000000 tftpboot 0x84000000 image bootm 0x84000000 5. Install sysupgrade image via "sysupgrade -n" Back to stock: All is needed is swap 0x4c byte in mtd8 from 0 to 1 or 1 to 0, do firstboot and factory reset with OFW: 1. read mtd8: dd if=/dev/mtd8 of=/tmp/mtd8 2. go to tmp: cd /tmp/ 3. write first part of partition: dd if=mtd8 of=mtd8.new bs=1 count=76 4. check which layout uses bootloader: cat /proc/mtd 5a. If first are kernel_1 and rootfs_1 write 0: echo -n -e '\x00' >> mtd8.new 5b. If first are kernel and rootfs write 1: echo -n -e '\x01' >> mtd8.new 6. fill with rest of data: dd if=mtd8 bs=1 skip=77 >> mtd8.new 7. CHECK IF mtd8.new HAVE CHANGED ONLY ONE BYTE! e.g with: hexdump mtd8.new 8. write new mtd8 to flash: mtd write mtd8.new /dev/mtd8 9. do firstboot 10.reboot 11. Do back to factory defaults in OFW GUI. Based on work: Cezary Jackiewicz <cezary@eko.one.pl> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2020-03-09 21:16:43 +01:00
cellc,rtl30vw)
ucidef_add_gpio_switch "w_disable" "W_DISABLE mPCIE pin" "398" "1"
ucidef_add_gpio_switch "pmd_resin_n" "PMD_RESIN_N pin" "399" "1"
ucidef_add_gpio_switch "mcpie_vcc" "LTE power" "400" "0"
ucidef_add_gpio_switch "usb_vcc" "USB power" "401" "0"
;;
ipq40xx: add support for Crisis Innovation Lab MeshPoint.One MeshPoint.One is Wi-Fi hotspot and smart IoT gateway (based upon Jalapeno module from 8Devices). MeshPoint.One (https://meshpointone.com) is a unique Wi-Fi hotspot and smart city gateway that can be installed and powered from street lighting (even solar power in the future). MeshPoint provides up to 27 hours of interrupted Wi-Fi and IoT services from internal battery even when external power is not available. MeshPoint.One can be used for disaster relief efforts in order to provide instant Wi-Fi coverage that can be easily expanded by just adding more devices that create wide area mesh network. MeshPoint.One devices have standard Luci UI for management. Features: - 1x 1Gpbs WAN - 1x 1Gbps LAN - POE input (eth0) - POE output (eth1) - Sensor for temperature, humidity and pressure (Bosch BME280) - current, voltage and power measurement via TI INA230 - Hardware real time clock - optional power via Li-Ion battery - micro USB port with USB to serial chip for easy OpenWrt terminal access - I2C header for connecting additional sensors Installation: ------------- Simply flash the sysupgrade image from stock firmware. Or use the built in Web recovery into bootloader: Hold Reset button for 5 to 20 seconds or use UART and httpd command. Web UI will appear on 192.168.2.100 by default. For web recovery use the factory.ubi image. Signed-off-by: Damir Samardzic <damir.samardzic@sartura.hr> Signed-off-by: Damir Franusic <damir.franusic@sartura.hr> Signed-off-by: Valent Turkovic <valent@meshpoint.me> Signed-off-by: Robert Marko <robert@meshpoint.me> [commit description long line wrap, usb->USB] Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-11-25 15:25:00 +01:00
cilab,meshpoint-one)
ucidef_add_gpio_switch "poe_passtrough" "POE passtrough enable" "413" "1"
;;
ipq40xx: add support for Compex WPJ428 * QCA IPQ4028 * 256 MB of RAM * 32 MB of SPI NOR flash (mx25l25635e) * 128 MB of SPI NAND flash (gd5f1gq4ucy1g) * 2T2R 2.4 GHz - QCA4019 hw1.0 (SoC) - uses AP-DK03 BDF from QCA4019/hw1.0/board-2.bin * 2T2R 5 GHz - QCA4019 hw1.0 (SoC) - uses AP-DK03 BDF from QCA4019/hw1.0/board-2.bin * 2 fully software controllable GPIO-LEDs * 2 additional GPIO-LEDs which also affect the SIM card detection * 1x button (reset) * 1x GPIO buzzer * 1x USB (xHCI) * 1x NGFF (USB-only with Dual-SIM support, untested) * TTL pins are on board (R124 is next to GND, then follows: RX, TX, VCC) * 2x gigabit ethernet - phy@mdio4: + Manual: Ethernet port 0 + gmac0 (ethaddr) in original firmware + 802.3af POE (HV version) + 24v passive POE (LV version) - phy@mdio3: + Manual: Ethernet port 1 + gmac1 (eth1addr) in original firmware * DC Jack connector + 24-56V (HV version) + 12-24V (LV version) The SPI NAND flash isn't supported at the moment. The bootloader has to be updated before OpenWrt is installed to fix a reboot problem. The nor-ipq40xx-single.img from https://downloads.compex.com.sg/?dir=uploads/QSDK/QCA-Reference/WPJ428/b170123-IPQ40xx-Reference-Firmware has to be downloaded and the transfered in u-boot via TFTP set ipaddr 192.168.1.11 set serverip 192.168.1.10 ping ${serverip} tftpboot 0x84000000 nor-ipq40xx-single.img imgaddr=0x84000000 && source $imgaddr:script The sysupgrade image can be installed directly on flash using u-boot: sf probe tftpboot 0x84000000 openwrt-ipq40xx-compex_wpj428-squashfs-sysupgrade.bin sf erase 0x00180000 +$filesize sf write 0x84000000 0x00180000 $filesize bootipq The initramfs image can be started using tftpboot 0x82000000 openwrt-ipq40xx-compex_wpj428-initramfs-fit-uImage.itb set fdt_high 0x83000000 bootm 0x82000000 The used SIM card slot can be changed using # slot 1 (also enables orange LED) echo 1 > /sys/class/gpio/gpio3/value # slot 2 echo 0 > /sys/class/gpio/gpio3/value It can be checked whether a SIM card is inserted in the current slot and the red LED is subsequently on via: echo 2 > /sys/class/gpio/export cat /sys/class/gpio/gpio2/value Signed-off-by: Sven Eckelmann <sven@narfation.org>
2018-03-02 11:56:53 +01:00
compex,wpj428)
ucidef_add_gpio_switch "sim_card_select" "SIM card select" "3" "0"
;;
mikrotik,hap-ac3)
ucidef_add_gpio_switch "poe_passtrough" "PoE Passthrough" "452" "0"
;;
ipq40xx: add support for Compex WPJ428 * QCA IPQ4028 * 256 MB of RAM * 32 MB of SPI NOR flash (mx25l25635e) * 128 MB of SPI NAND flash (gd5f1gq4ucy1g) * 2T2R 2.4 GHz - QCA4019 hw1.0 (SoC) - uses AP-DK03 BDF from QCA4019/hw1.0/board-2.bin * 2T2R 5 GHz - QCA4019 hw1.0 (SoC) - uses AP-DK03 BDF from QCA4019/hw1.0/board-2.bin * 2 fully software controllable GPIO-LEDs * 2 additional GPIO-LEDs which also affect the SIM card detection * 1x button (reset) * 1x GPIO buzzer * 1x USB (xHCI) * 1x NGFF (USB-only with Dual-SIM support, untested) * TTL pins are on board (R124 is next to GND, then follows: RX, TX, VCC) * 2x gigabit ethernet - phy@mdio4: + Manual: Ethernet port 0 + gmac0 (ethaddr) in original firmware + 802.3af POE (HV version) + 24v passive POE (LV version) - phy@mdio3: + Manual: Ethernet port 1 + gmac1 (eth1addr) in original firmware * DC Jack connector + 24-56V (HV version) + 12-24V (LV version) The SPI NAND flash isn't supported at the moment. The bootloader has to be updated before OpenWrt is installed to fix a reboot problem. The nor-ipq40xx-single.img from https://downloads.compex.com.sg/?dir=uploads/QSDK/QCA-Reference/WPJ428/b170123-IPQ40xx-Reference-Firmware has to be downloaded and the transfered in u-boot via TFTP set ipaddr 192.168.1.11 set serverip 192.168.1.10 ping ${serverip} tftpboot 0x84000000 nor-ipq40xx-single.img imgaddr=0x84000000 && source $imgaddr:script The sysupgrade image can be installed directly on flash using u-boot: sf probe tftpboot 0x84000000 openwrt-ipq40xx-compex_wpj428-squashfs-sysupgrade.bin sf erase 0x00180000 +$filesize sf write 0x84000000 0x00180000 $filesize bootipq The initramfs image can be started using tftpboot 0x82000000 openwrt-ipq40xx-compex_wpj428-initramfs-fit-uImage.itb set fdt_high 0x83000000 bootm 0x82000000 The used SIM card slot can be changed using # slot 1 (also enables orange LED) echo 1 > /sys/class/gpio/gpio3/value # slot 2 echo 0 > /sys/class/gpio/gpio3/value It can be checked whether a SIM card is inserted in the current slot and the red LED is subsequently on via: echo 2 > /sys/class/gpio/export cat /sys/class/gpio/gpio2/value Signed-off-by: Sven Eckelmann <sven@narfation.org>
2018-03-02 11:56:53 +01:00
esac
board_config_flush
exit 0