~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: 977eb4ee54fe2a813dc67a73495b4f30acb67194 (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
143
144
145
146
147
148
149
// SPDX-License-Identifier: GPL-2.0

&i2c0 {
	mux@71 {
		compatible = "nxp,pca9548";

		i2c@1 {
			hwmon@2c {
				compatible = "ti,lm87";
				reg = <0x2c>;
			};

			hwmon@2d {
				compatible = "ti,lm87";
				reg = <0x2d>;
			};

			hwmon@2e {
				pwm-polarity = <1>;
			};
		};

		psu_a_adapter: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		psu_b_adapter: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;

			misc_gpio: gpio@26 {
				compatible = "nxp,pca9555";
				gpio-controller;
				#gpio-cells = <2>;
				reg = <0x26>;
				interrupt-parent = <&gpio0>;
				interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
				status = "okay";
				interrupt-controller;
				#interrupt-cells = <2>;

				psu_bank2 {
					gpio-hog;
					gpios = <0 GPIO_ACTIVE_HIGH>;
					output-high;
					line-name = "psu-bank2";
				};
			};
		};
	};
};

/ {
	psu_slot_a {
		compatible = "atl,dts-overlay-gpio-psu-slot";
		slot-name = "PSU Bay A";
		board-index = <1>;
		present-gpio = <&misc_gpio 1 GPIO_ACTIVE_LOW>;
		output-ok-gpio = <&gpio1 16 GPIO_ACTIVE_HIGH>;
		interrupt-parent = <&misc_gpio>;
		interrupts = <1 IRQ_TYPE_EDGE_BOTH>;
		overlay = <&psu_a_overlay>;
	};

	psu_slot_b {
		compatible = "atl,dts-overlay-gpio-psu-slot";
		slot-name = "PSU Bay B";
		board-index = <2>;
		present-gpio = <&misc_gpio 2 GPIO_ACTIVE_LOW>;
		output-ok-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
		interrupt-parent = <&misc_gpio>;
		interrupts = <2 IRQ_TYPE_EDGE_BOTH>;
		overlay = <&psu_b_overlay>;
	};

	fan_slot_a {
		compatible = "atl,fan05-slot";
		slot-name = "Fan Bay A";
		board-index = <3>;
		present-gpio = <&misc_gpio 3 GPIO_ACTIVE_LOW>;
		fault-gpio = <&misc_gpio 11 GPIO_ACTIVE_LOW>;
		interrupt-parent = <&misc_gpio>;
		interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
		overlay = <&fan_a_overlay>;
	};
};

/ {
	psu_a_overlay: psu_a {
		fragment@0 {
			target = <&psu_a_adapter>;
			__overlay__ {
				#address-cells = <1>;
				#size-cells = <0>;

				psu@51 {
					compatible = "atl,atl-pwr-gen2";
					reg = <0x51>;
					board-index = <1>;
				};
			};
		};
	};
};

/ {
	psu_b_overlay: psu_b {
		fragment@0 {
			target = <&psu_b_adapter>;
			__overlay__ {
				#address-cells = <1>;
				#size-cells = <0>;

				psu@51 {
					compatible = "atl,atl-pwr-gen2";
					reg = <0x51>;
					board-index = <2>;
				};
			};
		};
	};
};

/ {
	fan_a_overlay:fan_a {
		fragment@1 {
			target-path = "/";
			__overlay__ {
				fan@1 {
					compatible = "atl,fan05";
					board-index = <3>;
					module-id-gpios =
						<&misc_gpio 4 GPIO_ACTIVE_HIGH>,
						<&misc_gpio 5 GPIO_ACTIVE_HIGH>,
						<&misc_gpio 6 GPIO_ACTIVE_HIGH>;
				};
			};
		};
	};
};