Subject: [PATCH v6 0/2] PHY: Add new PHY attribute max_link_rate

This patch series adds a new PHY attribute max_link_rate.
It also updates Cadence Torrent PHY driver to set attributes bus_width,
max_link_rate and mode for DisplayPort.

It includes following patches:

1. 0001-phy-Add-new-PHY-attribute-max_link_rate.patch
This patch adds max_link_rate as a new PHY attribute.

2. 0002-phy-cadence-torrent-Set-Torrent-PHY-attributes.patch
This patch sets PHY attributes in Cadence Torrent PHY driver. This will
enable drivers using this PHY to read these properties.

These attributes will be used in the Cadence MHDP DRM bridge driver [1]
which is in the process of upstreaming.

[1]

https://lkml.org/lkml/2020/8/31/171

Version History:

v6:
- Remove implementation of new APIs phy_get_attrs/phy_set_attrs
- Set attributes manually in Torrent PHY driver

v5:
- Add kernel-doc comments for phy_get_attrs/phy_set_attrs APIs
- Pass second parameter of phy_set_attrs() as const struct *
- Add Acked-by: Kishon Vijay Abraham I <[email protected]>

v4:
- Protect phy_get_attrs/phy_set_attrs APIs with mutex

v3:
- Add comment describing new PHY attribute max_link_rate
- Use of memcpy to copy structure members
- Change commit log a bit

v2:
- Implemented single pair of functions to get/set all PHY attributes

Swapnil Jakhade (2):
phy: Add new PHY attribute max_link_rate
phy: cadence-torrent: Set Torrent PHY attributes

drivers/phy/cadence/phy-cadence-torrent.c | 4 ++++
include/linux/phy/phy.h | 2 ++
2 files changed, 6 insertions(+)

--
2.26.1


Subject: [PATCH v6 1/2] phy: Add new PHY attribute max_link_rate

Add new PHY attribute max_link_rate to struct phy_attrs. This indicates
maximum link rate supported by PHY (in Mbps).

Signed-off-by: Yuti Amonkar <[email protected]>
Signed-off-by: Swapnil Jakhade <[email protected]>
Acked-by: Kishon Vijay Abraham I <[email protected]>
---
include/linux/phy/phy.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index bcee8eba62b3..e435bdb0bab3 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -115,10 +115,12 @@ struct phy_ops {
/**
* struct phy_attrs - represents phy attributes
* @bus_width: Data path width implemented by PHY
+ * @max_link_rate: Maximum link rate supported by PHY (in Mbps)
* @mode: PHY mode
*/
struct phy_attrs {
u32 bus_width;
+ u32 max_link_rate;
enum phy_mode mode;
};

--
2.26.1

2020-09-15 23:02:21

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH v6 1/2] phy: Add new PHY attribute max_link_rate

Hi Swapnil,

Thank you for the patch.

On Fri, Sep 11, 2020 at 08:18:33AM +0200, Swapnil Jakhade wrote:
> Add new PHY attribute max_link_rate to struct phy_attrs. This indicates
> maximum link rate supported by PHY (in Mbps).
>
> Signed-off-by: Yuti Amonkar <[email protected]>
> Signed-off-by: Swapnil Jakhade <[email protected]>
> Acked-by: Kishon Vijay Abraham I <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
> include/linux/phy/phy.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
> index bcee8eba62b3..e435bdb0bab3 100644
> --- a/include/linux/phy/phy.h
> +++ b/include/linux/phy/phy.h
> @@ -115,10 +115,12 @@ struct phy_ops {
> /**
> * struct phy_attrs - represents phy attributes
> * @bus_width: Data path width implemented by PHY
> + * @max_link_rate: Maximum link rate supported by PHY (in Mbps)
> * @mode: PHY mode
> */
> struct phy_attrs {
> u32 bus_width;
> + u32 max_link_rate;
> enum phy_mode mode;
> };
>

--
Regards,

Laurent Pinchart

2020-09-16 07:42:34

by Sekhar Nori

[permalink] [raw]
Subject: Re: [PATCH v6 0/2] PHY: Add new PHY attribute max_link_rate

Hi Vinod,

On 11/09/20 11:48 AM, Swapnil Jakhade wrote:
> This patch series adds a new PHY attribute max_link_rate.
> It also updates Cadence Torrent PHY driver to set attributes bus_width,
> max_link_rate and mode for DisplayPort.
>
> It includes following patches:
>
> 1. 0001-phy-Add-new-PHY-attribute-max_link_rate.patch
> This patch adds max_link_rate as a new PHY attribute.
>
> 2. 0002-phy-cadence-torrent-Set-Torrent-PHY-attributes.patch
> This patch sets PHY attributes in Cadence Torrent PHY driver. This will
> enable drivers using this PHY to read these properties.
>
> These attributes will be used in the Cadence MHDP DRM bridge driver [1]
> which is in the process of upstreaming.

Can you please add these patches on an immutable branch/tag when you are
ready to apply them - will try to see if we can use it to get the
DisplayPort driver merged in v5.10 too.

Hi Laurent, any other ideas on managing the dependency?

Thanks,
Sekhar

2020-09-16 16:54:48

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v6 0/2] PHY: Add new PHY attribute max_link_rate

