From 0a79c77a4e9d33d352974874a8860c7412e49bd5 Mon Sep 17 00:00:00 2001 From: Andrey Butirsky Date: Thu, 8 Sep 2022 01:19:35 +0300 Subject: ramips: add support for Kroks Rt-Pot mXw DS RSIM router Aka "Kroks KNdRt31R19". Ported from v19.07.8 of OpenWrt fork: see https://github.com/kroks-free/openwrt for support of other models. Device specs: - CPU: MediaTek MT7628AN - Flash: 16MB SPI NOR - RAM: 64MB - Bootloader: U-Boot - Ethernet: 1x 10/100 Mbps - 2.4 GHz: b/g/n SoC - mPCIe: 1x (usually equipped with an LTE modem by vendor) - Buttons: reset - LEDs: 1x Modem, 1x Injector, 1x Wi-Fi, 1x Status Flashing: - sysupgrade image via stock firmware WEB interface. - U-Boot launches a WEB server if Reset button is held during power up. Server IP: 192.168.1.1 SIM card switching: The device supports up to 4 SIM cards - 2 locally on board and 2 on remote SIM-injector. By default, 1-st local SIM is active. To switch to e.g. 1-st remote SIM: echo 0 > /sys/class/gpio/modem1power/value echo 0 > /sys/class/gpio/modem1sim1/value echo 1 > /sys/class/gpio/modem1rsim1/value echo 1 > /sys/class/gpio/modem1power/value MAC addresses as verified by OEM firmware: vendor OpenWrt source LAN eth0 factory 0x4 (label) 2g wlan0 label Signed-off-by: Kroks [butirsky@gmail.com: port to master; drop dts-v1] Signed-off-by: Andrey Butirsky --- target/linux/ramips/dts/mt7628an_kroks.dtsi | 116 ++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 target/linux/ramips/dts/mt7628an_kroks.dtsi (limited to 'target/linux/ramips/dts/mt7628an_kroks.dtsi') diff --git a/target/linux/ramips/dts/mt7628an_kroks.dtsi b/target/linux/ramips/dts/mt7628an_kroks.dtsi new file mode 100644 index 0000000000..dc1eee9cca --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_kroks.dtsi @@ -0,0 +1,116 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7628an.dtsi" + +#include +#include + +/ { + aliases { + led-boot = &led_status; + led-failsafe = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + serial1 = &uart1; + }; + + leds { + compatible = "gpio-leds"; + + led_status: status { + label = "led:status"; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + }; + + wifi { + label = "led:wifi"; + gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 38 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + m25p,fast-read; + + partitions: partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&state_default { + gpio_reset { + groups = "wdt"; + function = "gpio"; + }; + + p0led_an { + groups = "p0led_an"; + function = "p0led_an"; + }; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&wmac { + status = "okay"; + + mediatek,mtd-eeprom = <&factory 0x0000>; +}; + +&uart1 { + status = "okay"; +}; -- cgit v1.2.3