diff mbox series

[net-next,v6,07/11] dt-bindings: net: hisi-femac: replace deprecated phy-mode with recommended phy-connection-type

Message ID 20240228-net-v6-7-6d78d3d598c1@outlook.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: hisi-femac: add support for Hi3798MV200, remove unmaintained compatibles | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 1 maintainers not CCed: forbidden405@foxmail.com
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-02-28--12-00 (tests: 879)

Commit Message

Yang Xiwen via B4 Relay Feb. 28, 2024, 9:02 a.m. UTC
From: Yang Xiwen <forbidden405@outlook.com>

The old property "phy-mode" should be replaced with the latest
"phy-connection-type".

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
---
 Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski Feb. 29, 2024, 8:08 a.m. UTC | #1
On 28/02/2024 10:02, Yang Xiwen via B4 Relay wrote:
> From: Yang Xiwen <forbidden405@outlook.com>
> 
> The old property "phy-mode" should be replaced with the latest
> "phy-connection-type".

Why? The old property is not deprecated.



Best regards,
Krzysztof
Yang Xiwen Feb. 29, 2024, 8:12 a.m. UTC | #2
On 2/29/2024 4:08 PM, Krzysztof Kozlowski wrote:
> On 28/02/2024 10:02, Yang Xiwen via B4 Relay wrote:
>> From: Yang Xiwen <forbidden405@outlook.com>
>>
>> The old property "phy-mode" should be replaced with the latest
>> "phy-connection-type".
> 
> Why? The old property is not deprecated.

The old property is just a $ref to the new property. While at it, i
would like to update it as well.

Since there is no real user in mainline yet, this update does not need
to keep dts sync. I would expect it(the old property) to be deprecated
in the future.

> 
> 
> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski Feb. 29, 2024, 8:21 a.m. UTC | #3
On 29/02/2024 09:12, Yang Xiwen wrote:
> On 2/29/2024 4:08 PM, Krzysztof Kozlowski wrote:
>> On 28/02/2024 10:02, Yang Xiwen via B4 Relay wrote:
>>> From: Yang Xiwen <forbidden405@outlook.com>
>>>
>>> The old property "phy-mode" should be replaced with the latest
>>> "phy-connection-type".
>>
>> Why? The old property is not deprecated.
> 
> The old property is just a $ref to the new property. While at it, i
> would like to update it as well.

It does not mean which property is preferred. Please provide some
context why this change should be done.

> 
> Since there is no real user in mainline yet, this update does not need
> to keep dts sync. I would expect it(the old property) to be deprecated
> in the future.



Best regards,
Krzysztof
Andrew Lunn Feb. 29, 2024, 5:18 p.m. UTC | #4
On Wed, Feb 28, 2024 at 05:02:31PM +0800, Yang Xiwen via B4 Relay wrote:
> From: Yang Xiwen <forbidden405@outlook.com>
> 
> The old property "phy-mode" should be replaced with the latest
> "phy-connection-type".

In practice, phy-mode is typically used, and phy-connection-type is
not used much. All new user tend to be phy-mode.

~/linux$ grep -r phy-mode arch/* | wc
   1561    6258  113122
~/linux$ grep -r phy-connection-type arch/* | wc
    372    1489   28981

Most of the phy-connection-type appear in PowerPC.

~/linux$ grep -r phy-connection-type arch/powerpc/* | wc
    247     990   18335

It was the early adopter of DT, long before ARM. The DT standard of
the time, which PowerPC followed, said to use
phy-connection-type. When ARM started using DT, it did not follow the
standard too well, and phy-mode got used a lot. Officially, phy-mode
is deprecated because it is not part of the standard. But practice
does not always follow the standard.

So both are O.K, all the generic code accepts both, and there is no
real reason to change.

	Andrew
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml
index ba207f2c9ae4..6c5888897876 100644
--- a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml
+++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml
@@ -66,7 +66,7 @@  required:
   - clocks
   - resets
   - reset-names
-  - phy-mode
+  - phy-connection-type
   - phy-handle
   - hisilicon,phy-reset-delays-us
 
@@ -83,7 +83,7 @@  examples:
         resets = <&crg 0xec 0>, <&crg 0xec 3>;
         reset-names = "mac", "phy";
         mac-address = [00 00 00 00 00 00];
-        phy-mode = "mii";
+        phy-connection-type = "mii";
         phy-handle = <&fephy>;
         hisilicon,phy-reset-delays-us = <10000 20000 20000>;
     };