<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtk-20170518/target/linux/ramips, branch v18.06.0</title>
<subtitle>MTK 20170518 : Mediatek SDK based on OpenWRT Barrier Breaker</subtitle>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/'/>
<entry>
<title>ramips: clean up and fix MT7621 NAND driver issues</title>
<updated>2018-07-13T15:01:41+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2018-07-11T18:56:42+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=dd1f97b37d41f4d7b85cce31546bc64962ffeab7'/>
<id>dd1f97b37d41f4d7b85cce31546bc64962ffeab7</id>
<content type='text'>
- remove misaligned custom buffer allocation in the NAND driver
- remove broken bounce buffer implementation for 16-byte align

Let the MTD core take care of both

Fixes messages like these:
[  102.820541] Data buffer not 16 bytes aligned: 87daf08c

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- remove misaligned custom buffer allocation in the NAND driver
- remove broken bounce buffer implementation for 16-byte align

Let the MTD core take care of both

Fixes messages like these:
[  102.820541] Data buffer not 16 bytes aligned: 87daf08c

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ramips: ethernet: use own page_frag_cache</title>
<updated>2018-07-13T14:39:49+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2018-07-12T15:19:07+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=16a9ddfe64e2dc80328c3b7ac81d5d87a7da9233'/>
<id>16a9ddfe64e2dc80328c3b7ac81d5d87a7da9233</id>
<content type='text'>
Using the NAPI or netdev frag cache along with other drivers can lead to
32 KiB pages being held for a long time, despite only being used for
very few page fragment.
This can happen if the ethernet driver grabs one or two fragments for rx
ring refill, while other drivers use (and free up) the remaining
fragments. The 32 KiB higher-order page can only be freed once all users
have freed their fragments, which only happens after the rings of all
drivers holding the fragments have wrapped around.

Depending on the traffic patterns, this can waste a lot of memory and
look a lot like a memory leak

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using the NAPI or netdev frag cache along with other drivers can lead to
32 KiB pages being held for a long time, despite only being used for
very few page fragment.
This can happen if the ethernet driver grabs one or two fragments for rx
ring refill, while other drivers use (and free up) the remaining
fragments. The 32 KiB higher-order page can only be freed once all users
have freed their fragments, which only happens after the rings of all
drivers holding the fragments have wrapped around.

Depending on the traffic patterns, this can waste a lot of memory and
look a lot like a memory leak

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ramips: ethernet: use skb_free_frag to free fragments</title>
<updated>2018-07-13T14:39:46+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2018-07-12T15:18:37+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=0e6cfb6919149267202c6dbaf9e5aab3ab6d6b1d'/>
<id>0e6cfb6919149267202c6dbaf9e5aab3ab6d6b1d</id>
<content type='text'>
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ramips: TP-Link TL-WR902AC v3: add missing wps button</title>
<updated>2018-07-12T16:27:36+00:00</updated>
<author>
<name>Peter Lundkvist</name>
<email>peter.lundkvist@gmail.com</email>
</author>
<published>2018-07-09T10:54:18+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=2f306873efbef159a5f5a8a922ef4c8da775464b'/>
<id>2f306873efbef159a5f5a8a922ef4c8da775464b</id>
<content type='text'>
Signed-off-by: Peter Lundkvist &lt;peter.lundkvist@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Peter Lundkvist &lt;peter.lundkvist@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ramips: TP-Link TL-WR902AC v3: don't build factory image</title>
<updated>2018-07-12T16:27:36+00:00</updated>
<author>
<name>Peter Lundkvist</name>
<email>peter.lundkvist@gmail.com</email>
</author>
<published>2018-07-09T10:54:17+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=36a4681b2bef90bc1f445204c7a76f5af091b1b2'/>
<id>36a4681b2bef90bc1f445204c7a76f5af091b1b2</id>
<content type='text'>
The line that produces factory image was accidentally left by me while
testing before inital commit.

I came to the conclusion that flashing from OEM firmware does not work
(seems to share this behavior with other tplinks based on mt7628).

I have not done any further analysis, as I was unable to open the
case and attach a serial port (too much glue). Maybe i will try once
more.

So the way to do initial flashing (or un-bricking) is to use the
tftp-recover image. It is possible to revert to OEM firmware with tftp
recovery; in this case the first 512 bytes the image file need to be
cut off.

