From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9267BC55179 for ; Thu, 22 Oct 2020 03:29:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3CB512417D for ; Thu, 22 Oct 2020 03:29:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="QmKzFiaH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2895407AbgJVD3f (ORCPT ); Wed, 21 Oct 2020 23:29:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2443979AbgJVD3f (ORCPT ); Wed, 21 Oct 2020 23:29:35 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 825F2C0613CF for ; Wed, 21 Oct 2020 20:29:35 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id k6so82481ior.2 for ; Wed, 21 Oct 2020 20:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IMFKi57vTn4WORdntFjLONbVhz/S8EeuoMU/ru37Fjk=; b=QmKzFiaHxS37kWhYqOevmJSha395OemOg2KLsjigL/6YgPyC0cWSkaDr+ffKa61vPU GXX3dfuhinc3Qluqg/LcYmWn/uxtlNOgkwHIV8z5wVdWNaIK/qBYmvkfpKFr6uIPXDuS AfhJpRPcSFHBisu+853OTgVeFr30qYIhwo146On5XcIrt6UvkDzAOUc8b9oPP4LHY+aP mcF96p2cmiAaoW59NhLHswwH2t/U88kQXPZ09XztB41AQUXax5V0J3N4+8uTmW9J5nLp gvtykGqSZeSnzrM85+VdZrTtv1zRS7Q7rVERJrrNJBtv0PRbYLmliKduECch9kebV8vo 8yGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IMFKi57vTn4WORdntFjLONbVhz/S8EeuoMU/ru37Fjk=; b=CXCa3L1bC4dtEFo1ijcvCUptbyfFJPzFrgYMTO1gP1YTbwM+ukYZwoPD3yTs1rraJD smbvaZDfsZLCDTK4Q4cNEwmPkWZxs6r+KRI+ko/l3V/pH5j0LbzKkpOp6elbZ0UGV8lh P1lON8PpBSnDLsXRcX7P0GQvyHjfU3yrnWa5IDO4FYYocUGKL97ciXOq9QY0lrKxOgUH EibD6kWSLNsSNbTNkq2D5G9BqpNqhEyt2H1fvvTayPpuIT4z38bw+2YByv7W9Wz03mm6 H9FfNOywTR/GI5MlDghmVBFYau7FNRfsobTfqqO8STqHSS/wf6J3iqG8wlcZGLnmutOP aiJA== X-Gm-Message-State: AOAM533UcGg52OzT+XuqMCXGANtzbO1nUtrNiAYmA4505Uya/F7agTCU a4hndkfMvVr1xcsIX9hM7pG7tKS/926YMsJrF9R+6g== X-Google-Smtp-Source: ABdhPJxMauPqYM6FB9F47HpfghenbvywgGSYzCRS3yrWm7U0RrqNphhFJ8ty4CuavT4aU+0YJFuGRFcGD/Y9+5aVe7A= X-Received: by 2002:a5d:9f0e:: with SMTP id q14mr438269iot.185.1603337374464; Wed, 21 Oct 2020 20:29:34 -0700 (PDT) MIME-Version: 1.0 References: <20200914080619.4178587-1-cychiang@chromium.org> <20200914080619.4178587-3-cychiang@chromium.org> <7bdc0d63-27b1-f99e-c5f8-65f880733d16@linaro.org> <20201015161251.GF4390@sirena.org.uk> <20201020143711.GC9448@sirena.org.uk> <63f1a29c-0758-97b8-ce80-fe43d91630fa@linaro.org> <20201021123913.GD4497@sirena.org.uk> In-Reply-To: <20201021123913.GD4497@sirena.org.uk> From: Tzung-Bi Shih Date: Thu, 22 Oct 2020 11:29:23 +0800 Message-ID: Subject: Re: [PATCH v11 2/3] ASoC: qcom: dt-bindings: Add sc7180 machine bindings To: Mark Brown Cc: Srinivas Kandagatla , Cheng-yi Chiang , linux-kernel , Taniya Das , Rohit kumar , Banajit Goswami , Patrick Lai , Andy Gross , Bjorn Andersson , Liam Girdwood , Rob Herring , Jaroslav Kysela , Takashi Iwai , Stephan Gerhold , Matthias Brugger , Heiko Stuebner , Srinivasa Rao , Doug Anderson , Dylan Reid , Tzung-Bi Shih , Linux ARM , linux-arm-msm , Kuninori Morimoto , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , "moderated list:ARM/Mediatek SoC support" , "open list:ARM/Rockchip SoC..." , Ajye Huang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi, sorry for jumping into your discussion but I am trying to summarize them to make sure we are on the same page. Pardon me to manually copy-and-paste partial sentences to quote. ACK: - Don't expose DAI connections in compatible strings. - Use "model" DT property to make the card more UCM2-friendly. - Expose new DT properties to distinguish different DMIC models. NACK: - All the board variations using exactly the same compatible string. => This is less realistic. Although the CODECS information can be retrieved from DT, it is inevitable to have some custom code for each CODEC. Per Mark's words: > a different CODEC is something that often justifies a separate compatible I think we should use different compatible strings for new CODECS combinations. And we should try to reuse the machine driver if they share the most code. In the worst case, introduce a new machine driver for the new CODECS combinations. - Srinivas's suggestion to set driver_name. e.g. card->driver_name = "SM8250"; => This sounds like a new DT property should be parsed in sound/soc/qcom/common.c. For example: "qcom,family"? But as we do less care about UCM2 for now, I would prefer to just leave it as is. I would expect the following variants in DTS (just for example): sound { compatible = "qcom,sc7180-trogdor"; model = "sc7180-rt5682-max98357a-1mic"; } sound { compatible = "qcom,sc7180-trogdor"; model = "sc7180-rt5682-max98357a-2mic"; dmic-gpio = ... } sound { compatible = "qcom,sc7180-pompom"; model = "sc7180-adau7002-max98357a"; } Please correct me if there is any misunderstanding.