GPMC设备树节点属性编写参考文档翻译

    阅读Linux内核目录下的设备树编写参考文档,为便于日后查阅,将内容进行了翻译,如下。在设备树文件中配置GPMC节点时需要根据各属性的含义配置参数。


    

1. 时序

    时序参见手册:
    《AM572x Sitara Processor Technical Reference Manual (Rev. K).pdf》   Page3572

  • 读操作-时序图
    read
  • 写操作-时序图
    write

2. 文档翻译

- 文档1

    board-support\linux-4.19.38+gitAUTOINC+4dae378bbe-g4dae378bbe\Documentation\devicetree\bindings\mtd\gpmc-nor.txt

翻译内容如下:

NOR Flash连接到TI GPMC的设备树绑定

连接TI GPMC的NOR Flash(可以在OMAP开发板上找到)作为GPMC控制器的子节点,命名为 “nor”.

所有与时序相关的属性以及通用的GPMC子属性都在另一个文件中解释,请参考:Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt

必要的属性(Required properties):

  • bank-width:   NOR Flash字节宽度。GPMC支持8位和16位设备,因此必须是1个或2个字节。
  • compatible:  参见文档Documentation/devicetree/bindings/mtd/mtd-physmap.txt
  • gpmc,cs-on-ns:  片选有效前的时间间隔 (从芯片手册的时序上看,CSONTIME是ADV拉高到CS拉低之间的时间段,是否应该理解成片选有效前的时间间隔)
  • gpmc,cs-rd-off-ns:  读操作时,片选无效前的时间间隔
  • gpmc,cs-wr-off-ns:  写操作时,片选无效前的时间间隔
  • gpmc,oe-on-ns:  读使能有效前的时间间隔
  • gpmc,oe-off-ns:  读使能无效前的时间间隔
  • gpmc,we-on-ns: 写使能有效前的时间间隔
  • gpmc,we-off-ns:  写使能无效前的时间间隔
  • gpmc,access-ns:  从开始循环到第一个数据捕获(读访问)
  • gpmc,rd-cycle-ns:  总的读操作循环时间
  • gpmc,wr-cycle-ns:  总的写操作循环时间
  • linux,mtd-name:  参见Documentation/devicetree/bindings/mtd/mtd-physmap.txt
  • reg:  Chip-select, base address (relative to chip-select) and size of NOR flash. Note that base address will be typically 0
    as this is the start of the chip-select.
    可选的属性(Optional properties):
  • gpmc,XXX   额外的GPMC时序和配置参数。参见Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
    可选的分区表属性解析:
  • #address-cells:  should be set to 1
  • #size-cells:  should be set to 1

- 文档2:

    文档:board-support\linux-4.19.38+gitAUTOINC+4dae378bbe-g4dae378bbe\Documentation\devicetree\bindings\memory-controllers\omap-gpmc.txt

翻译内容如下:

OMAP-GPMC设备树绑定

实际的设备是从GPMC节点的子结点实例化的。

必要的属性:

  • compatible:   应该设置为下列之一:
    ti,omap2420-gpmc (omap2420)
    ti,omap2430-gpmc (omap2430)
    ti,omap3430-gpmc (omap3430 & omap3630)
    ti,omap4430-gpmc (omap4430 & omap4460 & omap543x)
    ti,am3352-gpmc (am335x devices)
  • reg:   寄存器空间的一个源指示符
  • ti,hwmods:   应该设置为“tI,gpmc”直到DT发送结束
  • #address-cells:   必须设置为 2 用以允许内存地址转换
  • #size-cells:   必须设置为1用以允许内存映射
  • gpmc,num-cs:   控制器支持的最大片选数
  • gpmc,num-waitpins:   控制器支持的最大wait引脚数
  • ranges:   每一个片选必须设置成能够反映内存布局的4个整型数值:
    0
    目前,从每一个片选寄存器 GPMC_CONFIG7(由引导加载程序设置)推导的计算值被用于物理地址的解码。由于这些值在以后会被改变,必须填充正确的值。
  • interrupt-controller:   GPMC 驱动程序和中断控制器为实现NAND事件“fifoevent”和“termcount”在GPMC_WAIT引脚的上升/下降边沿触发添砖加瓦。
    中断号映射如下:
    0 – NAND_fifoevent
    1 - NAND_termcount
    2 - GPMC_WAIT0 pin edge
    3 - GPMC_WAIT1 pin edge, and so on.
  • interrupt-cells:   必须设置为2
  • gpio-controller:   GPMC驱动为GPMC WAIT引脚实现了一个GPIO控制器,该引脚可以被用作普通目的的输入。 0 映射到GPMC_WAIT0引脚。
  • gpio-cells:   必须设置为2

