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 kscan test suites */
32		kscan0 = &kscan_input;
33	};
34
35	pwmleds {
36		compatible = "pwm-leds";
37		pwm_led0_green: pwm_led_0 {
38			pwms = <&pwm6 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
39			label = "User D7 green";
40		};
41	};
42};
43
44/* Overwrite default device properties with overlays in board dt file here. */
45&uart1 {
46	status = "okay";
47	current-speed = <115200>;
48	/* Use UART1_SL2 ie. PIN64.65 */
49	pinctrl-0 = <&uart1_2_sin_sout_gp64_65>;
50	pinctrl-names = "default";
51};
52
53&pwm6 {
54	status = "okay";
55	pinctrl-0 = <&pwm6_gpc0>;
56	pinctrl-names = "default";
57};
58
59&adc0 {
60	status = "okay";
61	/* Use adc0 channel 0 and 2 for 'adc_api' driver tests */
62	pinctrl-0 = <&adc0_chan0_gp45
63		     &adc0_chan2_gp43>;
64	pinctrl-names = "default";
65};
66
67&espi0 {
68	status = "okay";
69	pinctrl-0 = <&espi_lpc_gp46_47_51_52_53_54_55_57>;
70	pinctrl-names = "default";
71};
72
73&i2c0_0 {
74	status = "okay";
75	pinctrl-0 = <&i2c0_0_sda_scl_gpb4_b5>;
76	pinctrl-names = "default";
77	clock-frequency = <I2C_BITRATE_FAST>;
78};
79
80&i2c_ctrl0 {
81	status = "okay";
82};
83
84&tach1 {
85	status = "okay";
86	pinctrl-0 = <&ta1_1_in_gp40>;
87	pinctrl-names = "default";
88	port = <NPCX_TACH_PORT_A>; /* port-A is selected */
89	sample-clk = <NPCX_TACH_FREQ_LFCLK>; /* Use LFCLK as sampling clock */
90	pulses-per-round = <1>; /* number of pulses per round of encoder */
91};
92
93&peci0 {
94	status = "okay";
95	pinctrl-0 = <&peci_dat_gp81>;
96	pinctrl-names = "default";
97};
98
99&kbd {
100	/* Demonstrate a 6 x 8 keyboard matrix on evb */
101	pinctrl-0 = <&ksi0_gp31 /* KSI0 PIN31 */
102		     &ksi1_gp30 /* KSI1 PIN30 */
103		     &ksi2_gp27 /* KSI2 PIN27 */
104		     &ksi3_gp26 /* KSI3 PIN26 */
105		     &ksi4_gp25 /* KSI4 PIN25 */
106		     &ksi5_gp24 /* KSI5 PIN24 */
107		     &ksi6_gp23 /* KSI6 PIN23 */
108		     &ksi7_gp22 /* KSI7 PIN22 */
109		     &kso00_gp21 /* KSO00 PIN21 */
110		     &kso01_gp20 /* KSO01 PIN20 */
111		     &kso02_gp17 /* KSO02 PIN17 */
112		     &kso03_gp16 /* KSO03 PIN16 */
113		     &kso04_gp15 /* KSO04 PIN15 */
114		     &kso05_gp14 /* KSO05 PIN14 */
115		     >;
116	pinctrl-names = "default";
117	row-size = <8>;
118	col-size = <6>;
119	status = "okay";
120
121	kscan_input: kscan-input {
122		compatible = "zephyr,kscan-input";
123	};
124};
125