diff options
Diffstat (limited to 'zephyr/projects/skyrim/skyrim.dts')
-rw-r--r-- | zephyr/projects/skyrim/skyrim.dts | 250 |
1 files changed, 118 insertions, 132 deletions
diff --git a/zephyr/projects/skyrim/skyrim.dts b/zephyr/projects/skyrim/skyrim.dts index 8b4b5505ad..02308e4390 100644 --- a/zephyr/projects/skyrim/skyrim.dts +++ b/zephyr/projects/skyrim/skyrim.dts @@ -1,150 +1,32 @@ -/* Copyright 2021 The Chromium OS Authors. All rights reserved. +/* Copyright 2021 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -/ { - aliases { - gpio-wp = &gpio_wp; - gpio-cbi-wp = &gpio_cbi_wp; - gpio-kbd-kso2 = &gpio_ec_kso_02_inv; - }; +#include <dt-bindings/usbc_mux.h> + +#include "i2c_common.dtsi" +/ { named-gpios { /* Skyrim-specific GPIO customizations */ - usb_fault_odl { - gpios = <&gpio5 0 GPIO_ODR_HIGH>; - }; - gpio_en_pwr_s3: en_pwr_s3 { - gpios = <&gpio7 4 GPIO_OUTPUT_LOW>; - }; - gpio_pg_groupc_s0_od: pg_groupc_s0_od { - gpios = <&gpiof 0 GPIO_INPUT>; - }; - /* TODO: Add interrupt handler */ - ec_i2c_usbc_pd_int { - gpios = <&gpioa 3 GPIO_INPUT>; - }; - /* TODO: Add interrupt handler */ - soc_thermtrip_odl { - gpios = <&gpio9 5 GPIO_INPUT>; - }; - gpio_hub_rst: hub_rst { - gpios = <&gpio6 6 GPIO_OUTPUT_HIGH>; - }; - ec_soc_int_l { - gpios = <&gpioa 1 GPIO_OUTPUT_HIGH>; - enum-name = "GPIO_EC_INT_L"; - }; - gpio_ec_soc_pwr_good: ec_soc_pwr_good { - gpios = <&gpiod 3 GPIO_OUTPUT_LOW>; - }; - /* TODO: Add interrupt handler to shut down */ - pcore_ocp_r_l { - gpios = <&gpioa 5 GPIO_INPUT>; - }; - /* TODO: Add interrupt handler */ - sc_0_int_l { - gpios = <&gpio6 3 GPIO_INPUT_PULL_UP>; - }; - /* TODO: Add interrupt handler */ - usb_hub_fault_q_odl { - gpios = <&gpioe 5 GPIO_INPUT_PULL_UP>; - }; - gpio_pg_lpddr5_s3_od: pg_lpddr5_s3_od { - gpios = <&gpio7 3 GPIO_INPUT>; - }; - 3axis_int_l { - gpios = <&gpioa 2 GPIO_INPUT_PULL_UP>; - }; - gpio_ec_soc_pwr_btn_l: ec_soc_pwr_btn_l { - gpios = <&gpioa 7 GPIO_OUTPUT_HIGH>; - enum-name = "GPIO_PCH_PWRBTN_L"; - }; - gpio_volup_btn_odl: volup_btn_odl { - gpios = <&gpio6 7 GPIO_INPUT_PULL_UP>; - enum-name = "GPIO_VOLUME_UP_L"; - }; - gpio_voldn_btn_odl: voldn_btn_odl { - gpios = <&gpio7 0 GPIO_INPUT_PULL_UP>; - enum-name = "GPIO_VOLUME_DOWN_L"; - }; - ec_sc_rst { - gpios = <&gpiob 0 GPIO_OUTPUT_LOW>; - }; - gpio_cbi_wp: ec_cbi_wp { - gpios = <&gpio8 1 GPIO_OUTPUT_LOW>; - }; - gpio_wp: ec_wp_l { - gpios = <&gpiod 7 (GPIO_INPUT | GPIO_ACTIVE_LOW)>; - }; - gpio_pg_lpddr5_s0_od: pg_lpddr5_s0_od { - gpios = <&gpio6 0 GPIO_INPUT>; - }; - ec_espi_rst_l { - gpios = <&gpio5 4 GPIO_PULL_DOWN>; - }; - gpio_accel_gyro_int_l: accel_gyro_int_l { - gpios = <&gpioa 0 GPIO_INPUT>; - }; - }; - - def-lvol-io-list { - compatible = "nuvoton,npcx-lvolctrl-def"; - - /* - * Low voltage on I2C2_0, I2C6_1, I2C7_0, USB_FAUT_ODL - */ - lvol-io-pads = <&lvol_io92 &lvol_io91 &lvol_ioe4 &lvol_ioe3 - &lvol_iob3 &lvol_iob2 &lvol_io50>; }; named-temp-sensors { + compatible = "cros-ec,temp-sensors"; soc-pct2075 { - compatible = "cros-ec,temp-sensor-pct2075", - "cros-ec,temp-sensor"; - label = "SOC"; - enum-name = "TEMP_SENSOR_SOC"; - pct2075-name = "PCT2075_SOC"; - port = <&i2c_sensor>; - i2c-addr-flags = "PCT2075_I2C_ADDR_FLAGS0"; temp_host_high = <100>; temp_host_halt = <105>; temp_host_release_high = <80>; temp_host_release_halt = <80>; - temp_fan_off = <0>; + temp_fan_off = <35>; temp_fan_max = <70>; power-good-pin = <&gpio_pg_pwr_s5>; + sensor = <&soc_pct2075>; }; amb-pct2075 { - compatible = "cros-ec,temp-sensor-pct2075", - "cros-ec,temp-sensor"; - label = "Ambient"; - enum-name = "TEMP_SENSOR_AMB"; - pct2075-name = "PCT2075_AMB"; - port = <&i2c_sensor>; - i2c-addr-flags = "PCT2075_I2C_ADDR_FLAGS7"; power-good-pin = <&gpio_pg_pwr_s5>; - }; - }; - - gpio-interrupts { - compatible = "cros-ec,gpio-interrupts"; - - int_pg_lpddr_s3: pg_lpddr_s3 { - irq-pin = <&gpio_pg_lpddr5_s3_od>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "baseboard_set_en_pwr_pcore"; - }; - int_pg_lpddr_s0: pg_lpddr_s0 { - irq-pin = <&gpio_pg_lpddr5_s0_od>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "baseboard_set_soc_pwr_pgood"; - }; - int_s0_pgood: s0_pgood { - irq-pin = <&gpio_s0_pgood>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "baseboard_s0_pgood"; + sensor = <&amb_pct2075>; }; }; @@ -189,6 +71,49 @@ default; }; }; + + /* + * FW_CONFIG field to enable fan or not. + */ + fan { + enum-name = "FW_FAN"; + start = <10>; + size = <1>; + + no-fan { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_FAN_NOT_PRESENT"; + value = <0>; + }; + fan-present { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_FAN_PRESENT"; + value = <1>; + /* + * Set as default so that unprovisioned + * configs will run the fan regardless. + */ + default; + }; + }; + + charger-option { + enum-name = "FW_CHARGER"; + start = <11>; + size = <2>; + + charger-option-isl9241 { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_CHARGER_ISL9241"; + value = <0>; + default; + }; + charger-option-isl9538 { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_CHARGER_ISL9538"; + value = <1>; + }; + }; }; /* Rotation matrices for motion sensors. */ @@ -200,17 +125,78 @@ 0 0 1>; }; + lid_rot_ref1: lid-rotation-ref1 { + mat33 = <0 1 0 + (-1) 0 0 + 0 0 1>; + }; + base_rot_ref: base-rotation-ref { mat33 = <0 1 0 (-1) 0 0 0 0 1>; }; }; + + ppc_port0: aoz1380 { + compatible = "aoz,aoz1380"; + status = "okay"; + }; }; -/* host interface */ -&espi0 { - status = "okay"; - pinctrl-0 = <&espi_lpc_gp46_47_51_52_53_54_55_57>; - pinctrl-names = "default"; +&i2c0_0 { + anx7483_port0: anx7483@3e { + compatible = "analogix,anx7483"; + reg = <0x3e>; + board-set = "board_anx7483_c0_mux_set"; + }; +}; + +&i2c1_0 { + anx7483_port1: anx7483@3e { + compatible = "analogix,anx7483"; + reg = <0x3e>; + board-set = "board_anx7483_c1_mux_set"; + }; + ppc_port1: nx20p348x@71 { + compatible = "nxp,nx20p348x"; + status = "okay"; + reg = <0x71>; + }; + ps8818_port1: ps8818@28 { + compatible = "parade,ps8818"; + reg = <0x28>; + flags = <(USB_MUX_FLAG_RESETS_IN_G3)>; + board-set = "board_c1_ps8818_mux_set"; + }; +}; + +&i2c4_1 { + alt_charger: isl9538@9 { + compatible = "intersil,isl923x"; + status = "okay"; + reg = <0x9>; + }; +}; + +&usbc_port0 { + chg_alt = <&alt_charger>; + ppc = <&ppc_port0>; + usb-mux-chain-0 { + compatible = "cros-ec,usb-mux-chain"; + usb-muxes = <&amd_fp6_port0 &anx7483_port0>; + }; +}; + +&usbc_port1 { + ppc = <&ppc_port1>; + usb-mux-chain-1-anx { + compatible = "cros-ec,usb-mux-chain"; + usb-muxes = <&amd_fp6_port1 &anx7483_port1>; + }; + usb_mux_chain_ps8818_port1: usb-mux-chain-1-ps { + compatible = "cros-ec,usb-mux-chain"; + usb-muxes = <&amd_fp6_port1 &ps8818_port1>; + alternative-chain; + }; }; |