Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1001431lqm; Thu, 2 May 2024 02:09:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGpiGSod2jYVmE+gqM71p8Tr0R4VbsaVxa23xEgx6bfWps4d7vI+6r/yE8fHTO1mbomeNRA30lu0opEv2/opCRnKkqunZvr7zcEfqkpA== X-Google-Smtp-Source: AGHT+IEHx0+AigSA7dWew2RkEUI0zG7slznHbbWue07+LXyGquNdFR6vaKZn4S+Q3NUsgiLXQQSA X-Received: by 2002:a05:6358:8a1:b0:186:32b2:c0cb with SMTP id m33-20020a05635808a100b0018632b2c0cbmr1946222rwj.25.1714640998583; Thu, 02 May 2024 02:09:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714640998; cv=pass; d=google.com; s=arc-20160816; b=AM7er6BVGhmGdgyWpK5RViNkvFNCt4dcyQcgITx+JrEdrvDNixkKlMEVeNdUmshBYQ t/3MXkpfJOrO1nT7+SruZjTzBUy49mLLBxy8VnJr9r0b3GyszGnLGMCTwcDmR9FOQ9IJ 40efoBi/KHGvgVjkGm8T6udRgjSphwzM+YUbw10l34K7fbgiEG0K3dX85+ChyBrVEYph cGjs1pS8Et/XmlSwoozyizblCQsfgLS8vOriHQSkCDCeJoNsm5NIQHCFoS8vZd/SxuqO 9S5s1l0jyW3XPqaXhvnemdbk7kLrywtqNAXRjmIuporNG3AEqe4sAdHbnyJiK2RMX3rJ nfXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=mSBBp0xVAK2Nv+uiyQY9w2gt3jv+iQ6l4RIpa967w98=; fh=HU+WD6XFbJmh/7McJfsPF455madSFy5mHGSj067wZFc=; b=iZy4pDL2hqrw/N+BZ0E3fFCxeB/wYAxCnETXjF0bW0UytpIcsn/jLIH1EAnReqzKr/ Dh5LTkXIPp611bHrCeXn+zvdnjz0o4dWTg0EGqH8ID7sEpYGQoae/0Y3YLp/GHn6vlf3 r1HkuYeoOvHK5t+6CGR/HqhZQ3GzpXpqYSaEJkuUdRwrceuA4WnFSz8fRHlx88QNtkrE MJRCvizJLXnfrDyXK2HyoYJK1mhsFgqSgOVojC7cv3p18bEe6/YnEJXV2QIeJZiztZDJ 35d6GGNcuefW1sNNfL4kk0LmxVaRO+TVj0XZqKMl4IdkZCwkgSDKQfqlIxG6YohCwi3K pzKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=elXXJ7Qy; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-166170-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n63-20020a632742000000b005feac06ad81si163064pgn.727.2024.05.02.02.09.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 02:09:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166170-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=elXXJ7Qy; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-166170-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 06283B23762 for ; Thu, 2 May 2024 09:04:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02E7C54789; Thu, 2 May 2024 09:03:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="elXXJ7Qy" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 D5BA054278 for ; Thu, 2 May 2024 09:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714640628; cv=none; b=XEWQsYBY5F/g4rgkt5s1kHZL7FgunD0VMYch8+e1F8rojvKtmjcVFqDq7uV2wHCe+KUP9ENej5EJtD9r0mFYWyUSZnKqGQufD+vQvxIHkH0D7W1e7/wsBR8bsZ5+LC5tgSBULAVk4K+Bg3oS4xskOoL9LqO94VKUlG2fMN3l/40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714640628; c=relaxed/simple; bh=4PGjFnYS1Tn3QA5kerObdvNBnqGr5E86ZSozMvjg5qo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pp5vVEcNUqloK0vVuK6VY1M5ObpqwQPp3xwPVqxez2DIn4C6k7YLbI/1+VfSLyJlu2Z4Ro1+Iw9Gcv1lhHKwEQVZvMcRiuBNkPtXLmq4GCzwfFBCLbqyIPVlnaNilM1Cot/ao5ibmAMmZVUZ00J3lmrv5rB1gGLwYUMIJmCvitg= 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=elXXJ7Qy; arc=none smtp.client-ip=209.85.214.177 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 Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1e3f17c6491so63372045ad.2 for ; Thu, 02 May 2024 02:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714640626; x=1715245426; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=mSBBp0xVAK2Nv+uiyQY9w2gt3jv+iQ6l4RIpa967w98=; b=elXXJ7Qyu6YM/wKVfPSJZcF3fSUj3tureIyd4bh4TX+s9rX/xL5LtN5h2AX66bgwJ0 413QCuTowaQ4+yfY2MQiSIXM9KhcFJUYm8zSSVsfs9BXLn5BqgerSqSrXZenVOQ88nwU 7zCewU3W6kIvqx2BBU0Amhw6x1bVs81w443qY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714640626; x=1715245426; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mSBBp0xVAK2Nv+uiyQY9w2gt3jv+iQ6l4RIpa967w98=; b=O6h2n0F2rRaFkLMV7bXUIGMid+SmSeAcMDkli0XO0HZoxH2+YuoOoLjWeeHn/vhN4e FCL3HeEpUJED9Q7USK/3zIV26N/8dna5y3StqwO5eCNRGmKfCRgCBDuT3vy+evjRPdPV F/+llSCouqYcPTY8OCpQipwaqmNVD7HQ9w5WKLHx/u62KtlIF7VTvildgtSn5jxrA+9B PZ/5XkreJPj5+5D5mQqtvTZQWeeJcIGL26RbPvUKi3Tg108WYIF73f8lcE2iP+FCA3pR yecqHLQeiFJYCWK86le9Q3NybO7slm/A37umUh2oq8D784I6c/RsgfTEEvccZDUspx3L sbnA== X-Forwarded-Encrypted: i=1; AJvYcCWDPmS/K2j+epGDfzynO1aiEF8gvciWUjP8JZ167Juax4irsFTrrs3KsbyLg3OzaZf9E7Mn/KJf9uwUqXJhsilgHuJmolw2O2cFhecU X-Gm-Message-State: AOJu0Yzqe/4lKneNDd424hRMJF7DtlpfXnmyQ92amyaTG9LKVXO/KPwo b9TKNM3H2bQLIDN5OXvyyinuYFiPDOxjgPZMTKQ0CnaOXe3dqsCY2uq54a8o/A== X-Received: by 2002:a17:902:db01:b0:1e2:1df:449b with SMTP id m1-20020a170902db0100b001e201df449bmr1720490plx.69.1714640626252; Thu, 02 May 2024 02:03:46 -0700 (PDT) Received: from yuanhsinte1.c.googlers.com (150.221.124.34.bc.googleusercontent.com. [34.124.221.150]) by smtp.gmail.com with ESMTPSA id c17-20020a170902d49100b001ebd73f61fcsm764983plg.121.2024.05.02.02.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 02:03:45 -0700 (PDT) From: Hsin-Te Yuan Date: Thu, 02 May 2024 09:03:32 +0000 Subject: [PATCH 2/2] drm/bridge: anx7625: Change TDM setting accroding to dt property Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240502-anx-tdm-v1-2-894a9f634f44@chromium.org> References: <20240502-anx-tdm-v1-0-894a9f634f44@chromium.org> In-Reply-To: <20240502-anx-tdm-v1-0-894a9f634f44@chromium.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Xin Ji Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hsin-Te Yuan X-Mailer: b4 0.12.4 For some SoCs, the TDM setting is not to shift the first audio data bit, which is not the default setting of anx7625. In such cases, the TDM setting should be changed according to the device tree property. Signed-off-by: Hsin-Te Yuan --- drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 29d91493b101a..538edddf313c9 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1709,6 +1709,9 @@ static int anx7625_parse_dt(struct device *dev, if (of_property_read_bool(np, "analogix,audio-enable")) pdata->audio_en = 1; + if(!of_property_read_bool(np, "no-shift-audio-data")) + pdata->shift_audio_data = 1; + return 0; } @@ -1866,6 +1869,11 @@ static int anx7625_audio_hw_params(struct device *dev, void *data, ~TDM_SLAVE_MODE, I2S_SLAVE_MODE); + if (!ctx->pdata.shift_audio_data) + ret |= anx7625_write_or(ctx, ctx->i2c.tx_p2_client, + AUDIO_CONTROL_REGISTER, + TDM_TIMING_MODE); + /* Word length */ switch (params->sample_width) { case 16: diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.h b/drivers/gpu/drm/bridge/analogix/anx7625.h index 39ed35d338363..41b395725913a 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.h +++ b/drivers/gpu/drm/bridge/analogix/anx7625.h @@ -441,6 +441,7 @@ struct anx7625_platform_data { u8 lane1_reg_data[DP_TX_SWING_REG_CNT]; u32 low_power_mode; struct device_node *mipi_host_node; + int shift_audio_data; }; struct anx7625_i2c_client { -- 2.45.0.rc1.225.g2a3ae87e7f-goog