From nobody Fri Sep 20 10:36:58 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E48EC4332F for ; Thu, 9 Nov 2023 10:07:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234109AbjKIKHo (ORCPT ); Thu, 9 Nov 2023 05:07:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233557AbjKIKHW (ORCPT ); Thu, 9 Nov 2023 05:07:22 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F744358C for ; Thu, 9 Nov 2023 02:07:13 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6c3363a2b93so711728b3a.3 for ; Thu, 09 Nov 2023 02:07:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1699524433; x=1700129233; 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=onLNc+Oko6/d4dZDi8m4Ahc5zglhx4oC8hmNsm3uUAA=; b=CdwuVzTcLaNuBWm+5+Eyq35jTiVIQezZYsIJ/TuYU3pt1Cm54umZ2eQZ/7u92dCADF mVmV/nvqCJrh9HIh3sURGPaARnApWRc39+IT95mTp/ryN3aV4BjyK0dTyGXe8OJcmshg BrYsnYxfDR5Y0Onaai+8FCNo5TTuyV1p7O9ZQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699524433; x=1700129233; 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=onLNc+Oko6/d4dZDi8m4Ahc5zglhx4oC8hmNsm3uUAA=; b=ZASseHrWJtujXdtzRqJLIi/BiddLHjgKQDqJkVWGahnR5OfJu0W0/pc56z8Hw5fjNQ 3r8j0BddmFx9HwJsqeKy+uaWtvHm+Rccf0t6EF5o6hUyznn3pv8RXEq57FfplavmtzOl QNqzCn/CyxVj6a5ml+C3r5bnc3L71en+pyx17DyYnCSnBYI5A9T6+le5SCNKMOoyzC5T fi8rT7CoLJ/vWhmynoPPtXVqTl6Lt4C8gTIUPMzjnlQxV+TIlUCtUY2vjsZeY11iO55b YeccZVJvpCEahAZVqFJD5FKH2e7zVIQf2qga3zmKUGW/X4E++sWSqTw9Y2JtaAY6yUC2 6L7Q== X-Gm-Message-State: AOJu0YwQgj3nKPsWjW+LplRM+gL72b/+0cIVeGtyLIbMJED5hfVpDfXg T5qS9hsN/Y7PJRhdUO4trEJZJw== X-Google-Smtp-Source: AGHT+IE47jHpK3aDbKhKoDgiHCyXY2l2uWAuEaUiNlv/nfVr6trsVMV2KYbXDfC5qwkSNTHKG8ky5g== X-Received: by 2002:a05:6a21:19a:b0:181:10ee:20d5 with SMTP id le26-20020a056a21019a00b0018110ee20d5mr6079204pzb.12.1699524433438; Thu, 09 Nov 2023 02:07:13 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:6f57:d4c:468c:5daf]) by smtp.gmail.com with ESMTPSA id c13-20020a170902d48d00b001c60ba709b7sm3127511plg.125.2023.11.09.02.07.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 02:07:12 -0800 (PST) From: Chen-Yu Tsai To: Rob Herring , Frank Rowand , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno Cc: Hsin-Yi Wang , Dmitry Torokhov , andriy.shevchenko@linux.intel.com, Jiri Kosina , linus.walleij@linaro.org, broonie@kernel.org, gregkh@linuxfoundation.org, hdegoede@redhat.com, james.clark@arm.com, james@equiv.tech, keescook@chromium.org, petr.tesarik.ext@huawei.com, rafael@kernel.org, tglx@linutronix.de, Jeff LaBundy , linux-input@vger.kernel.org, Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Douglas Anderson , Johan Hovold Subject: [RFC PATCH v2 7/7] arm64: dts: mediatek: mt8183-kukui: Merge Krane device trees Date: Thu, 9 Nov 2023 18:06:04 +0800 Message-ID: <20231109100606.1245545-8-wenst@chromium.org> X-Mailer: git-send-email 2.42.0.869.gea05f2083d-goog In-Reply-To: <20231109100606.1245545-1-wenst@chromium.org> References: <20231109100606.1245545-1-wenst@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" In cases where the same Chromebook model is manufactured with different components (MIPI DSI panels, MIPI CSI camera sensors, or trackpad / touchscreens with conflicting addresses), a different SKU ID is allocated to each specific combination. This SKU ID is exported by the bootloader into the device tree, and can be used to "discover" which combination is present on the current machine. Merge the separate Krane dtsi/dts files into one shared for all SKUs. A new device node is added for the alternative panel. Both it and the original panel are marked as "fail-needs-probe-panel" to let the hardware prober handle it. Also move the cros_ec node so that all node references are ordered alphabetically. Signed-off-by: Chen-Yu Tsai --- arch/arm64/boot/dts/mediatek/Makefile | 3 +- .../dts/mediatek/mt8183-kukui-krane-sku0.dts | 24 ---------- .../mediatek/mt8183-kukui-krane-sku176.dts | 24 ---------- ...ukui-krane.dtsi =3D> mt8183-kukui-krane.dts} | 47 +++++++++++++++++-- 4 files changed, 44 insertions(+), 54 deletions(-) delete mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dts delete mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.= dts rename arch/arm64/boot/dts/mediatek/{mt8183-kukui-krane.dtsi =3D> mt8183-k= ukui-krane.dts} (86%) diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/me= diatek/Makefile index 7e365e9516ab..d4d97b315b2f 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -40,8 +40,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8183-kukui-kodama-sku1= 6.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8183-kukui-kodama-sku272.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8183-kukui-kodama-sku288.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8183-kukui-kodama-sku32.dtb -dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8183-kukui-krane-sku0.dtb -dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8183-kukui-krane-sku176.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8183-kukui-krane.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8183-pumpkin.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8186-corsola-magneton-sku393216.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8186-corsola-magneton-sku393217.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dts b/arc= h/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dts deleted file mode 100644 index 4ac75806fa94..000000000000 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0 OR MIT) -/* - * Copyright 2019 Google LLC - * - * Device-tree for Krane sku0. - * - * SKU is a 8-bit value (0x00 =3D=3D 0): - * - Bits 7..4: Panel ID: 0x0 (AUO) - * - Bits 3..0: SKU ID: 0x0 (default) - */ - -/dts-v1/; -#include "mt8183-kukui-krane.dtsi" - -/ { - model =3D "MediaTek krane sku0 board"; - chassis-type =3D "tablet"; - compatible =3D "google,krane-sku0", "google,krane", "mediatek,mt8183"; -}; - -&panel { - status =3D "okay"; - compatible =3D "auo,kd101n80-45na"; -}; diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dts b/a= rch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dts deleted file mode 100644 index 095279e55d50..000000000000 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0 OR MIT) -/* - * Copyright 2019 Google LLC - * - * Device-tree for Krane sku176. - * - * SKU is a 8-bit value (0xb0 =3D=3D 176): - * - Bits 7..4: Panel ID: 0xb (BOE) - * - Bits 3..0: SKU ID: 0x0 (default) - */ - -/dts-v1/; -#include "mt8183-kukui-krane.dtsi" - -/ { - model =3D "MediaTek krane sku176 board"; - chassis-type =3D "tablet"; - compatible =3D "google,krane-sku176", "google,krane", "mediatek,mt8183"; -}; - -&panel { - status =3D "okay"; - compatible =3D "boe,tv101wum-nl6"; -}; diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi b/arch/ar= m64/boot/dts/mediatek/mt8183-kukui-krane.dts similarity index 86% rename from arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi rename to arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dts index d5f41c6c9881..75a734c0fbcc 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dts @@ -1,12 +1,24 @@ // SPDX-License-Identifier: (GPL-2.0 OR MIT) /* * Copyright 2019 Google LLC + * + * Device tree for Krane Chromebook family. + * + * SKU ID is a 8-bit value (0x00 =3D=3D 0): + * - Bits 7..4: Panel ID: 0x0 (AUO) + * 0xb (BOE) + * - Bits 3..0: SKU ID: 0x0 (default) */ =20 +/dts-v1/; #include "mt8183-kukui.dtsi" #include "mt8183-kukui-audio-max98357a.dtsi" =20 / { + model =3D "Google Krane Chromebook"; + chassis-type =3D "tablet"; + compatible =3D "google,krane", "mediatek,mt8183"; + ppvarn_lcd: ppvarn-lcd { compatible =3D "regulator-fixed"; regulator-name =3D "ppvarn_lcd"; @@ -45,6 +57,34 @@ &bluetooth { firmware-name =3D "nvm_00440302_i2s_eu.bin"; }; =20 +&cros_ec { + keyboard-controller { + compatible =3D "google,cros-ec-keyb-switches"; + }; +}; + +&dsi0 { + panel2@0 { + compatible =3D "boe,tv101wum-nl6"; + reg =3D <0>; + enable-gpios =3D <&pio 45 0>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&panel_pins_default>; + avdd-supply =3D <&ppvarn_lcd>; + avee-supply =3D <&ppvarp_lcd>; + pp1800-supply =3D <&pp1800_lcd>; + backlight =3D <&backlight_lcd0>; + rotation =3D <270>; + status =3D "fail-needs-probe-panel"; + + port { + endpoint { + remote-endpoint =3D <&dsi_out>; + }; + }; + }; +}; + &i2c0 { status =3D "okay"; =20 @@ -343,10 +383,9 @@ rst_pin { }; }; =20 -&cros_ec { - keyboard-controller { - compatible =3D "google,cros-ec-keyb-switches"; - }; +&panel { + compatible =3D "auo,kd101n80-45na"; + status =3D "fail-needs-probe-panel"; }; =20 &qca_wifi { --=20 2.42.0.869.gea05f2083d-goog