Skip to content

Add dt_node interface for usage through device-tree and fix SPI-NOR core

Davide Cardillo requested to merge davc/userspace_reg into seco_lf-5.10.y
  1. Originally, the driver works only via the old platform-driver interface. Now it uses also the device tree interface. A possible node is:

    rs232-consumer { compatible = "reg-userspace-consumer"; regulator-name = "rs232-consumer"; regulator-supplies = "reg_rs232_en"; reg_rs232_en-supply = <&reg_rs232_en>; regulator-boot-on; };

Where:

  • regulator-name: name of the particular istance, used also to create the file descriptor at user-space level;
  • regulator0supplies : name of the regulator it uses as interface;
  • -supply = variable node name. It is the node of the regulator that the particular istance uses;
  • regulator-boot-on : (default state: off) used to turn on the regulator at boot.

2)Fixed usage of command 0xAD, used to write to the SPI memory in AAI (Auto Address Increment programming). Until now this command doesn't work due to two reasons:

  • a struct spi_mem_op op data is created and the wanted opcode is written into it. The issue is that the opcode filed is not propagated along the calls to the various functions and when the function that actually writes to the bus is called, the default opcode 0x02 (Byte-program) is used;
  • Only the first AAI writing cycle requires the address to write (base address), instead the following cycles need only to the data. The issue is that this logic is not applied to the current implementation of the code (address replied to each cycle).
Edited by Davide Cardillo

Merge request reports

Loading