Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Google Veyron (and derivatives) board device tree source
0004  * Chromebook specific parts
0005  *
0006  * Copyright 2015 Google, Inc
0007  */
0008 
0009 #include <dt-bindings/clock/rockchip,rk808.h>
0010 #include <dt-bindings/input/input.h>
0011 #include "rk3288-veyron.dtsi"
0012 #include "rk3288-veyron-analog-audio.dtsi"
0013 #include "rk3288-veyron-edp.dtsi"
0014 #include "rk3288-veyron-sdmmc.dtsi"
0015 
0016 / {
0017         aliases {
0018                 /* Assign 20 so we don't get confused w/ builtin ones */
0019                 i2c20 = &i2c_tunnel;
0020         };
0021 
0022         gpio-charger {
0023                 compatible = "gpio-charger";
0024                 charger-type = "mains";
0025                 gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
0026                 pinctrl-names = "default";
0027                 pinctrl-0 = <&ac_present_ap>;
0028         };
0029 
0030         lid_switch: lid-switch {
0031                 compatible = "gpio-keys";
0032                 pinctrl-names = "default";
0033                 pinctrl-0 = <&ap_lid_int_l>;
0034 
0035                 switch-lid {
0036                         label = "Lid";
0037                         gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
0038                         wakeup-source;
0039                         linux,code = <SW_LID>;
0040                         linux,input-type = <EV_SW>;
0041                         debounce-interval = <1>;
0042                 };
0043         };
0044 
0045         /* A non-regulated voltage from power supply or battery */
0046         vccsys: vccsys {
0047                 compatible = "regulator-fixed";
0048                 regulator-name = "vccsys";
0049                 regulator-boot-on;
0050                 regulator-always-on;
0051         };
0052 
0053         vcc33_sys: vcc33-sys {
0054                 vin-supply = <&vccsys>;
0055         };
0056 
0057         vcc_5v: vcc-5v {
0058                 vin-supply = <&vccsys>;
0059         };
0060 
0061         /* This turns on vbus for host1 (dwc2) */
0062         vcc5_host1: vcc5-host1-regulator {
0063                 compatible = "regulator-fixed";
0064                 enable-active-high;
0065                 gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
0066                 pinctrl-names = "default";
0067                 pinctrl-0 = <&host1_pwr_en>;
0068                 regulator-name = "vcc5_host1";
0069                 regulator-always-on;
0070                 regulator-boot-on;
0071         };
0072 
0073         /* This turns on vbus for otg for host mode (dwc2) */
0074         vcc5v_otg: vcc5v-otg-regulator {
0075                 compatible = "regulator-fixed";
0076                 enable-active-high;
0077                 gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
0078                 pinctrl-names = "default";
0079                 pinctrl-0 = <&usbotg_pwren_h>;
0080                 regulator-name = "vcc5_host2";
0081                 regulator-always-on;
0082                 regulator-boot-on;
0083         };
0084 };
0085 
0086 &rk808 {
0087         vcc11-supply = <&vcc_5v>;
0088 
0089         regulators {
0090                 vcc33_ccd: LDO_REG8 {
0091                         regulator-name = "vcc33_ccd";
0092                         regulator-always-on;
0093                         regulator-boot-on;
0094                         regulator-min-microvolt = <3300000>;
0095                         regulator-max-microvolt = <3300000>;
0096                         regulator-state-mem {
0097                                 regulator-off-in-suspend;
0098                         };
0099                 };
0100         };
0101 };
0102 
0103 &spi0 {
0104         status = "okay";
0105 
0106         cros_ec: ec@0 {
0107                 compatible = "google,cros-ec-spi";
0108                 reg = <0>;
0109                 google,cros-ec-spi-pre-delay = <30>;
0110                 interrupt-parent = <&gpio7>;
0111                 interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
0112                 pinctrl-names = "default";
0113                 pinctrl-0 = <&ec_int>;
0114                 spi-max-frequency = <3000000>;
0115 
0116                 i2c_tunnel: i2c-tunnel {
0117                         compatible = "google,cros-ec-i2c-tunnel";
0118                         google,remote-bus = <0>;
0119                         #address-cells = <1>;
0120                         #size-cells = <0>;
0121                 };
0122         };
0123 };
0124 
0125 &i2c4 {
0126         trackpad@15 {
0127                 compatible = "elan,ekth3000";
0128                 reg = <0x15>;
0129                 interrupt-parent = <&gpio7>;
0130                 interrupts = <RK_PA3 IRQ_TYPE_EDGE_FALLING>;
0131                 pinctrl-names = "default";
0132                 pinctrl-0 = <&trackpad_int>;
0133                 vcc-supply = <&vcc33_io>;
0134                 wakeup-source;
0135         };
0136 };
0137 
0138 &pinctrl {
0139         buttons {
0140                 ap_lid_int_l: ap-lid-int-l {
0141                         rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
0142                 };
0143         };
0144 
0145         charger {
0146                 ac_present_ap: ac-present-ap {
0147                         rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
0148                 };
0149         };
0150 
0151         cros-ec {
0152                 ec_int: ec-int {
0153                         rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
0154                 };
0155         };
0156 
0157         suspend {
0158                 suspend_l_wake: suspend-l-wake {
0159                         rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_output_low>;
0160                 };
0161 
0162                 suspend_l_sleep: suspend-l-sleep {
0163                         rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_output_high>;
0164                 };
0165         };
0166 
0167         trackpad {
0168                 trackpad_int: trackpad-int {
0169                         rockchip,pins = <7 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
0170                 };
0171         };
0172 
0173         usb-host {
0174                 host1_pwr_en: host1-pwr-en {
0175                         rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
0176                 };
0177 
0178                 usbotg_pwren_h: usbotg-pwren-h {
0179                         rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
0180                 };
0181         };
0182 };
0183 
0184 #include "cros-ec-keyboard.dtsi"