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