diff mbox series

[3/4] phy: Realtek Otto SerDes: include driver

Message ID 20241004195712.1891488-4-markus.stockhausen@gmx.de
State Superseded
Headers show
Series phy: Realtek Otto SerDes: add new driver | expand

Commit Message

Markus Stockhausen Oct. 4, 2024, 7:56 p.m. UTC
Make the driver available in the build system.
---
 drivers/phy/realtek/Kconfig  | 7 +++++++
 drivers/phy/realtek/Makefile | 1 +
 2 files changed, 8 insertions(+)

--
2.44.0

Comments

Krzysztof Kozlowski Oct. 5, 2024, 9:12 a.m. UTC | #1
On 04/10/2024 21:56, Markus Stockhausen wrote:
> Make the driver available in the build system.
> ---
>  drivers/phy/realtek/Kconfig  | 7 +++++++
>  drivers/phy/realtek/Makefile | 1 +
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/phy/realtek/Kconfig b/drivers/phy/realtek/Kconfig
> index 75ac7e7c31ae..2c711016952d 100644
> --- a/drivers/phy/realtek/Kconfig
> +++ b/drivers/phy/realtek/Kconfig
> @@ -30,3 +30,10 @@ config PHY_RTK_RTD_USB3PHY
>  	  of the parameters.
> 
>  endif # ARCH_REALTEK || COMPILE_TEST
> +
> +config PHY_REALTEK_OTTO_SERDES
> +	tristate "SerDes driver for the Realtek Otto platform"

What is otto platform?

Why this is outside of above ARCH_REALTEK?

> +	depends on OF
> +	select GENERIC_PHY
> +	help
> +	  Enable this for SerDes support in RTL83xx and RTL93xx switches.
> diff --git a/drivers/phy/realtek/Makefile b/drivers/phy/realtek/Makefile
> index ed7b47ff8a26..57e14961d851 100644
> --- a/drivers/phy/realtek/Makefile
> +++ b/drivers/phy/realtek/Makefile
> @@ -1,3 +1,4 @@
>  # SPDX-License-Identifier: GPL-2.0
>  obj-$(CONFIG_PHY_RTK_RTD_USB2PHY)	+= phy-rtk-usb2.o
>  obj-$(CONFIG_PHY_RTK_RTD_USB3PHY)	+= phy-rtk-usb3.o
> +obj-$(CONFIG_PHY_REALTEK_OTTO_SERDES)	+= phy-rtl-otto-serdes.o

Why are you introducing own naming style? Everything is RTK, no?

Best regards,
Krzysztof
Markus Stockhausen Oct. 5, 2024, 10:12 a.m. UTC | #2
> Gesendet: Samstag, 05. Oktober 2024 um 11:12 Uhr
> Von: "Krzysztof Kozlowski" <krzk@kernel.org>
> An: "Markus Stockhausen" <markus.stockhausen@gmx.de>, linux-phy@lists.infradead.org, chris.packham@alliedtelesis.co.nz
> Betreff: Re: [PATCH 3/4] phy: Realtek Otto SerDes: include driver
> On 04/10/2024 21:56, Markus Stockhausen wrote:
> > Make the driver available in the build system.
> > ---
> > drivers/phy/realtek/Kconfig | 7 +++++++
> > drivers/phy/realtek/Makefile | 1 +
> > 2 files changed, 8 insertions(+)
> >
> > diff --git a/drivers/phy/realtek/Kconfig b/drivers/phy/realtek/Kconfig
> > index 75ac7e7c31ae..2c711016952d 100644
> > --- a/drivers/phy/realtek/Kconfig
> > +++ b/drivers/phy/realtek/Kconfig
> > @@ -30,3 +30,10 @@ config PHY_RTK_RTD_USB3PHY
> > of the parameters.
> >
> > endif # ARCH_REALTEK || COMPILE_TEST
> > +
> > +config PHY_REALTEK_OTTO_SERDES
> > + tristate "SerDes driver for the Realtek Otto platform"
> 
> What is otto platform?
> 
> Why this is outside of above ARCH_REALTEK?

