0001 // SPDX-License-Identifier: GPL-2.0 OR MIT
0002 /*
0003 * Copyright 2015 Endless Mobile, Inc.
0004 * Author: Carlo Caione <carlo@endlessm.com>
0005 */
0006
0007 /dts-v1/;
0008 #include "meson8b.dtsi"
0009 #include <dt-bindings/gpio/gpio.h>
0010
0011 / {
0012 model = "Hardkernel ODROID-C1";
0013 compatible = "hardkernel,odroid-c1", "amlogic,meson8b";
0014
0015 aliases {
0016 serial0 = &uart_AO;
0017 mmc0 = &sd_card_slot;
0018 mmc1 = &sdhc;
0019 };
0020
0021 chosen {
0022 stdout-path = "serial0:115200n8";
0023 };
0024
0025 memory {
0026 device_type = "memory";
0027 reg = <0x40000000 0x40000000>;
0028 };
0029
0030 emmc_pwrseq: emmc-pwrseq {
0031 compatible = "mmc-pwrseq-emmc";
0032 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0033 };
0034
0035 leds {
0036 compatible = "gpio-leds";
0037 blue {
0038 label = "c1:blue:alive";
0039 gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
0040 linux,default-trigger = "heartbeat";
0041 default-state = "off";
0042 };
0043 };
0044
0045 p5v0: regulator-p5v0 {
0046 compatible = "regulator-fixed";
0047
0048 regulator-name = "P5V0";
0049 regulator-min-microvolt = <5000000>;
0050 regulator-max-microvolt = <5000000>;
0051 };
0052
0053 tflash_vdd: regulator-tflash_vdd {
0054 /*
0055 * signal name from schematics: TFLASH_VDD_EN
0056 */
0057 compatible = "regulator-fixed";
0058
0059 regulator-name = "TFLASH_VDD";
0060 regulator-min-microvolt = <3300000>;
0061 regulator-max-microvolt = <3300000>;
0062
0063 vin-supply = <&vcc_3v3>;
0064
0065 gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
0066 enable-active-high;
0067 };
0068
0069 tf_io: gpio-regulator-tf_io {
0070 compatible = "regulator-gpio";
0071
0072 regulator-name = "TF_IO";
0073 regulator-min-microvolt = <1800000>;
0074 regulator-max-microvolt = <3300000>;
0075
0076 vin-supply = <&vcc_3v3>;
0077
0078 /*
0079 * signal name from schematics: TF_3V3N_1V8_EN
0080 */
0081 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
0082 gpios-states = <0>;
0083
0084 states = <3300000 0
0085 1800000 1>;
0086 };
0087
0088 rtc32k_xtal: rtc32k-xtal-clk {
0089 /* X3 in the schematics */
0090 compatible = "fixed-clock";
0091 clock-frequency = <32768>;
0092 clock-output-names = "RTC32K";
0093 #clock-cells = <0>;
0094 };
0095
0096 vcc_1v8: regulator-vcc-1v8 {
0097 /*
0098 * RICHTEK RT9179 configured for a fixed output voltage of
0099 * 1.8V. This supplies not only VCC1V8 but also IOREF_1V8 and
0100 * VDD1V8 according to the schematics.
0101 */
0102 compatible = "regulator-fixed";
0103
0104 regulator-name = "VCC1V8";
0105 regulator-min-microvolt = <1800000>;
0106 regulator-max-microvolt = <1800000>;
0107
0108 vin-supply = <&p5v0>;
0109 };
0110
0111 vcc_3v3: regulator-vcc-3v3 {
0112 /*
0113 * Monolithic Power Systems MP2161 configured for a fixed
0114 * output voltage of 3.3V. This supplies not only VCC3V3 but
0115 * also VDD3V3 and VDDIO_AO3V3 according to the schematics.
0116 */
0117 compatible = "regulator-fixed";
0118
0119 regulator-name = "VCC3V3";
0120 regulator-min-microvolt = <3300000>;
0121 regulator-max-microvolt = <3300000>;
0122
0123 vin-supply = <&p5v0>;
0124 };
0125
0126 vcck: regulator-vcck {
0127 /* Monolithic Power Systems MP2161 */
0128 compatible = "pwm-regulator";
0129
0130 regulator-name = "VCCK";
0131 regulator-min-microvolt = <860000>;
0132 regulator-max-microvolt = <1140000>;
0133
0134 pwm-supply = <&p5v0>;
0135
0136 pwms = <&pwm_cd 0 12218 0>;
0137 pwm-dutycycle-range = <91 0>;
0138
0139 regulator-boot-on;
0140 regulator-always-on;
0141 };
0142
0143 vddc_ddr: regulator-vddc-ddr {
0144 /*
0145 * Monolithic Power Systems MP2161 configured for a fixed
0146 * output voltage of 1.5V. This supplies not only DDR_VDDC but
0147 * also DDR3_1V5 according to the schematics.
0148 */
0149 compatible = "regulator-fixed";
0150
0151 regulator-name = "DDR_VDDC";
0152 regulator-min-microvolt = <1500000>;
0153 regulator-max-microvolt = <1500000>;
0154
0155 vin-supply = <&p5v0>;
0156 };
0157
0158 vddee: regulator-vddee {
0159 /* Monolithic Power Systems MP2161 */
0160 compatible = "pwm-regulator";
0161
0162 regulator-name = "VDDEE";
0163 regulator-min-microvolt = <860000>;
0164 regulator-max-microvolt = <1140000>;
0165
0166 pwm-supply = <&p5v0>;
0167
0168 pwms = <&pwm_cd 1 12218 0>;
0169 pwm-dutycycle-range = <91 0>;
0170
0171 regulator-boot-on;
0172 regulator-always-on;
0173 };
0174
0175 vdd_rtc: regulator-vdd-rtc {
0176 /*
0177 * Torex Semiconductor XC6215 configured for a fixed output of
0178 * 0.9V.
0179 */
0180 compatible = "regulator-fixed";
0181
0182 regulator-name = "VDD_RTC";
0183 regulator-min-microvolt = <900000>;
0184 regulator-max-microvolt = <900000>;
0185
0186 vin-supply = <&vcc_3v3>;
0187 };
0188 };
0189
0190 &cpu0 {
0191 cpu-supply = <&vcck>;
0192 };
0193
0194 &efuse {
0195 ethernet_mac_address: mac@1b4 {
0196 reg = <0x1b4 0x6>;
0197 };
0198 };
0199
0200 ðmac {
0201 status = "okay";
0202
0203 pinctrl-0 = <ð_rgmii_pins>;
0204 pinctrl-names = "default";
0205
0206 phy-handle = <ð_phy>;
0207 phy-mode = "rgmii-id";
0208
0209 nvmem-cells = <ðernet_mac_address>;
0210 nvmem-cell-names = "mac-address";
0211
0212 mdio {
0213 compatible = "snps,dwmac-mdio";
0214 #address-cells = <1>;
0215 #size-cells = <0>;
0216
0217 /* Realtek RTL8211F (0x001cc916) */
0218 eth_phy: ethernet-phy@0 {
0219 reg = <0>;
0220
0221 reset-assert-us = <10000>;
0222 reset-deassert-us = <80000>;
0223 reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
0224
0225 interrupt-parent = <&gpio_intc>;
0226 /* GPIOH_3 */
0227 interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
0228 };
0229 };
0230 };
0231
0232 &gpio {
0233 gpio-line-names = /* Bank GPIOX */
0234 "J2 Header Pin 35", "J2 Header Pin 36",
0235 "J2 Header Pin 32", "J2 Header Pin 31",
0236 "J2 Header Pin 29", "J2 Header Pin 18",
0237 "J2 Header Pin 22", "J2 Header Pin 16",
0238 "J2 Header Pin 23", "J2 Header Pin 21",
0239 "J2 Header Pin 19", "J2 Header Pin 33",
0240 "J2 Header Pin 8", "J2 Header Pin 10",
0241 "J2 Header Pin 15", "J2 Header Pin 13",
0242 "J2 Header Pin 24", "J2 Header Pin 26",
0243 /* Bank GPIOY */
0244 "Revision (upper)", "Revision (lower)",
0245 "J2 Header Pin 7", "", "J2 Header Pin 12",
0246 "J2 Header Pin 11", "", "", "",
0247 "TFLASH_VDD_EN", "", "",
0248 /* Bank GPIODV */
0249 "VCCK_PWM (PWM_C)", "I2CA_SDA", "I2CA_SCL",
0250 "I2CB_SDA", "I2CB_SCL", "VDDEE_PWM (PWM_D)",
0251 "",
0252 /* Bank GPIOH */
0253 "HDMI_HPD", "HDMI_I2C_SDA", "HDMI_I2C_SCL",
0254 "ETH_PHY_INTR", "ETH_PHY_NRST", "ETH_TXD1",
0255 "ETH_TXD0", "ETH_TXD3", "ETH_TXD2",
0256 "ETH_RGMII_TX_CLK",
0257 /* Bank CARD */
0258 "SD_DATA1 (SDB_D1)", "SD_DATA0 (SDB_D0)",
0259 "SD_CLK", "SD_CMD", "SD_DATA3 (SDB_D3)",
0260 "SD_DATA2 (SDB_D2)", "SD_CDN (SD_DET_N)",
0261 /* Bank BOOT */
0262 "SDC_D0 (EMMC)", "SDC_D1 (EMMC)",
0263 "SDC_D2 (EMMC)", "SDC_D3 (EMMC)",
0264 "SDC_D4 (EMMC)", "SDC_D5 (EMMC)",
0265 "SDC_D6 (EMMC)", "SDC_D7 (EMMC)",
0266 "SDC_CLK (EMMC)", "SDC_RSTn (EMMC)",
0267 "SDC_CMD (EMMC)", "BOOT_SEL", "", "", "",
0268 "", "", "", "",
0269 /* Bank DIF */
0270 "ETH_RXD1", "ETH_RXD0", "ETH_RX_DV",
0271 "RGMII_RX_CLK", "ETH_RXD3", "ETH_RXD2",
0272 "ETH_TXEN", "ETH_PHY_REF_CLK_25MOUT",
0273 "ETH_MDC", "ETH_MDIO";
0274 };
0275
0276 &gpio_ao {
0277 gpio-line-names = "UART TX", "UART RX", "",
0278 "TF_3V3N_1V8_EN", "USB_HUB_RST_N",
0279 "USB_OTG_PWREN", "J7 Header Pin 2",
0280 "IR_IN", "J7 Header Pin 4",
0281 "J7 Header Pin 6", "J7 Header Pin 5",
0282 "J7 Header Pin 7", "HDMI_CEC",
0283 "SYS_LED", "", "";
0284
0285 /*
0286 * WARNING: The USB Hub on the Odroid-C1/C1+ needs a reset signal
0287 * to be turned high in order to be detected by the USB Controller.
0288 * This signal should be handled by a USB specific power sequence
0289 * in order to reset the Hub when USB bus is powered down.
0290 */
0291 usb-hub {
0292 gpio-hog;
0293 gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>;
0294 output-high;
0295 line-name = "usb-hub-reset";
0296 };
0297 };
0298
0299 &ir_receiver {
0300 status = "okay";
0301 pinctrl-0 = <&ir_recv_pins>;
0302 pinctrl-names = "default";
0303 };
0304
0305 &mali {
0306 mali-supply = <&vddee>;
0307 };
0308
0309 &saradc {
0310 status = "okay";
0311 vref-supply = <&vcc_1v8>;
0312 };
0313
0314 &sdhc {
0315 status = "okay";
0316
0317 pinctrl-0 = <&sdxc_c_pins>;
0318 pinctrl-names = "default";
0319
0320 bus-width = <8>;
0321 max-frequency = <100000000>;
0322
0323 disable-wp;
0324 cap-mmc-highspeed;
0325 mmc-hs200-1_8v;
0326 no-sdio;
0327
0328 mmc-pwrseq = <&emmc_pwrseq>;
0329
0330 vmmc-supply = <&vcc_3v3>;
0331 vqmmc-supply = <&vcc_1v8>;
0332 };
0333
0334 &sdio {
0335 status = "okay";
0336
0337 pinctrl-0 = <&sd_b_pins>;
0338 pinctrl-names = "default";
0339
0340 /* SD card */
0341 sd_card_slot: slot@1 {
0342 compatible = "mmc-slot";
0343 reg = <1>;
0344 status = "okay";
0345
0346 bus-width = <4>;
0347 no-sdio;
0348 cap-mmc-highspeed;
0349 cap-sd-highspeed;
0350 disable-wp;
0351
0352 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
0353
0354 vmmc-supply = <&tflash_vdd>;
0355 vqmmc-supply = <&tf_io>;
0356 };
0357 };
0358
0359 &pwm_cd {
0360 status = "okay";
0361 pinctrl-0 = <&pwm_c1_pins>, <&pwm_d_pins>;
0362 pinctrl-names = "default";
0363 clocks = <&xtal>, <&xtal>;
0364 clock-names = "clkin0", "clkin1";
0365 };
0366
0367 &rtc {
0368 /* needs to be enabled manually when a battery is connected */
0369 clocks = <&rtc32k_xtal>;
0370 vdd-supply = <&vdd_rtc>;
0371 };
0372
0373 &uart_AO {
0374 status = "okay";
0375 pinctrl-0 = <&uart_ao_a_pins>;
0376 pinctrl-names = "default";
0377 };
0378
0379 &usb1_phy {
0380 status = "okay";
0381 };
0382
0383 &usb1 {
0384 status = "okay";
0385 };