From 9d7998a86e8e5f5e3fc4ce1c78b0b649d0d9ce62 Mon Sep 17 00:00:00 2001 From: Mark Yao Date: Wed, 7 Oct 2015 14:54:39 +0800 Subject: [PATCH] rk3288: dts: support popmetal opensource board Change-Id: I42fd55bfa73d25643a9e0435af93e311d3ed3206 Signed-off-by: Mark Yao --- arch/arm/boot/dts/rk3288-popmetal.dts | 740 ++++++++++++++++++++++++++ 1 file changed, 740 insertions(+) create mode 100644 arch/arm/boot/dts/rk3288-popmetal.dts diff --git a/arch/arm/boot/dts/rk3288-popmetal.dts b/arch/arm/boot/dts/rk3288-popmetal.dts new file mode 100644 index 000000000000..99df79240316 --- /dev/null +++ b/arch/arm/boot/dts/rk3288-popmetal.dts @@ -0,0 +1,740 @@ +/dts-v1/; + +#include "rk3288.dtsi" +#include "lcd-vga.dtsi" + +/ { + fiq-debugger { + status = "okay"; + }; + + wireless-wlan { + compatible = "wlan-platdata"; + + /* wifi_chip_type - wifi chip define + * bcmwifi ==> like ap6xxx, rk90x; + * rtkwifi ==> like rtl8188xx, rtl8723xx; + * esp8089 ==> esp8089; + * other ==> for other wifi; + */ + wifi_chip_type = "bcmwifi"; + + sdio_vref = <1800>; //1800mv or 3300mv + + //keep_wifi_power_on; + + //power_ctrl_by_pmu; + power_pmu_regulator = "act_ldo3"; + power_pmu_enable_level = <1>; //1->HIGH, 0->LOW + + //vref_ctrl_enable; + //vref_ctrl_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>; + vref_pmu_regulator = "act_ldo3"; + vref_pmu_enable_level = <1>; //1->HIGH, 0->LOW + + WIFI,poweren_gpio = <&gpio4 GPIO_D4 GPIO_ACTIVE_HIGH>; + WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>; + //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>; + + status = "okay"; + }; + + wireless-bluetooth { + compatible = "bluetooth-platdata"; + + //wifi-bt-power-toggle; + + uart_rts_gpios = <&gpio4 GPIO_C3 GPIO_ACTIVE_LOW>; + pinctrl-names = "default","rts_gpio"; + pinctrl-0 = <&uart0_rts>; + pinctrl-1 = <&uart0_rts_gpio>; + + BT,power_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>; + BT,reset_gpio = <&gpio4 GPIO_D5 GPIO_ACTIVE_HIGH>; + BT,wake_gpio = <&gpio4 GPIO_D2 GPIO_ACTIVE_HIGH>; + BT,wake_host_irq = <&gpio4 GPIO_D7 GPIO_ACTIVE_LOW>; + + status = "okay"; + }; + + backlight { + compatible = "pwm-backlight"; + pwms = <&pwm0 0 25000>; + brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255>; + default-brightness-level = <128>; + enable-gpios = <&gpio7 GPIO_A2 GPIO_ACTIVE_HIGH>; + }; + + pwm_regulator { + compatible = "rockchip_pwm_regulator"; + pwms = <&pwm1 0 2000>; + rockchip,pwm_id= <1>; + rockchip,pwm_voltage_map= <925000 950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000>; + rockchip,pwm_voltage= <1000000>; + rockchip,pwm_min_voltage= <925000>; + rockchip,pwm_max_voltage= <1400000>; + rockchip,pwm_suspend_voltage= <950000>; + rockchip,pwm_coefficient= <475>; + regulators { + #address-cells = <1>; + #size-cells = <0>; + pwm_reg0: regulator@0 { + regulator-compatible = "pwm_dcdc1"; + regulator-name= "vdd_logic"; + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <1400000>; + regulator-always-on; + regulator-boot-on; + }; + }; + }; + + codec_hdmi_i2s: codec-hdmi-i2s { + compatible = "hdmi-i2s"; + }; + + codec_hdmi_spdif: codec-hdmi-spdif { + compatible = "hdmi-spdif"; + }; + + rockchip-hdmi-i2s { + compatible = "rockchip-hdmi-i2s"; + dais { + dai0 { + audio-codec = <&codec_hdmi_i2s>; + audio-controller = <&i2s>; + format = "i2s"; + //continuous-clock; + //bitclock-inversion; + //frame-inversion; + //bitclock-master; + //frame-master; + }; + }; + }; + + rockchip-hdmi-spdif { + compatible = "rockchip-hdmi-spdif"; + dais { + dai0 { + audio-codec = <&codec_hdmi_spdif>; + audio-controller = <&spdif>; + }; + }; + }; + + rockchip-wm8960 { + compatible = "rockchip-wm8960"; + dais { + dai0 { + audio-codec = <&wm8960>; + i2s-controller = <&i2s>; + format = "i2s"; + //continuous-clock; + //bitclock-inversion; + //frame-inversion; + //bitclock-master; + //frame-master; + }; + }; + }; + + usb_control { + compatible = "rockchip,rk3288-usb-control"; + + host_drv_gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_LOW>; + otg_drv_gpio = <&gpio0 GPIO_B4 GPIO_ACTIVE_LOW>; + + rockchip,remote_wakeup; + rockchip,usb_irq_wakeup; + }; + + ir_recv: gpio-ir-receiver { + compatible = "gpio-ir-receiver"; + gpios = <&gpio0 GPIO_A6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&ir_recv_pin>; + }; +}; + +&gmac { +// power_ctl_by = "gpio"; //"gpio" "pmu" +// power-gpio = <&gpio0 GPIO_A6 GPIO_ACTIVE_HIGH>; +// power-pmu = "act_ldo" + reset-gpio = <&gpio4 GPIO_A7 GPIO_ACTIVE_LOW>; + phy-mode = "rgmii"; + clock_in_out = "input"; + tx_delay = <0x30>; + rx_delay = <0x10>; + status = "okay"; +}; + +&pinctrl { + gpio0_gpio { + gpio0_c2: gpio0-c2 { + rockchip,pins = ; + rockchip,pull = ; + }; + }; + + gpio7_gpio { + gpio7_b7: gpio7-b7 { + rockchip,pins = ; + rockchip,pull = ; + }; + }; + + //could add other pinctrl definition such as gpio + + // gmac drive strength + gpio4_gmac { + mac_clk: mac-clk { + rockchip,drive = ; + }; + + mac_txpins: mac-txpins { + rockchip,drive = ; + }; + + mac_rxpins: mac-rxpins { + rockchip,drive = ; + }; + + mac_crs: mac-crs { + rockchip,drive = ; + }; + + mac_mdpins: mac-mdpins { + rockchip,drive = ; + }; + }; + + ir-receiver { + ir_recv_pin: ir-recv-pin { + rockchip,pins = ; + rockchip,pull = ; + }; + }; +}; + +&nandc0 { + status = "disabled"; // used nand set "disabled" ,used emmc set "okay" +}; +&nandc1 { + status = "disabled"; // used nand set "disabled" ,used emmc set "okay" +}; + +&nandc0reg { + status = "okay"; // used nand set "disabled" ,used emmc set "okay" +}; + +&emmc { + clock-frequency = <100000000>; + clock-freq-min-max = <400000 100000000>; + + supports-highspeed; + supports-emmc; + bootpart-no-access; + + //supports-tSD; + //supports-DDR_MODE; //you should set the two value in your project. only close in RK3288-SDK board. + //caps2-mmc-hs200; + + ignore-pm-notify; + keep-power-in-suspend; + + //poll-hw-reset; + status = "okay"; +}; + +&sdmmc { + clock-frequency = <50000000>; + clock-freq-min-max = <400000 50000000>; + supports-highspeed; + supports-sd; + broken-cd; + card-detect-delay = <200>; + + ignore-pm-notify; + keep-power-in-suspend; + + vmmc-supply = <&rk808_ldo5_reg>; + status = "okay"; +}; + +&sdio { + clock-frequency = <50000000>; + clock-freq-min-max = <200000 50000000>; + supports-highspeed; + supports-sdio; + ignore-pm-notify; + keep-power-in-suspend; + //cap-sdio-irq; + status = "okay"; +}; + +&spi0 { + status = "okay"; + max-freq = <48000000>; +}; + +&spi1 { + status = "okay"; + max-freq = <48000000>; +}; + +&spi2 { + status = "okay"; + max-freq = <48000000>; +}; + +&uart_bt { + status = "okay"; + dma-names = "!tx", "!rx"; + pinctrl-0 = <&uart0_xfer &uart0_cts>; +}; + +&i2c0 { + status = "okay"; + rk808: rk808@1b { + reg = <0x1b>; + status = "okay"; + }; +}; + +&i2c1 { + status = "okay"; + + sensor@1d { + compatible = "gs_mma8452"; + reg = <0x1d>; + type = ; + irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_EDGE_FALLING>; + irq_enable = <1>; + poll_delay_ms = <30>; + layout = <3>; + }; + + sensor@0d { + compatible = "ak8963"; + reg = <0x0d>; + type = ; + irq-gpio = <&gpio8 GPIO_A1 IRQ_TYPE_EDGE_RISING>; + irq_enable = <1>; + poll_delay_ms = <30>; + layout = <3>; + }; + + sensor@69 { + compatible = "l3g4200d_gyro"; + reg = <0x69>; + type = ; + irq-gpio = <&gpio8 GPIO_A2 IRQ_TYPE_LEVEL_LOW>; + irq_enable = <1>; + poll_delay_ms = <30>; + layout = <4>; + }; +}; + +&i2c2 { + status = "okay"; + wm8960: wm8960@1a { + compatible = "wm8960"; + reg = <0x1a>; + }; + + vga: vga@50 { + compatible = "rockchip,vga"; + reg = <0x50>; + status = "okay"; + }; +}; + +&i2c3 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; +}; + +&i2c5 { + status = "disable"; +}; + +&fb { + rockchip,disp-mode = ; + rockchip,uboot-logo-on = <1>; +}; + +&rk_screen { + display-timings = <&disp_timings>; +}; + +/*lcdc0 as PRMRY(LCD),lcdc1 as EXTEND(HDMI)*/ +&lcdc0 { + status = "okay"; + rockchip,mirror = ; + rockchip,cabc_mode = <0>; + power_ctr: power_ctr { + rockchip,debug = <0>; + lcd_en:lcd_en { + rockchip,power_type = ; + gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>; + rockchip,delay = <10>; + }; + + lcd_cs:lcd_cs { + rockchip,power_type = ; + gpios= <&gpio7 GPIO_C5 GPIO_ACTIVE_HIGH>; + kchip,delay = <10>; + }; + }; +}; + +&lcdc1 { + status = "okay"; + rockchip,mirror = ; +}; + +&hdmi { + status = "okay"; + rockchip,hdmi_video_source = ; +}; + +&adc { + status = "okay"; + key { + compatible = "rockchip,key"; + io-channels = <&adc 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 = <253>; + }; + + power-key { + gpios = <&gpio0 GPIO_A5 GPIO_ACTIVE_LOW>; + linux,code = <116>; + label = "power"; + gpio-key,wakeup; + }; + + home-key { + linux,code = <102>; + label = "home"; + rockchip,adc_value = <512>; + }; + + }; +}; + +&pwm0 { + status = "okay"; +}; + +&pwm1 { + status = "okay"; +}; + +&clk_core_dvfs_table { + operating-points = < + /* KHz uV */ + 126000 850000 + 216000 850000 + 312000 850000 + 408000 850000 + 600000 900000 + 696000 950000 + 816000 1000000 + 1008000 1050000 + 1200000 1100000 + 1416000 1200000 + >; + status="okay"; +}; + +&clk_gpu_dvfs_table { + operating-points = < + /* KHz uV */ + 100000 850000 + 200000 900000 + 300000 950000 + 420000 1050000 + 500000 1150000 + >; + status="okay"; +}; + +&clk_ddr_dvfs_table { + operating-points = < + /* KHz uV */ + 200000 950000 + 300000 950000 + 400000 1000000 + 533000 1050000 + >; + + freq-table = < + /*status freq(KHz)*/ + SYS_STATUS_NORMAL 400000 + SYS_STATUS_SUSPEND 200000 + SYS_STATUS_VIDEO_1080P 240000 + SYS_STATUS_VIDEO_4K 400000 + SYS_STATUS_PERFORMANCE 528000 + SYS_STATUS_DUALVIEW 400000 + SYS_STATUS_BOOST 324000 + SYS_STATUS_ISP 533000 + >; + bd-freq-table = < + /* bandwidth freq */ + 5000 800000 + 3500 456000 + 2600 396000 + 2000 324000 + >; + auto-freq-table = < + 240000 + 324000 + 396000 + 528000 + >; + auto-freq=<0>; + status="okay"; +}; + +/include/ "rk808.dtsi" +&rk808 { + gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>; + rk808,system-power-controller; + + regulators { + rk808_dcdc1_reg: regulator@0{ + regulator-name= "vdd_arm"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-mode = <0x2>; + regulator-state-disabled; + regulator-state-uv = <900000>; + }; + }; + + rk808_dcdc2_reg: regulator@1 { + regulator-name= "vdd_gpu"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1500000>; + /*regulator-always-on;*/ + /*regulator-boot-on;*/ + regulator-initial-mode = <0x2>; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-mode = <0x2>; + regulator-state-disabled; + regulator-state-uv = <900000>; + }; + }; + + rk808_dcdc3_reg: regulator@2 { + regulator-name= "rk_dcdc3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-mode = <0x2>; + regulator-state-enabled; + regulator-state-uv = <1200000>; + }; + }; + + rk808_dcdc4_reg: regulator@3 { + regulator-name= "vccio"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-mode = <0x2>; + regulator-state-enabled; + regulator-state-uv = <2800000>; + }; + }; + + rk808_ldo1_reg: regulator@4 { + regulator-name= "rk_ldo1"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-enabled; + regulator-state-uv = <3300000>; + }; + }; + + rk808_ldo2_reg: regulator@5 { + regulator-name= "rk_ldo2"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-enabled; + regulator-state-uv = <3300000>; + }; + }; + + rk808_ldo3_reg: regulator@6 { + regulator-name= "rk_ldo3"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-enabled; + regulator-state-uv = <1000000>; + }; + }; + + rk808_ldo4_reg:regulator@7 { + regulator-name= "rk_ldo4"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-disabled; + regulator-state-uv = <1800000>; + }; + }; + + rk808_ldo5_reg: regulator@8 { + regulator-name= "vcc_sd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-enabled; + regulator-state-uv = <2800000>; + }; + }; + + rk808_ldo6_reg: regulator@9 { + regulator-name= "rk_ldo6"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-disabled; + regulator-state-uv = <1000000>; + }; + }; + + rk808_ldo7_reg: regulator@10 { + regulator-name= "rk_ldo7"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-enabled; + regulator-state-uv = <1800000>; + }; + }; + + rk808_ldo8_reg: regulator@11 { + regulator-name= "rk_ldo8"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-enabled; + regulator-state-uv = <3300000>; + }; + }; + + rk808_ldo9_reg: regulator@12 { + regulator-name= "rk_ldo9"; + regulator-always-on; + regulator-boot-on; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-enabled; + }; + }; + + rk808_ldo10_reg: regulator@13 { + regulator-name= "rk_ldo10"; + regulator-always-on; + regulator-boot-on; + regulator-initial-state = <3>; + regulator-state-mem { + regulator-state-disabled; + }; + }; + }; +}; + +&lcdc_vdd_domain { + regulator-name = "vcc30_lcd"; +}; +&dpio_vdd_domain{ + regulator-name = "vcc18_cif"; +}; +&flash0_vdd_domain{ + regulator-name = "vcc_flash"; +}; +&flash1_vdd_domain{ + regulator-name = "vcc_flash"; +}; +&apio3_vdd_domain{ + regulator-name = "vccio_wl"; +}; +&apio5_vdd_domain{ + regulator-name = "vccio"; +}; +&apio4_vdd_domain{ + regulator-name = "vccio"; +}; +&apio1_vdd_domain{ + regulator-name = "vccio"; +}; +&apio2_vdd_domain{ + regulator-name = "vccio"; +}; +&sdmmc0_vdd_domain{ + regulator-name = "vcc_sd"; +}; + +&dwc_control_usb { + usb_uart { + status = "disabled"; + }; +}; -- 2.34.1