From: Simon Falsig <simon@newtec.dk>
To: u-boot@lists.denx.de
Subject: [U-Boot] Adding support for SPI-attached MR25H256 MRAM with Device Tree
Date: Fri, 20 Nov 2015 14:43:40 +0100 [thread overview]
Message-ID: <4a6a900e66a73d4f9779585e37163c6d@mail.gmail.com> (raw)
I have a custom board based on a TI AM3356 processor (quite similar to
a BeagleBone) with an Everspin MR25H256 MRAM attached to the SPI bus,
currently using U-Boot 2015.10 to boot a 3.18.9-rt5 Linux kernel.
I'd like to use this MRAM to store the MAC address for one of the
Ethernet interfaces, but I'm having a bit of trouble getting started
on how support for this should be added.
I can access the MRAM just fine from Linux (using the m25p80 driver
and the MTD framework), so with the appropriate drivers compiled into
the kernel, Linux picks the chip up without any issue by simply adding
the following to the device tree:
mram: m25p80 at 0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "mr25h256";
reg = <0>;
spi-max-frequency = <40000000>;
status = "okay";
};
I'd like U-Boot to do something similar, but there are a few issues:
1. The chip is not JEDEC compatible, so it cannot be probed like
the other chips currently listed in drivers/mtd/spi/sf_params.c
2. Since it's an MRAM, it doesn't need to be erased before being
written - Linux has a flag for this, but it doesn't seem as if
U-Boot has anything similar. (Not that I need this currently
though, as I only need to be able to read the chip for now - but
it'd be nice to have, and others might be able to use it too.)
I've tried having a look at doc/driver-model/spi-howto.txt, hoping
that this would have up-to-date information on how to implement/modify
a SPI driver, but when I for instance look at spi_setup_slave_fdt(),
which seems to be one of the necessary functions, I can only find it
implemented in drivers/spi/spi-uclass.c, with a comment saying that
it is only for compatibility, and that it is to be removed?...
If anyone can help me with a few hints on how to get started adding
support for this chip, it'd be much appreciated!
Thanks in advance and best regards,
Simon Falsig
simon at newtec.dk
next reply other threads:[~2015-11-20 13:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 13:43 Simon Falsig [this message]
2015-11-21 12:23 ` [U-Boot] Adding support for SPI-attached MR25H256 MRAM with Device Tree Jagan Teki
2015-11-24 9:29 ` Simon Falsig
2016-02-15 9:38 ` Jagan Teki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4a6a900e66a73d4f9779585e37163c6d@mail.gmail.com \
--to=simon@newtec.dk \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox