From: Daniel Golle Date: Wed, 19 Apr 2023 19:15:53 +0000 (+0100) Subject: arm64: dts: mt7622: declare SPI-NAND present on BPI-R64 X-Git-Tag: v6.6.17~4534^2~9^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=d278f43f25beedfd0cb784d1dd0a9e7e8c8f123f;p=platform%2Fkernel%2Flinux-rpi.git arm64: dts: mt7622: declare SPI-NAND present on BPI-R64 The SPI-NOR node in the device tree of the BananaPi R64 has most likely been copied from the reference board's device tree even though the R64 comes with an SPI-NAND chip rather than SPI-NOR. Setup the Serial NAND Flash Interface (SNFI) controller, enable hardware BCH error detection and correction engine and add the SPI-NAND chip including basic partitions, Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/ZEA96dmaXqTpk8u8@makrotopia.org Signed-off-by: Matthias Brugger --- diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts index af3fe61..a333590 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -248,14 +248,42 @@ status = "disabled"; }; -&nor_flash { - pinctrl-names = "default"; - pinctrl-0 = <&spi_nor_pins>; - status = "disabled"; +&bch { + status = "okay"; +}; +&snfi { + pinctrl-names = "default"; + pinctrl-0 = <&serial_nand_pins>; + status = "okay"; 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@80000 { + label = "fip"; + reg = <0x80000 0x200000>; + read-only; + }; + + ubi: partition@280000 { + label = "ubi"; + reg = <0x280000 0x7d80000>; + }; + }; }; };