1*c35f6dc5SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2*c35f6dc5SNeil Armstrong/* 3*c35f6dc5SNeil Armstrong * Copyright (c) 2019 BayLibre, SAS 4*c35f6dc5SNeil Armstrong * Author: Neil Armstrong <narmstrong@baylibre.com> 5*c35f6dc5SNeil Armstrong */ 6*c35f6dc5SNeil Armstrong 7*c35f6dc5SNeil Armstrong/dts-v1/; 8*c35f6dc5SNeil Armstrong 9*c35f6dc5SNeil Armstrong#include "meson-g12b.dtsi" 10*c35f6dc5SNeil Armstrong#include <dt-bindings/input/input.h> 11*c35f6dc5SNeil Armstrong#include <dt-bindings/gpio/meson-g12a-gpio.h> 12*c35f6dc5SNeil Armstrong 13*c35f6dc5SNeil Armstrong/ { 14*c35f6dc5SNeil Armstrong compatible = "hardkernel,odroid-n2", "amlogic,g12b"; 15*c35f6dc5SNeil Armstrong model = "Hardkernel ODROID-N2"; 16*c35f6dc5SNeil Armstrong 17*c35f6dc5SNeil Armstrong aliases { 18*c35f6dc5SNeil Armstrong serial0 = &uart_AO; 19*c35f6dc5SNeil Armstrong ethernet0 = ðmac; 20*c35f6dc5SNeil Armstrong }; 21*c35f6dc5SNeil Armstrong 22*c35f6dc5SNeil Armstrong chosen { 23*c35f6dc5SNeil Armstrong stdout-path = "serial0:115200n8"; 24*c35f6dc5SNeil Armstrong }; 25*c35f6dc5SNeil Armstrong 26*c35f6dc5SNeil Armstrong memory@0 { 27*c35f6dc5SNeil Armstrong device_type = "memory"; 28*c35f6dc5SNeil Armstrong reg = <0x0 0x0 0x0 0x40000000>; 29*c35f6dc5SNeil Armstrong }; 30*c35f6dc5SNeil Armstrong 31*c35f6dc5SNeil Armstrong emmc_pwrseq: emmc-pwrseq { 32*c35f6dc5SNeil Armstrong compatible = "mmc-pwrseq-emmc"; 33*c35f6dc5SNeil Armstrong reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; 34*c35f6dc5SNeil Armstrong }; 35*c35f6dc5SNeil Armstrong 36*c35f6dc5SNeil Armstrong leds { 37*c35f6dc5SNeil Armstrong compatible = "gpio-leds"; 38*c35f6dc5SNeil Armstrong 39*c35f6dc5SNeil Armstrong blue { 40*c35f6dc5SNeil Armstrong label = "n2:blue"; 41*c35f6dc5SNeil Armstrong gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; 42*c35f6dc5SNeil Armstrong linux,default-trigger = "heartbeat"; 43*c35f6dc5SNeil Armstrong }; 44*c35f6dc5SNeil Armstrong }; 45*c35f6dc5SNeil Armstrong 46*c35f6dc5SNeil Armstrong tflash_vdd: regulator-tflash_vdd { 47*c35f6dc5SNeil Armstrong compatible = "regulator-fixed"; 48*c35f6dc5SNeil Armstrong 49*c35f6dc5SNeil Armstrong regulator-name = "TFLASH_VDD"; 50*c35f6dc5SNeil Armstrong regulator-min-microvolt = <3300000>; 51*c35f6dc5SNeil Armstrong regulator-max-microvolt = <3300000>; 52*c35f6dc5SNeil Armstrong 53*c35f6dc5SNeil Armstrong gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>; 54*c35f6dc5SNeil Armstrong enable-active-high; 55*c35f6dc5SNeil Armstrong }; 56*c35f6dc5SNeil Armstrong 57*c35f6dc5SNeil Armstrong tf_io: gpio-regulator-tf_io { 58*c35f6dc5SNeil Armstrong compatible = "regulator-gpio"; 59*c35f6dc5SNeil Armstrong 60*c35f6dc5SNeil Armstrong regulator-name = "TF_IO"; 61*c35f6dc5SNeil Armstrong regulator-min-microvolt = <1800000>; 62*c35f6dc5SNeil Armstrong regulator-max-microvolt = <3300000>; 63*c35f6dc5SNeil Armstrong 64*c35f6dc5SNeil Armstrong gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>; 65*c35f6dc5SNeil Armstrong gpios-states = <0>; 66*c35f6dc5SNeil Armstrong 67*c35f6dc5SNeil Armstrong states = <3300000 0 68*c35f6dc5SNeil Armstrong 1800000 1>; 69*c35f6dc5SNeil Armstrong }; 70*c35f6dc5SNeil Armstrong 71*c35f6dc5SNeil Armstrong flash_1v8: regulator-flash_1v8 { 72*c35f6dc5SNeil Armstrong compatible = "regulator-fixed"; 73*c35f6dc5SNeil Armstrong regulator-name = "FLASH_1V8"; 74*c35f6dc5SNeil Armstrong regulator-min-microvolt = <1800000>; 75*c35f6dc5SNeil Armstrong regulator-max-microvolt = <1800000>; 76*c35f6dc5SNeil Armstrong vin-supply = <&vcc_3v3>; 77*c35f6dc5SNeil Armstrong regulator-always-on; 78*c35f6dc5SNeil Armstrong }; 79*c35f6dc5SNeil Armstrong 80*c35f6dc5SNeil Armstrong main_12v: regulator-main_12v { 81*c35f6dc5SNeil Armstrong compatible = "regulator-fixed"; 82*c35f6dc5SNeil Armstrong regulator-name = "12V"; 83*c35f6dc5SNeil Armstrong regulator-min-microvolt = <12000000>; 84*c35f6dc5SNeil Armstrong regulator-max-microvolt = <12000000>; 85*c35f6dc5SNeil Armstrong regulator-always-on; 86*c35f6dc5SNeil Armstrong }; 87*c35f6dc5SNeil Armstrong 88*c35f6dc5SNeil Armstrong vcc_5v: regulator-vcc_5v { 89*c35f6dc5SNeil Armstrong compatible = "regulator-fixed"; 90*c35f6dc5SNeil Armstrong regulator-name = "5V"; 91*c35f6dc5SNeil Armstrong regulator-min-microvolt = <5000000>; 92*c35f6dc5SNeil Armstrong regulator-max-microvolt = <5000000>; 93*c35f6dc5SNeil Armstrong regulator-always-on; 94*c35f6dc5SNeil Armstrong vin-supply = <&main_12v>; 95*c35f6dc5SNeil Armstrong }; 96*c35f6dc5SNeil Armstrong 97*c35f6dc5SNeil Armstrong vcc_1v8: regulator-vcc_1v8 { 98*c35f6dc5SNeil Armstrong compatible = "regulator-fixed"; 99*c35f6dc5SNeil Armstrong regulator-name = "VCC_1V8"; 100*c35f6dc5SNeil Armstrong regulator-min-microvolt = <1800000>; 101*c35f6dc5SNeil Armstrong regulator-max-microvolt = <1800000>; 102*c35f6dc5SNeil Armstrong vin-supply = <&vcc_3v3>; 103*c35f6dc5SNeil Armstrong regulator-always-on; 104*c35f6dc5SNeil Armstrong }; 105*c35f6dc5SNeil Armstrong 106*c35f6dc5SNeil Armstrong vcc_3v3: regulator-vcc_3v3 { 107*c35f6dc5SNeil Armstrong compatible = "regulator-fixed"; 108*c35f6dc5SNeil Armstrong regulator-name = "VCC_3V3"; 109*c35f6dc5SNeil Armstrong regulator-min-microvolt = <3300000>; 110*c35f6dc5SNeil Armstrong regulator-max-microvolt = <3300000>; 111*c35f6dc5SNeil Armstrong vin-supply = <&vddao_3v3>; 112*c35f6dc5SNeil Armstrong regulator-always-on; 113*c35f6dc5SNeil Armstrong /* FIXME: actually controlled by VDDCPU_B_EN */ 114*c35f6dc5SNeil Armstrong }; 115*c35f6dc5SNeil Armstrong 116*c35f6dc5SNeil Armstrong hub_5v: regulator-hub_5v { 117*c35f6dc5SNeil Armstrong compatible = "regulator-fixed"; 118*c35f6dc5SNeil Armstrong regulator-name = "HUB_5V"; 119*c35f6dc5SNeil Armstrong regulator-min-microvolt = <5000000>; 120*c35f6dc5SNeil Armstrong regulator-max-microvolt = <5000000>; 121*c35f6dc5SNeil Armstrong vin-supply = <&vcc_5v>; 122*c35f6dc5SNeil Armstrong 123*c35f6dc5SNeil Armstrong /* Connected to the Hub CHIPENABLE, LOW sets low power state */ 124*c35f6dc5SNeil Armstrong gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; 125*c35f6dc5SNeil Armstrong enable-active-high; 126*c35f6dc5SNeil Armstrong }; 127*c35f6dc5SNeil Armstrong 128*c35f6dc5SNeil Armstrong usb_pwr_en: regulator-usb_pwr_en { 129*c35f6dc5SNeil Armstrong compatible = "regulator-fixed"; 130*c35f6dc5SNeil Armstrong regulator-name = "USB_PWR_EN"; 131*c35f6dc5SNeil Armstrong regulator-min-microvolt = <5000000>; 132*c35f6dc5SNeil Armstrong regulator-max-microvolt = <5000000>; 133*c35f6dc5SNeil Armstrong vin-supply = <&vcc_5v>; 134*c35f6dc5SNeil Armstrong 135*c35f6dc5SNeil Armstrong /* Connected to the microUSB port power enable */ 136*c35f6dc5SNeil Armstrong gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; 137*c35f6dc5SNeil Armstrong enable-active-high; 138*c35f6dc5SNeil Armstrong }; 139*c35f6dc5SNeil Armstrong 140*c35f6dc5SNeil Armstrong vddao_1v8: regulator-vddao_1v8 { 141*c35f6dc5SNeil Armstrong compatible = "regulator-fixed"; 142*c35f6dc5SNeil Armstrong regulator-name = "VDDAO_1V8"; 143*c35f6dc5SNeil Armstrong regulator-min-microvolt = <1800000>; 144*c35f6dc5SNeil Armstrong regulator-max-microvolt = <1800000>; 145*c35f6dc5SNeil Armstrong vin-supply = <&vddao_3v3>; 146*c35f6dc5SNeil Armstrong regulator-always-on; 147*c35f6dc5SNeil Armstrong }; 148*c35f6dc5SNeil Armstrong 149*c35f6dc5SNeil Armstrong vddao_3v3: regulator-vddao_3v3 { 150*c35f6dc5SNeil Armstrong compatible = "regulator-fixed"; 151*c35f6dc5SNeil Armstrong regulator-name = "VDDAO_3V3"; 152*c35f6dc5SNeil Armstrong regulator-min-microvolt = <3300000>; 153*c35f6dc5SNeil Armstrong regulator-max-microvolt = <3300000>; 154*c35f6dc5SNeil Armstrong vin-supply = <&main_12v>; 155*c35f6dc5SNeil Armstrong regulator-always-on; 156*c35f6dc5SNeil Armstrong }; 157*c35f6dc5SNeil Armstrong 158*c35f6dc5SNeil Armstrong hdmi-connector { 159*c35f6dc5SNeil Armstrong compatible = "hdmi-connector"; 160*c35f6dc5SNeil Armstrong type = "a"; 161*c35f6dc5SNeil Armstrong 162*c35f6dc5SNeil Armstrong port { 163*c35f6dc5SNeil Armstrong hdmi_connector_in: endpoint { 164*c35f6dc5SNeil Armstrong remote-endpoint = <&hdmi_tx_tmds_out>; 165*c35f6dc5SNeil Armstrong }; 166*c35f6dc5SNeil Armstrong }; 167*c35f6dc5SNeil Armstrong }; 168*c35f6dc5SNeil Armstrong}; 169*c35f6dc5SNeil Armstrong 170*c35f6dc5SNeil Armstrong&cec_AO { 171*c35f6dc5SNeil Armstrong pinctrl-0 = <&cec_ao_a_h_pins>; 172*c35f6dc5SNeil Armstrong pinctrl-names = "default"; 173*c35f6dc5SNeil Armstrong status = "disabled"; 174*c35f6dc5SNeil Armstrong hdmi-phandle = <&hdmi_tx>; 175*c35f6dc5SNeil Armstrong}; 176*c35f6dc5SNeil Armstrong 177*c35f6dc5SNeil Armstrong&cecb_AO { 178*c35f6dc5SNeil Armstrong pinctrl-0 = <&cec_ao_b_h_pins>; 179*c35f6dc5SNeil Armstrong pinctrl-names = "default"; 180*c35f6dc5SNeil Armstrong status = "okay"; 181*c35f6dc5SNeil Armstrong hdmi-phandle = <&hdmi_tx>; 182*c35f6dc5SNeil Armstrong}; 183*c35f6dc5SNeil Armstrong 184*c35f6dc5SNeil Armstrong&ext_mdio { 185*c35f6dc5SNeil Armstrong external_phy: ethernet-phy@0 { 186*c35f6dc5SNeil Armstrong /* Realtek RTL8211F (0x001cc916) */ 187*c35f6dc5SNeil Armstrong reg = <0>; 188*c35f6dc5SNeil Armstrong max-speed = <1000>; 189*c35f6dc5SNeil Armstrong }; 190*c35f6dc5SNeil Armstrong}; 191*c35f6dc5SNeil Armstrong 192*c35f6dc5SNeil Armstrongðmac { 193*c35f6dc5SNeil Armstrong pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; 194*c35f6dc5SNeil Armstrong pinctrl-names = "default"; 195*c35f6dc5SNeil Armstrong status = "okay"; 196*c35f6dc5SNeil Armstrong phy-mode = "rgmii"; 197*c35f6dc5SNeil Armstrong phy-handle = <&external_phy>; 198*c35f6dc5SNeil Armstrong amlogic,tx-delay-ns = <2>; 199*c35f6dc5SNeil Armstrong}; 200*c35f6dc5SNeil Armstrong 201*c35f6dc5SNeil Armstrong&gpio { 202*c35f6dc5SNeil Armstrong /* 203*c35f6dc5SNeil Armstrong * WARNING: The USB Hub on the Odroid-N2 needs a reset signal 204*c35f6dc5SNeil Armstrong * to be turned high in order to be detected by the USB Controller 205*c35f6dc5SNeil Armstrong * This signal should be handled by a USB specific power sequence 206*c35f6dc5SNeil Armstrong * in order to reset the Hub when USB bus is powered down. 207*c35f6dc5SNeil Armstrong */ 208*c35f6dc5SNeil Armstrong usb-hub { 209*c35f6dc5SNeil Armstrong gpio-hog; 210*c35f6dc5SNeil Armstrong gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>; 211*c35f6dc5SNeil Armstrong output-high; 212*c35f6dc5SNeil Armstrong line-name = "usb-hub-reset"; 213*c35f6dc5SNeil Armstrong }; 214*c35f6dc5SNeil Armstrong}; 215*c35f6dc5SNeil Armstrong 216*c35f6dc5SNeil Armstrong&hdmi_tx { 217*c35f6dc5SNeil Armstrong status = "okay"; 218*c35f6dc5SNeil Armstrong pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; 219*c35f6dc5SNeil Armstrong pinctrl-names = "default"; 220*c35f6dc5SNeil Armstrong hdmi-supply = <&vcc_5v>; 221*c35f6dc5SNeil Armstrong}; 222*c35f6dc5SNeil Armstrong 223*c35f6dc5SNeil Armstrong&hdmi_tx_tmds_port { 224*c35f6dc5SNeil Armstrong hdmi_tx_tmds_out: endpoint { 225*c35f6dc5SNeil Armstrong remote-endpoint = <&hdmi_connector_in>; 226*c35f6dc5SNeil Armstrong }; 227*c35f6dc5SNeil Armstrong}; 228*c35f6dc5SNeil Armstrong 229*c35f6dc5SNeil Armstrong&ir { 230*c35f6dc5SNeil Armstrong status = "okay"; 231*c35f6dc5SNeil Armstrong pinctrl-0 = <&remote_input_ao_pins>; 232*c35f6dc5SNeil Armstrong pinctrl-names = "default"; 233*c35f6dc5SNeil Armstrong}; 234*c35f6dc5SNeil Armstrong 235*c35f6dc5SNeil Armstrong/* SD card */ 236*c35f6dc5SNeil Armstrong&sd_emmc_b { 237*c35f6dc5SNeil Armstrong status = "okay"; 238*c35f6dc5SNeil Armstrong pinctrl-0 = <&sdcard_c_pins>; 239*c35f6dc5SNeil Armstrong pinctrl-1 = <&sdcard_clk_gate_c_pins>; 240*c35f6dc5SNeil Armstrong pinctrl-names = "default", "clk-gate"; 241*c35f6dc5SNeil Armstrong 242*c35f6dc5SNeil Armstrong bus-width = <4>; 243*c35f6dc5SNeil Armstrong cap-sd-highspeed; 244*c35f6dc5SNeil Armstrong max-frequency = <50000000>; 245*c35f6dc5SNeil Armstrong disable-wp; 246*c35f6dc5SNeil Armstrong 247*c35f6dc5SNeil Armstrong cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; 248*c35f6dc5SNeil Armstrong vmmc-supply = <&tflash_vdd>; 249*c35f6dc5SNeil Armstrong vqmmc-supply = <&tf_io>; 250*c35f6dc5SNeil Armstrong 251*c35f6dc5SNeil Armstrong}; 252*c35f6dc5SNeil Armstrong 253*c35f6dc5SNeil Armstrong/* eMMC */ 254*c35f6dc5SNeil Armstrong&sd_emmc_c { 255*c35f6dc5SNeil Armstrong status = "okay"; 256*c35f6dc5SNeil Armstrong pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 257*c35f6dc5SNeil Armstrong pinctrl-1 = <&emmc_clk_gate_pins>; 258*c35f6dc5SNeil Armstrong pinctrl-names = "default", "clk-gate"; 259*c35f6dc5SNeil Armstrong 260*c35f6dc5SNeil Armstrong bus-width = <8>; 261*c35f6dc5SNeil Armstrong cap-mmc-highspeed; 262*c35f6dc5SNeil Armstrong mmc-ddr-1_8v; 263*c35f6dc5SNeil Armstrong mmc-hs200-1_8v; 264*c35f6dc5SNeil Armstrong max-frequency = <200000000>; 265*c35f6dc5SNeil Armstrong disable-wp; 266*c35f6dc5SNeil Armstrong 267*c35f6dc5SNeil Armstrong mmc-pwrseq = <&emmc_pwrseq>; 268*c35f6dc5SNeil Armstrong vmmc-supply = <&vcc_3v3>; 269*c35f6dc5SNeil Armstrong vqmmc-supply = <&flash_1v8>; 270*c35f6dc5SNeil Armstrong}; 271*c35f6dc5SNeil Armstrong 272*c35f6dc5SNeil Armstrong&uart_AO { 273*c35f6dc5SNeil Armstrong status = "okay"; 274*c35f6dc5SNeil Armstrong pinctrl-0 = <&uart_ao_a_pins>; 275*c35f6dc5SNeil Armstrong pinctrl-names = "default"; 276*c35f6dc5SNeil Armstrong}; 277*c35f6dc5SNeil Armstrong 278*c35f6dc5SNeil Armstrong&usb { 279*c35f6dc5SNeil Armstrong status = "okay"; 280*c35f6dc5SNeil Armstrong vbus-supply = <&usb_pwr_en>; 281*c35f6dc5SNeil Armstrong}; 282*c35f6dc5SNeil Armstrong 283*c35f6dc5SNeil Armstrong&usb2_phy0 { 284*c35f6dc5SNeil Armstrong phy-supply = <&vcc_5v>; 285*c35f6dc5SNeil Armstrong}; 286*c35f6dc5SNeil Armstrong 287*c35f6dc5SNeil Armstrong&usb2_phy1 { 288*c35f6dc5SNeil Armstrong /* Enable the hub which is connected to this port */ 289*c35f6dc5SNeil Armstrong phy-supply = <&hub_5v>; 290*c35f6dc5SNeil Armstrong}; 291