The Otto platform is a MIPS network SoC. ARCH_REALTEK is ARMv8. See
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clocksource/timer-rtl-otto.c?h=v6.12-rc1
for another driver I wrote some time ago that got upstreamed lately from Chris Packham.

> > + depends on OF
> > + select GENERIC_PHY
> > + help
> > + Enable this for SerDes support in RTL83xx and RTL93xx switches.
> > diff --git a/drivers/phy/realtek/Makefile b/drivers/phy/realtek/Makefile
> > index ed7b47ff8a26..57e14961d851 100644
> > --- a/drivers/phy/realtek/Makefile
> > +++ b/drivers/phy/realtek/Makefile
> > @@ -1,3 +1,4 @@
> > # SPDX-License-Identifier: GPL-2.0
> > obj-$(CONFIG_PHY_RTK_RTD_USB2PHY) += phy-rtk-usb2.o
> > obj-$(CONFIG_PHY_RTK_RTD_USB3PHY) += phy-rtk-usb3.o
> > +obj-$(CONFIG_PHY_REALTEK_OTTO_SERDES) += phy-rtl-otto-serdes.o
> 
> Why are you introducing own naming style? Everything is RTK, no?

I just copied the timer naming convention.

Best regard.

Markus
Krzysztof Kozlowski Oct. 6, 2024, 8:17 a.m. UTC | #3
On 05/10/2024 12:12, Markus Stockhausen wrote:
>> Gesendet: Samstag, 05. Oktober 2024 um 11:12 Uhr
>> Von: "Krzysztof Kozlowski" <krzk@kernel.org>
>> An: "Markus Stockhausen" <markus.stockhausen@gmx.de>, linux-phy@lists.infradead.org, chris.packham@alliedtelesis.co.nz
>> Betreff: Re: [PATCH 3/4] phy: Realtek Otto SerDes: include driver
>> On 04/10/2024 21:56, Markus Stockhausen wrote:
>>> Make the driver available in the build system.
>>> ---
>>> drivers/phy/realtek/Kconfig | 7 +++++++
>>> drivers/phy/realtek/Makefile | 1 +
>>> 2 files changed, 8 insertions(+)
>>>
>>> diff --git a/drivers/phy/realtek/Kconfig b/drivers/phy/realtek/Kconfig
>>> index 75ac7e7c31ae..2c711016952d 100644
>>> --- a/drivers/phy/realtek/Kconfig
>>> +++ b/drivers/phy/realtek/Kconfig
>>> @@ -30,3 +30,10 @@ config PHY_RTK_RTD_USB3PHY
>>> of the parameters.
>>>
>>> endif # ARCH_REALTEK || COMPILE_TEST
>>> +
>>> +config PHY_REALTEK_OTTO_SERDES
>>> + tristate "SerDes driver for the Realtek Otto platform"
>>
>> What is otto platform?
>>
>> Why this is outside of above ARCH_REALTEK?
> 
> The Otto platform is a MIPS network SoC. ARCH_REALTEK is ARMv8. See
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clocksource/timer-rtl-otto.c?h=v6.12-rc1
> for another driver I wrote some time ago that got upstreamed lately from Chris Packham.

Nothing in commit msg gave any details on that.

> 
>>> + depends on OF
>>> + select GENERIC_PHY
>>> + help
>>> + Enable this for SerDes support in RTL83xx and RTL93xx switches.
>>> diff --git a/drivers/phy/realtek/Makefile b/drivers/phy/realtek/Makefile
>>> index ed7b47ff8a26..57e14961d851 100644
>>> --- a/drivers/phy/realtek/Makefile
>>> +++ b/drivers/phy/realtek/Makefile
>>> @@ -1,3 +1,4 @@
>>> # SPDX-License-Identifier: GPL-2.0
>>> obj-$(CONFIG_PHY_RTK_RTD_USB2PHY) += phy-rtk-usb2.o
>>> obj-$(CONFIG_PHY_RTK_RTD_USB3PHY) += phy-rtk-usb3.o
>>> +obj-$(CONFIG_PHY_REALTEK_OTTO_SERDES) += phy-rtl-otto-serdes.o
>>
>> Why are you introducing own naming style? Everything is RTK, no?
> 
> I just copied the timer naming convention.

