Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions arch/arm/dts/sc594-som-ezkit.dts
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,28 @@
bootph-pre-ram;
};

gige-reset {
gpio-hog;
gpios = <15 GPIO_ACTIVE_LOW>;
output-high;
line-name = "gige-reset";
bootph-pre-ram;
};
};

&adin1300 {
reset-gpios = <&crr_gpio_expander 15 GPIO_ACTIVE_LOW>;
reset-assert-us = <10>;
reset-deassert-us = <5000>;
};

&eth1 {
phy-handle = <&adin1200>;
phy-mode = "rmii";
status = "okay";

mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;

adin1200: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
};
};
18 changes: 10 additions & 8 deletions arch/arm/dts/sc594-som-ezlite.dts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@
bootph-pre-ram;
};

eth0-reset {
gpio-hog;
gpios = <12 GPIO_ACTIVE_LOW>;
output-high;
line-name = "eth0-reset";
bootph-pre-ram;
};

adau1372-pwrdwn {
gpio-hog;
gpios = <13 GPIO_ACTIVE_LOW>;
Expand Down Expand Up @@ -94,3 +86,13 @@

};
};

&adin1300 {
reset-gpios = <&crr_gpio_expander 12 GPIO_ACTIVE_LOW>;
reset-assert-us = <10>;
reset-deassert-us = <5000>;
};

&eth1 {
status = "disabled";
};
18 changes: 18 additions & 0 deletions arch/arm/dts/sc594-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,21 @@
&usb0 {
status = "okay";
};

&eth0 {
compatible = "adi,sc59x-dwmac-eqos";
reg = <0x31040000 0x10000>;
phy-handle = <&adin1300>;
phy-mode = "rgmii-id";

mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;

adin1300: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
};
};
};
28 changes: 22 additions & 6 deletions arch/arm/dts/sc598-som-ezkit.dts
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,28 @@
bootph-pre-ram;
};

gige-reset {
gpio-hog;
gpios = <15 GPIO_ACTIVE_LOW>;
output-high;
line-name = "gige-reset";
bootph-pre-ram;
};
};

&adin1300 {
reset-gpios = <&crr_gpio_expander 15 GPIO_ACTIVE_LOW>;
reset-assert-us = <10>;
reset-deassert-us = <5000>;
};

&eth1 {
phy-handle = <&adin1200>;
phy-mode = "rmii";
status = "okay";

mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;

adin1200: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what u-boot policy is on whether to require this compatible or not, but worth a look

reg = <1>;
};
};
};
Expand Down
14 changes: 6 additions & 8 deletions arch/arm/dts/sc598-som-ezlite.dts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@
bootph-pre-ram;
};

eth0-reset {
gpio-hog;
gpios = <12 GPIO_ACTIVE_LOW>;
output-high;
line-name = "eth0-reset";
bootph-pre-ram;
};

adau1372-pwrdwn {
gpio-hog;
gpios = <13 GPIO_ACTIVE_LOW>;
Expand Down Expand Up @@ -93,3 +85,9 @@
};
};
};

