summaryrefslogtreecommitdiffstats
path: root/arch/mips/dts/ar9331-okud-max9331.dts
blob: 3b93bee93b70eb2f8b69c68c93bee35fcff7a99a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include <mips/qca/ar9331.dtsi>

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

#include "ar9331.dtsi"

/ {
	model = "o&kud max9331";
	compatible = "okud,max9331";

	aliases {
		spiflash = &spiflash;
		serial0 = &uart;
	};

	chosen {
		stdout-path = &uart;

		environment {
			compatible = "barebox,environment";
			device-path = &spiflash, "partname:barebox-environment";
		};

		art@0 {
			compatible = "qca,art-ar9331", "qca,art";
			device-path = &spiflash_art;
			barebox,provide-mac-address = <&eth0>;
		};
	};

	memory@0 {
		device_type = "memory";
		reg = <0x0 0x4000000>;
	};

	/* FIXME: leds and gpio */
	leds {
		compatible = "gpio-leds";

		net {
			label = "board:LED1:system";
			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
			default-state = "off";
			barebox,default-trigger = "net";
		};

		panic {
			label = "board:LED2:system";
			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
			default-state = "on";
			barebox,default-trigger = "panic";
		};

		system {
			label = "board:LED3:system";
			gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
			default-state = "off";
			barebox,default-trigger = "heartbeat";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;

		button@0 {
			label = "reset";
			linux,code = <KEY_ENTER>;
			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&eth0 {
	status = "okay";
};

&ref {
	clock-frequency = <25000000>;
};

&uart {
	status = "okay";
};

&gpio {
	status = "okay";
};

&usb {
	dr_mode = "host";
	status = "okay";
};

&usb_phy {
	status = "okay";
};

&spi {
	num-chipselects = <1>;
	status = "okay";

	/* Spansion FL128SA SPI flash */
	spiflash: s25fl128s@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "spansion,s25fl128s1", "jedec,spi-nor";
		spi-max-frequency = <25000000>;
		reg = <0>;
	};
};

&spiflash {
	partition@0 {
		label = "boot0";
		reg = <0 0x10000>;
	};

	partition@10000 {
		label = "barebox-environment";
		reg = <0x10000 0x10000>;
	};

	partition@20000 {
		label = "barebox";
		reg = <0x20000 0x80000>;
	};

	partition@a0000 {
		label = "kernel";
		reg = <0xA0000 0xF50000>;
	};

	spiflash_art: partition@ff0000 {
		label = "art";
		reg = <0xff0000 0x10000>;
	};
};