Signed-off-by: Peter Lundkvist &lt;peter.lundkvist@gmail.com&gt;
[add explaination provided via mail as commit message]
Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The line that produces factory image was accidentally left by me while
testing before inital commit.

I came to the conclusion that flashing from OEM firmware does not work
(seems to share this behavior with other tplinks based on mt7628).

I have not done any further analysis, as I was unable to open the
case and attach a serial port (too much glue). Maybe i will try once
more.

So the way to do initial flashing (or un-bricking) is to use the
tftp-recover image. It is possible to revert to OEM firmware with tftp
recovery; in this case the first 512 bytes the image file need to be
cut off.

Signed-off-by: Peter Lundkvist &lt;peter.lundkvist@gmail.com&gt;
[add explaination provided via mail as commit message]
Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ramips: limit dictionary size for lzma compression</title>
<updated>2018-07-03T09:20:37+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2018-06-19T08:06:50+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=5505ab5c947b10a2ce3997f2747420ea9ea103ca'/>
<id>5505ab5c947b10a2ce3997f2747420ea9ea103ca</id>
<content type='text'>
In some cases, recent builds fail to boot from flash with at least some
MT7621 based devices. The error message is:
"LZMA ERROR 1 - must RESET board to recover"
Booting the same kernel via TFTP works for some reason.

Through testing I figured out that limiting the LZMA dictionary size
seems to prevent these errors

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases, recent builds fail to boot from flash with at least some
MT7621 based devices. The error message is:
"LZMA ERROR 1 - must RESET board to recover"
Booting the same kernel via TFTP works for some reason.

Through testing I figured out that limiting the LZMA dictionary size
seems to prevent these errors

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ramips: move mt7620n i2c_pins definition to right place</title>
<updated>2018-06-27T21:48:32+00:00</updated>
<author>
<name>Andrey Jr. Melnikov</name>
<email>temnota.am@gmail.com</email>
</author>
<published>2018-06-27T17:32:23+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=1961cdfb57c647530fc3b5729e1b5569e6fa98b0'/>
<id>1961cdfb57c647530fc3b5729e1b5569e6fa98b0</id>
<content type='text'>
Move to i2c pins pinmux node to the pinctrl node.

Fixes: a0685deec458 ("ramips: Add i2c support for mt7620n")

Signed-off-by: Andrey Jr. Melnikov &lt;temnota.am@gmail.com&gt;
[fix commit message]
Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move to i2c pins pinmux node to the pinctrl node.

Fixes: a0685deec458 ("ramips: Add i2c support for mt7620n")

Signed-off-by: Andrey Jr. Melnikov &lt;temnota.am@gmail.com&gt;
[fix commit message]
Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ramips: add switch port index for I-O DATA WN-GX300GR</title>
<updated>2018-06-27T06:41:13+00:00</updated>
<author>
<name>INAGAKI Hiroshi</name>
<email>musashino.open@gmail.com</email>
</author>
<published>2018-06-27T05:51:25+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=7775802eb9bc9bbabc0eeaddb4d7ecdf68f88947'/>
<id>7775802eb9bc9bbabc0eeaddb4d7ecdf68f88947</id>
<content type='text'>
WN-GX300GR has 5x RJ45 ports (port 0-4), and these ports are
orderd on the device as follows:
4 3 2 1 0

1-4: lan
0: wan

Signed-off-by: INAGAKI Hiroshi &lt;musashino.open@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
WN-GX300GR has 5x RJ45 ports (port 0-4), and these ports are
orderd on the device as follows:
4 3 2 1 0

1-4: lan
0: wan

Signed-off-by: INAGAKI Hiroshi &lt;musashino.open@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ramips: Add support for Phicomm K2G</title>
<updated>2018-06-21T20:01:33+00:00</updated>
<author>
<name>Chuanhong Guo</name>
<email>gch981213@gmail.com</email>
</author>
<published>2018-06-20T16:56:38+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=7950e1b9f47417bcd4b80e4361dfc6dccb000ba7'/>
<id>7950e1b9f47417bcd4b80e4361dfc6dccb000ba7</id>
<content type='text'>
Specification:
- SoC: MediaTek MT7620A
- Flash: 8 MB
- RAM: 64 MB
- Ethernet: 4 FE ports and 1 GE port (RTL8211F on port 5)
- Wireless radio: MT7620 for 2.4G and MT7612E for 5G, both equipped with external PA.
- UART: 1 x UART on PCB - 57600 8N1

