Message ID | 20240227164659.705271-2-heiko@sntech.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-83646-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2821927dyb; Tue, 27 Feb 2024 08:48:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWe3Dt3LnXj4sWwsiqGyt38k7CYH8ogBGpxbmy9KSyN9HRtCeiWSJhvJO1Ob7tWPkiqw4oraKUXLgimXfz94jT95AW5zg== X-Google-Smtp-Source: AGHT+IFz25b642PEFM6LYwuIvWCV36/mVnG/spENdhovi5G3U3e+klOMi4MEQbqkVQqEoOpgoF9n X-Received: by 2002:a05:620a:5dd0:b0:787:caf2:e1c1 with SMTP id xy16-20020a05620a5dd000b00787caf2e1c1mr2775215qkn.41.1709052527683; Tue, 27 Feb 2024 08:48:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709052527; cv=pass; d=google.com; s=arc-20160816; b=aR/lI5IeJSSJzjmo6laXnEwSQtiRwEwc8zeDOglhoVQHUyAePQI5PBjQEWD8JDRrRC UyH1jIBzDfaha8xr00VujMGcmDzP9lqGTySGVWskaWBoK8NCplT0MMW2vmQ8Un6xdIsa uGJ1dFoHS/Oya7WPNzJ4rv9j7w3jBR0lfpDjkl3SvLwYmoQwtVkZxf6tU9K8QyjO98fO rA0EzynZeJ8CfbmmV0b57BtxENPo/Zgs3N+IS4f/WQDIavgN6HqlQShRXv0cBEnXK15g xhf57L52ze6gkpA59q3T7pDSIyrcvjBtfsfcjqotIuK3BHsNFJiHYbscTTutJigQjF02 vMDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=uL8vNbu8bfHReJWF0ahc2+HC7Qi9AkpeJ+WP9au4yQo=; fh=DwAR2g9WSOqTgxQikw01HLWc35Lr/J2FNV0ewpEIRv8=; b=BNb1PhDKbXFX8VCIEBfBK7nvzCLwIz8U+j0X4g5Ye9AphMVO3VfKD9c6pfScDe4/91 v0wbLwtv17YWpKy6RBim4SL4efzpaLKZoJNfuolePcZEd+wgnetgskkWZD2Sg+y5EhTK tK7QzGxakHdJZE1b8uvcKDkhVRmIPEvDydoNVi8Lb/+U6Abh5k7kmjSSemGqo2VfHo0R hTvx2Aa9vk+mlRp8ptb1WkteGQZV54Fn1l9TNgp1J2uZGYAIJtDPuf/qcW8qX1OsS0po kTiRohNy1VCLhXik/qOXNY4ueQWb/HASH16NCJGPwyWcSVcO/teEbxB+nGN5vCVUkPWJ 88DA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sntech.de dmarc=pass fromdomain=sntech.de); spf=pass (google.com: domain of linux-kernel+bounces-83646-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83646-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s8-20020a05620a030800b00787c7145e9esi7148695qkm.141.2024.02.27.08.48.47 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 08:48:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83646-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sntech.de dmarc=pass fromdomain=sntech.de); spf=pass (google.com: domain of linux-kernel+bounces-83646-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83646-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 767BC1C23050 for <ouuuleilei@gmail.com>; Tue, 27 Feb 2024 16:48:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81EB71482FA; Tue, 27 Feb 2024 16:47:27 +0000 (UTC) Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27CEA1EB40; Tue, 27 Feb 2024 16:47:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709052445; cv=none; b=CAnoD0gjI+ONa82pgey94FVMlmmh0lME1EPOw5FZ/lrLII8jfKx7scMisgpe6w76LobK/bnLxYeo51jsfKTVr4FPA8ztR2nmhZUrWTnvUr6t+DROlEgNGcxQU1KTIVE82i2ksyiITo71hh9X/799/Mkr7kTU+WV07BeGUH4Kuik= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709052445; c=relaxed/simple; bh=lB9WvV3bGuw1pVIKL43i9Syk3YH1W07y1NHUAoHcvbk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VBtVyUs9oS5KjEKXtvc0KDJ5ggHPhlWMxJN0YnvATxW7NsCu76lzbvATfelIIk8ySodK7FeIAnwfXapZ7sZZ7NnLv3Qwkuiox24O2GF60fOC3+OZCTJk4tHfFxLNncU6tW/Gx/8cdA5Fa5fzsSCRYq501qwFUkoxQZG3kODixjU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Received: from i53875b6c.versanet.de ([83.135.91.108] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <heiko@sntech.de>) id 1rf0bk-0006qV-IF; Tue, 27 Feb 2024 17:47:08 +0100 From: Heiko Stuebner <heiko@sntech.de> To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, quentin.schulz@theobroma-systems.com, heiko@sntech.de, Heiko Stuebner <heiko.stuebner@cherry.de>, Sugar Zhang <sugar.zhang@rock-chips.com>, Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Subject: [PATCH 1/4] arm64: dts: rockchip: drop rockchip,trcm-sync-tx-only from rk3588 i2s Date: Tue, 27 Feb 2024 17:46:56 +0100 Message-Id: <20240227164659.705271-2-heiko@sntech.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240227164659.705271-1-heiko@sntech.de> References: <20240227164659.705271-1-heiko@sntech.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792071463413241368 X-GMAIL-MSGID: 1792071463413241368 |
Series |
Add support for Theobroma-Systems Tiger SoM
|
|
Commit Message
Heiko Stübner
Feb. 27, 2024, 4:46 p.m. UTC
From: Heiko Stuebner <heiko.stuebner@cherry.de> The rockchip,trcm-sync-tx-only property is at this time only documented for the tdm variant of Rockchip i2s controllers. While there was a series [0] adding code and binding for the property, it doesn't seem to have gone forward back in 2021. So for now fix the devicetree check by removing the property from rk3588 i2s controllers until support for it gets merged. [0] https://patchwork.kernel.org/project/linux-rockchip/patch/1629796734-4243-5-git-send-email-sugar.zhang@rock-chips.com/ Fixes: 8ae112a5554f ("arm64: dts: rockchip: Add rk3588s I2S nodes") Cc: Sugar Zhang <sugar.zhang@rock-chips.com> Cc: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> --- arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 2 -- 1 file changed, 2 deletions(-)
Comments
Hi Heiko, On 2/27/24 17:46, Heiko Stuebner wrote: > From: Heiko Stuebner <heiko.stuebner@cherry.de> > > The rockchip,trcm-sync-tx-only property is at this time only documented > for the tdm variant of Rockchip i2s controllers. > > While there was a series [0] adding code and binding for the property, > it doesn't seem to have gone forward back in 2021. > > So for now fix the devicetree check by removing the property from rk3588 > i2s controllers until support for it gets merged. > It seems like tx-only should be supported if the dai_link has a symmetric rate, c.f. https://elixir.bootlin.com/linux/latest/source/sound/soc/rockchip/rockchip_i2s.c#L455 is doing the same as the patch from 3 years ago[1] was trying to do, only in the probe. [1] https://patchwork.kernel.org/project/linux-rockchip/patch/1629796734-4243-4-git-send-email-sugar.zhang@rock-chips.com/ Considering that the RK3588 doesn't have RX only support according to the documentation of that register.... However, I have no clue how the dai_link would get the symmetrical rate set, because the only place I could see it set is in set_link_flags if SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES if set in the flag mask and the flags, but my grep-fu returned nothing setting this flag anywhere... so maybe that's just dead code? In any case, with the current code: I2S_CKR_TRCM_TXRX is put into I2S_CKR register, regardless of that DT property. While the naming seems to suggest TX+RX should be possible, its value is 0 (offset 28) and in the TRM it says: 2'b00: Generates LRCK for TX only. Soooo... we are essentially in tx-only mode today with or without that property. Some things to fix later on :) Which made me look for the same thing for the i2s_tdm driver and the same mistake is made, though here there's no support for tx-only or rx-only according to the TRM, and it is required to write 0b01 (offset 28)... which we do by abusing the tx-only DT property which writes TRCM_TX whose value is 1 (offset 28). Considering that this is stored in clk_trcm member in the struct and that we do checks on that member to know in which situation we are (txrx, tx, rx), this seems very incorrect to me as we would configure it in the only mode it knows (txrx) but make the driver assume tx-only is selected. One more thing to fix later on :) In any case, this patch is for matching the dt-bindings so there's no reason to not merge this, so: Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Thanks, Quentin
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi index 36b1b7acfe6a1..82350ddb262f2 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi @@ -1704,7 +1704,6 @@ i2s2_2ch: i2s@fe490000 { dmas = <&dmac1 0>, <&dmac1 1>; dma-names = "tx", "rx"; power-domains = <&power RK3588_PD_AUDIO>; - rockchip,trcm-sync-tx-only; pinctrl-names = "default"; pinctrl-0 = <&i2s2m1_lrck &i2s2m1_sclk @@ -1725,7 +1724,6 @@ i2s3_2ch: i2s@fe4a0000 { dmas = <&dmac1 2>, <&dmac1 3>; dma-names = "tx", "rx"; power-domains = <&power RK3588_PD_AUDIO>; - rockchip,trcm-sync-tx-only; pinctrl-names = "default"; pinctrl-0 = <&i2s3_lrck &i2s3_sclk