1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 2 /* 3 * Copyright (c) 2019 BayLibre, SAS 3 * Copyright (c) 2019 BayLibre, SAS 4 * Author: Neil Armstrong <narmstrong@baylibre. 4 * Author: Neil Armstrong <narmstrong@baylibre.com> 5 */ 5 */ 6 6 7 #include "meson-g12b-odroid.dtsi" 7 #include "meson-g12b-odroid.dtsi" 8 8 9 / { 9 / { 10 aliases { 10 aliases { 11 rtc0 = &rtc; 11 rtc0 = &rtc; 12 }; 12 }; 13 13 14 dio2133: audio-amplifier-0 { 14 dio2133: audio-amplifier-0 { 15 compatible = "simple-audio-amp 15 compatible = "simple-audio-amplifier"; 16 enable-gpios = <&gpio_ao GPIOA 16 enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; 17 VCC-supply = <&vcc_5v>; 17 VCC-supply = <&vcc_5v>; 18 sound-name-prefix = "U19"; 18 sound-name-prefix = "U19"; 19 status = "okay"; 19 status = "okay"; 20 }; 20 }; 21 21 22 hub_5v: regulator-hub-5v { !! 22 hub_5v: regulator-hub_5v { 23 compatible = "regulator-fixed" 23 compatible = "regulator-fixed"; 24 regulator-name = "HUB_5V"; 24 regulator-name = "HUB_5V"; 25 regulator-min-microvolt = <500 25 regulator-min-microvolt = <5000000>; 26 regulator-max-microvolt = <500 26 regulator-max-microvolt = <5000000>; 27 vin-supply = <&vcc_5v>; 27 vin-supply = <&vcc_5v>; 28 28 29 /* Connected to the Hub CHIPEN 29 /* Connected to the Hub CHIPENABLE, LOW sets low power state */ 30 gpio = <&gpio GPIOH_5 GPIO_ACT 30 gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; 31 enable-active-high; 31 enable-active-high; 32 }; 32 }; 33 33 34 /* USB hub supports both USB 2.0 and U << 35 usb-hub { << 36 dr_mode = "host"; << 37 #address-cells = <1>; << 38 #size-cells = <0>; << 39 << 40 /* 2.0 hub on port 1 */ << 41 hub_2_0: hub@1 { << 42 compatible = "usb5e3,6 << 43 reg = <1>; << 44 peer-hub = <&hub_3_0>; << 45 vdd-supply = <&usb_pwr << 46 }; << 47 << 48 /* 3.0 hub on port 4 */ << 49 hub_3_0: hub@2 { << 50 compatible = "usb5e3,6 << 51 reg = <2>; << 52 peer-hub = <&hub_2_0>; << 53 reset-gpios = <&gpio G << 54 vdd-supply = <&vcc_5v> << 55 }; << 56 }; << 57 << 58 sound { 34 sound { 59 compatible = "amlogic,axg-soun 35 compatible = "amlogic,axg-sound-card"; 60 model = "ODROID-N2"; 36 model = "ODROID-N2"; 61 audio-widgets = "Line", "Lineo 37 audio-widgets = "Line", "Lineout"; 62 audio-aux-devs = <&tdmout_b>, 38 audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>, 63 <&tdmin_b>, < 39 <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>, 64 <&dio2133>; 40 <&dio2133>; 65 audio-routing = "TDMOUT_B IN 0 41 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", 66 "TDMOUT_B IN 1 42 "TDMOUT_B IN 1", "FRDDR_B OUT 1", 67 "TDMOUT_B IN 2 43 "TDMOUT_B IN 2", "FRDDR_C OUT 1", 68 "TDM_B Playbac 44 "TDM_B Playback", "TDMOUT_B OUT", 69 "TDMOUT_C IN 0 45 "TDMOUT_C IN 0", "FRDDR_A OUT 2", 70 "TDMOUT_C IN 1 46 "TDMOUT_C IN 1", "FRDDR_B OUT 2", 71 "TDMOUT_C IN 2 47 "TDMOUT_C IN 2", "FRDDR_C OUT 2", 72 "TDM_C Playbac 48 "TDM_C Playback", "TDMOUT_C OUT", 73 "TDMIN_A IN 4" 49 "TDMIN_A IN 4", "TDM_B Loopback", 74 "TDMIN_B IN 4" 50 "TDMIN_B IN 4", "TDM_B Loopback", 75 "TDMIN_C IN 4" 51 "TDMIN_C IN 4", "TDM_B Loopback", 76 "TDMIN_LB IN 1 52 "TDMIN_LB IN 1", "TDM_B Loopback", 77 "TDMIN_A IN 5" 53 "TDMIN_A IN 5", "TDM_C Loopback", 78 "TDMIN_B IN 5" 54 "TDMIN_B IN 5", "TDM_C Loopback", 79 "TDMIN_C IN 5" 55 "TDMIN_C IN 5", "TDM_C Loopback", 80 "TDMIN_LB IN 2 56 "TDMIN_LB IN 2", "TDM_C Loopback", 81 "TODDR_A IN 0" 57 "TODDR_A IN 0", "TDMIN_A OUT", 82 "TODDR_B IN 0" 58 "TODDR_B IN 0", "TDMIN_A OUT", 83 "TODDR_C IN 0" 59 "TODDR_C IN 0", "TDMIN_A OUT", 84 "TODDR_A IN 1" 60 "TODDR_A IN 1", "TDMIN_B OUT", 85 "TODDR_B IN 1" 61 "TODDR_B IN 1", "TDMIN_B OUT", 86 "TODDR_C IN 1" 62 "TODDR_C IN 1", "TDMIN_B OUT", 87 "TODDR_A IN 2" 63 "TODDR_A IN 2", "TDMIN_C OUT", 88 "TODDR_B IN 2" 64 "TODDR_B IN 2", "TDMIN_C OUT", 89 "TODDR_C IN 2" 65 "TODDR_C IN 2", "TDMIN_C OUT", 90 "TODDR_A IN 6" 66 "TODDR_A IN 6", "TDMIN_LB OUT", 91 "TODDR_B IN 6" 67 "TODDR_B IN 6", "TDMIN_LB OUT", 92 "TODDR_C IN 6" 68 "TODDR_C IN 6", "TDMIN_LB OUT", 93 "U19 INL", "AC 69 "U19 INL", "ACODEC LOLP", 94 "U19 INR", "AC 70 "U19 INR", "ACODEC LORP", 95 "Lineout", "U1 71 "Lineout", "U19 OUTL", 96 "Lineout", "U1 72 "Lineout", "U19 OUTR"; 97 73 98 clocks = <&clkc CLKID_MPLL2>, << 99 <&clkc CLKID_MPLL0>, << 100 <&clkc CLKID_MPLL1>; << 101 << 102 assigned-clocks = <&clkc CLKID 74 assigned-clocks = <&clkc CLKID_MPLL2>, 103 <&clkc CLKID 75 <&clkc CLKID_MPLL0>, 104 <&clkc CLKID 76 <&clkc CLKID_MPLL1>; 105 assigned-clock-parents = <0>, 77 assigned-clock-parents = <0>, <0>, <0>; 106 assigned-clock-rates = <294912 78 assigned-clock-rates = <294912000>, 107 <270950 79 <270950400>, 108 <393216 80 <393216000>; >> 81 status = "okay"; 109 82 110 dai-link-0 { 83 dai-link-0 { 111 sound-dai = <&frddr_a> 84 sound-dai = <&frddr_a>; 112 }; 85 }; 113 86 114 dai-link-1 { 87 dai-link-1 { 115 sound-dai = <&frddr_b> 88 sound-dai = <&frddr_b>; 116 }; 89 }; 117 90 118 dai-link-2 { 91 dai-link-2 { 119 sound-dai = <&frddr_c> 92 sound-dai = <&frddr_c>; 120 }; 93 }; 121 94 122 dai-link-3 { 95 dai-link-3 { 123 sound-dai = <&toddr_a> 96 sound-dai = <&toddr_a>; 124 }; 97 }; 125 98 126 dai-link-4 { 99 dai-link-4 { 127 sound-dai = <&toddr_b> 100 sound-dai = <&toddr_b>; 128 }; 101 }; 129 102 130 dai-link-5 { 103 dai-link-5 { 131 sound-dai = <&toddr_c> 104 sound-dai = <&toddr_c>; 132 }; 105 }; 133 106 134 /* 8ch hdmi interface */ 107 /* 8ch hdmi interface */ 135 dai-link-6 { 108 dai-link-6 { 136 sound-dai = <&tdmif_b> 109 sound-dai = <&tdmif_b>; 137 dai-format = "i2s"; 110 dai-format = "i2s"; 138 dai-tdm-slot-tx-mask-0 111 dai-tdm-slot-tx-mask-0 = <1 1>; 139 dai-tdm-slot-tx-mask-1 112 dai-tdm-slot-tx-mask-1 = <1 1>; 140 dai-tdm-slot-tx-mask-2 113 dai-tdm-slot-tx-mask-2 = <1 1>; 141 dai-tdm-slot-tx-mask-3 114 dai-tdm-slot-tx-mask-3 = <1 1>; 142 mclk-fs = <256>; 115 mclk-fs = <256>; 143 116 144 codec-0 { 117 codec-0 { 145 sound-dai = <& 118 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; 146 }; 119 }; 147 120 148 codec-1 { 121 codec-1 { 149 sound-dai = <& 122 sound-dai = <&toacodec TOACODEC_IN_B>; 150 }; 123 }; 151 }; 124 }; 152 125 153 /* i2s jack output interface * 126 /* i2s jack output interface */ 154 dai-link-7 { 127 dai-link-7 { 155 sound-dai = <&tdmif_c> 128 sound-dai = <&tdmif_c>; 156 dai-format = "i2s"; 129 dai-format = "i2s"; 157 dai-tdm-slot-tx-mask-0 130 dai-tdm-slot-tx-mask-0 = <1 1>; 158 mclk-fs = <256>; 131 mclk-fs = <256>; 159 132 160 codec-0 { 133 codec-0 { 161 sound-dai = <& 134 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>; 162 }; 135 }; 163 136 164 codec-1 { 137 codec-1 { 165 sound-dai = <& 138 sound-dai = <&toacodec TOACODEC_IN_C>; 166 }; 139 }; 167 }; 140 }; 168 141 169 /* hdmi glue */ 142 /* hdmi glue */ 170 dai-link-8 { 143 dai-link-8 { 171 sound-dai = <&tohdmitx 144 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; 172 145 173 codec { 146 codec { 174 sound-dai = <& 147 sound-dai = <&hdmi_tx>; 175 }; 148 }; 176 }; 149 }; 177 150 178 /* acodec glue */ 151 /* acodec glue */ 179 dai-link-9 { 152 dai-link-9 { 180 sound-dai = <&toacodec 153 sound-dai = <&toacodec TOACODEC_OUT>; 181 154 182 codec { 155 codec { 183 sound-dai = <& 156 sound-dai = <&acodec>; 184 }; 157 }; 185 }; 158 }; 186 }; 159 }; 187 }; 160 }; 188 161 189 &acodec { 162 &acodec { 190 AVDD-supply = <&vddao_1v8>; 163 AVDD-supply = <&vddao_1v8>; 191 status = "okay"; 164 status = "okay"; 192 }; 165 }; 193 166 194 ðmac { 167 ðmac { 195 pinctrl-0 = <ð_pins>, <ð_rgmii_p 168 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; 196 pinctrl-names = "default"; 169 pinctrl-names = "default"; 197 status = "okay"; 170 status = "okay"; 198 phy-mode = "rgmii"; 171 phy-mode = "rgmii"; 199 phy-handle = <&external_phy>; 172 phy-handle = <&external_phy>; 200 amlogic,tx-delay-ns = <2>; 173 amlogic,tx-delay-ns = <2>; 201 }; 174 }; 202 175 203 &ext_mdio { 176 &ext_mdio { 204 external_phy: ethernet-phy@0 { 177 external_phy: ethernet-phy@0 { 205 /* Realtek RTL8211F (0x001cc91 178 /* Realtek RTL8211F (0x001cc916) */ 206 reg = <0>; 179 reg = <0>; 207 max-speed = <1000>; 180 max-speed = <1000>; 208 181 209 reset-assert-us = <10000>; 182 reset-assert-us = <10000>; 210 reset-deassert-us = <80000>; 183 reset-deassert-us = <80000>; 211 reset-gpios = <&gpio GPIOZ_15 184 reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; 212 185 213 interrupt-parent = <&gpio_intc 186 interrupt-parent = <&gpio_intc>; 214 /* MAC_INTR on GPIOZ_14 */ 187 /* MAC_INTR on GPIOZ_14 */ 215 interrupts = <IRQID_GPIOZ_14 I !! 188 interrupts = <26 IRQ_TYPE_LEVEL_LOW>; 216 }; 189 }; 217 }; 190 }; 218 191 219 &gpio { 192 &gpio { 220 gpio-line-names = 193 gpio-line-names = 221 /* GPIOZ */ 194 /* GPIOZ */ 222 "", "", "", "", "", "", "", "" 195 "", "", "", "", "", "", "", "", 223 "", "", "", "", "", "", "", "" 196 "", "", "", "", "", "", "", "", 224 /* GPIOH */ 197 /* GPIOH */ 225 "", "", "", "", "", "", "", "" 198 "", "", "", "", "", "", "", "", 226 "", 199 "", 227 /* BOOT */ 200 /* BOOT */ 228 "", "", "", "", "", "", "", "" 201 "", "", "", "", "", "", "", "", 229 "", "", "", "", "", "", "", "" 202 "", "", "", "", "", "", "", "", 230 /* GPIOC */ 203 /* GPIOC */ 231 "", "", "", "", "", "", "", "" 204 "", "", "", "", "", "", "", "", 232 /* GPIOA */ 205 /* GPIOA */ 233 "PIN_44", /* GPIOA_0 */ 206 "PIN_44", /* GPIOA_0 */ 234 "PIN_46", /* GPIOA_1 */ 207 "PIN_46", /* GPIOA_1 */ 235 "PIN_45", /* GPIOA_2 */ 208 "PIN_45", /* GPIOA_2 */ 236 "PIN_47", /* GPIOA_3 */ 209 "PIN_47", /* GPIOA_3 */ 237 "PIN_26", /* GPIOA_4 */ 210 "PIN_26", /* GPIOA_4 */ 238 "", "", "", "", "", "", 211 "", "", "", "", "", "", 239 "PIN_42", /* GPIOA_11 */ 212 "PIN_42", /* GPIOA_11 */ 240 "PIN_32", /* GPIOA_12 */ 213 "PIN_32", /* GPIOA_12 */ 241 "PIN_7", /* GPIOA_13 */ 214 "PIN_7", /* GPIOA_13 */ 242 "PIN_27", /* GPIOA_14 */ 215 "PIN_27", /* GPIOA_14 */ 243 "PIN_28", /* GPIOA_15 */ 216 "PIN_28", /* GPIOA_15 */ 244 /* GPIOX */ 217 /* GPIOX */ 245 "PIN_16", /* GPIOX_0 */ 218 "PIN_16", /* GPIOX_0 */ 246 "PIN_18", /* GPIOX_1 */ 219 "PIN_18", /* GPIOX_1 */ 247 "PIN_22", /* GPIOX_2 */ 220 "PIN_22", /* GPIOX_2 */ 248 "PIN_11", /* GPIOX_3 */ 221 "PIN_11", /* GPIOX_3 */ 249 "PIN_13", /* GPIOX_4 */ 222 "PIN_13", /* GPIOX_4 */ 250 "PIN_33", /* GPIOX_5 */ 223 "PIN_33", /* GPIOX_5 */ 251 "PIN_35", /* GPIOX_6 */ 224 "PIN_35", /* GPIOX_6 */ 252 "PIN_15", /* GPIOX_7 */ 225 "PIN_15", /* GPIOX_7 */ 253 "PIN_19", /* GPIOX_8 */ 226 "PIN_19", /* GPIOX_8 */ 254 "PIN_21", /* GPIOX_9 */ 227 "PIN_21", /* GPIOX_9 */ 255 "PIN_24", /* GPIOX_10 */ 228 "PIN_24", /* GPIOX_10 */ 256 "PIN_23", /* GPIOX_11 */ 229 "PIN_23", /* GPIOX_11 */ 257 "PIN_8", /* GPIOX_12 */ 230 "PIN_8", /* GPIOX_12 */ 258 "PIN_10", /* GPIOX_13 */ 231 "PIN_10", /* GPIOX_13 */ 259 "PIN_29", /* GPIOX_14 */ 232 "PIN_29", /* GPIOX_14 */ 260 "PIN_31", /* GPIOX_15 */ 233 "PIN_31", /* GPIOX_15 */ 261 "PIN_12", /* GPIOX_16 */ 234 "PIN_12", /* GPIOX_16 */ 262 "PIN_3", /* GPIOX_17 */ 235 "PIN_3", /* GPIOX_17 */ 263 "PIN_5", /* GPIOX_18 */ 236 "PIN_5", /* GPIOX_18 */ 264 "PIN_36"; /* GPIOX_19 */ 237 "PIN_36"; /* GPIOX_19 */ >> 238 /* >> 239 * WARNING: The USB Hub on the Odroid-N2 needs a reset signal >> 240 * to be turned high in order to be detected by the USB Controller >> 241 * This signal should be handled by a USB specific power sequence >> 242 * in order to reset the Hub when USB bus is powered down. >> 243 */ >> 244 hog-0 { >> 245 gpio-hog; >> 246 gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>; >> 247 output-high; >> 248 line-name = "usb-hub-reset"; >> 249 }; 265 }; 250 }; 266 251 267 &i2c3 { 252 &i2c3 { 268 status = "okay"; 253 status = "okay"; 269 pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3 254 pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; 270 pinctrl-names = "default"; 255 pinctrl-names = "default"; 271 256 272 rtc: rtc@51 { 257 rtc: rtc@51 { 273 compatible = "nxp,pcf8563"; 258 compatible = "nxp,pcf8563"; 274 reg = <0x51>; 259 reg = <0x51>; 275 wakeup-source; 260 wakeup-source; 276 }; 261 }; 277 }; 262 }; 278 263 279 &ir { 264 &ir { 280 status = "okay"; 265 status = "okay"; 281 pinctrl-0 = <&remote_input_ao_pins>; 266 pinctrl-0 = <&remote_input_ao_pins>; 282 pinctrl-names = "default"; 267 pinctrl-names = "default"; 283 linux,rc-map-name = "rc-odroid"; 268 linux,rc-map-name = "rc-odroid"; 284 }; 269 }; 285 270 286 /* 271 /* 287 * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins 272 * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins are shared between SPI NOR pins 288 * and eMMC Data 4 to 7 pins. 273 * and eMMC Data 4 to 7 pins. 289 * Replace emmc_data_8b_pins to emmc_data_4b_p 274 * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0, 290 * and change bus-width to 4 then spifc can be 275 * and change bus-width to 4 then spifc can be enabled. 291 * The SW1 slide should also be set to the cor 276 * The SW1 slide should also be set to the correct position. 292 */ 277 */ 293 &spifc { 278 &spifc { 294 status = "disabled"; 279 status = "disabled"; 295 pinctrl-0 = <&nor_pins>; 280 pinctrl-0 = <&nor_pins>; 296 pinctrl-names = "default"; 281 pinctrl-names = "default"; 297 282 298 mx25u64: flash@0 { 283 mx25u64: flash@0 { 299 #address-cells = <1>; 284 #address-cells = <1>; 300 #size-cells = <1>; 285 #size-cells = <1>; 301 compatible = "mxicy,mx25u6435f 286 compatible = "mxicy,mx25u6435f", "jedec,spi-nor"; 302 reg = <0>; 287 reg = <0>; 303 spi-max-frequency = <104000000 288 spi-max-frequency = <104000000>; 304 }; 289 }; 305 }; 290 }; 306 291 307 &toacodec { 292 &toacodec { 308 status = "okay"; 293 status = "okay"; 309 }; 294 }; 310 295 311 &usb { 296 &usb { 312 vbus-supply = <&usb_pwr_en>; 297 vbus-supply = <&usb_pwr_en>; 313 }; 298 }; 314 299 315 &usb2_phy1 { 300 &usb2_phy1 { 316 /* Enable the hub which is connected t 301 /* Enable the hub which is connected to this port */ 317 phy-supply = <&hub_5v>; 302 phy-supply = <&hub_5v>; 318 }; 303 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.