mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 15:38:37 +04:00
The JioFiber JCOW407 is an ISP provided GPON ONT and home router, based
on the EcoNet EN7528. The JCOW407-IN is the same board with a
second-source SPI NAND, Winbond W25M02G in place of the Micron
MT29F2G01, and is covered by the same image.
Both share their flash layout, MAC pool, WiFi EEPROM offsets, PCIe
topology, switch and USB with the JioFiber JCOW414 and reuse
en7528_jiofiber.dtsi. The LEDs and buttons are wired differently: the
RGB status LED is on GPIO 2/3/4 rather than 27/25/23, WPS is on GPIO 1
rather than GPIO 4, and the two colours of each LAN jack are swapped,
green on the odd pin and amber on the even one.
Specifications
==============
* SoC: EcoNet EN7528
* RAM: 512MiB DDR3
* Flash: 256MiB SPI NAND (Winbond W25M02G or Micron MT29F2G01)
* WiFi 2.4GHz: MT7603E 2T2R, on PCIe port 0
* WiFi 5GHz: MT7663 2T2R 802.11ac, on PCIe port 1
* Ethernet: 4x 10/100/1000
* LEDs: 1x RGB status (3 GPIOs), plus green and amber per LAN jack
* Buttons: Reset, WPS
* USB: 2x USB ports
* UART: 4-pin header, GND 3.3V RX TX, 115200 8n1
* Other: 1x FXS phone jack, 1 GPON port
Notes
=====
* OpenWrt has to live in the first image slot (tclinux). Which slot the
vendor firmware boots from varies between units. The bootloader
picks the slot from a single ASCII byte at flash offset 0x0DFC0000,
'0' selects tclinux and '1' selects tclinux_slave. If your device is
booting from the second slot, the flag has to be moved after flashing;
see "Switching slots" below.
* The green LAN LEDs are described but stay dark until pinctrl support
lands. This bootloader leaves GPIO 31/33/35/37 muxed to the GPHY LED
function, so writing the GPIO output has no effect. Muxing them back
to GPIO makes all four work as ordinary GPIOs. The amber LEDs are
unaffected, their pins come up in GPIO mode already, as do all eight
on the JCOW414.
* The rootfs is a UBI volume on an mtd-concat of tclinux_rootfs and the
7.25MiB region at 0x0D680000 that the vendor partition table does not
cover, giving 43.25MiB.
Installation
============
Both methods need serial console access. Power the device on, press a
key within one second to stop the bootloader, and log in with
telecomadmin / nE7jA%5m.
Booting an initramfs image over TFTP
------------------------------------
The bootloader runs a TFTP server that only validates the file name
after the transfer has finished, so any name other than tcboot.bin or
tclinux.bin lands in RAM without touching the flash.
1. Connect ethernet and give the PC the address 192.168.1.2
2. Upload the image:
tftp 192.168.1.1 -m binary -v -c put \
openwrt-econet-en7528-jiofiber_jcow407-initramfs-kernel.bin
The bootloader answers "Invalid filename, upload failed" after
reporting "start = 0x80020000". That is expected, the image is in
RAM at that point.
3. bldr> jump 80020000
Booting an initramfs image over XMODEM
--------------------------------------
1. Get the image length in hex:
printf '%X\n' "$(stat -c%s \
openwrt-econet-en7528-jiofiber_jcow407-initramfs-kernel.bin)"
2. bldr> xmdm 80020000 <file length hex>
3. Once "CCCC" appears, start the transfer from the terminal, e.g. with
picocom --send-cmd "lsx -vv" -b 115200 /dev/ttyUSB0 and ctrl+a ctrl+s
4. bldr> jump 80020000
Installing permanently
----------------------
1. Load openwrt-econet-en7528-jiofiber_jcow407-squashfs-tclinux.trx into
RAM with either method above
2. Write it to the first slot:
bldr> flash 80000 80020000 <file length hex>
3. Move the boot flag to the first slot as described below, then
power-cycle
Switching slots
---------------
From OpenWrt:
en75_chboot # show the active slot
en75_chboot openwrt # first slot, OpenWrt
en75_chboot factory # second slot, vendor
From the vendor firmware:
sys bootflag read # show the active slot
sys bootflag swap # switch to the other slot
From the bootloader, writing the byte directly:
bldr> memwl a1000000 30 # 30='0' tclinux, 31='1' tclinux_slave
bldr> memrl a1000000 # read it back to confirm the staged byte
bldr> flash dfc0000 a1000000 1
Power-cycle afterwards.
Reverting to stock is "en75_chboot factory" followed by a power cycle,
or the same bootloader sequence with 31 instead of 30.
MAC addresses
=============
MAC addresses are stored in the bootloader partition at offset 0x3fe48
and are assigned exactly as the vendor firmware assigns them:
offset 0 vendor WAN/PON
offset 1 LAN, br-lan and eth0
offset 2 WLAN 2.4GHz
offset 3 WLAN 5GHz
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24798
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>