SeeedStudio LinkIt-Smart-7688

Install OpenWrt (generic explanation)

FIXME Please add the installation procedure here.

Architecture MIPS
Vendor MediaTek
bootloader U-Boot 1.1.3
System-On-Chip MediaTek MT7688 ver:1 eco:2
CPU MIPS 24KEc
CPU Speed 580 MHz
Flash 32 MB MX25L25735FMI-10G
RAM 128 MB
Wireless SoC
Ethernet None
USB Yes 1x (USB 2.0)
FCC ID Z4T-LINKITS7688D

To Do

[04050C0C][04050C0D] DDR Calibration DQS reg = 00008988 U-Boot 1.1.3 (Sep 10 2015 - 05:56:31) Board: Ralink APSoC DRAM: 128 MB relocate_code Pointer at: 87f68000 flash manufacture id: c2, device id 20 19 find flash: MX25L25635E *** Warning - bad CRC, using default environment ============================================ Ralink UBoot Version: 4.3.0.0 -------------------------------------------- ASIC 7628_MP (Port5<->None) DRAM component: 1024 Mbits DDR, width 16 DRAM bus: 16 bit Total memory: 128 MBytes Flash component: SPI Flash Date:Sep 10 2015 Time:05:56:31 ============================================ icache: sets:512, ways:4, linesz:32 ,total:65536 dcache: sets:256, ways:4, linesz:32 ,total:32768 ##### The CPU freq = 580 MHZ #### estimate memory size =128 Mbytes RESET MT7628 PHY!!!!!! GPIOMODE --> 50054404 GPIOMODE2 --> 5540551 Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. 0 3: System Boot system code via Flash. ## Booting image at bc050000 ... Image Name: MIPS OpenWrt Linux-3.18.21 Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1118491 Bytes = 1.1 MB Load Address: 80000000 Entry Point: 80000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 80000000) ... ## Giving linux memsize in MB, 128 Starting kernel ... [ 0.000000] Linux version 3.18.21 (buildbot@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r47269) ) #5 Fri Nov 20 12:43:14 CET 2015 [ 0.000000] Board has DDR2 [ 0.000000] Analog PMU set to hw control [ 0.000000] Digital PMU set to hw control [ 0.000000] SoC Type: MediaTek MT7688 ver:1 eco:2 [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc) [ 0.000000] MIPS: machine is MediaTek LinkIt Smart 7688 [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 08000000 @ 00000000 (usable) [ 0.000000] Initrd not found or empty - disabling initrd [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000-0x07ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x00000000-0x07ffffff] [ 0.000000] Initmem setup node 0 [mem 0x00000000-0x07ffffff] [ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. [ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 [ 0.000000] Kernel command line: console=ttyS2,57600 rootfstype=squashfs,jffs2 [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] Writing ErrCtl register=00000413 [ 0.000000] Readback ErrCtl register=00000413 [ 0.000000] Memory: 126332K/131072K available (2703K kernel code, 129K rwdata, 344K rodata, 144K init, 190K bss, 4740K reserved) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS:256 [ 0.000000] intc: using register map from devicetree [ 0.000000] CPU Clock: 580MHz [ 0.000000] clocksource_of_init: no matching clocksources found [ 0.000000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216) [ 0.060000] pid_max: default: 32768 minimum: 301 [ 0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.080000] pinctrl core: initialized pinctrl subsystem [ 0.090000] NET: Registered protocol family 16 [ 0.110000] mt7621_gpio 10000600.gpio: registering 32 gpios [ 0.120000] mt7621_gpio 10000600.gpio: registering 32 gpios [ 0.130000] mt7621_gpio 10000600.gpio: registering 32 gpios [ 0.140000] Switched to clocksource MIPS [ 0.150000] NET: Registered protocol family 2 [ 0.150000] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [ 0.170000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.180000] TCP: Hash tables configured (established 1024 bind 1024) [ 0.190000] TCP: reno registered [ 0.200000] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.210000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.220000] NET: Registered protocol family 1 [ 0.230000] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.260000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.280000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.300000] msgmni has been set to 246 [ 0.310000] io scheduler noop registered [ 0.320000] io scheduler deadline registered (default) [ 0.330000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled [ 0.350000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A [ 0.360000] 10000d00.uart1: ttyS1 at MMIO 0x10000d00 (irq = 29, base_baud = 2500000) is a 16550A [ 0.380000] console [ttyS2] disabled [ 0.390000] 10000e00.uart2: ttyS2 at MMIO 0x10000e00 (irq = 30, base_baud = 2500000) is a 16550A [ 0.410000] console [ttyS2] enabled [ 0.410000] console [ttyS2] enabled [ 0.420000] bootconsole [early0] disabled [ 0.420000] bootconsole [early0] disabled [ 0.440000] spi-mt7621 10000b00.spi: sys_freq: 193333333 [ 0.450000] m25p80 spi32766.0: mx25l25635e (32768 Kbytes) [ 0.470000] m25p80 spi32766.0: using chunked io [ 0.470000] 4 ofpart partitions found on MTD device spi32766.0 [ 0.490000] Creating 4 MTD partitions on "spi32766.0": [ 0.500000] 0x000000000000-0x000000030000 : "u-boot" [ 0.510000] 0x000000030000-0x000000040000 : "u-boot-env" [ 0.520000] 0x000000040000-0x000000050000 : "factory" [ 0.530000] 0x000000050000-0x000002000000 : "firmware" [ 0.610000] 2 uimage-fw partitions found on MTD device firmware [ 0.620000] 0x000000050000-0x00000016115b : "kernel" [ 0.630000] 0x00000016115b-0x000002000000 : "rootfs" [ 0.640000] mtd: device 5 (rootfs) set to be root filesystem [ 0.650000] 1 squashfs-split partitions found on MTD device rootfs [ 0.660000] 0x000001500000-0x000002000000 : "rootfs_data" [ 0.690000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5 [ 0.700000] mt7621_wdt 10000120.watchdog: Initialized [ 0.710000] TCP: cubic registered [ 0.720000] NET: Registered protocol family 17 [ 0.730000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this. [ 0.760000] Bridge firewalling registered [ 0.760000] 8021q: 802.1Q VLAN Support v1.8 [ 0.770000] mtk-linkit bootstrap: Version : LINKITS7688 [ 0.780000] mtk-linkit bootstrap: Revision : REV3 [ 0.790000] mtk-linkit bootstrap: setting up bootstrap latch [ 0.810000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5. [ 0.830000] Freeing unused kernel memory: 144K (8031c000 - 80340000) [ 2.130000] init: Console is alive [ 2.130000] init: - watchdog - [ 4.160000] usbcore: registered new interface driver usbfs [ 4.170000] usbcore: registered new interface driver hub [ 4.180000] usbcore: registered new device driver usb [ 4.200000] exFAT: Version 1.2.9 [ 4.210000] SCSI subsystem initialized [ 4.230000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 4.240000] ehci-platform: EHCI generic platform driver [ 4.450000] phy phy-usbphy.0: remote usb device wakeup disabled [ 4.460000] phy phy-usbphy.0: UTMI 16bit 30MHz [ 4.470000] ehci-platform 101c0000.ehci: EHCI Host Controller [ 4.480000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1 [ 4.500000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000 [ 4.530000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00 [ 4.540000] hub 1-0:1.0: USB hub found [ 4.550000] hub 1-0:1.0: 1 port detected [ 4.560000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 4.570000] ohci-platform: OHCI generic platform driver [ 4.580000] ohci-platform 101c1000.ohci: Generic Platform OHCI controller [ 4.590000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2 [ 4.610000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000 [ 4.680000] hub 2-0:1.0: USB hub found [ 4.690000] hub 2-0:1.0: 1 port detected [ 4.700000] platform gpio-leds: Driver leds-gpio requests probe deferral [ 4.720000] MTK MSDC device init. [ 4.770000] mtk-sd: MediaTek MT6575 MSDC Driver [ 4.780000] sdhci: Secure Digital Host Controller Interface driver [ 4.790000] sdhci: Copyright(c) Pierre Ossman [ 4.800000] platform gpio-leds: Driver leds-gpio requests probe deferral [ 4.810000] sdhci-pltfm: SDHCI platform and OF driver helper [ 4.830000] usbcore: registered new interface driver usb-storage [ 5.190000] init: - preinit - [ 6.230000] rt305x-esw 10110000.esw: link changed 0x00 [ 6.430000] random: mktemp urandom read with 9 bits of entropy available Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level [ 9.760000] jffs2: notice: (368) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. [ 9.790000] mount_root: switching to jffs2 overlay [ 9.830000] procd: - early - [ 9.830000] procd: - watchdog - [ 10.640000] procd: - ubus - [ 11.640000] procd: - init - Please press Enter to activate this console. [ 13.460000] NET: Registered protocol family 10 [ 13.550000] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 13.580000] i2c /dev entries driver [ 14.210000] <-- RTMPAllocTxRxRingMemory, Status=0, ErrorValue=0x [ 14.230000] <-- RTMPAllocAdapterBlock, Status=0 [ 14.240000] mtk_gpio_wifi gpio-wifi: registering 1 gpio [ 14.290000] i2c-ralink 10000900.i2c: loaded [ 14.310000] Linux video capture interface: v2.00 [ 14.460000] Enable Ralink GDMA Controller Module [ 14.470000] GDMA IP Version=3 [ 14.510000] ******* mt76xx_pcm_init ******* [ 14.520000] *******Enter codec_wm8960_i2c_probe******** [ 14.530000] soc-audio soc-audio: ASoC: machine MTK APSoC I2S should use snd_soc_register_card() [ 14.550000] wm8960 0-001a: No platform data supplied [ 15.060000] soc-audio soc-audio: wm8960-hifi <-> mt76xx-i2s mapping ok [ 15.080000] ip_tables: (C) 2000-2006 Netfilter Core Team [ 15.110000] nf_conntrack version 0.5.0 (1976 buckets, 7904 max) [ 15.140000] usbcore: registered new interface driver uvcvideo [ 15.160000] USB Video Class driver (1.1.1) [ 15.180000] xt_time: kernel timezone is -0000 [ 15.200000] PPP generic driver version 2.4.2 [ 15.210000] NET: Registered protocol family 24 [ 21.130000] device eth0 entered promiscuous mode [ 21.150000] br-lan: port 1(eth0) entered forwarding state [ 21.160000] br-lan: port 1(eth0) entered forwarding state [ 22.390000] efuse_probe: efuse = 10000012 [ 22.570000] tssi_0_target_pwr_g_band = 26 [ 22.580000] tssi_1_target_pwr_g_band = 35 [ 23.160000] br-lan: port 1(eth0) entered forwarding state [ 28.690000] <==== rt28xx_init, Status=0 [ 29.710000] device ra0 entered promiscuous mode [ 29.720000] br-lan: port 2(ra0) entered forwarding state [ 29.730000] br-lan: port 2(ra0) entered forwarding state [ 31.730000] br-lan: port 2(ra0) entered forwarding state [ 66.280000] random: nonblocking pool is initialized BusyBox v1.23.2 (2015-11-18 16:34:33 CET) built-in shell (ash) _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ----------------------------------------------------- CHAOS CALMER (15.05+linkit, r47501) ----------------------------------------------------- * 1 1/2 oz Gin Shake with a glassful * 1/4 oz Triple Sec of broken ice and pour * 3/4 oz Lime Juice unstrained into a goblet. * 1 1/2 oz Orange Juice * 1 tsp. Grenadine Syrup ----------------------------------------------------- root@mylinkit:/#


