mikrotik
[openwrt/staging/blogic.git] / target / linux / ath79 / dts / ar7161_mikrotik_rb450g.dts
diff --git a/target/linux/ath79/dts/ar7161_mikrotik_rb450g.dts b/target/linux/ath79/dts/ar7161_mikrotik_rb450g.dts
new file mode 100644 (file)
index 0000000..80262a4
--- /dev/null
@@ -0,0 +1,126 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "ar7100.dtsi"
+
+/ {
+       compatible = "mikrotik,rb450g", "qca,ar7161";
+       model = "MikroTik RouterBOARD 450G";
+
+/*     aliases {
+               led-boot = &orange_power;
+               led-failsafe = &orange_power;
+               led-running = &blue_power;
+               led-upgrade = &orange_power;
+       };*/
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+       };
+
+       extosc: ref {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-output-names = "ref";
+               clock-frequency = <40000000>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               yellow_user {
+                       label = "rb4xx:yellow:user";
+                       gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+               };
+       };
+
+       keys {
+               compatible = "gpio-keys-polled";
+               poll-interval = <20>;
+
+               reset {
+                       label = "reset";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+               };
+       };
+};
+
+&uart {
+       status = "okay";
+};
+
+&pll {
+       clocks = <&extosc>;
+};
+
+&spi {
+       compatible = "mikrotik,rb4xx-spi";
+       status = "okay";
+       num-cs = <1>;
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <25000000>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "routerboot";
+                               reg = <0x000000 0x00b000>;
+                               read-only;
+                       };
+
+                       partition@b000 {
+                               label = "board_config";
+                               reg = <0x00b000 0x001000>;
+                               read-only;
+                       };
+
+                       partition@c000 {
+                               label = "bios";
+                               reg = <0x00d000 0x002000>;
+                       };
+
+                       partition@f000 {
+                               label = "soft_config";
+                               reg = <0x000f000 0x001000>;
+                               read-only;
+                       };
+               };
+       };
+};
+
+&eth0 {
+       status = "okay";
+       pll-data = <0x11110000 0x00001099 0x00991099>;
+
+       fixed-link {
+               speed = <1000>;
+               full-duplex;
+       };
+};
+
+&mdio0 {
+       status = "okay";
+
+       phy4: ethernet-phy@4 {
+               reg = <4>;
+               phy-mode = "rgmii";
+       };
+};
+
+&eth1 {
+       status = "okay";
+       pll-data = <0x11110000 0x00001099 0x00991099>;
+
+       phy-handle = <&phy4>;
+};