必要的属性当使用NAND预读取dma时:

  • dmas    GPMC NAND 预读取dma通道
  • dma-names   必须设置为“rxtx”

子节点的时序属性。所有选项都是可选的并且默认是0.

  • gpmc,sync-clk-ps:  同步模式下最小的时钟周期,单位皮秒ps

与GPMC_CONFIG2相关的片选信号时序(单位ns)

  • gpmc,cs-on-ns:  Assertion time
  • gpmc,cs-rd-off-ns:  Read deassertion time
  • gpmc,cs-wr-off-ns:  Write deassertion time

与GPMC_CONFIG3相关的ADV信号时序(单位ns)

  • gpmc,adv-on-ns:  Assertion time
  • gpmc,adv-rd-off-ns:  Read deassertion time
  • gpmc,adv-wr-off-ns:  Write deassertion time
  • gpmc,adv-aad-mux-on-ns:  Assertion time for AAD
  • gpmc,adv-aad-mux-rd-off-ns:  Read deassertion time for AAD
  • gpmc,adv-aad-mux-wr-off-ns:  Write deassertion time for AAD

与GPMC_CONFIG4相关的WE信号时序(单位ns)

  • gpmc,we-on-ns:  Assertion time
  • gpmc,we-off-ns:  Deassertion time

与GPMC_CONFIG4相关的OE信号时序(单位ns)

  • gpmc,oe-on-ns:  Assertion time
  • gpmc,oe-off-ns:  Deassertion time
  • gpmc,oe-aad-mux-on-ns:  Assertion time for AAD
  • gpmc,oe-aad-mux-off-ns:  Deassertion time for AAD

与GPMC_CONFIG5相关的Access time 和cycle time时序(单位ns)

  • gpmc,page-burst-access-ns:  Multiple access word delay
  • gpmc,access-ns:  Start-cycle to first data valid delay
  • gpmc,rd-cycle-ns:  Total read cycle time
  • gpmc,wr-cycle-ns:  Total write cycle time
  • gpmc,bus-turnaround-ns:  Turn-around time between successive accesses
  • gpmc,cycle2cycle-delay-ns:  Delay between chip-select pulses
  • gpmc,clk-activation-ns:  GPMC clock activation time
  • gpmc,wait-monitoring-ns:  Start of wait monitoring with regard to valid data

布尔时序参数。如果属性有参数,则启用。如果省略属性,则禁用。

  • gpmc,adv-extra-delay:  ADV signal is delayed by half GPMC clock
  • gpmc,cs-extra-delay:  CS signal is delayed by half GPMC clock
  • gpmc,cycle2cycle-diffcsen:  Add “cycle2cycle-delay” between successive
    accesses to a different CS
  • gpmc,cycle2cycle-samecsen:  Add “cycle2cycle-delay” between successive
    accesses to the same CS
  • gpmc,oe-extra-delay:  OE signal is delayed by half GPMC clock
  • gpmc,we-extra-delay:  WE signal is delayed by half GPMC clock
  • gpmc,time-para-granularity:  Multiply all access times by 2

下面的属性仅应用于 OMAP3+ 和 AM335x:

  • gpmc,wr-access-ns:   In synchronous write mode, for single or
    burst accesses, defines the number of GPMC_FCLK cycles from start access time to the GPMC_CLK rising edge used by the memory device for the first data capture.
  • gpmc,wr-data-mux-bus-ns:   In address-data multiplex mode, specifies the time when the first data is driven on the address-data bus.

GPMC片选为子节点的配置属性。所有的项都是可选的。

  • gpmc,burst-length   Page/burst length. Must be 4, 8 or 16.
  • gpmc,burst-wrap   Enables wrap bursting
  • gpmc,burst-read   Enables read page/burst mode
  • gpmc,burst-write   Enables write page/burst mode
  • gpmc,device-width   Total width of device(s) connected to a GPMC
    chip-select in bytes. The GPMC supports 8-bit and 16-bit devices and so this property must be 1 or 2.
  • gpmc,mux-add-data   Address and data multiplexing configuration.Valid values are 1 for address-address-data multiplexing mode and 2 for address-data multiplexing mode.
  • gpmc,sync-read   Enables synchronous read. Defaults to asynchronous is this is not set.
  • gpmc,sync-write   Enables synchronous writes. Defaults to asynchronous is this is not set.
  • gpmc,wait-pin   Wait-pin used by client. Must be less than
    “gpmc,num-waitpins”.
  • gpmc,wait-on-read   Enables wait monitoring on reads.
  • gpmc,wait-on-write   Enables wait monitoring on writes.
  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值