diff options
author | Chuanhong Guo <gch981213@gmail.com> | 2022-04-07 10:16:47 +0800 |
---|---|---|
committer | Chuanhong Guo <gch981213@gmail.com> | 2022-04-28 18:06:00 +0800 |
commit | 68d5efaa10cf0689521fe05e386e3a1e11d8cb29 (patch) | |
tree | c6492319fa9cb6ef1694431c948b907be6fe2735 /target/linux/mediatek/patches-5.15/115-dts-bpi64-add-snand-support.patch | |
parent | 2138956bdc3145fac26d2ba8ac966f31d33cd290 (diff) | |
download | upstream-68d5efaa10cf0689521fe05e386e3a1e11d8cb29.tar.gz upstream-68d5efaa10cf0689521fe05e386e3a1e11d8cb29.tar.bz2 upstream-68d5efaa10cf0689521fe05e386e3a1e11d8cb29.zip |
mediatek: add an upstreamed spi-nand driver
This patch implements the spi-nand controller driver as an ECC-capable
spi-mem controller to use the upstream SPI-NAND driver.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/mediatek/patches-5.15/115-dts-bpi64-add-snand-support.patch')
-rw-r--r-- | target/linux/mediatek/patches-5.15/115-dts-bpi64-add-snand-support.patch | 59 |
1 files changed, 34 insertions, 25 deletions
diff --git a/target/linux/mediatek/patches-5.15/115-dts-bpi64-add-snand-support.patch b/target/linux/mediatek/patches-5.15/115-dts-bpi64-add-snand-support.patch index 39d81bd5d5..34539a5d10 100644 --- a/target/linux/mediatek/patches-5.15/115-dts-bpi64-add-snand-support.patch +++ b/target/linux/mediatek/patches-5.15/115-dts-bpi64-add-snand-support.patch @@ -1,40 +1,49 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts -@@ -259,14 +259,32 @@ +@@ -259,14 +259,42 @@ status = "disabled"; }; -&nor_flash { -+&snand { - pinctrl-names = "default"; +- pinctrl-names = "default"; - pinctrl-0 = <&spi_nor_pins>; - status = "disabled"; ++&bch { ++ status = "okay"; ++}; + ++&snfi { ++ pinctrl-names = "default"; + pinctrl-0 = <&serial_nand_pins>; -+ mediatek,quad-spi; + status = "okay"; -+ partitions { -+ compatible = "fixed-partitions"; -+ #address-cells = <1>; -+ #size-cells = <1>; + flash@0 { +- compatible = "jedec,spi-nor"; ++ compatible = "spi-nand"; + reg = <0>; ++ spi-tx-bus-width = <4>; ++ spi-rx-bus-width = <4>; ++ nand-ecc-engine = <&snfi>; ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; + -+ partition@0 { -+ label = "bl2"; -+ reg = <0x0 0x80000>; -+ read-only; -+ }; ++ partition@0 { ++ label = "bl2"; ++ reg = <0x0 0x80000>; ++ read-only; ++ }; + -+ partition@80000 { -+ label = "fip"; -+ reg = <0x80000 0x200000>; -+ read-only; -+ }; - -- flash@0 { -- compatible = "jedec,spi-nor"; -- reg = <0>; -+ partition@280000 { -+ label = "ubi"; -+ reg = <0x280000 0x7d80000>; ++ partition@80000 { ++ label = "fip"; ++ reg = <0x80000 0x200000>; ++ read-only; ++ }; ++ ++ partition@280000 { ++ label = "ubi"; ++ reg = <0x280000 0x7d80000>; ++ }; + }; }; }; |