nvmem.yaml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/nvmem/nvmem.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: NVMEM (Non Volatile Memory)
  7. maintainers:
  8. - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
  9. description: |
  10. This binding is intended to represent the location of hardware
  11. configuration data stored in NVMEMs like eeprom, efuses and so on.
  12. On a significant proportion of boards, the manufacturer has stored
  13. some data on NVMEM, for the OS to be able to retrieve these
  14. information and act upon it. Obviously, the OS has to know about
  15. where to retrieve these data from, and where they are stored on the
  16. storage device.
  17. properties:
  18. "#address-cells":
  19. const: 1
  20. "#size-cells":
  21. const: 1
  22. read-only:
  23. $ref: /schemas/types.yaml#/definitions/flag
  24. description:
  25. Mark the provider as read only.
  26. wp-gpios:
  27. description:
  28. GPIO to which the write-protect pin of the chip is connected.
  29. The write-protect GPIO is asserted, when it's driven high
  30. (logical '1') to block the write operation. It's deasserted,
  31. when it's driven low (logical '0') to allow writing.
  32. maxItems: 1
  33. nvmem-layout:
  34. $ref: /schemas/nvmem/layouts/nvmem-layout.yaml
  35. description:
  36. Alternative to the statically defined nvmem cells, this
  37. container may reference more advanced (dynamic) layout
  38. parsers.
  39. additionalProperties: true
  40. examples:
  41. - |
  42. #include <dt-bindings/gpio/gpio.h>
  43. qfprom: eeprom@700000 {
  44. compatible = "qcom,msm8974-qfprom", "qcom,qfprom";
  45. #address-cells = <1>;
  46. #size-cells = <1>;
  47. reg = <0x00700000 0x100000>;
  48. wp-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
  49. /* ... */
  50. nvmem-layout {
  51. compatible = "fixed-layout";
  52. #address-cells = <1>;
  53. #size-cells = <1>;
  54. /* Data cells */
  55. tsens_calibration: calib@404 {
  56. reg = <0x404 0x10>;
  57. };
  58. tsens_calibration_bckp: calib_bckp@504 {
  59. reg = <0x504 0x11>;
  60. bits = <6 128>;
  61. };
  62. pvs_version: pvs-version@6 {
  63. reg = <0x6 0x2>;
  64. bits = <7 2>;
  65. };
  66. speed_bin: speed-bin@c{
  67. reg = <0xc 0x1>;
  68. bits = <2 3>;
  69. };
  70. };
  71. };
  72. ...