Page MenuHomeFreeBSD

[dev/cfi] add support for flashes with different bus-vs-device address width
AcceptedPublic

Authored by mizhka on Mar 18 2016, 4:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 27 2024, 10:26 AM
Unknown Object (File)
Feb 27 2024, 10:13 AM
Unknown Object (File)
Feb 22 2024, 4:01 AM
Unknown Object (File)
Jan 11 2024, 2:53 PM
Unknown Object (File)
Jan 10 2024, 6:53 PM
Unknown Object (File)
Dec 22 2023, 10:01 PM
Unknown Object (File)
Nov 7 2023, 8:11 AM
Unknown Object (File)
Oct 23 2023, 1:55 PM

Details

Reviewers
ray
imp
adrian
Summary

The target of this fix is CFI-compatible Macronix MX29GL @ Asus RT-N16 wifi router. This board has 16bit parallel flash and 8bit bus. To enable query mode, we need to use bus_space_write_1 (8bit) to write to location 55x2 (16bit).

This patch adds bus width parameter and way to auto-identify it. It uses this parameter for query mode requests.

It works for me, but I don't have any other CFI devices to test it. I'll appreciate if somebody can test it.

Test Plan
  1. Apply patch, build cfi driver
  2. Try to probe&attach.

Expected result: driver has been attached.

Tested on Macronix MX29GL chip / ASUS RT-N16.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mizhka retitled this revision from to [dev/cfi] only one byte should be written to enable/disable query mode.
mizhka updated this object.
mizhka edited the test plan for this revision. (Show Details)
mizhka set the repository for this revision to rS FreeBSD src repository - subversion.

I'm afraid JEDEC CFI standard do not allow simple omit of upper byte(s), you have to try bus and chip data width and get temporary configuration, til required data read from chip.

mizhka retitled this revision from [dev/cfi] only one byte should be written to enable/disable query mode to [dev/cfi] add support for flashes with different bus-vs-device address width.
mizhka updated this object.
mizhka edited the test plan for this revision. (Show Details)
mizhka edited edge metadata.
mizhka added a subscriber: landon_landonf.org.
  • new sc_buswidth parameter to softc
  • scan of configuration for new sc_buswidth parameter

It works for me, but I don't have any other CFI devices to test it. I'll appreciate if somebody can test it.

It's still another Broadcom SoC, but I tested against a previously working WGT634U (BCM4716) and saw no regressions.

It'd be nice to get this committed so we can support RT-N16's CFI out of the box.

adrian edited edge metadata.

i'm okay with this, but let's get imp's feedback.

This revision is now accepted and ready to land.Feb 15 2017, 4:05 AM

i'm okay with this, but let's get imp's feedback.