mediatek: fix mt7622-rfb1 board support
[openwrt/staging/dedeckeh.git] / target / linux / mediatek / patches-5.4 / 0308-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 @@ -554,6 +554,19 @@
4 status = "disabled";
5 };
6
7 + snfi: spi@1100d000 {
8 + compatible = "mediatek,mt7622-snfi";
9 + reg = <0 0x1100d000 0 0x1000>;
10 + interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
11 + clocks = <&pericfg CLK_PERI_NFI_PD>,
12 + <&pericfg CLK_PERI_SNFI_PD>;
13 + clock-names = "nfi_clk", "spi_clk";
14 + ecc-engine = <&bch>;
15 + #address-cells = <1>;
16 + #size-cells = <0>;
17 + status = "disabled";
18 + };
19 +
20 nor_flash: spi@11014000 {
21 compatible = "mediatek,mt7622-nor",
22 "mediatek,mt8173-nor";
23 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
24 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
25 @@ -101,7 +101,7 @@
26 };
27
28 &bch {
29 - status = "disabled";
30 + status = "okay";
31 };
32
33 &btif {
34 @@ -553,6 +553,62 @@
35 status = "disable";
36 };
37
38 +&snfi {
39 + pinctrl-names = "default";
40 + pinctrl-0 = <&serial_nand_pins>;
41 + status = "okay";
42 +
43 + spi_nand@0 {
44 + #address-cells = <1>;
45 + #size-cells = <1>;
46 + compatible = "spi-nand";
47 + spi-max-frequency = <104000000>;
48 + reg = <0>;
49 +
50 + partitions {
51 + compatible = "fixed-partitions";
52 + #address-cells = <1>;
53 + #size-cells = <1>;
54 +
55 + partition@0 {
56 + label = "Preloader";
57 + reg = <0x00000 0x0080000>;
58 + read-only;
59 + };
60 +
61 + partition@80000 {
62 + label = "ATF";
63 + reg = <0x80000 0x0040000>;
64 + };
65 +
66 + partition@c0000 {
67 + label = "Bootloader";
68 + reg = <0xc0000 0x0080000>;
69 + };
70 +
71 + partition@140000 {
72 + label = "Config";
73 + reg = <0x140000 0x0080000>;
74 + };
75 +
76 + partition@1c0000 {
77 + label = "Factory";
78 + reg = <0x1c0000 0x0040000>;
79 + };
80 +
81 + partition@200000 {
82 + label = "firmware";
83 + reg = <0x200000 0x2000000>;
84 + };
85 +
86 + partition@2200000 {
87 + label = "User_data";
88 + reg = <0x2200000 0x4000000>;
89 + };
90 + };
91 + };
92 +};
93 +
94 &spi0 {
95 pinctrl-names = "default";
96 pinctrl-0 = <&spic0_pins>;