> 于 2013年09月05日 12:25, Gupta, Pekon 写道: > > I would rather suggest to get these values from DT bindings specific to > could you show me what values should i set in the DT bindings? > The spi nor command? or the dummy? or something else? > Taking example of READ command for S25FL128S NOR flash devices.. S25FL128S supports following flavors of READ modes. 4FAST_READ Read Fast (4-byte Address) 0C 4READ Read (4-byte Address) 13 4DOR Read Dual Out (4-byte Address) 3C 4QOR Read Quad Out (4-byte Address) 6C 4DIOR Dual I/O Read (4-byte Address) BC 4QIOR Quad I/O Read (4-byte Address) EC 4DDRFR Read DDR Fast (4-byte Address) 0E 4DDRDIOR DDR Dual I/O Read (4-byte Address) BE 4DDRQIOR DDR Quad I/O Read (4-byte Address) EE But due to board constrains and your use-case, you would prefer only few read modes. Those opcodes you can specify via following DT property. "qspi, flash-read-command" Same way you can have DT property for "qspi, flash-write-command" "qspi, flash-erase-command" "qspi, flash-address-mode" = <4-byte/3-byte> "qspi, flash-dummy-cycles" = <integer> Example: How to select opcodes in DT ? (step-1) eliminate opcode which cannot be used due to board constrains. your board connects only 2 data I/O between device and controller, So you cannot use any of the QUAD Read opcodes. Thus your choice is limited to DUAL or SINGLE modes only. (step-2) select opcode based on use-case. (a) To maximize your throughput you would mostly use DUAL read opcode - fsl-qspi, flash-read-opcode = 0x3C /* 4DOR Read Dual Out (4-byte Address) */ - fsl-qspi, flash-read-opcode = 0xBC /* 4DIOR Dual I/O Read (4-byte Address) */ (b) But If you are using XIP then you would single out to: - fsl-qspi, flash-read-opcode = 0xBC /* 4DIOR Dual I/O Read (4-byte Address) */ Though I agree, end-user should be transparent of all these, but this is better than asking them to submit patches for each new NOR device ..Any thoughts ? with regards, pekon ��.n��������+%������w��{.n����z�{��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f