summaryrefslogtreecommitdiff
path: root/zephyr/projects/npcx_evb
diff options
context:
space:
mode:
authorMulin Chao <mlchao@nuvoton.com>2022-05-11 23:06:24 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-23 21:47:32 +0000
commit6f475496b20f20660696b07356fb610ff7e24f48 (patch)
tree9a7cf7130f88620b25ac7d1b7edb0571aa2b48f4 /zephyr/projects/npcx_evb
parent0cee977903d8633acfa94badedaf7ff40a9d921d (diff)
downloadchrome-ec-6f475496b20f20660696b07356fb610ff7e24f48.tar.gz
zephyr: npcx_evb: Add pinctrl driver support
In order to support 'Road from pinmux to pinctrl' on zephyr community. Nuvoton has summbited the PR for npcx ec pin-muxing and pad's property configuration via pinctrl driver. Hence, this CL collects the necessary changes for npcx7/9 evb. BUG=b:232543902 BRANCH=none TEST=zmake build npcx7 --clobber, zmake build npcx9 --clobber Passed basic verification for peripheral devices on npcx evb. Signed-off-by: Mulin Chao <mlchao@nuvoton.com> Change-Id: I2a3da73e060a4d492e7aec8eecd374ea521f02ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3647371 Tested-by: Keith Short <keithshort@chromium.org> Reviewed-by: Sam Hurst <shurst@google.com> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/projects/npcx_evb')
-rw-r--r--zephyr/projects/npcx_evb/npcx7/fan.dts10
-rw-r--r--zephyr/projects/npcx_evb/npcx7/keyboard.dts2
-rw-r--r--zephyr/projects/npcx_evb/npcx9/fan.dts10
-rw-r--r--zephyr/projects/npcx_evb/npcx9/keyboard.dts2
4 files changed, 20 insertions, 4 deletions
diff --git a/zephyr/projects/npcx_evb/npcx7/fan.dts b/zephyr/projects/npcx_evb/npcx7/fan.dts
index d3c53c0bbe..adfd71c95d 100644
--- a/zephyr/projects/npcx_evb/npcx7/fan.dts
+++ b/zephyr/projects/npcx_evb/npcx7/fan.dts
@@ -22,13 +22,19 @@
/* Tachometer for fan speed measurement */
&tach1 {
status = "okay";
- pinctrl-0 = <&alt3_ta1_sl1>; /* Use TA1 as input pin */
+ pinctrl-0 = <&ta1_1_in_gp40>;
+ pinctrl-names = "default";
port = <NPCX_TACH_PORT_A>; /* port-A is selected */
sample-clk = <NPCX_TACH_FREQ_LFCLK>; /* Use LFCLK as sampling clock */
pulses-per-round = <2>; /* number of pulses per round of encoder */
};
+&pwm0_gpc3 {
+ drive-open-drain;
+};
+
&pwm0 {
status = "okay";
- drive-open-drain;
+ pinctrl-0 = <&pwm0_gpc3>;
+ pinctrl-names = "default";
};
diff --git a/zephyr/projects/npcx_evb/npcx7/keyboard.dts b/zephyr/projects/npcx_evb/npcx7/keyboard.dts
index 299e93a52a..e2a5010952 100644
--- a/zephyr/projects/npcx_evb/npcx7/keyboard.dts
+++ b/zephyr/projects/npcx_evb/npcx7/keyboard.dts
@@ -38,4 +38,6 @@
&pwm2 {
status = "okay";
+ pinctrl-0 = <&pwm2_gpc4>;
+ pinctrl-names = "default";
};
diff --git a/zephyr/projects/npcx_evb/npcx9/fan.dts b/zephyr/projects/npcx_evb/npcx9/fan.dts
index d3c53c0bbe..adfd71c95d 100644
--- a/zephyr/projects/npcx_evb/npcx9/fan.dts
+++ b/zephyr/projects/npcx_evb/npcx9/fan.dts
@@ -22,13 +22,19 @@
/* Tachometer for fan speed measurement */
&tach1 {
status = "okay";
- pinctrl-0 = <&alt3_ta1_sl1>; /* Use TA1 as input pin */
+ pinctrl-0 = <&ta1_1_in_gp40>;
+ pinctrl-names = "default";
port = <NPCX_TACH_PORT_A>; /* port-A is selected */
sample-clk = <NPCX_TACH_FREQ_LFCLK>; /* Use LFCLK as sampling clock */
pulses-per-round = <2>; /* number of pulses per round of encoder */
};
+&pwm0_gpc3 {
+ drive-open-drain;
+};
+
&pwm0 {
status = "okay";
- drive-open-drain;
+ pinctrl-0 = <&pwm0_gpc3>;
+ pinctrl-names = "default";
};
diff --git a/zephyr/projects/npcx_evb/npcx9/keyboard.dts b/zephyr/projects/npcx_evb/npcx9/keyboard.dts
index 299e93a52a..e2a5010952 100644
--- a/zephyr/projects/npcx_evb/npcx9/keyboard.dts
+++ b/zephyr/projects/npcx_evb/npcx9/keyboard.dts
@@ -38,4 +38,6 @@
&pwm2 {
status = "okay";
+ pinctrl-0 = <&pwm2_gpc4>;
+ pinctrl-names = "default";
};