Commit Graph

12 Commits (6ba58b7b020c4b793e6fb7a43c8adef070579d8d)

Author SHA1 Message Date
Anton Arapov 6ba58b7b02 ramips: cleanup the RB750Gr3 support
Always enable the pwr led and use the usr led for boot status indication.

Rename nodes in the dts, to match what is recommend in the devicetree
specification.

Increase the maximum spi frequency to 20MHz and drop the m25p,chunked-io
which isn't required on mt7621.

Use the BTN_0 keycode for the mode button. This board doesn't have any
wireless.

Use a more descriptive label for the reset button and the GPIO enabling
the usb vcc supply.

Use the beeper kernel module for the buzzer.

Fix the pinmux to switch only pins used as GPIOs to the GPIO function.
Add support for the PoE enable GPIO to the userspace. The PoE power
status can be read via GPIO7. Since OpenWrt doesn't have support for
reading inputs from userspace, prepare only the pinmux for the GPIO.

Signed-off-by: Anton Arapov <arapov@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Anton Arapov 52f2d7d2a9 ramips: add RB750Gr3 native support
This patch adds support of MikroTik RouterBOARD 750Gr3, without the need
to reflashing the bootloader.

Installation through RouterBoot follows the usual MikroTik method
https://openwrt.org/toh/mikrotik/common

Since the image isn't compatible with RouterBOARD 750Gr3 installations
which have replaced the bootloader, the former used userspace boardname
is not added to the SUPPORTED_DEVICES, to prevent a brick while trying
to upgrade to the image with native support.

Signed-off-by: Anton Arapov <arapov@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
INAGAKI Hiroshi d70ec3008d ramips: specify "firmware" partition format
Specify firmware partition format by compatible string.

formats in ramips:

- denx,uimage
- tplink,firmware
- seama

It's unlikely but the firmware splitting might not work any longer for
the following boards, due to a custom header:

- EX2700: two uImage headers
- BR-6478AC-V2: edimax-header
- 3G-6200N: edimax-header
- 3G-6200NL: edimax-header
- BR-6475ND: edimax-header
- TEW-638APB-V2: umedia-header
- RT-N56U: mkrtn56uimg

But it rather looks like the uImage splitter is fine with the extra
header.

The following dts are not touched, due to lack of a compatible string in
the matching firmware splitter submodule:

- CONFIG_MTD_SPLIT_JIMAGE_FW
    DWR-116-A1.dts
    DWR-118-A2.dts
    DWR-512-B.dts
    DWR-921-C1.dts
    LR-25G001.dts
- CONFIG_MTD_SPLIT_TRX_FW
    WCR-1166DS.dts
    WSR-1166.dts
- CONFIG_MTD_SPLIT_MINOR_FW
    RBM11G.dts
    RBM33G.dts
- CONFIG_MTD_SPLIT_LZMA_FW
    AR670W.dts
- CONFIG_MTD_SPLIT_WRGG_FW
    DAP-1522-A1.dts

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Mathias Kresin 8f4dfadd5a ramips: add support for indicating the boot state using multiple leds
Use diag.sh version used for other targets supporting different leds
for the different boot states.

The existing led sequences should be the same as before.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Alex Maclean 6031ab345d ramips: move partitions into partition table node
Starting with kernel 4.4, the use of partitions as direct subnodes of the
mtd device is discouraged and only supported for backward compatiblity
reasons.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years ago
Mathias Kresin bfd65fc4ab ramips: fix whitespace and comment issues in dts
Fix space vs. tabs issue and trainling whitespaces. Use C style
comments or drop the comments if they explain what is already to see in
the devicetree parameters.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 53624c1702 ramips: fix dtc warnings
Fix individual boards dtc warnings or obvious mistakes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Chuanhong Guo c9c4b2116c ramips: Use dts alias based status led
Also fix several typos in led node name.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
L. D. Pinney 45dbd65850 ramips: mt7621: add compatible strings
Add compatible strings to all mt7621 based device tree source files to
fix formal issues.

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
7 years ago
Andrew Yong 07b571a435 ramips: RB750Gr3: Add pwr LED and buzzer to DTS
use pwr LED in diag.sh
Expose unused pinmux pins as GPIOs
export power LED and buzzer pins
Use rb750gr3:blue:pwr LED in diag.sh for boot status instead of rb750gr3:green:usr

Signed-off-by: Andrew Yong <me@ndoo.sg>
8 years ago
Mathias Kresin f1d0eba3ea ramips: cleanup dts files of mt7621 based boards
Fix a typo in mt7621.dtsi compatible string. Disable spi, sdhci and pci
in mt7621.dtsi and enable the nodes in the indiviual board dts files.
The nodes require further device specific configuration anyway.

Remove the m25p80@0 spi child node from mt7621.dtsi and add the
chunked-io parameter to the individual board dts files. Fix the spi
flash compatible string for the WNDR3700V5.

Drop the mt7621-eval-board compatible string for all boards which are
not the eval board.

Drop the linux,modalias parameter from spi flash node.

Remove the xhci node from board files, it is already enabled in dtsi.
Disable xhci for boards not having usb ports populated.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Andrew Yong faf94d926e ramips: add support for MikroTik hEX v3 (RB750Gr3)
The MikroTik hEX v3 (RB750Gr3) is a MT7621AT board which is similar to most MT7621 reference designs, it can be easily supported by this patch; however, the stock RouterBOOT bootloader has to be replaced by a MT7621 SDK U-Boot such as https://github.com/ndoo/RB750Gr3-U-Boot - U-Boot configured for the RB750Gr3 (16MiB SPI flash, 256MiB DDR3 RAM at 1200MHz).

RouterBOOT, the stock bootloader, does not initialize the UART and boots silently, making it preferable to replace it with a MT7621 SDK U-Boot with UART (57600 8N1) that supports HTTP, TFTP or serial upload of sysupgrade firmware and U-Boot.

Furthermore, RouterOS, the stock firmware, is contained in a proprietary modification of SquashFS without GPL sources; UART is also disabled in stock firmware.

The combination of LEDE firmware generated by this PR and MT7621 SDK U-Boot expects the printed MAC address to reside at offset `0xe000` of the factory partition (absolute offset is `0x4e000`); this is similar to the factory MAC address offset for several other MT7621 devices.

A 16MiB flash dump suitable for use with flashrom will be provided if/once this patch is accepted and binaries are built by LEDE buildbot. Alternatively, writing the U-Boot to the SPI flash starting at 0x0 offset and booting the board with serial console attached will allow TFTP, HTTP or serial upload of sysupgrade firmware.

Signed-off-by: Andrew Yong <me@ndoo.sg>
8 years ago