450-12-dt-bindings-mmc-mmc-card-add-block-device-nodes.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. From 86864bf8f40e84dc881c197ef470a88668329dbf Mon Sep 17 00:00:00 2001
  2. From: Daniel Golle <[email protected]>
  3. Date: Mon, 7 Aug 2023 21:21:45 +0100
  4. Subject: [PATCH 12/15] dt-bindings: mmc: mmc-card: add block device nodes
  5. Add nodes representing the block devices exposed by an MMC device
  6. including an example involving nvmem-cells.
  7. Signed-off-by: Daniel Golle <[email protected]>
  8. ---
  9. .../devicetree/bindings/mmc/mmc-card.yaml | 45 +++++++++++++++++++
  10. 1 file changed, 45 insertions(+)
  11. --- a/Documentation/devicetree/bindings/mmc/mmc-card.yaml
  12. +++ b/Documentation/devicetree/bindings/mmc/mmc-card.yaml
  13. @@ -26,6 +26,18 @@ properties:
  14. Use this to indicate that the mmc-card has a broken hpi
  15. implementation, and that hpi should not be used.
  16. + block:
  17. + $ref: /schemas/block/block-device.yaml#
  18. + description:
  19. + Represents the block storage provided by an SD card or the
  20. + main hardware partition of an eMMC.
  21. +
  22. +patternProperties:
  23. + '^boot[0-9]+':
  24. + $ref: /schemas/block/block-device.yaml#
  25. + description:
  26. + Represents a boot hardware partition on an eMMC.
  27. +
  28. required:
  29. - compatible
  30. - reg
  31. @@ -42,6 +54,39 @@ examples:
  32. compatible = "mmc-card";
  33. reg = <0>;
  34. broken-hpi;
  35. +
  36. + block {
  37. + partitions {
  38. + cal_data: block-partition-rf {
  39. + partnum = <3>;
  40. + partname = "rf";
  41. +
  42. + nvmem-layout {
  43. + compatible = "fixed-layout";
  44. + #address-cells = <1>;
  45. + #size-cells = <1>;
  46. +
  47. + eeprom@0 {
  48. + reg = <0x0 0x1000>;
  49. + };
  50. + };
  51. + };
  52. + };
  53. + };
  54. +
  55. + boot1 {
  56. + nvmem-layout {
  57. + compatible = "fixed-layout";
  58. + #address-cells = <1>;
  59. + #size-cells = <1>;
  60. +
  61. + macaddr: macaddr@a {
  62. + compatible = "mac-base";
  63. + reg = <0xa 0x6>;
  64. + #nvmem-cell-cells = <1>;
  65. + };
  66. + };
  67. + };
  68. };
  69. };