19d41bbb6SAndre Przywara/* 29d41bbb6SAndre Przywara * Copyright (C) 2016 ARM Ltd. 39d41bbb6SAndre Przywara * 49d41bbb6SAndre Przywara * This file is dual-licensed: you can use it either under the terms 59d41bbb6SAndre Przywara * of the GPL or the X11 license, at your option. Note that this dual 69d41bbb6SAndre Przywara * licensing only applies to this file, and not this project as a 79d41bbb6SAndre Przywara * whole. 89d41bbb6SAndre Przywara * 99d41bbb6SAndre Przywara * a) This file is free software; you can redistribute it and/or 109d41bbb6SAndre Przywara * modify it under the terms of the GNU General Public License as 119d41bbb6SAndre Przywara * published by the Free Software Foundation; either version 2 of the 129d41bbb6SAndre Przywara * License, or (at your option) any later version. 139d41bbb6SAndre Przywara * 149d41bbb6SAndre Przywara * This file is distributed in the hope that it will be useful, 159d41bbb6SAndre Przywara * but WITHOUT ANY WARRANTY; without even the implied warranty of 169d41bbb6SAndre Przywara * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 179d41bbb6SAndre Przywara * GNU General Public License for more details. 189d41bbb6SAndre Przywara * 199d41bbb6SAndre Przywara * Or, alternatively, 209d41bbb6SAndre Przywara * 219d41bbb6SAndre Przywara * b) Permission is hereby granted, free of charge, to any person 229d41bbb6SAndre Przywara * obtaining a copy of this software and associated documentation 239d41bbb6SAndre Przywara * files (the "Software"), to deal in the Software without 249d41bbb6SAndre Przywara * restriction, including without limitation the rights to use, 259d41bbb6SAndre Przywara * copy, modify, merge, publish, distribute, sublicense, and/or 269d41bbb6SAndre Przywara * sell copies of the Software, and to permit persons to whom the 279d41bbb6SAndre Przywara * Software is furnished to do so, subject to the following 289d41bbb6SAndre Przywara * conditions: 299d41bbb6SAndre Przywara * 309d41bbb6SAndre Przywara * The above copyright notice and this permission notice shall be 319d41bbb6SAndre Przywara * included in all copies or substantial portions of the Software. 329d41bbb6SAndre Przywara * 339d41bbb6SAndre Przywara * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 349d41bbb6SAndre Przywara * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 359d41bbb6SAndre Przywara * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 369d41bbb6SAndre Przywara * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 379d41bbb6SAndre Przywara * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 389d41bbb6SAndre Przywara * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 399d41bbb6SAndre Przywara * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 409d41bbb6SAndre Przywara * OTHER DEALINGS IN THE SOFTWARE. 419d41bbb6SAndre Przywara */ 429d41bbb6SAndre Przywara 439d41bbb6SAndre Przywara/dts-v1/; 449d41bbb6SAndre Przywara#include "sun50i-h5.dtsi" 459d41bbb6SAndre Przywara 469d41bbb6SAndre Przywara#include <dt-bindings/gpio/gpio.h> 479d41bbb6SAndre Przywara#include <dt-bindings/input/input.h> 489d41bbb6SAndre Przywara#include <dt-bindings/pinctrl/sun4i-a10.h> 499d41bbb6SAndre Przywara 509d41bbb6SAndre Przywara/ { 519d41bbb6SAndre Przywara model = "Xunlong Orange Pi PC 2"; 529d41bbb6SAndre Przywara compatible = "xunlong,orangepi-pc2", "allwinner,sun50i-h5"; 539d41bbb6SAndre Przywara 549d41bbb6SAndre Przywara reg_vcc3v3: vcc3v3 { 559d41bbb6SAndre Przywara compatible = "regulator-fixed"; 569d41bbb6SAndre Przywara regulator-name = "vcc3v3"; 579d41bbb6SAndre Przywara regulator-min-microvolt = <3300000>; 589d41bbb6SAndre Przywara regulator-max-microvolt = <3300000>; 599d41bbb6SAndre Przywara }; 609d41bbb6SAndre Przywara 619d41bbb6SAndre Przywara aliases { 6244a94c7eSCorentin Labbe ethernet0 = &emac; 639d41bbb6SAndre Przywara serial0 = &uart0; 649d41bbb6SAndre Przywara }; 659d41bbb6SAndre Przywara 669d41bbb6SAndre Przywara chosen { 679d41bbb6SAndre Przywara stdout-path = "serial0:115200n8"; 689d41bbb6SAndre Przywara }; 699d41bbb6SAndre Przywara 7022821975SJernej Skrabec connector { 7122821975SJernej Skrabec compatible = "hdmi-connector"; 7222821975SJernej Skrabec type = "a"; 7322821975SJernej Skrabec 7422821975SJernej Skrabec port { 7522821975SJernej Skrabec hdmi_con_in: endpoint { 7622821975SJernej Skrabec remote-endpoint = <&hdmi_out_con>; 7722821975SJernej Skrabec }; 7822821975SJernej Skrabec }; 7922821975SJernej Skrabec }; 8022821975SJernej Skrabec 819d41bbb6SAndre Przywara leds { 829d41bbb6SAndre Przywara compatible = "gpio-leds"; 839d41bbb6SAndre Przywara 849d41bbb6SAndre Przywara pwr { 859d41bbb6SAndre Przywara label = "orangepi:green:pwr"; 869d41bbb6SAndre Przywara gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; 879d41bbb6SAndre Przywara default-state = "on"; 889d41bbb6SAndre Przywara }; 899d41bbb6SAndre Przywara 909d41bbb6SAndre Przywara status { 919d41bbb6SAndre Przywara label = "orangepi:red:status"; 929d41bbb6SAndre Przywara gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; 939d41bbb6SAndre Przywara }; 949d41bbb6SAndre Przywara }; 959d41bbb6SAndre Przywara 969d41bbb6SAndre Przywara r-gpio-keys { 979d41bbb6SAndre Przywara compatible = "gpio-keys"; 989d41bbb6SAndre Przywara 999d41bbb6SAndre Przywara sw4 { 1009d41bbb6SAndre Przywara label = "sw4"; 1019d41bbb6SAndre Przywara linux,code = <BTN_0>; 1029d41bbb6SAndre Przywara gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; 1039d41bbb6SAndre Przywara }; 1049d41bbb6SAndre Przywara }; 1055313ea66SIcenowy Zheng 10699cacebfSCorentin Labbe reg_gmac_3v3: gmac-3v3 { 10799cacebfSCorentin Labbe compatible = "regulator-fixed"; 10899cacebfSCorentin Labbe regulator-name = "gmac-3v3"; 10999cacebfSCorentin Labbe regulator-min-microvolt = <3300000>; 11099cacebfSCorentin Labbe regulator-max-microvolt = <3300000>; 11199cacebfSCorentin Labbe startup-delay-us = <100000>; 11299cacebfSCorentin Labbe enable-active-high; 11399cacebfSCorentin Labbe gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; 11499cacebfSCorentin Labbe }; 11599cacebfSCorentin Labbe 1165313ea66SIcenowy Zheng reg_usb0_vbus: usb0-vbus { 1175313ea66SIcenowy Zheng compatible = "regulator-fixed"; 1185313ea66SIcenowy Zheng regulator-name = "usb0-vbus"; 1195313ea66SIcenowy Zheng regulator-min-microvolt = <5000000>; 1205313ea66SIcenowy Zheng regulator-max-microvolt = <5000000>; 1215313ea66SIcenowy Zheng enable-active-high; 1225313ea66SIcenowy Zheng gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ 1235313ea66SIcenowy Zheng status = "okay"; 1245313ea66SIcenowy Zheng }; 1259d41bbb6SAndre Przywara}; 1269d41bbb6SAndre Przywara 1279d41bbb6SAndre Przywara&codec { 1289d41bbb6SAndre Przywara allwinner,audio-routing = 1299d41bbb6SAndre Przywara "Line Out", "LINEOUT", 1309d41bbb6SAndre Przywara "MIC1", "Mic", 1319d41bbb6SAndre Przywara "Mic", "MBIAS"; 1329d41bbb6SAndre Przywara status = "okay"; 1339d41bbb6SAndre Przywara}; 1349d41bbb6SAndre Przywara 13522821975SJernej Skrabec&de { 13622821975SJernej Skrabec status = "okay"; 13722821975SJernej Skrabec}; 13822821975SJernej Skrabec 1395313ea66SIcenowy Zheng&ehci0 { 1405313ea66SIcenowy Zheng status = "okay"; 1415313ea66SIcenowy Zheng}; 1425313ea66SIcenowy Zheng 1439d41bbb6SAndre Przywara&ehci1 { 1449d41bbb6SAndre Przywara status = "okay"; 1459d41bbb6SAndre Przywara}; 1469d41bbb6SAndre Przywara 1479d41bbb6SAndre Przywara&ehci2 { 1489d41bbb6SAndre Przywara status = "okay"; 1499d41bbb6SAndre Przywara}; 1509d41bbb6SAndre Przywara 1519d41bbb6SAndre Przywara&ehci3 { 1529d41bbb6SAndre Przywara status = "okay"; 1539d41bbb6SAndre Przywara}; 1549d41bbb6SAndre Przywara 15544a94c7eSCorentin Labbe&emac { 15644a94c7eSCorentin Labbe pinctrl-names = "default"; 15744a94c7eSCorentin Labbe pinctrl-0 = <&emac_rgmii_pins>; 15844a94c7eSCorentin Labbe phy-supply = <®_gmac_3v3>; 15944a94c7eSCorentin Labbe phy-handle = <&ext_rgmii_phy>; 16044a94c7eSCorentin Labbe phy-mode = "rgmii"; 16144a94c7eSCorentin Labbe status = "okay"; 16244a94c7eSCorentin Labbe}; 16344a94c7eSCorentin Labbe 16444a94c7eSCorentin Labbe&external_mdio { 16544a94c7eSCorentin Labbe ext_rgmii_phy: ethernet-phy@1 { 16644a94c7eSCorentin Labbe compatible = "ethernet-phy-ieee802.3-c22"; 16744a94c7eSCorentin Labbe reg = <1>; 16844a94c7eSCorentin Labbe }; 16944a94c7eSCorentin Labbe}; 17044a94c7eSCorentin Labbe 17122821975SJernej Skrabec&hdmi { 17222821975SJernej Skrabec status = "okay"; 17322821975SJernej Skrabec}; 17422821975SJernej Skrabec 17522821975SJernej Skrabec&hdmi_out { 17622821975SJernej Skrabec hdmi_out_con: endpoint { 17722821975SJernej Skrabec remote-endpoint = <&hdmi_con_in>; 17822821975SJernej Skrabec }; 17922821975SJernej Skrabec}; 18022821975SJernej Skrabec 1819d41bbb6SAndre Przywara&ir { 1829d41bbb6SAndre Przywara pinctrl-names = "default"; 1839d41bbb6SAndre Przywara pinctrl-0 = <&ir_pins_a>; 1849d41bbb6SAndre Przywara status = "okay"; 1859d41bbb6SAndre Przywara}; 1869d41bbb6SAndre Przywara 1879d41bbb6SAndre Przywara&mmc0 { 1889d41bbb6SAndre Przywara vmmc-supply = <®_vcc3v3>; 1899d41bbb6SAndre Przywara bus-width = <4>; 1909d41bbb6SAndre Przywara cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 1919d41bbb6SAndre Przywara status = "okay"; 1929d41bbb6SAndre Przywara}; 1939d41bbb6SAndre Przywara 1945313ea66SIcenowy Zheng&ohci0 { 1955313ea66SIcenowy Zheng status = "okay"; 1965313ea66SIcenowy Zheng}; 1975313ea66SIcenowy Zheng 1989d41bbb6SAndre Przywara&ohci1 { 1999d41bbb6SAndre Przywara status = "okay"; 2009d41bbb6SAndre Przywara}; 2019d41bbb6SAndre Przywara 2029d41bbb6SAndre Przywara&ohci2 { 2039d41bbb6SAndre Przywara status = "okay"; 2049d41bbb6SAndre Przywara}; 2059d41bbb6SAndre Przywara 2069d41bbb6SAndre Przywara&ohci3 { 2079d41bbb6SAndre Przywara status = "okay"; 2089d41bbb6SAndre Przywara}; 2099d41bbb6SAndre Przywara 2109d41bbb6SAndre Przywara&uart0 { 2119d41bbb6SAndre Przywara pinctrl-names = "default"; 2129d41bbb6SAndre Przywara pinctrl-0 = <&uart0_pins_a>; 2139d41bbb6SAndre Przywara status = "okay"; 2149d41bbb6SAndre Przywara}; 2159d41bbb6SAndre Przywara 2169d41bbb6SAndre Przywara&uart1 { 2179d41bbb6SAndre Przywara pinctrl-names = "default"; 2189d41bbb6SAndre Przywara pinctrl-0 = <&uart1_pins>; 2199d41bbb6SAndre Przywara status = "disabled"; 2209d41bbb6SAndre Przywara}; 2219d41bbb6SAndre Przywara 2229d41bbb6SAndre Przywara&uart2 { 2239d41bbb6SAndre Przywara pinctrl-names = "default"; 2249d41bbb6SAndre Przywara pinctrl-0 = <&uart2_pins>; 2259d41bbb6SAndre Przywara status = "disabled"; 2269d41bbb6SAndre Przywara}; 2279d41bbb6SAndre Przywara 2285313ea66SIcenowy Zheng&usb_otg { 2295313ea66SIcenowy Zheng dr_mode = "otg"; 2305313ea66SIcenowy Zheng status = "okay"; 2315313ea66SIcenowy Zheng}; 2325313ea66SIcenowy Zheng 2339d41bbb6SAndre Przywara&usbphy { 2345313ea66SIcenowy Zheng /* USB Type-A ports' VBUS is always on */ 2355313ea66SIcenowy Zheng usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 2365313ea66SIcenowy Zheng usb0_vbus-supply = <®_usb0_vbus>; 2379d41bbb6SAndre Przywara status = "okay"; 2389d41bbb6SAndre Przywara}; 239