Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1793087rdd; Thu, 11 Jan 2024 09:21:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHXNh1PQcBS3CkPh64Voz7p4HpQSe6WdBj2piPXoVAHFhtMBtldhWR+TEb8DU9qvDHwPfjg X-Received: by 2002:a05:622a:242:b0:429:ca3d:859b with SMTP id c2-20020a05622a024200b00429ca3d859bmr83498qtx.55.1704993711312; Thu, 11 Jan 2024 09:21:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704993711; cv=none; d=google.com; s=arc-20160816; b=Jn+l6qIqoDpWHv7d2cv8lPuxpJDbIRSb1WBW7mRhw3Oov3xrWl9+GV3z/sbqYUpb8T GeE2myOflascGC/n77wzhVxZJ/8R9JLJEQgL82zvmvlEkM95Yv3RH1osb20iS7edytLB RSo4Yme0U+XL7JdG6cURuUxlY7r/3ImX2AR29RDl4C4QrECMhZ7Xl6xnM8YPD57Gc9Bq cgb8OEcG7D2x7Xc7oQuk1PVsFi9wFvpAdX6h1vY/dPRjMxDpIHl8x5NnvQhafxa3bpRp qGLki99QoQojE/AHQQnNeNWx5qhOF4+nBB3dTfnsWkRPvZ16QWs56/MsjAf7khZFibs2 LY2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=Wh6xioLxIDyy4m7WmjnXFA+yjBfdT2HZ245YnHt/OF8=; fh=68H1AKWtcE9z7lhr9m/AnFeiYm7QipJUDQ00PRxVdYc=; b=gAom9DLKSBmwNwohuF6AvFKrM6YzU4mN0aUOz4G8sAOUAkNDgLKLiX3+epqAN+sCzl XpZxzs7JHh1PAX8/hhBOJCnxiuYwQov5ituwndf5iIvYkPZ0+B/celevbpkl6rEYvtAo WjBCFB7xo3MfdcdLk+ZXjWDE4kyqj8uTxZQNXae0+CHFNZge5v3gC9fCW11/q+j/W8GI 5msqISw/F/rQYiO60X0C/9r682C+6CWPfQF07ngkvPz9LyuB/k8IQwCsw4BFKrvNW22E NRYXWWBkUkCvgK0wFsq6ewFJPoDam045bXsUiOdryTeY0FMFhohVfwMv2TrgJJOMRcUS hJyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sRZL29l+; spf=pass (google.com: domain of linux-kernel+bounces-23924-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23924-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w14-20020ac87e8e000000b00429be168fbdsi1353253qtj.548.2024.01.11.09.21.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 09:21:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23924-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sRZL29l+; spf=pass (google.com: domain of linux-kernel+bounces-23924-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23924-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 095651C22E00 for ; Thu, 11 Jan 2024 17:21:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71777524D7; Thu, 11 Jan 2024 17:21:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sRZL29l+" Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 22480524A4 for ; Thu, 11 Jan 2024 17:21:34 +0000 (UTC) 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 Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3367a304091so4812332f8f.3 for ; Thu, 11 Jan 2024 09:21:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704993692; x=1705598492; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Wh6xioLxIDyy4m7WmjnXFA+yjBfdT2HZ245YnHt/OF8=; b=sRZL29l+nB67M8IbetYJsm8IGxWw+YXyfb4QPB8XHyaIl84TF7YZW+yyVjXaT5toUS 0mnlnV3+34aHjgPVw7VvGQWzcDvNiabH06UJaKv8yY02yN8C3e2w6STYQbvGrnIQDnj9 IKOG5qX2ZJAMFkwTHOAQu3I8nhUZrp8qhS3UfOdept4+N2teWt2lqw6jqSzU2NZmgsLx RX+A/A+yDHGz3yPpwoDby2AH5nIcWNi3kdl6I4LjBKCtJaDuiClKasIWsqhtHQhaqpme g3VPKD5jXV3gfEgbp8yMu990uIME05Qy55h7AcJEn29rWpQ8CtEyAGm7bYeov4tJIOcn ABPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704993692; x=1705598492; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Wh6xioLxIDyy4m7WmjnXFA+yjBfdT2HZ245YnHt/OF8=; b=r2BVZQt0PJk955ZZc9McZACqdSsqK1p+okAOrueJDRJRIB4rDA8kgaTKeoUEI+dRoI MjM7p+/dF0Memm7fk1xcAR5nuamy5oiWjgRkzkTq81TRlFi/MBfut+UQhEYmcLzyS1/l Mr4vg6Fuf9ZmXB/ZI/2Ll3sdZjLpi2D1yoNVfm3CGnZjXxAICMOx4K1Zf5FMQcSJ0WM+ cVC4yOHLm3D5o/8ZUeG7J+88Ru+aKbSBthaefVeGLQvaHNB93ZxVmfgNrCTxQfP9oS22 HXSqbABw40VMiQ+OXKncyg56SnaONRyngL5V/3ogE8MGdxyxPcPciTvQaNI3lRzGomzS bWNw== X-Gm-Message-State: AOJu0YwCN2UzmRsJBrum21WwxrhVOwEHwWjzMF/CGUrHHVGKYesC8d21 QOicRknao3CCTsfUGdZNmDK43XTPfM+7LMKqM6suZyaRBpk= X-Received: by 2002:a5d:4589:0:b0:337:56e4:38a0 with SMTP id p9-20020a5d4589000000b0033756e438a0mr35320wrq.35.1704993692375; Thu, 11 Jan 2024 09:21:32 -0800 (PST) Received: from [192.168.1.20] ([178.197.223.112]) by smtp.gmail.com with ESMTPSA id d18-20020a5d6452000000b0033761b2de64sm1673897wrw.76.2024.01.11.09.21.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Jan 2024 09:21:31 -0800 (PST) Message-ID: <0da41018-eeae-4a15-a431-954da99261d0@linaro.org> Date: Thu, 11 Jan 2024 18:21:29 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] dt-bindings: net: dp83826: add ti,cfg-dac-minus binding Content-Language: en-US To: POPESCU Catalin , "Russell King (Oracle)" Cc: Andrew Lunn , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "conor+dt@kernel.org" , "afd@ti.com" , "hkallweit1@gmail.com" , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , GEO-CHHER-bsp-development References: <20240111161927.3689084-1-catalin.popescu@leica-geosystems.com> 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 T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rSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 11/01/2024 17:59, POPESCU Catalin wrote: > On 11.01.24 17:52, Russell King (Oracle) wrote: >> This email is not from Hexagon’s Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email. >> >> >> On Thu, Jan 11, 2024 at 04:45:26PM +0000, POPESCU Catalin wrote: >>> On 11.01.24 17:35, Andrew Lunn wrote: >>>> [You don't often get email from andrew@lunn.ch. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] >>>> >>>> This email is not from Hexagon’s Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email. >>>> >>>> >>>> On Thu, Jan 11, 2024 at 05:19:25PM +0100, Catalin Popescu wrote: >>>>> Add property ti,cfg-dac-minus to allow for voltage tuning >>>>> of logical level -1 of the MLT-3 encoded data. >>>>> >>>>> Signed-off-by: Catalin Popescu >>>>> --- >>>>> Documentation/devicetree/bindings/net/ti,dp83822.yaml | 9 +++++++++ >>>>> 1 file changed, 9 insertions(+) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/net/ti,dp83822.yaml b/Documentation/devicetree/bindings/net/ti,dp83822.yaml >>>>> index db74474207ed..2f010333be49 100644 >>>>> --- a/Documentation/devicetree/bindings/net/ti,dp83822.yaml >>>>> +++ b/Documentation/devicetree/bindings/net/ti,dp83822.yaml >>>>> @@ -62,6 +62,15 @@ properties: >>>>> for the PHY. The internal delay for the PHY is fixed to 3.5ns relative >>>>> to transmit data. >>>>> >>>>> + ti,cfg-dac-minus: >>>>> + description: | >>>>> + DP83826 PHY only. >>>>> + Sets the voltage ratio of the logical level -1 for the MLT-3 encoded data. >>>>> + 0 = 50%, 1 = 56.25%, 2 = 62.50%, 3 = 68.75%, 4 = 75%, 5 = 81.25%, 6 = 87.50%, >>>>> + 7 = 93.75%, 8 = 100%, 9 = 106.25%, 10 = 112.50%, 11 = 118.75%, 12 = 125%, >>>>> + 13 = 131.25%, 14 = 137.50%, 15 = 143.75%, 16 = 150%. >>>>> + enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] >>>> We try to avoid register values in DT. We use real units. This is a >>>> voltage you are configuring, so can you change the unit to millivolts? >>>> Have the driver do the conversion of volts to register value. >>>> >>>> Is it possible to configure any of the other logical levels? >>> Hi Andrew, >>> These are not raw register values and these are not voltage values but >>> voltage ratios. I'm mapping the voltage ratios to enum values [0-16] >>> which are converted to register raw values by the driver. I don't see a >>> better way to do this. >> enum: [ 5000, 5625, 6250, 6875, 7500, 8125, 8750, 9375, 10000, >> 10625, 11250, 11875, 12500 13125, 13750, 14375, 15000 ] >> >> ? > I'm okay with that approach if there's no better one. I would need to > remove the register raw values tables from the driver and use a switch > statement to map those values to raw values. You can also use -bp or -percent: https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml Best regards, Krzysztof