1*bb51b535SNeil Armstrong/* 2*bb51b535SNeil Armstrong * Copyright (c) 2016 Endless Computers, Inc. 3*bb51b535SNeil Armstrong * Author: Carlo Caione <carlo@endlessm.com> 4*bb51b535SNeil Armstrong * 5*bb51b535SNeil Armstrong * This file is dual-licensed: you can use it either under the terms 6*bb51b535SNeil Armstrong * of the GPL or the X11 license, at your option. Note that this dual 7*bb51b535SNeil Armstrong * licensing only applies to this file, and not this project as a 8*bb51b535SNeil Armstrong * whole. 9*bb51b535SNeil Armstrong * 10*bb51b535SNeil Armstrong * a) This library is free software; you can redistribute it and/or 11*bb51b535SNeil Armstrong * modify it under the terms of the GNU General Public License as 12*bb51b535SNeil Armstrong * published by the Free Software Foundation; either version 2 of the 13*bb51b535SNeil Armstrong * License, or (at your option) any later version. 14*bb51b535SNeil Armstrong * 15*bb51b535SNeil Armstrong * This library is distributed in the hope that it will be useful, 16*bb51b535SNeil Armstrong * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*bb51b535SNeil Armstrong * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*bb51b535SNeil Armstrong * GNU General Public License for more details. 19*bb51b535SNeil Armstrong * 20*bb51b535SNeil Armstrong * Or, alternatively, 21*bb51b535SNeil Armstrong * 22*bb51b535SNeil Armstrong * b) Permission is hereby granted, free of charge, to any person 23*bb51b535SNeil Armstrong * obtaining a copy of this software and associated documentation 24*bb51b535SNeil Armstrong * files (the "Software"), to deal in the Software without 25*bb51b535SNeil Armstrong * restriction, including without limitation the rights to use, 26*bb51b535SNeil Armstrong * copy, modify, merge, publish, distribute, sublicense, and/or 27*bb51b535SNeil Armstrong * sell copies of the Software, and to permit persons to whom the 28*bb51b535SNeil Armstrong * Software is furnished to do so, subject to the following 29*bb51b535SNeil Armstrong * conditions: 30*bb51b535SNeil Armstrong * 31*bb51b535SNeil Armstrong * The above copyright notice and this permission notice shall be 32*bb51b535SNeil Armstrong * included in all copies or substantial portions of the Software. 33*bb51b535SNeil Armstrong * 34*bb51b535SNeil Armstrong * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35*bb51b535SNeil Armstrong * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 36*bb51b535SNeil Armstrong * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 37*bb51b535SNeil Armstrong * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 38*bb51b535SNeil Armstrong * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 39*bb51b535SNeil Armstrong * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 40*bb51b535SNeil Armstrong * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 41*bb51b535SNeil Armstrong * OTHER DEALINGS IN THE SOFTWARE. 42*bb51b535SNeil Armstrong */ 43*bb51b535SNeil Armstrong 44*bb51b535SNeil Armstrong/* Common DTSI for same Amlogic Q200/Q201 and P230/P231 boards using either 45*bb51b535SNeil Armstrong * the pin-compatible S912 (GXM) or S905D (GXL) SoCs. 46*bb51b535SNeil Armstrong */ 47*bb51b535SNeil Armstrong 48*bb51b535SNeil Armstrong/ { 49*bb51b535SNeil Armstrong aliases { 50*bb51b535SNeil Armstrong serial0 = &uart_AO; 51*bb51b535SNeil Armstrong }; 52*bb51b535SNeil Armstrong 53*bb51b535SNeil Armstrong chosen { 54*bb51b535SNeil Armstrong stdout-path = "serial0:115200n8"; 55*bb51b535SNeil Armstrong }; 56*bb51b535SNeil Armstrong 57*bb51b535SNeil Armstrong memory@0 { 58*bb51b535SNeil Armstrong device_type = "memory"; 59*bb51b535SNeil Armstrong reg = <0x0 0x0 0x0 0x80000000>; 60*bb51b535SNeil Armstrong }; 61*bb51b535SNeil Armstrong 62*bb51b535SNeil Armstrong vddio_boot: regulator-vddio_boot { 63*bb51b535SNeil Armstrong compatible = "regulator-fixed"; 64*bb51b535SNeil Armstrong regulator-name = "VDDIO_BOOT"; 65*bb51b535SNeil Armstrong regulator-min-microvolt = <1800000>; 66*bb51b535SNeil Armstrong regulator-max-microvolt = <1800000>; 67*bb51b535SNeil Armstrong }; 68*bb51b535SNeil Armstrong 69*bb51b535SNeil Armstrong vddao_3v3: regulator-vddao_3v3 { 70*bb51b535SNeil Armstrong compatible = "regulator-fixed"; 71*bb51b535SNeil Armstrong regulator-name = "VDDAO_3V3"; 72*bb51b535SNeil Armstrong regulator-min-microvolt = <3300000>; 73*bb51b535SNeil Armstrong regulator-max-microvolt = <3300000>; 74*bb51b535SNeil Armstrong }; 75*bb51b535SNeil Armstrong 76*bb51b535SNeil Armstrong vcc_3v3: regulator-vcc_3v3 { 77*bb51b535SNeil Armstrong compatible = "regulator-fixed"; 78*bb51b535SNeil Armstrong regulator-name = "VCC_3V3"; 79*bb51b535SNeil Armstrong regulator-min-microvolt = <3300000>; 80*bb51b535SNeil Armstrong regulator-max-microvolt = <3300000>; 81*bb51b535SNeil Armstrong }; 82*bb51b535SNeil Armstrong 83*bb51b535SNeil Armstrong emmc_pwrseq: emmc-pwrseq { 84*bb51b535SNeil Armstrong compatible = "mmc-pwrseq-emmc"; 85*bb51b535SNeil Armstrong reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 86*bb51b535SNeil Armstrong }; 87*bb51b535SNeil Armstrong 88*bb51b535SNeil Armstrong wifi32k: wifi32k { 89*bb51b535SNeil Armstrong compatible = "pwm-clock"; 90*bb51b535SNeil Armstrong #clock-cells = <0>; 91*bb51b535SNeil Armstrong clock-frequency = <32768>; 92*bb51b535SNeil Armstrong pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ 93*bb51b535SNeil Armstrong }; 94*bb51b535SNeil Armstrong 95*bb51b535SNeil Armstrong sdio_pwrseq: sdio-pwrseq { 96*bb51b535SNeil Armstrong compatible = "mmc-pwrseq-simple"; 97*bb51b535SNeil Armstrong reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; 98*bb51b535SNeil Armstrong clocks = <&wifi32k>; 99*bb51b535SNeil Armstrong clock-names = "ext_clock"; 100*bb51b535SNeil Armstrong }; 101*bb51b535SNeil Armstrong}; 102*bb51b535SNeil Armstrong 103*bb51b535SNeil Armstrong/* This UART is brought out to the DB9 connector */ 104*bb51b535SNeil Armstrong&uart_AO { 105*bb51b535SNeil Armstrong status = "okay"; 106*bb51b535SNeil Armstrong pinctrl-0 = <&uart_ao_a_pins>; 107*bb51b535SNeil Armstrong pinctrl-names = "default"; 108*bb51b535SNeil Armstrong}; 109*bb51b535SNeil Armstrong 110*bb51b535SNeil Armstrong&ir { 111*bb51b535SNeil Armstrong status = "okay"; 112*bb51b535SNeil Armstrong pinctrl-0 = <&remote_input_ao_pins>; 113*bb51b535SNeil Armstrong pinctrl-names = "default"; 114*bb51b535SNeil Armstrong}; 115*bb51b535SNeil Armstrong 116*bb51b535SNeil Armstrong/* Wireless SDIO Module */ 117*bb51b535SNeil Armstrong&sd_emmc_a { 118*bb51b535SNeil Armstrong status = "okay"; 119*bb51b535SNeil Armstrong pinctrl-0 = <&sdio_pins>; 120*bb51b535SNeil Armstrong pinctrl-names = "default"; 121*bb51b535SNeil Armstrong #address-cells = <1>; 122*bb51b535SNeil Armstrong #size-cells = <0>; 123*bb51b535SNeil Armstrong 124*bb51b535SNeil Armstrong bus-width = <4>; 125*bb51b535SNeil Armstrong cap-sd-highspeed; 126*bb51b535SNeil Armstrong max-frequency = <100000000>; 127*bb51b535SNeil Armstrong 128*bb51b535SNeil Armstrong non-removable; 129*bb51b535SNeil Armstrong disable-wp; 130*bb51b535SNeil Armstrong 131*bb51b535SNeil Armstrong mmc-pwrseq = <&sdio_pwrseq>; 132*bb51b535SNeil Armstrong 133*bb51b535SNeil Armstrong vmmc-supply = <&vddao_3v3>; 134*bb51b535SNeil Armstrong vqmmc-supply = <&vddio_boot>; 135*bb51b535SNeil Armstrong 136*bb51b535SNeil Armstrong brcmf: bcrmf@1 { 137*bb51b535SNeil Armstrong reg = <1>; 138*bb51b535SNeil Armstrong compatible = "brcm,bcm4329-fmac"; 139*bb51b535SNeil Armstrong }; 140*bb51b535SNeil Armstrong}; 141*bb51b535SNeil Armstrong 142*bb51b535SNeil Armstrong/* SD card */ 143*bb51b535SNeil Armstrong&sd_emmc_b { 144*bb51b535SNeil Armstrong status = "okay"; 145*bb51b535SNeil Armstrong pinctrl-0 = <&sdcard_pins>; 146*bb51b535SNeil Armstrong pinctrl-names = "default"; 147*bb51b535SNeil Armstrong 148*bb51b535SNeil Armstrong bus-width = <4>; 149*bb51b535SNeil Armstrong cap-sd-highspeed; 150*bb51b535SNeil Armstrong max-frequency = <100000000>; 151*bb51b535SNeil Armstrong disable-wp; 152*bb51b535SNeil Armstrong 153*bb51b535SNeil Armstrong cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; 154*bb51b535SNeil Armstrong cd-inverted; 155*bb51b535SNeil Armstrong 156*bb51b535SNeil Armstrong vmmc-supply = <&vddao_3v3>; 157*bb51b535SNeil Armstrong vqmmc-supply = <&vddio_boot>; 158*bb51b535SNeil Armstrong}; 159*bb51b535SNeil Armstrong 160*bb51b535SNeil Armstrong/* eMMC */ 161*bb51b535SNeil Armstrong&sd_emmc_c { 162*bb51b535SNeil Armstrong status = "okay"; 163*bb51b535SNeil Armstrong pinctrl-0 = <&emmc_pins>; 164*bb51b535SNeil Armstrong pinctrl-names = "default"; 165*bb51b535SNeil Armstrong 166*bb51b535SNeil Armstrong bus-width = <8>; 167*bb51b535SNeil Armstrong cap-sd-highspeed; 168*bb51b535SNeil Armstrong cap-mmc-highspeed; 169*bb51b535SNeil Armstrong max-frequency = <200000000>; 170*bb51b535SNeil Armstrong non-removable; 171*bb51b535SNeil Armstrong disable-wp; 172*bb51b535SNeil Armstrong mmc-ddr-1_8v; 173*bb51b535SNeil Armstrong mmc-hs200-1_8v; 174*bb51b535SNeil Armstrong 175*bb51b535SNeil Armstrong mmc-pwrseq = <&emmc_pwrseq>; 176*bb51b535SNeil Armstrong vmmc-supply = <&vcc_3v3>; 177*bb51b535SNeil Armstrong vqmmc-supply = <&vddio_boot>; 178*bb51b535SNeil Armstrong}; 179*bb51b535SNeil Armstrong 180*bb51b535SNeil Armstrong&pwm_ef { 181*bb51b535SNeil Armstrong status = "okay"; 182*bb51b535SNeil Armstrong pinctrl-0 = <&pwm_e_pins>; 183*bb51b535SNeil Armstrong pinctrl-names = "default"; 184*bb51b535SNeil Armstrong clocks = <&clkc CLKID_FCLK_DIV4>; 185*bb51b535SNeil Armstrong clock-names = "clkin0"; 186*bb51b535SNeil Armstrong}; 187*bb51b535SNeil Armstrong 188*bb51b535SNeil Armstrongðmac { 189*bb51b535SNeil Armstrong status = "okay"; 190*bb51b535SNeil Armstrong}; 191