1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Add again RUTX12 & RUTX50 support, add first not working tests for 6.6 kernel

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-09-29 17:05:03 +02:00
parent a93d9cba68
commit 1b0ce17ee5
11 changed files with 2137 additions and 4 deletions

View file

@ -0,0 +1,27 @@
#include "qcom-ipq4018-rutx.dtsi"
/ {
io_expander = "shiftreg_1";
soc {
ext_io {
compatible = "spi-gpio";
#address-cells = <1>;
#size-cells = <0>;
gpio-sck = <&tlmm 1 GPIO_ACTIVE_HIGH>; // SRCLK
gpio-mosi = <&tlmm 3 GPIO_ACTIVE_HIGH>; // SER
cs-gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>; // RCLK
num-chipselects = <1>;
shift_io: shift_io@0 {
compatible = "fairchild,74hc595";
reg = <0>;
gpio-controller;
#gpio-cells = <2>;
registers-number = <3>;
spi-max-frequency = <10000000>;
};
};
};
};

View file

@ -0,0 +1,55 @@
#include "qcom-ipq4018-rutx.dtsi"
/ {
io_expander = "stm32";
soc {
pinctrl@1000000 {
i2c_0_pins: i2c_0_pinmux {
mux {
pins = "gpio58", "gpio59";
function = "blsp_i2c0";
bias-disable;
};
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
gpio_out {
gpio-export,name = "gpio_out";
gpio-export,output = <0>;
gpio-export,direction_may_change = <0>;
gpios = <&stm32_io 23 GPIO_ACTIVE_HIGH>;
};
gpio_in {
gpio-export,name = "gpio_in";
gpio-export,input = <0>;
gpio-export,direction_may_change = <0>;
gpios = <&stm32_io 24 GPIO_ACTIVE_LOW>;
};
};
};
};
&blsp1_i2c3 {
status = "okay";
pinctrl-0 = <&i2c_0_pins>;
pinctrl-names = "default";
clock-frequency = <400000>;
stm32_io: stm32@74 {
compatible = "tlt,stm32v1";
#gpio-cells = <2>;
#interrupt-cells = <2>;
gpio-controller;
interrupt-controller;
interrupt-parent = <&tlmm>;
interrupts = <5 2>;
reg = <0x74>;
};
};

View file

@ -0,0 +1,324 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq4019.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/soc/qcom,tcsr.h>
/ {
memory {
device_type = "memory";
reg = <0x80000000 0x10000000>;
};
aliases {
serial0 = &blsp1_uart1;
};
chosen {
stdout-path = "serial0:115200n8";
};
soc {
tcsr@1949000 {
compatible = "qcom,tcsr";
reg = <0x1949000 0x100>;
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
};
tcsr@194b000 {
status = "okay";
compatible = "qcom,tcsr";
reg = <0x194b000 0x100>;
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
};
ess_tcsr@1953000 {
compatible = "qcom,tcsr";
reg = <0x1953000 0x1000>;
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
};
tcsr@1957000 {
compatible = "qcom,tcsr";
reg = <0x1957000 0x100>;
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&tlmm 4 1>;
linux,code = <KEY_RESTART>;
};
};
};
};
&prng {
status = "okay";
};
&watchdog {
status = "okay";
};
&cryptobam {
status = "okay";
};
&crypto {
status = "okay";
};
&tlmm {
serial_pins: serial_pinmux {
mux {
pins = "gpio60", "gpio61";
function = "blsp_uart0";
bias-disable;
};
};
spi_0_pins: spi_0_pinmux {
pinmux {
function = "blsp_spi0";
pins = "gpio55", "gpio56", "gpio57";
};
pinmux_cs {
function = "gpio";
pins = "gpio54";
};
pinconf {
pins = "gpio55", "gpio56", "gpio57";
drive-strength = <12>;
bias-disable;
};
pinconf_cs {
pins = "gpio54";
drive-strength = <2>;
bias-disable;
output-high;
};
};
mdio_pins: mdio_pinmux {
mux_1 {
pins = "gpio53";
function = "mdio";
bias-pull-up;
};
mux_2 {
pins = "gpio52";
function = "mdc";
bias-pull-up;
};
};
i2c_0_pins: i2c_0_pinmux {
mux {
pins = "gpio58", "gpio59";
function = "blsp_i2c0";
bias-disable;
};
};
};
&blsp_dma {
status = "okay";
};
&blsp1_uart1 {
pinctrl-0 = <&serial_pins>;
pinctrl-names = "default";
status = "okay";
};
&blsp1_spi1 {
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
cs-gpios = <&tlmm 54 0>, <&tlmm 63 0>;
num-cs = <2>;
status = "okay";
xt25f128b@0 {
/*
* Factory U-boot looks in 0:BOOTCONFIG partition for active
* partitions settings and mangles the partition config so
* 0:QSEE/0:QSEE_1, 0:CDT/0:CDT_1 and 0:APPSBL/0:APPSBL_1 pairs
* can be swaped. It isn't a problem but we never can be sure where
* OFW put factory images. "n25q128a11" is required for proper nor
* recognition in u-boot.
*/
compatible = "jedec,spi-nor", "n25q128a11";
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
spi-max-frequency = <24000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "0:SBL1";
reg = <0x0 0x40000>;
read-only;
};
partition@40000 {
label = "0:MIBIB";
reg = <0x40000 0x20000>;
read-only;
};
partition@60000 {
label = "0:BOOTCONFIG";
reg = <0x60000 0x20000>;
read-only;
};
partition@80000 {
label = "0:BOOTCONFIG1";
reg = <0x80000 0x20000>;
read-only;
};
partition@a0000 {
label = "0:QSEE";
reg = <0xa0000 0x60000>;
read-only;
};
partition@100000 {
label = "0:QSEE_1";
reg = <0x100000 0x60000>;
read-only;
};
partition@160000 {
label = "0:CDT";
reg = <0x160000 0x10000>;
read-only;
};
partition@170000 {
label = "0:CDT_1";
reg = <0x170000 0x10000>;
read-only;
};
partition@180000 {
label = "0:DDRPARAMS";
reg = <0x180000 0x10000>;
read-only;
};
partition@190000 {
label = "0:APPSBLENV";
reg = <0x190000 0x10000>;
read-only;
};
partition@1a0000 {
label = "0:APPSBL";
reg = <0x1a0000 0xa0000>;
read-only;
};
partition@240000 {
label = "0:APPSBL_1";
reg = <0x240000 0xa0000>;
read-only;
};
partition@2e0000 {
label = "0:ART";
reg = <0x2e0000 0x10000>;
read-only;
};
config: partition@2f0000 {
label = "0:CONFIG";
reg = <0x2f0000 0x10000>;
read-only;
};
partition@300000 {
label = "0:CONFIG_RW";
reg = <0x300000 0x10000>;
read-only;
};
partition@310000 {
label = "0:EVENTSLOG";
reg = <0x310000 0x90000>;
read-only;
};
};
};
xt26g02a@1 {
/*
* Factory U-boot looks in 0:BOOTCONFIG partition for active
* partitions settings and mangles the partition config so
* rootfs/rootfs_1 pairs can be swaped.
* It isn't a problem but we never can be sure where OFW put
* factory images. "spinand,mt29f" value is required for proper
* nand recognition in u-boot.
*/
compatible = "spi-nand", "spinand,mt29f";
#address-cells = <1>;
#size-cells = <1>;
reg = <1>;
spi-max-frequency = <24000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "rootfs_1";
reg = <0x00000000 0x08000000>;
};
partition@8000000 {
label = "rootfs";
reg = <0x08000000 0x08000000>;
};
};
};
};
&mdio {
status = "okay";
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 62 0>;
};
&usb3_ss_phy {
status = "okay";
};
&usb3_hs_phy {
status = "okay";
};
&usb3 {
status = "okay";
};
&usb2_hs_phy {
status = "okay";
};
&usb2 {
status = "okay";
};

