314 lines
7.3 KiB
Plaintext
314 lines
7.3 KiB
Plaintext
/*
|
|
* Copyright (c) 2017 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 <dt-bindings/pwm/pwm.h>
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
#include "rk3229-at-common.dtsi"
|
|
|
|
/ {
|
|
|
|
hdmi_sound: hdmi-sound {
|
|
status = "okay";
|
|
compatible = "simple-audio-card";
|
|
simple-audio-card,format = "i2s";
|
|
simple-audio-card,mclk-fs = <256>;
|
|
simple-audio-card,name = "rockchip,hdmi";
|
|
simple-audio-card,cpu {
|
|
sound-dai = <&i2s0>;
|
|
};
|
|
simple-audio-card,codec {
|
|
sound-dai = <&hdmi>;
|
|
};
|
|
};
|
|
|
|
gva_codec: gva-codec{
|
|
compatible = "rockchip,gva-codec";
|
|
#sound-dai-cells = <0>;
|
|
status = "okay";
|
|
};
|
|
|
|
gva-sound {
|
|
compatible = "simple-audio-card";
|
|
simple-audio-card,format = "i2s";
|
|
simple-audio-card,name = "rockchip,rk3229-dummy";
|
|
simple-audio-card,mclk-fs = <256>;
|
|
simple-audio-card,cpu {
|
|
sound-dai = <&i2s1>;
|
|
};
|
|
simple-audio-card,codec {
|
|
sound-dai = <&gva_codec>;
|
|
};
|
|
};
|
|
|
|
vcc_otg_vbus: otg-vbus-regulator {
|
|
compatible = "regulator-fixed";
|
|
gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&otg_vbus_drv>;
|
|
regulator-name = "vcc_otg_vbus";
|
|
regulator-min-microvolt = <5000000>;
|
|
regulator-max-microvolt = <5000000>;
|
|
enable-active-high;
|
|
};
|
|
};
|
|
|
|
&hdmi {
|
|
status = "okay";
|
|
#sound-dai-cells = <0>;
|
|
ddc-i2c-scl-high-time-ns = <9625>;
|
|
ddc-i2c-scl-low-time-ns = <10000>;
|
|
};
|
|
|
|
&hdmi_phy {
|
|
status = "okay";
|
|
};
|
|
|
|
&i2c0 {
|
|
status = "okay";
|
|
|
|
cw2015@62 {
|
|
status = "okay";
|
|
compatible = "cw201x";
|
|
reg = <0x62>;
|
|
bat_config_info = <0x15 0x42 0x60 0x59 0x52 0x58
|
|
0x4D 0x48 0x48 0x44 0x44 0x46 0x49 0x48 0x32
|
|
0x24 0x20 0x17 0x13 0x0F 0x19 0x3E 0x51 0x45
|
|
0x08 0x76 0x0B 0x85 0x0E 0x1C 0x2E 0x3E 0x4D
|
|
0x52 0x52 0x57 0x3D 0x1B 0x6A 0x2D 0x25 0x43
|
|
0x52 0x87 0x8F 0x91 0x94 0x52 0x82 0x8C 0x92
|
|
0x96 0xFF 0x7B 0xBB 0xCB 0x2F 0x7D 0x72 0xA5
|
|
0xB5 0xC1 0x46 0xAE>;
|
|
monitor_sec = <5>;
|
|
virtual_power = <0>;
|
|
hw_id_check = <1>;
|
|
hw-id0-gpio = <&gpio2 22 GPIO_ACTIVE_HIGH>;
|
|
hw-id1-gpio = <&gpio2 23 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
&i2c1 {
|
|
status = "okay";
|
|
};
|
|
|
|
&i2c2 {
|
|
status = "okay";
|
|
};
|
|
|
|
&i2s1 {
|
|
status = "okay";
|
|
rockchip,i2s-broken-burst-len;
|
|
rockchip,playback-channels = <8>;
|
|
rockchip,capture-channels = <8>;
|
|
rockchip,bclk-fs = <64>;
|
|
#sound-dai-cells = <0>;
|
|
};
|
|
|
|
&pinctrl {
|
|
sdmmc {
|
|
sdmmc_gpio: sdmmc-gpio {
|
|
rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>,
|
|
<1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>,
|
|
<1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>,
|
|
<1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>,
|
|
<1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>,
|
|
<1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
};
|
|
};
|
|
|
|
fixed_io {
|
|
fixed_gpio: fixed-gpio {
|
|
rockchip,pins = <2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>,
|
|
<1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,
|
|
<1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>,
|
|
<0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>,
|
|
<0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
};
|
|
};
|
|
|
|
ir {
|
|
ir_gpio: ir-gpio {
|
|
rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
};
|
|
};
|
|
|
|
pwm0 {
|
|
pwm0_gpio: pwm0-gpio {
|
|
rockchip,pins = <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
};
|
|
|
|
pwm2 {
|
|
pwm2_gpio: pwm2-gpio {
|
|
rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
};
|
|
};
|
|
|
|
spdif {
|
|
spdif_gpio: spdif-gpio {
|
|
rockchip,pins = <3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
};
|
|
|
|
usb {
|
|
otg_vbus_drv: otg-vbus-drv {
|
|
rockchip,pins = <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&rockchip_suspend {
|
|
status = "okay";
|
|
rockchip,sleep-mode-config = <
|
|
(0
|
|
|RKPM_CTR_GTCLKS
|
|
|RKPM_CTR_IDLESRAM_MD
|
|
|RKPM_CTR_PMIC
|
|
)
|
|
>;
|
|
};
|
|
|
|
&sdio {
|
|
bus-width = <4>;
|
|
cap-mmc-highspeed;
|
|
cap-sd-highspeed;
|
|
cap-sdio-irq;
|
|
non-removable;
|
|
ignore-pm-notify;
|
|
keep-power-in-suspend;
|
|
max-frequency = <150000000>;
|
|
no-sd;
|
|
no-mmc;
|
|
};
|
|
|
|
&spi0 {
|
|
status = "okay";
|
|
max-freq = <48000000>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&spi1_clk &spi1_tx &spi1_rx &spi1_cs0 &spi1_cs1>;
|
|
|
|
spi_slave@0 {
|
|
compatible = "rockchip,spidev";
|
|
reg = <0>;
|
|
spi-max-frequency = <12000000>;
|
|
};
|
|
|
|
spi_slave@1 {
|
|
compatible = "rockchip,spidev";
|
|
reg = <1>;
|
|
spi-max-frequency = <12000000>;
|
|
};
|
|
};
|
|
|
|
&u2phy0 {
|
|
status = "okay";
|
|
|
|
u2phy0_otg: otg-port {
|
|
vbus-supply = <&vcc_otg_vbus>;
|
|
status = "okay";
|
|
};
|
|
|
|
u2phy0_host: host-port {
|
|
status = "okay";
|
|
};
|
|
};
|
|
|
|
&u2phy1 {
|
|
status = "okay";
|
|
|
|
u2phy1_otg: otg-port {
|
|
status = "okay";
|
|
};
|
|
|
|
u2phy1_host: host-port {
|
|
status = "okay";
|
|
};
|
|
};
|
|
|
|
&usb_host0_ehci {
|
|
status = "okay";
|
|
};
|
|
|
|
&usb_host0_ohci {
|
|
status = "okay";
|
|
};
|
|
|
|
&uart0 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&uart0_xfer>;
|
|
status = "okay";
|
|
};
|
|
|
|
&uart1 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&uart11_xfer &uart11_cts>;
|
|
status = "okay";
|
|
};
|
|
|
|
&usb_otg {
|
|
status = "okay";
|
|
};
|
|
|
|
&gmac {
|
|
assigned-clocks = <&cru SCLK_MAC_SRC>;
|
|
assigned-clock-rates = <50000000>;
|
|
clock_in_out = "output";
|
|
phy-supply = <&vcc_18>;
|
|
phy-mode = "rmii";
|
|
phy-is-integrated;
|
|
status = "okay";
|
|
};
|