Guest User

Untitled

a guest
Oct 16th, 2022
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. cat src/linux-asahi-6.0-rc6-1/arch/arm64/boot/dts/apple/t8103-j313.dts
  2. // SPDX-License-Identifier: GPL-2.0+ OR MIT
  3. /*
  4. * Apple MacBook Air (M1, 2020)
  5. *
  6. * target-type: J313
  7. *
  8. * Copyright The Asahi Linux Contributors
  9. */
  10.  
  11. /dts-v1/;
  12.  
  13. #include "t8103.dtsi"
  14. #include "t8103-jxxx.dtsi"
  15.  
  16. / {
  17. compatible = "apple,j313", "apple,t8103", "apple,arm-platform";
  18. model = "Apple MacBook Air (M1, 2020)";
  19. };
  20.  
  21. &wifi0 {
  22. brcm,board-type = "apple,shikoku";
  23. };
  24.  
  25. &bluetooth0 {
  26. brcm,board-type = "apple,shikoku";
  27. };
  28.  
  29. /*
  30. * Provide labels for the USB type C ports.
  31. */
  32.  
  33. &typec0 {
  34. label = "USB-C Left-back";
  35. };
  36.  
  37. &typec1 {
  38. label = "USB-C Left-front";
  39. };
  40.  
  41. &spi3 {
  42. status = "okay";
  43.  
  44. hid-transport@0 {
  45. compatible = "apple,spi-hid-transport";
  46. reg = <0>;
  47. spi-max-frequency = <8000000>;
  48. /*
  49. * cs-setup and cs-hold delays are derived from Apple's ADT
  50. * Mac OS driver meta data secify 45 us for 'cs to clock' and
  51. * 'clock to cs' delays.
  52. */
  53. spi-cs-setup-delay-ns = <20000>;
  54. spi-cs-hold-delay-ns = <20000>;
  55. spi-cs-inactive-delay-ns = <250000>;
  56. spien-gpios = <&pinctrl_ap 195 0>;
  57. interrupts-extended = <&pinctrl_nub 13 IRQ_TYPE_LEVEL_LOW>;
  58. };
  59. };
  60.  
  61. /*
  62. * Remove unused PCIe ports and disable the associated DARTs.
  63. */
  64.  
  65. &pcie0_dart_1 {
  66. status = "disabled";
  67. };
  68.  
  69. &pcie0_dart_2 {
  70. status = "disabled";
  71. };
  72.  
  73. /delete-node/ &port01;
  74. /delete-node/ &port02;
  75.  
  76. &i2c1 {
  77. speaker_left: codec@31 {
  78. compatible = "ti,tas5770l", "ti,tas2770";
  79. reg = <0x31>;
  80. shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
  81. #sound-dai-cells = <0>;
  82. sound-name-prefix = "Left";
  83. };
  84. };
  85.  
  86. &i2c3 {
  87. speaker_right: codec@34 {
  88. compatible = "ti,tas5770l", "ti,tas2770";
  89. reg = <0x34>;
  90. shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
  91. #sound-dai-cells = <0>;
  92. sound-name-prefix = "Right";
  93. };
  94.  
  95. jack_codec: codec@48 {
  96. compatible = "cirrus,cs42l83", "cirrus,cs42l42";
  97. reg = <0x48>;
  98. reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
  99. interrupt-parent = <&pinctrl_ap>;
  100. interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
  101. #sound-dai-cells = <0>;
  102. cirrus,ts-inv = <1>;
  103. sound-name-prefix = "Jack";
  104. };
  105. };
  106.  
  107. / {
  108. backlight: gpio-bl {
  109. compatible = "gpio-backlight";
  110. gpios = <&smc_gpio 18 GPIO_ACTIVE_HIGH>;
  111. default-on;
  112. };
  113.  
  114. sound {
  115. compatible = "apple,j313-macaudio", "apple,macaudio";
  116. model = "MacBook Air J313";
  117.  
  118. dai-link@0 {
  119. link-name = "Speakers";
  120. /*
  121. * DANGER ZONE: You can blow your speakers!
  122. *
  123. * The drivers are not ready, and unless you are careful
  124. * to attenuate the audio stream, you run the risk of
  125. * blowing your speakers.
  126. */
  127. status = "okay";
  128.  
  129. cpu {
  130. sound-dai = <&mca 0>, <&mca 1>;
  131. };
  132. codec {
  133. sound-dai = <&speaker_left>, <&speaker_right>;
  134. };
  135. };
  136.  
  137. dai-link@1 {
  138. link-name = "Headphone Jack";
  139.  
  140. cpu {
  141. sound-dai = <&mca 2>;
  142. };
  143. codec {
  144. sound-dai = <&jack_codec>;
  145. };
  146. };
  147. };
  148. };
  149.  
  150. &framebuffer0 {
  151. backlight = <&backlight>;
  152. };
Advertisement
Add Comment
Please, Sign In to add comment