1114abfe1SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 285596034SKevin Hilman/* 385596034SKevin Hilman * Copyright (c) 2016 Andreas Färber 485596034SKevin Hilman * Copyright (c) 2016 BayLibre, Inc. 585596034SKevin Hilman * Author: Kevin Hilman <khilman@kernel.org> 685596034SKevin Hilman */ 785596034SKevin Hilman 885596034SKevin Hilman/dts-v1/; 985596034SKevin Hilman 1085596034SKevin Hilman#include "meson-gxbb.dtsi" 11f40d437fSCarlo Caione#include <dt-bindings/gpio/gpio.h> 1285596034SKevin Hilman 1385596034SKevin Hilman/ { 1485596034SKevin Hilman compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb"; 1585596034SKevin Hilman model = "Hardkernel ODROID-C2"; 1685596034SKevin Hilman 1785596034SKevin Hilman aliases { 1885596034SKevin Hilman serial0 = &uart_AO; 19059a58fcSJorge Ramirez-Ortiz ethernet0 = ðmac; 2085596034SKevin Hilman }; 2185596034SKevin Hilman 2285596034SKevin Hilman chosen { 2385596034SKevin Hilman stdout-path = "serial0:115200n8"; 2485596034SKevin Hilman }; 2585596034SKevin Hilman 2685596034SKevin Hilman memory@0 { 2785596034SKevin Hilman device_type = "memory"; 2885596034SKevin Hilman reg = <0x0 0x0 0x0 0x80000000>; 2985596034SKevin Hilman }; 30f40d437fSCarlo Caione 315a0803bdSBrian Kim usb_otg_pwr: regulator-usb-pwrs { 325a0803bdSBrian Kim compatible = "regulator-fixed"; 335a0803bdSBrian Kim 345a0803bdSBrian Kim regulator-name = "USB_OTG_PWR"; 355a0803bdSBrian Kim 365a0803bdSBrian Kim regulator-min-microvolt = <5000000>; 375a0803bdSBrian Kim regulator-max-microvolt = <5000000>; 385a0803bdSBrian Kim 395a0803bdSBrian Kim gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; 405a0803bdSBrian Kim enable-active-high; 415a0803bdSBrian Kim }; 425a0803bdSBrian Kim 43f40d437fSCarlo Caione leds { 44f40d437fSCarlo Caione compatible = "gpio-leds"; 45f40d437fSCarlo Caione blue { 46f40d437fSCarlo Caione label = "c2:blue:alive"; 47f40d437fSCarlo Caione gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>; 48f40d437fSCarlo Caione linux,default-trigger = "heartbeat"; 49f40d437fSCarlo Caione default-state = "off"; 50f40d437fSCarlo Caione }; 51f40d437fSCarlo Caione }; 52ef8d2ffeSKevin Hilman 53ef8d2ffeSKevin Hilman tflash_vdd: regulator-tflash_vdd { 54ef8d2ffeSKevin Hilman /* 55ef8d2ffeSKevin Hilman * signal name from schematics: TFLASH_VDD_EN 56ef8d2ffeSKevin Hilman */ 57ef8d2ffeSKevin Hilman compatible = "regulator-fixed"; 58ef8d2ffeSKevin Hilman 59ef8d2ffeSKevin Hilman regulator-name = "TFLASH_VDD"; 60ef8d2ffeSKevin Hilman regulator-min-microvolt = <3300000>; 61ef8d2ffeSKevin Hilman regulator-max-microvolt = <3300000>; 62ef8d2ffeSKevin Hilman 63c34cd35eSNeil Armstrong gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>; 64ef8d2ffeSKevin Hilman enable-active-high; 65ef8d2ffeSKevin Hilman }; 66ef8d2ffeSKevin Hilman 67ef8d2ffeSKevin Hilman tf_io: gpio-regulator-tf_io { 68ef8d2ffeSKevin Hilman compatible = "regulator-gpio"; 69ef8d2ffeSKevin Hilman 70ef8d2ffeSKevin Hilman regulator-name = "TF_IO"; 71ef8d2ffeSKevin Hilman regulator-min-microvolt = <1800000>; 72ef8d2ffeSKevin Hilman regulator-max-microvolt = <3300000>; 73ef8d2ffeSKevin Hilman 74ef8d2ffeSKevin Hilman /* 75ef8d2ffeSKevin Hilman * signal name from schematics: TF_3V3N_1V8_EN 76ef8d2ffeSKevin Hilman */ 77ef8d2ffeSKevin Hilman gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; 78ef8d2ffeSKevin Hilman gpios-states = <0>; 79ef8d2ffeSKevin Hilman 80ef8d2ffeSKevin Hilman states = <3300000 0 81ef8d2ffeSKevin Hilman 1800000 1>; 82ef8d2ffeSKevin Hilman }; 83ef8d2ffeSKevin Hilman 84ef8d2ffeSKevin Hilman vcc1v8: regulator-vcc1v8 { 85ef8d2ffeSKevin Hilman compatible = "regulator-fixed"; 86ef8d2ffeSKevin Hilman regulator-name = "VCC1V8"; 87ef8d2ffeSKevin Hilman regulator-min-microvolt = <1800000>; 88ef8d2ffeSKevin Hilman regulator-max-microvolt = <1800000>; 89ef8d2ffeSKevin Hilman }; 90ef8d2ffeSKevin Hilman 91ef8d2ffeSKevin Hilman vcc3v3: regulator-vcc3v3 { 92ef8d2ffeSKevin Hilman compatible = "regulator-fixed"; 93ef8d2ffeSKevin Hilman regulator-name = "VCC3V3"; 94ef8d2ffeSKevin Hilman regulator-min-microvolt = <3300000>; 95ef8d2ffeSKevin Hilman regulator-max-microvolt = <3300000>; 96ef8d2ffeSKevin Hilman }; 97ef8d2ffeSKevin Hilman 98ef8d2ffeSKevin Hilman emmc_pwrseq: emmc-pwrseq { 99ef8d2ffeSKevin Hilman compatible = "mmc-pwrseq-emmc"; 100ef8d2ffeSKevin Hilman reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 101ef8d2ffeSKevin Hilman }; 102fc19afa1SNeil Armstrong 103fc19afa1SNeil Armstrong hdmi-connector { 104fc19afa1SNeil Armstrong compatible = "hdmi-connector"; 105fc19afa1SNeil Armstrong type = "a"; 106fc19afa1SNeil Armstrong 107fc19afa1SNeil Armstrong port { 108fc19afa1SNeil Armstrong hdmi_connector_in: endpoint { 109fc19afa1SNeil Armstrong remote-endpoint = <&hdmi_tx_tmds_out>; 110fc19afa1SNeil Armstrong }; 111fc19afa1SNeil Armstrong }; 112fc19afa1SNeil Armstrong }; 113fc19afa1SNeil Armstrong}; 114fc19afa1SNeil Armstrong 115fc19afa1SNeil Armstrong&cec_AO { 116fc19afa1SNeil Armstrong status = "okay"; 117fc19afa1SNeil Armstrong pinctrl-0 = <&ao_cec_pins>; 118fc19afa1SNeil Armstrong pinctrl-names = "default"; 119fc19afa1SNeil Armstrong hdmi-phandle = <&hdmi_tx>; 12085596034SKevin Hilman}; 12185596034SKevin Hilman 1228c5509f0SKevin Hilmanðmac { 1238c5509f0SKevin Hilman status = "okay"; 1243be2d9cfSNeil Armstrong pinctrl-0 = <ð_rgmii_pins>; 1258c5509f0SKevin Hilman pinctrl-names = "default"; 126feb3cbeaSJerome Brunet phy-handle = <ð_phy0>; 127b6ff2721SMartin Blumenstingl phy-mode = "rgmii"; 128b6ff2721SMartin Blumenstingl 129b6ff2721SMartin Blumenstingl snps,reset-gpio = <&gpio GPIOZ_14 0>; 130b6ff2721SMartin Blumenstingl snps,reset-delays-us = <0 10000 1000000>; 131b6ff2721SMartin Blumenstingl snps,reset-active-low; 132feb3cbeaSJerome Brunet 133093d23dbSMartin Blumenstingl amlogic,tx-delay-ns = <2>; 134093d23dbSMartin Blumenstingl 135feb3cbeaSJerome Brunet mdio { 136feb3cbeaSJerome Brunet compatible = "snps,dwmac-mdio"; 137feb3cbeaSJerome Brunet #address-cells = <1>; 138feb3cbeaSJerome Brunet #size-cells = <0>; 139feb3cbeaSJerome Brunet 140feb3cbeaSJerome Brunet eth_phy0: ethernet-phy@0 { 14150290cfeSMartin Blumenstingl /* Realtek RTL8211F (0x001cc916) */ 142feb3cbeaSJerome Brunet reg = <0>; 143b94d22d9SJerome Brunet interrupt-parent = <&gpio_intc>; 14450290cfeSMartin Blumenstingl /* MAC_INTR on GPIOZ_15 */ 145b94d22d9SJerome Brunet interrupts = <29 IRQ_TYPE_LEVEL_LOW>; 146feb3cbeaSJerome Brunet }; 147feb3cbeaSJerome Brunet }; 1488c5509f0SKevin Hilman}; 1498c5509f0SKevin Hilman 1503b69bdbfSAndreas Färber&gpio_ao { 1513b69bdbfSAndreas Färber /* 1523b69bdbfSAndreas Färber * WARNING: The USB Hub on the Odroid-C2 needs a reset signal 1533b69bdbfSAndreas Färber * to be turned high in order to be detected by the USB Controller 1543b69bdbfSAndreas Färber * This signal should be handled by a USB specific power sequence 1553b69bdbfSAndreas Färber * in order to reset the Hub when USB bus is powered down. 1563b69bdbfSAndreas Färber */ 1573b69bdbfSAndreas Färber usb-hub { 1583b69bdbfSAndreas Färber gpio-hog; 1593b69bdbfSAndreas Färber gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>; 1603b69bdbfSAndreas Färber output-high; 1613b69bdbfSAndreas Färber line-name = "usb-hub-reset"; 1623b69bdbfSAndreas Färber }; 1633b69bdbfSAndreas Färber}; 1643b69bdbfSAndreas Färber 165fc19afa1SNeil Armstrong&hdmi_tx { 166fc19afa1SNeil Armstrong status = "okay"; 167fc19afa1SNeil Armstrong pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 168fc19afa1SNeil Armstrong pinctrl-names = "default"; 169fc19afa1SNeil Armstrong}; 170fc19afa1SNeil Armstrong 171fc19afa1SNeil Armstrong&hdmi_tx_tmds_port { 172fc19afa1SNeil Armstrong hdmi_tx_tmds_out: endpoint { 173fc19afa1SNeil Armstrong remote-endpoint = <&hdmi_connector_in>; 174fc19afa1SNeil Armstrong }; 175fc19afa1SNeil Armstrong}; 176fc19afa1SNeil Armstrong 1773b69bdbfSAndreas Färber&i2c_A { 1783b69bdbfSAndreas Färber status = "okay"; 1793b69bdbfSAndreas Färber pinctrl-0 = <&i2c_a_pins>; 1803b69bdbfSAndreas Färber pinctrl-names = "default"; 1813b69bdbfSAndreas Färber}; 1823b69bdbfSAndreas Färber 1833b69bdbfSAndreas Färber&ir { 1843b69bdbfSAndreas Färber status = "okay"; 1853b69bdbfSAndreas Färber pinctrl-0 = <&remote_input_ao_pins>; 1863b69bdbfSAndreas Färber pinctrl-names = "default"; 1873b69bdbfSAndreas Färber}; 1883b69bdbfSAndreas Färber 1892165b006SNeil Armstrong&gpio_ao { 190b03c7d64SNeil Armstrong gpio-line-names = "UART TX", "UART RX", "VCCK En", "TF 3V3/1V8 En", 191b03c7d64SNeil Armstrong "USB HUB nRESET", "USB OTG Power En", 192b03c7d64SNeil Armstrong "J7 Header Pin2", "IR In", "J7 Header Pin4", 193b03c7d64SNeil Armstrong "J7 Header Pin6", "J7 Header Pin5", "J7 Header Pin7", 194e43f20e8SJerome Brunet "HDMI CEC", "SYS LED", 195e43f20e8SJerome Brunet /* GPIO_TEST_N */ 196e43f20e8SJerome Brunet ""; 197b03c7d64SNeil Armstrong}; 198b03c7d64SNeil Armstrong 1992165b006SNeil Armstrong&gpio { 200b03c7d64SNeil Armstrong gpio-line-names = /* Bank GPIOZ */ 201b03c7d64SNeil Armstrong "Eth MDIO", "Eth MDC", "Eth RGMII RX Clk", 202b03c7d64SNeil Armstrong "Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2", 203b03c7d64SNeil Armstrong "Eth RX D3", "Eth RGMII TX Clk", "Eth TX En", 204b03c7d64SNeil Armstrong "Eth TX D0", "Eth TX D1", "Eth TX D2", "Eth TX D3", 205b03c7d64SNeil Armstrong "Eth PHY nRESET", "Eth PHY Intc", 206b03c7d64SNeil Armstrong /* Bank GPIOH */ 207b03c7d64SNeil Armstrong "HDMI HPD", "HDMI DDC SDA", "HDMI DDC SCL", "", 208b03c7d64SNeil Armstrong /* Bank BOOT */ 209b03c7d64SNeil Armstrong "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", "eMMC D4", 210b03c7d64SNeil Armstrong "eMMC D5", "eMMC D6", "eMMC D7", "eMMC Clk", 211b03c7d64SNeil Armstrong "eMMC Reset", "eMMC CMD", 212b03c7d64SNeil Armstrong "", "", "", "", "", "", "", 213b03c7d64SNeil Armstrong /* Bank CARD */ 214b03c7d64SNeil Armstrong "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD", 215b03c7d64SNeil Armstrong "SDCard D3", "SDCard D2", "SDCard Det", 216b03c7d64SNeil Armstrong /* Bank GPIODV */ 217b03c7d64SNeil Armstrong "", "", "", "", "", "", "", "", "", "", "", "", "", 218b03c7d64SNeil Armstrong "", "", "", "", "", "", "", "", "", "", "", 219b03c7d64SNeil Armstrong "I2C A SDA", "I2C A SCK", "I2C B SDA", "I2C B SCK", 220b03c7d64SNeil Armstrong "PWM D", "PWM B", 221b03c7d64SNeil Armstrong /* Bank GPIOY */ 222b03c7d64SNeil Armstrong "Revision Bit0", "Revision Bit1", "", 223b03c7d64SNeil Armstrong "J2 Header Pin35", "", "", "", "J2 Header Pin36", 224b03c7d64SNeil Armstrong "J2 Header Pin31", "", "", "", "TF VDD En", 225b03c7d64SNeil Armstrong "J2 Header Pin32", "J2 Header Pin26", "", "", 226b03c7d64SNeil Armstrong /* Bank GPIOX */ 227b03c7d64SNeil Armstrong "J2 Header Pin29", "J2 Header Pin24", 228b03c7d64SNeil Armstrong "J2 Header Pin23", "J2 Header Pin22", 229b03c7d64SNeil Armstrong "J2 Header Pin21", "J2 Header Pin18", 230b03c7d64SNeil Armstrong "J2 Header Pin33", "J2 Header Pin19", 231b03c7d64SNeil Armstrong "J2 Header Pin16", "J2 Header Pin15", 232b03c7d64SNeil Armstrong "J2 Header Pin12", "J2 Header Pin13", 233b03c7d64SNeil Armstrong "J2 Header Pin8", "J2 Header Pin10", 234b03c7d64SNeil Armstrong "", "", "", "", "", 235e43f20e8SJerome Brunet "J2 Header Pin11", "", "J2 Header Pin7", "", 236b03c7d64SNeil Armstrong /* Bank GPIOCLK */ 237e43f20e8SJerome Brunet "", "", "", ""; 238b03c7d64SNeil Armstrong}; 239b03c7d64SNeil Armstrong 24062158c6aSHeiner Kallweit&saradc { 24162158c6aSHeiner Kallweit status = "okay"; 24262158c6aSHeiner Kallweit vref-supply = <&vcc1v8>; 24362158c6aSHeiner Kallweit}; 24462158c6aSHeiner Kallweit 2453b69bdbfSAndreas Färber&scpi_clocks { 2463b69bdbfSAndreas Färber status = "disabled"; 2473b69bdbfSAndreas Färber}; 2483b69bdbfSAndreas Färber 249ef8d2ffeSKevin Hilman/* SD */ 250ef8d2ffeSKevin Hilman&sd_emmc_b { 251ef8d2ffeSKevin Hilman status = "okay"; 252ef8d2ffeSKevin Hilman pinctrl-0 = <&sdcard_pins>; 25367e7607fSJerome Brunet pinctrl-1 = <&sdcard_clk_gate_pins>; 25467e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 255ef8d2ffeSKevin Hilman 256ef8d2ffeSKevin Hilman bus-width = <4>; 257ef8d2ffeSKevin Hilman cap-sd-highspeed; 258ef8d2ffeSKevin Hilman max-frequency = <100000000>; 259ef8d2ffeSKevin Hilman disable-wp; 260ef8d2ffeSKevin Hilman 261f29200c8SLoys Ollivier cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; 262ef8d2ffeSKevin Hilman 263ef8d2ffeSKevin Hilman vmmc-supply = <&tflash_vdd>; 264ef8d2ffeSKevin Hilman vqmmc-supply = <&tf_io>; 265ef8d2ffeSKevin Hilman}; 266ef8d2ffeSKevin Hilman 267ef8d2ffeSKevin Hilman/* eMMC */ 268ef8d2ffeSKevin Hilman&sd_emmc_c { 269ef8d2ffeSKevin Hilman status = "okay"; 270ab36be66SNeil Armstrong pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 27167e7607fSJerome Brunet pinctrl-1 = <&emmc_clk_gate_pins>; 27267e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 273ef8d2ffeSKevin Hilman 274ef8d2ffeSKevin Hilman bus-width = <8>; 275c04ffa71SJerome Brunet max-frequency = <100000000>; 276ef8d2ffeSKevin Hilman non-removable; 277ef8d2ffeSKevin Hilman disable-wp; 278ef8d2ffeSKevin Hilman cap-mmc-highspeed; 279ef8d2ffeSKevin Hilman mmc-ddr-1_8v; 280ef8d2ffeSKevin Hilman mmc-hs200-1_8v; 281ef8d2ffeSKevin Hilman 282ef8d2ffeSKevin Hilman mmc-pwrseq = <&emmc_pwrseq>; 283ef8d2ffeSKevin Hilman vmmc-supply = <&vcc3v3>; 284ef8d2ffeSKevin Hilman vqmmc-supply = <&vcc1v8>; 285ef8d2ffeSKevin Hilman}; 2863b69bdbfSAndreas Färber 2873b69bdbfSAndreas Färber&uart_AO { 2883b69bdbfSAndreas Färber status = "okay"; 2893b69bdbfSAndreas Färber pinctrl-0 = <&uart_ao_a_pins>; 2903b69bdbfSAndreas Färber pinctrl-names = "default"; 2913b69bdbfSAndreas Färber}; 2923b69bdbfSAndreas Färber 2933b69bdbfSAndreas Färber&usb0_phy { 2943b69bdbfSAndreas Färber status = "okay"; 2953b69bdbfSAndreas Färber phy-supply = <&usb_otg_pwr>; 2963b69bdbfSAndreas Färber}; 2973b69bdbfSAndreas Färber 2983b69bdbfSAndreas Färber&usb1_phy { 2993b69bdbfSAndreas Färber status = "okay"; 300e841ec95SNeil Armstrong phy-supply = <&usb_otg_pwr>; 3013b69bdbfSAndreas Färber}; 3023b69bdbfSAndreas Färber 3033b69bdbfSAndreas Färber&usb0 { 3043b69bdbfSAndreas Färber status = "okay"; 3053b69bdbfSAndreas Färber}; 3063b69bdbfSAndreas Färber 3073b69bdbfSAndreas Färber&usb1 { 3083b69bdbfSAndreas Färber status = "okay"; 3093b69bdbfSAndreas Färber}; 310