1ef599f5fSChristian Hewitt// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2ef599f5fSChristian Hewitt/* 3ef599f5fSChristian Hewitt * Copyright (c) 2019 BayLibre, SAS 4ef599f5fSChristian Hewitt * Author: Neil Armstrong <narmstrong@baylibre.com> 5ef599f5fSChristian Hewitt */ 6ef599f5fSChristian Hewitt 7379ae646SNeil Armstrong#include "meson-g12b-odroid.dtsi" 8ef599f5fSChristian Hewitt 9ef599f5fSChristian Hewitt/ { 10ef599f5fSChristian Hewitt aliases { 116fb82afbSChristian Hewitt rtc0 = &rtc; 12ef599f5fSChristian Hewitt }; 13ef599f5fSChristian Hewitt 14bc41099fSDongjin Kim dio2133: audio-amplifier-0 { 15ef599f5fSChristian Hewitt compatible = "simple-audio-amplifier"; 16ef599f5fSChristian Hewitt enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; 17ef599f5fSChristian Hewitt VCC-supply = <&vcc_5v>; 18ef599f5fSChristian Hewitt sound-name-prefix = "U19"; 19ef599f5fSChristian Hewitt status = "okay"; 20ef599f5fSChristian Hewitt }; 21ef599f5fSChristian Hewitt 22ef599f5fSChristian Hewitt hub_5v: regulator-hub_5v { 23ef599f5fSChristian Hewitt compatible = "regulator-fixed"; 24ef599f5fSChristian Hewitt regulator-name = "HUB_5V"; 25ef599f5fSChristian Hewitt regulator-min-microvolt = <5000000>; 26ef599f5fSChristian Hewitt regulator-max-microvolt = <5000000>; 27ef599f5fSChristian Hewitt vin-supply = <&vcc_5v>; 28ef599f5fSChristian Hewitt 29ef599f5fSChristian Hewitt /* Connected to the Hub CHIPENABLE, LOW sets low power state */ 30ef599f5fSChristian Hewitt gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; 31ef599f5fSChristian Hewitt enable-active-high; 32ef599f5fSChristian Hewitt }; 33ef599f5fSChristian Hewitt 34ef599f5fSChristian Hewitt sound { 35ef599f5fSChristian Hewitt compatible = "amlogic,axg-sound-card"; 36933b80edSChristian Hewitt model = "ODROID-N2"; 37ef599f5fSChristian Hewitt audio-widgets = "Line", "Lineout"; 38ef599f5fSChristian Hewitt audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>, 39ef599f5fSChristian Hewitt <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>, 40bc41099fSDongjin Kim <&dio2133>; 41ef599f5fSChristian Hewitt audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", 42ef599f5fSChristian Hewitt "TDMOUT_B IN 1", "FRDDR_B OUT 1", 43ef599f5fSChristian Hewitt "TDMOUT_B IN 2", "FRDDR_C OUT 1", 44ef599f5fSChristian Hewitt "TDM_B Playback", "TDMOUT_B OUT", 45ef599f5fSChristian Hewitt "TDMOUT_C IN 0", "FRDDR_A OUT 2", 46ef599f5fSChristian Hewitt "TDMOUT_C IN 1", "FRDDR_B OUT 2", 47ef599f5fSChristian Hewitt "TDMOUT_C IN 2", "FRDDR_C OUT 2", 48ef599f5fSChristian Hewitt "TDM_C Playback", "TDMOUT_C OUT", 49ef599f5fSChristian Hewitt "TDMIN_A IN 4", "TDM_B Loopback", 50ef599f5fSChristian Hewitt "TDMIN_B IN 4", "TDM_B Loopback", 51ef599f5fSChristian Hewitt "TDMIN_C IN 4", "TDM_B Loopback", 52ef599f5fSChristian Hewitt "TDMIN_LB IN 1", "TDM_B Loopback", 53ef599f5fSChristian Hewitt "TDMIN_A IN 5", "TDM_C Loopback", 54ef599f5fSChristian Hewitt "TDMIN_B IN 5", "TDM_C Loopback", 55ef599f5fSChristian Hewitt "TDMIN_C IN 5", "TDM_C Loopback", 56ef599f5fSChristian Hewitt "TDMIN_LB IN 2", "TDM_C Loopback", 57ef599f5fSChristian Hewitt "TODDR_A IN 0", "TDMIN_A OUT", 58ef599f5fSChristian Hewitt "TODDR_B IN 0", "TDMIN_A OUT", 59ef599f5fSChristian Hewitt "TODDR_C IN 0", "TDMIN_A OUT", 60ef599f5fSChristian Hewitt "TODDR_A IN 1", "TDMIN_B OUT", 61ef599f5fSChristian Hewitt "TODDR_B IN 1", "TDMIN_B OUT", 62ef599f5fSChristian Hewitt "TODDR_C IN 1", "TDMIN_B OUT", 63ef599f5fSChristian Hewitt "TODDR_A IN 2", "TDMIN_C OUT", 64ef599f5fSChristian Hewitt "TODDR_B IN 2", "TDMIN_C OUT", 65ef599f5fSChristian Hewitt "TODDR_C IN 2", "TDMIN_C OUT", 66ef599f5fSChristian Hewitt "TODDR_A IN 6", "TDMIN_LB OUT", 67ef599f5fSChristian Hewitt "TODDR_B IN 6", "TDMIN_LB OUT", 68ef599f5fSChristian Hewitt "TODDR_C IN 6", "TDMIN_LB OUT", 69ef599f5fSChristian Hewitt "U19 INL", "ACODEC LOLP", 70ef599f5fSChristian Hewitt "U19 INR", "ACODEC LORP", 71ef599f5fSChristian Hewitt "Lineout", "U19 OUTL", 72ef599f5fSChristian Hewitt "Lineout", "U19 OUTR"; 73ef599f5fSChristian Hewitt 74ef599f5fSChristian Hewitt assigned-clocks = <&clkc CLKID_MPLL2>, 75ef599f5fSChristian Hewitt <&clkc CLKID_MPLL0>, 76ef599f5fSChristian Hewitt <&clkc CLKID_MPLL1>; 77ef599f5fSChristian Hewitt assigned-clock-parents = <0>, <0>, <0>; 78ef599f5fSChristian Hewitt assigned-clock-rates = <294912000>, 79ef599f5fSChristian Hewitt <270950400>, 80ef599f5fSChristian Hewitt <393216000>; 81ef599f5fSChristian Hewitt 82ef599f5fSChristian Hewitt dai-link-0 { 83ef599f5fSChristian Hewitt sound-dai = <&frddr_a>; 84ef599f5fSChristian Hewitt }; 85ef599f5fSChristian Hewitt 86ef599f5fSChristian Hewitt dai-link-1 { 87ef599f5fSChristian Hewitt sound-dai = <&frddr_b>; 88ef599f5fSChristian Hewitt }; 89ef599f5fSChristian Hewitt 90ef599f5fSChristian Hewitt dai-link-2 { 91ef599f5fSChristian Hewitt sound-dai = <&frddr_c>; 92ef599f5fSChristian Hewitt }; 93ef599f5fSChristian Hewitt 94ef599f5fSChristian Hewitt dai-link-3 { 95ef599f5fSChristian Hewitt sound-dai = <&toddr_a>; 96ef599f5fSChristian Hewitt }; 97ef599f5fSChristian Hewitt 98ef599f5fSChristian Hewitt dai-link-4 { 99ef599f5fSChristian Hewitt sound-dai = <&toddr_b>; 100ef599f5fSChristian Hewitt }; 101ef599f5fSChristian Hewitt 102ef599f5fSChristian Hewitt dai-link-5 { 103ef599f5fSChristian Hewitt sound-dai = <&toddr_c>; 104ef599f5fSChristian Hewitt }; 105ef599f5fSChristian Hewitt 106ef599f5fSChristian Hewitt /* 8ch hdmi interface */ 107ef599f5fSChristian Hewitt dai-link-6 { 108ef599f5fSChristian Hewitt sound-dai = <&tdmif_b>; 109ef599f5fSChristian Hewitt dai-format = "i2s"; 110ef599f5fSChristian Hewitt dai-tdm-slot-tx-mask-0 = <1 1>; 111ef599f5fSChristian Hewitt dai-tdm-slot-tx-mask-1 = <1 1>; 112ef599f5fSChristian Hewitt dai-tdm-slot-tx-mask-2 = <1 1>; 113ef599f5fSChristian Hewitt dai-tdm-slot-tx-mask-3 = <1 1>; 114ef599f5fSChristian Hewitt mclk-fs = <256>; 115ef599f5fSChristian Hewitt 116ef599f5fSChristian Hewitt codec-0 { 117ef599f5fSChristian Hewitt sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; 118ef599f5fSChristian Hewitt }; 119ef599f5fSChristian Hewitt 120ef599f5fSChristian Hewitt codec-1 { 121ef599f5fSChristian Hewitt sound-dai = <&toacodec TOACODEC_IN_B>; 122ef599f5fSChristian Hewitt }; 123ef599f5fSChristian Hewitt }; 124ef599f5fSChristian Hewitt 125ef599f5fSChristian Hewitt /* i2s jack output interface */ 126ef599f5fSChristian Hewitt dai-link-7 { 127ef599f5fSChristian Hewitt sound-dai = <&tdmif_c>; 128ef599f5fSChristian Hewitt dai-format = "i2s"; 129ef599f5fSChristian Hewitt dai-tdm-slot-tx-mask-0 = <1 1>; 130ef599f5fSChristian Hewitt mclk-fs = <256>; 131ef599f5fSChristian Hewitt 132ef599f5fSChristian Hewitt codec-0 { 133ef599f5fSChristian Hewitt sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>; 134ef599f5fSChristian Hewitt }; 135ef599f5fSChristian Hewitt 136ef599f5fSChristian Hewitt codec-1 { 137ef599f5fSChristian Hewitt sound-dai = <&toacodec TOACODEC_IN_C>; 138ef599f5fSChristian Hewitt }; 139ef599f5fSChristian Hewitt }; 140ef599f5fSChristian Hewitt 141ef599f5fSChristian Hewitt /* hdmi glue */ 142ef599f5fSChristian Hewitt dai-link-8 { 143ef599f5fSChristian Hewitt sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; 144ef599f5fSChristian Hewitt 145ef599f5fSChristian Hewitt codec { 146ef599f5fSChristian Hewitt sound-dai = <&hdmi_tx>; 147ef599f5fSChristian Hewitt }; 148ef599f5fSChristian Hewitt }; 149ef599f5fSChristian Hewitt 150ef599f5fSChristian Hewitt /* acodec glue */ 151ef599f5fSChristian Hewitt dai-link-9 { 152ef599f5fSChristian Hewitt sound-dai = <&toacodec TOACODEC_OUT>; 153ef599f5fSChristian Hewitt 154ef599f5fSChristian Hewitt codec { 155ef599f5fSChristian Hewitt sound-dai = <&acodec>; 156ef599f5fSChristian Hewitt }; 157ef599f5fSChristian Hewitt }; 158ef599f5fSChristian Hewitt }; 159ef599f5fSChristian Hewitt}; 160ef599f5fSChristian Hewitt 161ef599f5fSChristian Hewitt&acodec { 162ef599f5fSChristian Hewitt AVDD-supply = <&vddao_1v8>; 163ef599f5fSChristian Hewitt status = "okay"; 164ef599f5fSChristian Hewitt}; 165ef599f5fSChristian Hewitt 166ef599f5fSChristian Hewittðmac { 167379ae646SNeil Armstrong pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; 168379ae646SNeil Armstrong pinctrl-names = "default"; 169ef599f5fSChristian Hewitt status = "okay"; 170ef599f5fSChristian Hewitt phy-mode = "rgmii"; 171379ae646SNeil Armstrong phy-handle = <&external_phy>; 172379ae646SNeil Armstrong amlogic,tx-delay-ns = <2>; 173379ae646SNeil Armstrong}; 17444a201dfSAnand Moon 17544a201dfSAnand Moon&ext_mdio { 176ef599f5fSChristian Hewitt external_phy: ethernet-phy@0 { 177ef599f5fSChristian Hewitt /* Realtek RTL8211F (0x001cc916) */ 178ef599f5fSChristian Hewitt reg = <0>; 179ef599f5fSChristian Hewitt max-speed = <1000>; 180ef599f5fSChristian Hewitt 181ef599f5fSChristian Hewitt reset-assert-us = <10000>; 182ef599f5fSChristian Hewitt reset-deassert-us = <80000>; 1831c741253SStefan Agner reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; 184ef599f5fSChristian Hewitt 185ef599f5fSChristian Hewitt interrupt-parent = <&gpio_intc>; 186ef599f5fSChristian Hewitt /* MAC_INTR on GPIOZ_14 */ 187ef599f5fSChristian Hewitt interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>; 188*6387e0aaSHuqiang Qin }; 189ef599f5fSChristian Hewitt}; 190ef599f5fSChristian Hewitt 191ef599f5fSChristian Hewitt&gpio { 192ef599f5fSChristian Hewitt gpio-line-names = 193412c8fa8SHyeonki Hong /* GPIOZ */ 194412c8fa8SHyeonki Hong "", "", "", "", "", "", "", "", 195412c8fa8SHyeonki Hong "", "", "", "", "", "", "", "", 196412c8fa8SHyeonki Hong /* GPIOH */ 197412c8fa8SHyeonki Hong "", "", "", "", "", "", "", "", 198412c8fa8SHyeonki Hong "", 199412c8fa8SHyeonki Hong /* BOOT */ 200412c8fa8SHyeonki Hong "", "", "", "", "", "", "", "", 201412c8fa8SHyeonki Hong "", "", "", "", "", "", "", "", 202412c8fa8SHyeonki Hong /* GPIOC */ 203412c8fa8SHyeonki Hong "", "", "", "", "", "", "", "", 204412c8fa8SHyeonki Hong /* GPIOA */ 205412c8fa8SHyeonki Hong "PIN_44", /* GPIOA_0 */ 206412c8fa8SHyeonki Hong "PIN_46", /* GPIOA_1 */ 207412c8fa8SHyeonki Hong "PIN_45", /* GPIOA_2 */ 208412c8fa8SHyeonki Hong "PIN_47", /* GPIOA_3 */ 209412c8fa8SHyeonki Hong "PIN_26", /* GPIOA_4 */ 210412c8fa8SHyeonki Hong "", "", "", "", "", "", 211412c8fa8SHyeonki Hong "PIN_42", /* GPIOA_11 */ 212412c8fa8SHyeonki Hong "PIN_32", /* GPIOA_12 */ 213412c8fa8SHyeonki Hong "PIN_7", /* GPIOA_13 */ 214412c8fa8SHyeonki Hong "PIN_27", /* GPIOA_14 */ 215412c8fa8SHyeonki Hong "PIN_28", /* GPIOA_15 */ 216412c8fa8SHyeonki Hong /* GPIOX */ 217412c8fa8SHyeonki Hong "PIN_16", /* GPIOX_0 */ 218412c8fa8SHyeonki Hong "PIN_18", /* GPIOX_1 */ 219412c8fa8SHyeonki Hong "PIN_22", /* GPIOX_2 */ 220412c8fa8SHyeonki Hong "PIN_11", /* GPIOX_3 */ 221412c8fa8SHyeonki Hong "PIN_13", /* GPIOX_4 */ 222412c8fa8SHyeonki Hong "PIN_33", /* GPIOX_5 */ 223412c8fa8SHyeonki Hong "PIN_35", /* GPIOX_6 */ 224412c8fa8SHyeonki Hong "PIN_15", /* GPIOX_7 */ 225412c8fa8SHyeonki Hong "PIN_19", /* GPIOX_8 */ 226412c8fa8SHyeonki Hong "PIN_21", /* GPIOX_9 */ 227412c8fa8SHyeonki Hong "PIN_24", /* GPIOX_10 */ 228412c8fa8SHyeonki Hong "PIN_23", /* GPIOX_11 */ 229412c8fa8SHyeonki Hong "PIN_8", /* GPIOX_12 */ 230412c8fa8SHyeonki Hong "PIN_10", /* GPIOX_13 */ 231412c8fa8SHyeonki Hong "PIN_29", /* GPIOX_14 */ 232412c8fa8SHyeonki Hong "PIN_31", /* GPIOX_15 */ 233412c8fa8SHyeonki Hong "PIN_12", /* GPIOX_16 */ 234412c8fa8SHyeonki Hong "PIN_3", /* GPIOX_17 */ 235412c8fa8SHyeonki Hong "PIN_5", /* GPIOX_18 */ 236412c8fa8SHyeonki Hong "PIN_36"; /* GPIOX_19 */ 237412c8fa8SHyeonki Hong /* 238ef599f5fSChristian Hewitt * WARNING: The USB Hub on the Odroid-N2 needs a reset signal 239ef599f5fSChristian Hewitt * to be turned high in order to be detected by the USB Controller 240ef599f5fSChristian Hewitt * This signal should be handled by a USB specific power sequence 241ef599f5fSChristian Hewitt * in order to reset the Hub when USB bus is powered down. 242ef599f5fSChristian Hewitt */ 243ef599f5fSChristian Hewitt usb-hub-hog { 244d9421d6cSKevin Hilman gpio-hog; 245ef599f5fSChristian Hewitt gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>; 246ef599f5fSChristian Hewitt output-high; 247ef599f5fSChristian Hewitt line-name = "usb-hub-reset"; 248ef599f5fSChristian Hewitt }; 249ef599f5fSChristian Hewitt}; 250ef599f5fSChristian Hewitt 251ef599f5fSChristian Hewitt&i2c3 { 2526fb82afbSChristian Hewitt status = "okay"; 2536fb82afbSChristian Hewitt pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; 2546fb82afbSChristian Hewitt pinctrl-names = "default"; 2556fb82afbSChristian Hewitt 2566fb82afbSChristian Hewitt rtc: rtc@51 { 2576fb82afbSChristian Hewitt compatible = "nxp,pcf8563"; 2586fb82afbSChristian Hewitt reg = <0x51>; 2596fb82afbSChristian Hewitt wakeup-source; 2606fb82afbSChristian Hewitt }; 2616fb82afbSChristian Hewitt}; 2626fb82afbSChristian Hewitt 2636fb82afbSChristian Hewitt&ir { 264379ae646SNeil Armstrong status = "okay"; 265379ae646SNeil Armstrong pinctrl-0 = <&remote_input_ao_pins>; 266379ae646SNeil Armstrong pinctrl-names = "default"; 267ef599f5fSChristian Hewitt linux,rc-map-name = "rc-odroid"; 268379ae646SNeil Armstrong}; 269ef599f5fSChristian Hewitt 270ef599f5fSChristian Hewitt/* 271ef599f5fSChristian Hewitt * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins are shared between SPI NOR pins 272ef599f5fSChristian Hewitt * and eMMC Data 4 to 7 pins. 273ef599f5fSChristian Hewitt * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0, 274ef599f5fSChristian Hewitt * and change bus-width to 4 then spifc can be enabled. 275ef599f5fSChristian Hewitt * The SW1 slide should also be set to the correct position. 276ef599f5fSChristian Hewitt */ 277ef599f5fSChristian Hewitt&spifc { 278ef599f5fSChristian Hewitt status = "disabled"; 279ef599f5fSChristian Hewitt pinctrl-0 = <&nor_pins>; 280ef599f5fSChristian Hewitt pinctrl-names = "default"; 281ef599f5fSChristian Hewitt 282ef599f5fSChristian Hewitt mx25u64: flash@0 { 28395d35256SAlexander Stein #address-cells = <1>; 284ef599f5fSChristian Hewitt #size-cells = <1>; 285ef599f5fSChristian Hewitt compatible = "mxicy,mx25u6435f", "jedec,spi-nor"; 286ef599f5fSChristian Hewitt reg = <0>; 287ef599f5fSChristian Hewitt spi-max-frequency = <104000000>; 288ef599f5fSChristian Hewitt }; 289ef599f5fSChristian Hewitt}; 290ef599f5fSChristian Hewitt 291ef599f5fSChristian Hewitt&toacodec { 292ef599f5fSChristian Hewitt status = "okay"; 293ef599f5fSChristian Hewitt}; 294ef599f5fSChristian Hewitt 295ef599f5fSChristian Hewitt&usb { 296ef599f5fSChristian Hewitt vbus-supply = <&usb_pwr_en>; 297ef599f5fSChristian Hewitt}; 298ef599f5fSChristian Hewitt 299ef599f5fSChristian Hewitt&usb2_phy1 { 300ef599f5fSChristian Hewitt /* Enable the hub which is connected to this port */ 301ef599f5fSChristian Hewitt phy-supply = <&hub_5v>; 302ef599f5fSChristian Hewitt}; 303ef599f5fSChristian Hewitt