Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2566935rdb; Mon, 4 Dec 2023 00:43:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHq2AJZJGhLcvA2mRnLsm4qn1DErS3EvMHkHsJr8Uaan8hM384KOuJ3QwI7CarV4+2heMZf X-Received: by 2002:a05:6871:554:b0:1fa:ef75:461f with SMTP id t20-20020a056871055400b001faef75461fmr4429150oal.39.1701679400710; Mon, 04 Dec 2023 00:43:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701679400; cv=none; d=google.com; s=arc-20160816; b=XFw5iVlN/lZluJ4qElRLFbwoCgCsmwgi/Qq/iqc/9+Lzhg9o5LGrhq8hLdXAg1Vn1k X0m1RKKTVGmqTLJVOPSF2M/hObcf9tD8F3BrtjvKBmKerjRrG83YcKFdbgYgQLTdpZWD /BeaEjgemTetpzLrmTXK2aBvQKFPtjeS4BiT3pymDOjctUllBg4t5ym2QutVIOeokCBD 5+dSR3pdD1l7OmFFx71CUuRJ1SP3MSX/uAL/HXULr5FkIR6e/WCdU+YdfwgfxLmOMyea 00G4/vo7RwWpYMcAFjJiVBZVv1R6D8nz1xfCLt0hE+V9PVqg8wWlAI/wt46G0x+AG5Ay 2Ygw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OXDmR35PSwt5zimt75w5RuDKP6s87NauCjPbXnXkPPY=; fh=vk0CFmOqCDrOMxE80/iQurcUwEZwu9J3MfLtnm+v9Tc=; b=WYLw+loSDA1W21qwWSxn6BuDut0G0oFE4LdLwk3tBn7fSM74vDtfYJ2PKiXzIfXE6l 4BgB1gJW4sDqyo/AkR/kqdXlpDmXRjhCPlZ5ghxNPDj+CqNgmp/7tgFWqgJLTVWwRfIb epJ1WkKqFeSMWIJvsu4ycyea2HkXxGXkW3r8oG7kOP26fy/bnZ6oqnMfbyyewWUi3D69 mVs8Ty15GtYrzbrYzP30FpO1VCKP6yNaGrKEXCQ/SU6FFuA+JhBYrZ8Uh8sr25XGl+i8 kFcCrjBbRsSZ3bEEWTZT12WqQ1BlgzDR9XO7soTPql1Exb2tVqClQSUgA/FcxgCNoErm sIWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dOoGNY6H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id q7-20020a634307000000b0056952b496efsi7519978pga.366.2023.12.04.00.43.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 00:43:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dOoGNY6H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5090E808F00A; Mon, 4 Dec 2023 00:43:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235272AbjLDImt (ORCPT + 99 others); Mon, 4 Dec 2023 03:42:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234953AbjLDImk (ORCPT ); Mon, 4 Dec 2023 03:42:40 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01DED10C for ; Mon, 4 Dec 2023 00:42:36 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1d04d286bc0so13336045ad.3 for ; Mon, 04 Dec 2023 00:42:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1701679356; x=1702284156; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OXDmR35PSwt5zimt75w5RuDKP6s87NauCjPbXnXkPPY=; b=dOoGNY6HT6uhZZOca7sSmtlGm2nMkkvvfjipfToWGFVFMoXDrticWHuZyXPVWhd/3m 9NLdyjB/ZdVIwk2HW2D7GIGu0u1vnfx5efEe9VmQ5dQdJCPrzTd0nKxk1aGu6VbscmMU R1aPQnNTp1k+8o3lGn1YhS99piJ6tmICHtaW4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701679356; x=1702284156; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OXDmR35PSwt5zimt75w5RuDKP6s87NauCjPbXnXkPPY=; b=YGFqTTTpgXaFhqUI7mmTd4DPYwsZpuN96xlHCTNDDcR4hhtEjn/G/knyPln6sPKSEK +3XRBSJOewst2RDX+u+myao8795Qm7FaGpINQgB4NBTm1uJ7x7X/pH8jE8kqG8iToAU0 28gIhCY59jGwqmLAekxl6Y810Rnp0wCSflt8F/vrxrzfKVaKpBjISKJ1HkyEIZaqPWYu Gw6Zp2Mz6flbYcagLpjB5Gq5N9Qxu+PMFMgVR2wYn7BnLakhspt6QeamUteS0BXFKJEK UiA9u/uzCZMtMhctFDJRXteX63jAkVqQsbyZQboQmDkMXuR+EQjrJdO+6JpHR9KAMcIp iQgg== X-Gm-Message-State: AOJu0Yx9M92e+INW7fIJq++xQXjRLXQpEpK9TBtZ/OL5g8bwv+kM+E69 vMXbqFO4G+3KdXZRtvcgXSI9ew== X-Received: by 2002:a17:903:2305:b0:1d0:6ffd:cea8 with SMTP id d5-20020a170903230500b001d06ffdcea8mr1559097plh.97.1701679356080; Mon, 04 Dec 2023 00:42:36 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:6084:72e2:9ac2:f115]) by smtp.gmail.com with ESMTPSA id p14-20020a1709028a8e00b001cfc3f73927sm7871795plo.9.2023.12.04.00.42.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 00:42:35 -0800 (PST) From: Chen-Yu Tsai To: Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Conor Dooley Subject: [PATCH v3 7/9] arm64: dts: mediatek: Introduce MT8186 Steelix Date: Mon, 4 Dec 2023 16:40:09 +0800 Message-ID: <20231204084012.2281292-8-wenst@chromium.org> X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog In-Reply-To: <20231204084012.2281292-1-wenst@chromium.org> References: <20231204084012.2281292-1-wenst@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 04 Dec 2023 00:43:16 -0800 (PST) The MT8186 Steelix, also known as the Lenovo 300e Yoga Chromebook Gen 4, is a convertible device based on a common design of the same name. The device comes in different variants. Of them, whether a world facing camera is integrated is the only differentiating factor between the two device trees added. The different SKU IDs describe this alone. The other device difference is the touchpad component used. This is simply handled by having both possible components described in the device tree, and letting the implementation figure out which one is actually available. The system bootloader / firmware does not differentiate this in that they share the same SKU IDs. Signed-off-by: Chen-Yu Tsai Acked-by: Conor Dooley --- Changes since v2: - Picked up Conor's ack Changes since v1: - Removed trackpad_pins reference (moved to i2c2 in corsola dtsi) - Fixed copyright year - Renamed touchpad to trackpad arch/arm64/boot/dts/mediatek/Makefile | 2 + .../mt8186-corsola-steelix-sku131072.dts | 18 ++ .../mt8186-corsola-steelix-sku131073.dts | 18 ++ .../dts/mediatek/mt8186-corsola-steelix.dtsi | 195 ++++++++++++++++++ 4 files changed, 233 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile index 442af61b1305..7bd9471b89f9 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -43,6 +43,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku32.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-steelix-sku131072.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-steelix-sku131073.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327681.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327683.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262144.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts new file mode 100644 index 000000000000..eae17bca8585 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2022 Google LLC + */ + +/dts-v1/; +#include "mt8186-corsola-steelix.dtsi" + +/ { + model = "Google Steelix board"; + compatible = "google,steelix-sku131072", "google,steelix", + "mediatek,mt8186"; + chassis-type = "convertible"; +}; + +&mt6366codec { + mediatek,dmic-mode = <0>; /* two-wire */ +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts new file mode 100644 index 000000000000..a55375b95d0d --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2022 Google LLC + */ + +/dts-v1/; +#include "mt8186-corsola-steelix.dtsi" + +/ { + model = "Google Steelix board"; + compatible = "google,steelix-sku131073", "google,steelix", + "mediatek,mt8186"; + chassis-type = "convertible"; +}; + +&mt6366codec { + mediatek,dmic-mode = <1>; /* one-wire */ +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi new file mode 100644 index 000000000000..47262bc499ad --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi @@ -0,0 +1,195 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2022 Google LLC + */ + +/dts-v1/; +#include "mt8186-corsola.dtsi" +#include +#include + +/{ + pp1000_edpbrdg: regulator-pp1000-edpbrdg { + compatible = "regulator-fixed"; + regulator-name = "pp1000_edpbrdg"; + pinctrl-names = "default"; + pinctrl-0 = <&en_pp1000_edpbrdg>; + enable-active-high; + regulator-boot-on; + gpio = <&pio 29 GPIO_ACTIVE_HIGH>; + vin-supply = <&pp3300_z2>; + }; + + pp1800_edpbrdg_dx: regulator-pp1800-edpbrdg-dx { + compatible = "regulator-fixed"; + regulator-name = "pp1800_edpbrdg_dx"; + pinctrl-names = "default"; + pinctrl-0 = <&en_pp1800_edpbrdg>; + enable-active-high; + regulator-boot-on; + gpio = <&pio 30 GPIO_ACTIVE_HIGH>; + vin-supply = <&mt6366_vio18_reg>; + }; + + pp3300_edp_dx: regulator-pp3300-edp-dx { + compatible = "regulator-fixed"; + regulator-name = "pp3300_edp_dx"; + pinctrl-names = "default"; + pinctrl-0 = <&en_pp3300_edpbrdg>; + enable-active-high; + regulator-boot-on; + gpio = <&pio 31 GPIO_ACTIVE_HIGH>; + vin-supply = <&pp3300_z2>; + }; +}; + +&dsi_out { + remote-endpoint = <&anx7625_in>; +}; + +&i2c0 { + clock-frequency = <400000>; + + anx_bridge: anx7625@58 { + compatible = "analogix,anx7625"; + reg = <0x58>; + pinctrl-names = "default"; + pinctrl-0 = <&anx7625_pins>; + enable-gpios = <&pio 96 GPIO_ACTIVE_HIGH>; + reset-gpios = <&pio 98 GPIO_ACTIVE_HIGH>; + vdd10-supply = <&pp1000_edpbrdg>; + vdd18-supply = <&pp1800_edpbrdg_dx>; + vdd33-supply = <&pp3300_edp_dx>; + analogix,lane0-swing = /bits/ 8 <0x70 0x30>; + analogix,lane1-swing = /bits/ 8 <0x70 0x30>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + anx7625_in: endpoint { + remote-endpoint = <&dsi_out>; + data-lanes = <0 1 2 3>; + }; + }; + + port@1 { + reg = <1>; + + anx7625_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + + aux-bus { + panel: panel { + compatible = "edp-panel"; + power-supply = <&pp3300_disp_x>; + backlight = <&backlight_lcd0>; + + port { + panel_in: endpoint { + remote-endpoint = <&anx7625_out>; + }; + }; + }; + }; + }; +}; + +&i2c1 { + touchscreen: touchscreen@5d { + compatible = "goodix,gt7375p"; + reg = <0x5d>; + interrupts-extended = <&pio 12 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&touchscreen_pins>; + reset-gpios = <&pio 60 GPIO_ACTIVE_LOW>; + vdd-supply = <&pp3300_s3>; + goodix,no-reset-during-suspend; + }; +}; + +&i2c2 { + i2c-scl-internal-delay-ns = <22000>; + + /* second source component */ + trackpad@2c { + compatible = "hid-over-i2c"; + reg = <0x2c>; + hid-descr-addr = <0x20>; + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>; + vdd-supply = <&pp3300_s3>; + wakeup-source; + }; +}; + +&keyboard_controller { + function-row-physmap = < + MATRIX_KEY(0x00, 0x02, 0) /* T1 */ + MATRIX_KEY(0x03, 0x02, 0) /* T2 */ + MATRIX_KEY(0x02, 0x02, 0) /* T3 */ + MATRIX_KEY(0x01, 0x02, 0) /* T4 */ + MATRIX_KEY(0x03, 0x04, 0) /* T5 */ + MATRIX_KEY(0x02, 0x04, 0) /* T6 */ + MATRIX_KEY(0x01, 0x04, 0) /* T7 */ + MATRIX_KEY(0x02, 0x09, 0) /* T8 */ + MATRIX_KEY(0x01, 0x09, 0) /* T9 */ + MATRIX_KEY(0x00, 0x04, 0) /* T10 */ + >; + + linux,keymap = < + MATRIX_KEY(0x00, 0x02, KEY_BACK) + MATRIX_KEY(0x03, 0x02, KEY_REFRESH) + MATRIX_KEY(0x02, 0x02, KEY_ZOOM) + MATRIX_KEY(0x01, 0x02, KEY_SCALE) + MATRIX_KEY(0x03, 0x04, KEY_BRIGHTNESSDOWN) + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSUP) + MATRIX_KEY(0x01, 0x04, KEY_MICMUTE) + MATRIX_KEY(0x02, 0x09, KEY_MUTE) + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN) + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP) + CROS_STD_MAIN_KEYMAP + >; +}; + +&pio { + anx7625_pins: anx7625-pins { + pins1 { + pinmux = , + ; + output-low; + }; + + pins2 { + pinmux = ; + input-enable; + bias-disable; + }; + }; + + en_pp1000_edpbrdg: pp1000-edpbrdg-en-pins { + pins { + pinmux = ; + output-low; + }; + }; + + en_pp1800_edpbrdg: pp1800-edpbrdg-en-pins { + pins { + pinmux = ; + output-low; + }; + }; + + en_pp3300_edpbrdg: pp3300-edpbrdg-en-pins { + pins { + pinmux = ; + output-low; + }; + }; +}; -- 2.43.0.rc2.451.g8631bc7472-goog