/* * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd * * This file is dual-licensed: you can use it either under the terms * of the GPL or the X11 license, at your option. Note that this dual * licensing only applies to this file, and not this project as a * whole. * * a) This file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Or, alternatively, * * b) Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ #include "rk3399-sapphire.dtsi" / { compatible = "rockchip,rk3399-sapphire-excavator", "rockchip,rk3399"; rt5651-sound { compatible = "simple-audio-card"; simple-audio-card,format = "i2s"; simple-audio-card,name = "realtek,rt5651-codec"; simple-audio-card,mclk-fs = <256>; simple-audio-card,widgets = "Microphone", "Mic Jack", "Headphone", "Headphone Jack"; simple-audio-card,routing = "Mic Jack", "MICBIAS1", "IN1P", "Mic Jack", "Headphone Jack", "HPOL", "Headphone Jack", "HPOR"; simple-audio-card,cpu { sound-dai = <&i2s0>; }; simple-audio-card,codec { sound-dai = <&rt5651>; }; }; spdif-sound { status = "okay"; compatible = "simple-audio-card"; simple-audio-card,name = "ROCKCHIP,SPDIF"; simple-audio-card,cpu { sound-dai = <&spdif>; }; simple-audio-card,codec { sound-dai = <&spdif_out>; }; }; spdif_out: spdif-out { status = "okay"; compatible = "linux,spdif-dit"; #sound-dai-cells = <0>; }; sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rk808 1>; clock-names = "ext_clock"; pinctrl-names = "default"; pinctrl-0 = <&wifi_enable_h>; /* * On the module itself this is one of these (depending * on the actual card populated): * - SDIO_RESET_L_WL_REG_ON * - PDN (power down when low) */ reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */ }; wireless-wlan { compatible = "wlan-platdata"; rockchip,grf = <&grf>; wifi_chip_type = "ap6354"; sdio_vref = <1800>; WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */ status = "okay"; }; wireless-bluetooth { compatible = "bluetooth-platdata"; //wifi-bt-power-toggle; uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */ pinctrl-names = "default", "rts_gpio"; pinctrl-0 = <&uart0_rts>; pinctrl-1 = <&uart0_gpios>; //BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */ BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */ BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */ BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */ status = "okay"; }; }; &spdif { status = "okay"; pinctrl-0 = <&spdif_bus>; i2c-scl-rising-time-ns = <450>; i2c-scl-falling-time-ns = <15>; #sound-dai-cells = <0>; }; &i2c1 { status = "okay"; i2c-scl-rising-time-ns = <300>; i2c-scl-falling-time-ns = <15>; rt5651: rt5651@1a { #sound-dai-cells = <0>; compatible = "rockchip,rt5651"; reg = <0x1a>; clocks = <&cru SCLK_I2S_8CH_OUT>; clock-names = "mclk"; spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; hp-det-gpio = <&gpio4 28 GPIO_ACTIVE_LOW>; }; }; &i2c4 { status = "okay"; i2c-scl-rising-time-ns = <600>; i2c-scl-falling-time-ns = <20>; mpu6500@68 { status = "okay"; compatible = "invensense,mpu6500"; reg = <0x68>; irq-gpio = <&gpio1 22 IRQ_TYPE_EDGE_RISING>; mpu-int_config = <0x10>; mpu-level_shifter = <0>; mpu-orientation = <0 1 0 1 0 0 0 0 1>; orientation-x= <1>; orientation-y= <0>; orientation-z= <0>; mpu-debug = <1>; }; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_xfer &uart0_cts>; status = "okay"; }; &saradc { status = "okay"; }; &pinctrl { sdio-pwrseq { wifi_enable_h: wifi-enable-h { rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>; }; }; wireless-bluetooth { uart0_gpios: uart0-gpios { rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>; }; }; };