--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9533_mikrotik_routerboard-16m.dtsi"
+
+/ {
+ compatible = "mikrotik,routerboard-map-2nd", "qca,qca9533";
+ model = "MikroTik RouterBOARD mAP-2nD (mAP)";
+
+ aliases {
+ led-boot = &led_user;
+ led-failsafe = &led_user;
+ led-running = &led_user;
+ led-upgrade = &led_user;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "green:power";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ eth_1 {
+ label = "green:eth_1";
+ gpios = <&gpio_ext 0 GPIO_ACTIVE_LOW>;
+ };
+
+ eth_2 {
+ label = "green:eth_2";
+ gpios = <&gpio_ext 1 GPIO_ACTIVE_LOW>;
+ };
+
+ poe_out {
+ label = "red:poe_out";
+ gpios = <&gpio_ext 2 GPIO_ACTIVE_LOW>;
+ };
+
+ led_user: user {
+ label = "green:user";
+ gpios = <&gpio_ext 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio_ext 4 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ ap_cap {
+ label = "green:ap_cap";
+ gpios = <&gpio_ext 6 GPIO_ACTIVE_LOW>;
+ };
+
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+
+ usb_power {
+ gpio-export,name = "usb-power";
+ gpio-export,output = <1>;
+ gpios = <&gpio_ext 5 GPIO_ACTIVE_LOW>;
+ };
+
+ enable_poe_port5 {
+ gpio-export,name = "enable-poe";
+ gpio-export,output = <0>;
+ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pin_spi_cs1>;
+
+ gpio_ext: gpio_ext@1 {
+ compatible = "fairchild,74hc595";
+ reg = <1>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ registers-number = <1>;
+ spi-max-frequency = <25000000>;
+ };
+};
+
+
+&pinmux {
+ pin_spi_cs1: pinmux_spi_cs1 {
+ pinctrl-single,bits = <0x8 0x0a000000 0xff000000>;
+ };
+};
+
+ð0 {
+ status = "okay";
+
+ phy-handle = <&swphy0>;
+
+ gmac-config {
+ device = <&gmac>;
+ switch-phy-swap = <1>;
+ };
+};
+
+&usb0 {
+ status = "okay";
+};
+
+&usb_phy {
+ status = "okay";
+};
mikrotik,routerboard-mapl-2nd)
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
;;
+mikrotik,routerboard-map-2nd)
+ ucidef_set_led_netdev "eth_1" "eth_1" "green:eth_1" "eth1"
+ ucidef_set_led_switch "eth_2" "eth_2" "green:eth_2" "switch0" "0x4"
+ ucidef_set_led_gpio "poe" "poe" "red:poe_out" "14" "0"
+ ;;
mikrotik,routerboard-wapr-2nd)
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "rssilow" "rssilow" "green:rssilow" "wlan0" "1" "100"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
;;
+ mikrotik,routerboard-map-2nd)
+ ucidef_set_interface_lan "eth0 eth1"
+ ;;
*)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
mikrotik,routerboard-912uag-2hpnd|\
mikrotik,routerboard-921gs-5hpacd-15s|\
mikrotik,routerboard-lhg-2nd|\
+ mikrotik,routerboard-map-2nd|\
mikrotik,routerboard-mapl-2nd|\
mikrotik,routerboard-sxt-5nd-r2|\
mikrotik,routerboard-wap-g-5hact2hnd|\
mikrotik,routerboard-wapr-2nd)
caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" +1)
;;
+ mikrotik,routerboard-map-2nd)
+ caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" 3)
+ ;;
mikrotik,routerboard-mapl-2nd|\
mikrotik,routerboard-wap-g-5hact2hnd)
caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" +2)