&adin1300 {
reset-gpios = <&crr_gpio_expander 12 GPIO_ACTIVE_LOW>;
reset-assert-us = <10>;
reset-deassert-us = <5000>;
};
4 changes: 2 additions & 2 deletions arch/arm/dts/sc598-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@
&eth0 {
compatible = "adi,sc59x-dwmac-eqos";
reg = <0x31040000 0x10000>;
phy-handle = <&dp83867>;
phy-handle = <&adin1300>;
phy-mode = "rgmii-id";

mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;

dp83867: ethernet-phy@0 {
adin1300: ethernet-phy@0 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't look right. the PHY is on the carrier board, not the SoM

compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
};
Expand Down
6 changes: 0 additions & 6 deletions board/adi/carriers/somcrr_ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,20 @@ void adi_somcrr_enable_ethernet(void)
{
struct gpio_desc *eth1;
struct gpio_desc *eth1_reset;
struct gpio_desc *gige_reset;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this commit should be ordered after the update to the DT, or reworded as such, since in the commit message it suggests that the reset has already been put there


if (!gpio_hog_lookup_name("eth1-en", &eth1))
dm_gpio_set_value(eth1, 1);
if (!gpio_hog_lookup_name("eth1-reset", &eth1_reset))
dm_gpio_set_value(eth1_reset, 0);
if (!gpio_hog_lookup_name("gige-reset", &gige_reset))
dm_gpio_set_value(gige_reset, 0);
}

void adi_somcrr_disable_ethernet(void)
{
struct gpio_desc *eth1;
struct gpio_desc *eth1_reset;
struct gpio_desc *gige_reset;

if (!gpio_hog_lookup_name("eth1-en", &eth1))
dm_gpio_set_value(eth1, 0);
if (!gpio_hog_lookup_name("eth1-reset", &eth1_reset))
dm_gpio_set_value(eth1_reset, 1);
if (!gpio_hog_lookup_name("gige-reset", &gige_reset))
dm_gpio_set_value(gige_reset, 1);
}
8 changes: 0 additions & 8 deletions board/adi/carriers/somcrr_ezlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,8 @@

void adi_somcrr_enable_ethernet(void)
{
struct gpio_desc *gige_reset;

if (!gpio_hog_lookup_name("eth0-reset", &gige_reset))
dm_gpio_set_value(gige_reset, 0);
}

void adi_somcrr_disable_ethernet(void)
{
struct gpio_desc *gige_reset;

if (!gpio_hog_lookup_name("eth0-reset", &gige_reset))
dm_gpio_set_value(gige_reset, 1);
}
9 changes: 0 additions & 9 deletions board/adi/common-sc594-som/sc594-som.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,12 @@
*/

#include <config.h>
#include <phy.h>
#include <asm/u-boot.h>
#include <asm/arch/sc5xx.h>
#include <asm/arch/soc.h>

#include "../carriers/somcrr.h"

int board_phy_config(struct phy_device *phydev)
{
if (IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_EZKIT))
fixup_dp83867_phy(phydev);

return 0;
}

int board_init(void)
{
sc59x_remap_ospi();
Expand Down
7 changes: 0 additions & 7 deletions board/adi/common-sc598-som/sc598-som.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@

#include "../carriers/somcrr.h"

int board_phy_config(struct phy_device *phydev)
{
if (IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_EZKIT))
fixup_dp83867_phy(phydev);
return 0;
}

int board_init(void)
{
sc59x_remap_ospi();
Expand Down
1 change: 1 addition & 0 deletions configs/sc594-som-ezkit-spl_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ CONFIG_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPI_FLASH_SOFT_RESET=y
CONFIG_SPI_FLASH_ISSI=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_PHY_ADIN=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DW_ALTDESCRIPTOR=y
CONFIG_PHY=y
Expand Down
1 change: 1 addition & 0 deletions configs/sc594-som-ezlite-spl_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ CONFIG_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPI_FLASH_SOFT_RESET=y
CONFIG_SPI_FLASH_ISSI=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_PHY_ADIN=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DW_ALTDESCRIPTOR=y
CONFIG_PHY=y
Expand Down
1 change: 1 addition & 0 deletions configs/sc598-htol-spl_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ CONFIG_SPI_FLASH_SOFT_RESET=y
CONFIG_SPI_FLASH_ISSI=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_PHY_ADIN=y
CONFIG_DWC_ETH_QOS=y
CONFIG_DWC_ETH_QOS_ADI=y
CONFIG_PHY=y
Expand Down
1 change: 1 addition & 0 deletions configs/sc598-som-ezkit-spl_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ CONFIG_SPI_FLASH_SOFT_RESET=y
CONFIG_SPI_FLASH_ISSI=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_PHY_ADIN=y
CONFIG_DWC_ETH_QOS=y
CONFIG_DWC_ETH_QOS_ADI=y
CONFIG_PHY=y
Expand Down
1 change: 1 addition & 0 deletions configs/sc598-som-ezlite-spl_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ CONFIG_SPI_FLASH_SOFT_RESET=y
CONFIG_SPI_FLASH_ISSI=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_PHY_ADIN=y
CONFIG_DWC_ETH_QOS=y
CONFIG_DWC_ETH_QOS_ADI=y
CONFIG_PHY=y
Expand Down
Loading