View file

@ -0,0 +1,55 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq4018-rutx-shiftreg.dtsi"
/ {
model = "Teltonika RUTX10";
compatible = "teltonika,rutx10";
soc {
leds {
compatible = "gpio-leds";
wifi2g {
label = "green:wifi2g";
gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
wifi5g {
label = "green:wifi5g";
gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy1tpt";
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
gpio_out {
gpio-export,name = "gpio_out";
gpio-export,output = <0>;
gpio-export,direction_may_change = <0>;
gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>;
};
gpio_in {
gpio-export,name = "gpio_in";
gpio-export,input = <0>;
gpio-export,direction_may_change = <0>;
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
};
};
};
};
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "Teltonika-RUTX10";
};
&wifi1 {
status = "okay";
qcom,ath10k-calibration-variant = "Teltonika-RUTX10";
};

View file

@ -0,0 +1,55 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq4018-rutx-stm32.dtsi"
/ {
model = "Teltonika RUTX10";
compatible = "teltonika,rutx10";
soc {
leds {
compatible = "gpio-leds";
wifi2g {
label = "green:wifi2g";
gpios = <&stm32_io 19 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
wifi5g {
label = "green:wifi5g";
gpios = <&stm32_io 18 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy1tpt";
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
gpio_out {
gpio-export,name = "gpio_out";
gpio-export,output = <0>;
gpio-export,direction_may_change = <0>;
gpios = <&stm32_io 23 GPIO_ACTIVE_HIGH>;
};
gpio_in {
gpio-export,name = "gpio_in";
gpio-export,input = <0>;
gpio-export,direction_may_change = <0>;
gpios = <&stm32_io 24 GPIO_ACTIVE_LOW>;
};
};
};
};
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "Teltonika-RUTX10";
};
&wifi1 {
status = "okay";
qcom,ath10k-calibration-variant = "Teltonika-RUTX10";
};

View file

@ -0,0 +1,148 @@
#include "qcom-ipq4018-rutx-shiftreg.dtsi"
/ {
model = "RUTX12";
soc {
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
gpio_modem_reset {
gpio-export,name = "modem_reset";
gpio-export,output = <0>;
gpios = <&shift_io 16 GPIO_ACTIVE_HIGH>;
};
gpio_modem_power {
gpio-export,name = "modem_power";
gpio-export,output = <0>;
gpios = <&shift_io 17 GPIO_ACTIVE_HIGH>;
};
gpio_modem2_reset {
gpio-export,name = "modem2_reset";
gpio-export,output = <0>;
gpios = <&shift_io 18 GPIO_ACTIVE_HIGH>;
};
gpio_modem2_power {
gpio-export,name = "modem2_power";
gpio-export,output = <0>;
gpios = <&shift_io 19 GPIO_ACTIVE_HIGH>;
};
gpio_out_1 {
gpio-export,name = "gpio23";
gpio-export,output = <0>;
gpios = <&shift_io 20 GPIO_ACTIVE_HIGH>;
};
gpio_in_1 {
gpio-export,name = "gpio24";
gpio-export,input = <0>;
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
};
};
leds {
compatible = "gpio-leds";
led_wan_sim1 {
label = "wan_sim_1";
gpios = <&shift_io 14 GPIO_ACTIVE_HIGH>;
};
led_wan_sim2 {
label = "wan_sim_2";
gpios = <&shift_io 15 GPIO_ACTIVE_HIGH>;
};
led_wan_eth {
label = "wan_eth_3";
gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>;
};
led_wan_wifi {
label = "wan_wifi_4";
gpios = <&shift_io 7 GPIO_ACTIVE_HIGH>;
};
led_gen_2 {
label = "mob_gen_2";
gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>;
};
led_gen_3 {
label = "mob_gen_3";
gpios = <&shift_io 4 GPIO_ACTIVE_HIGH>;
};
led_gen_4 {
label = "mob_gen_4";
gpios = <&shift_io 3 GPIO_ACTIVE_HIGH>;
};
led2_gen_2 {
label = "mob2_gen_2";
gpios = <&shift_io 11 GPIO_ACTIVE_HIGH>;
};
led2_gen_3 {
label = "mob2_gen_3";
gpios = <&shift_io 12 GPIO_ACTIVE_HIGH>;
};
led2_gen_4 {
label = "mob2_gen_4";
gpios = <&shift_io 13 GPIO_ACTIVE_HIGH>;
};
led_ssid_1 {
label = "mob_ssid_1";
gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led_ssid_3 {
label = "mob_ssid_3";
gpios = <&shift_io 1 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led_ssid_5 {
label = "mob_ssid_5";
gpios = <&shift_io 2 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led2_ssid_1 {
label = "mob2_ssid_1";
gpios = <&shift_io 8 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led2_ssid_3 {
label = "mob2_ssid_3";
gpios = <&shift_io 9 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led2_ssid_5 {
label = "mob2_ssid_5";
gpios = <&shift_io 10 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led_wifi_24 {
label = "wifi_gen_2";
gpios = <&shift_io 22 GPIO_ACTIVE_HIGH>;
};
led_wifi_50 {
label = "wifi_gen_5";
gpios = <&shift_io 23 GPIO_ACTIVE_HIGH>;
};
};
};
};

View file

@ -0,0 +1,150 @@
#include "qcom-ipq4018-rutx-stm32.dtsi"
/ {
model = "RUTX12 STM32";
soc {
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
gpio_modem_reset {
gpio-export,name = "modem_reset";
gpio-export,output = <0>;
gpios = <&stm32_io 21 GPIO_ACTIVE_HIGH>;
};
gpio_modem_power {
gpio-export,name = "modem_power";
gpio-export,output = <0>;
gpios = <&stm32_io 20 GPIO_ACTIVE_HIGH>;
};
gpio_modem2_reset {
gpio-export,name = "modem2_reset";
gpio-export,output = <0>;
gpios = <&stm32_io 13 GPIO_ACTIVE_HIGH>;
};
gpio_modem2_power {
gpio-export,name = "modem2_power";
gpio-export,output = <0>;
gpios = <&stm32_io 14 GPIO_ACTIVE_HIGH>;
};
gpio_out_1 {
gpio-export,name = "gpio23";
gpio-export,output = <0>;
gpio-export,direction_may_change;
gpios = <&stm32_io 23 GPIO_ACTIVE_HIGH>;
};
gpio_in_1 {
gpio-export,name = "gpio24";
gpio-export,input = <0>;
gpio-export,direction_may_change;
gpios = <&stm32_io 24 GPIO_ACTIVE_LOW>;
};
};
leds {
compatible = "gpio-leds";
led_wan_sim1 {
label = "wan_sim_1";
gpios = <&stm32_io 0 GPIO_ACTIVE_HIGH>;
};
led_wan_sim2 {
label = "wan_sim_2";
gpios = <&stm32_io 1 GPIO_ACTIVE_HIGH>;
};
led_wan_eth {
label = "wan_eth_3";
gpios = <&stm32_io 3 GPIO_ACTIVE_HIGH>;
};
led_wan_wifi {
label = "wan_wifi_4";
gpios = <&stm32_io 2 GPIO_ACTIVE_HIGH>;
};
led_gen_2 {
label = "mob_gen_2";
gpios = <&stm32_io 4 GPIO_ACTIVE_HIGH>;
};
led_gen_3 {
label = "mob_gen_3";
gpios = <&stm32_io 5 GPIO_ACTIVE_HIGH>;
};
led_gen_4 {
label = "mob_gen_4";
gpios = <&stm32_io 6 GPIO_ACTIVE_HIGH>;
};
led2_gen_2 {
label = "mob2_gen_2";
gpios = <&stm32_io 32 GPIO_ACTIVE_HIGH>;
};
led2_gen_3 {
label = "mob2_gen_3";
gpios = <&stm32_io 33 GPIO_ACTIVE_HIGH>;
};
led2_gen_4 {
label = "mob2_gen_4";
gpios = <&stm32_io 34 GPIO_ACTIVE_HIGH>;
};
led_ssid_1 {
label = "mob_ssid_1";
gpios = <&stm32_io 7 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led_ssid_3 {
label = "mob_ssid_3";
gpios = <&stm32_io 9 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led_ssid_5 {
label = "mob_ssid_5";
gpios = <&stm32_io 11 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led2_ssid_1 {
label = "mob2_ssid_1";
gpios = <&stm32_io 31 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led2_ssid_3 {
label = "mob2_ssid_3";
gpios = <&stm32_io 30 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led2_ssid_5 {
label = "mob2_ssid_5";
gpios = <&stm32_io 29 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
led_wifi_24 {
label = "wifi_gen_2";
gpios = <&stm32_io 19 GPIO_ACTIVE_HIGH>;
};
led_wifi_50 {
label = "wifi_gen_5";
gpios = <&stm32_io 18 GPIO_ACTIVE_HIGH>;
};
};
};
};

File diff suppressed because it is too large Load diff