Simple firmware recovery via Das U-Boot.

Place the Factory Firmware named lks7688.img on a USB Stick.

Use the UART Console and *Hidden* Option 5

There are other hidden options available, read https://forum.openwrt.org/t/ai7688-update-issue/128369/26

[04050C0D][04050C0D] DDR Calibration DQS reg = 00008989 U-Boot 1.1.3 (Sep 10 2015 - 05:56:31) Board: Ralink APSoC DRAM: 128 MB relocate_code Pointer at: 87f68000 flash manufacture id: c2, device id 20 19 find flash: MX25L25635E ============================================ Ralink UBoot Version: 4.3.0.0 -------------------------------------------- ASIC 7628_MP (Port5<->None) DRAM component: 1024 Mbits DDR, width 16 DRAM bus: 16 bit Total memory: 128 MBytes Flash component: SPI Flash Date:Sep 10 2015 Time:05:56:31 ============================================ icache: sets:512, ways:4, linesz:32 ,total:65536 dcache: sets:256, ways:4, linesz:32 ,total:32768 ##### The CPU freq = 580 MHZ #### estimate memory size =128 Mbytes RESET MT7628 PHY!!!!!! GPIOMODE --> 50054404 GPIOMODE2 --> 5540551 Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. You choosed 5 0 5: System Load Linux then write to Flash via USB Storage. (Re)start USB... USB0: *********ehci_hcd_init********** Mediatek/Ralink USB EHCI host init hccr b01c0000 and hcor b01c0010 hc_length 16 6. u2phydcr0(0xb0120860)=0x00aaaa02 FM_OUT value: u4FmOut = 0(0x00000000) FM_OUT value: u4FmOut = 133(0x00000085) FM detection done! loop = 1 SR calibration value u1SrCalVal = 6 Register 1111 NbrPorts 1 USB EHCI 1.00 scanning bus 0 for devices... 2 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found reading lks7688.img ........................................................................................................................................................................................................................................................................... ....................................................................................................................... 21757956 bytes read writing lks7688.img to flash ............................................................................................................................................................................................................................................................................................................................................ ............................................................................................................................................................................................................................................................................................................................................ . . Done! [04050C0C][04050C0D] DDR Calibration DQS reg = 00008988 U-Boot 1.1.3 (Sep 10 2015 - 05:56:31) Board: Ralink APSoC DRAM: 128 MB relocate_code Pointer at: 87f68000 ****************************** Software System Reset Occurred ****************************** flash manufacture id: c2, device id 20 19 find flash: MX25L25635E ============================================ Ralink UBoot Version: 4.3.0.0 -------------------------------------------- ASIC 7628_MP (Port5<->None) DRAM component: 1024 Mbits DDR, width 16 DRAM bus: 16 bit Total memory: 128 MBytes Flash component: SPI Flash Date:Sep 10 2015 Time:05:56:31 ============================================ icache: sets:512, ways:4, linesz:32 ,total:65536 dcache: sets:256, ways:4, linesz:32 ,total:32768 ##### The CPU freq = 580 MHZ #### estimate memory size =128 Mbytes RESET MT7628 PHY!!!!!! GPIOMODE --> 50054404 GPIOMODE2 --> 5540551 Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. 2 1 0 3: System Boot system code via Flash. ## Booting image at bc050000 ... Image Name: MIPS OpenWrt Linux-3.18.21 Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1118491 Bytes = 1.1 MB Load Address: 80000000 Entry Point: 80000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 80000000) ... ## Giving linux memsize in MB, 128 Starting kernel ... [ 0.000000] Linux version 3.18.21 (buildbot@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r47269) ) #5 Fri Nov 20 12:43:14 CET 2015 [ 0.000000] Board has DDR2 [ 0.000000] Analog PMU set to hw control [ 0.000000] Digital PMU set to hw control [ 0.000000] SoC Type: MediaTek MT7688 ver:1 eco:2 [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc) [ 0.000000] MIPS: machine is MediaTek LinkIt Smart 7688 [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 08000000 @ 00000000 (usable) [ 0.000000] Initrd not found or empty - disabling initrd [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000-0x07ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x00000000-0x07ffffff] [ 0.000000] Initmem setup node 0 [mem 0x00000000-0x07ffffff] [ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. [ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 [ 0.000000] Kernel command line: console=ttyS2,57600 rootfstype=squashfs,jffs2 [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] Writing ErrCtl register=00002410 [ 0.000000] Readback ErrCtl register=00002410 [ 0.000000] Memory: 126332K/131072K available (2703K kernel code, 129K rwdata, 344K rodata, 144K init, 190K bss, 4740K reserved) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS:256 [ 0.000000] intc: using register map from devicetree [ 0.000000] CPU Clock: 580MHz [ 0.000000] clocksource_of_init: no matching clocksources found [ 0.000000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216) [ 0.060000] pid_max: default: 32768 minimum: 301 [ 0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.080000] pinctrl core: initialized pinctrl subsystem [ 0.090000] NET: Registered protocol family 16 [ 0.110000] mt7621_gpio 10000600.gpio: registering 32 gpios [ 0.120000] mt7621_gpio 10000600.gpio: registering 32 gpios [ 0.130000] mt7621_gpio 10000600.gpio: registering 32 gpios [ 0.140000] Switched to clocksource MIPS [ 0.150000] NET: Registered protocol family 2 [ 0.150000] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [ 0.170000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.180000] TCP: Hash tables configured (established 1024 bind 1024) [ 0.190000] TCP: reno registered [ 0.200000] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.210000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.220000] NET: Registered protocol family 1 [ 0.230000] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.260000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.280000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.300000] msgmni has been set to 246 [ 0.310000] io scheduler noop registered [ 0.320000] io scheduler deadline registered (default) [ 0.330000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled [ 0.350000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A [ 0.360000] 10000d00.uart1: ttyS1 at MMIO 0x10000d00 (irq = 29, base_baud = 2500000) is a 16550A [ 0.380000] console [ttyS2] disabled [ 0.390000] 10000e00.uart2: ttyS2 at MMIO 0x10000e00 (irq = 30, base_baud = 2500000) is a 16550A [ 0.410000] console [ttyS2] enabled [ 0.410000] console [ttyS2] enabled [ 0.420000] bootconsole [early0] disabled [ 0.420000] bootconsole [early0] disabled [ 0.440000] spi-mt7621 10000b00.spi: sys_freq: 193333333 [ 0.450000] m25p80 spi32766.0: mx25l25635e (32768 Kbytes) [ 0.470000] m25p80 spi32766.0: using chunked io [ 0.470000] 4 ofpart partitions found on MTD device spi32766.0 [ 0.490000] Creating 4 MTD partitions on "spi32766.0": [ 0.500000] 0x000000000000-0x000000030000 : "u-boot" [ 0.510000] 0x000000030000-0x000000040000 : "u-boot-env" [ 0.520000] 0x000000040000-0x000000050000 : "factory" [ 0.530000] 0x000000050000-0x000002000000 : "firmware" [ 0.600000] 2 uimage-fw partitions found on MTD device firmware [ 0.610000] 0x000000050000-0x00000016115b : "kernel" [ 0.630000] 0x00000016115b-0x000002000000 : "rootfs" [ 0.640000] mtd: device 5 (rootfs) set to be root filesystem [ 0.650000] 1 squashfs-split partitions found on MTD device rootfs [ 0.660000] 0x000001500000-0x000002000000 : "rootfs_data" [ 0.680000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5 [ 0.700000] mt7621_wdt 10000120.watchdog: Initialized [ 0.710000] TCP: cubic registered [ 0.720000] NET: Registered protocol family 17 [ 0.730000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this. [ 0.750000] Bridge firewalling registered [ 0.760000] 8021q: 802.1Q VLAN Support v1.8 [ 0.770000] mtk-linkit bootstrap: Version : LINKITS7688 [ 0.780000] mtk-linkit bootstrap: Revision : REV3 [ 0.790000] mtk-linkit bootstrap: setting up bootstrap latch [ 0.810000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5. [ 0.820000] Freeing unused kernel memory: 144K (8031c000 - 80340000) [ 2.130000] init: Console is alive [ 2.130000] init: - watchdog - [ 4.160000] usbcore: registered new interface driver usbfs [ 4.170000] usbcore: registered new interface driver hub [ 4.180000] usbcore: registered new device driver usb [ 4.200000] exFAT: Version 1.2.9 [ 4.210000] SCSI subsystem initialized [ 4.230000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 4.240000] ehci-platform: EHCI generic platform driver [ 4.450000] phy phy-usbphy.0: remote usb device wakeup disabled [ 4.460000] phy phy-usbphy.0: UTMI 16bit 30MHz [ 4.470000] ehci-platform 101c0000.ehci: EHCI Host Controller [ 4.480000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1 [ 4.500000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000 [ 4.530000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00 [ 4.540000] hub 1-0:1.0: USB hub found [ 4.550000] hub 1-0:1.0: 1 port detected [ 4.560000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 4.570000] ohci-platform: OHCI generic platform driver [ 4.580000] ohci-platform 101c1000.ohci: Generic Platform OHCI controller [ 4.590000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2 [ 4.610000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000 [ 4.680000] hub 2-0:1.0: USB hub found [ 4.690000] hub 2-0:1.0: 1 port detected [ 4.700000] platform gpio-leds: Driver leds-gpio requests probe deferral [ 4.720000] MTK MSDC device init. [ 4.770000] mtk-sd: MediaTek MT6575 MSDC Driver [ 4.780000] sdhci: Secure Digital Host Controller Interface driver [ 4.790000] sdhci: Copyright(c) Pierre Ossman [ 4.800000] platform gpio-leds: Driver leds-gpio requests probe deferral [ 4.810000] sdhci-pltfm: SDHCI platform and OF driver helper [ 4.830000] usbcore: registered new interface driver usb-storage [ 5.090000] usb 2-1: new full-speed USB device number 2 using ohci-platform [ 5.190000] init: - preinit - [ 5.790000] usb 2-1: not running at top speed; connect to a high speed hub [ 5.820000] random: procd urandom read with 9 bits of entropy available [ 5.840000] usb-storage 2-1:1.0: USB Mass Storage device detected [ 5.850000] scsi host0: usb-storage 2-1:1.0 [ 5.860000] platform gpio-leds: Driver leds-gpio requests probe deferral [ 6.300000] rt305x-esw 10110000.esw: link changed 0x00 Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level [ 6.860000] scsi 0:0:0:0: Direct-Access Generic Flash Disk 8.07 PQ: 0 ANSI: 2 [ 6.880000] platform gpio-leds: Driver leds-gpio requests probe deferral [ 6.910000] sd 0:0:0:0: [sda] 8226816 512-byte logical blocks: (4.21 GB/3.92 GiB) [ 6.930000] sd 0:0:0:0: [sda] Write Protect is off [ 6.940000] sd 0:0:0:0: [sda] No Caching mode page found [ 6.950000] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 7.050000] sda: sda1 [ 7.080000] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 9.650000] mount_root: jffs2 not ready yet, using temporary tmpfs overlay [ 9.690000] procd: - early - [ 9.690000] procd: - watchdog - [ 10.540000] procd: - ubus - [ 11.550000] procd: - init - Please press Enter to activate this console. [ 13.380000] NET: Registered protocol family 10 [ 13.470000] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 13.490000] i2c /dev entries driver [ 14.130000] <-- RTMPAllocTxRxRingMemory, Status=0, ErrorValue=0x [ 14.140000] <-- RTMPAllocAdapterBlock, Status=0 [ 14.150000] mtk_gpio_wifi gpio-wifi: registering 1 gpio [ 14.190000] i2c-ralink 10000900.i2c: loaded [ 14.210000] Linux video capture interface: v2.00 [ 14.250000] Enable Ralink GDMA Controller Module [ 14.260000] GDMA IP Version=3 [ 14.410000] ******* mt76xx_pcm_init ******* [ 14.420000] *******Enter codec_wm8960_i2c_probe******** [ 14.430000] soc-audio soc-audio: ASoC: machine MTK APSoC I2S should use snd_soc_register_card() [ 14.450000] wm8960 0-001a: No platform data supplied [ 14.960000] soc-audio soc-audio: wm8960-hifi <-> mt76xx-i2s mapping ok [ 15.110000] ip_tables: (C) 2000-2006 Netfilter Core Team [ 15.140000] nf_conntrack version 0.5.0 (1976 buckets, 7904 max) [ 15.180000] usbcore: registered new interface driver uvcvideo [ 15.190000] USB Video Class driver (1.1.1) [ 15.210000] xt_time: kernel timezone is -0000 [ 15.240000] PPP generic driver version 2.4.2 [ 15.250000] NET: Registered protocol family 24 [ 23.980000] device eth0 entered promiscuous mode [ 24.020000] br-lan: port 1(eth0) entered forwarding state [ 24.030000] br-lan: port 1(eth0) entered forwarding state [ 25.400000] efuse_probe: efuse = 10000012 [ 25.410000] net ra0: Direct firmware load for mt7628.eeprom failed with error -2 [ 25.420000] net ra0: Falling back to user helper [ 26.030000] br-lan: port 1(eth0) entered forwarding state [ 26.130000] tssi_0_target_pwr_g_band = 26 [ 26.140000] tssi_1_target_pwr_g_band = 35 [ 32.120000] <==== rt28xx_init, Status=0 [ 33.110000] device ra0 entered promiscuous mode [ 33.120000] br-lan: port 2(ra0) entered forwarding state [ 33.130000] br-lan: port 2(ra0) entered forwarding state [ 33.520000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0 [ 33.530000] jffs2_build_filesystem(): unlocking the mtd device... done. [ 33.550000] jffs2_build_filesystem(): erasing all blocks after the end marker... [ 35.130000] br-lan: port 2(ra0) entered forwarding state [ 56.480000] random: nonblocking pool is initialized [ 88.310000] done. [ 88.320000] jffs2: notice: (1607) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. BusyBox v1.23.2 (2015-11-18 16:34:33 CET) built-in shell (ash) _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ----------------------------------------------------- CHAOS CALMER (15.05+linkit, r47501) ----------------------------------------------------- * 1 1/2 oz Gin Shake with a glassful * 1/4 oz Triple Sec of broken ice and pour * 3/4 oz Lime Juice unstrained into a goblet. * 1 1/2 oz Orange Juice * 1 tsp. Grenadine Syrup ----------------------------------------------------- root@mylinkit:/#