Flash instruction:
The U-boot is based on Ralink SDK so we can flash the firmware using UART:
1. Configure PC with a static IP address and setup an TFTP server.
2. Put the firmware into the tftp directory.
3. Connect the UART line as described on the PCB.
4. Power up the device and press 2, follow the instruction to
   set device and tftp server IP address and input the firmware
   file name. U-boot will then load the firmware and write it into
   the flash.

Signed-off-by: Chuanhong Guo &lt;gch981213@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Specification:
- SoC: MediaTek MT7620A
- Flash: 8 MB
- RAM: 64 MB
- Ethernet: 4 FE ports and 1 GE port (RTL8211F on port 5)
- Wireless radio: MT7620 for 2.4G and MT7612E for 5G, both equipped with external PA.
- UART: 1 x UART on PCB - 57600 8N1

Flash instruction:
The U-boot is based on Ralink SDK so we can flash the firmware using UART:
1. Configure PC with a static IP address and setup an TFTP server.
2. Put the firmware into the tftp directory.
3. Connect the UART line as described on the PCB.
4. Power up the device and press 2, follow the instruction to
   set device and tftp server IP address and input the firmware
   file name. U-boot will then load the firmware and write it into
   the flash.

Signed-off-by: Chuanhong Guo &lt;gch981213@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ramips: Add support for Mikrotik RouterBOARD RBM33g</title>
<updated>2018-06-21T04:55:10+00:00</updated>
<author>
<name>Tobias Schramm</name>
<email>tobleminer@gmail.com</email>
</author>
<published>2018-05-04T01:47:23+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=1863c386432b4a968547988c8c0538059cb80491'/>
<id>1863c386432b4a968547988c8c0538059cb80491</id>
<content type='text'>
This commit adds support for the Mikrotik RouterBOARD RBM33g.

=Hardware=

The RBM33g is a mt7621 based device featuring three gigabit ports, 2
miniPCIe slots with sim card sockets, 1 M.2 slot, 1 USB 3.0 port and a male
onboard RS-232 serial port. Additionally there are a lot of accessible
GPIO ports and additional buses like i2c, mdio, spi and uart.

==Switch==

The three Ethernet ports are all connected to the internal switch of the
mt7621 SoC:

port 0: Ethernet Port next to barrel jack with PoE printed on it
port 1: Innermost Ethernet Port on opposite side of RS-232 port
port 2: Outermost Ethernet Port on opposite side of RS-232 port
port 6: CPU

==Flash==

The device has two spi flash chips. The first flash chips is rather small
(512 kB), connected to CS0 by default and contains only the RouterBOOT
bootloader and some factory information (e.g. mac address).
The second chip has a size of 16 MB, is by default connected to CS1 and
contains the firmware image.

==PCIe==

The board features three PCIe-enabled slots. Two of them are miniPCIe
slots (PCIe0, PCIe1) and one is a M.2 (Key M) slot (PCIe2).
Each of the miniPCIe slots is connected to a dedicated mini SIM socket
on the back of the board.

Power to all three PCIe-enabled slots is controlled via GPIOs on the
mt7621 SoC:

PCIe0: GPIO9
PCIe1: GPIO10
PCIe2: GPIO11

==USB==

The board has one external USB 3.0 port at the rear. Additionally PCIe
port 0 has a permanently enabled USB interface. PCIe slot 1 shares its
USB interface with the rear USB port. Thus only either the rear USB port
or the USB interface of PCIe slot 1 can be active at the same time. The
jumper next to the rear USB port controls which one is active:

open: USB on PCIe 1 is active
closed: USB on rear USB port is active

==Power==

The board can accept both, passive PoE and external power via a 2.1 mm
barrel jack. The input voltage range is 11-32 V.

=Installation=

==Prerequisites==

A USB -&gt; RS-232 Adapter and a null modem cable are required for
installation.

To install an OpenWRT image to the device two components must be built:

1. A openwrt initramfs image
2. A openwrt sysupgrade image

===initramfs &amp; sysupgrade image===

Select target devices "Mikrotik RBM33G" in
openwrt menuconfig and build the images. This will create the images
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" and
"openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" in the output
directory.

==Installing==

**Make sure to back up your RouterOS license in case you do ever want to
go back to RouterOS using "/system license output" and back up the created
license file.**

Serial settings: 115200 8N1

The installation is a two-step process. First the
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" must be booted
via tftp:

