ramips: move partitions into partition table node
[openwrt/openwrt.git] / target / linux / ramips / dts / K2P.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "phicomm,k2p", "mediatek,mt7621-soc";
10 model = "Phicomm K2P";
11
12 aliases {
13 led-status = &led_blue;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x8000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600";
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 stat_r {
29 label = "k2p:red:status";
30 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
31 };
32
33 stat_y {
34 label = "k2p:yellow:status";
35 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
36 };
37
38 led_blue: stat_b {
39 label = "k2p:blue:status";
40 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 gpio-keys-polled {
45 compatible = "gpio-keys-polled";
46 poll-interval = <20>;
47
48 reset {
49 label = "reset";
50 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54 };
55
56 &spi0 {
57 status = "okay";
58
59 m25p80@0 {
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <10000000>;
63 m25p,chunked-io = <32>;
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "u-boot";
72 reg = <0x0 0x30000>;
73 read-only;
74 };
75
76 partition@30000 {
77 label = "u-boot-env";
78 reg = <0x30000 0x10000>;
79 read-only;
80 };
81
82 factory: partition@40000 {
83 label = "factory";
84 reg = <0x40000 0x10000>;
85 read-only;
86 };
87
88 partition@50000 {
89 label = "permanent_config";
90 reg = <0x50000 0x50000>;
91 read-only;
92 };
93
94 partition@a0000 {
95 label = "firmware";
96 reg = <0xa0000 0xf60000>;
97 };
98 };
99 };
100 };
101
102 &pcie {
103 status = "okay";
104 };
105
106 &pcie0 {
107 mt76@0,0 {
108 reg = <0x0000 0 0 0 0>;
109 mediatek,mtd-eeprom = <&factory 0x0>;
110 };
111 };
112
113 &ethernet {
114 mtd-mac-address = <&factory 0xe006>;
115 };
116
117 &pinctrl {
118 state_default: pinctrl0 {
119 gpio {
120 ralink,group = "i2c", "jtag";
121 ralink,function = "gpio";
122 };
123 };
124 };