From cab69396fac1673feb56bdb1c2ee3870948b0003 Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Fri, 23 Oct 2020 13:02:24 -0600 Subject: volteer: add remaining gpio signals Generate the dts snippet with the following perl command perl -nle 'print lc($1)." {\n\tgpios = <&gpio".lc($2)." $3 ($4)>;\n\tlabel = \"$1\";\n};" if /GPIO\w*\((\w+),\s+PIN\((\w), (\w)\),\s+([^),]+)/' board/volteer/gpio.inc | perl -ple 's/GPIO_INT\w+/GPIO_INPUT/g' | perl -ple 's/ \| (GPIO_SEL_1P8V|GPIO_HIB_WAKE_HIGH)//g' | perl -ple 's/\((\w+)\)/$1/g' This removes GPIO_SEL_1P8V and GPIO_HIB_WAKE_HIGH since they are not supported in zephyr This also ignores any interrupts as they need to be defined outside of the device tree file. All interrupts are just assumed to be an input. BUG=b:169935802 TEST=gpioget shows all GPIOs on volteer Change-Id: I2161db8cb1daa520df208c911342f3ed6c01decb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/zephyr-chrome/+/2495095 Tested-by: Jett Rink Reviewed-by: Yuval Peress Reviewed-by: Jack Rosenthal Commit-Queue: Jack Rosenthal Auto-Submit: Jett Rink Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630134 Tested-by: Jack Rosenthal Reviewed-by: Simon Glass --- .../volteer/boards/arm/volteer/volteer.dts | 269 ++++++++++++++++++++- 1 file changed, 262 insertions(+), 7 deletions(-) diff --git a/zephyr/projects/volteer/boards/arm/volteer/volteer.dts b/zephyr/projects/volteer/boards/arm/volteer/volteer.dts index 2ef3c51b4c..b3c076e6a2 100644 --- a/zephyr/projects/volteer/boards/arm/volteer/volteer.dts +++ b/zephyr/projects/volteer/boards/arm/volteer/volteer.dts @@ -31,36 +31,291 @@ named-gpios { compatible = "gpio-keys"; + ec_lid_open { + gpios = <&gpiod 2 GPIO_INPUT>; + label = "EC_LID_OPEN"; + }; + ec_wp_l { + gpios = <&gpioa 1 GPIO_INPUT>; + label = "EC_WP_L"; + }; + h1_ec_pwr_btn_odl { + gpios = <&gpio0 1 GPIO_INPUT>; + label = "H1_EC_PWR_BTN_ODL"; + }; + acok_od { + gpios = <&gpio0 0 GPIO_INPUT>; + label = "ACOK_OD"; + }; + slp_s0_l { + gpios = <&gpiod 5 GPIO_INPUT>; + label = "SLP_S0_L"; + }; + slp_s3_l { + gpios = <&gpioa 5 GPIO_INPUT>; + label = "SLP_S3_L"; + }; + slp_sus_l { + gpios = <&gpiod 7 GPIO_INPUT>; + label = "SLP_SUS_L"; + }; + pg_ec_rsmrst_odl { + gpios = <&gpioe 2 GPIO_INPUT>; + label = "PG_EC_RSMRST_ODL"; + }; + pg_ec_dsw_pwrok { + gpios = <&gpioc 7 GPIO_INPUT>; + label = "PG_EC_DSW_PWROK"; + }; + pg_ec_all_sys_pwrgd { + gpios = <&gpiof 4 GPIO_INPUT>; + label = "PG_EC_ALL_SYS_PWRGD"; + }; + ec_imu_int_l { + gpios = <&gpio5 6 GPIO_INPUT>; + label = "EC_IMU_INT_L"; + }; + ec_als_rgb_int_l { + gpios = <&gpiod 4 GPIO_INPUT>; + label = "EC_ALS_RGB_INT_L"; + }; + tablet_mode_l { + gpios = <&gpio9 5 GPIO_INPUT>; + label = "TABLET_MODE_L"; + }; + ec_accel_int { + gpios = <&gpio8 1 (GPIO_INPUT | GPIO_PULL_UP)>; + label = "EC_ACCEL_INT"; + }; + usb_c0_tcpc_int_odl { + gpios = <&gpioe 0 GPIO_INPUT>; + label = "USB_C0_TCPC_INT_ODL"; + }; + usb_c1_tcpc_int_odl { + gpios = <&gpioa 2 GPIO_INPUT>; + label = "USB_C1_TCPC_INT_ODL"; + }; + usb_c0_ppc_int_odl { + gpios = <&gpio6 2 GPIO_INPUT>; + label = "USB_C0_PPC_INT_ODL"; + }; + usb_c1_ppc_int_odl { + gpios = <&gpiof 5 GPIO_INPUT>; + label = "USB_C1_PPC_INT_ODL"; + }; + usb_c0_bc12_int_odl { + gpios = <&gpioe 4 GPIO_INPUT>; + label = "USB_C0_BC12_INT_ODL"; + }; + usb_c1_mix_int_odl { + gpios = <&gpio0 3 GPIO_INPUT>; + label = "USB_C1_MIX_INT_ODL"; + }; + ec_voldn_btn_odl { + gpios = <&gpio9 3 (GPIO_INPUT | GPIO_PULL_UP)>; + label = "EC_VOLDN_BTN_ODL"; + }; + ec_volup_btn_odl { + gpios = <&gpio9 7 (GPIO_INPUT | GPIO_PULL_UP)>; + label = "EC_VOLUP_BTN_ODL"; + }; en_pp3300_a { - gpios = <&gpioa 3 GPIO_OUTPUT_LOW>; + gpios = <&gpioa 3 GPIO_OUT_LOW>; label = "EN_PP3300_A"; }; en_pp5000_a { - gpios = <&gpioa 4 GPIO_OUTPUT_LOW>; + gpios = <&gpioa 4 GPIO_OUT_LOW>; label = "EN_PP5000_A"; }; en_ppvar_vccin { - gpios = <&gpio4 4 GPIO_OUTPUT_LOW>; + gpios = <&gpio4 3 GPIO_OUT_LOW>; label = "EN_PPVAR_VCCIN"; }; ec_pch_dsw_pwrok { - gpios = <&gpioc 0 GPIO_OUTPUT_LOW>; + gpios = <&gpioc 0 GPIO_OUT_LOW>; label = "EC_PCH_DSW_PWROK"; }; - tp_1 { + ec_rst_odl { + gpios = <&gpio0 2 GPIO_INPUT>; + label = "EC_RST_ODL"; + }; + ec_pch_sys_pwrok { + gpios = <&gpio3 7 GPIO_OUT_LOW>; + label = "EC_PCH_SYS_PWROK"; + }; + ec_pch_rsmrst_odl { + gpios = <&gpioa 6 GPIO_ODR_LOW>; + label = "EC_PCH_RSMRST_ODL"; + }; + ec_pch_pwr_btn_odl { + gpios = <&gpioc 1 GPIO_ODR_HIGH>; + label = "EC_PCH_PWR_BTN_ODL"; + }; + ec_pch_rtcrst { + gpios = <&gpio7 6 GPIO_OUT_LOW>; + label = "EC_PCH_RTCRST"; + }; + ec_pch_wake_odl { + gpios = <&gpio7 4 GPIO_ODR_HIGH>; + label = "EC_PCH_WAKE_ODL"; + }; + ec_entering_rw { + gpios = <&gpioe 3 GPIO_OUT_LOW>; + label = "EC_ENTERING_RW"; + }; + ec_prochot_odl { + gpios = <&gpio6 3 GPIO_ODR_HIGH>; + label = "EC_PROCHOT_ODL"; + }; + ec_prochot_in_l { + gpios = <&gpiof 0 GPIO_INPUT>; + label = "EC_PROCHOT_IN_L"; + }; + sys_rst_odl { + gpios = <&gpioc 5 GPIO_ODR_HIGH>; + label = "SYS_RST_ODL"; + }; + ec_pch_int_odl { + gpios = <&gpiob 0 GPIO_ODR_HIGH>; + label = "EC_PCH_INT_ODL"; + }; + en_pp5000_usba { + gpios = <&gpioc 6 GPIO_OUT_LOW>; + label = "EN_PP5000_USBA"; + }; + usb_a_low_pwr_od { + gpios = <&gpio6 6 GPIO_ODR_LOW>; + label = "USB_A_LOW_PWR_OD"; + }; + usb_c1_rt_rst_odl_boardid_0 { + gpios = <&gpio3 2 GPIO_ODR_LOW>; + label = "USB_C1_RT_RST_ODL_BOARDID_0"; + }; + usb_c1_rt_rst_odl { + gpios = <&gpio8 3 GPIO_ODR_LOW>; + label = "USB_C1_RT_RST_ODL"; + }; + usb_c0_oc_odl { + gpios = <&gpiob 1 GPIO_ODR_HIGH>; + label = "USB_C0_OC_ODL"; + }; + usb_c1_oc_odl { + gpios = <&gpio5 0 GPIO_ODR_HIGH>; + label = "USB_C1_OC_ODL"; + }; + usb_c1_rt_int_odl { + gpios = <&gpiof 3 GPIO_INPUT>; + label = "USB_C1_RT_INT_ODL"; + }; + ec_h1_packet_mode { + gpios = <&gpio7 5 GPIO_OUT_LOW>; + label = "EC_H1_PACKET_MODE"; + }; + m2_ssd_pln { + gpios = <&gpioa 0 GPIO_ODR_HIGH>; + label = "M2_SSD_PLN"; + }; + m2_ssd_pla { + gpios = <&gpio7 0 GPIO_INPUT>; + label = "M2_SSD_PLA"; + }; + ccd_mode_odl { + gpios = <&gpioe 5 GPIO_INPUT>; + label = "CCD_MODE_ODL"; + }; + ec_slp_s0ix { + gpios = <&gpio7 2 (GPIO_INPUT | GPIO_PULL_UP)>; + label = "EC_SLP_S0IX"; + }; + unused_gpio41 { + gpios = <&gpio4 1 (GPIO_INPUT | GPIO_PULL_UP)>; + label = "UNUSED_GPIO41"; + }; + unused_gpiof2 { + gpios = <&gpiof 2 (GPIO_INPUT | GPIO_PULL_UP)>; + label = "UNUSED_GPIOF2"; + }; + unused_gpio96 { + gpios = <&gpio9 6 (GPIO_INPUT | GPIO_PULL_UP)>; + label = "UNUSED_GPIO96"; + }; + unused_gpio34 { + gpios = <&gpio3 4 (GPIO_INPUT | GPIO_PULL_UP)>; + label = "UNUSED_GPIO34"; + }; + ec_kb_bl_en { gpios = <&gpio8 6 (GPIO_INPUT | GPIO_PULL_UP)>; label = "EC_KB_BL_EN"; }; - tp_2 { + ec_espi_alert_l { gpios = <&gpio5 7 (GPIO_INPUT | GPIO_PULL_UP)>; label = "EC_ESPI_ALERT_L"; }; + ec_edp_bl_en { + gpios = <&gpiod 3 GPIO_OUT_HIGH>; + label = "EC_EDP_BL_EN"; + }; + ec_i2c0_sensor_scl { + gpios = <&gpiob 5 GPIO_INPUT>; + label = "EC_I2C0_SENSOR_SCL"; + }; + ec_i2c0_sensor_sda { + gpios = <&gpiob 4 GPIO_INPUT>; + label = "EC_I2C0_SENSOR_SDA"; + }; + ec_i2c1_usb_c0_scl { + gpios = <&gpio9 0 GPIO_INPUT>; + label = "EC_I2C1_USB_C0_SCL"; + }; + ec_i2c1_usb_c0_sda { + gpios = <&gpio8 7 GPIO_INPUT>; + label = "EC_I2C1_USB_C0_SDA"; + }; + ec_i2c2_usb_c1_scl { + gpios = <&gpio9 2 GPIO_INPUT>; + label = "EC_I2C2_USB_C1_SCL"; + }; + ec_i2c2_usb_c1_sda { + gpios = <&gpio9 1 GPIO_INPUT>; + label = "EC_I2C2_USB_C1_SDA"; + }; + ec_i2c3_usb_1_mix_scl { + gpios = <&gpiod 1 GPIO_INPUT>; + label = "EC_I2C3_USB_1_MIX_SCL"; + }; + ec_i2c3_usb_1_mix_sda { + gpios = <&gpiod 0 GPIO_INPUT>; + label = "EC_I2C3_USB_1_MIX_SDA"; + }; + ec_i2c5_battery_scl { + gpios = <&gpio3 3 GPIO_INPUT>; + label = "EC_I2C5_BATTERY_SCL"; + }; + ec_i2c5_battery_sda { + gpios = <&gpio3 6 GPIO_INPUT>; + label = "EC_I2C5_BATTERY_SDA"; + }; + ec_i2c7_eeprom_pwr_scl_r { + gpios = <&gpiob 3 GPIO_INPUT>; + label = "EC_I2C7_EEPROM_PWR_SCL_R"; + }; + ec_i2c7_eeprom_pwr_sda_r { + gpios = <&gpiob 2 GPIO_INPUT>; + label = "EC_I2C7_EEPROM_PWR_SDA_R"; + }; ec_batt_pres_odl { gpios = <&gpioe 1 GPIO_INPUT>; label = "EC_BATT_PRES_ODL"; }; + en_pp5000_fan { + gpios = <&gpio6 1 GPIO_OUT_LOW>; + label = "EN_PP5000_FAN"; + }; + ec_kso_02_inv { + gpios = <&gpio1 7 GPIO_OUT_LOW>; + label = "EC_KSO_02_INV"; + }; }; - }; /* Update flash size to 512KB from 196KB since we are using C variant */ -- cgit v1.2.1