Bug 244146 - Unable to write to /dev/flash/spi0 on RockPro64
Summary: Unable to write to /dev/flash/spi0 on RockPro64
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm64 Any
: --- Affects Some People
Assignee: freebsd-arm mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-15 20:36 UTC by wcarson.bugzilla
Modified: 2020-02-15 20:37 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wcarson.bugzilla 2020-02-15 20:36:19 UTC
Overview

    Attempting to flash the SPI on the PINE RockPro64 results in an Input/Output error.

Steps to Reproduce

    1) dd if=/dev/zero of=/dev/flash/spi0

Actual Results

    dd reports an Input/Output error

Expected Results

    The data should be written to the SPI.

Build Date & Hardware

    Build 13.0-CURRENT r357939: Sat Feb 15 05:41:04 UTC 2020 on PINE RockPro64

Additional Information

    Here is the dmesg output describing the SPI:

spi0: <Rockchip SPI> mem 0xff1d0000-0xff1d0fff irq 31 on ofwbus0
spibus0: <OFW SPI bus> on spi0
spibus0: <unknown card> at cs 0 mode 0
ofwbus0: <spi@ff1e0000> mem 0xff1e0000-0xff1e0fff irq 32 disabled compat rockchip,rk3399-spi (no driver attached)
ofwbus0: <spi@ff1f0000> mem 0xff1f0000-0xff1f0fff irq 33 disabled compat rockchip,rk3399-spi (no driver attached)
ofwbus0: <spi@ff200000> mem 0xff200000-0xff200fff irq 34 disabled compat rockchip,rk3399-spi (no driver attached)
ofwbus0: <spi@ff350000> mem 0xff350000-0xff350fff irq 36 disabled compat rockchip,rk3399-spi (no driver attached)
mx25l0: <M25Pxx Flash Family> at cs 0 mode 0 on spibus0
GEOM: new disk flash/spi0

    And trying to write an image to the SPI:

root@rockpro64:~admin # dd if=/usr/home/admin/spi_combined.img of=/dev/flash/spi0
dd: /dev/flash/spi0: Input/output error
1+0 records in
0+0 records out
0 bytes transferred in 0.002803 secs (0 bytes/sec)

    Reading from the SPI seems to work, but returns all zeros. (This could be correct, since I've never been able to write to it.)

root@rockpro64:~admin # dd if=/dev/flash/spi0 of=./test
32768+0 records in
32768+0 records out
16777216 bytes transferred in 18.345143 secs (914532 bytes/sec)
root@rockpro64:~admin # hexdump ./test
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
1000000