hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/arch/arm/boot/dts/meson8b-mxq.dts
....@@ -1,50 +1,13 @@
1
+// SPDX-License-Identifier: GPL-2.0 OR MIT
12 /*
23 * Copyright 2015 Endless Mobile, Inc.
34 * Author: Carlo Caione <carlo@endlessm.com>
4
- *
5
- * This file is dual-licensed: you can use it either under the terms
6
- * of the GPL or the X11 license, at your option. Note that this dual
7
- * licensing only applies to this file, and not this project as a
8
- * whole.
9
- *
10
- * a) This library is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU General Public License as
12
- * published by the Free Software Foundation; either version 2 of the
13
- * License, or (at your option) any later version.
14
- *
15
- * This library is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- * GNU General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU General Public License
21
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
22
- *
23
- * Or, alternatively,
24
- *
25
- * b) Permission is hereby granted, free of charge, to any person
26
- * obtaining a copy of this software and associated documentation
27
- * files (the "Software"), to deal in the Software without
28
- * restriction, including without limitation the rights to use,
29
- * copy, modify, merge, publish, distribute, sublicense, and/or
30
- * sell copies of the Software, and to permit persons to whom the
31
- * Software is furnished to do so, subject to the following
32
- * conditions:
33
- *
34
- * The above copyright notice and this permission notice shall be
35
- * included in all copies or substantial portions of the Software.
36
- *
37
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
42
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44
- * OTHER DEALINGS IN THE SOFTWARE.
455 */
466
477 /dts-v1/;
8
+
9
+#include <dt-bindings/gpio/gpio.h>
10
+
4811 #include "meson8b.dtsi"
4912
5013 / {
....@@ -55,9 +18,157 @@
5518 serial0 = &uart_AO;
5619 };
5720
21
+ chosen {
22
+ stdout-path = "serial0:115200n8";
23
+ };
24
+
5825 memory {
26
+ device_type = "memory";
5927 reg = <0x40000000 0x40000000>;
6028 };
29
+
30
+ iio-hwmon {
31
+ compatible = "iio-hwmon";
32
+ io-channels = <&saradc 8>;
33
+ };
34
+
35
+ vcck: regulator-vcck {
36
+ compatible = "pwm-regulator";
37
+
38
+ regulator-name = "VCCK";
39
+ regulator-min-microvolt = <860000>;
40
+ regulator-max-microvolt = <1140000>;
41
+
42
+ pwm-supply = <&vcc_5v>;
43
+
44
+ pwms = <&pwm_cd 0 1148 0>;
45
+ pwm-dutycycle-range = <100 0>;
46
+
47
+ regulator-boot-on;
48
+ regulator-always-on;
49
+ };
50
+
51
+ vcc_1v8: regulator-vcc1v8 {
52
+ compatible = "regulator-fixed";
53
+
54
+ regulator-name = "VCC1V8";
55
+ regulator-min-microvolt = <1800000>;
56
+ regulator-max-microvolt = <1800000>;
57
+
58
+ vin-supply = <&vcc_3v3>;
59
+ };
60
+
61
+ vcc_3v3: regulator-vcc3v3 {
62
+ compatible = "regulator-fixed";
63
+
64
+ regulator-name = "VCC3V3";
65
+ regulator-min-microvolt = <3300000>;
66
+ regulator-max-microvolt = <3300000>;
67
+
68
+ vin-supply = <&vcc_5v>;
69
+ };
70
+
71
+ vcc_5v: regulator-vcc5v {
72
+ compatible = "regulator-fixed";
73
+
74
+ regulator-name = "VCC5V";
75
+ regulator-min-microvolt = <5000000>;
76
+ regulator-max-microvolt = <5000000>;
77
+
78
+ regulator-boot-on;
79
+ regulator-always-on;
80
+ };
81
+
82
+ vddee: regulator-vddee {
83
+ compatible = "pwm-regulator";
84
+
85
+ regulator-name = "VDDEE";
86
+ regulator-min-microvolt = <860000>;
87
+ regulator-max-microvolt = <1140000>;
88
+
89
+ pwm-supply = <&vcc_5v>;
90
+
91
+ pwms = <&pwm_cd 1 1148 0>;
92
+ pwm-dutycycle-range = <100 0>;
93
+
94
+ regulator-boot-on;
95
+ regulator-always-on;
96
+ };
97
+};
98
+
99
+&cpu0 {
100
+ cpu-supply = <&vcck>;
101
+};
102
+
103
+&ethmac {
104
+ status = "okay";
105
+
106
+ pinctrl-0 = <&eth_rmii_pins>;
107
+ pinctrl-names = "default";
108
+
109
+ phy-handle = <&eth_phy0>;
110
+ phy-mode = "rmii";
111
+
112
+ mdio {
113
+ compatible = "snps,dwmac-mdio";
114
+ #address-cells = <1>;
115
+ #size-cells = <0>;
116
+
117
+ eth_phy0: ethernet-phy@0 {
118
+ /* IC Plus IP101A/G (0x02430c54) */
119
+ reg = <0>;
120
+
121
+ reset-assert-us = <10000>;
122
+ reset-deassert-us = <10000>;
123
+ reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
124
+
125
+ icplus,select-interrupt;
126
+ interrupt-parent = <&gpio_intc>;
127
+ /* GPIOH_3 */
128
+ interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
129
+ };
130
+ };
131
+};
132
+
133
+&mali {
134
+ mali-supply = <&vddee>;
135
+};
136
+
137
+&saradc {
138
+ status = "okay";
139
+ vref-supply = <&vcc_1v8>;
140
+};
141
+
142
+&sdio {
143
+ status = "okay";
144
+
145
+ pinctrl-0 = <&sd_b_pins>;
146
+ pinctrl-names = "default";
147
+
148
+ /* SD card */
149
+ sd_card_slot: slot@1 {
150
+ compatible = "mmc-slot";
151
+ reg = <1>;
152
+ status = "okay";
153
+
154
+ bus-width = <4>;
155
+ no-sdio;
156
+ cap-mmc-highspeed;
157
+ cap-sd-highspeed;
158
+ disable-wp;
159
+
160
+ cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
161
+
162
+ vmmc-supply = <&vcc_3v3>;
163
+ };
164
+};
165
+
166
+&pwm_cd {
167
+ status = "okay";
168
+ pinctrl-0 = <&pwm_c1_pins>, <&pwm_d_pins>;
169
+ pinctrl-names = "default";
170
+ clocks = <&xtal>, <&xtal>;
171
+ clock-names = "clkin0", "clkin1";
61172 };
62173
63174 &uart_AO {
....@@ -65,3 +176,19 @@
65176 pinctrl-0 = <&uart_ao_a_pins>;
66177 pinctrl-names = "default";
67178 };
179
+
180
+&usb0 {
181
+ status = "okay";
182
+};
183
+
184
+&usb0_phy {
185
+ status = "okay";
186
+};
187
+
188
+&usb1 {
189
+ status = "okay";
190
+};
191
+
192
+&usb1_phy {
193
+ status = "okay";
194
+};