xref: /freebsd/sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation.dtsi (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Device Tree common file for kirkwood based Buffalo Linkstation
4*f126890aSEmmanuel Vadot *
5*f126890aSEmmanuel Vadot * Copyright (C) 2015, 2016
6*f126890aSEmmanuel Vadot * Roger Shimizu <rogershimizu@gmail.com>
7*f126890aSEmmanuel Vadot */
8*f126890aSEmmanuel Vadot
9*f126890aSEmmanuel Vadot/ {
10*f126890aSEmmanuel Vadot	chosen {
11*f126890aSEmmanuel Vadot		bootargs = "console=ttyS0,115200n8 earlyprintk";
12*f126890aSEmmanuel Vadot		stdout-path = &uart0;
13*f126890aSEmmanuel Vadot	};
14*f126890aSEmmanuel Vadot
15*f126890aSEmmanuel Vadot	ocp@f1000000 {
16*f126890aSEmmanuel Vadot		pinctrl: pin-controller@10000 {
17*f126890aSEmmanuel Vadot			pmx_power_hdd0: pmx-power-hdd0 {
18*f126890aSEmmanuel Vadot				marvell,function = "gpio";
19*f126890aSEmmanuel Vadot			};
20*f126890aSEmmanuel Vadot			pmx_usb_vbus: pmx-usb-vbus {
21*f126890aSEmmanuel Vadot				marvell,function = "gpio";
22*f126890aSEmmanuel Vadot			};
23*f126890aSEmmanuel Vadot			pmx_led_alarm: pmx-led-alarm {
24*f126890aSEmmanuel Vadot				marvell,function = "gpio";
25*f126890aSEmmanuel Vadot			};
26*f126890aSEmmanuel Vadot			pmx_led_function_red: pmx-led-function-red {
27*f126890aSEmmanuel Vadot				marvell,function = "gpio";
28*f126890aSEmmanuel Vadot			};
29*f126890aSEmmanuel Vadot			pmx_led_function_blue: pmx-led-function-blue {
30*f126890aSEmmanuel Vadot				marvell,function = "gpio";
31*f126890aSEmmanuel Vadot			};
32*f126890aSEmmanuel Vadot			pmx_led_info: pmx-led-info {
33*f126890aSEmmanuel Vadot				marvell,function = "gpio";
34*f126890aSEmmanuel Vadot			};
35*f126890aSEmmanuel Vadot			pmx_led_power: pmx-led-power {
36*f126890aSEmmanuel Vadot				marvell,function = "gpio";
37*f126890aSEmmanuel Vadot			};
38*f126890aSEmmanuel Vadot			pmx_button_function: pmx-button-function {
39*f126890aSEmmanuel Vadot				marvell,function = "gpio";
40*f126890aSEmmanuel Vadot			};
41*f126890aSEmmanuel Vadot			pmx_power_switch: pmx-power-switch {
42*f126890aSEmmanuel Vadot				marvell,function = "gpio";
43*f126890aSEmmanuel Vadot			};
44*f126890aSEmmanuel Vadot			pmx_power_auto_switch: pmx-power-auto-switch {
45*f126890aSEmmanuel Vadot				marvell,function = "gpio";
46*f126890aSEmmanuel Vadot			};
47*f126890aSEmmanuel Vadot		};
48*f126890aSEmmanuel Vadot
49*f126890aSEmmanuel Vadot		serial@12000 {
50*f126890aSEmmanuel Vadot			status = "okay";
51*f126890aSEmmanuel Vadot		};
52*f126890aSEmmanuel Vadot
53*f126890aSEmmanuel Vadot		sata@80000 {
54*f126890aSEmmanuel Vadot			status = "okay";
55*f126890aSEmmanuel Vadot			nr-ports = <1>;
56*f126890aSEmmanuel Vadot		};
57*f126890aSEmmanuel Vadot
58*f126890aSEmmanuel Vadot		spi@10600 {
59*f126890aSEmmanuel Vadot			status = "okay";
60*f126890aSEmmanuel Vadot
61*f126890aSEmmanuel Vadot			m25p40@0 {
62*f126890aSEmmanuel Vadot				#address-cells = <1>;
63*f126890aSEmmanuel Vadot				#size-cells = <1>;
64*f126890aSEmmanuel Vadot				compatible = "st,m25p40", "jedec,spi-nor";
65*f126890aSEmmanuel Vadot				reg = <0>;
66*f126890aSEmmanuel Vadot				spi-max-frequency = <25000000>;
67*f126890aSEmmanuel Vadot				mode = <0>;
68*f126890aSEmmanuel Vadot
69*f126890aSEmmanuel Vadot				partition@0 {
70*f126890aSEmmanuel Vadot					reg = <0x0 0x60000>;
71*f126890aSEmmanuel Vadot					label = "uboot";
72*f126890aSEmmanuel Vadot					read-only;
73*f126890aSEmmanuel Vadot				};
74*f126890aSEmmanuel Vadot
75*f126890aSEmmanuel Vadot				partition@60000 {
76*f126890aSEmmanuel Vadot					reg = <0x60000 0x10000>;
77*f126890aSEmmanuel Vadot					label = "dtb";
78*f126890aSEmmanuel Vadot					read-only;
79*f126890aSEmmanuel Vadot				};
80*f126890aSEmmanuel Vadot
81*f126890aSEmmanuel Vadot				partition@70000 {
82*f126890aSEmmanuel Vadot					reg = <0x70000 0x10000>;
83*f126890aSEmmanuel Vadot					label = "uboot_env";
84*f126890aSEmmanuel Vadot				};
85*f126890aSEmmanuel Vadot			};
86*f126890aSEmmanuel Vadot		};
87*f126890aSEmmanuel Vadot	};
88*f126890aSEmmanuel Vadot
89*f126890aSEmmanuel Vadot	gpio_keys {
90*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
91*f126890aSEmmanuel Vadot		#address-cells = <1>;
92*f126890aSEmmanuel Vadot		#size-cells = <0>;
93*f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_button_function &pmx_power_switch
94*f126890aSEmmanuel Vadot			     &pmx_power_auto_switch>;
95*f126890aSEmmanuel Vadot		pinctrl-names = "default";
96*f126890aSEmmanuel Vadot
97*f126890aSEmmanuel Vadot		function-button {
98*f126890aSEmmanuel Vadot			label = "Function Button";
99*f126890aSEmmanuel Vadot			linux,code = <KEY_OPTION>;
100*f126890aSEmmanuel Vadot		};
101*f126890aSEmmanuel Vadot
102*f126890aSEmmanuel Vadot		power-on-switch {
103*f126890aSEmmanuel Vadot			label = "Power-on Switch";
104*f126890aSEmmanuel Vadot			linux,code = <KEY_RESERVED>;
105*f126890aSEmmanuel Vadot			linux,input-type = <5>;
106*f126890aSEmmanuel Vadot		};
107*f126890aSEmmanuel Vadot
108*f126890aSEmmanuel Vadot		power-auto-switch {
109*f126890aSEmmanuel Vadot			label = "Power-auto Switch";
110*f126890aSEmmanuel Vadot			linux,code = <KEY_ESC>;
111*f126890aSEmmanuel Vadot			linux,input-type = <5>;
112*f126890aSEmmanuel Vadot		};
113*f126890aSEmmanuel Vadot	};
114*f126890aSEmmanuel Vadot
115*f126890aSEmmanuel Vadot	gpio_leds {
116*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
117*f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
118*f126890aSEmmanuel Vadot			     &pmx_led_info &pmx_led_power
119*f126890aSEmmanuel Vadot			     &pmx_led_function_blue>;
120*f126890aSEmmanuel Vadot		pinctrl-names = "default";
121*f126890aSEmmanuel Vadot	};
122*f126890aSEmmanuel Vadot
123*f126890aSEmmanuel Vadot	restart_poweroff {
124*f126890aSEmmanuel Vadot		compatible = "restart-poweroff";
125*f126890aSEmmanuel Vadot	};
126*f126890aSEmmanuel Vadot
127*f126890aSEmmanuel Vadot	regulators {
128*f126890aSEmmanuel Vadot		compatible = "simple-bus";
129*f126890aSEmmanuel Vadot		#address-cells = <1>;
130*f126890aSEmmanuel Vadot		#size-cells = <0>;
131*f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_power_hdd0 &pmx_usb_vbus>;
132*f126890aSEmmanuel Vadot		pinctrl-names = "default";
133*f126890aSEmmanuel Vadot
134*f126890aSEmmanuel Vadot		usb_power: regulator@1 {
135*f126890aSEmmanuel Vadot			compatible = "regulator-fixed";
136*f126890aSEmmanuel Vadot			reg = <1>;
137*f126890aSEmmanuel Vadot			regulator-name = "USB Power";
138*f126890aSEmmanuel Vadot			regulator-min-microvolt = <5000000>;
139*f126890aSEmmanuel Vadot			regulator-max-microvolt = <5000000>;
140*f126890aSEmmanuel Vadot			enable-active-high;
141*f126890aSEmmanuel Vadot			regulator-always-on;
142*f126890aSEmmanuel Vadot			regulator-boot-on;
143*f126890aSEmmanuel Vadot		};
144*f126890aSEmmanuel Vadot
145*f126890aSEmmanuel Vadot		hdd_power0: regulator@2 {
146*f126890aSEmmanuel Vadot			compatible = "regulator-fixed";
147*f126890aSEmmanuel Vadot			reg = <2>;
148*f126890aSEmmanuel Vadot			regulator-name = "HDD0 Power";
149*f126890aSEmmanuel Vadot			regulator-min-microvolt = <5000000>;
150*f126890aSEmmanuel Vadot			regulator-max-microvolt = <5000000>;
151*f126890aSEmmanuel Vadot			enable-active-high;
152*f126890aSEmmanuel Vadot			regulator-always-on;
153*f126890aSEmmanuel Vadot			regulator-boot-on;
154*f126890aSEmmanuel Vadot		};
155*f126890aSEmmanuel Vadot	};
156*f126890aSEmmanuel Vadot};
157*f126890aSEmmanuel Vadot
158*f126890aSEmmanuel Vadot&pciec {
159*f126890aSEmmanuel Vadot	status = "okay";
160*f126890aSEmmanuel Vadot};
161*f126890aSEmmanuel Vadot
162*f126890aSEmmanuel Vadot&pcie0 {
163*f126890aSEmmanuel Vadot	status = "okay";
164*f126890aSEmmanuel Vadot};
165