starfive_devkits.dts 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. // SPDX-License-Identifier: GPL-2.0 OR MIT
  2. /*
  3. * Copyright (C) 2022 StarFive Technology Co., Ltd.
  4. */
  5. /dts-v1/;
  6. #include "jh7110.dtsi"
  7. #include <dt-bindings/pinctrl/pinctrl-starfive-jh7110.h>
  8. #include <dt-bindings/gpio/gpio.h>
  9. / {
  10. #address-cells = <2>;
  11. #size-cells = <2>;
  12. model = "StarFive JH7110 DevKits";
  13. compatible = "starfive,jh7110";
  14. aliases {
  15. spi0="/soc/spi@13010000";
  16. gpio0="/soc/gpio@13040000";
  17. ethernet0=&gmac0;
  18. ethernet1=&gmac1;
  19. mmc0=&sdio0;
  20. mmc1=&sdio1;
  21. i2c5=&i2c5;
  22. };
  23. chosen {
  24. stdout-path = "/soc/serial@10000000:115200";
  25. starfive,boot-hart-id = <1>;
  26. };
  27. memory@80000000 {
  28. device_type = "memory";
  29. reg = <0x0 0x40000000 0x1 0x0>;
  30. };
  31. soc {
  32. };
  33. gpio-restart {
  34. compatible = "gpio-restart";
  35. gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
  36. };
  37. };
  38. &cpu0 {
  39. status = "okay";
  40. };
  41. &clkgen {
  42. clocks = <&osc>, <&gmac1_rmii_refin>,
  43. <&stg_apb>, <&gmac0_rmii_refin>;
  44. clock-names = "osc", "gmac1_rmii_refin",
  45. "stg_apb", "gmac0_rmii_refin";
  46. };
  47. &gpio {
  48. status = "okay";
  49. gpio-controller;
  50. i2c2_pins: i2c2-0 {
  51. i2c-pins {
  52. pinmux = <GPIOMUX(3, GPOUT_LOW,
  53. GPOEN_SYS_I2C2_CLK,
  54. GPI_SYS_I2C2_CLK)>,
  55. <GPIOMUX(2, GPOUT_LOW,
  56. GPOEN_SYS_I2C2_DATA,
  57. GPI_SYS_I2C2_DATA)>;
  58. bias-disable; /* external pull-up */
  59. input-enable;
  60. input-schmitt-enable;
  61. };
  62. };
  63. i2c5_pins: i2c5-0 {
  64. i2c-pins {
  65. pinmux = <GPIOMUX(19, GPOUT_LOW,
  66. GPOEN_SYS_I2C5_CLK,
  67. GPI_SYS_I2C5_CLK)>,
  68. <GPIOMUX(20, GPOUT_LOW,
  69. GPOEN_SYS_I2C5_DATA,
  70. GPI_SYS_I2C5_DATA)>;
  71. bias-disable; /* external pull-up */
  72. input-enable;
  73. input-schmitt-enable;
  74. };
  75. };
  76. mmc0_pins: mmc0-pins {
  77. mmc0-pins-rest {
  78. pinmux = <GPIOMUX(22, GPOUT_SYS_SDIO0_RST,
  79. GPOEN_ENABLE, GPI_NONE)>;
  80. bias-pull-up;
  81. drive-strength = <12>;
  82. input-disable;
  83. input-schmitt-disable;
  84. slew-rate = <0>;
  85. };
  86. };
  87. sdcard1_pins: sdcard1-pins {
  88. sdcard1-pins0 {
  89. pinmux = <GPIOMUX(10, GPOUT_SYS_SDIO1_CLK,
  90. GPOEN_ENABLE, GPI_NONE)>;
  91. bias-pull-up;
  92. drive-strength = <12>;
  93. input-disable;
  94. input-schmitt-disable;
  95. slew-rate = <0>;
  96. };
  97. sdcard1-pins1 {
  98. pinmux = <GPIOMUX(9, GPOUT_SYS_SDIO1_CMD,
  99. GPOEN_SYS_SDIO1_CMD, GPI_SYS_SDIO1_CMD)>;
  100. bias-pull-up;
  101. drive-strength = <12>;
  102. input-enable;
  103. input-schmitt-enable;
  104. slew-rate = <0>;
  105. };
  106. sdcard1-pins2 {
  107. pinmux = <GPIOMUX(11, GPOUT_SYS_SDIO1_DATA0,
  108. GPOEN_SYS_SDIO1_DATA0, GPI_SYS_SDIO1_DATA0)>;
  109. bias-pull-up;
  110. drive-strength = <12>;
  111. input-enable;
  112. input-schmitt-enable;
  113. slew-rate = <0>;
  114. };
  115. sdcard1-pins3 {
  116. pinmux = <GPIOMUX(12, GPOUT_SYS_SDIO1_DATA1,
  117. GPOEN_SYS_SDIO1_DATA1, GPI_SYS_SDIO1_DATA1)>;
  118. bias-pull-up;
  119. drive-strength = <12>;
  120. input-enable;
  121. input-schmitt-enable;
  122. slew-rate = <0>;
  123. };
  124. sdcard1-pins4 {
  125. pinmux = <GPIOMUX(7, GPOUT_SYS_SDIO1_DATA2,
  126. GPOEN_SYS_SDIO1_DATA2, GPI_SYS_SDIO1_DATA2)>;
  127. bias-pull-up;
  128. drive-strength = <12>;
  129. input-enable;
  130. input-schmitt-enable;
  131. slew-rate = <0>;
  132. };
  133. sdcard1-pins5 {
  134. pinmux = <GPIOMUX(8, GPOUT_SYS_SDIO1_DATA3,
  135. GPOEN_SYS_SDIO1_DATA3, GPI_SYS_SDIO1_DATA3)>;
  136. bias-pull-up;
  137. drive-strength = <12>;
  138. input-enable;
  139. input-schmitt-enable;
  140. slew-rate = <0>;
  141. };
  142. };
  143. hdmi_pins: hdmi-0 {
  144. i2c-pins {
  145. pinmux = <GPIOMUX(0, GPOUT_SYS_HDMI_DDC_SCL,
  146. GPOEN_SYS_HDMI_DDC_SCL,
  147. GPI_SYS_HDMI_DDC_SCL)>,
  148. <GPIOMUX(1, GPOUT_SYS_HDMI_DDC_SDA,
  149. GPOEN_SYS_HDMI_DDC_SDA,
  150. GPI_SYS_HDMI_DDC_SDA)>;
  151. bias-pull-up;
  152. input-enable;
  153. };
  154. cec-pins {
  155. pinmux = <GPIOMUX(14, GPOUT_SYS_HDMI_CEC_SDA,
  156. GPOEN_SYS_HDMI_CEC_SDA,
  157. GPI_SYS_HDMI_CEC_SDA)>;
  158. bias-pull-up;
  159. input-enable;
  160. };
  161. hpd-pins {
  162. pinmux = <GPIOMUX(15, GPOUT_LOW,
  163. GPOEN_DISABLE,
  164. GPI_SYS_HDMI_HPD)>;
  165. input-enable;
  166. };
  167. };
  168. };
  169. &i2c2 {
  170. clock-frequency = <100000>;
  171. i2c-sda-hold-time-ns = <300>;
  172. i2c-sda-falling-time-ns = <510>;
  173. i2c-scl-falling-time-ns = <510>;
  174. auto_calc_scl_lhcnt;
  175. pinctrl-names = "default";
  176. pinctrl-0 = <&i2c2_pins>;
  177. status = "okay";
  178. seeed_panel: seeed_panel@45 {
  179. compatible = "starfive,seeed";
  180. reg = <0x45>;
  181. sel-gpios = <&ext_gpio 5 GPIO_ACTIVE_LOW>;
  182. };
  183. lt8911exb_i2c@29 {
  184. compatible = "lontium,lt8911exb";
  185. reg = <0x29>;
  186. reset-gpios = <&gpio 41 1>;
  187. pwm-gpios = <&gpio 33 1>;
  188. bl-gpios = <&ext_gpio 6 GPIO_ACTIVE_LOW>;
  189. };
  190. };
  191. &i2c5 {
  192. clock-frequency = <100000>;
  193. i2c-sda-hold-time-ns = <300>;
  194. i2c-sda-falling-time-ns = <510>;
  195. i2c-scl-falling-time-ns = <510>;
  196. pinctrl-names = "default";
  197. pinctrl-0 = <&i2c5_pins>;
  198. status = "okay";
  199. pmic_axp15060: axp15060_reg@36 {
  200. compatible = "stf,axp15060-regulator";
  201. reg = <0x36>;
  202. };
  203. eeprom@50 {
  204. compatible = "atmel,24c02";
  205. reg = <0x50>;
  206. pagesize = <8>;
  207. };
  208. ext_gpio: ext_gpio@74 {
  209. compatible = "ti,tca9539";
  210. reg = <0x74>;
  211. gpio-controller;
  212. #gpio-cells = <2>;
  213. };
  214. };
  215. &sdio0 {
  216. assigned-clocks = <&clkgen JH7110_SDIO0_CLK_SDCARD>;
  217. assigned-clock-rates = <50000000>;
  218. fifo-depth = <32>;
  219. bus-width = <4>;
  220. status = "okay";
  221. pinctrl-names = "default";
  222. pinctrl-0 = <&mmc0_pins>;
  223. };
  224. &sdio1 {
  225. assigned-clocks = <&clkgen JH7110_SDIO1_CLK_SDCARD>;
  226. assigned-clock-rates = <50000000>;
  227. fifo-depth = <32>;
  228. bus-width = <4>;
  229. status = "okay";
  230. pinctrl-names = "default";
  231. pinctrl-0 = <&sdcard1_pins>;
  232. };
  233. &gmac0 {
  234. status = "okay";
  235. #address-cells = <1>;
  236. #size-cells = <0>;
  237. phy0: ethernet-phy@0 {
  238. rxc_dly_en = <0>;
  239. rx_delay_sel = <0xb>;
  240. tx_delay_sel_fe = <5>;
  241. tx_delay_sel = <0xa>;
  242. tx_inverted_10 = <0x1>;
  243. tx_inverted_100 = <0x1>;
  244. tx_inverted_1000 = <0x1>;
  245. };
  246. };
  247. &gmac1 {
  248. status = "okay";
  249. #address-cells = <1>;
  250. #size-cells = <0>;
  251. phy1: ethernet-phy@1 {
  252. rgmii_sw_dr_2 = <0x0>;
  253. rgmii_sw_dr = <0x3>;
  254. rgmii_sw_dr_rxc = <0x7>;
  255. tx_delay_sel_fe = <5>;
  256. tx_delay_sel = <0>;
  257. rxc_dly_en = <0>;
  258. rx_delay_sel = <0x2>;
  259. tx_inverted_10 = <0x1>;
  260. tx_inverted_100 = <0x1>;
  261. tx_inverted_1000 = <0x0>;
  262. };
  263. };
  264. &uart0 {
  265. reg-offset = <0>;
  266. current-speed = <115200>;
  267. status = "okay";
  268. };
  269. &gpioa {
  270. status = "disabled";
  271. };
  272. &usbdrd30 {
  273. clocks = <&clkgen JH7110_USB_125M>,
  274. <&clkgen JH7110_USB0_CLK_APP_125>,
  275. <&clkgen JH7110_USB0_CLK_LPM>,
  276. <&clkgen JH7110_USB0_CLK_STB>,
  277. <&clkgen JH7110_USB0_CLK_USB_APB>,
  278. <&clkgen JH7110_USB0_CLK_AXI>,
  279. <&clkgen JH7110_USB0_CLK_UTMI_APB>,
  280. <&clkgen JH7110_PCIE0_CLK_APB>;
  281. clock-names = "125m","app","lpm","stb","apb","axi","utmi", "phy";
  282. resets = <&rstgen RSTN_U0_CDN_USB_PWRUP>,
  283. <&rstgen RSTN_U0_CDN_USB_APB>,
  284. <&rstgen RSTN_U0_CDN_USB_AXI>,
  285. <&rstgen RSTN_U0_CDN_USB_UTMI_APB>,
  286. <&rstgen RSTN_U0_PLDA_PCIE_APB>;
  287. reset-names = "pwrup","apb","axi","utmi", "phy";
  288. starfive,usb2-only = <0>;
  289. status = "okay";
  290. };
  291. &usbdrd_cdns3 {
  292. dr_mode = "unknown";
  293. dr_num_mode = <1>;
  294. };
  295. &timer {
  296. status = "disabled";
  297. };
  298. &wdog {
  299. status = "disabled";
  300. };
  301. &clkvout {
  302. status = "okay";
  303. };
  304. &pdm {
  305. status = "disabled";
  306. };
  307. &dc8200 {
  308. status = "okay";
  309. };
  310. &mipi_dsi0 {
  311. status = "okay";
  312. rockchip,panel = <&seeed_panel>;
  313. data-lanes-num = <1>;
  314. status = "okay";
  315. };
  316. &hdmi{
  317. pinctrl-names = "default";
  318. pinctrl-0 = <&hdmi_pins>;
  319. status = "okay";
  320. };
  321. &pcie1 {
  322. power-gpios = <&ext_gpio 0 GPIO_ACTIVE_HIGH>;
  323. reset-gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
  324. status = "okay";
  325. };