2023-07-20 11:19:20

by Guo Samin

[permalink] [raw]
Subject: [PATCH v5 0/2] Add motorcomm phy pad-driver-strength-cfg support

The motorcomm phy (YT8531) supports the ability to adjust the drive
strength of the rx_clk/rx_data, and the default strength may not be
suitable for all boards. So add configurable options to better match
the boards.(e.g. StarFive VisionFive 2)

The first patch adds a description of dt-bingding, and the second patch adds
YT8531's parsing and settings for pad-driver-strength-cfg.

Changes since v4:
Patch 1:
- Removed register-related DS(3b) values and added vol descriptions (by Andrew Lunn)
- Dropped the type and added '-microamp' suffix. (by Rob Herring)
Patch 2:
- Return -EINVAL if the value in DT but it is invalid (by Andrew Lunn)

Changes since v3:
Patch 1:
- Used current values instead of register values
- Added units and numerical descriptions of driver-strength
Patch 2:
- Added a lookup table to listing the valid values in the schema (by Andrew Lunn)

Changes since v2:
Patch 2:
- Readjusted the order of YT8531_RGMII_xxx to below YTPHY_PAD_DRIVE_STRENGTH_REG (by Frank Sae)
- Reversed Christmas tree, sort these longest first, shortest last (by Andrew Lunn)
- Rebased on tag v6.4

Changes since v1:
Patch 1:
- Renamed "rx-xxx-driver-strength" to "motorcomm,rx-xxx-driver-strength" (by Frank Sae)
Patch 2:
- Added default values for rxc/rxd driver strength (by Frank Sea/Andrew Lunn)
- Added range checking when val is in DT (by Frank Sea/Andrew Lunn)

Previous versions:
v1 - https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]
v2 - https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]
v3 - https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]
v4 - https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]

Samin Guo (2):
dt-bindings: net: motorcomm: Add pad driver strength cfg
net: phy: motorcomm: Add pad drive strength cfg support

.../bindings/net/motorcomm,yt8xxx.yaml | 34 +++++
drivers/net/phy/motorcomm.c | 118 ++++++++++++++++++
2 files changed, 152 insertions(+)


base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
--
2.17.1



2023-07-20 11:31:46

by Guo Samin

[permalink] [raw]
Subject: [PATCH v5 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg

The motorcomm phy (YT8531) supports the ability to adjust the drive
strength of the rx_clk/rx_data.

The YT8531 RGMII LDO voltage supports 1.8V/3.3V, and the
LDO voltage can be configured with hardware pull-up resistors to match
the SOC voltage (usually 1.8V). The software can read the registers
0xA001 obtain the current LDO voltage value.

Reviewed-by: Hal Feng <[email protected]>
Signed-off-by: Samin Guo <[email protected]>
---
.../bindings/net/motorcomm,yt8xxx.yaml | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml b/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml
index 157e3bbcaf6f..605be74f8556 100644
--- a/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml
+++ b/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml
@@ -52,6 +52,40 @@ properties:
for a timer.
type: boolean

+ motorcomm,rx-clk-drv-microamp:
+ description: |
+ drive strength of rx_clk rgmii pad.
+ The YT8531 RGMII LDO voltage supports 1.8V/3.3V, and the LDO voltage can
+ be configured with hardware pull-up resistors to match the SOC voltage
+ (usually 1.8V).
+ The software can read the registers to obtain the LDO voltage and configure
+ the legal drive strength(curren).
+ =====================================================
+ | voltage | curren Available (uA) |
+ | 1.8v | 1200 2100 2700 2910 3110 3600 3970 4350 |
+ | 3.3v | 3070 4080 4370 4680 5020 5450 5740 6140 |
+ =====================================================
+ enum: [ 1200, 2100, 2700, 2910, 3070, 3110, 3600, 3970,
+ 4080, 4350, 4370, 4680, 5020, 5450, 5740, 6140 ]
+ default: 2910
+
+ motorcomm,rx-data-drv-microamp:
+ description: |
+ drive strength of rx_data/rx_ctl rgmii pad.
+ The YT8531 RGMII LDO voltage supports 1.8V/3.3V, and the LDO voltage can
+ be configured with hardware pull-up resistors to match the SOC voltage
+ (usually 1.8V).
+ The software can read the registers to obtain the LDO voltage and configure
+ the legal drive strength(curren).
+ =====================================================
+ | voltage | curren Available (uA) |
+ | 1.8v | 1200 2100 2700 2910 3110 3600 3970 4350 |
+ | 3.3v | 3070 4080 4370 4680 5020 5450 5740 6140 |
+ =====================================================
+ enum: [ 1200, 2100, 2700, 2910, 3070, 3110, 3600, 3970,
+ 4080, 4350, 4370, 4680, 5020, 5450, 5740, 6140 ]
+ default: 2910
+
motorcomm,tx-clk-adj-enabled:
description: |
This configuration is mainly to adapt to VF2 with JH7110 SoC.
--
2.17.1


2023-07-20 16:36:20

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH v5 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg

> + motorcomm,rx-clk-drv-microamp:
> + description: |
> + drive strength of rx_clk rgmii pad.
> + The YT8531 RGMII LDO voltage supports 1.8V/3.3V, and the LDO voltage can
> + be configured with hardware pull-up resistors to match the SOC voltage
> + (usually 1.8V).
> + The software can read the registers to obtain the LDO voltage and configure
> + the legal drive strength(curren).
> + =====================================================
> + | voltage | curren Available (uA) |

current has a t.

> + =====================================================
> + | voltage | curren Available (uA) |

Reviewed-by: Andrew Lunn <[email protected]>

Andrew

2023-07-21 10:08:38

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v5 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg

On Thu, Jul 20, 2023 at 06:00:15PM +0200, Andrew Lunn wrote:
> > + motorcomm,rx-clk-drv-microamp:
> > + description: |
> > + drive strength of rx_clk rgmii pad.
> > + The YT8531 RGMII LDO voltage supports 1.8V/3.3V, and the LDO voltage can
> > + be configured with hardware pull-up resistors to match the SOC voltage
> > + (usually 1.8V).
> > + The software can read the registers to obtain the LDO voltage and configure
> > + the legal drive strength(curren).
> > + =====================================================
> > + | voltage | curren Available (uA) |
>
> current has a t.
>
> > + =====================================================
> > + | voltage | curren Available (uA) |
>
> Reviewed-by: Andrew Lunn <[email protected]>

With the fixup,
Reviewed-by: Conor Dooley <[email protected]>

Thanks,
Conor.


Attachments:
(No filename) (941.00 B)
signature.asc (235.00 B)
Download all attachments

2023-07-24 09:49:45

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH v5 0/2] Add motorcomm phy pad-driver-strength-cfg support

Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <[email protected]>:

On Thu, 20 Jul 2023 19:15:07 +0800 you wrote:
> The motorcomm phy (YT8531) supports the ability to adjust the drive
> strength of the rx_clk/rx_data, and the default strength may not be
> suitable for all boards. So add configurable options to better match
> the boards.(e.g. StarFive VisionFive 2)
>
> The first patch adds a description of dt-bingding, and the second patch adds
> YT8531's parsing and settings for pad-driver-strength-cfg.
>
> [...]

Here is the summary with links:
- [v5,1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg
(no matching commit)
- [v5,2/2] net: phy: motorcomm: Add pad drive strength cfg support
https://git.kernel.org/netdev/net-next/c/7a561e9351ae

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html