mdharris

max310x

Jan 11th, 2019
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.70 KB | None | 0 0
  1. /* MAx14830.dts to load the MAX14830 driver as spi0*/
  2. /dts-v1/;
  3. /plugin/;
  4. /{
  5. compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
  6. fragment@0 {
  7. target = <&spi0>;
  8. __overlay__{
  9. /* Needed to avoid dtc warning */
  10. #address-cells = <1>;
  11. #size-cells = <0>;
  12. status = "okay";
  13.  
  14. max14830_1: max14830_1@0 {
  15. compatible = "maxim,max14830";
  16. reg = <0>;
  17. mode = <0>;
  18. clocks = <0x4b>;
  19. clock-names = "xtal";
  20. spi-max-frequency = <12000000>;
  21. interrupt-parent = <&gpio>;
  22. interrupts = <0x5 0x2>; /*GPIO5 IRQ from MAX14830*/
  23. status = "okay";
  24. gpio-controller;
  25. #gpio-cells = <2>;
  26. };
  27. };
  28. };
  29. fragment@1{
  30. target = <&gpio>;
  31. __overlay__{
  32. max14830_pins: max_14830_pins{
  33. brcm,pins = <4>;
  34. brcm,function = <0>; /*in*/
  35. brcm,pull = <0>; /*none */
  36. };
  37. };
  38. };
  39.  
  40. __overrides__{
  41. int_pin = <&max14830_1>,"interrupts:0",
  42. <&max14830_pins>, "brcm,pins:0";
  43. speed = <&max14830_1>, "spi-max-frequency:0";
  44. };
  45. };
  46. -------------------------------------------------------------------------------------------
  47. /*MAX Clock settings : max14830-clock.dts*/
  48. /dts-v1/;
  49. /plugin/;
  50.  
  51. /{
  52. compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
  53. fragment@1 {
  54. target = <&clocks>;
  55. __overlay__{
  56. #address-cells = <1>;
  57. #size-cells = <0>;
  58. xtal:xtal@7 {
  59. reg = <0x7>;
  60. #clock-cells = <0>;
  61. compatible = "fixed-clock";
  62. clock-frequency = <3686400>;
  63. clock-output-names = "xtal";
  64. };
  65. };
  66. };
  67. };
  68. ------------------------------------------------------------------------------------------
  69. /* spidevoff.dts -- Turning of SPI0 and SPI1 dev entries*/
  70. /dts-v1/;
  71. /plugin/;
  72. /{
  73. compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
  74. fragment@0 {
  75. target = <&spidev0>;
  76. __overlay__{
  77. status = "disabled";
  78. };
  79. };
  80. fragment@1 {
  81. target = <&spidev1>;
  82. __overlay__ {
  83. status = "disabled";
  84. };
  85. };
  86. };
  87. ------------------------------------------------------------------------------------------
  88. #/boot/config.txt
  89. # uncomment if you get no picture on HDMI for a default "safe" mode
  90. #hdmi_safe=1
  91.  
  92. # uncomment this if your display has a black border of unused pixels visible
  93. # and your display can output without overscan
  94. #disable_overscan=1
  95.  
  96. # uncomment the following to adjust overscan. Use positive numbers if console
  97. # goes off screen, and negative if there is too much border
  98. #overscan_left=16
  99. #overscan_right=16
  100. #overscan_top=16
  101. #overscan_bottom=16
  102.  
  103. # uncomment to force a console size. By default it will be display's size minus
  104. # overscan.
  105. #framebuffer_width=1280
  106. #framebuffer_height=720
  107.  
  108. # uncomment if hdmi display is not detected and composite is being output
  109. #hdmi_force_hotplug=1
  110.  
  111. # uncomment to force a specific HDMI mode (this will force VGA)
  112. #hdmi_group=1
  113. #hdmi_mode=1
  114.  
  115. # uncomment to force a HDMI mode rather than DVI. This can make audio work in
  116. # DMT (computer monitor) modes
  117. #hdmi_drive=2
  118.  
  119. # uncomment to increase signal to HDMI, if you have interference, blanking, or
  120. # no display
  121. #config_hdmi_boost=4
  122.  
  123. # uncomment for composite PAL
  124. #sdtv_mode=2
  125.  
  126. #uncomment to overclock the arm. 700 MHz is the default.
  127. #arm_freq=800
  128.  
  129. # Uncomment some or all of these to enable the optional hardware interfaces
  130. #dtparam=i2c_arm=on
  131. #dtparam=i2s=on
  132. dtparam=spi=on
  133.  
  134. # Uncomment this to enable the lirc-rpi module
  135. #dtoverlay=lirc-rpi
  136.  
  137. # Additional overlays and parameters are documented /boot/overlays/README
  138.  
  139. # Enable audio (loads snd_bcm2835)
  140. dtparam=audio=on
  141.  
  142. dtoverlay=spidevoff
  143. dtoverlay=max14830-clock
Add Comment
Please, Sign In to add comment