In order to have a usable Console.
I installed a 470K resistor in the UART RX2 line. (P9)
However any value between 220K to 680K is likely to work.

SeeedStudio Product Page https://www.seeedstudio.com/Breakout-for-LinkIt-Smart-7688-v2-0-p-2641.html

Breakout for LinkIt Smart 7688 v2.0, succeeding the first version , now can better support the audio recording function. As it reserves the original pins of LinkIt Smart 7688, the board also integrates several frequently-used ports such as an Ethernet port, a 3.5mm audio port, and a Host port (USB Type-A Connector) for more peripherals, and along with 3 Grove ports to provide 2 UART and 1 I2C interfaces for the Grove-based electronics, it saves you a lot of work doing wirings in your smart IoT projects, makes your rapid prototyping even faster.

Features

  • 3.5mm headphone Jack(with Mic) which support OMTP and CTIA
  • 1 x Ethernet to connect internet
  • 1 x USB 2.0 for more peripherals
  • Grove interface: 2 x UART, 1 x I2C
  • Stereo and AUX are supported
  • Audio Recording supported
  • 1W output for each stereo port

SeeedStudio Wiki Page https://wiki.seeedstudio.com/Breakout_for_LinkIt_Smart_7688_v2.0/

Technical details Dimensions: 5.6mm x 8.2mm x 12mm Weight: 49g Battery: Exclude Input voltage: 5.0V(With USB Power port) Operating voltage: 3.3V Max Operating current: 2mA Min Operating current: 800mA Chip: WM8960 Analog pin input voltage(on WM8960 ):2.7~3.6V(Analog pin input voltage on WM8960 for stereo can reach 5.5V at Max.) Digital pin input voltage(on WM8960 ): 1.71~3.6V

