OSDN Git Service

arm64: dts: mediatek: cherry: Enable support for the SPI NOR flash
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Mon, 4 Jul 2022 10:13:20 +0000 (12:13 +0200)
committerMatthias Brugger <matthias.bgg@gmail.com>
Thu, 7 Jul 2022 14:41:20 +0000 (16:41 +0200)
This platform has a SPI NOR: enable support for it, completing the
storage compartment enablement for the entire platform.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-11-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi

index c07d3ac..2c8b760 100644 (file)
        regulator-always-on;
 };
 
+&nor_flash {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&nor_pins_default>;
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <52000000>;
+               spi-rx-bus-width = <2>;
+               spi-tx-bus-width = <2>;
+       };
+};
+
 &pio {
        mediatek,rsel-resistance-in-si-unit;
        pinctrl-names = "default";
                };
        };
 
+       nor_pins_default: nor-default-pins {
+               pins-ck-io {
+                       pinmux = <PINMUX_GPIO142__FUNC_SPINOR_IO0>,
+                                <PINMUX_GPIO141__FUNC_SPINOR_CK>,
+                                <PINMUX_GPIO143__FUNC_SPINOR_IO1>;
+                       drive-strength = <6>;
+                       bias-pull-down;
+               };
+
+               pins-cs {
+                       pinmux = <PINMUX_GPIO140__FUNC_SPINOR_CS>;
+                       drive-strength = <6>;
+                       bias-pull-up;
+               };
+       };
+
        pio_default: pio-default-pins {
                pins-wifi-enable {
                        pinmux = <PINMUX_GPIO58__FUNC_GPIO58>;