1da47515eSNeil Armstrong/* 2da47515eSNeil Armstrong * Copyright (c) 2016 Endless Computers, Inc. 3da47515eSNeil Armstrong * Author: Carlo Caione <carlo@endlessm.com> 4da47515eSNeil Armstrong * 5da47515eSNeil Armstrong * This file is dual-licensed: you can use it either under the terms 6da47515eSNeil Armstrong * of the GPL or the X11 license, at your option. Note that this dual 7da47515eSNeil Armstrong * licensing only applies to this file, and not this project as a 8da47515eSNeil Armstrong * whole. 9da47515eSNeil Armstrong * 10da47515eSNeil Armstrong * a) This library is free software; you can redistribute it and/or 11da47515eSNeil Armstrong * modify it under the terms of the GNU General Public License as 12da47515eSNeil Armstrong * published by the Free Software Foundation; either version 2 of the 13da47515eSNeil Armstrong * License, or (at your option) any later version. 14da47515eSNeil Armstrong * 15da47515eSNeil Armstrong * This library is distributed in the hope that it will be useful, 16da47515eSNeil Armstrong * but WITHOUT ANY WARRANTY; without even the implied warranty of 17da47515eSNeil Armstrong * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18da47515eSNeil Armstrong * GNU General Public License for more details. 19da47515eSNeil Armstrong * 20da47515eSNeil Armstrong * Or, alternatively, 21da47515eSNeil Armstrong * 22da47515eSNeil Armstrong * b) Permission is hereby granted, free of charge, to any person 23da47515eSNeil Armstrong * obtaining a copy of this software and associated documentation 24da47515eSNeil Armstrong * files (the "Software"), to deal in the Software without 25da47515eSNeil Armstrong * restriction, including without limitation the rights to use, 26da47515eSNeil Armstrong * copy, modify, merge, publish, distribute, sublicense, and/or 27da47515eSNeil Armstrong * sell copies of the Software, and to permit persons to whom the 28da47515eSNeil Armstrong * Software is furnished to do so, subject to the following 29da47515eSNeil Armstrong * conditions: 30da47515eSNeil Armstrong * 31da47515eSNeil Armstrong * The above copyright notice and this permission notice shall be 32da47515eSNeil Armstrong * included in all copies or substantial portions of the Software. 33da47515eSNeil Armstrong * 34da47515eSNeil Armstrong * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35da47515eSNeil Armstrong * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 36da47515eSNeil Armstrong * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 37da47515eSNeil Armstrong * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 38da47515eSNeil Armstrong * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 39da47515eSNeil Armstrong * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 40da47515eSNeil Armstrong * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 41da47515eSNeil Armstrong * OTHER DEALINGS IN THE SOFTWARE. 42da47515eSNeil Armstrong */ 43da47515eSNeil Armstrong 44da47515eSNeil Armstrong/dts-v1/; 45da47515eSNeil Armstrong 4682838e6fSNeil Armstrong#include <dt-bindings/input/input.h> 4782838e6fSNeil Armstrong 48bb51b535SNeil Armstrong#include "meson-gxl-s905d.dtsi" 49bb51b535SNeil Armstrong#include "meson-gx-p23x-q20x.dtsi" 50da47515eSNeil Armstrong 51da47515eSNeil Armstrong/ { 52da47515eSNeil Armstrong compatible = "amlogic,p230", "amlogic,s905d", "amlogic,meson-gxl"; 53da47515eSNeil Armstrong model = "Amlogic Meson GXL (S905D) P230 Development Board"; 5482838e6fSNeil Armstrong 5582838e6fSNeil Armstrong adc-keys { 5682838e6fSNeil Armstrong compatible = "adc-keys"; 5782838e6fSNeil Armstrong io-channels = <&saradc 0>; 5882838e6fSNeil Armstrong io-channel-names = "buttons"; 5982838e6fSNeil Armstrong keyup-threshold-microvolt = <1710000>; 6082838e6fSNeil Armstrong 6182838e6fSNeil Armstrong button-function { 6282838e6fSNeil Armstrong label = "Update"; 6382838e6fSNeil Armstrong linux,code = <KEY_VENDOR>; 6482838e6fSNeil Armstrong press-threshold-microvolt = <10000>; 6582838e6fSNeil Armstrong }; 6682838e6fSNeil Armstrong }; 6782838e6fSNeil Armstrong 6882838e6fSNeil Armstrong gpio-keys-polled { 6982838e6fSNeil Armstrong compatible = "gpio-keys-polled"; 7082838e6fSNeil Armstrong #address-cells = <1>; 7182838e6fSNeil Armstrong #size-cells = <0>; 7282838e6fSNeil Armstrong poll-interval = <100>; 7382838e6fSNeil Armstrong 7482838e6fSNeil Armstrong button@0 { 7582838e6fSNeil Armstrong label = "power"; 7682838e6fSNeil Armstrong linux,code = <KEY_POWER>; 7782838e6fSNeil Armstrong gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; 7882838e6fSNeil Armstrong }; 7982838e6fSNeil Armstrong }; 8082838e6fSNeil Armstrong 8182838e6fSNeil Armstrong vddio_ao18: regulator-vddio_ao18 { 8282838e6fSNeil Armstrong compatible = "regulator-fixed"; 8382838e6fSNeil Armstrong regulator-name = "VDDIO_AO18"; 8482838e6fSNeil Armstrong regulator-min-microvolt = <1800000>; 8582838e6fSNeil Armstrong regulator-max-microvolt = <1800000>; 8682838e6fSNeil Armstrong }; 87da47515eSNeil Armstrong}; 8873a5d99fSNeil Armstrong 8973a5d99fSNeil Armstrong/* P230 has exclusive choice between internal or external PHY */ 9073a5d99fSNeil Armstrongðmac { 9173a5d99fSNeil Armstrong pinctrl-0 = <ð_pins>; 9273a5d99fSNeil Armstrong pinctrl-names = "default"; 9373a5d99fSNeil Armstrong 9473a5d99fSNeil Armstrong /* Select external PHY by default */ 9573a5d99fSNeil Armstrong phy-handle = <&external_phy>; 9673a5d99fSNeil Armstrong 97093d23dbSMartin Blumenstingl amlogic,tx-delay-ns = <2>; 98093d23dbSMartin Blumenstingl 9973a5d99fSNeil Armstrong /* External PHY reset is shared with internal PHY Led signals */ 10073a5d99fSNeil Armstrong snps,reset-gpio = <&gpio GPIOZ_14 0>; 10173a5d99fSNeil Armstrong snps,reset-delays-us = <0 10000 1000000>; 10273a5d99fSNeil Armstrong snps,reset-active-low; 10373a5d99fSNeil Armstrong 10473a5d99fSNeil Armstrong /* External PHY is in RGMII */ 10573a5d99fSNeil Armstrong phy-mode = "rgmii"; 10673a5d99fSNeil Armstrong}; 10773a5d99fSNeil Armstrong 10873a5d99fSNeil Armstrong&external_mdio { 10973a5d99fSNeil Armstrong external_phy: ethernet-phy@0 { 11073a5d99fSNeil Armstrong compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22"; 11173a5d99fSNeil Armstrong reg = <0>; 11273a5d99fSNeil Armstrong max-speed = <1000>; 11373a5d99fSNeil Armstrong }; 11473a5d99fSNeil Armstrong}; 11582838e6fSNeil Armstrong 11682838e6fSNeil Armstrong&saradc { 11782838e6fSNeil Armstrong status = "okay"; 11882838e6fSNeil Armstrong vref-supply = <&vddio_ao18>; 11982838e6fSNeil Armstrong}; 120