summaryrefslogtreecommitdiff
path: root/zephyr/projects/volteer/delbin/gpio.dts
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-04-07 00:17:55 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-09 07:06:52 +0000
commitc4d1b01bc345557ea9be3793f724d7d35ddbf174 (patch)
tree67a82f814ef889de07b6ed819dbe2f0ee0beca21 /zephyr/projects/volteer/delbin/gpio.dts
parent41aeb59c43bfb94ac7d34a4a796aa245759ee8e3 (diff)
downloadchrome-ec-c4d1b01bc345557ea9be3793f724d7d35ddbf174.tar.gz
zephyr: volteer: init i2c_ports
Populate i2c_ports[] and set i2c_ports_used correctly. Add child bindings for named i2c ports that allow configurations. A configured named i2c node MUST have a kbps property and 2 child nodes for `scl` and `sda` which will use the same enums as the named gpios. This provides a compile-time check to make sure that the overlay gpio.dts defined a named gpio using the SCL/SDA enums. This means that if the i2c port config uses a valid enum from gpio-enum-name.yaml but the overlay did not define a node using that same enum, the build will break (because the gpio_signal enum will not have that enum defined). BRANCH=none BUG=b:184269641 TEST=zmake testall TEST=run firmware_ECCbiEeprom FAFT on volteer Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I7f46ab8f8b4079cf6ae5287869e6844fea38a100 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2810333 Commit-Queue: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/projects/volteer/delbin/gpio.dts')
-rw-r--r--zephyr/projects/volteer/delbin/gpio.dts12
1 files changed, 12 insertions, 0 deletions
diff --git a/zephyr/projects/volteer/delbin/gpio.dts b/zephyr/projects/volteer/delbin/gpio.dts
index c29b8a95c3..b1424232d5 100644
--- a/zephyr/projects/volteer/delbin/gpio.dts
+++ b/zephyr/projects/volteer/delbin/gpio.dts
@@ -257,50 +257,62 @@
};
ec_i2c0_sensor_scl {
gpios = <&gpiob 5 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C0_SENSOR_SCL";
label = "EC_I2C0_SENSOR_SCL";
};
ec_i2c0_sensor_sda {
gpios = <&gpiob 4 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C0_SENSOR_SDA";
label = "EC_I2C0_SENSOR_SDA";
};
ec_i2c1_usb_c0_scl {
gpios = <&gpio9 0 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C1_USB_C0_SCL";
label = "EC_I2C1_USB_C0_SCL";
};
ec_i2c1_usb_c0_sda {
gpios = <&gpio8 7 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C1_USB_C0_SDA";
label = "EC_I2C1_USB_C0_SDA";
};
ec_i2c2_usb_c1_scl {
gpios = <&gpio9 2 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C2_USB_C1_SCL";
label = "EC_I2C2_USB_C1_SCL";
};
ec_i2c2_usb_c1_sda {
gpios = <&gpio9 1 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C2_USB_C1_SDA";
label = "EC_I2C2_USB_C1_SDA";
};
ec_i2c3_usb_1_mix_scl {
gpios = <&gpiod 1 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C3_USB_1_MIX_SCL";
label = "EC_I2C3_USB_1_MIX_SCL";
};
ec_i2c3_usb_1_mix_sda {
gpios = <&gpiod 0 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C3_USB_1_MIX_SDA";
label = "EC_I2C3_USB_1_MIX_SDA";
};
ec_i2c5_power_scl {
gpios = <&gpio3 3 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C5_BATTERY_SCL";
label = "EC_I2C5_POWER_SCL";
};
ec_i2c5_power_sda {
gpios = <&gpio3 6 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C5_BATTERY_SDA";
label = "EC_I2C5_POWER_SDA";
};
ec_i2c7_eeprom_scl {
gpios = <&gpiob 3 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C7_EEPROM_PWR_SCL_R";
label = "EC_I2C7_EEPROM_SCL";
};
ec_i2c7_eeprom_sda {
gpios = <&gpiob 2 GPIO_INPUT>;
+ enum-name = "GPIO_EC_I2C7_EEPROM_PWR_SDA_R";
label = "EC_I2C7_EEPROM_SDA";
};
ec_batt_pres_odl {