summaryrefslogtreecommitdiff
path: root/zephyr/boards/arm/herobrine_npcx9/herobrine_npcx9.dts
blob: 34884a82751b7b8ebde220eac4590c628104cc15 (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
/* Copyright 2021 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/dts-v1/;

#include <cros/nuvoton/npcx9.dtsi>
#include <dt-bindings/adc/adc.h>
#include <dt-bindings/gpio_defines.h>
#include <dt-bindings/wake_mask_event_defines.h>
#include <nuvoton/npcx9m3f.dtsi>

/ {
	model = "Google Herobrine-NPCX9 Baseboard";

	chosen {
		zephyr,sram = &sram0;
		zephyr,console = &uart1;
		zephyr,shell-uart = &uart1;
		zephyr,flash = &flash0;
		cros,rtc = &pcf85063a;
	};

	ec-console {
		compatible = "ec-console";

		disabled = "hostcmd";
	};

	ec-mkbp-host-event-wakeup-mask {
		compatible = "ec-wake-mask-event";
		wakeup-mask = <(HOST_EVENT_LID_OPEN | \
				HOST_EVENT_POWER_BUTTON | \
				HOST_EVENT_AC_CONNECTED | \
				HOST_EVENT_AC_DISCONNECTED | \
				HOST_EVENT_HANG_DETECT | \
				HOST_EVENT_RTC | \
				HOST_EVENT_MODE_CHANGE | \
				HOST_EVENT_DEVICE)>;
	};

	ec-mkbp-event-wakeup-mask {
		compatible = "ec-wake-mask-event";
		wakeup-mask = <(MKBP_EVENT_KEY_MATRIX | \
				MKBP_EVENT_HOST_EVENT | \
				MKBP_EVENT_SENSOR_FIFO)>;
	};

	named-pwms {
		compatible = "named-pwms";

		kblight {
			pwms = <&pwm3 0 0>;
			label = "KBLIGHT";
			frequency = <10000>;
		};
		displight {
			pwms = <&pwm5 0 0>;
			label = "DISPLIGHT";
			frequency = <4800>;
		};
	};

	named-adc-channels {
		compatible = "named-adc-channels";

		vbus {
			label = "ADC_VBUS";
			enum-name = "ADC_VBUS";
			channel = <1>;
			/* Measure VBUS through a 1/10 voltage divider */
			mul = <10>;
		};
		amon_bmon {
			label = "ADC_AMON_BMON";
			enum-name = "ADC_AMON_BMON";
			channel = <2>;
			/*
			 * Adapter current output or battery charging/
			 * discharging current (uV) 18x amplification on
			 * charger side.
			 */
			mul = <1000>;
			div = <18>;
		};
		psys {
			label = "ADC_PSYS";
			enum-name = "ADC_PSYS";
			channel = <3>;
			/*
			 * ISL9238 PSYS output is 1.44 uA/W over 5.6K resistor,
			 * to read 0.8V @ 99 W, i.e. 124000 uW/mV.
			 */
			mul = <124000>;
		};
	};
};

&uart1 {
	status = "okay";
	current-speed = <115200>;
	pinctrl-0 = <&altj_cr_sin1_sl2 &altj_cr_sout1_sl2>;
};

/* Keyboard backlight */
&pwm3 {
	status = "okay";
};

/* Display backlight */
&pwm5 {
	status = "okay";
};

&adc0 {
	status = "okay";
};

&cros_kb_raw {
	status = "okay";
	/* No KSO2 (it's inverted and implemented by GPIO) */
	pinctrl-0 = <&alt7_no_ksi0_sl
		     &alt7_no_ksi1_sl
		     &alt7_no_ksi2_sl
		     &alt7_no_ksi3_sl
		     &alt7_no_ksi4_sl
		     &alt7_no_ksi5_sl
		     &alt7_no_ksi6_sl
		     &alt7_no_ksi7_sl
		     &alt8_no_kso00_sl
		     &alt8_no_kso01_sl
		     &alt8_no_kso03_sl
		     &alt8_no_kso04_sl
		     &alt8_no_kso05_sl
		     &alt8_no_kso06_sl
		     &alt8_no_kso07_sl
		     &alt9_no_kso08_sl
		     &alt9_no_kso09_sl
		     &alt9_no_kso10_sl
		     &alt9_no_kso11_sl
		     &alt9_no_kso12_sl
		     >;
};