Rather please align with upstream Linux kernel conventions.

Best regards,
Krzysztof
Chris Packham Oct. 6, 2024, 9:33 p.m. UTC | #4
On 5/10/24 08:56, Markus Stockhausen wrote:
> Make the driver available in the build system.

IMHO this should just be part of the previous patch.

> ---
>   drivers/phy/realtek/Kconfig  | 7 +++++++
>   drivers/phy/realtek/Makefile | 1 +
>   2 files changed, 8 insertions(+)
>
> diff --git a/drivers/phy/realtek/Kconfig b/drivers/phy/realtek/Kconfig
> index 75ac7e7c31ae..2c711016952d 100644
> --- a/drivers/phy/realtek/Kconfig
> +++ b/drivers/phy/realtek/Kconfig
> @@ -30,3 +30,10 @@ config PHY_RTK_RTD_USB3PHY
>   	  of the parameters.
>
>   endif # ARCH_REALTEK || COMPILE_TEST
> +
> +config PHY_REALTEK_OTTO_SERDES
> +	tristate "SerDes driver for the Realtek Otto platform"
> +	depends on OF
&& (MACH_REALTEK_RTL || COMPILE_TEST)
> +	select GENERIC_PHY
> +	help
> +	  Enable this for SerDes support in RTL83xx and RTL93xx switches.
> diff --git a/drivers/phy/realtek/Makefile b/drivers/phy/realtek/Makefile
> index ed7b47ff8a26..57e14961d851 100644
> --- a/drivers/phy/realtek/Makefile
> +++ b/drivers/phy/realtek/Makefile
> @@ -1,3 +1,4 @@
>   # SPDX-License-Identifier: GPL-2.0
>   obj-$(CONFIG_PHY_RTK_RTD_USB2PHY)	+= phy-rtk-usb2.o
>   obj-$(CONFIG_PHY_RTK_RTD_USB3PHY)	+= phy-rtk-usb3.o
> +obj-$(CONFIG_PHY_REALTEK_OTTO_SERDES)	+= phy-rtl-otto-serdes.o
> --
> 2.44.0
>
diff mbox series

Patch

diff --git a/drivers/phy/realtek/Kconfig b/drivers/phy/realtek/Kconfig
index 75ac7e7c31ae..2c711016952d 100644
--- a/drivers/phy/realtek/Kconfig
+++ b/drivers/phy/realtek/Kconfig
@@ -30,3 +30,10 @@  config PHY_RTK_RTD_USB3PHY
 	  of the parameters.

 endif # ARCH_REALTEK || COMPILE_TEST
+
+config PHY_REALTEK_OTTO_SERDES
+	tristate "SerDes driver for the Realtek Otto platform"
+	depends on OF
+	select GENERIC_PHY
+	help
+	  Enable this for SerDes support in RTL83xx and RTL93xx switches.
diff --git a/drivers/phy/realtek/Makefile b/drivers/phy/realtek/Makefile
index ed7b47ff8a26..57e14961d851 100644
--- a/drivers/phy/realtek/Makefile
+++ b/drivers/phy/realtek/Makefile
@@ -1,3 +1,4 @@ 
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PHY_RTK_RTD_USB2PHY)	+= phy-rtk-usb2.o
 obj-$(CONFIG_PHY_RTK_RTD_USB3PHY)	+= phy-rtk-usb3.o
+obj-$(CONFIG_PHY_REALTEK_OTTO_SERDES)	+= phy-rtl-otto-serdes.o