diff options
author | Mulin Chao <mlchao@nuvoton.com> | 2022-05-12 23:26:44 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-23 21:47:32 +0000 |
commit | 491669479af11fff2e2daa175fa8da73a3eea5c6 (patch) | |
tree | 919a935b49d0e7cdddeae56cdc7352b745db81f1 | |
parent | 13755183bb4a1b9ad3fd16ad096bc67755aee74b (diff) | |
download | chrome-ec-491669479af11fff2e2daa175fa8da73a3eea5c6.tar.gz |
zephyr: skyrim: guybrush: Add support for pinctrl driver
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. Hence, this CL collects the necessary changes for
skyrim and gubrush projects.
BUG=b:232543902
BRANCH=none
TEST=zmake build skyrim --clobber, zmake build guybrush --clobber
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Change-Id: I565df153e859381f7ab80318e2f000b2d85095fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3647376
Reviewed-by: Diana Z <dzigterman@chromium.org>
Tested-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r-- | zephyr/projects/skyrim/adc.dts | 5 | ||||
-rw-r--r-- | zephyr/projects/skyrim/fan.dts | 10 | ||||
-rw-r--r-- | zephyr/projects/skyrim/gpio.dts | 4 | ||||
-rw-r--r-- | zephyr/projects/skyrim/guybrush.dts | 7 | ||||
-rw-r--r-- | zephyr/projects/skyrim/i2c.dts | 16 | ||||
-rw-r--r-- | zephyr/projects/skyrim/keyboard.dts | 2 | ||||
-rw-r--r-- | zephyr/projects/skyrim/pwm_leds.dts | 4 | ||||
-rw-r--r-- | zephyr/projects/skyrim/skyrim.dts | 7 |
8 files changed, 49 insertions, 6 deletions
diff --git a/zephyr/projects/skyrim/adc.dts b/zephyr/projects/skyrim/adc.dts index 4357a1e88d..40fe146a06 100644 --- a/zephyr/projects/skyrim/adc.dts +++ b/zephyr/projects/skyrim/adc.dts @@ -73,6 +73,11 @@ &adc0 { status = "okay"; + pinctrl-0 = <&adc0_chan1_gp44 + &adc0_chan2_gp43 + &adc0_chan3_gp42 + &adc0_chan4_gp41>; + pinctrl-names = "default"; }; &thermistor_3V3_30K9_47K_4050B { diff --git a/zephyr/projects/skyrim/fan.dts b/zephyr/projects/skyrim/fan.dts index ba104044b2..042b9399dc 100644 --- a/zephyr/projects/skyrim/fan.dts +++ b/zephyr/projects/skyrim/fan.dts @@ -22,13 +22,19 @@ /* Tachemeter 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/skyrim/gpio.dts b/zephyr/projects/skyrim/gpio.dts index 4e717482eb..a06bb070ab 100644 --- a/zephyr/projects/skyrim/gpio.dts +++ b/zephyr/projects/skyrim/gpio.dts @@ -290,8 +290,6 @@ }; &i2c0_0 { - status = "okay"; - nct3807_C0:nct3807_C0@70 { #address-cells = <1>; #size-cells = <0>; @@ -329,8 +327,6 @@ }; &i2c1_0 { - status = "okay"; - nct3807_C1:nct3807_C1@70 { #address-cells = <1>; #size-cells = <0>; diff --git a/zephyr/projects/skyrim/guybrush.dts b/zephyr/projects/skyrim/guybrush.dts index 7f2088949b..6c5c72d061 100644 --- a/zephyr/projects/skyrim/guybrush.dts +++ b/zephyr/projects/skyrim/guybrush.dts @@ -189,3 +189,10 @@ }; }; }; + +/* host interface */ +&espi0 { + status = "okay"; + pinctrl-0 = <&espi_lpc_gp46_47_51_52_53_54_55_57>; + pinctrl-names = "default"; +}; diff --git a/zephyr/projects/skyrim/i2c.dts b/zephyr/projects/skyrim/i2c.dts index 7a50466f16..3ac516eb46 100644 --- a/zephyr/projects/skyrim/i2c.dts +++ b/zephyr/projects/skyrim/i2c.dts @@ -66,6 +66,8 @@ status = "okay"; label = "I2C_TCPC0"; clock-frequency = <I2C_BITRATE_FAST>; + pinctrl-0 = <&i2c0_0_sda_scl_gpb4_b5>; + pinctrl-names = "default"; }; &i2c_ctrl0 { @@ -76,6 +78,8 @@ status = "okay"; label = "I2C_TCPC1"; clock-frequency = <I2C_BITRATE_FAST>; + pinctrl-0 = <&i2c1_0_sda_scl_gp87_90>; + pinctrl-names = "default"; }; &i2c_ctrl1 { @@ -86,6 +90,8 @@ status = "okay"; label = "I2C_BATTERY"; clock-frequency = <I2C_BITRATE_STANDARD>; + pinctrl-0 = <&i2c2_0_sda_scl_gp91_92>; + pinctrl-names = "default"; }; &i2c_ctrl2 { @@ -96,6 +102,8 @@ status = "okay"; label = "I2C_USB_MUX"; clock-frequency = <I2C_BITRATE_FAST>; + pinctrl-0 = <&i2c3_0_sda_scl_gpd0_d1>; + pinctrl-names = "default"; }; &i2c_ctrl3 { @@ -106,6 +114,8 @@ status = "okay"; label = "I2C_CHARGER"; clock-frequency = <I2C_BITRATE_FAST>; + pinctrl-0 = <&i2c4_1_sda_scl_gpf2_f3>; + pinctrl-names = "default"; }; &i2c_ctrl4 { @@ -116,6 +126,8 @@ status = "okay"; label = "I2C_EEPROM"; clock-frequency = <I2C_BITRATE_FAST>; + pinctrl-0 = <&i2c5_0_sda_scl_gp33_36>; + pinctrl-names = "default"; cbi_eeprom: eeprom@50 { compatible = "atmel,at24"; @@ -136,6 +148,8 @@ status = "okay"; label = "I2C_SENSOR"; clock-frequency = <I2C_BITRATE_FAST>; + pinctrl-0 = <&i2c6_1_sda_scl_gpe3_e4>; + pinctrl-names = "default"; }; &i2c_ctrl6 { @@ -146,6 +160,8 @@ status = "okay"; label = "I2C_THERMAL_AP"; clock-frequency = <I2C_BITRATE_FAST>; + pinctrl-0 = <&i2c7_0_sda_scl_gpb2_b3>; + pinctrl-names = "default"; }; &i2c_ctrl7 { diff --git a/zephyr/projects/skyrim/keyboard.dts b/zephyr/projects/skyrim/keyboard.dts index bc20b259dc..792e6074d1 100644 --- a/zephyr/projects/skyrim/keyboard.dts +++ b/zephyr/projects/skyrim/keyboard.dts @@ -14,4 +14,6 @@ &pwm1 { status = "okay"; clock-bus = "NPCX_CLOCK_BUS_LFCLK"; + pinctrl-0 = <&pwm1_gpc2>; + pinctrl-names = "default"; }; diff --git a/zephyr/projects/skyrim/pwm_leds.dts b/zephyr/projects/skyrim/pwm_leds.dts index 7c70b7ce88..ce4d5e6d07 100644 --- a/zephyr/projects/skyrim/pwm_leds.dts +++ b/zephyr/projects/skyrim/pwm_leds.dts @@ -37,10 +37,14 @@ &pwm2 { status = "okay"; clock-bus = "NPCX_CLOCK_BUS_LFCLK"; + pinctrl-0 = <&pwm2_gpc4>; + pinctrl-names = "default"; }; /* White "battery full" LED */ &pwm3 { status = "okay"; clock-bus = "NPCX_CLOCK_BUS_LFCLK"; + pinctrl-0 = <&pwm3_gp80>; + pinctrl-names = "default"; }; diff --git a/zephyr/projects/skyrim/skyrim.dts b/zephyr/projects/skyrim/skyrim.dts index 81afc607c8..8b4b5505ad 100644 --- a/zephyr/projects/skyrim/skyrim.dts +++ b/zephyr/projects/skyrim/skyrim.dts @@ -207,3 +207,10 @@ }; }; }; + +/* host interface */ +&espi0 { + status = "okay"; + pinctrl-0 = <&espi_lpc_gp46_47_51_52_53_54_55_57>; + pinctrl-names = "default"; +}; |