summaryrefslogtreecommitdiff
path: root/zephyr/projects/drawcia_riscv/gpio.dts
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/projects/drawcia_riscv/gpio.dts')
-rw-r--r--zephyr/projects/drawcia_riscv/gpio.dts67
1 files changed, 67 insertions, 0 deletions
diff --git a/zephyr/projects/drawcia_riscv/gpio.dts b/zephyr/projects/drawcia_riscv/gpio.dts
new file mode 100644
index 0000000000..2aeb4bdca7
--- /dev/null
+++ b/zephyr/projects/drawcia_riscv/gpio.dts
@@ -0,0 +1,67 @@
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include <dt-bindings/gpio_defines.h>
+
+/ {
+ named-gpios {
+ compatible = "named-gpios";
+
+ ec_wp_od {
+ gpios = <&gpioa 6 GPIO_INPUT>;
+ enum-name = "GPIO_WP_L";
+ };
+ ec_entering_rw {
+ gpios = <&gpiog 0 GPIO_OUTPUT_LOW>;
+ enum-name = "GPIO_ENTERING_RW";
+ };
+ h1_ec_pwr_btn_odl {
+ gpios = <&gpioe 2 GPIO_INPUT>;
+ enum-name = "GPIO_POWER_BUTTON_L";
+ };
+ lid_open {
+ gpios = <&gpiof 3 GPIO_INPUT>;
+ enum-name = "GPIO_LID_OPEN";
+ };
+ ec_ap_mkbp_int_l {
+ gpios = <&gpiol 5 GPIO_ODR_HIGH>;
+ enum-name = "GPIO_EC_INT_L";
+ };
+ };
+
+ named-i2c-ports {
+ compatible = "named-i2c-ports";
+
+ eeprom {
+ i2c-port = <&i2c0>;
+ enum-name = "I2C_PORT_EEPROM";
+ };
+ i2c_sensor: sensor {
+ i2c-port = <&i2c2>;
+ enum-name = "I2C_PORT_SENSOR";
+ };
+ };
+ named-pwms {
+ compatible = "named-pwms";
+ };
+
+};
+
+&i2c0 {
+ /* I2C_PORT_EEPROM */
+ status = "okay";
+ clock-frequency = <I2C_BITRATE_FAST>;
+};
+
+&i2c2 {
+ /* I2C_PORT_SENSOR */
+ status = "okay";
+ clock-frequency = <I2C_BITRATE_STANDARD>;
+};
+
+&pwm0 {
+ status = "okay";
+ prescaler-cx = <PWM_PRESCALER_C4>;
+};