16be33864SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 26be33864SEmmanuel Vadot/* 36be33864SEmmanuel Vadot * Copyright (c) 2019 BayLibre, SAS 46be33864SEmmanuel Vadot * Author: Neil Armstrong <narmstrong@baylibre.com> 56be33864SEmmanuel Vadot */ 66be33864SEmmanuel Vadot 7cb7aa33aSEmmanuel Vadot#include "meson-g12b-odroid.dtsi" 86be33864SEmmanuel Vadot 96be33864SEmmanuel Vadot/ { 106be33864SEmmanuel Vadot aliases { 115def4c47SEmmanuel Vadot rtc0 = &rtc; 126be33864SEmmanuel Vadot }; 136be33864SEmmanuel Vadot 14e67e8565SEmmanuel Vadot dio2133: audio-amplifier-0 { 156be33864SEmmanuel Vadot compatible = "simple-audio-amplifier"; 166be33864SEmmanuel Vadot enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; 176be33864SEmmanuel Vadot VCC-supply = <&vcc_5v>; 186be33864SEmmanuel Vadot sound-name-prefix = "U19"; 196be33864SEmmanuel Vadot status = "okay"; 206be33864SEmmanuel Vadot }; 216be33864SEmmanuel Vadot 2201950c46SEmmanuel Vadot hub_5v: regulator-hub-5v { 236be33864SEmmanuel Vadot compatible = "regulator-fixed"; 246be33864SEmmanuel Vadot regulator-name = "HUB_5V"; 256be33864SEmmanuel Vadot regulator-min-microvolt = <5000000>; 266be33864SEmmanuel Vadot regulator-max-microvolt = <5000000>; 276be33864SEmmanuel Vadot vin-supply = <&vcc_5v>; 286be33864SEmmanuel Vadot 296be33864SEmmanuel Vadot /* Connected to the Hub CHIPENABLE, LOW sets low power state */ 306be33864SEmmanuel Vadot gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; 316be33864SEmmanuel Vadot enable-active-high; 326be33864SEmmanuel Vadot }; 336be33864SEmmanuel Vadot 340e8011faSEmmanuel Vadot /* USB hub supports both USB 2.0 and USB 3.0 root hub */ 350e8011faSEmmanuel Vadot usb-hub { 360e8011faSEmmanuel Vadot dr_mode = "host"; 370e8011faSEmmanuel Vadot #address-cells = <1>; 380e8011faSEmmanuel Vadot #size-cells = <0>; 390e8011faSEmmanuel Vadot 400e8011faSEmmanuel Vadot /* 2.0 hub on port 1 */ 410e8011faSEmmanuel Vadot hub_2_0: hub@1 { 420e8011faSEmmanuel Vadot compatible = "usb5e3,610"; 430e8011faSEmmanuel Vadot reg = <1>; 440e8011faSEmmanuel Vadot peer-hub = <&hub_3_0>; 450e8011faSEmmanuel Vadot vdd-supply = <&usb_pwr_en>; 460e8011faSEmmanuel Vadot }; 470e8011faSEmmanuel Vadot 480e8011faSEmmanuel Vadot /* 3.0 hub on port 4 */ 490e8011faSEmmanuel Vadot hub_3_0: hub@2 { 500e8011faSEmmanuel Vadot compatible = "usb5e3,620"; 510e8011faSEmmanuel Vadot reg = <2>; 520e8011faSEmmanuel Vadot peer-hub = <&hub_2_0>; 530e8011faSEmmanuel Vadot reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; 540e8011faSEmmanuel Vadot vdd-supply = <&vcc_5v>; 550e8011faSEmmanuel Vadot }; 560e8011faSEmmanuel Vadot }; 570e8011faSEmmanuel Vadot 586be33864SEmmanuel Vadot sound { 596be33864SEmmanuel Vadot compatible = "amlogic,axg-sound-card"; 605def4c47SEmmanuel Vadot model = "ODROID-N2"; 616be33864SEmmanuel Vadot audio-widgets = "Line", "Lineout"; 626be33864SEmmanuel Vadot audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>, 636be33864SEmmanuel Vadot <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>, 64e67e8565SEmmanuel Vadot <&dio2133>; 656be33864SEmmanuel Vadot audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", 666be33864SEmmanuel Vadot "TDMOUT_B IN 1", "FRDDR_B OUT 1", 676be33864SEmmanuel Vadot "TDMOUT_B IN 2", "FRDDR_C OUT 1", 686be33864SEmmanuel Vadot "TDM_B Playback", "TDMOUT_B OUT", 696be33864SEmmanuel Vadot "TDMOUT_C IN 0", "FRDDR_A OUT 2", 706be33864SEmmanuel Vadot "TDMOUT_C IN 1", "FRDDR_B OUT 2", 716be33864SEmmanuel Vadot "TDMOUT_C IN 2", "FRDDR_C OUT 2", 726be33864SEmmanuel Vadot "TDM_C Playback", "TDMOUT_C OUT", 736be33864SEmmanuel Vadot "TDMIN_A IN 4", "TDM_B Loopback", 746be33864SEmmanuel Vadot "TDMIN_B IN 4", "TDM_B Loopback", 756be33864SEmmanuel Vadot "TDMIN_C IN 4", "TDM_B Loopback", 766be33864SEmmanuel Vadot "TDMIN_LB IN 1", "TDM_B Loopback", 776be33864SEmmanuel Vadot "TDMIN_A IN 5", "TDM_C Loopback", 786be33864SEmmanuel Vadot "TDMIN_B IN 5", "TDM_C Loopback", 796be33864SEmmanuel Vadot "TDMIN_C IN 5", "TDM_C Loopback", 806be33864SEmmanuel Vadot "TDMIN_LB IN 2", "TDM_C Loopback", 816be33864SEmmanuel Vadot "TODDR_A IN 0", "TDMIN_A OUT", 826be33864SEmmanuel Vadot "TODDR_B IN 0", "TDMIN_A OUT", 836be33864SEmmanuel Vadot "TODDR_C IN 0", "TDMIN_A OUT", 846be33864SEmmanuel Vadot "TODDR_A IN 1", "TDMIN_B OUT", 856be33864SEmmanuel Vadot "TODDR_B IN 1", "TDMIN_B OUT", 866be33864SEmmanuel Vadot "TODDR_C IN 1", "TDMIN_B OUT", 876be33864SEmmanuel Vadot "TODDR_A IN 2", "TDMIN_C OUT", 886be33864SEmmanuel Vadot "TODDR_B IN 2", "TDMIN_C OUT", 896be33864SEmmanuel Vadot "TODDR_C IN 2", "TDMIN_C OUT", 906be33864SEmmanuel Vadot "TODDR_A IN 6", "TDMIN_LB OUT", 916be33864SEmmanuel Vadot "TODDR_B IN 6", "TDMIN_LB OUT", 926be33864SEmmanuel Vadot "TODDR_C IN 6", "TDMIN_LB OUT", 936be33864SEmmanuel Vadot "U19 INL", "ACODEC LOLP", 946be33864SEmmanuel Vadot "U19 INR", "ACODEC LORP", 956be33864SEmmanuel Vadot "Lineout", "U19 OUTL", 966be33864SEmmanuel Vadot "Lineout", "U19 OUTR"; 976be33864SEmmanuel Vadot 98*b2d2a78aSEmmanuel Vadot clocks = <&clkc CLKID_MPLL2>, 99*b2d2a78aSEmmanuel Vadot <&clkc CLKID_MPLL0>, 100*b2d2a78aSEmmanuel Vadot <&clkc CLKID_MPLL1>; 101*b2d2a78aSEmmanuel Vadot 1026be33864SEmmanuel Vadot assigned-clocks = <&clkc CLKID_MPLL2>, 1036be33864SEmmanuel Vadot <&clkc CLKID_MPLL0>, 1046be33864SEmmanuel Vadot <&clkc CLKID_MPLL1>; 1056be33864SEmmanuel Vadot assigned-clock-parents = <0>, <0>, <0>; 1066be33864SEmmanuel Vadot assigned-clock-rates = <294912000>, 1076be33864SEmmanuel Vadot <270950400>, 1086be33864SEmmanuel Vadot <393216000>; 1096be33864SEmmanuel Vadot 1106be33864SEmmanuel Vadot dai-link-0 { 1116be33864SEmmanuel Vadot sound-dai = <&frddr_a>; 1126be33864SEmmanuel Vadot }; 1136be33864SEmmanuel Vadot 1146be33864SEmmanuel Vadot dai-link-1 { 1156be33864SEmmanuel Vadot sound-dai = <&frddr_b>; 1166be33864SEmmanuel Vadot }; 1176be33864SEmmanuel Vadot 1186be33864SEmmanuel Vadot dai-link-2 { 1196be33864SEmmanuel Vadot sound-dai = <&frddr_c>; 1206be33864SEmmanuel Vadot }; 1216be33864SEmmanuel Vadot 1226be33864SEmmanuel Vadot dai-link-3 { 1236be33864SEmmanuel Vadot sound-dai = <&toddr_a>; 1246be33864SEmmanuel Vadot }; 1256be33864SEmmanuel Vadot 1266be33864SEmmanuel Vadot dai-link-4 { 1276be33864SEmmanuel Vadot sound-dai = <&toddr_b>; 1286be33864SEmmanuel Vadot }; 1296be33864SEmmanuel Vadot 1306be33864SEmmanuel Vadot dai-link-5 { 1316be33864SEmmanuel Vadot sound-dai = <&toddr_c>; 1326be33864SEmmanuel Vadot }; 1336be33864SEmmanuel Vadot 1346be33864SEmmanuel Vadot /* 8ch hdmi interface */ 1356be33864SEmmanuel Vadot dai-link-6 { 1366be33864SEmmanuel Vadot sound-dai = <&tdmif_b>; 1376be33864SEmmanuel Vadot dai-format = "i2s"; 1386be33864SEmmanuel Vadot dai-tdm-slot-tx-mask-0 = <1 1>; 1396be33864SEmmanuel Vadot dai-tdm-slot-tx-mask-1 = <1 1>; 1406be33864SEmmanuel Vadot dai-tdm-slot-tx-mask-2 = <1 1>; 1416be33864SEmmanuel Vadot dai-tdm-slot-tx-mask-3 = <1 1>; 1426be33864SEmmanuel Vadot mclk-fs = <256>; 1436be33864SEmmanuel Vadot 1446be33864SEmmanuel Vadot codec-0 { 1456be33864SEmmanuel Vadot sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; 1466be33864SEmmanuel Vadot }; 1476be33864SEmmanuel Vadot 1486be33864SEmmanuel Vadot codec-1 { 1496be33864SEmmanuel Vadot sound-dai = <&toacodec TOACODEC_IN_B>; 1506be33864SEmmanuel Vadot }; 1516be33864SEmmanuel Vadot }; 1526be33864SEmmanuel Vadot 1536be33864SEmmanuel Vadot /* i2s jack output interface */ 1546be33864SEmmanuel Vadot dai-link-7 { 1556be33864SEmmanuel Vadot sound-dai = <&tdmif_c>; 1566be33864SEmmanuel Vadot dai-format = "i2s"; 1576be33864SEmmanuel Vadot dai-tdm-slot-tx-mask-0 = <1 1>; 1586be33864SEmmanuel Vadot mclk-fs = <256>; 1596be33864SEmmanuel Vadot 1606be33864SEmmanuel Vadot codec-0 { 1616be33864SEmmanuel Vadot sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>; 1626be33864SEmmanuel Vadot }; 1636be33864SEmmanuel Vadot 1646be33864SEmmanuel Vadot codec-1 { 1656be33864SEmmanuel Vadot sound-dai = <&toacodec TOACODEC_IN_C>; 1666be33864SEmmanuel Vadot }; 1676be33864SEmmanuel Vadot }; 1686be33864SEmmanuel Vadot 1696be33864SEmmanuel Vadot /* hdmi glue */ 1706be33864SEmmanuel Vadot dai-link-8 { 1716be33864SEmmanuel Vadot sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; 1726be33864SEmmanuel Vadot 1736be33864SEmmanuel Vadot codec { 1746be33864SEmmanuel Vadot sound-dai = <&hdmi_tx>; 1756be33864SEmmanuel Vadot }; 1766be33864SEmmanuel Vadot }; 1776be33864SEmmanuel Vadot 1786be33864SEmmanuel Vadot /* acodec glue */ 1796be33864SEmmanuel Vadot dai-link-9 { 1806be33864SEmmanuel Vadot sound-dai = <&toacodec TOACODEC_OUT>; 1816be33864SEmmanuel Vadot 1826be33864SEmmanuel Vadot codec { 1836be33864SEmmanuel Vadot sound-dai = <&acodec>; 1846be33864SEmmanuel Vadot }; 1856be33864SEmmanuel Vadot }; 1866be33864SEmmanuel Vadot }; 1876be33864SEmmanuel Vadot}; 1886be33864SEmmanuel Vadot 1896be33864SEmmanuel Vadot&acodec { 1906be33864SEmmanuel Vadot AVDD-supply = <&vddao_1v8>; 1916be33864SEmmanuel Vadot status = "okay"; 1926be33864SEmmanuel Vadot}; 1936be33864SEmmanuel Vadot 194cb7aa33aSEmmanuel Vadotðmac { 195cb7aa33aSEmmanuel Vadot pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; 1966be33864SEmmanuel Vadot pinctrl-names = "default"; 1976be33864SEmmanuel Vadot status = "okay"; 198cb7aa33aSEmmanuel Vadot phy-mode = "rgmii"; 199cb7aa33aSEmmanuel Vadot phy-handle = <&external_phy>; 200cb7aa33aSEmmanuel Vadot amlogic,tx-delay-ns = <2>; 2018bab661aSEmmanuel Vadot}; 2028bab661aSEmmanuel Vadot 2036be33864SEmmanuel Vadot&ext_mdio { 2046be33864SEmmanuel Vadot external_phy: ethernet-phy@0 { 2056be33864SEmmanuel Vadot /* Realtek RTL8211F (0x001cc916) */ 2066be33864SEmmanuel Vadot reg = <0>; 2076be33864SEmmanuel Vadot max-speed = <1000>; 2086be33864SEmmanuel Vadot 2096be33864SEmmanuel Vadot reset-assert-us = <10000>; 2105def4c47SEmmanuel Vadot reset-deassert-us = <80000>; 2116be33864SEmmanuel Vadot reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; 2126be33864SEmmanuel Vadot 2136be33864SEmmanuel Vadot interrupt-parent = <&gpio_intc>; 2146be33864SEmmanuel Vadot /* MAC_INTR on GPIOZ_14 */ 215aa1a8ff2SEmmanuel Vadot interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>; 2166be33864SEmmanuel Vadot }; 2176be33864SEmmanuel Vadot}; 2186be33864SEmmanuel Vadot 2196be33864SEmmanuel Vadot&gpio { 2202eb4d8dcSEmmanuel Vadot gpio-line-names = 2212eb4d8dcSEmmanuel Vadot /* GPIOZ */ 2222eb4d8dcSEmmanuel Vadot "", "", "", "", "", "", "", "", 2232eb4d8dcSEmmanuel Vadot "", "", "", "", "", "", "", "", 2242eb4d8dcSEmmanuel Vadot /* GPIOH */ 2252eb4d8dcSEmmanuel Vadot "", "", "", "", "", "", "", "", 2262eb4d8dcSEmmanuel Vadot "", 2272eb4d8dcSEmmanuel Vadot /* BOOT */ 2282eb4d8dcSEmmanuel Vadot "", "", "", "", "", "", "", "", 2292eb4d8dcSEmmanuel Vadot "", "", "", "", "", "", "", "", 2302eb4d8dcSEmmanuel Vadot /* GPIOC */ 2312eb4d8dcSEmmanuel Vadot "", "", "", "", "", "", "", "", 2322eb4d8dcSEmmanuel Vadot /* GPIOA */ 2332eb4d8dcSEmmanuel Vadot "PIN_44", /* GPIOA_0 */ 2342eb4d8dcSEmmanuel Vadot "PIN_46", /* GPIOA_1 */ 2352eb4d8dcSEmmanuel Vadot "PIN_45", /* GPIOA_2 */ 2362eb4d8dcSEmmanuel Vadot "PIN_47", /* GPIOA_3 */ 2372eb4d8dcSEmmanuel Vadot "PIN_26", /* GPIOA_4 */ 2382eb4d8dcSEmmanuel Vadot "", "", "", "", "", "", 2392eb4d8dcSEmmanuel Vadot "PIN_42", /* GPIOA_11 */ 2402eb4d8dcSEmmanuel Vadot "PIN_32", /* GPIOA_12 */ 2412eb4d8dcSEmmanuel Vadot "PIN_7", /* GPIOA_13 */ 2422eb4d8dcSEmmanuel Vadot "PIN_27", /* GPIOA_14 */ 2432eb4d8dcSEmmanuel Vadot "PIN_28", /* GPIOA_15 */ 2442eb4d8dcSEmmanuel Vadot /* GPIOX */ 2452eb4d8dcSEmmanuel Vadot "PIN_16", /* GPIOX_0 */ 2462eb4d8dcSEmmanuel Vadot "PIN_18", /* GPIOX_1 */ 2472eb4d8dcSEmmanuel Vadot "PIN_22", /* GPIOX_2 */ 2482eb4d8dcSEmmanuel Vadot "PIN_11", /* GPIOX_3 */ 2492eb4d8dcSEmmanuel Vadot "PIN_13", /* GPIOX_4 */ 2502eb4d8dcSEmmanuel Vadot "PIN_33", /* GPIOX_5 */ 2512eb4d8dcSEmmanuel Vadot "PIN_35", /* GPIOX_6 */ 2522eb4d8dcSEmmanuel Vadot "PIN_15", /* GPIOX_7 */ 2532eb4d8dcSEmmanuel Vadot "PIN_19", /* GPIOX_8 */ 2542eb4d8dcSEmmanuel Vadot "PIN_21", /* GPIOX_9 */ 2552eb4d8dcSEmmanuel Vadot "PIN_24", /* GPIOX_10 */ 2562eb4d8dcSEmmanuel Vadot "PIN_23", /* GPIOX_11 */ 2572eb4d8dcSEmmanuel Vadot "PIN_8", /* GPIOX_12 */ 2582eb4d8dcSEmmanuel Vadot "PIN_10", /* GPIOX_13 */ 2592eb4d8dcSEmmanuel Vadot "PIN_29", /* GPIOX_14 */ 2602eb4d8dcSEmmanuel Vadot "PIN_31", /* GPIOX_15 */ 2612eb4d8dcSEmmanuel Vadot "PIN_12", /* GPIOX_16 */ 2622eb4d8dcSEmmanuel Vadot "PIN_3", /* GPIOX_17 */ 2632eb4d8dcSEmmanuel Vadot "PIN_5", /* GPIOX_18 */ 2642eb4d8dcSEmmanuel Vadot "PIN_36"; /* GPIOX_19 */ 2656be33864SEmmanuel Vadot}; 2666be33864SEmmanuel Vadot 2675def4c47SEmmanuel Vadot&i2c3 { 2685def4c47SEmmanuel Vadot status = "okay"; 2695def4c47SEmmanuel Vadot pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; 2705def4c47SEmmanuel Vadot pinctrl-names = "default"; 2715def4c47SEmmanuel Vadot 2725def4c47SEmmanuel Vadot rtc: rtc@51 { 2735def4c47SEmmanuel Vadot compatible = "nxp,pcf8563"; 2745def4c47SEmmanuel Vadot reg = <0x51>; 2755def4c47SEmmanuel Vadot wakeup-source; 2765def4c47SEmmanuel Vadot }; 2775def4c47SEmmanuel Vadot}; 2785def4c47SEmmanuel Vadot 279cb7aa33aSEmmanuel Vadot&ir { 280cb7aa33aSEmmanuel Vadot status = "okay"; 281cb7aa33aSEmmanuel Vadot pinctrl-0 = <&remote_input_ao_pins>; 2826be33864SEmmanuel Vadot pinctrl-names = "default"; 283cb7aa33aSEmmanuel Vadot linux,rc-map-name = "rc-odroid"; 2846be33864SEmmanuel Vadot}; 2856be33864SEmmanuel Vadot 2866be33864SEmmanuel Vadot/* 2876be33864SEmmanuel Vadot * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins are shared between SPI NOR pins 2886be33864SEmmanuel Vadot * and eMMC Data 4 to 7 pins. 2896be33864SEmmanuel Vadot * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0, 2906be33864SEmmanuel Vadot * and change bus-width to 4 then spifc can be enabled. 2916be33864SEmmanuel Vadot * The SW1 slide should also be set to the correct position. 2926be33864SEmmanuel Vadot */ 2936be33864SEmmanuel Vadot&spifc { 2946be33864SEmmanuel Vadot status = "disabled"; 2956be33864SEmmanuel Vadot pinctrl-0 = <&nor_pins>; 2966be33864SEmmanuel Vadot pinctrl-names = "default"; 2976be33864SEmmanuel Vadot 298e67e8565SEmmanuel Vadot mx25u64: flash@0 { 2996be33864SEmmanuel Vadot #address-cells = <1>; 3006be33864SEmmanuel Vadot #size-cells = <1>; 3016be33864SEmmanuel Vadot compatible = "mxicy,mx25u6435f", "jedec,spi-nor"; 3026be33864SEmmanuel Vadot reg = <0>; 3036be33864SEmmanuel Vadot spi-max-frequency = <104000000>; 3046be33864SEmmanuel Vadot }; 3056be33864SEmmanuel Vadot}; 3066be33864SEmmanuel Vadot 3076be33864SEmmanuel Vadot&toacodec { 3086be33864SEmmanuel Vadot status = "okay"; 3096be33864SEmmanuel Vadot}; 3106be33864SEmmanuel Vadot 3116be33864SEmmanuel Vadot&usb { 3126be33864SEmmanuel Vadot vbus-supply = <&usb_pwr_en>; 3136be33864SEmmanuel Vadot}; 3146be33864SEmmanuel Vadot 3156be33864SEmmanuel Vadot&usb2_phy1 { 3166be33864SEmmanuel Vadot /* Enable the hub which is connected to this port */ 3176be33864SEmmanuel Vadot phy-supply = <&hub_5v>; 3186be33864SEmmanuel Vadot}; 319