some Build changes are needed to use Audio

We add i2s as audio i/o and define i2c to control the audio chip so a volume and other controls is present afterwards.

This is a `git patch` file so copy that to a file in the /openwrt bildroot folder and execute it with `patch -p1 < {filename}` or `git am {filename}.

diff --git a/target/linux/ramips/dts/LINKIT7688.dts b/target/linux/ramips/dts/LINKIT7688.dts
index 7106c3b33a..31dc220571 100644
--- a/target/linux/ramips/dts/LINKIT7688.dts
+++ b/target/linux/ramips/dts/LINKIT7688.dts
@@ -54,6 +54,28 @@
 			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
+
+       sound {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "Audio-I2S";
+               simple-audio-card,format = "i2s";
+               simple-audio-card,bitclock-master = <&dailink0_master>;
+               simple-audio-card,frame-master = <&dailink0_master>;
+               simple-audio-card,widgets =
+                       "Headphone", "Headphones";
+               simple-audio-card,routing =
+                       "Headphones", "HP_L",
+                       "Headphones", "HP_R";
+               simple-audio-card,mclk-fs = <256>;
+
+               simple-audio-card,cpu {
+                       sound-dai = <&i2s>;
+               };
+
+               dailink0_master: simple-audio-card,codec {
+                       sound-dai = <&codec>;
+               };
+       };
 };
 
 &pinctrl {
@@ -68,11 +90,6 @@
 			ralink,function = "gpio";
 		};
 
-		i2s {
-			ralink,group = "i2s";
-			ralink,function = "gpio";
-		};
-
 		spis {
 			ralink,group = "spis";
 			ralink,function = "gpio";
@@ -142,6 +159,23 @@
 
 &i2c {
 	status = "okay";
+
+       codec: wm8960@1a {
+               #sound-dai-cells = <0>;
+               compatible = "wlf,wm8960";
+               reg = <0x1a>;
+
+               wlf,shared-lrclk;
+       };
+};
+
+&gdma { status = "okay"; };
+
+&i2s {
+	#sound-dai-cells = <0>;
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s_pins>;
 };
 
 &uart1 {
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index d0c66a0e23..b2fd2b7675 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -98,7 +98,7 @@ define Device/LinkIt7688
   IMAGE_SIZE := $(ralink_default_fw_size_32M)
   SUPPORTED_DEVICES := linkits7688 linkits7688d
   DEVICE_TITLE := MediaTek LinkIt Smart 7688
-  DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci uboot-envtools
+  DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci uboot-envtools kmod-sound-mt7620
 endef
 TARGET_DEVICES += LinkIt7688

Build go to your buildpath and type

make menuconfig

and select sound/alsa-utils as well as the alsa-utils-tests, save and build. After flashing the image you can use

alsamixer

with key “m”, “left-” and “right arrow” keys of your keyboard to navigate through the awesome software mixer of alsa where you have to set: Be careful! High volumes can damage your ears.

  • Headphone (if you use external Amplifier or headphone via 3.5mm jack outlet) = choose volume
  • Speaker (About -10dB is a good test volume) = choose volume
  • Speaker AC = 0
  • Speaker DC = 0
  • Left Mixer Output PCM = unmute
  • Right Mixer Output PCM = unmute

Then try to play with alsa-utils-test like this in the terminal of the device:

speaker-test -t wav -c 2

You then should hear a woman speaking “Left”, “Right” ongoing until you abort with CTRL-c.

If you want to mix an external signal over the aux input try to higher the input 2 volumes in $alsamixer. (untested)

Try playing a .wav file with:

aplay <path/filename.wav>
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2024/02/12 08:58
  • by 127.0.0.1