rk3288-veyron-chromebook.dtsi 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Google Veyron (and derivatives) board device tree source
  4. * Chromebook specific parts
  5. *
  6. * Copyright 2015 Google, Inc
  7. */
  8. #include <dt-bindings/clock/rockchip,rk808.h>
  9. #include <dt-bindings/input/input.h>
  10. #include "rk3288-veyron.dtsi"
  11. #include "rk3288-veyron-analog-audio.dtsi"
  12. #include "rk3288-veyron-edp.dtsi"
  13. #include "rk3288-veyron-sdmmc.dtsi"
  14. / {
  15. aliases {
  16. /* Assign 20 so we don't get confused w/ builtin ones */
  17. i2c20 = &i2c_tunnel;
  18. };
  19. gpio-charger {
  20. compatible = "gpio-charger";
  21. charger-type = "mains";
  22. gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
  23. pinctrl-names = "default";
  24. pinctrl-0 = <&ac_present_ap>;
  25. };
  26. lid_switch: lid-switch {
  27. compatible = "gpio-keys";
  28. pinctrl-names = "default";
  29. pinctrl-0 = <&ap_lid_int_l>;
  30. switch-lid {
  31. label = "Lid";
  32. gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
  33. wakeup-source;
  34. linux,code = <SW_LID>;
  35. linux,input-type = <EV_SW>;
  36. debounce-interval = <1>;
  37. };
  38. };
  39. /* A non-regulated voltage from power supply or battery */
  40. vccsys: vccsys {
  41. compatible = "regulator-fixed";
  42. regulator-name = "vccsys";
  43. regulator-boot-on;
  44. regulator-always-on;
  45. };
  46. vcc33_sys: vcc33-sys {
  47. vin-supply = <&vccsys>;
  48. };
  49. vcc_5v: vcc-5v {
  50. vin-supply = <&vccsys>;
  51. };
  52. /* This turns on vbus for host1 (dwc2) */
  53. vcc5_host1: vcc5-host1-regulator {
  54. compatible = "regulator-fixed";
  55. enable-active-high;
  56. gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
  57. pinctrl-names = "default";
  58. pinctrl-0 = <&host1_pwr_en>;
  59. regulator-name = "vcc5_host1";
  60. regulator-always-on;
  61. regulator-boot-on;
  62. };
  63. /* This turns on vbus for otg for host mode (dwc2) */
  64. vcc5v_otg: vcc5v-otg-regulator {
  65. compatible = "regulator-fixed";
  66. enable-active-high;
  67. gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
  68. pinctrl-names = "default";
  69. pinctrl-0 = <&usbotg_pwren_h>;
  70. regulator-name = "vcc5_host2";
  71. regulator-always-on;
  72. regulator-boot-on;
  73. };
  74. };
  75. &rk808 {
  76. vcc11-supply = <&vcc_5v>;
  77. regulators {
  78. vcc33_ccd: LDO_REG8 {
  79. regulator-name = "vcc33_ccd";
  80. regulator-always-on;
  81. regulator-boot-on;
  82. regulator-min-microvolt = <3300000>;
  83. regulator-max-microvolt = <3300000>;
  84. regulator-state-mem {
  85. regulator-off-in-suspend;
  86. };
  87. };
  88. };
  89. };
  90. &spi0 {
  91. status = "okay";
  92. cros_ec: ec@0 {
  93. compatible = "google,cros-ec-spi";
  94. reg = <0>;
  95. google,cros-ec-spi-pre-delay = <30>;
  96. interrupt-parent = <&gpio7>;
  97. interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
  98. pinctrl-names = "default";
  99. pinctrl-0 = <&ec_int>;
  100. spi-max-frequency = <3000000>;
  101. i2c_tunnel: i2c-tunnel {
  102. compatible = "google,cros-ec-i2c-tunnel";
  103. google,remote-bus = <0>;
  104. #address-cells = <1>;
  105. #size-cells = <0>;
  106. };
  107. };
  108. };
  109. &i2c4 {
  110. trackpad@15 {
  111. compatible = "elan,ekth3000";
  112. reg = <0x15>;
  113. interrupt-parent = <&gpio7>;
  114. interrupts = <RK_PA3 IRQ_TYPE_EDGE_FALLING>;
  115. pinctrl-names = "default";
  116. pinctrl-0 = <&trackpad_int>;
  117. vcc-supply = <&vcc33_io>;
  118. wakeup-source;
  119. };
  120. };
  121. &pinctrl {
  122. buttons {
  123. ap_lid_int_l: ap-lid-int-l {
  124. rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
  125. };
  126. };
  127. charger {
  128. ac_present_ap: ac-present-ap {
  129. rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
  130. };
  131. };
  132. cros-ec {
  133. ec_int: ec-int {
  134. rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
  135. };
  136. };
  137. suspend {
  138. suspend_l_wake: suspend-l-wake {
  139. rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_output_low>;
  140. };
  141. suspend_l_sleep: suspend-l-sleep {
  142. rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_output_high>;
  143. };
  144. };
  145. trackpad {
  146. trackpad_int: trackpad-int {
  147. rockchip,pins = <7 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  148. };
  149. };
  150. usb-host {
  151. host1_pwr_en: host1-pwr-en {
  152. rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  153. };
  154. usbotg_pwren_h: usbotg-pwren-h {
  155. rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
  156. };
  157. };
  158. };
  159. #include "cros-ec-keyboard.dtsi"