diff options
Diffstat (limited to 'zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts')
-rw-r--r-- | zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts | 195 |
1 files changed, 147 insertions, 48 deletions
diff --git a/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts b/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts index a1b61d02ec..52ee525eae 100644 --- a/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts +++ b/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts @@ -26,103 +26,67 @@ power_button_l: power_button_l { gpios = <&gpioe 4 GPIO_INPUT_PULL_UP>; enum-name = "GPIO_POWER_BUTTON_L"; - label = "POWER_BUTTON_L"; }; lid_open: lid_open { gpios = <&gpioe 2 GPIO_INPUT_PULL_UP>; enum-name = "GPIO_LID_OPEN"; - label = "LID_OPEN"; }; wp_l { gpios = <&gpioi 4 GPIO_INPUT_PULL_UP>; enum-name = "GPIO_WP_L"; - label = "WP_L"; }; pch_pltrst_l { gpios = <&gpioe 3 GPIO_INPUT_PULL_UP>; enum-name = "GPIO_PCH_RSMRST_L"; - label = "PCH_PLTRST_L"; }; uart1_rx { gpios = <&gpiob 0 GPIO_INPUT_PULL_UP>; #enum-name = "GPIO_UART1_RX"; - label = "UART1_RX"; - }; - pch_smi_l { - gpios = <&gpiod 3 GPIO_OUT_HIGH>; - #enum-name = "GPIO_PCH_SMI_L"; - label = "PCH_SMI_L"; - }; - pch_sci_l { - gpios = <&gpiod 4 GPIO_OUT_HIGH>; - #enum-name = "GPIO_PCH_SCI_L"; - label = "PCH_SCI_L"; - }; - gate_a20_h { - gpios = <&gpiob 5 GPIO_OUT_HIGH>; - #enum-name = "GPIO_GATE_A20_H"; - label = "GATE_A20_H"; }; sys_reset_l { gpios = <&gpiob 6 GPIO_OUT_HIGH>; enum-name = "GPIO_SYS_RESET_L"; - label = "SYS_RESET_L"; - }; - lpc_clkrun_l { - gpios = <&gpioh 0 GPIO_OUT_LOW>; - #enum-name = "GPIO_LPC_CLKRUN_L"; - label = "LPC_CLKRUN_L"; }; pch_wake_l { gpios = <&gpiob 7 GPIO_OUT_HIGH>; enum-name = "GPIO_EC_PCH_WAKE_ODL"; - label = "PCH_WAKE_L"; }; i2c_a_scl { gpios = <&gpiob 3 GPIO_INPUT>; enum-name = "GPIO_EC_I2C0_SENSOR_SCL"; - label = "I2C_A_SCL"; }; i2c_a_sda { gpios = <&gpiob 4 GPIO_INPUT>; enum-name = "GPIO_EC_I2C0_SENSOR_SDA"; - label = "I2C_A_SDA"; }; i2c_b_scl { gpios = <&gpioc 1 GPIO_INPUT>; enum-name = "GPIO_EC_I2C1_USB_C0_SCL"; - label = "I2C_B_SCL"; }; i2c_b_sda { gpios = <&gpioc 2 GPIO_INPUT>; enum-name = "GPIO_EC_I2C1_USB_C0_SDA"; - label = "I2C_B_SDA"; }; i2c_c_scl { gpios = <&gpiof 6 GPIO_INPUT>; enum-name = "GPIO_EC_I2C2_USB_C1_SCL"; - label = "I2C_C_SCL"; }; i2c_c_sda { gpios = <&gpiof 7 GPIO_INPUT>; enum-name = "GPIO_EC_I2C2_USB_C1_SDA"; - label = "I2C_C_SDA"; }; i2c_e_scl { gpios = <&gpioe 0 GPIO_INPUT>; enum-name = "GPIO_EC_I2C5_BATTERY_SCL"; - label = "I2C_E_SCL"; }; i2c_e_sda { gpios = <&gpioe 7 GPIO_INPUT>; enum-name = "GPIO_EC_I2C5_BATTERY_SDA"; - label = "I2C_E_SDA"; }; spi0_cs { gpios = <&gpiom 5 (GPIO_INPUT | GPIO_VOLTAGE_1P8)>; enum-name = "GPIO_SPI0_CS"; - label = "SPI0_CS"; }; }; @@ -173,43 +137,167 @@ battery { i2c-port = <&i2c2>; enum-name = "I2C_PORT_BATTERY"; - label = "BATTERY"; }; evb-1 { i2c-port = <&i2c0>; enum-name = "I2C_PORT_EVB_1"; - label = "EVB_1"; }; evb-2 { i2c-port = <&i2c1>; enum-name = "I2C_PORT_EVB_2"; - label = "EVB_2"; }; opt-4 { i2c-port = <&i2c4>; enum-name = "I2C_PORT_OPT_4"; - label = "OPT_4"; }; }; named-pwms { compatible = "named-pwms"; + /* NOTE: &pwm number needs same with channel number */ - test0 { - pwms = <&pwm7 PWM_CHANNEL_7 PWM_POLARITY_INVERTED>; - label = "TEST0"; + pwm_test: test { + pwms = <&pwm0 PWM_CHANNEL_0 PWM_POLARITY_NORMAL>; /* * If we need pwm output in ITE chip power saving * mode, then we should set frequency <=324Hz. */ frequency = <324>; }; - test1 { - pwms = <&pwm0 PWM_CHANNEL_0 PWM_POLARITY_NORMAL>; - label = "TEST1"; + pwm_fan: fan { + pwms = <&pwm7 PWM_CHANNEL_7 PWM_POLARITY_NORMAL>; frequency = <30000>; }; }; + + named-fans { + compatible = "named-fans"; + + fan_0 { + label = "FAN_0"; + pwm = <&pwm_fan>; + tach = <&tach0>; + rpm_min = <1500>; + rpm_start = <1500>; + rpm_max = <6500>; + }; + }; + + unused-pins { + compatible = "unused-gpios"; + + unused-gpios = + /* gpioa1 */ + <&gpioa 1 GPIO_INPUT_PULL_DOWN>, + /* gpioa2 */ + <&gpioa 2 GPIO_INPUT_PULL_DOWN>, + /* gpioa3 */ + <&gpioa 3 GPIO_INPUT_PULL_DOWN>, + /* gpioa4 */ + <&gpioa 4 GPIO_INPUT_PULL_DOWN>, + /* gpioa5 */ + <&gpioa 5 GPIO_INPUT_PULL_DOWN>, + + /* gpiob2 */ + <&gpiob 2 GPIO_INPUT_PULL_DOWN>, + /* gpiob5 */ + <&gpiob 5 GPIO_INPUT_PULL_DOWN>, + + /* gpioc0 */ + <&gpioc 0 GPIO_INPUT_PULL_DOWN>, + /* gpioc4 */ + <&gpioc 4 GPIO_INPUT_PULL_DOWN>, + /* gpioc6 */ + <&gpioc 6 GPIO_INPUT_PULL_DOWN>, + /* gpioc7 */ + <&gpioc 7 GPIO_INPUT_PULL_DOWN>, + + /* gpiod0 */ + <&gpiod 0 GPIO_INPUT_PULL_DOWN>, + /* gpiod1 */ + <&gpiod 1 GPIO_INPUT_PULL_DOWN>, + /* gpiod2 */ + <&gpiod 2 GPIO_INPUT_PULL_DOWN>, + /* gpiod3 */ + <&gpiod 3 GPIO_INPUT_PULL_DOWN>, + /* gpiod4 */ + <&gpiod 4 GPIO_INPUT_PULL_DOWN>, + /* gpiod5 */ + <&gpiod 5 GPIO_INPUT_PULL_DOWN>, + /* gpiod7 */ + <&gpiod 7 GPIO_INPUT_PULL_DOWN>, + + /* gpioe1 */ + <&gpioe 1 GPIO_INPUT_PULL_DOWN>, + /* gpioe5 */ + <&gpioe 5 GPIO_INPUT_PULL_DOWN>, + /* gpioe6 */ + <&gpioe 6 GPIO_INPUT_PULL_DOWN>, + + /* gpiof0 */ + <&gpiof 0 GPIO_INPUT_PULL_DOWN>, + /* gpiof1 */ + <&gpiof 1 GPIO_INPUT_PULL_DOWN>, + /* gpiof2 */ + <&gpiof 2 GPIO_INPUT_PULL_DOWN>, + /* gpiof3 */ + <&gpiof 3 GPIO_INPUT_PULL_DOWN>, + /* gpiof4 */ + <&gpiof 4 GPIO_INPUT_PULL_DOWN>, + /* gpiof5 */ + <&gpiof 5 GPIO_INPUT_PULL_DOWN>, + + /* gpiog1 */ + <&gpiog 1 GPIO_INPUT_PULL_DOWN>, + /* gpiog6 */ + <&gpiog 6 GPIO_INPUT_PULL_UP>, + + /* gpioh0 */ + <&gpioh 0 GPIO_INPUT_PULL_DOWN>, + /* gpioh3 */ + <&gpioh 3 GPIO_INPUT_PULL_DOWN>, + /* gpioh4 */ + <&gpioh 4 GPIO_INPUT_PULL_DOWN>, + /* gpioh5 */ + <&gpioh 5 GPIO_INPUT_PULL_DOWN>, + /* gpioh6 */ + <&gpioh 6 GPIO_INPUT_PULL_DOWN>, + + /* gpioi6 */ + <&gpioi 6 GPIO_INPUT_PULL_DOWN>, + /* gpioi7 */ + <&gpioi 7 GPIO_INPUT_PULL_DOWN>, + + /* gpioj0 */ + <&gpioj 0 GPIO_INPUT_PULL_DOWN>, + /* gpioj1 */ + <&gpioj 1 GPIO_INPUT_PULL_DOWN>, + /* gpioj2 */ + <&gpioj 2 GPIO_INPUT_PULL_DOWN>, + /* gpioj3 */ + <&gpioj 3 GPIO_INPUT_PULL_DOWN>, + /* gpioj4 */ + <&gpioj 4 GPIO_INPUT_PULL_DOWN>, + /* gpioj5 */ + <&gpioj 5 GPIO_INPUT_PULL_DOWN>, + /* gpioj6 */ + <&gpioj 6 GPIO_OUT_LOW>, + /* gpioj7 */ + <&gpioj 7 GPIO_OUT_LOW>, + + /* gpiom0 */ + <&gpiom 0 GPIO_INPUT_PULL_DOWN>, + /* gpiom1 */ + <&gpiom 1 GPIO_INPUT_PULL_DOWN>, + /* gpiom2 */ + <&gpiom 2 GPIO_INPUT_PULL_DOWN>, + /* gpiom3 */ + <&gpiom 3 GPIO_INPUT_PULL_DOWN>, + /* gpiom4 */ + <&gpiom 4 GPIO_INPUT_PULL_DOWN>, + /* gpiom6 */ + <&gpiom 6 GPIO_INPUT_PULL_DOWN>; + }; }; &adc0 { @@ -242,14 +330,25 @@ clock-frequency = <1804800>; }; -/* TEST1 */ +&ite_uart1_wrapper { + status = "okay"; +}; + +/* pwm for test */ &pwm0 { status = "okay"; prescaler-cx = <PWM_PRESCALER_C6>; }; -/* TEST0 */ +/* pwm for fan */ &pwm7 { status = "okay"; prescaler-cx = <PWM_PRESCALER_C4>; }; + +/* fan tachometer sensor */ +&tach0 { + status = "okay"; + channel = <IT8XXX2_TACH_CHANNEL_A>; + pulses-per-round = <2>; +}; |