2019-10-01 06:08:56

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 2/3] net: phy: at803x: add ar9331 support

Mostly this hardware can work with generic PHY driver, but this change
is needed to provided interrupt handling support.
Tested with dsa ar9331-switch driver.

Signed-off-by: Oleksij Rempel <[email protected]>
---
drivers/net/phy/at803x.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index 7895dbe600ac..42492f83c8d7 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -53,6 +53,7 @@
#define AT803X_DEBUG_REG_5 0x05
#define AT803X_DEBUG_TX_CLK_DLY_EN BIT(8)

+#define ATH9331_PHY_ID 0x004dd041
#define ATH8030_PHY_ID 0x004dd076
#define ATH8031_PHY_ID 0x004dd074
#define ATH8035_PHY_ID 0x004dd072
@@ -403,6 +404,16 @@ static struct phy_driver at803x_driver[] = {
.aneg_done = at803x_aneg_done,
.ack_interrupt = &at803x_ack_interrupt,
.config_intr = &at803x_config_intr,
+}, {
+ /* ATHEROS AR9331 */
+ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID),
+ .name = "Atheros AR9331 built-in PHY",
+ .config_init = at803x_config_init,
+ .suspend = at803x_suspend,
+ .resume = at803x_resume,
+ /* PHY_BASIC_FEATURES */
+ .ack_interrupt = &at803x_ack_interrupt,
+ .config_intr = &at803x_config_intr,
} };

module_phy_driver(at803x_driver);
--
2.23.0


2019-10-01 18:42:07

by Heiner Kallweit

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] net: phy: at803x: add ar9331 support

On 01.10.2019 08:08, Oleksij Rempel wrote:
> Mostly this hardware can work with generic PHY driver, but this change
> is needed to provided interrupt handling support.
> Tested with dsa ar9331-switch driver.
>
> Signed-off-by: Oleksij Rempel <[email protected]>
> ---
> drivers/net/phy/at803x.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
> index 7895dbe600ac..42492f83c8d7 100644
> --- a/drivers/net/phy/at803x.c
> +++ b/drivers/net/phy/at803x.c
> @@ -53,6 +53,7 @@
> #define AT803X_DEBUG_REG_5 0x05
> #define AT803X_DEBUG_TX_CLK_DLY_EN BIT(8)
>
> +#define ATH9331_PHY_ID 0x004dd041
> #define ATH8030_PHY_ID 0x004dd076
> #define ATH8031_PHY_ID 0x004dd074
> #define ATH8035_PHY_ID 0x004dd072
> @@ -403,6 +404,16 @@ static struct phy_driver at803x_driver[] = {
> .aneg_done = at803x_aneg_done,
> .ack_interrupt = &at803x_ack_interrupt,
> .config_intr = &at803x_config_intr,
> +}, {
> + /* ATHEROS AR9331 */
> + PHY_ID_MATCH_EXACT(ATH9331_PHY_ID),
> + .name = "Atheros AR9331 built-in PHY",
> + .config_init = at803x_config_init,
> + .suspend = at803x_suspend,
> + .resume = at803x_resume,
> + /* PHY_BASIC_FEATURES */
> + .ack_interrupt = &at803x_ack_interrupt,
> + .config_intr = &at803x_config_intr,
> } };
>
> module_phy_driver(at803x_driver);
>

Reviewed-by: Heiner Kallweit <[email protected]>