From nobody Sun Nov 24 15:00:40 2024 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 092A91D0DCE for ; Tue, 5 Nov 2024 09:32:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730799160; cv=none; b=q04yZhY6Bp5rz4dHXxMeSAmUrNoxim/T1CGf6Y5L/mN4cSbT4XjQDzQH4uxAKWTj8fi0be5RY/U2Mr7dKCq7gWJdnY2zXwYDG84AWytJ4/GGezi18D8v40uvIqSUikIoSKoCAFt4rHshTsnnTdor9s4HPT9fYYI1wiqRRw2/pRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730799160; c=relaxed/simple; bh=dHHENdAfWTL+hOQ/FOqsDHimnTtrHZj1mFbutWtnio4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aAAj9JTMe7wSgoipJk+MdKyuSA3rV6rqMPzwRcA6rVvrFpLNqyzxzfEIxkRQLPkVNEn9JH48OYHVB25wqRsrqcqM/PqxzQuERVAY9vRTgUDuFKFlgwSnniVqDTn8ZNgIhNmIkula2UixnntWI0cj9NZd5ZZTrcWJ9GLBYcwIA9I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=iOkrEqeW; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="iOkrEqeW" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-21145812538so18530225ad.0 for ; Tue, 05 Nov 2024 01:32:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1730799157; x=1731403957; 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=Nnqa2pPYuuC5Cap6gt5UkBzeNS3a7p0T+6rmPXsBpW4=; b=iOkrEqeWvyhMZD4m28n5qyLKCKe2CqNkAAaKC82mILpVSomOIJcYFI67wee+ifF/E9 mk723zjSG0/xP/DmI5Gl/Lq6mq+awdpznn7Q6B9t//bIQ3PwDWQP1vpiaw/MTJ5S23rd chCoWe+CCY0OyAhNFWXUtzcfFhYm7EJ4ZeU28= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730799157; x=1731403957; 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=Nnqa2pPYuuC5Cap6gt5UkBzeNS3a7p0T+6rmPXsBpW4=; b=c/r5Dg0CXWE+9xSqkyGkoNQAlDTx0aSe6/h0tUwa6J98Kc5MNW4INLUhfoH8jVAepd Bdd5T5XCb91ezIGs6Xlraq2+nprieF7p7dPGHQywb6DXq9zLWkIYlO12Y78z3oj6an8P pFFr1ikDRxKWsa38rt7Ahf44jihsEAhbj4of7209F8kJYXex9+mGJ/6x8WWNIB2bOV4Z KZdOuspOG0homClTaIYM77FUgllsrkhPNYmdwofSdlkHZkbvrZsafjEwzKQBpaPWHSD2 WDpxzXKLEd39vgFhUOV/jg3YReQN3rTDoszZ94O0/a4WnZHANcNjbmZgLFobkDz17g9U AnPQ== X-Forwarded-Encrypted: i=1; AJvYcCWXpJ1YM3V0UMudrT4gRzi1R3OOfscazA2drdgJoVlx8VhEWC3mfSduOtL2toShaOVGvBDZsY9dIYA0lDk=@vger.kernel.org X-Gm-Message-State: AOJu0Yz/DKTkOe/h1hco6+RQLCxRdrdVGzkp49TKCu0tTzST5xmxboBo IPIblMxvYJh4GYgNkPeSXyf643U1DCaPb5UMpYiTNuPrCcZvawT8ej3r71pouRXgBuKhsI8Sr84 = X-Google-Smtp-Source: AGHT+IGOGQ1HZ0I0tBq/EN9OnU8jHABvUHtmvm4AuXTRezpGH+/Gkd1vzZSmZS+YuGC8dwHeP6ckbA== X-Received: by 2002:a17:902:d50a:b0:20b:57f0:b38b with SMTP id d9443c01a7336-210c68d748amr489451335ad.19.1730799157354; Tue, 05 Nov 2024 01:32:37 -0800 (PST) Received: from fshao-p620.tpe.corp.google.com ([2401:fa00:1:10:20ee:3712:ce0b:1ed7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211056ed8fbsm74149565ad.6.2024.11.05.01.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2024 01:32:37 -0800 (PST) From: Fei Shao To: AngeloGioacchino Del Regno , Matthias Brugger Cc: Fei Shao , Conor Dooley , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 1/2] dt-bindings: arm: mediatek: Add MT8188 Lenovo Chromebook Duet (11", 9) Date: Tue, 5 Nov 2024 17:30:12 +0800 Message-ID: <20241105093222.4055774-2-fshao@chromium.org> X-Mailer: git-send-email 2.47.0.277.g8800431eea-goog In-Reply-To: <20241105093222.4055774-1-fshao@chromium.org> References: <20241105093222.4055774-1-fshao@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add entries for the MT8188-based Chromebook "Ciri", also known as Lenovo Chromebook Duet (11", 9). This device features a detachable design with touchscreen, detachable keyboard and USI 2.0 Stylus support, and has 8 SKUs to accommodate the combinations of second-source components. Signed-off-by: Fei Shao Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno --- (no changes since v1) Documentation/devicetree/bindings/arm/mediatek.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Document= ation/devicetree/bindings/arm/mediatek.yaml index 1d4bb50fcd8d..4b68f0baf010 100644 --- a/Documentation/devicetree/bindings/arm/mediatek.yaml +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml @@ -307,6 +307,19 @@ properties: - enum: - mediatek,mt8186-evb - const: mediatek,mt8186 + - description: Google Ciri (Lenovo Chromebook Duet (11", 9)) + items: + - enum: + - google,ciri-sku0 + - google,ciri-sku1 + - google,ciri-sku2 + - google,ciri-sku3 + - google,ciri-sku4 + - google,ciri-sku5 + - google,ciri-sku6 + - google,ciri-sku7 + - const: google,ciri + - const: mediatek,mt8188 - items: - enum: - mediatek,mt8188-evb --=20 2.47.0.277.g8800431eea-goog From nobody Sun Nov 24 15:00:40 2024 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18DB21D1E77 for ; Tue, 5 Nov 2024 09:32:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730799165; cv=none; b=QmjIzcVcc6P2yZbohT27iTVlrtHJ0QetxrE4oRxS2grqZWsvfljzUgPSbUZjdMFeuqRHtVshTzYVqsq/vVCED5ngWqt/SFE0tZzxj0o4Mxo07CpJuqFqGaCKfdfmwDwSjpcJwq3vDexSHs3hnY7/uLKoTb633U38/8lxBegPSvw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730799165; c=relaxed/simple; bh=iA6iwajX1HZhuUCLob31HpEmtK5KsotOFmeoDT1qhNw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R0n8CVFCtstIhuO219ErzakWvgGl8NwBcnNxdxHRqHsAuc04xxPK3S0bnpM6DSwtMKlmu3QUnTrs74IZr3HvN3GPotsrT5KO5Kc31qdZ4/iIzBGNr/oD+ZZJWXTYbfvPpu2pB7yDeX6GDeysgN6HHjPVaPJTW/gS4GzxOhsSzg8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=N1kGtBlr; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="N1kGtBlr" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-20cf3e36a76so54664785ad.0 for ; Tue, 05 Nov 2024 01:32:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1730799160; x=1731403960; 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=JXx4OrU0KdEUPeeegQjYhdU5AWXzjgqK3eE7TMQU0j4=; b=N1kGtBlr8K/xs552TDftadyrOdG32fC3VZ962nFdJ/vk1weR+IOTxvk0vM7rFjnj2r rhFUq9JiLCxprsZsywPEKV3RO8G2j/GZn3ZAEnjYp0AO7jaBpzuawxGuety6RG0f8z7O hvMGDm7GWw84qTxjZHkq3Y7/fDWOO+hiIxYQQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730799160; x=1731403960; 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=JXx4OrU0KdEUPeeegQjYhdU5AWXzjgqK3eE7TMQU0j4=; b=pmYdlicEzq8KFrf5UXqmO8sHCUXExtMXzS74K7spoDJNPKwrdeSofcKRM8ZzHSKGqz 3zbQ5l8ijgt2OTON4WL2vcNxBJ82ozLY7ASmaZHprfgzG2FMwm6ZApq9h+VhcgOKfSJZ YDsUDhcGTIjRYdH2rdsy4dLmlxgg/O8a7nVgqlp2zjSMMPguKNymxoGvrZZymDtmRUQ1 dBKzn1pQQIVf+68A9gZ7i/1EMZPlHBRd1hx+4yf59mUhx6JkUmZ5uG0rKz/bt+86N6eT MTQ5obxKhb3hwue0IttjMWZdqk4WfU+PmlriaQzPiK36UdzeTvRwNlzeNpk6fuyP0yFN AJYg== X-Forwarded-Encrypted: i=1; AJvYcCW/zrPT4nXgVuIE1WN8eNUgXJeBXs4fL65N59e9PLsJRIalJBbbyH3awiVm46q0UsdX1LNCBTF4XjgTE8Q=@vger.kernel.org X-Gm-Message-State: AOJu0YzGk7glFZlW5hDbT1s0nfG95jK8wTf2DYewpTTFwWqIgSTu2Hox PWMihg5cM9pOs5iAgDdTPX+Gd1yCITjLeOgpEV3XyrqnWjKGgalecZJbHyb7MQ== X-Google-Smtp-Source: AGHT+IH9FOzS/JE06r7dCvizOR+1tPXRopk8lzPbJk048XuZdHPuhNBubawROorooNLknKC60BlsSA== X-Received: by 2002:a17:902:ecc5:b0:20e:552c:53ee with SMTP id d9443c01a7336-21103b04ec4mr257326725ad.24.1730799160048; Tue, 05 Nov 2024 01:32:40 -0800 (PST) Received: from fshao-p620.tpe.corp.google.com ([2401:fa00:1:10:20ee:3712:ce0b:1ed7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211056ed8fbsm74149565ad.6.2024.11.05.01.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2024 01:32:39 -0800 (PST) From: Fei Shao To: AngeloGioacchino Del Regno , Matthias Brugger Cc: Fei Shao , Conor Dooley , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 2/2] arm64: dts: mediatek: Introduce MT8188 Geralt platform based Ciri Date: Tue, 5 Nov 2024 17:30:13 +0800 Message-ID: <20241105093222.4055774-3-fshao@chromium.org> X-Mailer: git-send-email 2.47.0.277.g8800431eea-goog In-Reply-To: <20241105093222.4055774-1-fshao@chromium.org> References: <20241105093222.4055774-1-fshao@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Introduce MT8188-based Chromebook Ciri, also known commercially as Lenovo Chromebook Duet (11", 9). Ciri is a detachable device based on the Geralt design, where Geralt is the codename for the MT8188 platform. Ciri offers 8 SKUs to accommodate different combinations of second-source components, including: - audio codecs (RT5682S and ES8326) - speaker amps (TAS2563 and MAX98390) - MIPI-DSI panels (BOE nv110wum-l60 and IVO t109nw41) Signed-off-by: Fei Shao --- Changes in v2: - remove invalid or undocumented properties e.g. mediatek,dai-link, maxim,dsm_param_name etc. - remove touchscreen as the driver is not yet accepted in upstream - update sound DAI link node name to match the binding - add missing pinctrls in audio codec nodes arch/arm64/boot/dts/mediatek/Makefile | 8 + .../dts/mediatek/mt8188-geralt-ciri-sku0.dts | 11 + .../dts/mediatek/mt8188-geralt-ciri-sku1.dts | 60 + .../dts/mediatek/mt8188-geralt-ciri-sku2.dts | 56 + .../dts/mediatek/mt8188-geralt-ciri-sku3.dts | 15 + .../dts/mediatek/mt8188-geralt-ciri-sku4.dts | 43 + .../dts/mediatek/mt8188-geralt-ciri-sku5.dts | 73 + .../dts/mediatek/mt8188-geralt-ciri-sku6.dts | 69 + .../dts/mediatek/mt8188-geralt-ciri-sku7.dts | 47 + .../boot/dts/mediatek/mt8188-geralt-ciri.dtsi | 397 +++++ .../boot/dts/mediatek/mt8188-geralt.dtsi | 1492 +++++++++++++++++ 11 files changed, 2271 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku1.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku5.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku6.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri.dtsi create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/me= diatek/Makefile index 8fd7b2bb7a15..c6c34d99316b 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -69,6 +69,14 @@ dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8186-corsola-voltorb-= sku589824.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8186-corsola-voltorb-sku589825.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8186-evb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8188-evb.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8188-geralt-ciri-sku0.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8188-geralt-ciri-sku1.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8188-geralt-ciri-sku2.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8188-geralt-ciri-sku3.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8188-geralt-ciri-sku4.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8188-geralt-ciri-sku5.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8188-geralt-ciri-sku6.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8188-geralt-ciri-sku7.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8192-asurada-hayato-r1.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8192-asurada-hayato-r5-sku2.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8192-asurada-spherion-r0.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dts b/arc= h/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dts new file mode 100644 index 000000000000..7a2edbaa74f1 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku0.dts @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2023 Google LLC + */ +/dts-v1/; +#include "mt8188-geralt-ciri.dtsi" + +/ { + model =3D "Google Ciri sku0 board"; + compatible =3D "google,ciri-sku0", "google,ciri", "mediatek,mt8188"; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku1.dts b/arc= h/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku1.dts new file mode 100644 index 000000000000..c40d41e1dd36 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku1.dts @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2023 Google LLC + */ +/dts-v1/; +#include "mt8188-geralt-ciri.dtsi" + +/ { + model =3D "Google Ciri sku1 board"; + compatible =3D "google,ciri-sku1", "google,ciri", "mediatek,mt8188"; +}; + +&dsi_panel { + compatible =3D "ivo,t109nw41", "himax,hx83102"; +}; + +&i2c0 { + /delete-node/ audio-codec@1a; + + es8326: audio-codec@19 { + compatible =3D "everest,es8326"; + reg =3D <0x19>; + interrupts-extended =3D <&pio 108 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&audio_codec_pins>; + #sound-dai-cells =3D <0>; + everest,jack-pol =3D [0e]; + everest,interrupt-clk =3D [00]; + }; +}; + +&sound { + compatible =3D "mediatek,mt8188-es8326"; + model =3D "mt8188_m98390_8326"; + + audio-routing =3D + "ETDM1_OUT", "ETDM_SPK_PIN", + "ETDM2_OUT", "ETDM_HP_PIN", + "ETDM1_IN", "ETDM_SPK_PIN", + "ETDM2_IN", "ETDM_HP_PIN", + "ADDA Capture", "MTKAIF_PIN", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "MIC1", "Headset Mic", + "Left Spk", "Front Left BE_OUT", + "Right Spk", "Front Right BE_OUT"; + status =3D "okay"; + + dai-link-2 { + codec { + sound-dai =3D <&es8326>; + }; + }; + + dai-link-3 { + codec { + sound-dai =3D <&es8326>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dts b/arc= h/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dts new file mode 100644 index 000000000000..846fd685d4b2 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku2.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2024 Google LLC + */ +/dts-v1/; +#include "mt8188-geralt-ciri.dtsi" + +/ { + model =3D "Google Ciri sku2 board"; + compatible =3D "google,ciri-sku2", "google,ciri", "mediatek,mt8188"; +}; + +&i2c0 { + /delete-node/ audio-codec@1a; + + es8326: audio-codec@19 { + compatible =3D "everest,es8326"; + reg =3D <0x19>; + interrupts-extended =3D <&pio 108 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&audio_codec_pins>; + #sound-dai-cells =3D <0>; + everest,jack-pol =3D [0e]; + everest,interrupt-clk =3D [00]; + }; +}; + +&sound { + compatible =3D "mediatek,mt8188-es8326"; + model =3D "mt8188_m98390_8326"; + + audio-routing =3D + "ETDM1_OUT", "ETDM_SPK_PIN", + "ETDM2_OUT", "ETDM_HP_PIN", + "ETDM1_IN", "ETDM_SPK_PIN", + "ETDM2_IN", "ETDM_HP_PIN", + "ADDA Capture", "MTKAIF_PIN", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "MIC1", "Headset Mic", + "Left Spk", "Front Left BE_OUT", + "Right Spk", "Front Right BE_OUT"; + status =3D "okay"; + + dai-link-2 { + codec { + sound-dai =3D <&es8326>; + }; + }; + + dai-link-3 { + codec { + sound-dai =3D <&es8326>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dts b/arc= h/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dts new file mode 100644 index 000000000000..d037c2528fe2 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku3.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2024 Google LLC + */ +/dts-v1/; +#include "mt8188-geralt-ciri.dtsi" + +/ { + model =3D "Google Ciri sku3 board"; + compatible =3D "google,ciri-sku3", "google,ciri", "mediatek,mt8188"; +}; + +&dsi_panel { + compatible =3D "ivo,t109nw41", "himax,hx83102"; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dts b/arc= h/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dts new file mode 100644 index 000000000000..591ffcd5b95f --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku4.dts @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2024 Google LLC + */ +/dts-v1/; +#include "mt8188-geralt-ciri.dtsi" + +/ { + model =3D "Google Ciri sku4 board (rev4)"; + compatible =3D "google,ciri-sku4", "google,ciri", "mediatek,mt8188"; +}; + +&i2c0 { + /delete-node/ amplifier@38; + /delete-node/ amplifier@39; + + tas2563: amplifier@4f { + compatible =3D "ti,tas2563", "ti,tas2781"; + reg =3D <0x4f>, <0x4c>; /* left / right channel */ + reset-gpios =3D <&pio 118 GPIO_ACTIVE_HIGH>; + #sound-dai-cells =3D <0>; + }; +}; + +&sound { + model =3D "mt8188_tas2563_5682"; + audio-routing =3D + "ETDM1_OUT", "ETDM_SPK_PIN", + "ETDM2_OUT", "ETDM_HP_PIN", + "ETDM1_IN", "ETDM_SPK_PIN", + "ETDM2_IN", "ETDM_HP_PIN", + "ADDA Capture", "MTKAIF_PIN", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "IN1P", "Headset Mic"; + status =3D "okay"; + + dai-link-1 { + codec { + sound-dai =3D <&tas2563>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku5.dts b/arc= h/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku5.dts new file mode 100644 index 000000000000..e352c3bf659b --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku5.dts @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2024 Google LLC + */ +/dts-v1/; +#include "mt8188-geralt-ciri.dtsi" + +/ { + model =3D "Google Ciri sku5 board (rev4)"; + compatible =3D "google,ciri-sku5", "google,ciri", "mediatek,mt8188"; +}; + +&dsi_panel { + compatible =3D "ivo,t109nw41", "himax,hx83102"; +}; + +&i2c0 { + /delete-node/ audio-codec@1a; + /delete-node/ amplifier@38; + /delete-node/ amplifier@39; + + es8326: audio-codec@19 { + compatible =3D "everest,es8326"; + reg =3D <0x19>; + interrupts-extended =3D <&pio 108 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&audio_codec_pins>; + #sound-dai-cells =3D <0>; + everest,jack-pol =3D [0e]; + everest,interrupt-clk =3D [00]; + }; + + tas2563: amplifier@4f { + compatible =3D "ti,tas2563", "ti,tas2781"; + reg =3D <0x4f>, <0x4c>; /* left / right channel */ + reset-gpios =3D <&pio 118 GPIO_ACTIVE_HIGH>; + #sound-dai-cells =3D <0>; + }; +}; + +&sound { + compatible =3D "mediatek,mt8188-es8326"; + model =3D "mt8188_tas2563_8326"; + + audio-routing =3D + "ETDM1_OUT", "ETDM_SPK_PIN", + "ETDM2_OUT", "ETDM_HP_PIN", + "ETDM1_IN", "ETDM_SPK_PIN", + "ETDM2_IN", "ETDM_HP_PIN", + "ADDA Capture", "MTKAIF_PIN", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "MIC1", "Headset Mic"; + status =3D "okay"; + + dai-link-1 { + codec { + sound-dai =3D <&tas2563>; + }; + }; + + dai-link-2 { + codec { + sound-dai =3D <&es8326>; + }; + }; + + dai-link-3 { + codec { + sound-dai =3D <&es8326>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku6.dts b/arc= h/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku6.dts new file mode 100644 index 000000000000..7e14cda8b66a --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku6.dts @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2024 Google LLC + */ +/dts-v1/; +#include "mt8188-geralt-ciri.dtsi" + +/ { + model =3D "Google Ciri sku6 board (rev4)"; + compatible =3D "google,ciri-sku6", "google,ciri", "mediatek,mt8188"; +}; + +&i2c0 { + /delete-node/ audio-codec@1a; + /delete-node/ amplifier@38; + /delete-node/ amplifier@39; + + es8326: audio-codec@19 { + compatible =3D "everest,es8326"; + reg =3D <0x19>; + interrupts-extended =3D <&pio 108 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&audio_codec_pins>; + #sound-dai-cells =3D <0>; + everest,jack-pol =3D [0e]; + everest,interrupt-clk =3D [00]; + }; + + tas2563: amplifier@4f { + compatible =3D "ti,tas2563", "ti,tas2781"; + reg =3D <0x4f>, <0x4c>; /* left / right channel */ + reset-gpios =3D <&pio 118 GPIO_ACTIVE_HIGH>; + #sound-dai-cells =3D <0>; + }; +}; + +&sound { + compatible =3D "mediatek,mt8188-es8326"; + model =3D "mt8188_tas2563_8326"; + + audio-routing =3D + "ETDM1_OUT", "ETDM_SPK_PIN", + "ETDM2_OUT", "ETDM_HP_PIN", + "ETDM1_IN", "ETDM_SPK_PIN", + "ETDM2_IN", "ETDM_HP_PIN", + "ADDA Capture", "MTKAIF_PIN", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "MIC1", "Headset Mic"; + status =3D "okay"; + + dai-link-1 { + codec { + sound-dai =3D <&tas2563>; + }; + }; + + dai-link-2 { + codec { + sound-dai =3D <&es8326>; + }; + }; + + dai-link-3 { + codec { + sound-dai =3D <&es8326>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dts b/arc= h/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dts new file mode 100644 index 000000000000..7eda79f4484a --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri-sku7.dts @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2024 Google LLC + */ +/dts-v1/; +#include "mt8188-geralt-ciri.dtsi" + +/ { + model =3D "Google Ciri sku7 board (rev4)"; + compatible =3D "google,ciri-sku7", "google,ciri", "mediatek,mt8188"; +}; + +&dsi_panel { + compatible =3D "ivo,t109nw41", "himax,hx83102"; +}; + +&i2c0 { + /delete-node/ amplifier@38; + /delete-node/ amplifier@39; + + tas2563: amplifier@4f { + compatible =3D "ti,tas2563", "ti,tas2781"; + reg =3D <0x4f>, <0x4c>; /* left / right channel */ + reset-gpios =3D <&pio 118 GPIO_ACTIVE_HIGH>; + #sound-dai-cells =3D <0>; + }; +}; + +&sound { + model =3D "mt8188_tas2563_5682"; + audio-routing =3D + "ETDM1_OUT", "ETDM_SPK_PIN", + "ETDM2_OUT", "ETDM_HP_PIN", + "ETDM1_IN", "ETDM_SPK_PIN", + "ETDM2_IN", "ETDM_HP_PIN", + "ADDA Capture", "MTKAIF_PIN", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "IN1P", "Headset Mic"; + status =3D "okay"; + + dai-link-1 { + codec { + sound-dai =3D <&tas2563>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri.dtsi b/arch/ar= m64/boot/dts/mediatek/mt8188-geralt-ciri.dtsi new file mode 100644 index 000000000000..62c8a37a4c3d --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt-ciri.dtsi @@ -0,0 +1,397 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright 2023 Google LLC + */ +/dts-v1/; +#include "mt8188-geralt.dtsi" + +/delete-node/ &pp3300_edp_disp; + +&aud_etdm_hp_on { + pins-mclk { + pinmux =3D ; + }; +}; + +&aud_etdm_hp_off { + pins-mclk { + pinmux =3D ; + bias-pull-down; + input-enable; + }; +}; + +&aud_etdm_spk_on { + pins-bus { + drive-strength =3D <8>; + }; +}; + +/* Ciri's TDP design target is 90 degrees */ +&cpu_little0_alert0 { + temperature =3D <90000>; + hysteresis =3D <2000>; + type =3D "passive"; +}; + +&cpu_little1_alert0 { + temperature =3D <90000>; + hysteresis =3D <2000>; + type =3D "passive"; +}; + +&cpu_little2_alert0 { + temperature =3D <90000>; + hysteresis =3D <2000>; + type =3D "passive"; +}; + +&cpu_little3_alert0 { + temperature =3D <90000>; + hysteresis =3D <2000>; + type =3D "passive"; +}; + +&cpu_big0_alert0 { + temperature =3D <90000>; + hysteresis =3D <2000>; + type =3D "passive"; +}; + +&cpu_big1_alert0 { + temperature =3D <90000>; + hysteresis =3D <2000>; + type =3D "passive"; +}; + +&dp_intf0 { + /delete-node/ port; +}; + +&dsi_panel { + compatible =3D "boe,nv110wum-l60", "himax,hx83102"; +}; + +&edp_tx { + /delete-node/ ports; + /delete-node/ aux-bus; +}; + +&i2c0 { + /delete-node/ audio-codec@1a; + /delete-node/ amplifier@3a; + /delete-node/ amplifier@3b; + + rt5682s: audio-codec@1a { + compatible =3D "realtek,rt5682s"; + reg =3D <0x1a>; + interrupts-extended =3D <&pio 108 IRQ_TYPE_EDGE_BOTH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&audio_codec_pins>; + #sound-dai-cells =3D <1>; + + AVDD-supply =3D <&mt6359_vio18_ldo_reg>; + DBVDD-supply =3D <&mt6359_vio18_ldo_reg>; + LDO1-IN-supply =3D <&mt6359_vio18_ldo_reg>; + MICVDD-supply =3D <&pp3300_s3>; + realtek,jd-src =3D <1>; + }; +}; + +&i2c2 { + status =3D "disabled"; +}; + +&i2c_tunnel { + /delete-node/ sbs-battery@b; + + battery: sbs-battery@f { + compatible =3D "sbs,sbs-battery"; + reg =3D <0xf>; + sbs,i2c-retry-count =3D <2>; + sbs,poll-retry-count =3D <1>; + }; +}; + +&max98390_38 { + sound-name-prefix =3D "Front Right"; +}; + +&max98390_39 { + sound-name-prefix =3D "Front Left"; +}; + +&mipi_tx_config0 { + drive-strength-microamp =3D <5200>; +}; + +&mmc1 { + status =3D "disabled"; +}; + +&mt6359_vm18_ldo_reg { + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1900000>; + regulator-microvolt-offset =3D <100000>; +}; + +&sound { + compatible =3D "mediatek,mt8188-rt5682s"; + model =3D "mt8188_m98390_5682"; + + audio-routing =3D + "ETDM1_OUT", "ETDM_SPK_PIN", + "ETDM2_OUT", "ETDM_HP_PIN", + "ETDM1_IN", "ETDM_SPK_PIN", + "ETDM2_IN", "ETDM_HP_PIN", + "ADDA Capture", "MTKAIF_PIN", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "IN1P", "Headset Mic", + "Left Spk", "Front Left BE_OUT", + "Right Spk", "Front Right BE_OUT"; + status =3D "okay"; + + dai-link-0 { + dai-format =3D "i2s"; + }; + + dai-link-1 { + dai-format =3D "i2s"; + codec { + sound-dai =3D <&max98390_38>, + <&max98390_39>; + }; + }; + + dai-link-2 { + codec { + sound-dai =3D <&rt5682s 0>; + }; + }; + + dai-link-3 { + codec { + sound-dai =3D <&rt5682s 0>; + }; + }; +}; + +&spi1 { + pinctrl-names =3D "default", "sleep"; + pinctrl-0 =3D <&spi1_pins_default>; + pinctrl-1 =3D <&spi1_pins_sleep>; + num-cs =3D <1>; + #address-cells =3D <1>; + #size-cells =3D <0>; +}; + +&pio { + gpio-line-names =3D + "GSC_AP_INT_ODL", + "AP_DISP_BKLTEN", + "", + "EN_PPVAR_MIPI_DISP", + "EN_PPVAR_MIPI_DISP_150MA", + "TCHSCR_RST_1V8_L", + "", + "", + "", + "", + "", + "I2S_SPKR_DATAOUT", + "EN_PP3300_WLAN_X", + "WIFI_KILL_1V8_L", + "BT_KILL_1V8_L", + "AP_FLASH_WP_L", /* ... is crossystem ABI. Rev1 schematics call it AP_WP= _ODL. */ + "", + "", + "WCAM_PWDN_L", + "WCAM_RST_L", + "UCAM_PWDM_L", + "UCAM_RST_L", + "WCAM_24M_CLK", + "UCAM_24M_CLK", + "MT6319_INT", + "DISP_RST_1V8_L", + "DSIO_DSI_TE", + "", + "TP", + "MIPI_BL_PWM_1V8", + "", + "UART_AP_TX_GSC_RX", + "UART_GSC_TX_AP_RX", + "UART_SSPM_TX_DBGCON_RX", + "UART_DBGCON_TX_SSPM_RX", + "UART_ADSP_TX_DBGCON_RX", + "UART_DBGCON_TX_ADSP_RX", + "JTAG_AP_TMS", + "JTAG_AP_TCK", + "JTAG_AP_TDI", + "JTAG_AP_TDO", + "JTAG_AP_TRST", + "AP_KPCOL0", + "TP", + "", + "TP", + "EC_AP_HPD_OD", + "PCIE_WAKE_1V8_ODL", + "PCIE_RST_1V8_L", + "PCIE_CLKREQ_1V8_ODL", + "", + "", + "", + "", + "", + "AP_I2C_AUD_SCL_1V8", + "AP_I2C_AUD_SDA_1V8", + "AP_I2C_TPM_SCL_1V8", + "AP_I2C_TPM_SDA_1V8", + "AP_I2C_TCHSCR_SCL_1V8", + "AP_I2C_TCHSCR_SDA_1V8", + "AP_I2C_PMIC_SAR_SCL_1V8", + "AP_I2C_PMIC_SAR_SDA_1V8", + "AP_I2C_EC_HID_KB_SCL_1V8", + "AP_I2C_EC_HID_KB_SDA_1V8", + "AP_I2C_UCAM_SCL_1V8", + "AP_I2C_UCAM_SDA_1V8", + "AP_I2C_WCAM_SCL_1V8", + "AP_I2C_WCAM_SDA_1V8", + "SPI_AP_CS_EC_L", + "SPI_AP_CLK_EC", + "SPI_AP_DO_EC_DI", + "SPI_AP_DI_EC_DO", + "TP", + "TP", + "SPI_AP_CS_TCHSCR_L", + "SPI_AP_CLK_TCHSCR", + "SPI_AP_DO_TCHSCR_DI", + "SPI_AP_DI_TCHSCR_DO", + "TP", + "TP", + "TP", + "TP", + "", + "", + "", + "TP", + "", + "", + "", + "", + "", + "PWRAP_SPI_CS_L", + "PWRAP_SPI_CK", + "PWRAP_SPI_MOSI", + "PWRAP_SPI_MISO", + "SRCLKENA0", + "SRCLKENA1", + "SCP_VREQ_VAO", + "AP_RTC_CLK32K", + "AP_PMIC_WDTRST_L", + "AUD_CLK_MOSI", + "AUD_SYNC_MOSI", + "AUD_DAT_MOSI0", + "AUD_DAT_MOSI1", + "AUD_DAT_MISO0", + "AUD_DAT_MISO1", + "", + "HP_INT_ODL", + "SPKR_INT_ODL", + "I2S_HP_DATAIN", + "EN_SPKR", + "I2S_SPKR_MCLK", + "I2S_SPKR_BCLK", + "I2S_HP_MCLK", + "I2S_HP_BCLK", + "I2S_HP_LRCK", + "I2S_HP_DATAOUT", + "RST_SPKR_L", + "I2S_SPKR_LRCK", + "I2S_SPKR_DATAIN", + "", + "", + "", + "", + "SPI_AP_CLK_ROM", + "SPI_AP_CS_ROM_L", + "SPI_AP_DO_ROM_DI", + "SPI_AP_DI_ROM_DO", + "TP", + "TP", + "", + "", + "", + "", + "", + "", + "", + "", + "EN_PP2800A_UCAM_X", + "EN_PP1200_UCAM_X", + "EN_PP2800A_WCAM_X", + "EN_PP1100_WCAM_X", + "TCHSCR_INT_1V8_L", + "", + "MT7921_PMU_EN_1V8", + "", + "AP_EC_WARM_RST_REQ", + "EC_AP_HID_INT_ODL", + "EC_AP_INT_ODL", + "AP_XHCI_INIT_DONE", + "EMMC_DAT7", + "EMMC_DAT6", + "EMMC_DAT5", + "EMMC_DAT4", + "EMMC_RST_L", + "EMMC_CMD", + "EMMC_CLK", + "EMMC_DAT3", + "EMMC_DAT2", + "EMMC_DAT1", + "EMMC_DAT0", + "EMMC_DSL", + "", + "", + "", + "", + "", + "", + "", + "", + "USB3_HUB_RST_L", + "EC_AP_RSVD0_ODL", + "", + "", + "SPMI_SCL", + "SPMI_SDA"; + + touchscreen_rst: touchscreen-rst-pins { + pins-tchscr-rst { + pinmux =3D ; + output-high; + }; + }; + + spi1_pins_default: spi1-default-pins { + pins-bus { + pinmux =3D , + , + , + ; + bias-disable; + drive-strength =3D <10>; + }; + }; + + spi1_pins_sleep: spi1-sleep-pins { + pins-bus { + pinmux =3D , + , + , + ; + bias-pull-down; + input-enable; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/b= oot/dts/mediatek/mt8188-geralt.dtsi new file mode 100644 index 000000000000..0d33ae82f0eb --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi @@ -0,0 +1,1492 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2022 MediaTek Inc. + */ +/dts-v1/; +#include +#include "mt8188.dtsi" +#include "mt6359.dtsi" + +/ { + aliases { + i2c0 =3D &i2c0; + i2c1 =3D &i2c1; + i2c2 =3D &i2c2; + i2c3 =3D &i2c3; + i2c4 =3D &i2c4; + i2c5 =3D &i2c5; + i2c6 =3D &i2c6; + mmc0 =3D &mmc0; + mmc1 =3D &mmc1; + serial0 =3D &uart0; + }; + + backlight_lcd0: backlight-lcd0 { + compatible =3D "pwm-backlight"; + brightness-levels =3D <0 1023>; + default-brightness-level =3D <576>; + enable-gpios =3D <&pio 1 GPIO_ACTIVE_HIGH>; + num-interpolated-steps =3D <1023>; + power-supply =3D <&ppvar_sys>; + pwms =3D <&disp_pwm0 0 500000>; + }; + + chosen { + stdout-path =3D "serial0:115200n8"; + }; + + dmic-codec { + compatible =3D "dmic-codec"; + num-channels =3D <2>; + wakeup-delay-ms =3D <100>; + }; + + memory@40000000 { + device_type =3D "memory"; + reg =3D <0 0x40000000 0 0x80000000>; + }; + + /* system wide LDO 1.8V power rail */ + pp1800_ldo_z1: regulator-pp1800-ldo-z1 { + compatible =3D "regulator-fixed"; + regulator-name =3D "pp1800_ldo_z1"; + /* controlled by PP3300_Z1 */ + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + vin-supply =3D <&pp3300_z1>; + }; + + /* separately switched 3.3V power rail */ + pp3300_s3: regulator-pp3300-s3 { + compatible =3D "regulator-fixed"; + regulator-name =3D "pp3300_s3"; + /* controlled by PMIC */ + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + vin-supply =3D <&pp3300_z1>; + }; + + /* system wide 3.3V power rail */ + pp3300_z1: regulator-pp3300-z1 { + compatible =3D "regulator-fixed"; + regulator-name =3D "pp3300_z1"; + /* controlled by PP3300_LDO_Z5 & EN_PWR_Z1 */ + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + vin-supply =3D <&ppvar_sys>; + }; + + pp3300_edp_disp: regulator-pp3300-edp-disp { + compatible =3D "regulator-fixed"; + regulator-name =3D "pp3300_edp_disp"; + regulator-boot-on; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + enable-active-high; + gpio =3D <&pio 27 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&edp_disp_en>; + vin-supply =3D <&pp3300_z1>; + status =3D "disabled"; + }; + + pp3300_mipi_tchscr: regulator-pp3300-mipi-tchscr { + compatible =3D "regulator-fixed"; + regulator-name =3D "pp3300_mipi_tchscr"; + regulator-boot-on; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + enable-active-high; + gpio =3D <&pio 144 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&mipi_tchscr_en>; + vin-supply =3D <&pp3300_z1>; + }; + + pp3300_wlan: regulator-pp3300-wlan { + compatible =3D "regulator-fixed"; + regulator-name =3D "pp3300_wlan"; + regulator-always-on; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + enable-active-high; + gpio =3D <&pio 12 GPIO_ACTIVE_HIGH>; + pinctrl-0 =3D <&wlan_en>; + pinctrl-names =3D "default"; + vin-supply =3D <&pp3300_z1>; + }; + + /* system wide 4.2V power rail */ + pp4200_s5: regulator-pp4200-s5 { + compatible =3D "regulator-fixed"; + regulator-name =3D "pp4200_s5"; + /* controlled by EC */ + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <4200000>; + regulator-max-microvolt =3D <4200000>; + vin-supply =3D <&ppvar_sys>; + }; + + /* system wide 5.0V power rail */ + pp5000_z1: regulator-pp5000-z1 { + compatible =3D "regulator-fixed"; + regulator-name =3D "pp5000_z1"; + /* controlled by EC */ + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + vin-supply =3D <&ppvar_sys>; + }; + + pp5000_usb_vbus: regulator-pp5000-usb-vbus { + compatible =3D "regulator-fixed"; + regulator-name =3D "pp5000_usb_vbus"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + enable-active-high; + gpio =3D <&pio 150 GPIO_ACTIVE_HIGH>; + vin-supply =3D <&pp5000_z1>; + }; + + /* system wide semi-regulated power rail from battery or USB */ + ppvar_sys: regulator-ppvar-sys { + compatible =3D "regulator-fixed"; + regulator-name =3D "ppvar_sys"; + regulator-always-on; + regulator-boot-on; + }; + + ppvar_mipi_disp_avdd: regulator-ppvar-mipi-disp-avdd { + compatible =3D "regulator-fixed"; + regulator-name =3D "ppvar_mipi_disp_avdd"; + enable-active-high; + gpio =3D <&pio 3 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&mipi_disp_avdd_en>; + vin-supply =3D <&pp5000_z1>; + }; + + ppvar_mipi_disp_avee: regulator-ppvar-mipi-disp-avee { + compatible =3D "regulator-fixed"; + regulator-name =3D "ppvar_mipi_disp_avee"; + regulator-enable-ramp-delay =3D <10000>; + enable-active-high; + gpio =3D <&pio 4 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&mipi_disp_avee_en>; + vin-supply =3D <&pp5000_z1>; + }; + + reserved_memory: reserved-memory { + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + + scp_mem: memory@50000000 { + compatible =3D "shared-dma-pool"; + reg =3D <0 0x50000000 0 0x800000>; + no-map; + }; + + apu_mem: memory@55000000 { + compatible =3D "shared-dma-pool"; + reg =3D <0 0x55000000 0 0x1400000>; + }; + + adsp_mem: memory@60000000 { + compatible =3D "shared-dma-pool"; + reg =3D <0 0x60000000 0 0xf00000>; + no-map; + }; + + afe_dma_mem: memory@60f00000 { + compatible =3D "shared-dma-pool"; + reg =3D <0 0x60f00000 0 0x100000>; + no-map; + }; + + adsp_dma_mem: memory@61000000 { + compatible =3D "shared-dma-pool"; + reg =3D <0 0x61000000 0 0x100000>; + no-map; + }; + + scp_dual_mem: memory@70000000 { + compatible =3D "shared-dma-pool"; + reg =3D <0 0x70000000 0 0xa000000>; + no-map; + }; + }; +}; + +&adsp { + memory-region =3D <&adsp_dma_mem>, <&adsp_mem>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&adsp_uart_pins>; + status =3D "okay"; +}; + +&afe { + memory-region =3D <&afe_dma_mem>; + mediatek,etdm-out1-cowork-source =3D <0>; /* in1 */ + mediatek,etdm-in2-cowork-source =3D <3>; /* out2 */ + status =3D "okay"; +}; + +&auxadc { + status =3D "okay"; +}; + +&cam_vcore { + domain-supply =3D <&mt6359_vproc1_buck_reg>; +}; + +&disp_dsi0 { + #address-cells =3D <1>; + #size-cells =3D <0>; + status =3D "okay"; + + dsi_panel: panel@0 { + compatible =3D "boe,tv110c9m-ll3"; + reg =3D <0>; + enable-gpios =3D <&pio 25 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&mipi_dsi_pins>; + + backlight =3D <&backlight_lcd0>; + avdd-supply =3D <&ppvar_mipi_disp_avdd>; + avee-supply =3D <&ppvar_mipi_disp_avee>; + pp1800-supply =3D <&mt6359_vm18_ldo_reg>; + rotation =3D <270>; + + status =3D "okay"; + + port { + dsi_panel_in: endpoint { + remote-endpoint =3D <&dsi_out>; + }; + }; + }; + + port { + dsi_out: endpoint { + remote-endpoint =3D <&dsi_panel_in>; + }; + }; +}; + +&disp_pwm0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&disp_pwm0_pins>; + status =3D "okay"; +}; + +&disp_pwm1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&disp_pwm1_pins>; +}; + +&dp_intf0 { + port { + dp_intf0_out: endpoint { + remote-endpoint =3D <&edp_in>; + }; + }; +}; + +&dp_intf1 { + status =3D "okay"; + + port { + dp_intf1_out: endpoint { + remote-endpoint =3D <&dptx_in>; + }; + }; +}; + +&dp_tx { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&dp_tx_hpd>; + #sound-dai-cells =3D <0>; + status =3D "okay"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + dptx_in: endpoint { + remote-endpoint =3D <&dp_intf1_out>; + }; + }; + + port@1 { + reg =3D <1>; + dptx_out: endpoint { + data-lanes =3D <0 1 2 3>; + }; + }; + }; +}; + +&edp_tx { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&edp_tx_hpd>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + edp_in: endpoint { + remote-endpoint =3D <&dp_intf0_out>; + }; + }; + + port@1 { + reg =3D <1>; + edp_out: endpoint { + data-lanes =3D <0 1 2 3>; + remote-endpoint =3D <&edp_panel_in>; + }; + }; + }; + + /* + * Geralt also supports eDP OLED panels, which control panel + * brightness via the AUX channel and don't require PWM pin + * control. + * This is an auxiliary panel path for hardware layout + * validation and demonstration, so it's disabled by default. + * Boards adopting MIPI-DSI panels may not have this path. + **/ + aux-bus { + edp_panel: panel { + compatible =3D "lg,lp120up1"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&edp_bl_en>; + power-supply =3D <&pp3300_edp_disp>; + status =3D "disabled"; + + port { + edp_panel_in: endpoint { + remote-endpoint =3D <&edp_out>; + }; + }; + }; + }; +}; + +&gpu { + mali-supply =3D <&mt6359_vproc2_buck_reg>; + status =3D "okay"; +}; + +&i2c0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2c0_pins>; + clock-frequency =3D <400000>; + status =3D "okay"; + + nau8825: audio-codec@1a { + compatible =3D "nuvoton,nau8825"; + reg =3D <0x1a>; + interrupts-extended =3D <&pio 108 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&audio_codec_pins>; + #sound-dai-cells =3D <0>; + + nuvoton,adc-delay-ms =3D <300>; + nuvoton,jack-eject-debounce =3D <7>; + nuvoton,jack-insert-debounce =3D <7>; + nuvoton,jkdet-enable; + nuvoton,jkdet-polarity =3D <1>; + nuvoton,micbias-voltage =3D <6>; + nuvoton,sar-hysteresis =3D <1>; + nuvoton,sar-voltage =3D <6>; + nuvoton,sar-compare-time =3D <0>; + nuvoton,sar-sampling-time =3D <0>; + nuvoton,short-key-debounce =3D <2>; + nuvoton,vref-impedance =3D <2>; + }; + + max98390_38: amplifier@38 { + compatible =3D "maxim,max98390"; + reg =3D <0x38>; + sound-name-prefix =3D "Rear Right"; + reset-gpios =3D <&pio 118 GPIO_ACTIVE_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&speaker_en>; + #sound-dai-cells =3D <0>; + }; + + max98390_39: amplifier@39 { + compatible =3D "maxim,max98390"; + reg =3D <0x39>; + sound-name-prefix =3D "Rear Left"; + #sound-dai-cells =3D <0>; + }; + + max98390_3a: amplifier@3a { + compatible =3D "maxim,max98390"; + reg =3D <0x3a>; + sound-name-prefix =3D "Front Left"; + #sound-dai-cells =3D <0>; + }; + + max98390_3b: amplifier@3b { + compatible =3D "maxim,max98390"; + reg =3D <0x3b>; + sound-name-prefix =3D "Front Right"; + #sound-dai-cells =3D <0>; + }; +}; + +&i2c1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2c1_pins>; + clock-frequency =3D <400000>; + status =3D "okay"; + + tpm@50 { + compatible =3D "google,cr50"; + reg =3D <0x50>; + interrupts-extended =3D <&pio 0 IRQ_TYPE_EDGE_RISING>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&gsc_int>; + }; +}; + +&i2c2 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2c2_pins>; + clock-frequency =3D <400000>; + status =3D "okay"; + + touchscreen@1 { + compatible =3D "hid-over-i2c"; + reg =3D <0x1>; + hid-descr-addr =3D <0x0001>; + interrupts-extended =3D <&pio 143 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&touchscreen_int>; + post-power-on-delay-ms =3D <500>; + vdd-supply =3D <&pp3300_mipi_tchscr>; + vddl-supply =3D <&mt6359_vm18_ldo_reg>; + }; +}; + +&i2c3 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2c3_pins>; + clock-frequency =3D <400000>; + status =3D "okay"; + + ap_sar_sensor: proximity@28 { + compatible =3D "semtech,sx9324"; + reg =3D <0x28>; + interrupts-extended =3D <&pio 88 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&ap_sar_sensor_int>; + svdd-supply =3D <&mt6359_vio18_ldo_reg>; + vdd-supply =3D <&mt6359_vio18_ldo_reg>; + #io-channel-cells =3D <1>; + status =3D "disabled"; + }; +}; + +&i2c4 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2c4_pins>; + clock-frequency =3D <400000>; + status =3D "okay"; + + trackpad: trackpad@56 { + compatible =3D "hid-over-i2c"; + reg =3D <0x56>; + hid-descr-addr =3D <0x0001>; + interrupts-extended =3D <&pio 148 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&trackpad_pins>; + wakeup-source; + status =3D "disabled"; + }; +}; + +&i2c5 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2c5_pins>; + clock-frequency =3D <400000>; + status =3D "okay"; +}; + +&i2c6 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2c6_pins>; + clock-frequency =3D <400000>; + status =3D "okay"; +}; + +&mfg0 { + domain-supply =3D <&mt6359_vproc2_buck_reg>; +}; + +&mfg1 { + domain-supply =3D <&mt6359_vsram_others_ldo_reg>; +}; + +&mipi_tx_config0 { + status =3D "okay"; +}; + +&mmc0 { + bus-width =3D <8>; + cap-mmc-highspeed; + cap-mmc-hw-reset; + hs400-ds-delay =3D <0x1481b>; + max-frequency =3D <200000000>; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + mmc-hs400-enhanced-strobe; + no-sd; + no-sdio; + non-removable; + pinctrl-names =3D "default", "state_uhs"; + pinctrl-0 =3D <&mmc0_pins_default>; + pinctrl-1 =3D <&mmc0_pins_uhs>; + supports-cqe; + vmmc-supply =3D <&mt6359_vemc_1_ldo_reg>; + vqmmc-supply =3D <&mt6359_vufs_ldo_reg>; + status =3D "okay"; +}; + +&mmc1 { + bus-width =3D <4>; + cap-sd-highspeed; + cd-gpios =3D <&pio 107 GPIO_ACTIVE_LOW>; + max-frequency =3D <200000000>; + no-mmc; + no-sdio; + pinctrl-names =3D "default", "state_uhs"; + pinctrl-0 =3D <&mmc1_pins_default>; + pinctrl-1 =3D <&mmc1_pins_uhs>; + sd-uhs-sdr104; + sd-uhs-sdr50; + vmmc-supply =3D <&mt6359_vpa_buck_reg>; + vqmmc-supply =3D <&mt6359_vsim1_ldo_reg>; + status =3D "okay"; +}; + +&mt6359codec { + mediatek,dmic-mode =3D <1>; /* one-wire */ + mediatek,mic-type-0 =3D <2>; /* DMIC */ + mediatek,mic-type-2 =3D <2>; /* DMIC */ +}; + +&mt6359_vcore_buck_reg { + regulator-always-on; +}; + +&mt6359_vgpu11_buck_reg { + regulator-always-on; +}; + +&mt6359_vgpu11_sshub_buck_reg { + regulator-min-microvolt =3D <550000>; + regulator-max-microvolt =3D <550000>; + regulator-always-on; +}; + +&mt6359_vio28_ldo_reg { + /delete-property/ regulator-always-on; +}; + +&mt6359_vm18_ldo_reg { + /delete-property/ regulator-always-on; +}; + +&mt6359_vmodem_buck_reg { + regulator-min-microvolt =3D <775000>; + regulator-max-microvolt =3D <775000>; +}; + +&mt6359_vpa_buck_reg { + regulator-max-microvolt =3D <3100000>; +}; + +&mt6359_vproc2_buck_reg { + /* + * Called "ppvar_dvdd_gpu" in the schematic. Renamed to + * "ppvar_dvdd_vgpu" here to match mtk-regulator-coupler requirements. + */ + regulator-name =3D "ppvar_dvdd_vgpu"; + regulator-min-microvolt =3D <550000>; + regulator-max-microvolt =3D <800000>; + regulator-coupled-with =3D <&mt6359_vsram_others_ldo_reg>; + regulator-coupled-max-spread =3D <6250>; +}; + +&mt6359_vpu_buck_reg { + regulator-always-on; +}; + +&mt6359_vrf12_ldo_reg { + regulator-always-on; +}; + +&mt6359_vsram_md_ldo_reg { + regulator-min-microvolt =3D <800000>; + regulator-max-microvolt =3D <800000>; +}; + +&mt6359_vsram_others_ldo_reg { + regulator-name =3D "pp0850_dvdd_sram_gpu"; + regulator-min-microvolt =3D <750000>; + regulator-max-microvolt =3D <800000>; + regulator-coupled-with =3D <&mt6359_vproc2_buck_reg>; + regulator-coupled-max-spread =3D <6250>; +}; + +&mt6359_vufs_ldo_reg { + regulator-always-on; +}; + +&nor_flash { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&nor_pins>; + status =3D "okay"; + + flash@0 { + compatible =3D "jedec,spi-nor"; + reg =3D <0>; + spi-max-frequency =3D <52000000>; + }; +}; + +&pcie { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pcie_pins>; + status =3D "okay"; +}; + +&pciephy { + status =3D "okay"; +}; + +&pio { + gpio-line-names =3D + "gsc_int", + "AP_DISP_BKLTEN", + "", + "EN_PPVAR_MIPI_DISP", + "EN_PPVAR_MIPI_DISP_150MA", + "TCHSCR_RST_1V8_L", + "TCHSRC_REPORT_DISABLE", + "", + "", + "", + "", + "I2S_SPKR_DATAOUT", + "EN_PP3300_WLAN_X", + "WIFI_KILL_1V8_L", + "BT_KILL_1V8_L", + "AP_FLASH_WP_L", /* ... is crossystem ABI. Rev1 schematics call it AP_WP= _ODL. */ + "", + "EDP_HPD_1V8", + "WCAM_PWDN_L", + "WCAM_RST_L", + "UCAM_PWDM_L", + "UCAM_RST_L", + "WCAM_24M_CLK", + "UCAM_24M_CLK", + "MT6319_INT", + "DISP_RST_1V8_L", + "DSIO_DSI_TE", + "EN_PP3300_EDP_DISP_X", + "TP", + "MIPI_BL_PWM_1V8", + "EDP_BL_PWM_1V8", + "UART_AP_TX_GSC_RX", + "UART_GSC_TX_AP_RX", + "UART_SSPM_TX_DBGCON_RX", + "UART_DBGCON_TX_SSPM_RX", + "UART_ADSP_TX_DBGCON_RX", + "UART_DBGCON_TX_ADSP_RX", + "JTAG_AP_TMS", + "JTAG_AP_TCK", + "JTAG_AP_TDI", + "JTAG_AP_TDO", + "JTAG_AP_TRST", + "AP_KPCOL0", + "TP", + "BEEP_ON_OD", + "TP", + "EC_AP_HPD_OD", + "PCIE_WAKE_1V8_ODL", + "PCIE_RST_1V8_L", + "PCIE_CLKREQ_1V8_ODL", + "", + "", + "", + "", + "", + "AP_I2C_AUD_SCL_1V8", + "AP_I2C_AUD_SDA_1V8", + "AP_I2C_TPM_SCL_1V8", + "AP_I2C_TPM_SDA_1V8", + "AP_I2C_TCHSCR_SCL_1V8", + "AP_I2C_TCHSCR_SDA_1V8", + "AP_I2C_PMIC_SAR_SCL_1V8", + "AP_I2C_PMIC_SAR_SDA_1V8", + "AP_I2C_EC_HID_KB_SCL_1V8", + "AP_I2C_EC_HID_KB_SDA_1V8", + "AP_I2C_UCAM_SCL_1V8", + "AP_I2C_UCAM_SDA_1V8", + "AP_I2C_WCAM_SCL_1V8", + "AP_I2C_WCAM_SDA_1V8", + "SPI_AP_CS_EC_L", + "SPI_AP_CLK_EC", + "SPI_AP_DO_EC_DI", + "SPI_AP_DI_EC_DO", + "TP", + "TP", + "SPI_AP_CS_TCHSCR_L", + "SPI_AP_CLK_TCHSCR", + "SPI_AP_DO_TCHSCR_DI", + "SPI_AP_DI_TCHSCR_DO", + "TP", + "TP", + "TP", + "TP", + "", + "", + "", + "TP", + "", + "SAR_INT_ODL", + "", + "", + "", + "PWRAP_SPI_CS_L", + "PWRAP_SPI_CK", + "PWRAP_SPI_MOSI", + "PWRAP_SPI_MISO", + "SRCLKENA0", + "SRCLKENA1", + "SCP_VREQ_VAO", + "AP_RTC_CLK32K", + "AP_PMIC_WDTRST_L", + "AUD_CLK_MOSI", + "AUD_SYNC_MOSI", + "AUD_DAT_MOSI0", + "AUD_DAT_MOSI1", + "AUD_DAT_MISO0", + "AUD_DAT_MISO1", + "SD_CD_ODL", + "HP_INT_ODL", + "SPKR_INT_ODL", + "I2S_HP_DATAIN", + "EN_SPKR", + "I2S_SPKR_MCLK", + "I2S_SPKR_BCLK", + "I2S_HP_MCLK", + "I2S_HP_BCLK", + "I2S_HP_LRCK", + "I2S_HP_DATAOUT", + "RST_SPKR_L", + "I2S_SPKR_LRCK", + "I2S_SPKR_DATAIN", + "", + "", + "", + "", + "SPI_AP_CLK_ROM", + "SPI_AP_CS_ROM_L", + "SPI_AP_DO_ROM_DI", + "SPI_AP_DI_ROM_DO", + "TP", + "TP", + "", + "", + "", + "", + "", + "", + "", + "", + "EN_PP2800A_UCAM_X", + "EN_PP1200_UCAM_X", + "EN_PP2800A_WCAM_X", + "EN_PP1100_WCAM_X", + "TCHSCR_INT_1V8_L", + "EN_PP3300_MIPI_TCHSCR_X", + "MT7921_PMU_EN_1V8", + "EN_PP3300_EDP_TCHSCR_X", + "AP_EC_WARM_RST_REQ", + "EC_AP_HID_INT_ODL", + "EC_AP_INT_ODL", + "AP_XHCI_INIT_DONE", + "EMMC_DAT7", + "EMMC_DAT6", + "EMMC_DAT5", + "EMMC_DAT4", + "EMMC_RST_L", + "EMMC_CMD", + "EMMC_CLK", + "EMMC_DAT3", + "EMMC_DAT2", + "EMMC_DAT1", + "EMMC_DAT0", + "EMMC_DSL", + "SD_CMD", + "SD_CLK", + "SD_DAT0", + "SD_DAT1", + "SD_DAT2", + "SD_DAT3", + "", + "", + "USB3_HUB_RST_L", + "EC_AP_RSVD0_ODL", + "", + "", + "SPMI_SCL", + "SPMI_SDA"; + + adsp_uart_pins: adsp-uart-pins { + pins-bus { + pinmux =3D , + ; + }; + }; + + ap_sar_sensor_int: ap-sar-sensor-int-pins { + pins-sar-int-odl { + pinmux =3D ; + input-enable; + bias-pull-up; + }; + }; + + aud_etdm_hp_on: aud-etdm-hp-on-pins { + pins-bus { + pinmux =3D , + , + , + ; + }; + }; + + aud_etdm_hp_off: aud-etdm-hp-off-pins { + pins-bus { + pinmux =3D , + , + , + ; + bias-pull-down; + input-enable; + }; + }; + + aud_etdm_spk_on: aud-etdm-spk-on-pins { + pins-bus { + pinmux =3D , + , + , + ; + }; + }; + + aud_etdm_spk_off: aud-etdm-spk-off-pins { + pins-bus { + pinmux =3D , + , + , + ; + bias-pull-down; + input-enable; + }; + }; + + aud_mtkaif_on: aud-mtkaif-on-pins { + pins-bus { + pinmux =3D , + , + , + , + , + ; + }; + }; + + aud_mtkaif_off: aud-mtkaif-off-pins { + pins-bus { + pinmux =3D , + , + , + , + , + ; + bias-pull-down; + input-enable; + }; + }; + + audio_codec_pins: audio-codec-pins { + pins-hp-int-odl { + pinmux =3D ; + input-enable; + }; + }; + + cros_ec_int: cros-ec-int-pins { + pins-ec-ap-int-odl { + pinmux =3D ; + input-enable; + }; + }; + + disp_pwm0_pins: disp-pwm0-pins { + pins-disp-pwm0 { + pinmux =3D ; + output-high; + }; + }; + + disp_pwm1_pins: disp-pwm1-pins { + pins-disp-pwm1 { + pinmux =3D ; + output-high; + }; + }; + + dp_tx_hpd: dp-tx-hpd-pins { + pins-dp-tx-hpd { + pinmux =3D ; + }; + }; + + edp_bl_en: edp-bl-en-pins { + pins-ap-disp-bklten { + pinmux =3D ; + output-low; + }; + }; + + edp_disp_en: edp-disp-en-pins { + pins-en-pp3300-edp-disp { + pinmux =3D ; + output-low; + }; + }; + + edp_tx_hpd: edp-tx-hpd-pins { + pins-dp-tx-hpd { + pinmux =3D ; + }; + }; + + gsc_int: gsc-int-pins { + pins-gsc-ap-int-odl { + pinmux =3D ; + input-enable; + }; + }; + + i2c0_pins: i2c0-pins { + pins-bus { + pinmux =3D , + ; + }; + }; + + i2c1_pins: i2c1-pins { + pins-bus { + pinmux =3D , + ; + }; + }; + + i2c2_pins: i2c2-pins { + pins-bus { + pinmux =3D , + ; + bias-disable; + drive-strength =3D <12>; + }; + }; + + i2c3_pins: i2c3-pins { + pins-bus { + pinmux =3D , + ; + }; + }; + + i2c4_pins: i2c4-pins { + pins-bus { + pinmux =3D , + ; + }; + }; + + i2c5_pins: i2c5-pins { + pins-bus { + pinmux =3D , + ; + }; + }; + + i2c6_pins: i2c6-pins { + pins-bus { + pinmux =3D , + ; + }; + }; + + mipi_disp_avdd_en: mipi-disp-avdd-en-pins { + pins-en-ppvar-mipi-disp { + pinmux =3D ; + output-low; + }; + }; + + mipi_disp_avee_en: mipi-disp-avee-en-pins { + pins-en-ppvar-mipi-disp-150ma { + pinmux =3D ; + output-low; + }; + }; + + mipi_dsi_pins: mipi-dsi-pins { + pins-bus { + pinmux =3D , + ; + output-low; + }; + }; + + mipi_tchscr_en: mipi-tchscr-en-pins { + pins-en-pp3300-mipi-tchscr { + pinmux =3D ; + output-low; + }; + }; + + mmc0_pins_default: mmc0-default-pins { + pins-bus { + pinmux =3D , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength =3D <6>; + bias-pull-up =3D ; + }; + + pins-clk { + pinmux =3D ; + drive-strength =3D <6>; + bias-pull-down =3D ; + }; + + pins-rst { + pinmux =3D ; + drive-strength =3D <6>; + bias-pull-up =3D ; + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + pins-bus { + pinmux =3D , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength =3D <8>; + bias-pull-up =3D ; + }; + + pins-clk { + pinmux =3D ; + drive-strength =3D <8>; + bias-pull-down =3D ; + }; + + pins-ds { + pinmux =3D ; + drive-strength =3D <8>; + bias-pull-down =3D ; + }; + + pins-rst { + pinmux =3D ; + drive-strength =3D <8>; + bias-pull-up =3D ; + }; + }; + + mmc1_pins_default: mmc1-default-pins { + pins-bus { + pinmux =3D , + , + , + , + ; + input-enable; + drive-strength =3D <6>; + bias-pull-up =3D ; + }; + + pins-clk { + pinmux =3D ; + drive-strength =3D <6>; + bias-pull-down =3D ; + }; + + pins-insert { + pinmux =3D ; + bias-pull-up; + }; + }; + + mmc1_pins_uhs: mmc1-uhs-pins { + pins-bus { + pinmux =3D , + , + , + , + ; + input-enable; + drive-strength =3D <10>; + bias-pull-up =3D ; + }; + pins-clk { + pinmux =3D ; + drive-strength =3D <6>; + bias-pull-down =3D ; + }; + }; + + nor_pins: nor-default-pins { + pins-clk { + pinmux =3D , + , + ; + bias-pull-down; + }; + + pins-cs { + pinmux =3D ; + bias-pull-up; + }; + }; + + pcie_pins: pcie-default-pins { + pins-bus { + pinmux =3D , + , + ; + }; + }; + + scp_pins: scp-default-pins { + pins-scp-vreq { + pinmux =3D ; + bias-disable; + input-enable; + }; + }; + + speaker_en: speaker-en-pins { + pins-en-spkr { + pinmux =3D ; + }; + }; + + spi0_pins: spi0-pins { + pins-bus { + pinmux =3D , + , + , + ; + bias-disable; + }; + }; + + spi1_pins: spi1-pins { + pins-bus { + pinmux =3D , + , + , + ; + bias-disable; + }; + }; + + spi2_pins: spi2-pins { + pins-bus { + pinmux =3D , + , + , + ; + bias-disable; + }; + }; + + touchscreen_int: touchscreen-int-pins { + pins-tchscr-int { + pinmux =3D ; + input-enable; + }; + }; + + trackpad_pins: trackpad-pins { + pins-ec-ap-hid-int-odl { + pinmux =3D ; + input-enable; + bias-disable; + }; + }; + + uart0_pins: uart0-pins { + pins-bus { + pinmux =3D , + ; + bias-pull-up; + }; + }; + + wlan_en: wlan-en-pins { + pins-en-pp3300-wlan { + pinmux =3D ; + output-low; + }; + }; +}; + +&pmic { + interrupts-extended =3D <&pio 222 IRQ_TYPE_LEVEL_HIGH>; +}; + +&scp { + firmware-name =3D "mediatek/mt8188/scp.img"; + memory-region =3D <&scp_mem>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&scp_pins>; + status =3D "okay"; + + cros-ec-rpmsg { + compatible =3D "google,cros-ec-rpmsg"; + mediatek,rpmsg-name =3D "cros-ec-rpmsg"; + }; +}; + +&sound { + compatible =3D "mediatek,mt8188-nau8825"; + model =3D "mt8188_m98390_8825"; + pinctrl-names =3D "aud_etdm_hp_on", + "aud_etdm_hp_off", + "aud_etdm_spk_on", + "aud_etdm_spk_off", + "aud_mtkaif_on", + "aud_mtkaif_off"; + pinctrl-0 =3D <&aud_etdm_hp_on>; + pinctrl-1 =3D <&aud_etdm_hp_off>; + pinctrl-2 =3D <&aud_etdm_spk_on>; + pinctrl-3 =3D <&aud_etdm_spk_off>; + pinctrl-4 =3D <&aud_mtkaif_on>; + pinctrl-5 =3D <&aud_mtkaif_off>; + audio-routing =3D "ETDM1_OUT", "ETDM_SPK_PIN", + "ETDM2_OUT", "ETDM_HP_PIN", + "ETDM1_IN", "ETDM_SPK_PIN", + "ETDM2_IN", "ETDM_HP_PIN", + "ADDA Capture", "MTKAIF_PIN", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "MIC", "Headset Mic", + "Left Spk", "Front Left BE_OUT", + "Right Spk", "Front Right BE_OUT", + "Rear Left Spk", "Rear Left BE_OUT", + "Rear Right Spk", "Rear Right BE_OUT"; + + mediatek,adsp =3D <&adsp>; + + status =3D "okay"; + + dai-link-0 { + link-name =3D "ETDM1_IN_BE"; + dai-format =3D "dsp_b"; + mediatek,clk-provider =3D "cpu"; + }; + + dai-link-1 { + link-name =3D "ETDM1_OUT_BE"; + dai-format =3D "dsp_b"; + mediatek,clk-provider =3D "cpu"; + + codec { + sound-dai =3D <&max98390_38>, + <&max98390_39>, + <&max98390_3a>, + <&max98390_3b>; + }; + }; + + dai-link-2 { + link-name =3D "ETDM2_IN_BE"; + mediatek,clk-provider =3D "cpu"; + + codec { + sound-dai =3D <&nau8825>; + }; + }; + + dai-link-3 { + link-name =3D "ETDM2_OUT_BE"; + mediatek,clk-provider =3D "cpu"; + + codec { + sound-dai =3D <&nau8825>; + }; + }; + + dai-link-4 { + link-name =3D "DPTX_BE"; + + codec { + sound-dai =3D <&dp_tx>; + }; + }; +}; + +&spi0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi0_pins>; + status =3D "okay"; + + cros_ec: ec@0 { + compatible =3D "google,cros-ec-spi"; + reg =3D <0>; + interrupts-extended =3D <&pio 149 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&cros_ec_int>; + spi-max-frequency =3D <3000000>; + + i2c_tunnel: i2c-tunnel { + compatible =3D "google,cros-ec-i2c-tunnel"; + google,remote-bus =3D <1>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + cbas { + compatible =3D "google,cros-cbas"; + }; + }; +}; + +&spi1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi1_pins>; + status =3D "okay"; +}; + +&spi2 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi2_pins>; + status =3D "okay"; +}; + +&uart0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&uart0_pins>; + status =3D "okay"; +}; + +&u3phy0 { + status =3D "okay"; +}; + +&u3phy1 { + status =3D "okay"; +}; + +&u3phy2 { + status =3D "okay"; +}; + +/* USB detachable base */ +&xhci0 { + /* controlled by EC */ + vbus-supply =3D <&pp3300_z1>; + status =3D "okay"; +}; + +/* USB3 hub */ +&xhci1 { + vusb33-supply =3D <&pp3300_s3>; + vbus-supply =3D <&pp5000_usb_vbus>; + status =3D "okay"; +}; + +/* USB BT */ +&xhci2 { + /* no power supply since MT7921's power is controlled by PCIe */ + /* MT7921's USB BT has issues with USB2 LPM */ + usb2-lpm-disable; + status =3D "okay"; +}; + +#include +#include + +&keyboard_controller { + function-row-physmap =3D < + 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 =3D < + 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 + >; +}; --=20 2.47.0.277.g8800431eea-goog