1. Set up a dhcp server that points the bootfile to tftp server serving
   the "openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin"
   initramfs image
2. Connect to WAN port (left side, next to sys-LED and power indicator)
3. Connect to serial port of board
4. Power on board and enter RouterBOOT setup menu
5. Set boot device to "boot over ethernet"
6. Set boot protocol to "dhcp protocol" (can be omitted if DHCP server
   allows dynamic bootp)
6. Save config
7. Wait for board to boot via Ethernet

On the serial port you should now be presented with the OpenWRT boot log.
The next steps will install OpenWRT persistently.

1. Copy "openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" to the device
   using scp.
2. Write openwrt to flash using "sysupgrade
   openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin"

Once the flashing completes reboot the router and let it boot from flash.
It should boot straight to OpenWRT.

Signed-off-by: Tobias Schramm &lt;tobleminer@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds support for the Mikrotik RouterBOARD RBM33g.

=Hardware=

The RBM33g is a mt7621 based device featuring three gigabit ports, 2
miniPCIe slots with sim card sockets, 1 M.2 slot, 1 USB 3.0 port and a male
onboard RS-232 serial port. Additionally there are a lot of accessible
GPIO ports and additional buses like i2c, mdio, spi and uart.

==Switch==

The three Ethernet ports are all connected to the internal switch of the
mt7621 SoC:

port 0: Ethernet Port next to barrel jack with PoE printed on it
port 1: Innermost Ethernet Port on opposite side of RS-232 port
port 2: Outermost Ethernet Port on opposite side of RS-232 port
port 6: CPU

==Flash==

The device has two spi flash chips. The first flash chips is rather small
(512 kB), connected to CS0 by default and contains only the RouterBOOT
bootloader and some factory information (e.g. mac address).
The second chip has a size of 16 MB, is by default connected to CS1 and
contains the firmware image.

==PCIe==

The board features three PCIe-enabled slots. Two of them are miniPCIe
slots (PCIe0, PCIe1) and one is a M.2 (Key M) slot (PCIe2).
Each of the miniPCIe slots is connected to a dedicated mini SIM socket
on the back of the board.

Power to all three PCIe-enabled slots is controlled via GPIOs on the
mt7621 SoC:

PCIe0: GPIO9
PCIe1: GPIO10
PCIe2: GPIO11

==USB==

The board has one external USB 3.0 port at the rear. Additionally PCIe
port 0 has a permanently enabled USB interface. PCIe slot 1 shares its
USB interface with the rear USB port. Thus only either the rear USB port
or the USB interface of PCIe slot 1 can be active at the same time. The
jumper next to the rear USB port controls which one is active:

open: USB on PCIe 1 is active
closed: USB on rear USB port is active

==Power==

The board can accept both, passive PoE and external power via a 2.1 mm
barrel jack. The input voltage range is 11-32 V.

=Installation=

==Prerequisites==

A USB -&gt; RS-232 Adapter and a null modem cable are required for
installation.

To install an OpenWRT image to the device two components must be built:

1. A openwrt initramfs image
2. A openwrt sysupgrade image

===initramfs &amp; sysupgrade image===

Select target devices "Mikrotik RBM33G" in
openwrt menuconfig and build the images. This will create the images
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" and
"openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" in the output
directory.

==Installing==

**Make sure to back up your RouterOS license in case you do ever want to
go back to RouterOS using "/system license output" and back up the created
license file.**

Serial settings: 115200 8N1

The installation is a two-step process. First the
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" must be booted
via tftp:

1. Set up a dhcp server that points the bootfile to tftp server serving
   the "openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin"
   initramfs image
2. Connect to WAN port (left side, next to sys-LED and power indicator)
3. Connect to serial port of board
4. Power on board and enter RouterBOOT setup menu
5. Set boot device to "boot over ethernet"
6. Set boot protocol to "dhcp protocol" (can be omitted if DHCP server
   allows dynamic bootp)
6. Save config
7. Wait for board to boot via Ethernet

On the serial port you should now be presented with the OpenWRT boot log.
The next steps will install OpenWRT persistently.

1. Copy "openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" to the device
   using scp.
2. Write openwrt to flash using "sysupgrade
   openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin"

Once the flashing completes reboot the router and let it boot from flash.
It should boot straight to OpenWRT.

Signed-off-by: Tobias Schramm &lt;tobleminer@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
