From patchwork Wed Aug 16 18:21:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 715479 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 7B0A2C0729B for ; Wed, 16 Aug 2023 18:23:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232662AbjHPSXU (ORCPT ); Wed, 16 Aug 2023 14:23:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238858AbjHPSW7 (ORCPT ); Wed, 16 Aug 2023 14:22:59 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 946C8E40 for ; Wed, 16 Aug 2023 11:22:58 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1bbc87ded50so43594875ad.1 for ; Wed, 16 Aug 2023 11:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1692210178; x=1692814978; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AavxYaQEPY9dU8GTHMOuzfvF8C2yZfbqDwD9ecZqf/Y=; b=Rv7jJw/Th5/GaDIfWDCHp5w2jn1aTtV1ApTzdN68lHRwKO67VVqilDVbh2kKFJKmEv UUuqhjrQ5sdAjyuisef1dIUbX23rWq8ZAZscoM2zGhJr/qPEpVJKTnxPC0TfcqDIl6wJ m6Qilif7tbIn/PT7AfkHSpf0nzMKgwtUWibtE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692210178; x=1692814978; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AavxYaQEPY9dU8GTHMOuzfvF8C2yZfbqDwD9ecZqf/Y=; b=JO5EAs3BgnVMS7+fmsZXB3H3RRaUWxKruwPMIBiOybUJkF2edqZIrLRnUiiWb4rKST zIvb5ZfM7KOgPAIp5jrKqg4NCIEZiMaZXQdUASpcbv3qmZVT1CRxHr5kZGqPVp1Q9YOr Oq26+ptmDC6UnuxQyJPJL+6gCbjvvPortVQHR/cTbOd1B9kQIPiMZQfsn3bJ6Geid6LE oXUAmSNdOIBKNNs5qJVoIX4pgj9lXZx2k72l5cZlZF6vo/Cgk6KXKMMHJqGJH/75Qapc s9XfcUsb0OTEuJIzRMDnO6S6uDrEKhiDrXTrJXhYIzlWxksdqt8oYZVPJRseyPAe0bDW nMSQ== X-Gm-Message-State: AOJu0Yx6YaxxOx0slT+/fYPwbgkvD1K2y5b4VRKNOwSD8PSDtsgJ1M4C prEvQRfNcQIMc7PD7W6/yd/PTg== X-Google-Smtp-Source: AGHT+IGvTPmZRIujQIljk/5aGfiMHaNQcMM7hE4+cTpS9LxESEUNLHPCrmRJKKfzItxnoeLLP7q30Q== X-Received: by 2002:a17:902:ec90:b0:1b0:3df7:5992 with SMTP id x16-20020a170902ec9000b001b03df75992mr2520493plg.32.1692210177924; Wed, 16 Aug 2023 11:22:57 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:d195:f984:f71b:ed07]) by smtp.gmail.com with ESMTPSA id x18-20020a1709027c1200b001b9ff5aa2e7sm13440155pll.239.2023.08.16.11.22.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 11:22:57 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson Cc: Sheng-Liang Pan , Douglas Anderson , Andy Gross , Conor Dooley , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , cros-qcom-dts-watchers@chromium.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: qcom: sc7180: Move trogdor rt5682s bits to a fragment Date: Wed, 16 Aug 2023 11:21:53 -0700 Message-ID: <20230816112143.1.I7227efd47e0dc42b6ff243bd22aa1a3e01923220@changeid> X-Mailer: git-send-email 2.41.0.694.ge786442a9b-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Several trogdor boards have moved from the older rt5862i to the newer rt5862s, at least on newer revisions of boards. Let's get rid of the dts duplication across boards and promote this to a fragment. Note: The old boards used to override the "compatible" in the "sound" node with the exact same thing that was in "sc7180-trogdor.dtsi" ("google,sc7180-trogdor"). I got rid of that. This is validated to produce the same result when taking the dtbs generated by the kernel build and then doing: for dtb in *trogdor*.dtb; do dtc -I dtb -O dts $dtb -o out/$dtb.dts; done Signed-off-by: Douglas Anderson Acked-by: Konrad Dybcio --- .../boot/dts/qcom/sc7180-trogdor-kingoftown.dts | 13 +------------ .../dts/qcom/sc7180-trogdor-pazquel360.dtsi | 13 +------------ .../dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi | 17 +++++++++++++++++ ...180-trogdor-wormdingler-rev1-boe-rt5682s.dts | 13 +------------ ...180-trogdor-wormdingler-rev1-inx-rt5682s.dts | 13 +------------ 5 files changed, 21 insertions(+), 48 deletions(-) create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts index 36326ef972dc..d6db7d83adcf 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dts @@ -11,19 +11,13 @@ #include "sc7180-trogdor-parade-ps8640.dtsi" #include #include "sc7180-trogdor-lte-sku.dtsi" +#include "sc7180-trogdor-rt5682s-sku.dtsi" / { model = "Google Kingoftown"; compatible = "google,kingoftown", "qcom,sc7180"; }; -&alc5682 { - compatible = "realtek,rt5682s"; - /delete-property/ VBAT-supply; - realtek,dmic1-clk-pin = <2>; - realtek,dmic-clk-rate-hz = <2048000>; -}; - &ap_tp_i2c { status = "okay"; }; @@ -84,11 +78,6 @@ &pp3300_dx_edp { gpio = <&tlmm 67 GPIO_ACTIVE_HIGH>; }; -&sound { - compatible = "google,sc7180-trogdor"; - model = "sc7180-rt5682s-max98357a-1mic"; -}; - &wifi { qcom,ath10k-calibration-variant = "GO_KINGOFTOWN"; }; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi index 273e2249f018..89034b6702f4 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi @@ -7,13 +7,7 @@ /* This file must be included after sc7180-trogdor.dtsi */ #include "sc7180-trogdor-pazquel.dtsi" - -&alc5682 { - compatible = "realtek,rt5682s"; - realtek,dmic1-clk-pin = <2>; - realtek,dmic-clk-rate-hz = <2048000>; - /delete-property/ VBAT-supply; -}; +#include "sc7180-trogdor-rt5682s-sku.dtsi" ap_ts_pen_1v8: &i2c4 { clock-frequency = <400000>; @@ -64,11 +58,6 @@ CROS_STD_MAIN_KEYMAP >; }; -&sound { - compatible = "google,sc7180-trogdor"; - model = "sc7180-rt5682s-max98357a-1mic"; -}; - &wifi { qcom,ath10k-calibration-variant = "GO_PAZQUEL360"; }; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi new file mode 100644 index 000000000000..66b8773309d4 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-rt5682s-sku.dtsi @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google Trogdor dts fragment for SKUs with + * + * Copyright 2023 Google LLC. + */ + +&alc5682 { + compatible = "realtek,rt5682s"; + /delete-property/ VBAT-supply; + realtek,dmic1-clk-pin = <2>; + realtek,dmic-clk-rate-hz = <2048000>; +}; + +&sound { + model = "sc7180-rt5682s-max98357a-1mic"; +}; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts index 6225ab8329c3..842f07f16ed1 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts @@ -11,20 +11,9 @@ /dts-v1/; #include "sc7180-trogdor-wormdingler-rev1-boe.dts" +#include "sc7180-trogdor-rt5682s-sku.dtsi" / { model = "Google Wormdingler rev1+ (BOE, rt5682s)"; compatible = "google,wormdingler-sku1025", "qcom,sc7180"; }; - -&alc5682 { - compatible = "realtek,rt5682s"; - /delete-property/ VBAT-supply; - realtek,dmic1-clk-pin = <2>; - realtek,dmic-clk-rate-hz = <2048000>; -}; - -&sound { - compatible = "google,sc7180-trogdor"; - model = "sc7180-rt5682s-max98357a-1mic"; -}; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts index b40b068dad6a..084870323606 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts @@ -11,20 +11,9 @@ /dts-v1/; #include "sc7180-trogdor-wormdingler-rev1-inx.dts" +#include "sc7180-trogdor-rt5682s-sku.dtsi" / { model = "Google Wormdingler rev1+ (INX, rt5682s)"; compatible = "google,wormdingler-sku1", "qcom,sc7180"; }; - -&alc5682 { - compatible = "realtek,rt5682s"; - /delete-property/ VBAT-supply; - realtek,dmic1-clk-pin = <2>; - realtek,dmic-clk-rate-hz = <2048000>; -}; - -&sound { - compatible = "google,sc7180-trogdor"; - model = "sc7180-rt5682s-max98357a-1mic"; -};