1bb51b535SNeil Armstrong/* 2bb51b535SNeil Armstrong * Copyright (c) 2016 Endless Computers, Inc. 3bb51b535SNeil Armstrong * Author: Carlo Caione <carlo@endlessm.com> 4bb51b535SNeil Armstrong * 5bb51b535SNeil Armstrong * This file is dual-licensed: you can use it either under the terms 6bb51b535SNeil Armstrong * of the GPL or the X11 license, at your option. Note that this dual 7bb51b535SNeil Armstrong * licensing only applies to this file, and not this project as a 8bb51b535SNeil Armstrong * whole. 9bb51b535SNeil Armstrong * 10bb51b535SNeil Armstrong * a) This library is free software; you can redistribute it and/or 11bb51b535SNeil Armstrong * modify it under the terms of the GNU General Public License as 12bb51b535SNeil Armstrong * published by the Free Software Foundation; either version 2 of the 13bb51b535SNeil Armstrong * License, or (at your option) any later version. 14bb51b535SNeil Armstrong * 15bb51b535SNeil Armstrong * This library is distributed in the hope that it will be useful, 16bb51b535SNeil Armstrong * but WITHOUT ANY WARRANTY; without even the implied warranty of 17bb51b535SNeil Armstrong * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18bb51b535SNeil Armstrong * GNU General Public License for more details. 19bb51b535SNeil Armstrong * 20bb51b535SNeil Armstrong * Or, alternatively, 21bb51b535SNeil Armstrong * 22bb51b535SNeil Armstrong * b) Permission is hereby granted, free of charge, to any person 23bb51b535SNeil Armstrong * obtaining a copy of this software and associated documentation 24bb51b535SNeil Armstrong * files (the "Software"), to deal in the Software without 25bb51b535SNeil Armstrong * restriction, including without limitation the rights to use, 26bb51b535SNeil Armstrong * copy, modify, merge, publish, distribute, sublicense, and/or 27bb51b535SNeil Armstrong * sell copies of the Software, and to permit persons to whom the 28bb51b535SNeil Armstrong * Software is furnished to do so, subject to the following 29bb51b535SNeil Armstrong * conditions: 30bb51b535SNeil Armstrong * 31bb51b535SNeil Armstrong * The above copyright notice and this permission notice shall be 32bb51b535SNeil Armstrong * included in all copies or substantial portions of the Software. 33bb51b535SNeil Armstrong * 34bb51b535SNeil Armstrong * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35bb51b535SNeil Armstrong * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 36bb51b535SNeil Armstrong * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 37bb51b535SNeil Armstrong * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 38bb51b535SNeil Armstrong * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 39bb51b535SNeil Armstrong * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 40bb51b535SNeil Armstrong * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 41bb51b535SNeil Armstrong * OTHER DEALINGS IN THE SOFTWARE. 42bb51b535SNeil Armstrong */ 43bb51b535SNeil Armstrong 44bb51b535SNeil Armstrong/* Common DTSI for same Amlogic Q200/Q201 and P230/P231 boards using either 45bb51b535SNeil Armstrong * the pin-compatible S912 (GXM) or S905D (GXL) SoCs. 46bb51b535SNeil Armstrong */ 47bb51b535SNeil Armstrong 48bb51b535SNeil Armstrong/ { 49bb51b535SNeil Armstrong aliases { 50bb51b535SNeil Armstrong serial0 = &uart_AO; 51bb51b535SNeil Armstrong }; 52bb51b535SNeil Armstrong 53bb51b535SNeil Armstrong chosen { 54bb51b535SNeil Armstrong stdout-path = "serial0:115200n8"; 55bb51b535SNeil Armstrong }; 56bb51b535SNeil Armstrong 57bb51b535SNeil Armstrong memory@0 { 58bb51b535SNeil Armstrong device_type = "memory"; 59bb51b535SNeil Armstrong reg = <0x0 0x0 0x0 0x80000000>; 60bb51b535SNeil Armstrong }; 61bb51b535SNeil Armstrong 62*b409f625SNeil Armstrong hdmi_5v: regulator-hdmi-5v { 63*b409f625SNeil Armstrong compatible = "regulator-fixed"; 64*b409f625SNeil Armstrong 65*b409f625SNeil Armstrong regulator-name = "HDMI_5V"; 66*b409f625SNeil Armstrong regulator-min-microvolt = <5000000>; 67*b409f625SNeil Armstrong regulator-max-microvolt = <5000000>; 68*b409f625SNeil Armstrong 69*b409f625SNeil Armstrong gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>; 70*b409f625SNeil Armstrong enable-active-high; 71*b409f625SNeil Armstrong regulator-always-on; 72*b409f625SNeil Armstrong }; 73*b409f625SNeil Armstrong 74bb51b535SNeil Armstrong vddio_boot: regulator-vddio_boot { 75bb51b535SNeil Armstrong compatible = "regulator-fixed"; 76bb51b535SNeil Armstrong regulator-name = "VDDIO_BOOT"; 77bb51b535SNeil Armstrong regulator-min-microvolt = <1800000>; 78bb51b535SNeil Armstrong regulator-max-microvolt = <1800000>; 79bb51b535SNeil Armstrong }; 80bb51b535SNeil Armstrong 81bb51b535SNeil Armstrong vddao_3v3: regulator-vddao_3v3 { 82bb51b535SNeil Armstrong compatible = "regulator-fixed"; 83bb51b535SNeil Armstrong regulator-name = "VDDAO_3V3"; 84bb51b535SNeil Armstrong regulator-min-microvolt = <3300000>; 85bb51b535SNeil Armstrong regulator-max-microvolt = <3300000>; 86bb51b535SNeil Armstrong }; 87bb51b535SNeil Armstrong 88bb51b535SNeil Armstrong vcc_3v3: regulator-vcc_3v3 { 89bb51b535SNeil Armstrong compatible = "regulator-fixed"; 90bb51b535SNeil Armstrong regulator-name = "VCC_3V3"; 91bb51b535SNeil Armstrong regulator-min-microvolt = <3300000>; 92bb51b535SNeil Armstrong regulator-max-microvolt = <3300000>; 93bb51b535SNeil Armstrong }; 94bb51b535SNeil Armstrong 95bb51b535SNeil Armstrong emmc_pwrseq: emmc-pwrseq { 96bb51b535SNeil Armstrong compatible = "mmc-pwrseq-emmc"; 97bb51b535SNeil Armstrong reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 98bb51b535SNeil Armstrong }; 99bb51b535SNeil Armstrong 100bb51b535SNeil Armstrong wifi32k: wifi32k { 101bb51b535SNeil Armstrong compatible = "pwm-clock"; 102bb51b535SNeil Armstrong #clock-cells = <0>; 103bb51b535SNeil Armstrong clock-frequency = <32768>; 104bb51b535SNeil Armstrong pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ 105bb51b535SNeil Armstrong }; 106bb51b535SNeil Armstrong 107bb51b535SNeil Armstrong sdio_pwrseq: sdio-pwrseq { 108bb51b535SNeil Armstrong compatible = "mmc-pwrseq-simple"; 109bb51b535SNeil Armstrong reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; 110bb51b535SNeil Armstrong clocks = <&wifi32k>; 111bb51b535SNeil Armstrong clock-names = "ext_clock"; 112bb51b535SNeil Armstrong }; 1136939db7eSNeil Armstrong 1146939db7eSNeil Armstrong cvbs-connector { 1156939db7eSNeil Armstrong compatible = "composite-video-connector"; 1166939db7eSNeil Armstrong 1176939db7eSNeil Armstrong port { 1186939db7eSNeil Armstrong cvbs_connector_in: endpoint { 1196939db7eSNeil Armstrong remote-endpoint = <&cvbs_vdac_out>; 1206939db7eSNeil Armstrong }; 1216939db7eSNeil Armstrong }; 1226939db7eSNeil Armstrong }; 1236939db7eSNeil Armstrong 1246939db7eSNeil Armstrong hdmi-connector { 1256939db7eSNeil Armstrong compatible = "hdmi-connector"; 1266939db7eSNeil Armstrong type = "a"; 1276939db7eSNeil Armstrong 1286939db7eSNeil Armstrong port { 1296939db7eSNeil Armstrong hdmi_connector_in: endpoint { 1306939db7eSNeil Armstrong remote-endpoint = <&hdmi_tx_tmds_out>; 1316939db7eSNeil Armstrong }; 1326939db7eSNeil Armstrong }; 1336939db7eSNeil Armstrong }; 134bb51b535SNeil Armstrong}; 135bb51b535SNeil Armstrong 136b16c71c9SNeil Armstrong&cec_AO { 137b16c71c9SNeil Armstrong status = "okay"; 138b16c71c9SNeil Armstrong pinctrl-0 = <&ao_cec_pins>; 139b16c71c9SNeil Armstrong pinctrl-names = "default"; 140b16c71c9SNeil Armstrong hdmi-phandle = <&hdmi_tx>; 141b16c71c9SNeil Armstrong}; 142b16c71c9SNeil Armstrong 143d5463d25SAndreas Färber&cvbs_vdac_port { 144d5463d25SAndreas Färber cvbs_vdac_out: endpoint { 145d5463d25SAndreas Färber remote-endpoint = <&cvbs_connector_in>; 146d5463d25SAndreas Färber }; 147d5463d25SAndreas Färber}; 148d5463d25SAndreas Färber 149d5463d25SAndreas Färberðmac { 150bb51b535SNeil Armstrong status = "okay"; 151d5463d25SAndreas Färber}; 152d5463d25SAndreas Färber 153d5463d25SAndreas Färber&hdmi_tx { 154d5463d25SAndreas Färber status = "okay"; 155d5463d25SAndreas Färber pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 156bb51b535SNeil Armstrong pinctrl-names = "default"; 157bb51b535SNeil Armstrong}; 158bb51b535SNeil Armstrong 159d5463d25SAndreas Färber&hdmi_tx_tmds_port { 160d5463d25SAndreas Färber hdmi_tx_tmds_out: endpoint { 161d5463d25SAndreas Färber remote-endpoint = <&hdmi_connector_in>; 162d5463d25SAndreas Färber }; 163d5463d25SAndreas Färber}; 164d5463d25SAndreas Färber 165bb51b535SNeil Armstrong&ir { 166bb51b535SNeil Armstrong status = "okay"; 167bb51b535SNeil Armstrong pinctrl-0 = <&remote_input_ao_pins>; 168bb51b535SNeil Armstrong pinctrl-names = "default"; 169bb51b535SNeil Armstrong}; 170bb51b535SNeil Armstrong 171d5463d25SAndreas Färber&pwm_ef { 172d5463d25SAndreas Färber status = "okay"; 173d5463d25SAndreas Färber pinctrl-0 = <&pwm_e_pins>; 174d5463d25SAndreas Färber pinctrl-names = "default"; 175d5463d25SAndreas Färber clocks = <&clkc CLKID_FCLK_DIV4>; 176d5463d25SAndreas Färber clock-names = "clkin0"; 177d5463d25SAndreas Färber}; 178d5463d25SAndreas Färber 179bb51b535SNeil Armstrong/* Wireless SDIO Module */ 180bb51b535SNeil Armstrong&sd_emmc_a { 181bb51b535SNeil Armstrong status = "okay"; 182bb51b535SNeil Armstrong pinctrl-0 = <&sdio_pins>; 18367e7607fSJerome Brunet pinctrl-1 = <&sdio_clk_gate_pins>; 18467e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 185bb51b535SNeil Armstrong #address-cells = <1>; 186bb51b535SNeil Armstrong #size-cells = <0>; 187bb51b535SNeil Armstrong 188bb51b535SNeil Armstrong bus-width = <4>; 189bb51b535SNeil Armstrong cap-sd-highspeed; 190bb51b535SNeil Armstrong max-frequency = <100000000>; 191bb51b535SNeil Armstrong 192bb51b535SNeil Armstrong non-removable; 193bb51b535SNeil Armstrong disable-wp; 194bb51b535SNeil Armstrong 195bb51b535SNeil Armstrong mmc-pwrseq = <&sdio_pwrseq>; 196bb51b535SNeil Armstrong 197bb51b535SNeil Armstrong vmmc-supply = <&vddao_3v3>; 198bb51b535SNeil Armstrong vqmmc-supply = <&vddio_boot>; 199bb51b535SNeil Armstrong 200b77b40baSAndreas Färber brcmf: wifi@1 { 201bb51b535SNeil Armstrong reg = <1>; 202bb51b535SNeil Armstrong compatible = "brcm,bcm4329-fmac"; 203bb51b535SNeil Armstrong }; 204bb51b535SNeil Armstrong}; 205bb51b535SNeil Armstrong 206bb51b535SNeil Armstrong/* SD card */ 207bb51b535SNeil Armstrong&sd_emmc_b { 208bb51b535SNeil Armstrong status = "okay"; 209bb51b535SNeil Armstrong pinctrl-0 = <&sdcard_pins>; 21067e7607fSJerome Brunet pinctrl-1 = <&sdcard_clk_gate_pins>; 21167e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 212bb51b535SNeil Armstrong 213bb51b535SNeil Armstrong bus-width = <4>; 214bb51b535SNeil Armstrong cap-sd-highspeed; 215bb51b535SNeil Armstrong max-frequency = <100000000>; 216bb51b535SNeil Armstrong disable-wp; 217bb51b535SNeil Armstrong 218bb51b535SNeil Armstrong cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; 219bb51b535SNeil Armstrong cd-inverted; 220bb51b535SNeil Armstrong 221bb51b535SNeil Armstrong vmmc-supply = <&vddao_3v3>; 222bb51b535SNeil Armstrong vqmmc-supply = <&vddio_boot>; 223bb51b535SNeil Armstrong}; 224bb51b535SNeil Armstrong 225bb51b535SNeil Armstrong/* eMMC */ 226bb51b535SNeil Armstrong&sd_emmc_c { 227bb51b535SNeil Armstrong status = "okay"; 228ab36be66SNeil Armstrong pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 22967e7607fSJerome Brunet pinctrl-1 = <&emmc_clk_gate_pins>; 23067e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 231bb51b535SNeil Armstrong 232bb51b535SNeil Armstrong bus-width = <8>; 233bb51b535SNeil Armstrong cap-mmc-highspeed; 234bb51b535SNeil Armstrong max-frequency = <200000000>; 235bb51b535SNeil Armstrong non-removable; 236bb51b535SNeil Armstrong disable-wp; 237bb51b535SNeil Armstrong mmc-ddr-1_8v; 238bb51b535SNeil Armstrong mmc-hs200-1_8v; 239bb51b535SNeil Armstrong 240bb51b535SNeil Armstrong mmc-pwrseq = <&emmc_pwrseq>; 241bb51b535SNeil Armstrong vmmc-supply = <&vcc_3v3>; 242bb51b535SNeil Armstrong vqmmc-supply = <&vddio_boot>; 243bb51b535SNeil Armstrong}; 244bb51b535SNeil Armstrong 245d5463d25SAndreas Färber/* This UART is brought out to the DB9 connector */ 246d5463d25SAndreas Färber&uart_AO { 247bb51b535SNeil Armstrong status = "okay"; 248d5463d25SAndreas Färber pinctrl-0 = <&uart_ao_a_pins>; 249bb51b535SNeil Armstrong pinctrl-names = "default"; 2506939db7eSNeil Armstrong}; 251