1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Google Gru-Chromebook shared properties
5 * Copyright 2018 Google, Inc
8 #include "rk3399-gru.dtsi"
12 compatible = "regulator-fixed";
13 regulator-name = "pp900_ap";
15 /* EC turns on w/ pp900_ap_en; always on for AP */
18 regulator-min-microvolt = <900000>;
19 regulator-max-microvolt = <900000>;
21 vin-supply = <&ppvar_sys>;
24 /* EC turns on w/ pp900_usb_en */
28 /* EC turns on w/ pp900_pcie_en */
29 pp900_pcie: pp900-ap {
33 compatible = "regulator-fixed";
34 regulator-name = "pp3000";
35 pinctrl-names = "default";
36 pinctrl-0 = <&pp3000_en>;
39 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
43 regulator-min-microvolt = <3000000>;
44 regulator-max-microvolt = <3000000>;
46 vin-supply = <&ppvar_sys>;
49 ppvar_centerlogic_pwm: ppvar-centerlogic-pwm {
50 compatible = "pwm-regulator";
51 regulator-name = "ppvar_centerlogic_pwm";
53 pwms = <&pwm3 0 3337 0>;
54 pwm-supply = <&ppvar_sys>;
55 pwm-dutycycle-range = <100 0>;
56 pwm-dutycycle-unit = <100>;
58 /* EC turns on w/ ppvar_centerlogic_en; always on for AP */
61 regulator-min-microvolt = <799434>;
62 regulator-max-microvolt = <1049925>;
65 ppvar_centerlogic: ppvar-centerlogic {
66 compatible = "vctrl-regulator";
67 regulator-name = "ppvar_centerlogic";
69 regulator-min-microvolt = <799434>;
70 regulator-max-microvolt = <1049925>;
72 ctrl-supply = <&ppvar_centerlogic_pwm>;
73 ctrl-voltage-range = <799434 1049925>;
75 regulator-settling-time-up-us = <378>;
76 min-slew-down-rate = <225>;
77 ovp-threshold-percent = <16>;
80 /* Schematics call this PPVAR even though it's fixed */
81 ppvar_logic: ppvar-logic {
82 compatible = "regulator-fixed";
83 regulator-name = "ppvar_logic";
85 /* EC turns on w/ ppvar_logic_en; always on for AP */
88 regulator-min-microvolt = <900000>;
89 regulator-max-microvolt = <900000>;
91 vin-supply = <&ppvar_sys>;
94 pp1800_audio: pp1800-audio {
95 compatible = "regulator-fixed";
96 regulator-name = "pp1800_audio";
97 pinctrl-names = "default";
98 pinctrl-0 = <&pp1800_audio_en>;
101 gpio = <&gpio0 2 GPIO_ACTIVE_HIGH>;
106 vin-supply = <&pp1800>;
109 /* gpio is shared with pp3300_wifi_bt */
110 pp1800_pcie: pp1800-pcie {
111 compatible = "regulator-fixed";
112 regulator-name = "pp1800_pcie";
113 pinctrl-names = "default";
114 pinctrl-0 = <&wlan_module_pd_l>;
117 gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
120 * Need to wait 1ms + ramp-up time before we can power on WiFi.
121 * This has been approximated as 8ms total.
123 regulator-enable-ramp-delay = <8000>;
125 vin-supply = <&pp1800>;
128 /* Always on; plain and simple */
129 pp3000_ap: pp3000_emmc: pp3000 {
132 pp1500_ap_io: pp1500-ap-io {
133 compatible = "regulator-fixed";
134 regulator-name = "pp1500_ap_io";
135 pinctrl-names = "default";
136 pinctrl-0 = <&pp1500_en>;
139 gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
143 regulator-min-microvolt = <1500000>;
144 regulator-max-microvolt = <1500000>;
146 vin-supply = <&pp1800>;
149 pp3300_disp: pp3300-disp {
150 compatible = "regulator-fixed";
151 regulator-name = "pp3300_disp";
152 pinctrl-names = "default";
153 pinctrl-0 = <&pp3300_disp_en>;
156 gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>;
158 startup-delay-us = <2000>;
159 vin-supply = <&pp3300>;
162 /* EC turns on w/ pp3300_usb_en_l */
166 /* gpio is shared with pp1800_pcie and pinctrl is set there */
167 pp3300_wifi_bt: pp3300-wifi-bt {
168 compatible = "regulator-fixed";
169 regulator-name = "pp3300_wifi_bt";
172 gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
174 vin-supply = <&pp3300>;
178 * This is a bit of a hack. The WiFi module should be reset at least
179 * 1ms after its regulators have ramped up (max rampup time is ~7ms).
180 * With some stretching of the imagination, we can call the 1.8V
181 * regulator a supply.
183 wlan_pd_n: wlan-pd-n {
184 compatible = "regulator-fixed";
185 regulator-name = "wlan_pd_n";
186 pinctrl-names = "default";
187 pinctrl-0 = <&wlan_module_reset_l>;
190 gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
192 vin-supply = <&pp1800_pcie>;
195 backlight: backlight {
196 compatible = "pwm-backlight";
197 enable-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
198 power-supply = <&pp3300_disp>;
199 pinctrl-names = "default";
200 pinctrl-0 = <&bl_en>;
203 gpio_keys: gpio-keys {
204 compatible = "gpio-keys";
205 pinctrl-names = "default";
206 pinctrl-0 = <&bt_host_wake_l>;
208 wake_on_bt: key-wake-on-bt {
209 label = "Wake-on-Bluetooth";
210 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
211 linux,code = <KEY_WAKEUP>;
218 min-slew-down-rate = <225>;
219 ovp-threshold-percent = <16>;
223 min-slew-down-rate = <225>;
224 ovp-threshold-percent = <16>;
228 min-slew-down-rate = <225>;
229 ovp-threshold-percent = <16>;
233 extcon = <&usbc_extcon0>, <&usbc_extcon1>;
237 center-supply = <&ppvar_centerlogic>;
238 rockchip,pd-idle-dis-freq-hz = <800000000>;
239 rockchip,sr-idle-dis-freq-hz = <800000000>;
240 rockchip,sr-mc-gate-idle-dis-freq-hz = <800000000>;
247 * eDP PHY/clk don't sync reliably at anything other than 24 MHz. Only
248 * set this here, because rk3399-gru.dtsi ensures we can generate this
249 * off GPLL=600MHz, whereas some other RK3399 boards may not.
251 assigned-clocks = <&cru PCLK_EDP>;
252 assigned-clock-rates = <24000000>;
257 #address-cells = <1>;
260 edp_out_panel: endpoint@0 {
262 remote-endpoint = <&panel_in_edp>;
269 gpio-line-names = /* GPIO0 A 0-7 */
276 "CENTERLOGIC_DVS_PWM",
283 "AP_EC_WARM_RESET_REQ",
288 gpio-line-names = /* GPIO1 A 0-7 */
299 "AP_SPI_FLASH_MOSI_R",
300 "AP_SPI_FLASH_CLK_R",
301 "AP_SPI_FLASH_CS_L_R",
302 "WLAN_MODULE_RESET_L",
312 * AP_FLASH_WP is crossystem ABI. Schematics call it
313 * AP_FW_WP or CPU1_FW_WP, depending on the variant.
324 gpio-line-names = /* GPIO2 A 0-7 */
357 "WIFI_PCIE_CLKREQ_L",
359 "SD_PWR_3000_1800_L";
363 gpio-line-names = /* GPIO3 A 0-7 */
405 gpio-line-names = /* GPIO4 A 0-7 */
447 clock-frequency = <400000>;
449 /* These are relatively safe rise/fall times */
450 i2c-scl-falling-time-ns = <50>;
451 i2c-scl-rising-time-ns = <300>;
453 headsetcodec: rt5514@57 {
454 compatible = "realtek,rt5514";
456 realtek,dmic-init-delay-ms = <20>;
463 clock-frequency = <400000>;
465 /* These are relatively safe rise/fall times */
466 i2c-scl-falling-time-ns = <50>;
467 i2c-scl-rising-time-ns = <300>;
470 * Note strange pullup enable. Apparently this avoids leakage but
471 * still allows us to get nice 4.7K pullups for high speed i2c
472 * transfers. Basically we want the pullup on whenever the ap is
473 * alive, so the "en" pin just gets set to output high.
475 pinctrl-0 = <&i2c5_xfer &ap_i2c_tp_pu_en>;
480 compatible = "google,cros-ec-pwm";
484 usbc_extcon1: extcon1 {
485 compatible = "google,extcon-usbc-cros-ec";
486 google,usb-port-id = <1>;
491 rockchip,codec = <&max98357a &headsetcodec
492 &codec &wacky_spi_audio &cdn_dp>;
496 wacky_spi_audio: spi2@0 {
497 compatible = "realtek,rt5514";
499 interrupt-parent = <&gpio1>;
500 interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
501 pinctrl-names = "default";
502 pinctrl-0 = <&mic_int>;
503 /* May run faster once verified. */
504 spi-max-frequency = <10000000>;
511 compatible = "pci1b4b,2b42";
512 reg = <0x0000 0x0 0x0 0x0 0x0>;
513 interrupt-parent = <&gpio0>;
514 interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
515 pinctrl-names = "default";
516 pinctrl-0 = <&wlan_host_wake_l>;
523 extcon = <&usbc_extcon1>;
544 extcon = <&usbc_extcon1>;
553 discrete-regulators {
554 pp1500_en: pp1500-en {
555 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO
559 pp1800_audio_en: pp1800-audio-en {
560 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO
564 pp3000_en: pp3000-en {
565 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO
569 pp3300_disp_en: pp3300-disp-en {
570 rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO
574 wlan_module_pd_l: wlan-module-pd-l {
575 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO
582 wifi_perst_l: wifi-perst-l {
583 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
586 wlan_host_wake_l: wlan-host-wake-l {
587 /* Kevin has an external pull up, but Bob does not */
588 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;