meson-gx-libretech-pc.dtsi 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2019 BayLibre SAS.
  4. * Author: Jerome Brunet <jbrunet@baylibre.com>
  5. */
  6. /* Libretech Amlogic GX PC form factor - AKA: Tartiflette */
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/leds/common.h>
  9. / {
  10. adc-keys {
  11. compatible = "adc-keys";
  12. io-channels = <&saradc 0>;
  13. io-channel-names = "buttons";
  14. keyup-threshold-microvolt = <1800000>;
  15. update-button {
  16. label = "update";
  17. linux,code = <KEY_VENDOR>;
  18. press-threshold-microvolt = <1300000>;
  19. };
  20. };
  21. aliases {
  22. serial0 = &uart_AO;
  23. ethernet0 = &ethmac;
  24. spi0 = &spifc;
  25. };
  26. chosen {
  27. stdout-path = "serial0:115200n8";
  28. };
  29. cvbs-connector {
  30. compatible = "composite-video-connector";
  31. status = "disabled";
  32. port {
  33. cvbs_connector_in: endpoint {
  34. remote-endpoint = <&cvbs_vdac_out>;
  35. };
  36. };
  37. };
  38. emmc_pwrseq: emmc-pwrseq {
  39. compatible = "mmc-pwrseq-emmc";
  40. reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
  41. };
  42. hdmi-connector {
  43. compatible = "hdmi-connector";
  44. type = "a";
  45. port {
  46. hdmi_connector_in: endpoint {
  47. remote-endpoint = <&hdmi_tx_tmds_out>;
  48. };
  49. };
  50. };
  51. gpio-keys-polled {
  52. compatible = "gpio-keys-polled";
  53. poll-interval = <100>;
  54. power-button {
  55. label = "power";
  56. linux,code = <KEY_POWER>;
  57. gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
  58. };
  59. };
  60. memory@0 {
  61. device_type = "memory";
  62. reg = <0x0 0x0 0x0 0x80000000>;
  63. };
  64. ao_5v: regulator-ao_5v {
  65. compatible = "regulator-fixed";
  66. regulator-name = "AO_5V";
  67. regulator-min-microvolt = <5000000>;
  68. regulator-max-microvolt = <5000000>;
  69. vin-supply = <&dc_in>;
  70. regulator-always-on;
  71. };
  72. dc_in: regulator-dc_in {
  73. compatible = "regulator-fixed";
  74. regulator-name = "DC_IN";
  75. regulator-min-microvolt = <5000000>;
  76. regulator-max-microvolt = <5000000>;
  77. regulator-always-on;
  78. };
  79. leds {
  80. compatible = "gpio-leds";
  81. green {
  82. color = <LED_COLOR_ID_GREEN>;
  83. function = LED_FUNCTION_DISK_ACTIVITY;
  84. gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
  85. linux,default-trigger = "disk-activity";
  86. };
  87. blue {
  88. color = <LED_COLOR_ID_BLUE>;
  89. function = LED_FUNCTION_STATUS;
  90. gpios = <&gpio GPIODV_28 GPIO_ACTIVE_HIGH>;
  91. linux,default-trigger = "heartbeat";
  92. panic-indicator;
  93. };
  94. };
  95. vcc_card: regulator-vcc_card {
  96. compatible = "regulator-fixed";
  97. regulator-name = "VCC_CARD";
  98. regulator-min-microvolt = <3300000>;
  99. regulator-max-microvolt = <3300000>;
  100. vin-supply = <&vddio_ao3v3>;
  101. gpio = <&gpio GPIODV_4 GPIO_ACTIVE_HIGH>;
  102. enable-active-high;
  103. };
  104. vcc5v: regulator-vcc5v {
  105. compatible = "regulator-fixed";
  106. regulator-name = "VCC5V";
  107. regulator-min-microvolt = <5000000>;
  108. regulator-max-microvolt = <5000000>;
  109. vin-supply = <&ao_5v>;
  110. gpio = <&gpio GPIOH_3 GPIO_OPEN_DRAIN>;
  111. };
  112. vddio_ao18: regulator-vddio_ao18 {
  113. compatible = "regulator-fixed";
  114. regulator-name = "VDDIO_AO18";
  115. regulator-min-microvolt = <1800000>;
  116. regulator-max-microvolt = <1800000>;
  117. vin-supply = <&ao_5v>;
  118. regulator-always-on;
  119. };
  120. vddio_ao3v3: regulator-vddio_ao3v3 {
  121. compatible = "regulator-fixed";
  122. regulator-name = "VDDIO_AO3V3";
  123. regulator-min-microvolt = <3300000>;
  124. regulator-max-microvolt = <3300000>;
  125. vin-supply = <&ao_5v>;
  126. regulator-always-on;
  127. };
  128. vddio_boot: regulator-vddio_boot {
  129. compatible = "regulator-fixed";
  130. regulator-name = "VDDIO_BOOT";
  131. regulator-min-microvolt = <1800000>;
  132. regulator-max-microvolt = <1800000>;
  133. vin-supply = <&vddio_ao3v3>;
  134. regulator-always-on;
  135. };
  136. vddio_card: regulator-vddio-card {
  137. compatible = "regulator-gpio";
  138. regulator-name = "VDDIO_CARD";
  139. regulator-min-microvolt = <1800000>;
  140. regulator-max-microvolt = <3300000>;
  141. gpios = <&gpio GPIODV_5 GPIO_ACTIVE_HIGH>;
  142. gpios-states = <0>;
  143. states = <3300000 0>,
  144. <1800000 1>;
  145. regulator-settling-time-up-us = <200>;
  146. regulator-settling-time-down-us = <50000>;
  147. };
  148. };
  149. &cec_AO {
  150. pinctrl-0 = <&ao_cec_pins>;
  151. pinctrl-names = "default";
  152. hdmi-phandle = <&hdmi_tx>;
  153. status = "okay";
  154. };
  155. &cvbs_vdac_port {
  156. cvbs_vdac_out: endpoint {
  157. remote-endpoint = <&cvbs_connector_in>;
  158. };
  159. };
  160. &ethmac {
  161. pinctrl-0 = <&eth_pins>, <&eth_phy_irq_pins>;
  162. pinctrl-names = "default";
  163. phy-handle = <&external_phy>;
  164. amlogic,tx-delay-ns = <2>;
  165. phy-mode = "rgmii";
  166. status = "okay";
  167. };
  168. &external_mdio {
  169. external_phy: ethernet-phy@0 {
  170. reg = <0>;
  171. max-speed = <1000>;
  172. reset-assert-us = <10000>;
  173. reset-deassert-us = <30000>;
  174. reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
  175. interrupt-parent = <&gpio_intc>;
  176. interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
  177. };
  178. };
  179. &pinctrl_periphs {
  180. /*
  181. * Make sure the reset pin of the usb HUB is driven high to take
  182. * it out of reset.
  183. */
  184. usb1_rst_pins: usb1_rst_irq {
  185. mux {
  186. groups = "GPIODV_3";
  187. function = "gpio_periphs";
  188. bias-disable;
  189. output-high;
  190. };
  191. };
  192. /* Make sure the phy irq pin is properly configured as input */
  193. eth_phy_irq_pins: eth_phy_irq {
  194. mux {
  195. groups = "GPIOZ_15";
  196. function = "gpio_periphs";
  197. bias-disable;
  198. output-disable;
  199. };
  200. };
  201. };
  202. &hdmi_tx {
  203. pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
  204. pinctrl-names = "default";
  205. hdmi-supply = <&vcc5v>;
  206. status = "okay";
  207. };
  208. &hdmi_tx_tmds_port {
  209. hdmi_tx_tmds_out: endpoint {
  210. remote-endpoint = <&hdmi_connector_in>;
  211. };
  212. };
  213. &ir {
  214. pinctrl-0 = <&remote_input_ao_pins>;
  215. pinctrl-names = "default";
  216. status = "okay";
  217. };
  218. &i2c_C {
  219. pinctrl-0 = <&i2c_c_dv18_pins>;
  220. pinctrl-names = "default";
  221. status = "okay";
  222. rtc: rtc@51 {
  223. reg = <0x51>;
  224. compatible = "nxp,pcf8563";
  225. #clock-cells = <0>;
  226. clock-output-names = "rtc_clkout";
  227. };
  228. };
  229. &pwm_AO_ab {
  230. pinctrl-0 = <&pwm_ao_a_3_pins>;
  231. pinctrl-names = "default";
  232. clocks = <&clkc CLKID_FCLK_DIV4>;
  233. clock-names = "clkin0";
  234. status = "okay";
  235. };
  236. &pwm_ab {
  237. pinctrl-0 = <&pwm_b_pins>;
  238. pinctrl-names = "default";
  239. clocks = <&clkc CLKID_FCLK_DIV4>;
  240. clock-names = "clkin0";
  241. status = "okay";
  242. };
  243. &pwm_ef {
  244. pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
  245. pinctrl-names = "default";
  246. clocks = <&clkc CLKID_FCLK_DIV4>;
  247. clock-names = "clkin0";
  248. status = "okay";
  249. };
  250. &saradc {
  251. vref-supply = <&vddio_ao18>;
  252. status = "okay";
  253. };
  254. /* SD card */
  255. &sd_emmc_b {
  256. pinctrl-0 = <&sdcard_pins>;
  257. pinctrl-1 = <&sdcard_clk_gate_pins>;
  258. pinctrl-names = "default", "clk-gate";
  259. bus-width = <4>;
  260. cap-sd-highspeed;
  261. sd-uhs-sdr12;
  262. sd-uhs-sdr25;
  263. sd-uhs-sdr50;
  264. sd-uhs-ddr50;
  265. max-frequency = <200000000>;
  266. disable-wp;
  267. cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
  268. vmmc-supply = <&vcc_card>;
  269. vqmmc-supply = <&vddio_card>;
  270. status = "okay";
  271. };
  272. /* eMMC */
  273. &sd_emmc_c {
  274. pinctrl-0 = <&emmc_pins>;
  275. pinctrl-1 = <&emmc_clk_gate_pins>;
  276. pinctrl-names = "default", "clk-gate";
  277. bus-width = <8>;
  278. cap-mmc-highspeed;
  279. mmc-ddr-1_8v;
  280. mmc-hs200-1_8v;
  281. max-frequency = <200000000>;
  282. disable-wp;
  283. mmc-pwrseq = <&emmc_pwrseq>;
  284. vmmc-supply = <&vddio_ao3v3>;
  285. vqmmc-supply = <&vddio_boot>;
  286. status = "okay";
  287. };
  288. &spifc {
  289. pinctrl-0 = <&nor_pins>;
  290. pinctrl-names = "default";
  291. status = "okay";
  292. gd25lq128: spi-flash@0 {
  293. compatible = "jedec,spi-nor";
  294. #address-cells = <1>;
  295. #size-cells = <1>;
  296. reg = <0>;
  297. spi-max-frequency = <12000000>;
  298. };
  299. };
  300. &uart_AO {
  301. pinctrl-0 = <&uart_ao_a_pins>;
  302. pinctrl-names = "default";
  303. status = "okay";
  304. };
  305. &usb0 {
  306. status = "okay";
  307. };
  308. &usb2_phy0 {
  309. pinctrl-0 = <&usb1_rst_pins>;
  310. pinctrl-names = "default";
  311. phy-supply = <&vcc5v>;
  312. };
  313. &usb2_phy1 {
  314. phy-supply = <&vcc5v>;
  315. };