Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Add spiflash support in GENERIC



details:   https://anonhg.NetBSD.org/src/rev/1d49ad4830e7
branches:  trunk
changeset: 454111:1d49ad4830e7
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Sep 05 16:15:57 2019 +0000

description:
Add spiflash support in GENERIC
Add a dts enabling spi0 and attaching the SPI flash for newer lime2-emmc
boards.

diffstat:

 sys/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc-spi.dts |  24 +++++++++++++++++
 sys/arch/evbarm/conf/GENERIC                            |   7 ++++-
 2 files changed, 30 insertions(+), 1 deletions(-)

diffs (57 lines):

diff -r a1de66d69dc4 -r 1d49ad4830e7 sys/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc-spi.dts
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc-spi.dts   Thu Sep 05 16:15:57 2019 +0000
@@ -0,0 +1,24 @@
+#include "sun7i-a20-olinuxino-lime2-emmc.dts"
+
+&pio {
+       spi0_pc_pins: spi0-pc-pins {
+               pins = "PC0", "PC1", "PC2";
+               function = "spi0";
+       };
+
+                                                                                       spi0_cs0_pc_pin: spi0-cs0-pc-pin {
+               pins = "PC23";
+               function = "spi0";
+       };
+};
+
+&spi0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi0_pc_pins>, <&spi0_cs0_pc_pin>;
+       status = "okay";
+       spiflash {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               status = "okay";
+       };
+};
diff -r a1de66d69dc4 -r 1d49ad4830e7 sys/arch/evbarm/conf/GENERIC
--- a/sys/arch/evbarm/conf/GENERIC      Thu Sep 05 15:48:13 2019 +0000
+++ b/sys/arch/evbarm/conf/GENERIC      Thu Sep 05 16:15:57 2019 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: GENERIC,v 1.51 2019/08/14 15:08:53 skrll Exp $
+#      $NetBSD: GENERIC,v 1.52 2019/09/05 16:15:57 bouyer Exp $
 #
 #      GENERIC ARM (aarch32) kernel
 #
@@ -96,6 +96,7 @@
        sun7i-a20-olimex-som204-evb-emmc.dts
        sun7i-a20-olimex-som204-evb.dts
        sun7i-a20-olinuxino-lime.dts
+       sun7i-a20-olinuxino-lime2-emmc-spi.dts
        sun7i-a20-olinuxino-lime2-emmc.dts
        sun7i-a20-olinuxino-lime2.dts
        sun7i-a20-olinuxino-micro-emmc.dts
@@ -643,6 +644,10 @@
 ses*           at scsibus? target ? lun ?      # SCSI SES/SAF-TE devices
 uk*            at scsibus? target ? lun ?      # unknown SCSI
 
+# SPI NOR flash support
+m25p* at spi?
+spiflash* at spiflashbus?
+
 include "dev/usb/usbdevices.config"
 midi*          at midibus?
 



Home | Main Index | Thread Index | Old Index