CoolPi-Armbian-Rockchip-RK3.../arch/arm/boot/dts/rk3288-firefly-rk808.dts

755 lines
16 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.
*/
/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/display/media-bus-format.h>
#include "rk3288-firefly.dtsi"
#include "rk3288-android.dtsi"
/ {
model = "Firefly-RK3288";
compatible = "firefly,firefly-rk3288", "rockchip,rk3288";
chosen {
bootargs = "earlycon=uart8250,mmio32,0xff690000";
};
sdio_pwrseq: sdio-pwrseq {
clocks = <&rk808 1>;
};
wireless-bluetooth {
clocks = <&rk808 1>;
clock-names = "ext_clock";
};
/delete-node/ sdmmc-regulator;
vcc_sd: sdmmc-regulator {
compatible = "regulator-fixed";
gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc_pwr>;
regulator-name = "vcc_sd";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
startup-delay-us = <100000>;
vin-supply = <&vcc_io>;
};
vcc_lcd: vcc-lcd {
compatible = "regulator-fixed";
regulator-boot-on;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&lcd_en>;
regulator-name = "vcc_lcd";
vin-supply = <&vcc_io>;
};
sound: sound {
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "rockchip,firefly-codec";
simple-audio-card,mclk-fs = <512>;
simple-audio-card,widgets =
"Microphone", "Microphone Jack",
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"MIC1", "Microphone Jack",
"MIC2", "Microphone Jack",
"Microphone Jack", "micbias1",
"Headphone Jack", "HPOL",
"Headphone Jack", "HPOR";
simple-audio-card,dai-link@0 {
format = "i2s";
cpu {
sound-dai = <&i2s>;
};
codec {
sound-dai = <&es8323>;
};
};
simple-audio-card,dai-link@1 {
format = "i2s";
cpu {
sound-dai = <&i2s>;
};
codec {
sound-dai = <&hdmi>;
};
};
};
spdif-sound {
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,name = "ROCKCHIP,SPDIF";
simple-audio-card,mclk-fs = <128>;
simple-audio-card,cpu {
sound-dai = <&spdif>;
};
simple-audio-card,codec {
sound-dai = <&spdif_out>;
};
};
backlight: backlight {
pwms = <&pwm1 0 1000000 0>;
};
hdmi_analog_sound: hdmi-analog-sound {
status = "disabled";
rockchip,codec = <&es8323>, <&hdmi>;
};
reserved-memory {
ramoops: ramoops@8000000 {
compatible = "ramoops";
reg = <0x0 0x8000000 0x0 0xF0000>;
record-size = <0x0 0x20000>;
console-size = <0x0 0x80000>;
ftrace-size = <0x0 0x00000>;
pmsg-size = <0x0 0x50000>;
};
drm_logo: drm-logo@0 {
compatible = "rockchip,drm-logo";
reg = <0x0 0x0 0x0 0x0>;
};
};
fiq-debugger {
compatible = "rockchip,fiq-debugger";
interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
rockchip,serial-id = <2>;
rockchip,wake-irq = <0>;
/* If enable uart uses irq instead of fiq */
rockchip,irq-mode-enable = <1>;
rockchip,baudrate = <115200>; /* Only 115200 and 1500000 */
pinctrl-names = "default";
pinctrl-0 = <&uart2_xfer>;
};
xin32k: xin32k {
compatible = "fixed-clock";
clock-frequency = <32768>;
clock-output-names = "xin32k";
#clock-cells = <0>;
};
vccadc_ref: vccadc-ref {
compatible = "regulator-fixed";
regulator-name = "vcc1v8_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
/* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
vcc_phy: vcc-phy-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&eth_phy_pwr>;
regulator-name = "vcc_phy";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-boot-on;
};
/*
* NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
* vcc_io directly. Those boards won't be able to power cycle SD cards
* but it shouldn't hurt to toggle this pin there anyway.
*/
wireless-bluetooth {
clocks = <&hym8563>;
clock-names = "ext_clock";
};
rk_key: rockchip-key {
compatible = "rockchip,key";
status = "okay";
io-channels = <&saradc 1>;
vol-up-key {
linux,code = <115>;
label = "volume up";
rockchip,adc_value = <1>;
};
vol-down-key {
linux,code = <114>;
label = "volume down";
rockchip,adc_value = <170>;
};
power-key {
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
linux,code = <116>;
pinctrl-names = "default";
pinctrl-0 = <&pwrbtn>;
label = "power";
gpio-key,wakeup;
};
menu-key {
linux,code = <59>;
label = "menu";
rockchip,adc_value = <355>;
};
home-key {
linux,code = <102>;
label = "home";
rockchip,adc_value = <746>;
};
back-key {
linux,code = <158>;
label = "back";
rockchip,adc_value = <560>;
};
camera-key {
linux,code = <212>;
label = "camera";
rockchip,adc_value = <450>;
};
};
/delete-node/ usb-otg-regulator;
};
&ir{
/delete-property/ pinctrl-0;
};
&gmac {
phy-supply = <&vcc_phy>;
snps,reset-gpio = <&gpio4 7 0>;
pinctrl-0 = <&rgmii_pins>;
max-speed = <100>;
status = "okay";
};
&saradc {
vref-supply = <&vccadc_ref>;
status = "okay";
};
&sdmmc {
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;
pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
status = "okay";
};
&hdmi {
status = "okay";
};
&edp {
force-hpd;
status = "okay";
};
&edp_panel {
compatible ="lg,lp079qx1-sp0v", "simple-panel";
bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
bpc = <6>;
backlight = <&backlight>;
enable-gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&lcd_cs>;
power-supply = <&vcc_lcd>;
delay,prepare = <120>;
status = "okay";
disp_timings: display-timings {
native-mode = <&timing0>;
timing0: timing0 {
clock-frequency = <205000000>;
hactive = <1536>;
vactive = <2048>;
hfront-porch = <12>;
hsync-len = <16>;
hback-porch = <48>;
vfront-porch = <8>;
vsync-len = <4>;
vback-porch = <8>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
};
};
};
&route_edp {
status = "okay";
};
&i2c0{
/delete-node/ syr828@41;
/delete-node/ act8846@5a;
};
&i2c0 {
rk808: pmic@1b {
compatible = "rockchip,rk808";
reg = <0x1b>;
interrupt-parent = <&gpio0>;
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&pmic_int &global_pwroff>;
//pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
rockchip,system-power-controller;
wakeup-source;
#clock-cells = <1>;
clock-output-names = "rk808-clkout1", "rk808-clkout2";
vcc1-supply = <&vcc_sys>;
vcc2-supply = <&vcc_sys>;
vcc3-supply = <&vcc_sys>;
vcc4-supply = <&vcc_sys>;
vcc6-supply = <&vcc_sys>;
vcc7-supply = <&vcc_sys>;
vcc8-supply = <&vcc_18>;
vcc9-supply = <&vcc_io>;
vcc10-supply = <&vcc_io>;
vcc11-supply = <&vcc_sys>;
vcc12-supply = <&vcc_io>;
vddio-supply = <&vccio_pmu>;
regulators {
rk808_dcdc1_reg: DCDC_REG1 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <1500000>;
regulator-name = "vdd_arm";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1000000>;
};
};
vdd_gpu: DCDC_REG2 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1500000>;
regulator-name = "vdd_gpu";
regulator-ramp-delay = <6000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1000000>;
};
};
vcc_ddr: DCDC_REG3 {
regulator-always-on;
regulator-boot-on;
regulator-name = "vcc_ddr";
regulator-state-mem {
regulator-on-in-suspend;
};
};
vcc_io: DCDC_REG4 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc_io";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
vccio_pmu: LDO_REG1 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vccio_pmu";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
vcca_33: LDO_REG2 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcca_33";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_10: LDO_REG3 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>;
regulator-name = "vdd_10";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1000000>;
};
};
vcc18_lcd: LDO_REG4 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc18_lcd";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vccio_sd: LDO_REG5 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vccio_sd";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
vdd10_lcd: LDO_REG6 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>;
regulator-name = "vdd10_lcd";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1000000>;
};
};
vcc_18: LDO_REG7 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc_18";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vcc_lan: LDO_REG8 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc_lan";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vccio_wl: SWITCH_REG1 {
regulator-always-on;
regulator-boot-on;
regulator-name = "vcc_18";
regulator-state-mem {
regulator-on-in-suspend;
};
};
rk808_ldo10_reg: SWITCH_REG2 {
regulator-always-on;
regulator-boot-on;
regulator-name = "rk_ldo10";
regulator-state-mem {
regulator-on-in-suspend;
};
};
};
};
};
&i2c1 {
status = "okay";
clock-frequency = <400000>;
tc358749x: tc358749x@0f {
compatible = "toshiba,tc358749x";
reg = <0x0f>;
power-gpios = <&gpio7 21 GPIO_ACTIVE_HIGH>;
stanby-gpios = <&gpio7 5 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio8 8 GPIO_ACTIVE_HIGH>;
int-gpios = <&gpio8 9 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&hdmiin_gpios>;
status = "okay";
};
};
&i2c2 {
status = "okay";
es8323: es8323@10 {
status = "okay";
compatible = "everest,es8323";
reg = <0x10>;
spk-con-gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>;
hp-det-gpio = <&gpio7 15 GPIO_ACTIVE_LOW>;
clock-names = "mclk";
clocks = <&cru SCLK_I2S0_OUT>;
pinctrl-names = "default";
pinctrl-0 = <&i2s0_mclk>;
#sound-dai-cells = <0>;
};
};
&i2c3 {
status = "okay";
};
&i2c4 {
status = "okay";
gsl3680: gsl3680@40 {
status = "okay";
compatible = "gslX680";
reg = <0x40>;
screen_max_x = <1536>;
screen_max_y = <2048>;
flip-x = <1>;
flip-y = <1>;
touch-gpio = <&gpio7 13 IRQ_TYPE_EDGE_RISING>;
};
};
&i2s {
#sound-dai-cells = <0>;
status = "okay";
};
&pwm1 {
status = "okay";
};
&isp {
/delete-property/ rockchip,gpios;
status = "okay";
};
&isp_mmu {
status = "okay";
};
&vpu_service {
status = "okay";
};
&usb_host0_ehci {
rockchip-relinquish-port;
status = "okay";
};
&vopb {
status = "okay";
};
&vopl {
status = "okay";
};
&dfi {
status = "okay";
};
&dmac_bus_s {
/* change to non-secure dmac */
reg = <0x0 0xff600000 0x0 0x4000>;
};
&dmc {
center-supply = <&vdd_gpu>;
status = "okay";
};
&efuse {
compatible = "rockchip,rk3288-secure-efuse";
};
&rga {
compatible = "rockchip,rga2";
clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
clock-names = "aclk_rga", "hclk_rga", "clk_rga";
};
&rockchip_suspend {
status = "okay";
};
&pwm0 {
status = "okay";
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
compatible = "rockchip,remotectl-pwm";
remote_pwm_id = <0>;
handle_cpu_id = <0>;
ir_key1{
rockchip,usercode = <0xff00>;
rockchip,key_table =
<0xeb KEY_POWER>,
<0xec KEY_MENU>,
<0xfe KEY_BACK>,
<0xb7 KEY_HOME>,
<0xa3 KEY_WWW>,
<0xf4 KEY_VOLUMEUP>,
<0xa7 KEY_VOLUMEDOWN>,
<0xf8 KEY_REPLY>,
<0xfc KEY_UP>,
<0xfd KEY_DOWN>,
<0xf1 KEY_LEFT>,
<0xe5 KEY_RIGHT>;
};
};
&tsadc {
rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
};
&pinctrl {
/* sata:gpio0 c1 */
init-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
pcfg_output_high: pcfg-output-high {
output-high;
};
pcfg_output_low: pcfg-output-low {
output-low;
};
pmic {
pmic_int: pmic-int {
rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
eth_phy {
eth_phy_pwr: eth-phy-pwr {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
lcd {
lcd_cs: lcd-cs {
rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
};
lcd_en: lcd-en {
rockchip,pins = <7 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
act8846 {
pmic_vsel: pmic-vsel {
rockchip,pins = <7 RK_PB6 RK_FUNC_GPIO &pcfg_output_low>;
};
pwr_hold: pwr-hold {
rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_output_high>;
};
};
backlight {
bl_en: bl-en {
rockchip,pins = <7 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
buttons {
pwrbtn: pwrbtn {
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
hdmiin {
hdmiin_gpios: hdmiin_gpios {
rockchip,pins =
<7 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>,
<7 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>,
<8 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
<8 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};