mediatek: add CMCC RAX3000M support
[openwrt/staging/nbd.git] / target / linux / mediatek / dts / mt7981b-cmcc-rax3000m-nand.dtso
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4 /plugin/;
5
6 / {
7 compatible = "cmcc,rax3000m", "mediatek,mt7981";
8
9 fragment@0 {
10 target = <&gmac0>;
11 __overlay__ {
12 nvmem-cells = <&macaddr_factory_2a 0>;
13 nvmem-cell-names = "mac-address";
14 };
15 };
16
17 fragment@1 {
18 target = <&gmac1>;
19 __overlay__ {
20 nvmem-cells = <&macaddr_factory_24 0>;
21 nvmem-cell-names = "mac-address";
22 };
23 };
24
25 fragment@2 {
26 target = <&pio>;
27 __overlay__ {
28 spi0_flash_pins: spi0-pins {
29 mux {
30 function = "spi";
31 groups = "spi0", "spi0_wp_hold";
32 };
33
34 conf-pu {
35 pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
36 drive-strength = <8>;
37 mediatek,pull-up-adv = <0>; /* bias-disable */
38 };
39
40 conf-pd {
41 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
42 drive-strength = <8>;
43 mediatek,pull-up-adv = <0>; /* bias-disable */
44 };
45 };
46 };
47 };
48
49 fragment@3 {
50 target = <&spi0>;
51 __overlay__ {
52 pinctrl-names = "default";
53 pinctrl-0 = <&spi0_flash_pins>;
54 status = "okay";
55
56 spi_nand@0 {
57 compatible = "spi-nand";
58 #address-cells = <1>;
59 #size-cells = <1>;
60 reg = <0>;
61
62 spi-max-frequency = <52000000>;
63 spi-tx-bus-width = <4>;
64 spi-rx-bus-width = <4>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "bl2";
73 reg = <0x00000 0x0100000>;
74 read-only;
75 };
76
77 partition@100000 {
78 label = "u-boot-env";
79 reg = <0x100000 0x80000>;
80 };
81
82 factory: partition@180000 {
83 label = "factory";
84 reg = <0x180000 0x200000>;
85 read-only;
86
87 compatible = "nvmem-cells";
88 nvmem-layout {
89 compatible = "fixed-layout";
90 #address-cells = <1>;
91 #size-cells = <1>;
92
93 macaddr_factory_24: macaddr@24 {
94 compatible = "mac-base";
95 reg = <0x24 0x6>;
96 #nvmem-cell-cells = <1>;
97 };
98
99 macaddr_factory_2a: macaddr@2a {
100 compatible = "mac-base";
101 reg = <0x2a 0x6>;
102 #nvmem-cell-cells = <1>;
103 };
104 };
105 };
106
107 partition@380000 {
108 label = "fip";
109 reg = <0x380000 0x200000>;
110 read-only;
111 };
112
113 partition@580000 {
114 label = "ubi";
115 reg = <0x580000 0x7200000>;
116 };
117 };
118 };
119 };
120 };
121
122 fragment@4 {
123 target = <&wifi>;
124 __overlay__ {
125 mediatek,mtd-eeprom = <&factory 0x0>;
126 };
127 };
128 };