Hi Sekhar,

On 16-09-20, 13:11, Sekhar Nori wrote:
> Hi Vinod,
>
> On 11/09/20 11:48 AM, Swapnil Jakhade wrote:
> > This patch series adds a new PHY attribute max_link_rate.
> > It also updates Cadence Torrent PHY driver to set attributes bus_width,
> > max_link_rate and mode for DisplayPort.
> >
> > It includes following patches:
> >
> > 1. 0001-phy-Add-new-PHY-attribute-max_link_rate.patch
> > This patch adds max_link_rate as a new PHY attribute.
> >
> > 2. 0002-phy-cadence-torrent-Set-Torrent-PHY-attributes.patch
> > This patch sets PHY attributes in Cadence Torrent PHY driver. This will
> > enable drivers using this PHY to read these properties.
> >
> > These attributes will be used in the Cadence MHDP DRM bridge driver [1]
> > which is in the process of upstreaming.
>
> Can you please add these patches on an immutable branch/tag when you are
> ready to apply them - will try to see if we can use it to get the
> DisplayPort driver merged in v5.10 too.

I have pushed in into topic/phy_attrs, please let me know if you need a
tag for this

>
> Hi Laurent, any other ideas on managing the dependency?
>
> Thanks,
> Sekhar

--
~Vinod

2020-09-16 19:15:18

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v6 0/2] PHY: Add new PHY attribute max_link_rate

On 11-09-20, 08:18, Swapnil Jakhade wrote:
> This patch series adds a new PHY attribute max_link_rate.
> It also updates Cadence Torrent PHY driver to set attributes bus_width,
> max_link_rate and mode for DisplayPort.
>
> It includes following patches:
>
> 1. 0001-phy-Add-new-PHY-attribute-max_link_rate.patch
> This patch adds max_link_rate as a new PHY attribute.
>
> 2. 0002-phy-cadence-torrent-Set-Torrent-PHY-attributes.patch
> This patch sets PHY attributes in Cadence Torrent PHY driver. This will
> enable drivers using this PHY to read these properties.
>
> These attributes will be used in the Cadence MHDP DRM bridge driver [1]
> which is in the process of upstreaming.

Applied, thanks

--
~Vinod

2020-09-16 19:49:49

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH v6 0/2] PHY: Add new PHY attribute max_link_rate

Hi Sekhar,

On Wed, Sep 16, 2020 at 01:11:17PM +0530, Sekhar Nori wrote:
> On 11/09/20 11:48 AM, Swapnil Jakhade wrote:
> > This patch series adds a new PHY attribute max_link_rate.
> > It also updates Cadence Torrent PHY driver to set attributes bus_width,
> > max_link_rate and mode for DisplayPort.
> >
> > It includes following patches:
> >
> > 1. 0001-phy-Add-new-PHY-attribute-max_link_rate.patch
> > This patch adds max_link_rate as a new PHY attribute.
> >
> > 2. 0002-phy-cadence-torrent-Set-Torrent-PHY-attributes.patch
> > This patch sets PHY attributes in Cadence Torrent PHY driver. This will
> > enable drivers using this PHY to read these properties.
> >
> > These attributes will be used in the Cadence MHDP DRM bridge driver [1]
> > which is in the process of upstreaming.
>
> Can you please add these patches on an immutable branch/tag when you are
> ready to apply them - will try to see if we can use it to get the
> DisplayPort driver merged in v5.10 too.
>
> Hi Laurent, any other ideas on managing the dependency?

I think that will work fine.

--
Regards,

Laurent Pinchart

2020-09-16 19:59:14

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v6 0/2] PHY: Add new PHY attribute max_link_rate

On 16-09-20, 15:18, Laurent Pinchart wrote:
> Hi Sekhar,
>
> On Wed, Sep 16, 2020 at 01:11:17PM +0530, Sekhar Nori wrote:
> > On 11/09/20 11:48 AM, Swapnil Jakhade wrote:
> > > This patch series adds a new PHY attribute max_link_rate.
> > > It also updates Cadence Torrent PHY driver to set attributes bus_width,
> > > max_link_rate and mode for DisplayPort.
> > >
> > > It includes following patches:
> > >
> > > 1. 0001-phy-Add-new-PHY-attribute-max_link_rate.patch
> > > This patch adds max_link_rate as a new PHY attribute.
> > >
> > > 2. 0002-phy-cadence-torrent-Set-Torrent-PHY-attributes.patch
> > > This patch sets PHY attributes in Cadence Torrent PHY driver. This will
> > > enable drivers using this PHY to read these properties.
> > >
> > > These attributes will be used in the Cadence MHDP DRM bridge driver [1]
> > > which is in the process of upstreaming.
> >
> > Can you please add these patches on an immutable branch/tag when you are
> > ready to apply them - will try to see if we can use it to get the
> > DisplayPort driver merged in v5.10 too.
> >
> > Hi Laurent, any other ideas on managing the dependency?
>
> I think that will work fine.

