From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 6D4F317565 for ; Wed, 27 Mar 2024 05:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711516344; cv=none; b=gbnUrJ2IRsOAiLYkc/e/V7kJjWOhaClAJbbHa0l4me0LMsDmiwb8+XBwasSRWbMFdZGsL0yKoYsxDcZX9aInBX/3WqHHIKhcw3p6KQrtpzblVVFbvjkdgLxG4ouY8CLxaYx+1rNHi/g0+2+lHNpgf5iv4xi3mWLmnSbB84R6abI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711516344; c=relaxed/simple; bh=IJHWOnTINFpZXZ9g/2/P87Myf9jBqm+cXzXz94G2KlE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KStyLu1G0fL8Ts3kkurj7+OOJOmcDoHsp3PH7id/qBrZbpyJQrSA6fxfoOqtWnAJLuV3oMNznHLy1ybamwHmcK/ar1FGda4T47y/C5/z5wuo2ywH8rEtg6PFzZmlxK2pfzruDwBK08+UmUGr1E5O8OHSAWvcFx9lkQ7h1+XK8cY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=bfODwxVA; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bfODwxVA" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a470d7f77eeso796415866b.3 for ; Tue, 26 Mar 2024 22:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711516341; x=1712121141; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=Dwtti/peMihUTMyAzlCIGMLulrpmjqLQzU4QpF2mNKU=; b=bfODwxVA6gLQY/wRvXPxQwa9E0IzaOHTWuRX5OqVDBWTXaH+rr+xnko3IJ+KJaHnda L5AfneDqzz6q2NDenZ06x68xUpar3pZaYmE0oFnRWUgpH5SVU1y3YKKEJA4hLP7iA7dW tQM1s28LUDxSgTczcglAPprIqneGY70vXg5b4g3Cl+6wC8FXsJj9nW8vfXH7ocULLadT 6kwJhhEDzW/VXkalS+YQv5R2UhBvIFmZRlUk7ovY+E53WddIs3ZLfyEjXRI2QVEffopK HWmIuXJuHP7i3MDYUDtdkcoDkbqQF7f5jheag/BiKgfZsHdgd3PUe+c1nGwWUyuSXrfF QFrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711516341; x=1712121141; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Dwtti/peMihUTMyAzlCIGMLulrpmjqLQzU4QpF2mNKU=; b=TvQSb2MQpQvMB505SYOsnjWeu6ZKd8/dIkv7/hZCLWX4bVaMcZtLQysP5OOtGKgJ6/ zNlzrvHiCsyOYFtzP6bVr12yv/NIp3bGu4PKjR3eMTv+kQPGd2IbN8voxXNyZigZWFty SqvBQWVSQ+GvZ+rI0E2pFkk4lb/fCr2791+jFJOB+8eB8Cmut2lFs10/4zR9RUmWcl7P 1AxxHTXlbtM+eLX+9LhsBD4itEM//GPO9+39XaQKud2oXy0MEVLO/QZMD6qOpMRSdZZU dn0jounayDwSFa68zNY6UcpOHGfdjWH2XkmjjXq3fcGFeZAwZaB0W/xtBvVIg42j4pKz eQIQ== X-Forwarded-Encrypted: i=1; AJvYcCVan6yGLUx3HZ7JdjYqf8F5nSW5iXosj+vsL2xpOQjhrWryu6EUocho2XBugLFrli5NKhb7++Y4ShhTCfG2QEyUYdhdMhCM9pOXIP0= X-Gm-Message-State: AOJu0YwVIKjjz9vuaH+BCdHi2XXZi/GGlBLu+FHKJDQOjUnYKUhXSJN8 dnNiTZxL3mnSNnMv9AHtmvqo1E6zjGuJTiVgLloyneugITNBF7w7iuIhHl2JVow= X-Google-Smtp-Source: AGHT+IElJpw3yCm9S4l81YiCAYTFbqQcMEaxlCe/Y/vun3hBezNkXoQkI96UNC8LRjTdHliw/4EueA== X-Received: by 2002:a17:906:dfd7:b0:a46:f6fc:1fda with SMTP id jt23-20020a170906dfd700b00a46f6fc1fdamr92944ejc.20.1711516340821; Tue, 26 Mar 2024 22:12:20 -0700 (PDT) Received: from [192.168.1.20] ([178.197.222.44]) by smtp.gmail.com with ESMTPSA id kq1-20020a170906abc100b00a46a04d7dc4sm4957769ejb.61.2024.03.26.22.12.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Mar 2024 22:12:20 -0700 (PDT) Message-ID: <16f72b4a-2aa9-49d5-a4aa-ed94eea1f32a@linaro.org> Date: Wed, 27 Mar 2024 06:12:18 +0100 Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW1BBVENIIHYyIDEvMl0gQVNvQzogZHQtYmluZGlu?= =?UTF-8?Q?gs=3A_Add_bindings_for_Cadence_I2S-MC_controller?= To: Xingyu Wu , Liam Girdwood , Mark Brown , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "alsa-devel@alsa-project.org" , "linux-sound@vger.kernel.org" References: <20240320090239.168743-1-xingyu.wu@starfivetech.com> <20240320090239.168743-2-xingyu.wu@starfivetech.com> <9d9efb8a-0b3c-4e7a-8673-07cd3b1f5f87@linaro.org> <9b1a5100-8536-4b59-b2e7-d6ebd2ba9e66@linaro.org> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewAR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w4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 26/03/2024 14:43, Xingyu Wu wrote: >>>>> + >>>>> +properties: >>>>> + compatible: >>>>> + enum: >>>>> + - cdns,i2s-mc >>>> >>>> Why did this appear? Who asked for this? Usually these blocks are not >>>> usable on their own. >>> >>> I wonder if I should keep the original IP compatible. Do I not need it? >> >> As I said, it is not usable on its own, so unless you have other arguments then no. >> But my point was that no one asked for this. > > I want to keep the original IP compatible which can distinguish from the JH8100 SoC. > Can I write it like this: > compatible: > enum: > - starfive,jh8100-i2s > const: cdns,i2s-mc > > and I write this in the DTS: > compatible = "starfive,jh8100-i2s", "cdns,i2s-mc"; Can you provide any rationale for this? I asked "unless you have other arguments", so where are the arguments? Nothing was explained in patch changelog. Nothing was provided in this email thread. > >> >>> >>>> >>>>> + - starfive,jh8100-i2s >>>>> + >>>>> + reg: >>>>> + maxItems: 1 >>>>> + >>>>> + interrupts: >>>>> + description: >>>>> + The interrupt line number for the I2S controller. Add this >>>>> + parameter if the I2S controller that you are using does not >>>>> + using DMA. >>>> >>>> That's still wrong. You already got comment on this. Either you have interrupt >> or not. >>>> You do not add interrupts, based on your choice or not of having DMA. >>>> Drop the comment. >>> >>> Do I keep this property and drop this description? >> >> Drop description. Keep property, if your hardware has interrupts. >> > > Will drop. > >> ... >> >>>> >>>>> + - compatible >>>>> + - reg >>>>> + - clocks >>>>> + - clock-names >>>>> + - resets >>>>> + >>>>> +oneOf: >>>>> + - required: >>>>> + - dmas >>>>> + - dma-names >>>>> + - required: >>>>> + - interrupts >>>> >>>> This won't work. Provide both interrupts and dmas, and then test your DTS. >>> >>> I provided both properties in the DTS and test by dtbs_check. Then it printed >> that: >>> 'More than one condition true in one of shema: ...' >> >> Exactly. Having both properties is a correct DTS. Interrupts do not disappear just >> because you decide to describe DMA. It is OS choice what to use if both are >> provided. >> > > But this I2S can only use either DMA or interrupts. Just like many other components. DTS should reflect hardware. Hardware has interrupts and DMA, right? > > Can I use the config (like SND_SOC_CADENCE_I2S_MC_PCM) to choose DMA or > interrupt if having both them in DTS? Don't know, I tend to focus here on bindings. Best regards, Krzysztof