ath79: use dynamic partitioning for TP-Link CPE series
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_tplink_cpe.dtsi
index 044f6c5c1962b149c13343459866055c538f9f32..fd6aa0f08bef73b9557728c96547e0a91e205464 100644 (file)
@@ -1,9 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include "ar9344.dtsi"
+
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
-
-#include "ar9344.dtsi"
+#include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
        aliases {
        clock-frequency = <40000000>;
 };
 
-&uart {
-       status = "okay";
-};
-
 &spi {
        status = "okay";
 
-       num-cs = <1>;
-
        flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                        partition@40000 {
                                label = "firmware";
                                reg = <0x040000 0x780000>;
-
-                               compatible = "fixed-partitions";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-
-                               partition@0 {
-                                       label = "kernel";
-                                       reg = <0x000000 0x300000>;
-                               };
-
-                               partition@300000 {
-                                       label = "rootfs";
-                                       reg = <0x300000 0x480000>;
-                               };
+                               compatible = "openwrt,uimage", "denx,uimage";
+                               openwrt,ih-magic = <IH_MAGIC_OKLI>;
+                               openwrt,offset = <0x3000>;
                        };
 
                        partition@7c0000 {
 &eth1 {
        status = "okay";
 };
+
+&gpio {
+       gpio_ext_lna0 {
+               gpio-hog;
+               gpios = <18 GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "tp-link:ext:lna0";
+       };
+
+       gpio_ext_lna1 {
+               gpio-hog;
+               gpios = <19 GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "tp-link:ext:lna1";
+       };
+};