1/*
2 * Copyright (c) 2018, Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include "mec15xxevb_assy6853-pinctrl.dtsi"
10
11/ {
12	model = "Microchip MEC15XXEVB_ASSY6853 evaluation board";
13	compatible = "microchip,mec15xxevb_assy6853", "microchip,mec1501hsz";
14
15	chosen {
16		zephyr,sram = &sram0;
17		zephyr,console = &uart2;
18		zephyr,flash = &flash0;
19		zephyr,keyboard-scan = &kscan_input;
20	};
21
22	aliases {
23		led0 = &led2;
24		led1 = &led3;
25		led2 = &led4;
26		pwm-0 = &pwm0;
27		peci-0 = &peci0;
28		i2c0 = &i2c_smb_0;
29		i2c-0 = &i2c_smb_0;
30		i2c1 = &i2c_smb_1;
31		i2c7 = &i2c_smb_2;
32		kscan0 = &kscan_input;
33		watchdog0 = &wdog;
34	};
35
36	leds {
37		compatible = "gpio-leds";
38		led2: led_0 {
39			/* GPIO156/LED0 on schematic,
40			 * LED2 on silkscreen.
41			 */
42			gpios = <MCHP_GPIO_DECODE_156 GPIO_ACTIVE_LOW>;
43			label = "LED 2";
44		};
45		led3: led_1 {
46			/* GPIO157/LED1 on schematic,
47			 * LED3 on silkscreen.
48			 */
49			gpios = <MCHP_GPIO_DECODE_157 GPIO_ACTIVE_LOW>;
50			label = "LED 3";
51		};
52		led4: led_2 {
53			/* GPIO153/LED2 on schematic,
54			 * LED4 on silkscreen.
55			 */
56			gpios = <MCHP_GPIO_DECODE_153 GPIO_ACTIVE_LOW>;
57			label = "LED 4";
58		};
59	};
60};
61
62&pcr {
63	status = "okay";
64};
65
66&uart2 {
67	status = "okay";
68	current-speed = <115200>;
69	pinctrl-0 = <&uart2_tx_gpio146 &uart2_rx_gpio145>;
70	pinctrl-names = "default";
71};
72
73&adc0 {
74	status = "okay";
75	pinctrl-0 = <&adc04_gpio204 &adc05_gpio205
76		     &adc06_gpio206 &adc07_gpio207
77		     &vref2_adc_gpio067 >;
78	pinctrl-names = "default";
79};
80
81&i2c_smb_0 {
82	status = "okay";
83	port_sel = <0>;
84	sda-gpios = <MCHP_GPIO_DECODE_003 0>;
85	scl-gpios = <MCHP_GPIO_DECODE_004 0>;
86	pinctrl-0 = < &i2c00_scl_gpio004 &i2c00_sda_gpio003 >;
87	pinctrl-names = "default";
88};
89
90&i2c_smb_1 {
91	status = "okay";
92	port_sel = <1>;
93	sda-gpios = <MCHP_GPIO_DECODE_130 0>;
94	scl-gpios = <MCHP_GPIO_DECODE_131 0>;
95	pinctrl-0 = < &i2c01_scl_gpio131 &i2c01_sda_gpio130 >;
96	pinctrl-names = "default";
97
98	pca9555@26 {
99		compatible = "nxp,pca95xx";
100
101		/* Depends on JP53 for device address.
102		 * Pin 1-2 = A0, pin 3-4 = A1, pin 5-6 = A2.
103		 * Address is: 0100<A2><A1><A0>b.
104		 *
105		 * Default has pin 1-2 on JP53 connected,
106		 * resulting in device address 0x26.
107		 */
108		reg = <0x26>;
109
110		gpio-controller;
111		#gpio-cells = <2>;
112	};
113};
114
115&i2c_smb_2 {
116	status = "okay";
117	port_sel = <7>;
118	sda-gpios = <MCHP_GPIO_DECODE_012 0>;
119	scl-gpios = <MCHP_GPIO_DECODE_013 0>;
120	pinctrl-0 = < &i2c07_scl_gpio013 &i2c07_sda_gpio012 >;
121	pinctrl-names = "default";
122};
123
124&espi0 {
125	status = "okay";
126	io_girq = <19>;
127	vw_girqs = <24 25>;
128	pc_girq = <15>;
129	pinctrl-0 = < &espi_reset_n_gpio061 &espi_cs_n_gpio066
130		  &espi_alert_n_gpio063 &espi_clk_gpio065
131		  &espi_io0_gpio070 &espi_io1_gpio071
132		  &espi_io2_gpio072 &espi_io3_gpio073 >;
133	pinctrl-names = "default";
134};
135
136&timer5 {
137	status = "okay";
138};
139
140&ps2_0 {
141	status = "okay";
142	pinctrl-0 = <&ps2_clk0b_gpio007 &ps2_dat0b_gpio010>;
143	pinctrl-1 = <&ps2_clk0b_gpio007_sleep &ps2_dat0b_gpio010_sleep>;
144	pinctrl-names = "default", "sleep";
145};
146
147&ps2_1 {
148	status = "okay";
149	pinctrl-0 = <&ps2_clk1b_gpio154 &ps2_dat1b_gpio155>;
150	pinctrl-1 = <&ps2_clk1b_gpio154_sleep &ps2_dat1b_gpio155_sleep>;
151	pinctrl-names = "default", "sleep";
152};
153
154&pwm0 {
155	status = "okay";
156	pinctrl-0 = <&pwm0_gpio053>;
157	pinctrl-names = "default";
158};
159
160&kbd0 {
161	status = "okay";
162
163	pinctrl-0 = < &kso00_gpio040 &kso01_gpio045 &kso02_gpio046 &kso12_gpio125
164		      &kso13_gpio126 &kso03_gpio047 &kso04_gpio107 &kso05_gpio112
165		      &kso06_gpio113 &kso14_gpio152 &kso15_gpio151 &kso07_gpio120
166		      &kso08_gpio121 &kso09_gpio122 &kso10_gpio123 &kso11_gpio124
167		      &ksi0_gpio017  &ksi1_gpio020  &ksi2_gpio021  &ksi3_gpio026
168		      &ksi4_gpio027  &ksi5_gpio030  &ksi6_gpio031  &ksi7_gpio032 >;
169	pinctrl-1 = < &kso00_gpio040_sleep &kso01_gpio045_sleep &kso02_gpio046_sleep
170		      &kso12_gpio125_sleep &kso13_gpio126_sleep &kso03_gpio047_sleep
171		      &kso04_gpio107_sleep &kso05_gpio112_sleep &kso06_gpio113_sleep
172		      &kso14_gpio152_sleep &kso15_gpio151_sleep &kso07_gpio120_sleep
173		      &kso08_gpio121_sleep &kso09_gpio122_sleep &kso10_gpio123_sleep
174		      &kso11_gpio124_sleep &ksi0_gpio017_sleep  &ksi1_gpio020_sleep
175		      &ksi2_gpio021_sleep  &ksi3_gpio026_sleep  &ksi4_gpio027_sleep
176		      &ksi5_gpio030_sleep  &ksi6_gpio031_sleep  &ksi7_gpio032_sleep >;
177	pinctrl-names = "default", "sleep";
178	row-size = <8>;
179	col-size = <16>;
180
181	kscan_input: kscan-input {
182		compatible = "zephyr,kscan-input";
183	};
184};
185
186&peci0 {
187	status = "okay";
188	pinctrl-0 = <&peci_dat_gpio042 &vref_vtt_gpio044>;
189	pinctrl-1 = <&peci_dat_gpio042_sleep &vref_vtt_gpio044_sleep>;
190	pinctrl-names = "default", "sleep";
191};
192
193&spi0 {
194	status = "okay";
195	port_sel = <0>;
196	chip_select = <0>;
197	lines = <1>;
198	pinctrl-0 = < &shd_cs0_n_gpio055
199		      &shd_clk_gpio056
200		      &shd_io0_gpio223
201		      &shd_io1_gpio224 >;
202	pinctrl-names = "default";
203};
204
205&tach0 {
206	status = "okay";
207	pinctrl-0 = <&ict0_tach0_gpio050>;
208	pinctrl-names = "default";
209};
210