brcm63xx: probe SPI flash through DT
[openwrt/openwrt.git] / target / linux / brcm63xx / dts / a4001n1.dts
index d45210f56dd58fa5217c6ed4e1fa05c123f07a41..8e206866f6baa9666150e4fa9c242c2d3941a716 100644 (file)
@@ -1,11 +1,17 @@
 /dts-v1/;
 
-/include/ "bcm6328.dtsi"
+#include "bcm6328.dtsi"
+
+#include <dt-bindings/input/input.h>
 
 / {
        model = "ADB P.DG A4001N1";
        compatible = "adb,a4001n1", "brcm,bcm6328";
 
+       chosen {
+               bootargs = "root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
                reset {
                        label = "reset";
                        gpios = <&gpio0 23 1>;
-                       linux,code = <0x198>;
+                       linux,code = <KEY_RESTART>;
                };
                wps {
                        label = "wlan";
                        gpios = <&gpio0 24 1>;
-                       linux,code = <0xee>;
+                       linux,code = <KEY_WLAN>;
                };
        };
 
                        label = "A4001N1:green:ppp";
                        gpios = <&gpio0 3 1>;
                };
-               power_red {
-                       label = "A4001N1:red:power";
+               power_green {
+                       label = "A4001N1:green:power";
                        gpios = <&gpio0 4 1>;
+                       default-state = "on";
                };
                ppp_red {
                        label = "A4001N1:red:ppp";
                        label = "A4001N1:red:3g";
                        gpios = <&gpio0 7 1>;
                };
-               power_green {
-                       label = "A4001N1:green:power";
+               power_red {
+                       label = "A4001N1:red:power";
                        gpios = <&gpio0 8 1>;
-                       default-state = "on";
                };
                wlan_green {
                        label = "A4001N1:green:wlan";
                };
        };
 };
+
+&hsspi {
+       status = "ok";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               spi-max-frequency = <16666667>;
+               spi-tx-bus-width = <2>;
+               spi-rx-bus-width = <2>;
+               reg = <0>;
+
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               linux,part-probe = "bcm63xxpart";
+
+               cfe@0 {
+                       reg = <0x000000 0x010000>;
+                       label = "cfe";
+                       read-only;
+               };
+
+               linux@10000 {
+                       reg = <0x010000 0xfe0000>;
+                       label = "linux";
+               };
+
+               nvram@ff0000 {
+                       reg = <0xff0000 0x010000>;
+                       label = "nvram";
+               };
+       };
+};