Loading...
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * OLPC XO 1.75 Laptop.
4 *
5 * Copyright (C) 2018,2019,2020 Lubomir Rintel <lkundrak@v3.sk>
6 */
7
8/dts-v1/;
9#include "mmp2.dtsi"
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/input/linux-event-codes.h>
12#include <dt-bindings/interrupt-controller/irq.h>
13#include <dt-bindings/clock/marvell,mmp2-audio.h>
14
15/ {
16 model = "OLPC XO-1.75";
17 compatible = "olpc,xo-1.75", "mrvl,mmp2";
18
19 chosen {
20 #address-cells = <1>;
21 #size-cells = <1>;
22 ranges;
23
24 framebuffer@1fc00000 {
25 compatible = "simple-framebuffer";
26 reg = <0x1fc00000 (1200 * 900 * 2)>;
27 width = <1200>;
28 height = <900>;
29 stride = <(1200 * 2)>;
30 format = "r5g6b5";
31 clocks = <&soc_clocks MMP2_CLK_DISP0_LCDC>,
32 <&soc_clocks MMP2_CLK_DISP0>;
33 };
34 };
35
36 memory@0 {
37 available = <0xcf000 0x1ef31000 0x1000 0xbf000>;
38 reg = <0x0 0x20000000>;
39 device_type = "memory";
40 };
41
42 gpio-keys {
43 compatible = "gpio-keys";
44
45 lid {
46 label = "Lid";
47 gpios = <&gpio 129 GPIO_ACTIVE_LOW>;
48 linux,input-type = <EV_SW>;
49 linux,code = <SW_LID>;
50 wakeup-source;
51 };
52
53 tablet_mode {
54 label = "E-Book Mode";
55 gpios = <&gpio 128 GPIO_ACTIVE_LOW>;
56 linux,input-type = <EV_SW>;
57 linux,code = <SW_TABLET_MODE>;
58 wakeup-source;
59 };
60 };
61
62 i2c {
63 compatible = "i2c-gpio";
64 sda-gpios = <&gpio 109 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
65 scl-gpios = <&gpio 108 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
66 #address-cells = <1>;
67 #size-cells = <0>;
68 i2c-gpio,timeout-ms = <1000>;
69 status = "okay";
70
71 camera@21 {
72 compatible = "ovti,ov7670";
73 reg = <0x21>;
74 reset-gpios = <&gpio 102 GPIO_ACTIVE_LOW>;
75 powerdown-gpios = <&gpio 150 GPIO_ACTIVE_LOW>;
76 clocks = <&camera0>;
77 clock-names = "xclk";
78
79 port {
80 ov7670_0: endpoint {
81 hsync-active = <1>;
82 vsync-active = <1>;
83 remote-endpoint = <&camera0_0>;
84 };
85 };
86 };
87 };
88
89 battery {
90 compatible = "olpc,xo1.5-battery", "olpc,xo1-battery";
91 };
92
93 wlan_reg: fixedregulator0 {
94 compatible = "regulator-fixed";
95 regulator-name = "wlan";
96 regulator-min-microvolt = <3300000>;
97 regulator-max-microvolt = <3300000>;
98 gpio = <&gpio 34 GPIO_ACTIVE_HIGH>;
99 enable-active-high;
100 };
101
102 wlan_pwrseq: pwrseq0 {
103 compatible = "mmc-pwrseq-sd8787";
104 powerdown-gpios = <&gpio 57 GPIO_ACTIVE_HIGH>;
105 reset-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>;
106 };
107
108 sound-card {
109 compatible = "audio-graph-card";
110 label = "OLPC XO";
111 dais = <&sspa0_dai>;
112 routing = "Headphones", "HPOL",
113 "Headphones", "HPOR",
114 "MIC2", "Mic Jack";
115 widgets = "Headphone", "Headphones", "Microphone", "Mic Jack";
116 hp-det-gpio = <&gpio 97 GPIO_ACTIVE_HIGH>;
117 mic-det-gpio = <&gpio 96 GPIO_ACTIVE_HIGH>;
118 };
119
120 soc {
121 axi@d4200000 {
122 ap-sp@d4290000 {
123 #address-cells = <1>;
124 #size-cells = <0>;
125 compatible = "olpc,ap-sp";
126 interrupts = <40>;
127 reg = <0xd4290000 0x1000>;
128 data-gpios = <&gpio 72 GPIO_ACTIVE_HIGH>;
129 clk-gpios = <&gpio 71 GPIO_ACTIVE_HIGH>;
130 status = "okay";
131 };
132 };
133 };
134};
135
136&uart3 {
137 status = "okay";
138};
139
140&uart4 {
141 status = "okay";
142};
143
144&rtc {
145 status = "okay";
146};
147
148&usb_phy0 {
149 status = "okay";
150};
151
152&usb_otg0 {
153 status = "okay";
154};
155
156&mmc1 {
157 clock-frequency = <50000000>;
158 no-1-8-v;
159 mrvl,clk-delay-cycles = <31>;
160 broken-cd;
161 status = "okay";
162};
163
164&mmc2 {
165 clock-frequency = <50000000>;
166 no-1-8-v;
167 bus-width = <4>;
168 non-removable;
169 broken-cd;
170 wakeup-source;
171 keep-power-in-suspend;
172 mmc-pwrseq = <&wlan_pwrseq>;
173 vmmc-supply = <&wlan_reg>;
174 status = "okay";
175};
176
177&mmc3 {
178 clock-frequency = <50000000>;
179 no-1-8-v;
180 bus-width = <8>;
181 non-removable;
182 broken-cd;
183 mrvl,clk-delay-cycles = <31>;
184 status = "okay";
185};
186
187&twsi1 {
188 status = "okay";
189
190 audio-codec@1a {
191 compatible = "realtek,alc5631";
192 reg = <0x1a>;
193 status = "okay";
194
195 port {
196 rt5631_0: endpoint {
197 mclk-fs = <256>;
198 clocks = <&audio_clk MMP2_CLK_AUDIO_SYSCLK>;
199 remote-endpoint = <&sspa0_0>;
200 };
201 };
202 };
203};
204
205&twsi2 {
206 status = "okay";
207
208 rtc@68 {
209 compatible = "dallas,ds1338";
210 reg = <0x68>;
211 status = "okay";
212 };
213};
214
215&twsi6 {
216 status = "okay";
217
218 accelerometer@1d {
219 compatible = "st,lis331dlh", "st,lis3lv02d";
220 reg = <0x1d>;
221 status = "okay";
222 };
223};
224
225&ssp3 {
226 #address-cells = <0>;
227 spi-slave;
228 status = "okay";
229 ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;
230
231 slave {
232 compatible = "olpc,xo1.75-ec";
233 spi-cpha;
234 cmd-gpios = <&gpio 155 GPIO_ACTIVE_HIGH>;
235 };
236};
237
238&camera0 {
239 status = "okay";
240
241 port {
242 camera0_0: endpoint {
243 remote-endpoint = <&ov7670_0>;
244 };
245 };
246};
247
248&asram {
249 status = "okay";
250};
251
252&adma0 {
253 status = "okay";
254};
255
256&audio_clk {
257 status = "okay";
258};
259
260&sspa0 {
261 status = "okay";
262 dmas = <&adma0 0>, <&adma0 1>;
263 dma-names = "tx", "rx";
264
265 sspa0_dai: port {
266 sspa0_0: endpoint {
267 remote-endpoint = <&rt5631_0>;
268 frame-master;
269 bitclock-master;
270 dai-format = "i2s";
271 };
272 };
273};
274
275&gpu {
276 status = "okay";
277};
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * OLPC XO 1.75 Laptop.
4 *
5 * Copyright (C) 2018,2019 Lubomir Rintel <lkundrak@v3.sk>
6 */
7
8/dts-v1/;
9#include "mmp2.dtsi"
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/input/linux-event-codes.h>
12#include <dt-bindings/interrupt-controller/irq.h>
13
14/ {
15 model = "OLPC XO-1.75";
16 compatible = "olpc,xo-1.75", "mrvl,mmp2";
17
18 chosen {
19 #address-cells = <1>;
20 #size-cells = <1>;
21 ranges;
22
23 framebuffer@1fc00000 {
24 compatible = "simple-framebuffer";
25 reg = <0x1fc00000 (1200 * 900 * 2)>;
26 width = <1200>;
27 height = <900>;
28 stride = <(1200 * 2)>;
29 format = "r5g6b5";
30 clocks = <&soc_clocks MMP2_CLK_DISP0_LCDC>,
31 <&soc_clocks MMP2_CLK_DISP0>;
32 };
33 };
34
35 memory {
36 linux,usable-memory = <0x0 0x1f800000>;
37 available = <0xcf000 0x1ef31000 0x1000 0xbf000>;
38 reg = <0x0 0x20000000>;
39 device_type = "memory";
40 };
41
42 gpio-keys {
43 compatible = "gpio-keys";
44
45 lid {
46 label = "Lid";
47 gpios = <&gpio 129 GPIO_ACTIVE_LOW>;
48 linux,input-type = <EV_SW>;
49 linux,code = <SW_LID>;
50 wakeup-source;
51 };
52
53 tablet_mode {
54 label = "E-Book Mode";
55 gpios = <&gpio 128 GPIO_ACTIVE_LOW>;
56 linux,input-type = <EV_SW>;
57 linux,code = <SW_TABLET_MODE>;
58 wakeup-source;
59 };
60
61 microphone_insert {
62 label = "Microphone Plug";
63 gpios = <&gpio 96 GPIO_ACTIVE_HIGH>;
64 linux,input-type = <EV_SW>;
65 linux,code = <SW_MICROPHONE_INSERT>;
66 debounce-interval = <100>;
67 wakeup-source;
68 };
69
70 headphone_insert {
71 label = "Headphone Plug";
72 gpios = <&gpio 97 GPIO_ACTIVE_HIGH>;
73 linux,input-type = <EV_SW>;
74 linux,code = <SW_HEADPHONE_INSERT>;
75 debounce-interval = <100>;
76 wakeup-source;
77 };
78 };
79
80 camera_i2c {
81 compatible = "i2c-gpio";
82 gpios = <&gpio 109 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>,
83 <&gpio 108 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
84 #address-cells = <1>;
85 #size-cells = <0>;
86 i2c-gpio,timeout-ms = <1000>;
87 status = "okay";
88
89 camera@21 {
90 compatible = "ovti,ov7670";
91 reg = <0x21>;
92 reset-gpios = <&gpio 102 GPIO_ACTIVE_LOW>;
93 powerdown-gpios = <&gpio 150 GPIO_ACTIVE_LOW>;
94 clocks = <&camera0>;
95 clock-names = "xclk";
96
97 port {
98 ov7670_0: endpoint {
99 hsync-active = <1>;
100 vsync-active = <1>;
101 remote-endpoint = <&camera0_0>;
102 };
103 };
104 };
105 };
106
107 battery {
108 compatible = "olpc,xo1.5-battery", "olpc,xo1-battery";
109 };
110
111 wlan_reg: fixedregulator0 {
112 compatible = "regulator-fixed";
113 regulator-name = "wlan";
114 regulator-min-microvolt = <3300000>;
115 regulator-max-microvolt = <3300000>;
116 gpio = <&gpio 34 GPIO_ACTIVE_HIGH>;
117 enable-active-high;
118 };
119
120 wlan_pwrseq: pwrseq0 {
121 compatible = "mmc-pwrseq-sd8787";
122 powerdown-gpios = <&gpio 57 GPIO_ACTIVE_HIGH>;
123 reset-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>;
124 };
125
126 soc {
127 axi@d4200000 {
128 ap-sp@d4290000 {
129 #address-cells = <1>;
130 #size-cells = <0>;
131 compatible = "olpc,ap-sp";
132 interrupts = <40>;
133 reg = <0xd4290000 0x1000>;
134 data-gpios = <&gpio 72 GPIO_ACTIVE_HIGH>;
135 clk-gpios = <&gpio 71 GPIO_ACTIVE_HIGH>;
136 status = "okay";
137 };
138 };
139 };
140};
141
142&uart3 {
143 status = "okay";
144};
145
146&uart4 {
147 status = "okay";
148};
149
150&rtc {
151 status = "okay";
152};
153
154&usb_phy0 {
155 status = "okay";
156};
157
158&usb_otg0 {
159 status = "okay";
160};
161
162&mmc1 {
163 clock-frequency = <50000000>;
164 no-1-8-v;
165 mrvl,clk-delay-cycles = <31>;
166 broken-cd;
167 status = "okay";
168};
169
170&mmc2 {
171 clock-frequency = <50000000>;
172 no-1-8-v;
173 bus-width = <4>;
174 non-removable;
175 broken-cd;
176 wakeup-source;
177 keep-power-in-suspend;
178 mmc-pwrseq = <&wlan_pwrseq>;
179 vmmc-supply = <&wlan_reg>;
180 status = "okay";
181};
182
183&mmc3 {
184 clock-frequency = <50000000>;
185 no-1-8-v;
186 bus-width = <8>;
187 non-removable;
188 broken-cd;
189 mrvl,clk-delay-cycles = <31>;
190 status = "okay";
191};
192
193&twsi1 {
194 status = "okay";
195
196 audio-codec@1a {
197 compatible = "realtek,alc5631";
198 reg = <0x1a>;
199 status = "okay";
200 };
201};
202
203&twsi2 {
204 status = "okay";
205
206 rtc@68 {
207 compatible = "dallas,ds1338";
208 reg = <0x68>;
209 status = "okay";
210 };
211};
212
213&twsi6 {
214 status = "okay";
215
216 accelerometer@1d {
217 compatible = "st,lis331dlh", "st,lis3lv02d";
218 reg = <0x1d>;
219 status = "okay";
220 };
221};
222
223&ssp3 {
224 #address-cells = <0>;
225 spi-slave;
226 status = "okay";
227 ready-gpio = <&gpio 125 GPIO_ACTIVE_HIGH>;
228
229 slave {
230 compatible = "olpc,xo1.75-ec";
231 spi-cpha;
232 cmd-gpio = <&gpio 155 GPIO_ACTIVE_HIGH>;
233 };
234};
235
236&camera0 {
237 status = "okay";
238
239 port {
240 camera0_0: endpoint {
241 remote-endpoint = <&ov7670_0>;
242 };
243 };
244};