0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
0004 */
0005
0006 /dts-v1/;
0007 #include "rk3399-sapphire.dtsi"
0008
0009 / {
0010 model = "Excavator-RK3399 Board";
0011 compatible = "rockchip,rk3399-sapphire-excavator", "rockchip,rk3399";
0012
0013 aliases {
0014 mmc2 = &sdio0;
0015 };
0016
0017 adc-keys {
0018 compatible = "adc-keys";
0019 io-channels = <&saradc 1>;
0020 io-channel-names = "buttons";
0021 keyup-threshold-microvolt = <1800000>;
0022 poll-interval = <100>;
0023
0024 button-up {
0025 label = "Volume Up";
0026 linux,code = <KEY_VOLUMEUP>;
0027 press-threshold-microvolt = <100000>;
0028 };
0029
0030 button-down {
0031 label = "Volume Down";
0032 linux,code = <KEY_VOLUMEDOWN>;
0033 press-threshold-microvolt = <300000>;
0034 };
0035
0036 back {
0037 label = "Back";
0038 linux,code = <KEY_BACK>;
0039 press-threshold-microvolt = <985000>;
0040 };
0041
0042 menu {
0043 label = "Menu";
0044 linux,code = <KEY_MENU>;
0045 press-threshold-microvolt = <1314000>;
0046 };
0047 };
0048
0049 backlight: backlight {
0050 compatible = "pwm-backlight";
0051 brightness-levels = <
0052 0 1 2 3 4 5 6 7
0053 8 9 10 11 12 13 14 15
0054 16 17 18 19 20 21 22 23
0055 24 25 26 27 28 29 30 31
0056 32 33 34 35 36 37 38 39
0057 40 41 42 43 44 45 46 47
0058 48 49 50 51 52 53 54 55
0059 56 57 58 59 60 61 62 63
0060 64 65 66 67 68 69 70 71
0061 72 73 74 75 76 77 78 79
0062 80 81 82 83 84 85 86 87
0063 88 89 90 91 92 93 94 95
0064 96 97 98 99 100 101 102 103
0065 104 105 106 107 108 109 110 111
0066 112 113 114 115 116 117 118 119
0067 120 121 122 123 124 125 126 127
0068 128 129 130 131 132 133 134 135
0069 136 137 138 139 140 141 142 143
0070 144 145 146 147 148 149 150 151
0071 152 153 154 155 156 157 158 159
0072 160 161 162 163 164 165 166 167
0073 168 169 170 171 172 173 174 175
0074 176 177 178 179 180 181 182 183
0075 184 185 186 187 188 189 190 191
0076 192 193 194 195 196 197 198 199
0077 200 201 202 203 204 205 206 207
0078 208 209 210 211 212 213 214 215
0079 216 217 218 219 220 221 222 223
0080 224 225 226 227 228 229 230 231
0081 232 233 234 235 236 237 238 239
0082 240 241 242 243 244 245 246 247
0083 248 249 250 251 252 253 254 255>;
0084 default-brightness-level = <200>;
0085 enable-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
0086 pwms = <&pwm0 0 25000 0>;
0087 status = "okay";
0088 };
0089
0090 edp_panel: edp-panel {
0091 compatible = "lg,lp079qx1-sp0v";
0092 backlight = <&backlight>;
0093 enable-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
0094 pinctrl-names = "default";
0095 pinctrl-0 = <&lcd_panel_reset>;
0096 power-supply = <&vcc3v3_s0>;
0097
0098 port {
0099 panel_in_edp: endpoint {
0100 remote-endpoint = <&edp_out_panel>;
0101 };
0102 };
0103 };
0104
0105 rt5651-sound {
0106 compatible = "simple-audio-card";
0107 simple-audio-card,name = "realtek,rt5651-codec";
0108 simple-audio-card,format = "i2s";
0109 simple-audio-card,mclk-fs = <256>;
0110 simple-audio-card,widgets =
0111 "Microphone", "Mic Jack",
0112 "Headphone", "Headphone Jack";
0113 simple-audio-card,routing =
0114 "Mic Jack", "MICBIAS1",
0115 "IN1P", "Mic Jack",
0116 "Headphone Jack", "HPOL",
0117 "Headphone Jack", "HPOR";
0118 simple-audio-card,cpu {
0119 sound-dai = <&i2s0>;
0120 };
0121 simple-audio-card,codec {
0122 sound-dai = <&rt5651>;
0123 };
0124 };
0125
0126 sdio_pwrseq: sdio-pwrseq {
0127 compatible = "mmc-pwrseq-simple";
0128 clocks = <&rk808 1>;
0129 clock-names = "ext_clock";
0130 pinctrl-names = "default";
0131 pinctrl-0 = <&wifi_enable_h>;
0132
0133 /*
0134 * On the module itself this is one of these (depending
0135 * on the actual card populated):
0136 * - SDIO_RESET_L_WL_REG_ON
0137 * - PDN (power down when low)
0138 */
0139 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
0140 };
0141 };
0142
0143 &edp {
0144 status = "okay";
0145
0146 ports {
0147 edp_out: port@1 {
0148 reg = <1>;
0149 #address-cells = <1>;
0150 #size-cells = <0>;
0151
0152 edp_out_panel: endpoint@0 {
0153 reg = <0>;
0154 remote-endpoint = <&panel_in_edp>;
0155 };
0156 };
0157 };
0158 };
0159
0160 &i2c1 {
0161 i2c-scl-rising-time-ns = <300>;
0162 i2c-scl-falling-time-ns = <15>;
0163 status = "okay";
0164
0165 rt5651: rt5651@1a {
0166 compatible = "rockchip,rt5651";
0167 reg = <0x1a>;
0168 clocks = <&cru SCLK_I2S_8CH_OUT>;
0169 clock-names = "mclk";
0170 hp-det-gpio = <&gpio4 RK_PC4 GPIO_ACTIVE_LOW>;
0171 spk-con-gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
0172 #sound-dai-cells = <0>;
0173 };
0174 };
0175
0176 &i2c4 {
0177 i2c-scl-rising-time-ns = <600>;
0178 i2c-scl-falling-time-ns = <20>;
0179 status = "okay";
0180
0181 accelerometer@68 {
0182 compatible = "invensense,mpu6500";
0183 reg = <0x68>;
0184 interrupt-parent = <&gpio1>;
0185 interrupts = <RK_PC6 IRQ_TYPE_EDGE_RISING>;
0186 };
0187 };
0188
0189 &i2s0 {
0190 rockchip,playback-channels = <8>;
0191 rockchip,capture-channels = <8>;
0192 status = "okay";
0193 };
0194
0195 &pcie_phy {
0196 status = "okay";
0197 };
0198
0199 &pcie0 {
0200 ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
0201 num-lanes = <4>;
0202 pinctrl-names = "default";
0203 pinctrl-0 = <&pcie_clkreqn_cpm>;
0204 status = "okay";
0205 };
0206
0207 &pinctrl {
0208 sdio-pwrseq {
0209 wifi_enable_h: wifi-enable-h {
0210 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
0211 };
0212 };
0213
0214 lcd-panel {
0215 lcd_panel_reset: lcd-panel-reset {
0216 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
0217 };
0218 };
0219 };
0220
0221 &sdio0 {
0222 bus-width = <4>;
0223 cap-sd-highspeed;
0224 cap-sdio-irq;
0225 clock-frequency = <50000000>;
0226 keep-power-in-suspend;
0227 max-frequency = <50000000>;
0228 mmc-pwrseq = <&sdio_pwrseq>;
0229 non-removable;
0230 pinctrl-names = "default";
0231 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
0232 sd-uhs-sdr104;
0233 status = "okay";
0234 };
0235
0236 &spdif {
0237 status = "okay";
0238 };