From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: POPESCU Catalin <catalin.popescu@leica-geosystems.com>,
"Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"afd@ti.com" <afd@ti.com>,
"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
GEO-CHHER-bsp-development
<bsp-development.geo@leica-geosystems.com>
Subject: Re: [PATCH 1/3] dt-bindings: net: dp83826: add ti,cfg-dac-minus binding
Date: Thu, 11 Jan 2024 18:21:29 +0100 [thread overview]
Message-ID: <0da41018-eeae-4a15-a431-954da99261d0@linaro.org> (raw)
In-Reply-To: <c5b4613a-261d-429b-b59c-c264bc53e315@leica-geosystems.com>
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 <catalin.popescu@leica-geosystems.com>
>>>>> ---
>>>>> 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
next prev parent reply other threads:[~2024-01-11 17:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 16:19 Catalin Popescu
2024-01-11 16:19 ` [PATCH 2/3] dt-bindings: net: dp83826: add ti,cfg-dac-plus binding Catalin Popescu
2024-01-11 16:45 ` POPESCU Catalin
2024-01-11 17:21 ` Krzysztof Kozlowski
2024-01-12 10:56 ` POPESCU Catalin
2024-01-11 21:01 ` Rob Herring
2024-01-13 19:16 ` kernel test robot
2024-01-11 16:19 ` [PATCH 3/3] net: phy: dp83826: add support for voltage tuning of logical levels Catalin Popescu
2024-01-11 16:45 ` Andrew Lunn
2024-01-11 16:54 ` POPESCU Catalin
2024-01-13 3:26 ` kernel test robot
2024-01-11 16:35 ` [PATCH 1/3] dt-bindings: net: dp83826: add ti,cfg-dac-minus binding Andrew Lunn
2024-01-11 16:45 ` POPESCU Catalin
2024-01-11 16:47 ` Andrew Lunn
2024-01-12 10:56 ` POPESCU Catalin
2024-01-11 16:52 ` Russell King (Oracle)
2024-01-11 16:59 ` POPESCU Catalin
2024-01-11 17:21 ` Krzysztof Kozlowski [this message]
2024-01-12 13:41 ` POPESCU Catalin
2024-01-12 13:47 ` Krzysztof Kozlowski
2024-01-11 17:20 ` Krzysztof Kozlowski
2024-01-12 11:02 ` POPESCU Catalin
2024-01-11 21:01 ` Rob Herring
2024-01-13 6:10 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0da41018-eeae-4a15-a431-954da99261d0@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=afd@ti.com \
--cc=andrew@lunn.ch \
--cc=bsp-development.geo@leica-geosystems.com \
--cc=catalin.popescu@leica-geosystems.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®