1/*
2 * Copyright (c) 2020 Nuvoton Technology Corporation.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <nuvoton/npcx7m6fb.dtsi>
10#include "npcx7m6fb_evb-pinctrl.dtsi"
11
12/ {
13	model = "Nuvoton NPCX7M6FB evaluation board";
14
15	chosen {
16		zephyr,sram = &sram0;
17		zephyr,console = &uart1;
18		zephyr,flash = &flash0;
19		zephyr,keyboard-scan = &kscan_input;
20	};
21
22	aliases {
23		/* For samples/basic/blinky_pwm */
24		pwm-led0 = &pwm_led0_green;
25		/* For pwm test suites */
26		pwm-0 = &pwm6;
27		/* For i2c test suites */
28		i2c-0 = &i2c0_0;
29		watchdog0 = &twd0;
30		peci-0 = &peci0;
31		/* For samples/drivers/spi_flash */
32		spi-flash0 = &int_flash;
33		/* For kscan test suites */
34		kscan0 = &kscan_input;
35	};
36
37	pwmleds {
38		compatible = "pwm-leds";
39		pwm_led0_green: pwm_led_0 {
40			pwms = <&pwm6 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
41			label = "User D7 green";
42		};
43	};
44
45	power-states {
46		suspend_to_idle0: suspend-to-idle0 {
47			compatible = "zephyr,power-state";
48			power-state-name = "suspend-to-idle";
49			substate-id = <0>;
50			min-residency-us = <1000>;
51		};
52
53		suspend_to_idle1: suspend-to-idle1 {
54			compatible = "zephyr,power-state";
55			power-state-name = "suspend-to-idle";
56			substate-id = <1>;
57			min-residency-us = <201000>;
58		};
59	};
60};
61
62&cpu0 {
63	cpu-power-states = <&suspend_to_idle0 &suspend_to_idle1>;
64};
65
66/* Overwrite default device properties with overlays in board dt file here. */
67&uart1 {
68	status = "okay";
69	current-speed = <115200>;
70	/* Use UART1_SL2 ie. PIN64.65 */
71	pinctrl-0 = <&uart1_2_sin_sout_gp64_65>;
72	pinctrl-names = "default";
73};
74
75&pwm6 {
76	status = "okay";
77	pinctrl-0 = <&pwm6_gpc0>;
78	pinctrl-names = "default";
79};
80
81&adc0 {
82	status = "okay";
83	/* Use adc0 channel 0 and 2 for 'adc_api' driver tests */
84	pinctrl-0 = <&adc0_chan0_gp45
85		     &adc0_chan2_gp43>;
86	pinctrl-names = "default";
87};
88
89&espi0 {
90	status = "okay";
91	pinctrl-0 = <&espi_lpc_gp46_47_51_52_53_54_55_57>;
92	pinctrl-names = "default";
93};
94
95&i2c0_0 {
96	status = "okay";
97	pinctrl-0 = <&i2c0_0_sda_scl_gpb4_b5>;
98	pinctrl-names = "default";
99	clock-frequency = <I2C_BITRATE_FAST>;
100};
101
102&i2c_ctrl0 {
103	status = "okay";
104};
105
106&tach1 {
107	status = "okay";
108	pinctrl-0 = <&ta1_1_in_gp40>;
109	pinctrl-names = "default";
110	port = <NPCX_TACH_PORT_A>; /* port-A is selected */
111	sample-clk = <NPCX_TACH_FREQ_LFCLK>; /* Use LFCLK as sampling clock */
112	pulses-per-round = <1>; /* number of pulses per round of encoder */
113};
114
115&peci0 {
116	status = "okay";
117	pinctrl-0 = <&peci_dat_gp81>;
118	pinctrl-names = "default";
119};
120
121&kbd {
122	/* Demonstrate a 6 x 8 keyboard matrix on evb */
123	pinctrl-0 = <&ksi0_gp31 /* KSI0 PIN31 */
124		     &ksi1_gp30 /* KSI1 PIN30 */
125		     &ksi2_gp27 /* KSI2 PIN27 */
126		     &ksi3_gp26 /* KSI3 PIN26 */
127		     &ksi4_gp25 /* KSI4 PIN25 */
128		     &ksi5_gp24 /* KSI5 PIN24 */
129		     &ksi6_gp23 /* KSI6 PIN23 */
130		     &ksi7_gp22 /* KSI7 PIN22 */
131		     &kso00_gp21 /* KSO00 PIN21 */
132		     &kso01_gp20 /* KSO01 PIN20 */
133		     &kso02_gp17 /* KSO02 PIN17 */
134		     &kso03_gp16 /* KSO03 PIN16 */
135		     &kso04_gp15 /* KSO04 PIN15 */
136		     &kso05_gp14 /* KSO05 PIN14 */
137		     >;
138	pinctrl-names = "default";
139	row-size = <8>;
140	col-size = <6>;
141	status = "okay";
142
143	kscan_input: kscan-input {
144		compatible = "zephyr,kscan-input";
145	};
146};
147