Linux-libre 5.7.5-gnu
[librecmc/linux-libre.git] / arch / arm / boot / dts / aspeed-bmc-opp-tacoma.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 // Copyright 2019 IBM Corp.
3 /dts-v1/;
4
5 #include "aspeed-g6.dtsi"
6 #include <dt-bindings/gpio/aspeed-gpio.h>
7 #include <dt-bindings/leds/leds-pca955x.h>
8
9 / {
10         model = "Tacoma";
11         compatible = "ibm,tacoma-bmc", "aspeed,ast2600";
12
13         chosen {
14                 stdout-path = &uart5;
15                 bootargs = "console=ttyS4,115200n8";
16         };
17
18         memory@80000000 {
19                 device_type = "memory";
20                 reg = <0x80000000 0x40000000>;
21         };
22
23         reserved-memory {
24                 #address-cells = <1>;
25                 #size-cells = <1>;
26                 ranges;
27
28                 flash_memory: region@ba000000 {
29                         no-map;
30                         reg = <0xb8000000 0x4000000>; /* 64M */
31                 };
32         };
33
34         gpio-keys {
35                 compatible = "gpio-keys";
36
37                 air-water {
38                         label = "air-water";
39                         gpios = <&gpio0 ASPEED_GPIO(Q, 7) GPIO_ACTIVE_LOW>;
40                         linux,code = <ASPEED_GPIO(Q, 7)>;
41                 };
42
43                 checkstop {
44                         label = "checkstop";
45                         gpios = <&gpio0 ASPEED_GPIO(E, 3) GPIO_ACTIVE_LOW>;
46                         linux,code = <ASPEED_GPIO(E, 3)>;
47                 };
48
49                 ps0-presence {
50                         label = "ps0-presence";
51                         gpios = <&gpio0 ASPEED_GPIO(H, 3) GPIO_ACTIVE_LOW>;
52                         linux,code = <ASPEED_GPIO(H, 3)>;
53                 };
54
55                 ps1-presence {
56                         label = "ps1-presence";
57                         gpios = <&gpio0 ASPEED_GPIO(E, 5) GPIO_ACTIVE_LOW>;
58                         linux,code = <ASPEED_GPIO(E, 5)>;
59                 };
60         };
61
62         gpio-keys-polled {
63                 compatible = "gpio-keys-polled";
64                 #address-cells = <1>;
65                 #size-cells = <0>;
66                 poll-interval = <1000>;
67
68                 fan0-presence {
69                         label = "fan0-presence";
70                         gpios = <&pca0 4 GPIO_ACTIVE_LOW>;
71                         linux,code = <4>;
72                 };
73
74                 fan1-presence {
75                         label = "fan1-presence";
76                         gpios = <&pca0 5 GPIO_ACTIVE_LOW>;
77                         linux,code = <5>;
78                 };
79
80                 fan2-presence {
81                         label = "fan2-presence";
82                         gpios = <&pca0 6 GPIO_ACTIVE_LOW>;
83                         linux,code = <6>;
84                 };
85
86                 fan3-presence {
87                         label = "fan3-presence";
88                         gpios = <&pca0 7 GPIO_ACTIVE_LOW>;
89                         linux,code = <7>;
90                 };
91         };
92 };
93
94 &fmc {
95         status = "okay";
96         flash@0 {
97                 status = "okay";
98                 m25p,fast-read;
99                 label = "bmc";
100                 spi-max-frequency = <50000000>;
101 #include "openbmc-flash-layout-128.dtsi"
102         };
103
104         flash@1 {
105                 status = "okay";
106                 m25p,fast-read;
107                 label = "alt-bmc";
108                 spi-max-frequency = <50000000>;
109         };
110 };
111
112 &spi1 {
113         status = "okay";
114         pinctrl-names = "default";
115         pinctrl-0 = <&pinctrl_spi1_default>;
116
117         flash@0 {
118                 status = "okay";
119                 m25p,fast-read;
120                 label = "pnor";
121                 spi-max-frequency = <100000000>;
122         };
123 };
124
125 &mac2 {
126         status = "okay";
127         pinctrl-names = "default";
128         pinctrl-0 = <&pinctrl_rmii3_default>;
129         clocks = <&syscon ASPEED_CLK_GATE_MAC3CLK>,
130                  <&syscon ASPEED_CLK_MAC3RCLK>;
131         clock-names = "MACCLK", "RCLK";
132         use-ncsi;
133 };
134
135 &emmc {
136         status = "okay";
137 };
138
139 &fsim0 {
140         status = "okay";
141
142         #address-cells = <2>;
143         #size-cells = <0>;
144
145         cfam@0,0 {
146                 reg = <0 0>;
147                 #address-cells = <1>;
148                 #size-cells = <1>;
149                 chip-id = <0>;
150
151                 scom@1000 {
152                         compatible = "ibm,fsi2pib";
153                         reg = <0x1000 0x400>;
154                 };
155
156                 i2c@1800 {
157                         compatible = "ibm,fsi-i2c-master";
158                         reg = <0x1800 0x400>;
159                         #address-cells = <1>;
160                         #size-cells = <0>;
161
162                         cfam0_i2c0: i2c-bus@0 {
163                                 reg = <0>;
164                         };
165
166                         cfam0_i2c1: i2c-bus@1 {
167                                 reg = <1>;
168                         };
169
170                         cfam0_i2c2: i2c-bus@2 {
171                                 reg = <2>;
172                         };
173
174                         cfam0_i2c3: i2c-bus@3 {
175                                 reg = <3>;
176                         };
177
178                         cfam0_i2c4: i2c-bus@4 {
179                                 reg = <4>;
180                         };
181
182                         cfam0_i2c5: i2c-bus@5 {
183                                 reg = <5>;
184                         };
185
186                         cfam0_i2c6: i2c-bus@6 {
187                                 reg = <6>;
188                         };
189
190                         cfam0_i2c7: i2c-bus@7 {
191                                 reg = <7>;
192                         };
193
194                         cfam0_i2c8: i2c-bus@8 {
195                                 reg = <8>;
196                         };
197
198                         cfam0_i2c9: i2c-bus@9 {
199                                 reg = <9>;
200                         };
201
202                         cfam0_i2c10: i2c-bus@a {
203                                 reg = <10>;
204                         };
205
206                         cfam0_i2c11: i2c-bus@b {
207                                 reg = <11>;
208                         };
209
210                         cfam0_i2c12: i2c-bus@c {
211                                 reg = <12>;
212                         };
213
214                         cfam0_i2c13: i2c-bus@d {
215                                 reg = <13>;
216                         };
217
218                         cfam0_i2c14: i2c-bus@e {
219                                 reg = <14>;
220                         };
221                 };
222
223                 sbefifo@2400 {
224                         compatible = "ibm,p9-sbefifo";
225                         reg = <0x2400 0x400>;
226                         #address-cells = <1>;
227                         #size-cells = <0>;
228
229                         fsi_occ0: occ {
230                                 compatible = "ibm,p9-occ";
231                         };
232                 };
233
234                 fsi_hub0: hub@3400 {
235                         compatible = "fsi-master-hub";
236                         reg = <0x3400 0x400>;
237                         #address-cells = <2>;
238                         #size-cells = <0>;
239
240                         no-scan-on-init;
241                 };
242         };
243 };
244
245 &fsi_hub0 {
246         cfam@1,0 {
247                 reg = <1 0>;
248                 #address-cells = <1>;
249                 #size-cells = <1>;
250                 chip-id = <1>;
251
252                 scom@1000 {
253                         compatible = "ibm,fsi2pib";
254                         reg = <0x1000 0x400>;
255                 };
256
257                 i2c@1800 {
258                         compatible = "ibm,fsi-i2c-master";
259                         reg = <0x1800 0x400>;
260                         #address-cells = <1>;
261                         #size-cells = <0>;
262
263                         cfam1_i2c0: i2c-bus@0 {
264                                 reg = <0>;
265                         };
266
267                         cfam1_i2c1: i2c-bus@1 {
268                                 reg = <1>;
269                         };
270
271                         cfam1_i2c2: i2c-bus@2 {
272                                 reg = <2>;
273                         };
274
275                         cfam1_i2c3: i2c-bus@3 {
276                                 reg = <3>;
277                         };
278
279                         cfam1_i2c4: i2c-bus@4 {
280                                 reg = <4>;
281                         };
282
283                         cfam1_i2c5: i2c-bus@5 {
284                                 reg = <5>;
285                         };
286
287                         cfam1_i2c6: i2c-bus@6 {
288                                 reg = <6>;
289                         };
290
291                         cfam1_i2c7: i2c-bus@7 {
292                                 reg = <7>;
293                         };
294
295                         cfam1_i2c8: i2c-bus@8 {
296                                 reg = <8>;
297                         };
298
299                         cfam1_i2c9: i2c-bus@9 {
300                                 reg = <9>;
301                         };
302
303                         cfam1_i2c10: i2c-bus@a {
304                                 reg = <10>;
305                         };
306
307                         cfam1_i2c11: i2c-bus@b {
308                                 reg = <11>;
309                         };
310
311                         cfam1_i2c12: i2c-bus@c {
312                                 reg = <12>;
313                         };
314
315                         cfam1_i2c13: i2c-bus@d {
316                                 reg = <13>;
317                         };
318
319                         cfam1_i2c14: i2c-bus@e {
320                                 reg = <14>;
321                         };
322                 };
323
324                 sbefifo@2400 {
325                         compatible = "ibm,p9-sbefifo";
326                         reg = <0x2400 0x400>;
327                         #address-cells = <1>;
328                         #size-cells = <0>;
329
330                         fsi_occ1: occ {
331                                 compatible = "ibm,p9-occ";
332                         };
333                 };
334
335                 fsi_hub1: hub@3400 {
336                         compatible = "fsi-master-hub";
337                         reg = <0x3400 0x400>;
338                         #address-cells = <2>;
339                         #size-cells = <0>;
340
341                         no-scan-on-init;
342                 };
343         };
344 };
345
346 /* Legacy OCC numbering (to get rid of when userspace is fixed) */
347 &fsi_occ0 {
348         reg = <1>;
349 };
350
351 &fsi_occ1 {
352         reg = <2>;
353 };
354
355 / {
356         aliases {
357                 i2c100 = &cfam0_i2c0;
358                 i2c101 = &cfam0_i2c1;
359                 i2c102 = &cfam0_i2c2;
360                 i2c103 = &cfam0_i2c3;
361                 i2c104 = &cfam0_i2c4;
362                 i2c105 = &cfam0_i2c5;
363                 i2c106 = &cfam0_i2c6;
364                 i2c107 = &cfam0_i2c7;
365                 i2c108 = &cfam0_i2c8;
366                 i2c109 = &cfam0_i2c9;
367                 i2c110 = &cfam0_i2c10;
368                 i2c111 = &cfam0_i2c11;
369                 i2c112 = &cfam0_i2c12;
370                 i2c113 = &cfam0_i2c13;
371                 i2c114 = &cfam0_i2c14;
372                 i2c200 = &cfam1_i2c0;
373                 i2c201 = &cfam1_i2c1;
374                 i2c202 = &cfam1_i2c2;
375                 i2c203 = &cfam1_i2c3;
376                 i2c204 = &cfam1_i2c4;
377                 i2c205 = &cfam1_i2c5;
378                 i2c206 = &cfam1_i2c6;
379                 i2c207 = &cfam1_i2c7;
380                 i2c208 = &cfam1_i2c8;
381                 i2c209 = &cfam1_i2c9;
382                 i2c210 = &cfam1_i2c10;
383                 i2c211 = &cfam1_i2c11;
384                 i2c212 = &cfam1_i2c12;
385                 i2c213 = &cfam1_i2c13;
386                 i2c214 = &cfam1_i2c14;
387         };
388
389 };
390
391 &i2c0 {
392         status = "okay";
393 };
394
395 &i2c1 {
396         status = "okay";
397 };
398
399 &i2c2 {
400         status = "okay";
401 };
402
403 &i2c3 {
404         status = "okay";
405
406         bmp: bmp280@77 {
407                 compatible = "bosch,bmp280";
408                 reg = <0x77>;
409                 #io-channel-cells = <1>;
410         };
411
412         max31785@52 {
413                 compatible = "maxim,max31785a";
414                 reg = <0x52>;
415                 #address-cells = <1>;
416                 #size-cells = <0>;
417
418                 fan@0 {
419                         compatible = "pmbus-fan";
420                         reg = <0>;
421                         tach-pulses = <2>;
422                         maxim,fan-rotor-input = "tach";
423                         maxim,fan-pwm-freq = <25000>;
424                         maxim,fan-dual-tach;
425                         maxim,fan-no-watchdog;
426                         maxim,fan-no-fault-ramp;
427                         maxim,fan-ramp = <2>;
428                         maxim,fan-fault-pin-mon;
429                 };
430
431                 fan@1 {
432                         compatible = "pmbus-fan";
433                         reg = <1>;
434                         tach-pulses = <2>;
435                         maxim,fan-rotor-input = "tach";
436                         maxim,fan-pwm-freq = <25000>;
437                         maxim,fan-dual-tach;
438                         maxim,fan-no-watchdog;
439                         maxim,fan-no-fault-ramp;
440                         maxim,fan-ramp = <2>;
441                         maxim,fan-fault-pin-mon;
442                 };
443
444                 fan@2 {
445                         compatible = "pmbus-fan";
446                         reg = <2>;
447                         tach-pulses = <2>;
448                         maxim,fan-rotor-input = "tach";
449                         maxim,fan-pwm-freq = <25000>;
450                         maxim,fan-dual-tach;
451                         maxim,fan-no-watchdog;
452                         maxim,fan-no-fault-ramp;
453                         maxim,fan-ramp = <2>;
454                         maxim,fan-fault-pin-mon;
455                 };
456
457                 fan@3 {
458                         compatible = "pmbus-fan";
459                         reg = <3>;
460                         tach-pulses = <2>;
461                         maxim,fan-rotor-input = "tach";
462                         maxim,fan-pwm-freq = <25000>;
463                         maxim,fan-dual-tach;
464                         maxim,fan-no-watchdog;
465                         maxim,fan-no-fault-ramp;
466                         maxim,fan-ramp = <2>;
467                         maxim,fan-fault-pin-mon;
468                 };
469         };
470
471         dps: dps310@76 {
472                 compatible = "infineon,dps310";
473                 reg = <0x76>;
474                 #io-channel-cells = <0>;
475         };
476
477         pca0: pca9552@60 {
478                 compatible = "nxp,pca9552";
479                 reg = <0x60>;
480                 #address-cells = <1>;
481                 #size-cells = <0>;
482
483                 gpio-controller;
484                 #gpio-cells = <2>;
485
486                 gpio@0 {
487                         reg = <0>;
488                         type = <PCA955X_TYPE_GPIO>;
489                 };
490
491                 gpio@1 {
492                         reg = <1>;
493                         type = <PCA955X_TYPE_GPIO>;
494                 };
495
496                 gpio@2 {
497                         reg = <2>;
498                         type = <PCA955X_TYPE_GPIO>;
499                 };
500
501                 gpio@3 {
502                         reg = <3>;
503                         type = <PCA955X_TYPE_GPIO>;
504                 };
505
506                 gpio@4 {
507                         reg = <4>;
508                         type = <PCA955X_TYPE_GPIO>;
509                 };
510
511                 gpio@5 {
512                         reg = <5>;
513                         type = <PCA955X_TYPE_GPIO>;
514                 };
515
516                 gpio@6 {
517                         reg = <6>;
518                         type = <PCA955X_TYPE_GPIO>;
519                 };
520
521                 gpio@7 {
522                         reg = <7>;
523                         type = <PCA955X_TYPE_GPIO>;
524                 };
525
526                 gpio@8 {
527                         reg = <8>;
528                         type = <PCA955X_TYPE_GPIO>;
529                 };
530
531                 gpio@9 {
532                         reg = <9>;
533                         type = <PCA955X_TYPE_GPIO>;
534                 };
535
536                 gpio@10 {
537                         reg = <10>;
538                         type = <PCA955X_TYPE_GPIO>;
539                 };
540
541                 gpio@11 {
542                         reg = <11>;
543                         type = <PCA955X_TYPE_GPIO>;
544                 };
545
546                 gpio@12 {
547                         reg = <12>;
548                         type = <PCA955X_TYPE_GPIO>;
549                 };
550
551                 gpio@13 {
552                         reg = <13>;
553                         type = <PCA955X_TYPE_GPIO>;
554                 };
555
556                 gpio@14 {
557                         reg = <14>;
558                         type = <PCA955X_TYPE_GPIO>;
559                 };
560
561                 gpio@15 {
562                         reg = <15>;
563                         type = <PCA955X_TYPE_GPIO>;
564                 };
565         };
566
567         power-supply@68 {
568                 compatible = "ibm,cffps1";
569                 reg = <0x68>;
570         };
571
572         power-supply@69 {
573                 compatible = "ibm,cffps1";
574                 reg = <0x69>;
575         };
576 };
577
578 &i2c4 {
579         status = "okay";
580
581         tmp423a@4c {
582                 compatible = "ti,tmp423";
583                 reg = <0x4c>;
584         };
585
586         ir35221@70 {
587                 compatible = "infineon,ir35221";
588                 reg = <0x70>;
589         };
590
591         ir35221@71 {
592                 compatible = "infineon,ir35221";
593                 reg = <0x71>;
594         };
595 };
596
597 &i2c5 {
598         status = "okay";
599
600         tmp423a@4c {
601                 compatible = "ti,tmp423";
602                 reg = <0x4c>;
603         };
604
605         ir35221@70 {
606                 compatible = "infineon,ir35221";
607                 reg = <0x70>;
608         };
609
610         ir35221@71 {
611                 compatible = "infineon,ir35221";
612                 reg = <0x71>;
613         };
614 };
615
616 &i2c7 {
617         status = "okay";
618 };
619
620 &i2c9 {
621         status = "okay";
622
623         tmp275@4a {
624                 compatible = "ti,tmp275";
625                 reg = <0x4a>;
626         };
627 };
628
629 &i2c10 {
630         status = "okay";
631 };
632
633 &i2c11 {
634         status = "okay";
635
636         pca9552: pca9552@60 {
637                 compatible = "nxp,pca9552";
638                 reg = <0x60>;
639                 #address-cells = <1>;
640                 #size-cells = <0>;
641                 gpio-controller;
642                 #gpio-cells = <2>;
643
644                 gpio-line-names = "PS_SMBUS_RESET_N", "APSS_RESET_N",
645                         "GPU0_TH_OVERT_N_BUFF", "GPU1_TH_OVERT_N_BUFF",
646                         "GPU2_TH_OVERT_N_BUFF", "GPU3_TH_OVERT_N_BUFF",
647                         "GPU4_TH_OVERT_N_BUFF", "GPU5_TH_OVERT_N_BUFF",
648                         "GPU0_PWR_GOOD_BUFF", "GPU1_PWR_GOOD_BUFF",
649                         "GPU2_PWR_GOOD_BUFF", "GPU3_PWR_GOOD_BUFF",
650                         "GPU4_PWR_GOOD_BUFF", "GPU5_PWR_GOOD_BUFF",
651                         "12V_BREAKER_FLT_N", "THROTTLE_UNLATCHED_N";
652
653                 gpio@0 {
654                         reg = <0>;
655                         type = <PCA955X_TYPE_GPIO>;
656                 };
657
658                 gpio@1 {
659                         reg = <1>;
660                         type = <PCA955X_TYPE_GPIO>;
661                 };
662
663                 gpio@2 {
664                         reg = <2>;
665                         type = <PCA955X_TYPE_GPIO>;
666                 };
667
668                 gpio@3 {
669                         reg = <3>;
670                         type = <PCA955X_TYPE_GPIO>;
671                 };
672
673                 gpio@4 {
674                         reg = <4>;
675                         type = <PCA955X_TYPE_GPIO>;
676                 };
677
678                 gpio@5 {
679                         reg = <5>;
680                         type = <PCA955X_TYPE_GPIO>;
681                 };
682
683                 gpio@6 {
684                         reg = <6>;
685                         type = <PCA955X_TYPE_GPIO>;
686                 };
687
688                 gpio@7 {
689                         reg = <7>;
690                         type = <PCA955X_TYPE_GPIO>;
691                 };
692
693                 gpio@8 {
694                         reg = <8>;
695                         type = <PCA955X_TYPE_GPIO>;
696                 };
697
698                 gpio@9 {
699                         reg = <9>;
700                         type = <PCA955X_TYPE_GPIO>;
701                 };
702
703                 gpio@10 {
704                         reg = <10>;
705                         type = <PCA955X_TYPE_GPIO>;
706                 };
707
708                 gpio@11 {
709                         reg = <11>;
710                         type = <PCA955X_TYPE_GPIO>;
711                 };
712
713                 gpio@12 {
714                         reg = <12>;
715                         type = <PCA955X_TYPE_GPIO>;
716                 };
717
718                 gpio@13 {
719                         reg = <13>;
720                         type = <PCA955X_TYPE_GPIO>;
721                 };
722
723                 gpio@14 {
724                         reg = <14>;
725                         type = <PCA955X_TYPE_GPIO>;
726                 };
727
728                 gpio@15 {
729                         reg = <15>;
730                         type = <PCA955X_TYPE_GPIO>;
731                 };
732         };
733
734         rtc@32 {
735                 compatible = "epson,rx8900";
736                 reg = <0x32>;
737         };
738
739         eeprom@51 {
740                 compatible = "atmel,24c64";
741                 reg = <0x51>;
742         };
743
744         ucd90160@64 {
745                 compatible = "ti,ucd90160";
746                 reg = <0x64>;
747         };
748 };
749
750 &i2c12 {
751         status = "okay";
752 };
753
754 &i2c13 {
755         status = "okay";
756 };
757
758 &ibt {
759         status = "okay";
760 };
761
762 &uart1 {
763         status = "okay";
764         // Workaround for A0
765         compatible = "snps,dw-apb-uart";
766 };
767
768 &uart5 {
769         // Workaround for A0
770         compatible = "snps,dw-apb-uart";
771 };
772
773 &vuart1 {
774         status = "okay";
775 };
776
777 &lpc_ctrl {
778         status = "okay";
779         memory-region = <&flash_memory>;
780         flash = <&spi1>;
781 };
782
783 &wdt1 {
784         aspeed,reset-type = "none";
785         aspeed,external-signal;
786         aspeed,ext-push-pull;
787         aspeed,ext-active-high;
788
789         pinctrl-names = "default";
790         pinctrl-0 = <&pinctrl_wdtrst1_default>;
791 };
792
793 &wdt2 {
794         status = "okay";
795 };
796
797 &pinctrl {
798         /* Hog these as no driver is probed for the entire LPC block */
799         pinctrl-names = "default";
800         pinctrl-0 = <&pinctrl_lpc_default>,
801                     <&pinctrl_lsirq_default>;
802 };