168b08c40SSimon Glass/* 268b08c40SSimon Glass * This file is dual-licensed: you can use it either under the terms 368b08c40SSimon Glass * of the GPL or the X11 license, at your option. Note that this dual 468b08c40SSimon Glass * licensing only applies to this file, and not this project as a 568b08c40SSimon Glass * whole. 668b08c40SSimon Glass * 768b08c40SSimon Glass * a) This file is free software; you can redistribute it and/or 868b08c40SSimon Glass * modify it under the terms of the GNU General Public License as 968b08c40SSimon Glass * published by the Free Software Foundation; either version 2 of the 1068b08c40SSimon Glass * License, or (at your option) any later version. 1168b08c40SSimon Glass * 1268b08c40SSimon Glass * This file is distributed in the hope that it will be useful, 1368b08c40SSimon Glass * but WITHOUT ANY WARRANTY; without even the implied warranty of 1468b08c40SSimon Glass * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1568b08c40SSimon Glass * GNU General Public License for more details. 1668b08c40SSimon Glass * 1768b08c40SSimon Glass * Or, alternatively, 1868b08c40SSimon Glass * 1968b08c40SSimon Glass * b) Permission is hereby granted, free of charge, to any person 2068b08c40SSimon Glass * obtaining a copy of this software and associated documentation 2168b08c40SSimon Glass * files (the "Software"), to deal in the Software without 2268b08c40SSimon Glass * restriction, including without limitation the rights to use, 2368b08c40SSimon Glass * copy, modify, merge, publish, distribute, sublicense, and/or 2468b08c40SSimon Glass * sell copies of the Software, and to permit persons to whom the 2568b08c40SSimon Glass * Software is furnished to do so, subject to the following 2668b08c40SSimon Glass * conditions: 2768b08c40SSimon Glass * 2868b08c40SSimon Glass * The above copyright notice and this permission notice shall be 2968b08c40SSimon Glass * included in all copies or substantial portions of the Software. 3068b08c40SSimon Glass * 3168b08c40SSimon Glass * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 3268b08c40SSimon Glass * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 3368b08c40SSimon Glass * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 3468b08c40SSimon Glass * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 3568b08c40SSimon Glass * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 3668b08c40SSimon Glass * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 3768b08c40SSimon Glass * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3868b08c40SSimon Glass * OTHER DEALINGS IN THE SOFTWARE. 3968b08c40SSimon Glass */ 4068b08c40SSimon Glass 4168b08c40SSimon Glass/dts-v1/; 4268b08c40SSimon Glass#include "rk3288-rock2-som.dtsi" 4368b08c40SSimon Glass 4468b08c40SSimon Glass/ { 4568b08c40SSimon Glass model = "Radxa Rock 2 Square"; 4668b08c40SSimon Glass compatible = "radxa,rock2-square", "rockchip,rk3288"; 4768b08c40SSimon Glass 4868b08c40SSimon Glass chosen { 4968b08c40SSimon Glass stdout-path = "serial2:115200n8"; 5068b08c40SSimon Glass }; 5168b08c40SSimon Glass 5268b08c40SSimon Glass ir: ir-receiver { 5368b08c40SSimon Glass compatible = "gpio-ir-receiver"; 5468b08c40SSimon Glass gpios = <&gpio8 1 GPIO_ACTIVE_LOW>; 5568b08c40SSimon Glass pinctrl-names = "default"; 5668b08c40SSimon Glass pinctrl-0 = <&ir_int>; 5768b08c40SSimon Glass }; 5868b08c40SSimon Glass 5968b08c40SSimon Glass sound { 6068b08c40SSimon Glass compatible = "simple-audio-card"; 6168b08c40SSimon Glass simple-audio-card,name = "SPDIF"; 6268b08c40SSimon Glass simple-audio-card,dai-link@1 { /* S/PDIF - S/PDIF */ 6368b08c40SSimon Glass cpu { sound-dai = <&spdif>; }; 6468b08c40SSimon Glass codec { sound-dai = <&spdif_out>; }; 6568b08c40SSimon Glass }; 6668b08c40SSimon Glass }; 6768b08c40SSimon Glass 6868b08c40SSimon Glass spdif_out: spdif-out { 6968b08c40SSimon Glass compatible = "linux,spdif-dit"; 7068b08c40SSimon Glass #sound-dai-cells = <0>; 7168b08c40SSimon Glass }; 7268b08c40SSimon Glass 7368b08c40SSimon Glass vcc_usb_host: vcc-host-regulator { 7468b08c40SSimon Glass compatible = "regulator-fixed"; 7568b08c40SSimon Glass enable-active-high; 7668b08c40SSimon Glass gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; 7768b08c40SSimon Glass pinctrl-names = "default"; 7868b08c40SSimon Glass pinctrl-0 = <&host_vbus_drv>; 7968b08c40SSimon Glass /* Always on as the rockchip usb phy doesn't have a vbus-supply 8068b08c40SSimon Glass * property 8168b08c40SSimon Glass */ 8268b08c40SSimon Glass regulator-always-on; 8368b08c40SSimon Glass regulator-name = "vcc_host"; 8468b08c40SSimon Glass }; 8568b08c40SSimon Glass 8668b08c40SSimon Glass vcc_sd: sdmmc-regulator { 8768b08c40SSimon Glass compatible = "regulator-fixed"; 8868b08c40SSimon Glass gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; 8968b08c40SSimon Glass pinctrl-names = "default"; 9068b08c40SSimon Glass pinctrl-0 = <&sdmmc_pwr>; 9168b08c40SSimon Glass regulator-name = "vcc_sd"; 9268b08c40SSimon Glass regulator-min-microvolt = <3300000>; 9368b08c40SSimon Glass regulator-max-microvolt = <3300000>; 9468b08c40SSimon Glass vin-supply = <&vcc_io>; 9568b08c40SSimon Glass }; 9668b08c40SSimon Glass}; 9768b08c40SSimon Glass 9868b08c40SSimon Glass&sdmmc { 99cf629bb2SSimon Glass u-boot,dm-pre-reloc; 10068b08c40SSimon Glass bus-width = <4>; 10168b08c40SSimon Glass cap-mmc-highspeed; 10268b08c40SSimon Glass cap-sd-highspeed; 10368b08c40SSimon Glass card-detect-delay = <200>; 10468b08c40SSimon Glass disable-wp; /* wp not hooked up */ 10568b08c40SSimon Glass num-slots = <1>; 10668b08c40SSimon Glass pinctrl-names = "default"; 10768b08c40SSimon Glass pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 10868b08c40SSimon Glass vmmc-supply = <&vcc_sd>; 10968b08c40SSimon Glass vqmmc-supply = <&vccio_sd>; 11068b08c40SSimon Glass status = "okay"; 11168b08c40SSimon Glass}; 11268b08c40SSimon Glass 11368b08c40SSimon Glass&gmac { 114*2ed6dc83SSjoerd Simons status = "okay"; 11568b08c40SSimon Glass}; 11668b08c40SSimon Glass 11768b08c40SSimon Glass&hdmi { 11868b08c40SSimon Glass ddc-i2c-bus = <&i2c5>; 11968b08c40SSimon Glass status = "okay"; 12068b08c40SSimon Glass}; 12168b08c40SSimon Glass 12268b08c40SSimon Glass&i2c0 { 12368b08c40SSimon Glass hym8563@51 { 12468b08c40SSimon Glass compatible = "haoyu,hym8563"; 12568b08c40SSimon Glass reg = <0x51>; 12668b08c40SSimon Glass #clock-cells = <0>; 12768b08c40SSimon Glass clock-frequency = <32768>; 12868b08c40SSimon Glass clock-output-names = "xin32k"; 12968b08c40SSimon Glass interrupt-parent = <&gpio0>; 13068b08c40SSimon Glass interrupts = <4 IRQ_TYPE_EDGE_FALLING>; 13168b08c40SSimon Glass pinctrl-names = "default"; 13268b08c40SSimon Glass pinctrl-0 = <&pmic_int>; 13368b08c40SSimon Glass 13468b08c40SSimon Glass }; 13568b08c40SSimon Glass}; 13668b08c40SSimon Glass 13768b08c40SSimon Glass&i2c5 { 13868b08c40SSimon Glass status = "okay"; 13968b08c40SSimon Glass}; 14068b08c40SSimon Glass 14168b08c40SSimon Glass&pinctrl { 142cf629bb2SSimon Glass u-boot,dm-pre-reloc; 14368b08c40SSimon Glass ir { 14468b08c40SSimon Glass ir_int: ir-int { 14568b08c40SSimon Glass rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>; 14668b08c40SSimon Glass }; 14768b08c40SSimon Glass }; 14868b08c40SSimon Glass 14968b08c40SSimon Glass pmic { 15068b08c40SSimon Glass pmic_int: pmic-int { 15168b08c40SSimon Glass rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>; 15268b08c40SSimon Glass }; 15368b08c40SSimon Glass }; 15468b08c40SSimon Glass 15568b08c40SSimon Glass usb { 15668b08c40SSimon Glass host_vbus_drv: host-vbus-drv { 15768b08c40SSimon Glass rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; 15868b08c40SSimon Glass }; 15968b08c40SSimon Glass }; 16068b08c40SSimon Glass 16168b08c40SSimon Glass sdmmc { 16268b08c40SSimon Glass sdmmc_pwr: sdmmc-pwr { 16368b08c40SSimon Glass rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; 16468b08c40SSimon Glass }; 16568b08c40SSimon Glass }; 16668b08c40SSimon Glass}; 16768b08c40SSimon Glass 16868b08c40SSimon Glass&spdif { 16968b08c40SSimon Glass status = "okay"; 17068b08c40SSimon Glass}; 17168b08c40SSimon Glass 17268b08c40SSimon Glass&uart2 { 17368b08c40SSimon Glass status = "okay"; 174cf629bb2SSimon Glass u-boot,dm-pre-reloc; 175cf629bb2SSimon Glass reg-shift = <2>; 17668b08c40SSimon Glass}; 17768b08c40SSimon Glass 17868b08c40SSimon Glass&usbphy { 17968b08c40SSimon Glass status = "okay"; 18068b08c40SSimon Glass}; 18168b08c40SSimon Glass 18268b08c40SSimon Glass&usb_host0_ehci { 18368b08c40SSimon Glass status = "okay"; 18468b08c40SSimon Glass}; 185cf629bb2SSimon Glass 186cf629bb2SSimon Glass&dmc { 187cf629bb2SSimon Glass rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa 188cf629bb2SSimon Glass 0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7 189cf629bb2SSimon Glass 0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0 190cf629bb2SSimon Glass 0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0 191cf629bb2SSimon Glass 0x5 0x0>; 192cf629bb2SSimon Glass rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200 193cf629bb2SSimon Glass 0xa60 0x40 0x10 0x0>; 194cf629bb2SSimon Glass rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>; 195cf629bb2SSimon Glass}; 196cf629bb2SSimon Glass 197cf629bb2SSimon Glass&gpio7 { 198cf629bb2SSimon Glass u-boot,dm-pre-reloc; 199cf629bb2SSimon Glass}; 200