Changes between Version 7 and Version 8 of SPI


Ignore:
Timestamp:
06/22/2018 10:04:13 PM (6 years ago)
Author:
Tim Harvey
Comment:

fixed dts example

Legend:

Unmodified
Added
Removed
Modified
  • SPI

    v7 v8  
    6262An example device-tree child node for a m25p32-vme6g nor flash device would be:
    6363{{{#!c
    64 flash: m25p80@0 {                         /* "m25p80@0" parameter is the driver responsible for controlling your device */
    65         compatible = "m25p32";            /* "m25p32" parameter is your device ID string */
    66         spi-max-frequency = <30000000>;   /* assigned value is your device frequency specified by its datasheet (in decimal) */
    67         reg = <0>;                        /* is generally 0 for single device connections */
    68         #device-width = <1>;              /* These next three lines are not comments, but rather specially formatted
    69         #address-cells = <1>;              * attributes that the driver will receive. The actual values assigned here
    70         #size-cells = <1>;                 * are device specific, and should be entered after consulting the data sheet
    71                                            */
    72         partition@0 {                     /* The label of the 0th partition; following partitions follow the "partition@X" format */
    73                 label = "data";           /* The name of this partition  */
    74                 reg = <0x0 0x2000000>;    /* The starting address, followed by the length of the partition (in hex) */
     64flash: m25p80@0 {
     65        /* "m25p32" is your device ID string */
     66        compatible = "m25p32";
     67        /* device frequency (in MHz) */
     68        spi-max-frequency = <30000000>;
     69        /* Chip Select */
     70        reg = <0>;
     71        /* see dts documentation for your device */
     72        #device-width = <1>;
     73        #address-cells = <1>;
     74        #size-cells = <1>;
     75        partition@0 {
     76           /* The name of this partition  */
     77           label = "data";
     78            /* starting address and length */
     79           reg = <0x0 0x2000000>;
    7580        };
    7681};