rzg2lc-smarc-som.dtsi 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. /*
  3. * Device Tree Source for the RZ/G2LC SMARC SOM common parts
  4. *
  5. * Copyright (C) 2021 Renesas Electronics Corp.
  6. */
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
  9. / {
  10. aliases {
  11. ethernet0 = &eth0;
  12. };
  13. chosen {
  14. bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
  15. };
  16. memory@48000000 {
  17. device_type = "memory";
  18. /* first 128MB is reserved for secure area. */
  19. reg = <0x0 0x48000000 0x0 0x38000000>;
  20. };
  21. reg_1p8v: regulator-1p8v {
  22. compatible = "regulator-fixed";
  23. regulator-name = "fixed-1.8V";
  24. regulator-min-microvolt = <1800000>;
  25. regulator-max-microvolt = <1800000>;
  26. regulator-boot-on;
  27. regulator-always-on;
  28. };
  29. reg_3p3v: regulator-3p3v {
  30. compatible = "regulator-fixed";
  31. regulator-name = "fixed-3.3V";
  32. regulator-min-microvolt = <3300000>;
  33. regulator-max-microvolt = <3300000>;
  34. regulator-boot-on;
  35. regulator-always-on;
  36. };
  37. reg_1p1v: regulator-vdd-core {
  38. compatible = "regulator-fixed";
  39. regulator-name = "fixed-1.1V";
  40. regulator-min-microvolt = <1100000>;
  41. regulator-max-microvolt = <1100000>;
  42. regulator-boot-on;
  43. regulator-always-on;
  44. };
  45. vccq_sdhi0: regulator-vccq-sdhi0 {
  46. compatible = "regulator-gpio";
  47. regulator-name = "SDHI0 VccQ";
  48. regulator-min-microvolt = <1800000>;
  49. regulator-max-microvolt = <3300000>;
  50. states = <3300000 1>, <1800000 0>;
  51. regulator-boot-on;
  52. gpios = <&pinctrl RZG2L_GPIO(39, 0) GPIO_ACTIVE_HIGH>;
  53. regulator-always-on;
  54. };
  55. };
  56. &eth0 {
  57. pinctrl-0 = <&eth0_pins>;
  58. pinctrl-names = "default";
  59. phy-handle = <&phy0>;
  60. phy-mode = "rgmii-id";
  61. status = "okay";
  62. phy0: ethernet-phy@7 {
  63. compatible = "ethernet-phy-id0022.1640",
  64. "ethernet-phy-ieee802.3-c22";
  65. reg = <7>;
  66. rxc-skew-psec = <2400>;
  67. txc-skew-psec = <2400>;
  68. rxdv-skew-psec = <0>;
  69. txen-skew-psec = <0>;
  70. rxd0-skew-psec = <0>;
  71. rxd1-skew-psec = <0>;
  72. rxd2-skew-psec = <0>;
  73. rxd3-skew-psec = <0>;
  74. txd0-skew-psec = <0>;
  75. txd1-skew-psec = <0>;
  76. txd2-skew-psec = <0>;
  77. txd3-skew-psec = <0>;
  78. };
  79. };
  80. &extal_clk {
  81. clock-frequency = <24000000>;
  82. };
  83. &gpu {
  84. mali-supply = <&reg_1p1v>;
  85. };
  86. &ostm1 {
  87. status = "okay";
  88. };
  89. &ostm2 {
  90. status = "okay";
  91. };
  92. &pinctrl {
  93. eth0_pins: eth0 {
  94. pinmux = <RZG2L_PORT_PINMUX(28, 1, 1)>, /* ET0_LINKSTA */
  95. <RZG2L_PORT_PINMUX(27, 1, 1)>, /* ET0_MDC */
  96. <RZG2L_PORT_PINMUX(28, 0, 1)>, /* ET0_MDIO */
  97. <RZG2L_PORT_PINMUX(20, 0, 1)>, /* ET0_TXC */
  98. <RZG2L_PORT_PINMUX(20, 1, 1)>, /* ET0_TX_CTL */
  99. <RZG2L_PORT_PINMUX(20, 2, 1)>, /* ET0_TXD0 */
  100. <RZG2L_PORT_PINMUX(21, 0, 1)>, /* ET0_TXD1 */
  101. <RZG2L_PORT_PINMUX(21, 1, 1)>, /* ET0_TXD2 */
  102. <RZG2L_PORT_PINMUX(22, 0, 1)>, /* ET0_TXD3 */
  103. <RZG2L_PORT_PINMUX(24, 0, 1)>, /* ET0_RXC */
  104. <RZG2L_PORT_PINMUX(24, 1, 1)>, /* ET0_RX_CTL */
  105. <RZG2L_PORT_PINMUX(25, 0, 1)>, /* ET0_RXD0 */
  106. <RZG2L_PORT_PINMUX(25, 1, 1)>, /* ET0_RXD1 */
  107. <RZG2L_PORT_PINMUX(26, 0, 1)>, /* ET0_RXD2 */
  108. <RZG2L_PORT_PINMUX(26, 1, 1)>; /* ET0_RXD3 */
  109. };
  110. gpio-sd0-pwr-en-hog {
  111. gpio-hog;
  112. gpios = <RZG2L_GPIO(18, 1) GPIO_ACTIVE_HIGH>;
  113. output-high;
  114. line-name = "gpio_sd0_pwr_en";
  115. };
  116. qspi0_pins: qspi0 {
  117. qspi0-data {
  118. pins = "QSPI0_IO0", "QSPI0_IO1", "QSPI0_IO2", "QSPI0_IO3";
  119. power-source = <1800>;
  120. };
  121. qspi0-ctrl {
  122. pins = "QSPI0_SPCLK", "QSPI0_SSL", "QSPI_RESET#";
  123. power-source = <1800>;
  124. };
  125. };
  126. /*
  127. * SD0 device selection is XOR between GPIO_SD0_DEV_SEL and SW1[2]
  128. * The below switch logic can be used to select the device between
  129. * eMMC and microSD, after setting GPIO_SD0_DEV_SEL to high in DT.
  130. * SW1[2] should be at OFF position to enable 64 GB eMMC
  131. * SW1[2] should be at position ON to enable uSD card CN3
  132. */
  133. gpio-sd0-dev-sel-hog {
  134. gpio-hog;
  135. gpios = <RZG2L_GPIO(40, 2) GPIO_ACTIVE_HIGH>;
  136. output-high;
  137. line-name = "gpio_sd0_dev_sel";
  138. };
  139. sdhi0_emmc_pins: sd0emmc {
  140. sd0_emmc_data {
  141. pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3",
  142. "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7";
  143. power-source = <1800>;
  144. };
  145. sd0_emmc_ctrl {
  146. pins = "SD0_CLK", "SD0_CMD";
  147. power-source = <1800>;
  148. };
  149. sd0_emmc_rst {
  150. pins = "SD0_RST#";
  151. power-source = <1800>;
  152. };
  153. };
  154. sdhi0_pins: sd0 {
  155. sd0_data {
  156. pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
  157. power-source = <3300>;
  158. };
  159. sd0_ctrl {
  160. pins = "SD0_CLK", "SD0_CMD";
  161. power-source = <3300>;
  162. };
  163. sd0_mux {
  164. pinmux = <RZG2L_PORT_PINMUX(18, 0, 1)>; /* SD0_CD */
  165. };
  166. };
  167. sdhi0_pins_uhs: sd0_uhs {
  168. sd0_data_uhs {
  169. pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
  170. power-source = <1800>;
  171. };
  172. sd0_ctrl_uhs {
  173. pins = "SD0_CLK", "SD0_CMD";
  174. power-source = <1800>;
  175. };
  176. sd0_mux_uhs {
  177. pinmux = <RZG2L_PORT_PINMUX(18, 0, 1)>; /* SD0_CD */
  178. };
  179. };
  180. };
  181. &sbc {
  182. pinctrl-0 = <&qspi0_pins>;
  183. pinctrl-names = "default";
  184. status = "okay";
  185. flash@0 {
  186. compatible = "micron,mt25qu512a", "jedec,spi-nor";
  187. reg = <0>;
  188. m25p,fast-read;
  189. spi-max-frequency = <50000000>;
  190. spi-rx-bus-width = <4>;
  191. partitions {
  192. compatible = "fixed-partitions";
  193. #address-cells = <1>;
  194. #size-cells = <1>;
  195. boot@0 {
  196. reg = <0x00000000 0x2000000>;
  197. read-only;
  198. };
  199. user@2000000 {
  200. reg = <0x2000000 0x2000000>;
  201. };
  202. };
  203. };
  204. };
  205. #if (!SW_SD0_DEV_SEL)
  206. &sdhi0 {
  207. pinctrl-0 = <&sdhi0_pins>;
  208. pinctrl-1 = <&sdhi0_pins_uhs>;
  209. pinctrl-names = "default", "state_uhs";
  210. vmmc-supply = <&reg_3p3v>;
  211. vqmmc-supply = <&vccq_sdhi0>;
  212. bus-width = <4>;
  213. sd-uhs-sdr50;
  214. sd-uhs-sdr104;
  215. status = "okay";
  216. };
  217. #endif
  218. #if SW_SD0_DEV_SEL
  219. &sdhi0 {
  220. pinctrl-0 = <&sdhi0_emmc_pins>;
  221. pinctrl-1 = <&sdhi0_emmc_pins>;
  222. pinctrl-names = "default", "state_uhs";
  223. vmmc-supply = <&reg_3p3v>;
  224. vqmmc-supply = <&reg_1p8v>;
  225. bus-width = <8>;
  226. mmc-hs200-1_8v;
  227. non-removable;
  228. fixed-emmc-driver-type = <1>;
  229. status = "okay";
  230. };
  231. #endif
  232. &wdt0 {
  233. status = "okay";
  234. timeout-sec = <60>;
  235. };
  236. &wdt1 {
  237. status = "okay";
  238. timeout-sec = <60>;
  239. };
  240. &wdt2 {
  241. status = "okay";
  242. timeout-sec = <60>;
  243. };