s5pv210-fascinate4g.dts 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. // SPDX-License-Identifier: GPL-2.0
  2. /dts-v1/;
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include "s5pv210-aries.dtsi"
  6. / {
  7. model = "Samsung Galaxy S Fascinate 4G (SGH-T959P) based on S5PV210";
  8. compatible = "samsung,fascinate4g", "samsung,aries", "samsung,s5pv210";
  9. chassis-type = "handset";
  10. chosen {
  11. stdout-path = &uart2;
  12. };
  13. gpio-keys {
  14. compatible = "gpio-keys";
  15. key-power {
  16. label = "power";
  17. gpios = <&gph2 6 GPIO_ACTIVE_LOW>;
  18. linux,code = <KEY_POWER>;
  19. wakeup-source;
  20. };
  21. key-vol-down {
  22. label = "volume_down";
  23. gpios = <&gph3 2 GPIO_ACTIVE_LOW>;
  24. linux,code = <KEY_VOLUMEDOWN>;
  25. };
  26. key-vol-up {
  27. label = "volume_up";
  28. gpios = <&gph3 1 GPIO_ACTIVE_LOW>;
  29. linux,code = <KEY_VOLUMEUP>;
  30. };
  31. };
  32. headset_micbias_reg: regulator-fixed-3 {
  33. compatible = "regulator-fixed";
  34. regulator-name = "Headset_Micbias";
  35. gpio = <&gpj2 5 GPIO_ACTIVE_HIGH>;
  36. enable-active-high;
  37. pinctrl-names = "default";
  38. pinctrl-0 = <&headset_micbias_ena>;
  39. };
  40. main_micbias_reg: regulator-fixed-4 {
  41. compatible = "regulator-fixed";
  42. regulator-name = "Main_Micbias";
  43. gpio = <&gpj4 2 GPIO_ACTIVE_HIGH>;
  44. enable-active-high;
  45. pinctrl-names = "default";
  46. pinctrl-0 = <&main_micbias_ena>;
  47. };
  48. sound {
  49. compatible = "samsung,fascinate4g-wm8994";
  50. model = "Fascinate4G";
  51. extcon = <&fsa9480>;
  52. main-micbias-supply = <&main_micbias_reg>;
  53. headset-micbias-supply = <&headset_micbias_reg>;
  54. earpath-sel-gpios = <&gpj2 6 GPIO_ACTIVE_HIGH>;
  55. io-channels = <&adc 3>;
  56. io-channel-names = "headset-detect";
  57. headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>;
  58. headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
  59. samsung,audio-routing =
  60. "HP", "HPOUT1L",
  61. "HP", "HPOUT1R",
  62. "SPK", "SPKOUTLN",
  63. "SPK", "SPKOUTLP",
  64. "RCV", "HPOUT2N",
  65. "RCV", "HPOUT2P",
  66. "LINE", "LINEOUT2N",
  67. "LINE", "LINEOUT2P",
  68. "IN1LP", "Main Mic",
  69. "IN1LN", "Main Mic",
  70. "IN1RP", "Headset Mic",
  71. "IN1RN", "Headset Mic",
  72. "Modem Out", "Modem TX",
  73. "Modem RX", "Modem In",
  74. "Bluetooth SPK", "TX",
  75. "RX", "Bluetooth Mic";
  76. pinctrl-names = "default";
  77. pinctrl-0 = <&headset_det &earpath_sel>;
  78. cpu {
  79. sound-dai = <&i2s0>, <&bt_codec>;
  80. };
  81. codec {
  82. sound-dai = <&wm8994>;
  83. };
  84. };
  85. };
  86. &fg {
  87. compatible = "maxim,max77836-battery";
  88. interrupt-parent = <&gph3>;
  89. interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
  90. pinctrl-names = "default";
  91. pinctrl-0 = <&fg_irq>;
  92. };
  93. &pinctrl0 {
  94. pinctrl-names = "default";
  95. pinctrl-0 = <&sleep_cfg>;
  96. headset_det: headset-det-pins {
  97. samsung,pins = "gph0-6", "gph3-6";
  98. samsung,pin-function = <S5PV210_PIN_FUNC_F>;
  99. samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
  100. };
  101. fg_irq: fg-irq-pins {
  102. samsung,pins = "gph3-3";
  103. samsung,pin-function = <S5PV210_PIN_FUNC_F>;
  104. samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
  105. samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
  106. };
  107. headset_micbias_ena: headset-micbias-ena-pins {
  108. samsung,pins = "gpj2-5";
  109. samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
  110. samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
  111. };
  112. earpath_sel: earpath-sel-pins {
  113. samsung,pins = "gpj2-6";
  114. samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
  115. samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
  116. };
  117. main_micbias_ena: main-micbias-ena-pins {
  118. samsung,pins = "gpj4-2";
  119. samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
  120. samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
  121. };
  122. /* Based on vendor kernel v2.6.35.7 */
  123. sleep_cfg: sleep-state {
  124. PIN_SLP(gpa0-0, PREV, NONE);
  125. PIN_SLP(gpa0-1, PREV, NONE);
  126. PIN_SLP(gpa0-2, PREV, NONE);
  127. PIN_SLP(gpa0-3, OUT1, NONE);
  128. PIN_SLP(gpa0-4, PREV, NONE);
  129. PIN_SLP(gpa0-5, PREV, NONE);
  130. PIN_SLP(gpa0-6, PREV, NONE);
  131. PIN_SLP(gpa0-7, PREV, NONE);
  132. PIN_SLP(gpa1-0, INPUT, DOWN);
  133. PIN_SLP(gpa1-1, OUT0, NONE);
  134. PIN_SLP(gpa1-2, INPUT, DOWN);
  135. PIN_SLP(gpa1-3, OUT0, NONE);
  136. PIN_SLP(gpb-0, OUT0, NONE);
  137. PIN_SLP(gpb-1, OUT1, NONE);
  138. PIN_SLP(gpb-2, OUT0, NONE);
  139. PIN_SLP(gpb-3, PREV, NONE);
  140. PIN_SLP(gpb-4, INPUT, NONE);
  141. PIN_SLP(gpb-5, PREV, NONE);
  142. PIN_SLP(gpb-6, INPUT, DOWN);
  143. PIN_SLP(gpb-7, OUT0, NONE);
  144. PIN_SLP(gpc0-0, OUT0, NONE);
  145. PIN_SLP(gpc0-1, INPUT, DOWN);
  146. PIN_SLP(gpc0-2, OUT0, NONE);
  147. PIN_SLP(gpc0-3, INPUT, DOWN);
  148. PIN_SLP(gpc0-4, OUT0, NONE);
  149. PIN_SLP(gpc1-0, INPUT, DOWN);
  150. PIN_SLP(gpc1-1, INPUT, DOWN);
  151. PIN_SLP(gpc1-2, INPUT, DOWN);
  152. PIN_SLP(gpc1-3, INPUT, DOWN);
  153. PIN_SLP(gpc1-4, INPUT, DOWN);
  154. PIN_SLP(gpd0-0, INPUT, DOWN);
  155. PIN_SLP(gpd0-1, OUT0, NONE);
  156. PIN_SLP(gpd0-2, INPUT, DOWN);
  157. PIN_SLP(gpd0-3, INPUT, DOWN);
  158. PIN_SLP(gpd1-0, INPUT, NONE);
  159. PIN_SLP(gpd1-1, INPUT, NONE);
  160. PIN_SLP(gpd1-2, INPUT, DOWN);
  161. PIN_SLP(gpd1-3, INPUT, DOWN);
  162. PIN_SLP(gpd1-4, INPUT, DOWN);
  163. PIN_SLP(gpd1-5, INPUT, DOWN);
  164. PIN_SLP(gpe0-0, INPUT, DOWN);
  165. PIN_SLP(gpe0-1, INPUT, DOWN);
  166. PIN_SLP(gpe0-2, INPUT, DOWN);
  167. PIN_SLP(gpe0-3, INPUT, DOWN);
  168. PIN_SLP(gpe0-4, INPUT, DOWN);
  169. PIN_SLP(gpe0-5, INPUT, DOWN);
  170. PIN_SLP(gpe0-6, INPUT, DOWN);
  171. PIN_SLP(gpe0-7, INPUT, DOWN);
  172. PIN_SLP(gpe1-0, INPUT, DOWN);
  173. PIN_SLP(gpe1-1, INPUT, DOWN);
  174. PIN_SLP(gpe1-2, INPUT, DOWN);
  175. PIN_SLP(gpe1-3, OUT0, NONE);
  176. PIN_SLP(gpe1-4, INPUT, DOWN);
  177. PIN_SLP(gpf0-0, OUT0, NONE);
  178. PIN_SLP(gpf0-1, OUT0, NONE);
  179. PIN_SLP(gpf0-2, OUT0, NONE);
  180. PIN_SLP(gpf0-3, OUT0, NONE);
  181. PIN_SLP(gpf0-4, OUT0, NONE);
  182. PIN_SLP(gpf0-5, OUT0, NONE);
  183. PIN_SLP(gpf0-6, OUT0, NONE);
  184. PIN_SLP(gpf0-7, OUT0, NONE);
  185. PIN_SLP(gpf1-0, OUT0, NONE);
  186. PIN_SLP(gpf1-1, OUT0, NONE);
  187. PIN_SLP(gpf1-2, OUT0, NONE);
  188. PIN_SLP(gpf1-3, OUT0, NONE);
  189. PIN_SLP(gpf1-4, OUT0, NONE);
  190. PIN_SLP(gpf1-5, OUT0, NONE);
  191. PIN_SLP(gpf1-6, OUT0, NONE);
  192. PIN_SLP(gpf1-7, OUT0, NONE);
  193. PIN_SLP(gpf2-0, OUT0, NONE);
  194. PIN_SLP(gpf2-1, OUT0, NONE);
  195. PIN_SLP(gpf2-2, OUT0, NONE);
  196. PIN_SLP(gpf2-3, OUT0, NONE);
  197. PIN_SLP(gpf2-4, OUT0, NONE);
  198. PIN_SLP(gpf2-5, OUT0, NONE);
  199. PIN_SLP(gpf2-6, OUT0, NONE);
  200. PIN_SLP(gpf2-7, OUT0, NONE);
  201. PIN_SLP(gpf3-0, OUT0, NONE);
  202. PIN_SLP(gpf3-1, OUT0, NONE);
  203. PIN_SLP(gpf3-2, OUT0, NONE);
  204. PIN_SLP(gpf3-3, OUT0, NONE);
  205. PIN_SLP(gpf3-4, PREV, NONE);
  206. PIN_SLP(gpf3-5, INPUT, DOWN);
  207. PIN_SLP(gpg0-0, INPUT, DOWN);
  208. PIN_SLP(gpg0-1, INPUT, DOWN);
  209. PIN_SLP(gpg0-2, INPUT, NONE);
  210. PIN_SLP(gpg0-3, INPUT, DOWN);
  211. PIN_SLP(gpg0-4, INPUT, DOWN);
  212. PIN_SLP(gpg0-5, INPUT, DOWN);
  213. PIN_SLP(gpg0-6, INPUT, DOWN);
  214. PIN_SLP(gpg1-0, OUT0, NONE);
  215. PIN_SLP(gpg1-1, OUT1, NONE);
  216. PIN_SLP(gpg1-2, PREV, NONE);
  217. PIN_SLP(gpg1-3, OUT1, NONE);
  218. PIN_SLP(gpg1-4, OUT1, NONE);
  219. PIN_SLP(gpg1-5, OUT1, NONE);
  220. PIN_SLP(gpg1-6, OUT1, NONE);
  221. PIN_SLP(gpg2-0, OUT0, NONE);
  222. PIN_SLP(gpg2-1, OUT0, NONE);
  223. PIN_SLP(gpg2-2, INPUT, NONE);
  224. PIN_SLP(gpg2-3, OUT0, NONE);
  225. PIN_SLP(gpg2-4, OUT0, NONE);
  226. PIN_SLP(gpg2-5, OUT0, NONE);
  227. PIN_SLP(gpg2-6, OUT0, NONE);
  228. PIN_SLP(gpg3-0, PREV, UP);
  229. PIN_SLP(gpg3-1, PREV, UP);
  230. PIN_SLP(gpg3-2, INPUT, NONE);
  231. PIN_SLP(gpg3-3, INPUT, DOWN);
  232. PIN_SLP(gpg3-4, OUT0, NONE);
  233. PIN_SLP(gpg3-5, OUT0, NONE);
  234. PIN_SLP(gpg3-6, INPUT, DOWN);
  235. PIN_SLP(gpi-0, PREV, NONE);
  236. PIN_SLP(gpi-1, INPUT, DOWN);
  237. PIN_SLP(gpi-2, PREV, NONE);
  238. PIN_SLP(gpi-3, PREV, NONE);
  239. PIN_SLP(gpi-4, PREV, NONE);
  240. PIN_SLP(gpi-5, INPUT, DOWN);
  241. PIN_SLP(gpi-6, INPUT, DOWN);
  242. PIN_SLP(gpj0-0, INPUT, NONE);
  243. PIN_SLP(gpj0-1, INPUT, NONE);
  244. PIN_SLP(gpj0-2, INPUT, NONE);
  245. PIN_SLP(gpj0-3, INPUT, NONE);
  246. PIN_SLP(gpj0-4, INPUT, NONE);
  247. PIN_SLP(gpj0-5, INPUT, DOWN);
  248. PIN_SLP(gpj0-6, OUT0, NONE);
  249. PIN_SLP(gpj0-7, INPUT, NONE);
  250. PIN_SLP(gpj1-0, OUT1, NONE);
  251. PIN_SLP(gpj1-1, OUT0, NONE);
  252. PIN_SLP(gpj1-2, INPUT, DOWN);
  253. PIN_SLP(gpj1-3, PREV, NONE);
  254. PIN_SLP(gpj1-4, PREV, NONE);
  255. PIN_SLP(gpj1-5, OUT0, NONE);
  256. PIN_SLP(gpj2-0, INPUT, DOWN);
  257. PIN_SLP(gpj2-1, INPUT, DOWN);
  258. PIN_SLP(gpj2-2, OUT0, NONE);
  259. PIN_SLP(gpj2-3, INPUT, DOWN);
  260. PIN_SLP(gpj2-4, INPUT, DOWN);
  261. PIN_SLP(gpj2-5, PREV, NONE);
  262. PIN_SLP(gpj2-6, PREV, NONE);
  263. PIN_SLP(gpj2-7, INPUT, DOWN);
  264. PIN_SLP(gpj3-0, INPUT, NONE);
  265. PIN_SLP(gpj3-1, INPUT, NONE);
  266. PIN_SLP(gpj3-2, OUT0, NONE);
  267. PIN_SLP(gpj3-3, INPUT, DOWN);
  268. PIN_SLP(gpj3-4, INPUT, NONE);
  269. PIN_SLP(gpj3-5, INPUT, NONE);
  270. PIN_SLP(gpj3-6, INPUT, NONE);
  271. PIN_SLP(gpj3-7, INPUT, NONE);
  272. PIN_SLP(gpj4-0, INPUT, NONE);
  273. PIN_SLP(gpj4-1, INPUT, DOWN);
  274. PIN_SLP(gpj4-2, PREV, NONE);
  275. PIN_SLP(gpj4-3, INPUT, NONE);
  276. PIN_SLP(gpj4-4, INPUT, DOWN);
  277. PIN_SLP(mp01-0, OUT1, NONE);
  278. PIN_SLP(mp01-1, OUT0, NONE);
  279. PIN_SLP(mp01-2, INPUT, DOWN);
  280. PIN_SLP(mp01-3, INPUT, DOWN);
  281. PIN_SLP(mp01-4, OUT1, NONE);
  282. PIN_SLP(mp01-5, INPUT, DOWN);
  283. PIN_SLP(mp01-6, INPUT, DOWN);
  284. PIN_SLP(mp01-7, INPUT, DOWN);
  285. PIN_SLP(mp02-0, INPUT, DOWN);
  286. PIN_SLP(mp02-1, INPUT, DOWN);
  287. PIN_SLP(mp02-2, INPUT, NONE);
  288. PIN_SLP(mp02-3, INPUT, DOWN);
  289. PIN_SLP(mp03-0, INPUT, DOWN);
  290. PIN_SLP(mp03-1, INPUT, DOWN);
  291. PIN_SLP(mp03-2, OUT1, NONE);
  292. PIN_SLP(mp03-3, OUT0, NONE);
  293. PIN_SLP(mp03-4, INPUT, NONE);
  294. PIN_SLP(mp03-5, OUT0, NONE);
  295. PIN_SLP(mp03-6, INPUT, DOWN);
  296. PIN_SLP(mp03-7, INPUT, DOWN);
  297. PIN_SLP(mp04-0, INPUT, DOWN);
  298. PIN_SLP(mp04-1, OUT0, NONE);
  299. PIN_SLP(mp04-2, INPUT, DOWN);
  300. PIN_SLP(mp04-3, OUT0, NONE);
  301. PIN_SLP(mp04-4, INPUT, DOWN);
  302. PIN_SLP(mp04-5, INPUT, DOWN);
  303. PIN_SLP(mp04-6, OUT0, NONE);
  304. PIN_SLP(mp04-7, INPUT, DOWN);
  305. PIN_SLP(mp05-0, INPUT, NONE);
  306. PIN_SLP(mp05-1, INPUT, NONE);
  307. PIN_SLP(mp05-2, INPUT, NONE);
  308. PIN_SLP(mp05-3, INPUT, NONE);
  309. PIN_SLP(mp05-4, INPUT, DOWN);
  310. PIN_SLP(mp05-5, OUT0, NONE);
  311. PIN_SLP(mp05-6, INPUT, DOWN);
  312. PIN_SLP(mp05-7, PREV, NONE);
  313. PIN_SLP(mp06-0, INPUT, DOWN);
  314. PIN_SLP(mp06-1, INPUT, DOWN);
  315. PIN_SLP(mp06-2, INPUT, DOWN);
  316. PIN_SLP(mp06-3, INPUT, DOWN);
  317. PIN_SLP(mp06-4, INPUT, DOWN);
  318. PIN_SLP(mp06-5, INPUT, DOWN);
  319. PIN_SLP(mp06-6, INPUT, DOWN);
  320. PIN_SLP(mp06-7, INPUT, DOWN);
  321. PIN_SLP(mp07-0, INPUT, DOWN);
  322. PIN_SLP(mp07-1, INPUT, DOWN);
  323. PIN_SLP(mp07-2, INPUT, DOWN);
  324. PIN_SLP(mp07-3, INPUT, DOWN);
  325. PIN_SLP(mp07-4, INPUT, DOWN);
  326. PIN_SLP(mp07-5, INPUT, DOWN);
  327. PIN_SLP(mp07-6, INPUT, DOWN);
  328. PIN_SLP(mp07-7, INPUT, DOWN);
  329. };
  330. };
  331. &wm8994 {
  332. /* GPIO3 (BCLK2) and GPIO4 (LRCLK2) as outputs */
  333. wlf,gpio-cfg = <0xa101 0x8100 0x8100 0x8100 0x8100 0xa101
  334. 0x0100 0x8100 0x0100 0x0100 0x0100>;
  335. };