Please pull tag phy-attrs-5.10 for phy tree

Thanks
--
~Vinod

2020-09-16 20:03:48

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH v6 0/2] PHY: Add new PHY attribute max_link_rate

On Wed, Sep 16, 2020 at 10:57:46PM +0530, Sekhar Nori wrote:
> On 16/09/20 6:13 PM, Vinod Koul wrote:
> > On 16-09-20, 15:18, Laurent Pinchart wrote:
> >> Hi Sekhar,
> >>
> >> On Wed, Sep 16, 2020 at 01:11:17PM +0530, Sekhar Nori wrote:
> >>> On 11/09/20 11:48 AM, Swapnil Jakhade wrote:
> >>>> This patch series adds a new PHY attribute max_link_rate.
> >>>> It also updates Cadence Torrent PHY driver to set attributes bus_width,
> >>>> max_link_rate and mode for DisplayPort.
> >>>>
> >>>> It includes following patches:
> >>>>
> >>>> 1. 0001-phy-Add-new-PHY-attribute-max_link_rate.patch
> >>>> This patch adds max_link_rate as a new PHY attribute.
> >>>>
> >>>> 2. 0002-phy-cadence-torrent-Set-Torrent-PHY-attributes.patch
> >>>> This patch sets PHY attributes in Cadence Torrent PHY driver. This will
> >>>> enable drivers using this PHY to read these properties.
> >>>>
> >>>> These attributes will be used in the Cadence MHDP DRM bridge driver [1]
> >>>> which is in the process of upstreaming.
> >>>
> >>> Can you please add these patches on an immutable branch/tag when you are
> >>> ready to apply them - will try to see if we can use it to get the
> >>> DisplayPort driver merged in v5.10 too.
> >>>
> >>> Hi Laurent, any other ideas on managing the dependency?
> >>
> >> I think that will work fine.
> >
> > Please pull tag phy-attrs-5.10 for phy tree
>
> Thanks Vinod!
>
> Swapnil, please be sure to let DRM maintainers know about the PHY tree
> and the tag they can use when the DP patches are ready for merge.

This should be mentioned in the pull request, but as the branch
submitted for DRM/KMS has to be based on

The simplest (and maybe only) option is to base the branch for the
DRM/KMS subsystem on Vinod's branch. It's however good to mention this
explicitly in the pull request, stating that the base branch is
scheduled for merge in v5.10 through the PHY tree.

> Please keep Vinod in the loop too so he is aware of the tag being pulled.

--
Regards,

Laurent Pinchart

2020-09-16 20:24:29

by Sekhar Nori

[permalink] [raw]
Subject: Re: [PATCH v6 0/2] PHY: Add new PHY attribute max_link_rate

On 16/09/20 6:13 PM, Vinod Koul wrote:
> On 16-09-20, 15:18, Laurent Pinchart wrote:
>> Hi Sekhar,
>>
>> On Wed, Sep 16, 2020 at 01:11:17PM +0530, Sekhar Nori wrote:
>>> On 11/09/20 11:48 AM, Swapnil Jakhade wrote:
>>>> This patch series adds a new PHY attribute max_link_rate.
>>>> It also updates Cadence Torrent PHY driver to set attributes bus_width,
>>>> max_link_rate and mode for DisplayPort.
>>>>
>>>> It includes following patches:
>>>>
>>>> 1. 0001-phy-Add-new-PHY-attribute-max_link_rate.patch
>>>> This patch adds max_link_rate as a new PHY attribute.
>>>>
>>>> 2. 0002-phy-cadence-torrent-Set-Torrent-PHY-attributes.patch
>>>> This patch sets PHY attributes in Cadence Torrent PHY driver. This will
>>>> enable drivers using this PHY to read these properties.
>>>>
>>>> These attributes will be used in the Cadence MHDP DRM bridge driver [1]
>>>> which is in the process of upstreaming.
>>>
>>> Can you please add these patches on an immutable branch/tag when you are
>>> ready to apply them - will try to see if we can use it to get the
>>> DisplayPort driver merged in v5.10 too.
>>>
>>> Hi Laurent, any other ideas on managing the dependency?
>>
>> I think that will work fine.
>
> Please pull tag phy-attrs-5.10 for phy tree

Thanks Vinod!

Swapnil, please be sure to let DRM maintainers know about the PHY tree
and the tag they can use when the DP patches are ready for merge.

Please keep Vinod in the loop too so he is aware of the tag being pulled.

Thanks,
Sekhar