mt7981b-unielec-u7981-01-nand.dts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /*
  3. * Copyright (C) 2023 Allen Zhao <[email protected]>
  4. */
  5. /dts-v1/;
  6. #include "mt7981b-unielec-u7981-01.dtsi"
  7. / {
  8. model = "Unielec U7981-01 (NAND)";
  9. compatible = "unielec,u7981-01-nand", "mediatek,mt7981";
  10. };
  11. &spi0 {
  12. pinctrl-names = "default";
  13. pinctrl-0 = <&spi0_flash_pins>;
  14. status = "okay";
  15. spi_nand: spi_nand@0 {
  16. #address-cells = <1>;
  17. #size-cells = <1>;
  18. compatible = "spi-nand";
  19. reg = <0>;
  20. spi-max-frequency = <52000000>;
  21. spi-tx-buswidth = <4>;
  22. spi-rx-buswidth = <4>;
  23. mediatek,nmbm;
  24. mediatek,bmt-max-ratio = <1>;
  25. mediatek,bmt-max-reserved-blocks = <64>;
  26. partitions {
  27. compatible = "fixed-partitions";
  28. #address-cells = <1>;
  29. #size-cells = <1>;
  30. partition@0 {
  31. label = "bl2";
  32. reg = <0x00000 0x0100000>;
  33. read-only;
  34. };
  35. partition@100000 {
  36. label = "u-boot-env";
  37. reg = <0x0100000 0x0080000>;
  38. };
  39. factory: partition@180000 {
  40. label = "factory";
  41. reg = <0x180000 0x200000>;
  42. read-only;
  43. compatible = "nvmem-cells";
  44. nvmem-layout {
  45. compatible = "fixed-layout";
  46. #address-cells = <1>;
  47. #size-cells = <1>;
  48. eeprom_factory_0: eeprom@0 {
  49. reg = <0x0 0x1000>;
  50. };
  51. macaddr_factory_1000: macaddr@1000 {
  52. compatible = "mac-base";
  53. reg = <0x1000 0x6>;
  54. #nvmem-cell-cells = <1>;
  55. };
  56. };
  57. };
  58. partition@380000 {
  59. label = "fip";
  60. reg = <0x380000 0x0200000>;
  61. };
  62. partition@580000 {
  63. label = "ubi";
  64. reg = <0x580000 0x4000000>;
  65. };
  66. };
  67. };
  68. };
  69. &pio {
  70. spi0_flash_pins: spi0-pins {
  71. mux {
  72. function = "spi";
  73. groups = "spi0", "spi0_wp_hold";
  74. };
  75. conf-pu {
  76. pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
  77. drive-strength = <8>;
  78. mediatek,pull-up-adv = <0>; /* bias-disable */
  79. };
  80. conf-pd {
  81. pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
  82. drive-strength = <8>;
  83. mediatek,pull-up-adv = <0>; /* bias-disable */
  84. };
  85. };
  86. };
  87. &gmac0 {
  88. nvmem-cells = <&macaddr_factory_1000 0>;
  89. nvmem-cell-names = "mac-address";
  90. };
  91. &gmac1 {
  92. nvmem-cells = <&macaddr_factory_1000 1>;
  93. nvmem-cell-names = "mac-address";
  94. };
  95. &wifi {
  96. nvmem-cells = <&eeprom_factory_0>;
  97. nvmem-cell-names = "eeprom";
  98. status = "okay";
  99. };