1*4882a593Smuzhiyun/* 2*4882a593Smuzhiyun * This file is dual-licensed: you can use it either under the terms 3*4882a593Smuzhiyun * of the GPL or the X11 license, at your option. Note that this dual 4*4882a593Smuzhiyun * licensing only applies to this file, and not this project as a 5*4882a593Smuzhiyun * whole. 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * a) This file is free software; you can redistribute it and/or 8*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License as 9*4882a593Smuzhiyun * published by the Free Software Foundation; either version 2 of the 10*4882a593Smuzhiyun * License, or (at your option) any later version. 11*4882a593Smuzhiyun * 12*4882a593Smuzhiyun * This file is distributed in the hope that it will be useful, 13*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 14*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15*4882a593Smuzhiyun * GNU General Public License for more details. 16*4882a593Smuzhiyun * 17*4882a593Smuzhiyun * Or, alternatively, 18*4882a593Smuzhiyun * 19*4882a593Smuzhiyun * b) Permission is hereby granted, free of charge, to any person 20*4882a593Smuzhiyun * obtaining a copy of this software and associated documentation 21*4882a593Smuzhiyun * files (the "Software"), to deal in the Software without 22*4882a593Smuzhiyun * restriction, including without limitation the rights to use, 23*4882a593Smuzhiyun * copy, modify, merge, publish, distribute, sublicense, and/or 24*4882a593Smuzhiyun * sell copies of the Software, and to permit persons to whom the 25*4882a593Smuzhiyun * Software is furnished to do so, subject to the following 26*4882a593Smuzhiyun * conditions: 27*4882a593Smuzhiyun * 28*4882a593Smuzhiyun * The above copyright notice and this permission notice shall be 29*4882a593Smuzhiyun * included in all copies or substantial portions of the Software. 30*4882a593Smuzhiyun * 31*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 32*4882a593Smuzhiyun * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 33*4882a593Smuzhiyun * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 34*4882a593Smuzhiyun * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 35*4882a593Smuzhiyun * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 36*4882a593Smuzhiyun * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 37*4882a593Smuzhiyun * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 38*4882a593Smuzhiyun * OTHER DEALINGS IN THE SOFTWARE. 39*4882a593Smuzhiyun */ 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun/dts-v1/; 42*4882a593Smuzhiyun#include "rk3288-rock2-som.dtsi" 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun/ { 45*4882a593Smuzhiyun model = "Radxa Rock 2 Square"; 46*4882a593Smuzhiyun compatible = "radxa,rock2-square", "rockchip,rk3288"; 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun chosen { 49*4882a593Smuzhiyun stdout-path = "serial2:115200n8"; 50*4882a593Smuzhiyun }; 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun ir: ir-receiver { 53*4882a593Smuzhiyun compatible = "gpio-ir-receiver"; 54*4882a593Smuzhiyun gpios = <&gpio8 1 GPIO_ACTIVE_LOW>; 55*4882a593Smuzhiyun pinctrl-names = "default"; 56*4882a593Smuzhiyun pinctrl-0 = <&ir_int>; 57*4882a593Smuzhiyun }; 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun sound { 60*4882a593Smuzhiyun compatible = "simple-audio-card"; 61*4882a593Smuzhiyun simple-audio-card,name = "SPDIF"; 62*4882a593Smuzhiyun simple-audio-card,dai-link@1 { /* S/PDIF - S/PDIF */ 63*4882a593Smuzhiyun cpu { sound-dai = <&spdif>; }; 64*4882a593Smuzhiyun codec { sound-dai = <&spdif_out>; }; 65*4882a593Smuzhiyun }; 66*4882a593Smuzhiyun }; 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun spdif_out: spdif-out { 69*4882a593Smuzhiyun compatible = "linux,spdif-dit"; 70*4882a593Smuzhiyun #sound-dai-cells = <0>; 71*4882a593Smuzhiyun }; 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun vcc_usb_host: vcc-host-regulator { 74*4882a593Smuzhiyun compatible = "regulator-fixed"; 75*4882a593Smuzhiyun enable-active-high; 76*4882a593Smuzhiyun gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; 77*4882a593Smuzhiyun pinctrl-names = "default"; 78*4882a593Smuzhiyun pinctrl-0 = <&host_vbus_drv>; 79*4882a593Smuzhiyun /* Always on as the rockchip usb phy doesn't have a vbus-supply 80*4882a593Smuzhiyun * property 81*4882a593Smuzhiyun */ 82*4882a593Smuzhiyun regulator-always-on; 83*4882a593Smuzhiyun regulator-name = "vcc_host"; 84*4882a593Smuzhiyun }; 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun vcc_sd: sdmmc-regulator { 87*4882a593Smuzhiyun compatible = "regulator-fixed"; 88*4882a593Smuzhiyun gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; 89*4882a593Smuzhiyun pinctrl-names = "default"; 90*4882a593Smuzhiyun pinctrl-0 = <&sdmmc_pwr>; 91*4882a593Smuzhiyun regulator-name = "vcc_sd"; 92*4882a593Smuzhiyun regulator-min-microvolt = <3300000>; 93*4882a593Smuzhiyun regulator-max-microvolt = <3300000>; 94*4882a593Smuzhiyun vin-supply = <&vcc_io>; 95*4882a593Smuzhiyun }; 96*4882a593Smuzhiyun}; 97*4882a593Smuzhiyun 98*4882a593Smuzhiyun&sdmmc { 99*4882a593Smuzhiyun u-boot,dm-pre-reloc; 100*4882a593Smuzhiyun bus-width = <4>; 101*4882a593Smuzhiyun cap-mmc-highspeed; 102*4882a593Smuzhiyun cap-sd-highspeed; 103*4882a593Smuzhiyun card-detect-delay = <200>; 104*4882a593Smuzhiyun disable-wp; /* wp not hooked up */ 105*4882a593Smuzhiyun num-slots = <1>; 106*4882a593Smuzhiyun pinctrl-names = "default"; 107*4882a593Smuzhiyun pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 108*4882a593Smuzhiyun vmmc-supply = <&vcc_sd>; 109*4882a593Smuzhiyun vqmmc-supply = <&vccio_sd>; 110*4882a593Smuzhiyun status = "okay"; 111*4882a593Smuzhiyun}; 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun&gmac { 114*4882a593Smuzhiyun status = "okay"; 115*4882a593Smuzhiyun}; 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun&hdmi { 118*4882a593Smuzhiyun ddc-i2c-bus = <&i2c5>; 119*4882a593Smuzhiyun status = "okay"; 120*4882a593Smuzhiyun}; 121*4882a593Smuzhiyun 122*4882a593Smuzhiyun&i2c0 { 123*4882a593Smuzhiyun hym8563@51 { 124*4882a593Smuzhiyun compatible = "haoyu,hym8563"; 125*4882a593Smuzhiyun reg = <0x51>; 126*4882a593Smuzhiyun #clock-cells = <0>; 127*4882a593Smuzhiyun clock-frequency = <32768>; 128*4882a593Smuzhiyun clock-output-names = "xin32k"; 129*4882a593Smuzhiyun interrupt-parent = <&gpio0>; 130*4882a593Smuzhiyun interrupts = <4 IRQ_TYPE_EDGE_FALLING>; 131*4882a593Smuzhiyun pinctrl-names = "default"; 132*4882a593Smuzhiyun pinctrl-0 = <&pmic_int>; 133*4882a593Smuzhiyun 134*4882a593Smuzhiyun }; 135*4882a593Smuzhiyun}; 136*4882a593Smuzhiyun 137*4882a593Smuzhiyun&i2c5 { 138*4882a593Smuzhiyun status = "okay"; 139*4882a593Smuzhiyun}; 140*4882a593Smuzhiyun 141*4882a593Smuzhiyun&pinctrl { 142*4882a593Smuzhiyun u-boot,dm-pre-reloc; 143*4882a593Smuzhiyun ir { 144*4882a593Smuzhiyun ir_int: ir-int { 145*4882a593Smuzhiyun rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>; 146*4882a593Smuzhiyun }; 147*4882a593Smuzhiyun }; 148*4882a593Smuzhiyun 149*4882a593Smuzhiyun pmic { 150*4882a593Smuzhiyun pmic_int: pmic-int { 151*4882a593Smuzhiyun rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>; 152*4882a593Smuzhiyun }; 153*4882a593Smuzhiyun }; 154*4882a593Smuzhiyun 155*4882a593Smuzhiyun usb { 156*4882a593Smuzhiyun host_vbus_drv: host-vbus-drv { 157*4882a593Smuzhiyun rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; 158*4882a593Smuzhiyun }; 159*4882a593Smuzhiyun }; 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun sdmmc { 162*4882a593Smuzhiyun sdmmc_pwr: sdmmc-pwr { 163*4882a593Smuzhiyun rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; 164*4882a593Smuzhiyun }; 165*4882a593Smuzhiyun }; 166*4882a593Smuzhiyun}; 167*4882a593Smuzhiyun 168*4882a593Smuzhiyun&spdif { 169*4882a593Smuzhiyun status = "okay"; 170*4882a593Smuzhiyun}; 171*4882a593Smuzhiyun 172*4882a593Smuzhiyun&uart2 { 173*4882a593Smuzhiyun status = "okay"; 174*4882a593Smuzhiyun u-boot,dm-pre-reloc; 175*4882a593Smuzhiyun reg-shift = <2>; 176*4882a593Smuzhiyun}; 177*4882a593Smuzhiyun 178*4882a593Smuzhiyun&usbphy { 179*4882a593Smuzhiyun status = "okay"; 180*4882a593Smuzhiyun}; 181*4882a593Smuzhiyun 182*4882a593Smuzhiyun&usb_host0_ehci { 183*4882a593Smuzhiyun status = "okay"; 184*4882a593Smuzhiyun}; 185*4882a593Smuzhiyun 186*4882a593Smuzhiyun&dmc { 187*4882a593Smuzhiyun rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa 188*4882a593Smuzhiyun 0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7 189*4882a593Smuzhiyun 0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0 190*4882a593Smuzhiyun 0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0 191*4882a593Smuzhiyun 0x5 0x0>; 192*4882a593Smuzhiyun rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200 193*4882a593Smuzhiyun 0xa60 0x40 0x10 0x0>; 194*4882a593Smuzhiyun rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>; 195*4882a593Smuzhiyun}; 196*4882a593Smuzhiyun 197*4882a593Smuzhiyun&gpio7 { 198*4882a593Smuzhiyun u-boot,dm-pre-reloc; 199*4882a593Smuzhiyun}; 200