blob: 111707cfa2af247119ea54197447d9151d19c9eb [file] [log] [blame]
Chen-Yu Tsai92b32352018-04-28 13:36:01 +08001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
4 */
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/input/input.h>
8
9/ {
10 aliases {
11 ethernet0 = &emac;
12 serial0 = &uart0;
13 };
14
15 chosen {
16 stdout-path = "serial0:115200n8";
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 pwr_led {
23 label = "librecomputer:green:pwr";
24 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
25 default-state = "on";
26 };
27
28 status_led {
29 label = "librecomputer:blue:status";
30 gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
31 };
32 };
33
34 gpio_keys {
35 compatible = "gpio-keys";
36
37 power {
38 label = "power";
39 linux,code = <KEY_POWER>;
40 gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
41 };
42 };
43
44 reg_vcc1v2: vcc1v2 {
45 compatible = "regulator-fixed";
46 regulator-name = "vcc1v2";
47 regulator-min-microvolt = <3300000>;
48 regulator-max-microvolt = <3300000>;
49 regulator-always-on;
50 regulator-boot-on;
51 vin-supply = <&reg_vcc5v0>;
52 gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
53 enable-active-high;
54 };
55
56 reg_vcc3v3: vcc3v3 {
57 compatible = "regulator-fixed";
58 regulator-name = "vcc3v3";
59 regulator-min-microvolt = <3300000>;
60 regulator-max-microvolt = <3300000>;
61 vin-supply = <&reg_vcc5v0>;
62 };
63
64 /* This represents the board's 5V input */
65 reg_vcc5v0: vcc5v0 {
66 compatible = "regulator-fixed";
67 regulator-name = "vcc5v0";
68 regulator-min-microvolt = <5000000>;
69 regulator-max-microvolt = <5000000>;
70 };
71
72 reg_vcc_dram: vcc-dram {
73 compatible = "regulator-fixed";
74 regulator-name = "vcc-dram";
75 regulator-min-microvolt = <1500000>;
76 regulator-max-microvolt = <1500000>;
77 regulator-always-on;
78 regulator-boot-on;
79 vin-supply = <&reg_vcc5v0>;
80 gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
81 enable-active-high;
82 };
83
84 reg_vcc_io: vcc-io {
85 compatible = "regulator-fixed";
86 regulator-name = "vcc-io";
87 regulator-min-microvolt = <3300000>;
88 regulator-max-microvolt = <3300000>;
89 regulator-always-on;
90 regulator-boot-on;
91 vin-supply = <&reg_vcc3v3>;
92 gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
93 };
94
95 reg_vdd_cpux: vdd-cpux {
96 compatible = "regulator-fixed";
97 regulator-name = "vdd-cpux";
98 regulator-min-microvolt = <3300000>;
99 regulator-max-microvolt = <3300000>;
100 regulator-always-on;
101 regulator-boot-on;
102 vin-supply = <&reg_vcc5v0>;
103 gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
104 enable-active-high;
105 };
106};
107
108&ehci1 {
109 status = "okay";
110};
111
112&ehci2 {
113 status = "okay";
114};
115
116&ehci3 {
117 status = "okay";
118};
119
120&emac {
121 phy-handle = <&int_mii_phy>;
122 phy-mode = "mii";
123 allwinner,leds-active-low;
124 status = "okay";
125};
126
127&ir {
128 pinctrl-names = "default";
129 pinctrl-0 = <&ir_pins_a>;
130 status = "okay";
131};
132
133&mmc0 {
Chen-Yu Tsai92b32352018-04-28 13:36:01 +0800134 vmmc-supply = <&reg_vcc_io>;
135 bus-width = <4>;
136 cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
137 cd-inverted;
138 status = "okay";
139};
140
141&ohci1 {
142 status = "okay";
143};
144
145&ohci2 {
146 status = "okay";
147};
148
149&ohci3 {
150 status = "okay";
151};
152
153&uart0 {
154 pinctrl-names = "default";
155 pinctrl-0 = <&uart0_pins_a>;
156 status = "okay";
157};
158
159&usbphy {
160 /* VBUS on USB ports are always on */
161 usb0_vbus-supply = <&reg_vcc5v0>;
162 usb1_vbus-supply = <&reg_vcc5v0>;
163 usb2_vbus-supply = <&reg_vcc5v0>;
164 usb3_vbus-supply = <&reg_vcc5v0>;
165 status = "okay";
166};