1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2*f126890aSEmmanuel Vadot/* 3*f126890aSEmmanuel Vadot * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org> 4*f126890aSEmmanuel Vadot */ 5*f126890aSEmmanuel Vadot 6*f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 7*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h> 8*f126890aSEmmanuel Vadot 9*f126890aSEmmanuel Vadot/ { 10*f126890aSEmmanuel Vadot aliases { 11*f126890aSEmmanuel Vadot ethernet0 = &emac; 12*f126890aSEmmanuel Vadot serial0 = &uart0; 13*f126890aSEmmanuel Vadot }; 14*f126890aSEmmanuel Vadot 15*f126890aSEmmanuel Vadot chosen { 16*f126890aSEmmanuel Vadot stdout-path = "serial0:115200n8"; 17*f126890aSEmmanuel Vadot }; 18*f126890aSEmmanuel Vadot 19*f126890aSEmmanuel Vadot connector { 20*f126890aSEmmanuel Vadot compatible = "hdmi-connector"; 21*f126890aSEmmanuel Vadot type = "a"; 22*f126890aSEmmanuel Vadot 23*f126890aSEmmanuel Vadot port { 24*f126890aSEmmanuel Vadot hdmi_con_in: endpoint { 25*f126890aSEmmanuel Vadot remote-endpoint = <&hdmi_out_con>; 26*f126890aSEmmanuel Vadot }; 27*f126890aSEmmanuel Vadot }; 28*f126890aSEmmanuel Vadot }; 29*f126890aSEmmanuel Vadot 30*f126890aSEmmanuel Vadot leds { 31*f126890aSEmmanuel Vadot compatible = "gpio-leds"; 32*f126890aSEmmanuel Vadot 33*f126890aSEmmanuel Vadot pwr_led { 34*f126890aSEmmanuel Vadot label = "librecomputer:green:pwr"; 35*f126890aSEmmanuel Vadot gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ 36*f126890aSEmmanuel Vadot default-state = "on"; 37*f126890aSEmmanuel Vadot }; 38*f126890aSEmmanuel Vadot 39*f126890aSEmmanuel Vadot status_led { 40*f126890aSEmmanuel Vadot label = "librecomputer:blue:status"; 41*f126890aSEmmanuel Vadot gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */ 42*f126890aSEmmanuel Vadot }; 43*f126890aSEmmanuel Vadot }; 44*f126890aSEmmanuel Vadot 45*f126890aSEmmanuel Vadot gpio-keys { 46*f126890aSEmmanuel Vadot compatible = "gpio-keys"; 47*f126890aSEmmanuel Vadot 48*f126890aSEmmanuel Vadot key-power { 49*f126890aSEmmanuel Vadot label = "power"; 50*f126890aSEmmanuel Vadot linux,code = <KEY_POWER>; 51*f126890aSEmmanuel Vadot gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ 52*f126890aSEmmanuel Vadot wakeup-source; 53*f126890aSEmmanuel Vadot }; 54*f126890aSEmmanuel Vadot }; 55*f126890aSEmmanuel Vadot 56*f126890aSEmmanuel Vadot reg_vcc1v2: vcc1v2 { 57*f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 58*f126890aSEmmanuel Vadot regulator-name = "vcc1v2"; 59*f126890aSEmmanuel Vadot regulator-min-microvolt = <1200000>; 60*f126890aSEmmanuel Vadot regulator-max-microvolt = <1200000>; 61*f126890aSEmmanuel Vadot regulator-always-on; 62*f126890aSEmmanuel Vadot regulator-boot-on; 63*f126890aSEmmanuel Vadot vin-supply = <®_vcc5v0>; 64*f126890aSEmmanuel Vadot gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ 65*f126890aSEmmanuel Vadot enable-active-high; 66*f126890aSEmmanuel Vadot }; 67*f126890aSEmmanuel Vadot 68*f126890aSEmmanuel Vadot reg_vcc3v3: vcc3v3 { 69*f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 70*f126890aSEmmanuel Vadot regulator-name = "vcc3v3"; 71*f126890aSEmmanuel Vadot regulator-min-microvolt = <3300000>; 72*f126890aSEmmanuel Vadot regulator-max-microvolt = <3300000>; 73*f126890aSEmmanuel Vadot vin-supply = <®_vcc5v0>; 74*f126890aSEmmanuel Vadot }; 75*f126890aSEmmanuel Vadot 76*f126890aSEmmanuel Vadot /* This represents the board's 5V input */ 77*f126890aSEmmanuel Vadot reg_vcc5v0: vcc5v0 { 78*f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 79*f126890aSEmmanuel Vadot regulator-name = "vcc5v0"; 80*f126890aSEmmanuel Vadot regulator-min-microvolt = <5000000>; 81*f126890aSEmmanuel Vadot regulator-max-microvolt = <5000000>; 82*f126890aSEmmanuel Vadot }; 83*f126890aSEmmanuel Vadot 84*f126890aSEmmanuel Vadot reg_vcc_dram: vcc-dram { 85*f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 86*f126890aSEmmanuel Vadot regulator-name = "vcc-dram"; 87*f126890aSEmmanuel Vadot regulator-min-microvolt = <1500000>; 88*f126890aSEmmanuel Vadot regulator-max-microvolt = <1500000>; 89*f126890aSEmmanuel Vadot regulator-always-on; 90*f126890aSEmmanuel Vadot regulator-boot-on; 91*f126890aSEmmanuel Vadot vin-supply = <®_vcc5v0>; 92*f126890aSEmmanuel Vadot gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */ 93*f126890aSEmmanuel Vadot enable-active-high; 94*f126890aSEmmanuel Vadot }; 95*f126890aSEmmanuel Vadot 96*f126890aSEmmanuel Vadot reg_vcc_io: vcc-io { 97*f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 98*f126890aSEmmanuel Vadot regulator-name = "vcc-io"; 99*f126890aSEmmanuel Vadot regulator-min-microvolt = <3300000>; 100*f126890aSEmmanuel Vadot regulator-max-microvolt = <3300000>; 101*f126890aSEmmanuel Vadot regulator-always-on; 102*f126890aSEmmanuel Vadot regulator-boot-on; 103*f126890aSEmmanuel Vadot vin-supply = <®_vcc3v3>; 104*f126890aSEmmanuel Vadot gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */ 105*f126890aSEmmanuel Vadot }; 106*f126890aSEmmanuel Vadot 107*f126890aSEmmanuel Vadot reg_vdd_cpux: vdd-cpux { 108*f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 109*f126890aSEmmanuel Vadot regulator-name = "vdd-cpux"; 110*f126890aSEmmanuel Vadot regulator-min-microvolt = <1200000>; 111*f126890aSEmmanuel Vadot regulator-max-microvolt = <1200000>; 112*f126890aSEmmanuel Vadot regulator-always-on; 113*f126890aSEmmanuel Vadot regulator-boot-on; 114*f126890aSEmmanuel Vadot vin-supply = <®_vcc5v0>; 115*f126890aSEmmanuel Vadot gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ 116*f126890aSEmmanuel Vadot enable-active-high; 117*f126890aSEmmanuel Vadot }; 118*f126890aSEmmanuel Vadot}; 119*f126890aSEmmanuel Vadot 120*f126890aSEmmanuel Vadot&codec { 121*f126890aSEmmanuel Vadot allwinner,audio-routing = 122*f126890aSEmmanuel Vadot "Line Out", "LINEOUT", 123*f126890aSEmmanuel Vadot "MIC1", "Mic", 124*f126890aSEmmanuel Vadot "Mic", "MBIAS"; 125*f126890aSEmmanuel Vadot status = "okay"; 126*f126890aSEmmanuel Vadot}; 127*f126890aSEmmanuel Vadot 128*f126890aSEmmanuel Vadot&cpu0 { 129*f126890aSEmmanuel Vadot cpu-supply = <®_vdd_cpux>; 130*f126890aSEmmanuel Vadot}; 131*f126890aSEmmanuel Vadot 132*f126890aSEmmanuel Vadot&cpu1 { 133*f126890aSEmmanuel Vadot cpu-supply = <®_vdd_cpux>; 134*f126890aSEmmanuel Vadot}; 135*f126890aSEmmanuel Vadot 136*f126890aSEmmanuel Vadot&cpu2 { 137*f126890aSEmmanuel Vadot cpu-supply = <®_vdd_cpux>; 138*f126890aSEmmanuel Vadot}; 139*f126890aSEmmanuel Vadot 140*f126890aSEmmanuel Vadot&cpu3 { 141*f126890aSEmmanuel Vadot cpu-supply = <®_vdd_cpux>; 142*f126890aSEmmanuel Vadot}; 143*f126890aSEmmanuel Vadot 144*f126890aSEmmanuel Vadot&de { 145*f126890aSEmmanuel Vadot status = "okay"; 146*f126890aSEmmanuel Vadot}; 147*f126890aSEmmanuel Vadot 148*f126890aSEmmanuel Vadot&ehci0 { 149*f126890aSEmmanuel Vadot status = "okay"; 150*f126890aSEmmanuel Vadot}; 151*f126890aSEmmanuel Vadot 152*f126890aSEmmanuel Vadot&ehci1 { 153*f126890aSEmmanuel Vadot status = "okay"; 154*f126890aSEmmanuel Vadot}; 155*f126890aSEmmanuel Vadot 156*f126890aSEmmanuel Vadot&ehci2 { 157*f126890aSEmmanuel Vadot status = "okay"; 158*f126890aSEmmanuel Vadot}; 159*f126890aSEmmanuel Vadot 160*f126890aSEmmanuel Vadot&ehci3 { 161*f126890aSEmmanuel Vadot status = "okay"; 162*f126890aSEmmanuel Vadot}; 163*f126890aSEmmanuel Vadot 164*f126890aSEmmanuel Vadot&emac { 165*f126890aSEmmanuel Vadot phy-handle = <&int_mii_phy>; 166*f126890aSEmmanuel Vadot phy-mode = "mii"; 167*f126890aSEmmanuel Vadot allwinner,leds-active-low; 168*f126890aSEmmanuel Vadot status = "okay"; 169*f126890aSEmmanuel Vadot}; 170*f126890aSEmmanuel Vadot 171*f126890aSEmmanuel Vadot&hdmi { 172*f126890aSEmmanuel Vadot status = "okay"; 173*f126890aSEmmanuel Vadot}; 174*f126890aSEmmanuel Vadot 175*f126890aSEmmanuel Vadot&hdmi_out { 176*f126890aSEmmanuel Vadot hdmi_out_con: endpoint { 177*f126890aSEmmanuel Vadot remote-endpoint = <&hdmi_con_in>; 178*f126890aSEmmanuel Vadot }; 179*f126890aSEmmanuel Vadot}; 180*f126890aSEmmanuel Vadot 181*f126890aSEmmanuel Vadot&ir { 182*f126890aSEmmanuel Vadot pinctrl-names = "default"; 183*f126890aSEmmanuel Vadot pinctrl-0 = <&r_ir_rx_pin>; 184*f126890aSEmmanuel Vadot status = "okay"; 185*f126890aSEmmanuel Vadot}; 186*f126890aSEmmanuel Vadot 187*f126890aSEmmanuel Vadot&mmc0 { 188*f126890aSEmmanuel Vadot vmmc-supply = <®_vcc_io>; 189*f126890aSEmmanuel Vadot bus-width = <4>; 190*f126890aSEmmanuel Vadot cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 191*f126890aSEmmanuel Vadot status = "okay"; 192*f126890aSEmmanuel Vadot}; 193*f126890aSEmmanuel Vadot 194*f126890aSEmmanuel Vadot&mmc2 { 195*f126890aSEmmanuel Vadot pinctrl-names = "default"; 196*f126890aSEmmanuel Vadot pinctrl-0 = <&mmc2_8bit_pins>; 197*f126890aSEmmanuel Vadot vmmc-supply = <®_vcc_io>; 198*f126890aSEmmanuel Vadot bus-width = <8>; 199*f126890aSEmmanuel Vadot non-removable; 200*f126890aSEmmanuel Vadot status = "okay"; 201*f126890aSEmmanuel Vadot}; 202*f126890aSEmmanuel Vadot 203*f126890aSEmmanuel Vadot&ohci0 { 204*f126890aSEmmanuel Vadot status = "okay"; 205*f126890aSEmmanuel Vadot}; 206*f126890aSEmmanuel Vadot 207*f126890aSEmmanuel Vadot&ohci1 { 208*f126890aSEmmanuel Vadot status = "okay"; 209*f126890aSEmmanuel Vadot}; 210*f126890aSEmmanuel Vadot 211*f126890aSEmmanuel Vadot&ohci2 { 212*f126890aSEmmanuel Vadot status = "okay"; 213*f126890aSEmmanuel Vadot}; 214*f126890aSEmmanuel Vadot 215*f126890aSEmmanuel Vadot&ohci3 { 216*f126890aSEmmanuel Vadot status = "okay"; 217*f126890aSEmmanuel Vadot}; 218*f126890aSEmmanuel Vadot 219*f126890aSEmmanuel Vadot&uart0 { 220*f126890aSEmmanuel Vadot pinctrl-names = "default"; 221*f126890aSEmmanuel Vadot pinctrl-0 = <&uart0_pa_pins>; 222*f126890aSEmmanuel Vadot status = "okay"; 223*f126890aSEmmanuel Vadot}; 224*f126890aSEmmanuel Vadot 225*f126890aSEmmanuel Vadot&usb_otg { 226*f126890aSEmmanuel Vadot dr_mode = "host"; 227*f126890aSEmmanuel Vadot status = "okay"; 228*f126890aSEmmanuel Vadot}; 229*f126890aSEmmanuel Vadot 230*f126890aSEmmanuel Vadot&usbphy { 231*f126890aSEmmanuel Vadot /* VBUS on USB ports are always on */ 232*f126890aSEmmanuel Vadot usb0_vbus-supply = <®_vcc5v0>; 233*f126890aSEmmanuel Vadot usb1_vbus-supply = <®_vcc5v0>; 234*f126890aSEmmanuel Vadot usb2_vbus-supply = <®_vcc5v0>; 235*f126890aSEmmanuel Vadot usb3_vbus-supply = <®_vcc5v0>; 236*f126890aSEmmanuel Vadot status = "okay"; 237*f126890aSEmmanuel Vadot}; 238