summaryrefslogtreecommitdiff
path: root/zephyr/projects/nissa/nivviks_overlay.dts
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/projects/nissa/nivviks_overlay.dts')
-rw-r--r--zephyr/projects/nissa/nivviks_overlay.dts186
1 files changed, 186 insertions, 0 deletions
diff --git a/zephyr/projects/nissa/nivviks_overlay.dts b/zephyr/projects/nissa/nivviks_overlay.dts
new file mode 100644
index 0000000000..bac45f91c1
--- /dev/null
+++ b/zephyr/projects/nissa/nivviks_overlay.dts
@@ -0,0 +1,186 @@
+/* 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 <cros/thermistor/thermistor.dtsi>
+
+/ {
+ batteries {
+ default_battery: lgc {
+ compatible = "lgc,ap18c8k";
+ };
+ };
+
+ hibernate-wake-pins {
+ compatible = "cros-ec,hibernate-wake-pins";
+ wakeup-pins = <
+ &gpio_gsc_ec_pwr_btn_odl
+ &gpio_lid_open
+ >;
+ };
+
+ named-gpios {
+ /*
+ * TODO(b:212490923): decide what to do with these sorts of
+ * signals that have varying function depending on the present
+ * sub-board.
+ */
+ gpio_sub_usb_c1_int_odl: sub_usb_c1_int_odl {
+ #gpio-cells = <0>;
+ gpios = <&gpio0 2 GPIO_INPUT>;
+ enum-name = "GPIO_USB_C1_PD_INT_ODL";
+ };
+ };
+
+ named-temp-sensors {
+ memory {
+ compatible = "cros-ec,temp-sensor-thermistor";
+ thermistor = <&thermistor_3V3_51K1_47K_4050B>;
+ label = "DDR and SOC";
+ enum-name = "TEMP_SENSOR_1";
+ temp_fan_off = <35>;
+ temp_fan_max = <60>;
+ temp_host_high = <85>;
+ temp_host_halt = <90>;
+ temp_host_release_high = <80>;
+ adc = <&adc_temp_sensor_1>;
+ };
+ charger {
+ compatible = "cros-ec,temp-sensor-thermistor";
+ thermistor = <&thermistor_3V3_51K1_47K_4050B>;
+ label = "Charger";
+ enum-name = "TEMP_SENSOR_2";
+ temp_fan_off = <35>;
+ temp_fan_max = <60>;
+ temp_host_high = <85>;
+ temp_host_halt = <90>;
+ temp_host_release_high = <80>;
+ adc = <&adc_temp_sensor_2>;
+ };
+ };
+
+ /*
+ * Alias kblist to correct node.
+ * It would be nice to use alias here, but the code
+ * uses DT_NODELABEL to directly reference the node label.
+ */
+ named-pwms {
+ compatible = "named-pwms";
+
+ kblight: pwm_kb_bl {
+ };
+ };
+
+ usbc {
+ port0 {
+ bc12 {
+ compatible = "pericom,pi3usb9201";
+ port = <&i2c_ec_i2c_usb_c0>;
+ /*
+ * BC1.2 interrupt is shared with TCPC, so
+ * IRQ is not specified here and handled by
+ * usb_c0_interrupt.
+ */
+ };
+ };
+ /*
+ * TODO(b:211693800): port1 may not be present on some
+ * sub-boards.
+ */
+ port1 {
+ bc12 {
+ compatible = "pericom,pi3usb9201";
+ port = <&i2c_ec_i2c_sub_usb_c1>;
+ };
+ };
+ };
+};
+
+&thermistor_3V3_51K1_47K_4050B {
+ status = "okay";
+};
+
+/* Power switch logic input pads */
+/* LID_OPEN_OD */
+&psl_in1 {
+ flag = <NPCX_PSL_RISING_EDGE>;
+};
+
+/* ACOK_EC_OD */
+&psl_in2 {
+ flag = <NPCX_PSL_RISING_EDGE>;
+};
+
+/* GSC_EC_PWR_BTN_ODL */
+&psl_in3 {
+ flag = <NPCX_PSL_FALLING_EDGE>;
+};
+
+/* Set bus speeds for I2C */
+&i2c0_0 {
+ label = "I2C_EEPROM";
+ clock-frequency = <I2C_BITRATE_FAST>;
+
+ cbi_eeprom: eeprom@50 {
+ compatible = "atmel,at24";
+ reg = <0x50>;
+ label = "EEPROM_CBI";
+ size = <2048>;
+ pagesize = <16>;
+ address-width = <8>;
+ timeout = <5>;
+ wp-gpios = <&gpio_ec_wp_odl>;
+ };
+};
+
+&i2c1_0 {
+ label = "I2C_SENSOR";
+ clock-frequency = <I2C_BITRATE_FAST>;
+};
+
+&i2c3_0 {
+ label = "I2C_USB_C0_TCPC";
+ clock-frequency = <I2C_BITRATE_FAST_PLUS>;
+};
+
+&i2c5_1 {
+ label = "I2C_SUB_C1_TCPC";
+ clock-frequency = <I2C_BITRATE_FAST_PLUS>;
+};
+
+&i2c7_0 {
+ label = "I2C_BATTERY";
+ clock-frequency = <I2C_BITRATE_STANDARD>;
+};
+
+/* PWM frequencies */
+
+&pwm_pwm_kb_bl {
+ frequency = <10000>;
+};
+
+&pwm_pwm_led_1_odl {
+ frequency = <324>;
+};
+
+&pwm_pwm_led_2_odl {
+ frequency = <324>;
+};
+
+&pwm_pwm_led_3_odl {
+ frequency = <324>;
+};
+
+/* Enable LEDs to work while CPU suspended */
+&pwm0 {
+ clock-bus = "NPCX_CLOCK_BUS_LFCLK";
+};
+
+&pwm1 {
+ clock-bus = "NPCX_CLOCK_BUS_LFCLK";
+};
+
+&pwm2 {
+ clock-bus = "NPCX_CLOCK_BUS_LFCLK";
+};