xref: /linux/arch/arm/boot/dts/intel/pxa/pxa300-raumfeld-common.dtsi (revision ae22a94997b8a03dcb3c922857c203246711f9d4)
1// SPDX-License-Identifier: GPL-2.0
2
3#include "pxa3xx.dtsi"
4#include <dt-bindings/gpio/gpio.h>
5#include <dt-bindings/input/input.h>
6#include <dt-bindings/interrupt-controller/irq.h>
7
8/ {
9	/* Will be overridden by bootloader */
10	hw-revision = <0>;
11
12	chosen {
13		bootargs = "root=ubi0:RootFS rootfstype=ubifs rw ubi.mtd=3";
14		stdout-path = &ffuart;
15	};
16
17	memory {
18		device_type = "memory";
19		reg = <0xa0000000 0x8000000>;	/* 128 MB */
20	};
21
22	reg_3v3: regulator-3v3 {
23		compatible = "regulator-fixed";
24		regulator-name = "3v3-fixed-supply";
25		regulator-min-microvolt = <3300000>;
26		regulator-max-microvolt = <3300000>;
27		regulator-always-on;
28	};
29
30	reg_1v8: regulator-1v8 {
31		compatible = "regulator-fixed";
32		regulator-name = "1v8-fixed-supply";
33		regulator-min-microvolt = <1800000>;
34		regulator-max-microvolt = <1800000>;
35		regulator-always-on;
36	};
37
38	reg_va_5v0: regulator-va-5v0 {
39		compatible = "regulator-fixed";
40		regulator-name = "va-5v0-fixed-supply";
41		regulator-min-microvolt = <5000000>;
42		regulator-max-microvolt = <5000000>;
43		gpio = <&gpio 124 GPIO_ACTIVE_HIGH>;
44		enable-active-high;
45	};
46
47	ssp_dai0: ssp-dai0 {
48		compatible = "mrvl,pxa-ssp-dai";
49		pinctrl-names = "default";
50		pinctrl-0 = <&ssp0_dai_pins>;
51		port = <&ssp1>;
52		#sound-dai-cells = <0>;
53		dmas = <&pdma 13 3
54			&pdma 14 3>;
55		dma-names = "rx", "tx";
56		clock-names = "extclk";
57	};
58
59	ssp_dai1: ssp-dai1 {
60		compatible = "mrvl,pxa-ssp-dai";
61		pinctrl-names = "default";
62		pinctrl-0 = <&ssp1_dai_pins>;
63		port = <&ssp2>;
64		#sound-dai-cells = <0>;
65		dmas = <&pdma 15 3
66			&pdma 16 3>;
67		dma-names = "rx", "tx";
68		clock-names = "extclk";
69	};
70
71	spi: spi {
72		compatible = "spi-gpio";
73		#address-cells = <0x1>;
74		#size-cells = <0>;
75		pinctrl-names = "default";
76		pinctrl-0 = <&spi_pins>;
77		gpio-sck = <&gpio 95 GPIO_ACTIVE_HIGH>;
78		gpio-miso = <&gpio 98 GPIO_ACTIVE_HIGH>;
79		gpio-mosi = <&gpio 97 GPIO_ACTIVE_HIGH>;
80		cs-gpios = <
81			&gpio 34 GPIO_ACTIVE_HIGH
82			&gpio 125 GPIO_ACTIVE_HIGH
83			&gpio 96 GPIO_ACTIVE_HIGH
84		>;
85		num-chipselects = <3>;
86
87		dac: dac@2 {
88			compatible = "ti,dac7512";
89			reg = <2>;
90			spi-max-frequency = <1000000>;
91			vcc-supply = <&reg_3v3>;
92		};
93	};
94
95	keys: gpio-keys {
96		compatible = "gpio-keys";
97		pinctrl-names = "default";
98		pinctrl-0 = <&gpio_keys_pins>;
99
100		on-off {
101			label = "on_off button";
102			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
103			linux,code = <KEY_F6>;
104		};
105
106		rescue-boot {
107			label = "rescue boot button";
108			gpios = <&gpio 115 GPIO_ACTIVE_HIGH>;
109			linux,code = <KEY_F4>;
110		};
111
112		setup {
113			label = "setup";
114			gpios = <&gpio 119 GPIO_ACTIVE_HIGH>;
115			linux,code = <KEY_F3>;
116		};
117	};
118
119	rotary: rotary-encoder {
120		compatible = "rotary-encoder";
121		gpios = <
122			&gpio 19 GPIO_ACTIVE_LOW
123			&gpio 20 GPIO_ACTIVE_HIGH
124		>;
125		linux,axis = <REL_X>;
126		rotary-encoder,relative-axis;
127	};
128
129	leds: leds {
130		compatible = "gpio-leds";
131		pinctrl-names = "default";
132		pinctrl-0 = <&led_pins_a &led_pins_b>;
133
134		left {
135			label = "raumfeld:1";
136			gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
137		};
138
139		right {
140			label = "raumfeld:2";
141			gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
142		};
143	};
144
145	poweroff {
146		compatible = "gpio-poweroff";
147		pinctrl-names = "default";
148		pinctrl-0 = <&poweroff_pins>;
149		gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
150	};
151
152	mmc0_pwrseq: mmc-pwrseq {
153		compatible = "mmc-pwrseq-simple";
154		pinctrl-names = "default";
155		pinctrl-0 = <&mmc0_pwrseq_pins>;
156		reset-gpios = <
157			&gpio 113 GPIO_ACTIVE_LOW	/* W2W_RESET	*/
158			&gpio 114 GPIO_ACTIVE_LOW	/* W2W_PDN	*/
159		>;
160	};
161
162	ethernet: ethernet@10000000 {
163		compatible = "smsc,lan9115";
164		pinctrl-names = "default";
165		pinctrl-0 = <&smsc_pins &smsc_bus_pins>;
166		reg = <0x10000000 0x100000>;
167		phy-mode = "mii";
168		interrupt-parent = <&gpio>;
169		interrupts = <40 IRQ_TYPE_EDGE_FALLING>;
170		vdd33a-supply = <&reg_3v3>;
171		vddvario-supply = <&reg_1v8>;
172		reset-gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
173		reg-io-width = <4>;
174		smsc,save-mac-address;
175		smsc,irq-push-pull;
176	};
177};
178
179&ffuart {
180	status = "okay";
181};
182
183&pwri2c {
184	status = "okay";
185
186	max8660: regulator@34 {
187		compatible = "maxim,max8660";
188		reg = <0x34>;
189
190		regulators {
191			regulator-v3 {
192				regulator-compatible = "V3(DCDC)";
193				regulator-min-microvolt = <725000>;
194				regulator-max-microvolt = <1800000>;
195			};
196
197			regulator-v4 {
198				regulator-compatible = "V4(DCDC)";
199				regulator-min-microvolt = <725000>;
200				regulator-max-microvolt = <1800000>;
201			};
202
203			regulator-v5 {
204				regulator-compatible = "V5(LDO)";
205				regulator-min-microvolt = <1700000>;
206				regulator-max-microvolt = <2000000>;
207			};
208
209			reg_vcc_sdio: regulator-v6 {
210				regulator-compatible = "V6(LDO)";
211				regulator-min-microvolt = <3300000>;
212				regulator-max-microvolt = <3300000>;
213			};
214
215			regulator-v7 {
216				regulator-compatible = "V7(LDO)";
217				regulator-min-microvolt = <1800000>;
218				regulator-max-microvolt = <3300000>;
219			};
220		};
221	};
222};
223
224&pxai2c1 {
225	status = "okay";
226	mrvl,i2c-fast-mode;
227	pinctrl-names = "default";
228	pinctrl-0 = <&pxai2c1_pins>;
229};
230
231&ssp1 {
232	status = "okay";
233};
234
235&ssp2 {
236	status = "okay";
237};
238
239&nand_controller {
240	status = "okay";
241
242	nand@0 {
243		reg = <0>;
244		nand-rb = <0>;
245		nand-ecc-mode = "hw";
246		marvell,nand-keep-config;
247
248		partitions {
249			compatible = "fixed-partitions";
250			#address-cells = <1>;
251			#size-cells = <1>;
252
253			partition@0 {
254				label = "Bootloader";
255				reg = <0x0000000 0xa0000>;
256				read-only;
257			};
258
259			partition@a0000 {
260				label = "BootloaderEnvironment";
261				reg = <0x0a0000 0x20000>;
262			};
263
264			partition@c0000 {
265				label = "BootloaderSplashScreen";
266				reg = <0x0c0000 0x60000>;
267			};
268
269			partition@120000 {
270				label = "UBI";
271				reg = <0x120000 0x7ee0000>;
272			};
273		};
274	};
275};
276
277&usb0 {
278	status = "okay";
279	marvell,enable-port1;
280	marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */
281	pinctrl-names = "default";
282	pinctrl-0 = <&pxa3xx_ohci_pins>;
283};
284
285&mmc0 {
286	status = "okay";
287	pinctrl-names = "default";
288	pinctrl-0 = <&mmc0_pins>;
289	pxa-mmc,detect-delay-ms = <200>;
290	vmmc-supply = <&reg_vcc_sdio>;
291	mmc-pwrseq = <&mmc0_pwrseq>;
292	non-removable;
293	bus-width = <4>;
294};
295
296&pinctrl {
297	poweroff_pins: poweroff-pins {
298		pinctrl-single,pins = <MFP_PIN_PXA300(16) MFP_AF0>;
299		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_FLOAT);
300	};
301
302	led_pins_a: led-pins-a {
303		pinctrl-single,pins = <MFP_PIN_PXA300(35) MFP_AF0>;
304		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_PULL_LOW);
305	};
306
307	led_pins_b: led-pins-b {
308		pinctrl-single,pins = <MFP_PIN_PXA300(36) MFP_AF0>;
309		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_DRIVE_HIGH);
310	};
311
312	pxai2c1_pins: pxai2c1-pins {
313		pinctrl-single,pins = <
314			MFP_PIN_PXA300(21) MFP_AF1	/* I2C_SCL	*/
315			MFP_PIN_PXA300(22) MFP_AF1	/* I2C_SDA	*/
316		>;
317		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_PULL_HIGH);
318	};
319
320	gpio_keys_pins: gpio-keys-pins {
321		pinctrl-single,pins = <
322			MFP_PIN_PXA300(14) MFP_AF0	/* on-off	*/
323			MFP_PIN_PXA300(115) MFP_AF0	/* rescue boot	*/
324			MFP_PIN_PXA300(119) MFP_AF0	/* setup	*/
325		>;
326		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_FLOAT);
327	};
328
329	spi_pins: spi-pins {
330		pinctrl-single,pins = <
331			MFP_PIN_PXA300(95) MFP_AF0	/* SCK		*/
332			MFP_PIN_PXA300(97) MFP_AF0	/* MOSI		*/
333			MFP_PIN_PXA300(98) MFP_AF0	/* MISO		*/
334			MFP_PIN_PXA300(34) MFP_AF0	/* CS#0		*/
335			MFP_PIN_PXA300(125) MFP_AF0	/* CS#1		*/
336			MFP_PIN_PXA300(96) MFP_AF0	/* CS#2		*/
337		>;
338		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_PULL_LOW);
339	};
340
341	pxa3xx_ohci_pins: pxa3xx-ohci-pins {
342		pinctrl-single,pins = <
343			MFP_PIN_PXA300_2(0) MFP_AF1	/* USBHPEN	*/
344			MFP_PIN_PXA300_2(1) MFP_AF1	/* USBHPWR	*/
345		>;
346		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_PULL_LOW);
347	};
348
349	smsc_pins: smsc-pins {
350		pinctrl-single,pins = <
351			MFP_PIN_PXA300(39) MFP_AF0	/* RESET	*/
352			MFP_PIN_PXA300(40) MFP_AF0	/* IRQ		*/
353		>;
354		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_PULL_LOW);
355	};
356
357	smsc_bus_pins: smsc-bus-pins {
358		pinctrl-single,pins = <
359			MFP_PIN_PXA300(1) MFP_AF1	/* nCS2		*/
360		>;
361		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_FLOAT);
362	};
363
364	mmc0_pins: mmc0-pins {
365		pinctrl-single,pins = <
366			MFP_PIN_PXA300(3) MFP_AF4	/* MMC1_DAT0	*/
367			MFP_PIN_PXA300(4) MFP_AF4	/* MMC1_DAT1	*/
368			MFP_PIN_PXA300(5) MFP_AF4	/* MMC1_DAT2	*/
369			MFP_PIN_PXA300(6) MFP_AF4	/* MMC1_DAT3	*/
370			MFP_PIN_PXA300(7) MFP_AF4	/* MMC1_CLK	*/
371			MFP_PIN_PXA300(8) MFP_AF4	/* MMC1_CMD	*/
372		>;
373		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_DRIVE_HIGH);
374	};
375
376	mmc0_pwrseq_pins: mmc0-pwrseq-pins {
377		pinctrl-single,pins = <
378			MFP_PIN_PXA300(113) MFP_AF0	/* W2W_RESET	*/
379			MFP_PIN_PXA300(114) MFP_AF0	/* W2W_PDN	*/
380		>;
381		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_FLOAT);
382	};
383
384	ssp0_dai_pins: ssp0-dai-pins {
385		pinctrl-single,pins = <
386			MFP_PIN_PXA300(85) MFP_AF1	/* SSP1_SCLK	*/
387			MFP_PIN_PXA300(86) MFP_AF1	/* SSP1_FRM	*/
388			MFP_PIN_PXA300(87) MFP_AF1	/* SSP1_TXD	*/
389			MFP_PIN_PXA300(88) MFP_AF1	/* SSP1_RXD	*/
390			MFP_PIN_PXA300(89) MFP_AF1	/* SSP1_EXTCLK	*/
391			MFP_PIN_PXA300(90) MFP_AF1	/* SSP1_SYSCLK	*/
392		>;
393		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_PULL_LOW);
394	};
395
396	ssp1_dai_pins: ssp1-dai-pins {
397		pinctrl-single,pins = <
398			MFP_PIN_PXA300(25) MFP_AF2	/* SSP2_SCLK	*/
399			MFP_PIN_PXA300(26) MFP_AF2	/* SSP2_FRM	*/
400			MFP_PIN_PXA300(27) MFP_AF2	/* SSP2_TXD	*/
401			MFP_PIN_PXA300(29) MFP_AF2	/* SSP2_EXTCLK	*/
402		>;
403		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_PULL_LOW);
404	};
405};
406