4d2b01cb63e90ea14d0643e2212c7da587fcef30
[openwrt/staging/hauke.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 nvmem-layout {
88 compatible = "fixed-layout";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 macaddr_factory_24: macaddr@24 {
93 compatible = "mac-base";
94 reg = <0x24 0x6>;
95 #nvmem-cell-cells = <1>;
96 };
97
98 macaddr_factory_2a: macaddr@2a {
99 compatible = "mac-base";
100 reg = <0x2a 0x6>;
101 #nvmem-cell-cells = <1>;
102 };
103 };
104 };
105
106 partition@380000 {
107 label = "fip";
108 reg = <0x380000 0x200000>;
109 read-only;
110 };
111
112 partition@580000 {
113 label = "ubi";
114 reg = <0x580000 0x7200000>;
115 };
116 };
117 };
118 };
119 };
120
121 fragment@4 {
122 target = <&wifi>;
123 __overlay__ {
124 mediatek,mtd-eeprom = <&factory 0x0>;
125 };
126 };
127 };