b8050b359252dc0031dfca61f5882f242fcae643
[openwrt/staging/jow.git] / target / linux / mediatek / patches-5.15 / 131-dts-mt7622-add-snand-support.patch
1 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
2 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
3 @@ -561,6 +561,20 @@
4 status = "disabled";
5 };
6
7 + snand: snfi@1100d000 {
8 + compatible = "mediatek,mt7622-snand";
9 + reg = <0 0x1100d000 0 0x1000>, <0 0x1100e000 0 0x1000>;
10 + reg-names = "nfi", "ecc";
11 + interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
12 + clocks = <&pericfg CLK_PERI_NFI_PD>,
13 + <&pericfg CLK_PERI_SNFI_PD>,
14 + <&pericfg CLK_PERI_NFIECC_PD>;
15 + clock-names = "nfi_clk", "pad_clk", "ecc_clk";
16 + #address-cells = <1>;
17 + #size-cells = <0>;
18 + status = "disabled";
19 + };
20 +
21 nor_flash: spi@11014000 {
22 compatible = "mediatek,mt7622-nor",
23 "mediatek,mt8173-nor";
24 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
25 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
26 @@ -539,6 +539,55 @@
27 status = "disabled";
28 };
29
30 +&snand {
31 + mediatek,quad-spi;
32 + pinctrl-names = "default";
33 + pinctrl-0 = <&serial_nand_pins>;
34 + status = "okay";
35 +
36 + partitions {
37 + compatible = "fixed-partitions";
38 + #address-cells = <1>;
39 + #size-cells = <1>;
40 +
41 + partition@0 {
42 + label = "Preloader";
43 + reg = <0x00000 0x0080000>;
44 + read-only;
45 + };
46 +
47 + partition@80000 {
48 + label = "ATF";
49 + reg = <0x80000 0x0040000>;
50 + };
51 +
52 + partition@c0000 {
53 + label = "Bootloader";
54 + reg = <0xc0000 0x0080000>;
55 + };
56 +
57 + partition@140000 {
58 + label = "Config";
59 + reg = <0x140000 0x0080000>;
60 + };
61 +
62 + partition@1c0000 {
63 + label = "Factory";
64 + reg = <0x1c0000 0x0100000>;
65 + };
66 +
67 + partition@200000 {
68 + label = "firmware";
69 + reg = <0x2c0000 0x2000000>;
70 + };
71 +
72 + partition@2200000 {
73 + label = "User_data";
74 + reg = <0x22c0000 0x4000000>;
75 + };
76 + };
77 +};
78 +
79 &spi0 {
80 pinctrl-names = "default";
81 pinctrl-0 = <&spic0_pins>;